generated-configure.sh revision 1665:1e64ec3d1c60
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738STRIPFLAGS
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862PATCH
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949CPIO
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995ORIGINAL_PATH
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_toolchain_version
1082with_jtreg
1083with_extra_cflags
1084with_extra_cxxflags
1085with_extra_ldflags
1086enable_warnings_as_errors
1087enable_debug_symbols
1088enable_zip_debug_info
1089enable_native_coverage
1090with_x
1091with_cups
1092with_cups_include
1093with_freetype
1094with_freetype_include
1095with_freetype_lib
1096with_freetype_src
1097enable_freetype_bundling
1098with_alsa
1099with_alsa_include
1100with_alsa_lib
1101with_libjpeg
1102with_giflib
1103with_lcms
1104with_libpng
1105with_zlib
1106with_stdc__lib
1107with_msvcr_dll
1108with_msvcp_dll
1109with_dxsdk
1110with_dxsdk_lib
1111with_dxsdk_include
1112with_num_cores
1113with_memory_size
1114with_jobs
1115with_boot_jdk_jvmargs
1116with_sjavac_server_java
1117enable_sjavac
1118enable_precompiled_headers
1119enable_ccache
1120with_ccache_dir
1121'
1122      ac_precious_vars='build_alias
1123host_alias
1124target_alias
1125BASENAME
1126BASH
1127CAT
1128CHMOD
1129CMP
1130COMM
1131CP
1132CUT
1133DATE
1134DIFF
1135DIRNAME
1136ECHO
1137EXPR
1138FILE
1139FIND
1140HEAD
1141LN
1142LS
1143MKDIR
1144MKTEMP
1145MV
1146NAWK
1147PRINTF
1148RM
1149SH
1150SORT
1151TAIL
1152TAR
1153TEE
1154TOUCH
1155TR
1156UNAME
1157UNIQ
1158WC
1159WHICH
1160XARGS
1161AWK
1162GREP
1163EGREP
1164FGREP
1165SED
1166CYGPATH
1167READLINK
1168DF
1169CPIO
1170UNZIP
1171ZIP
1172LDD
1173OTOOL
1174READELF
1175HG
1176STAT
1177TIME
1178PATCH
1179DSYMUTIL
1180XATTR
1181CODESIGN
1182SETFILE
1183PKG_CONFIG
1184JAVA
1185JAVAC
1186JAVAH
1187JAR
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201LIPO
1202STRIP
1203NM
1204GNM
1205OBJCOPY
1206OBJDUMP
1207BUILD_CC
1208BUILD_CXX
1209BUILD_LD
1210JTREGEXE
1211XMKMF
1212FREETYPE_CFLAGS
1213FREETYPE_LIBS
1214ALSA_CFLAGS
1215ALSA_LIBS
1216LCMS_CFLAGS
1217LCMS_LIBS
1218PNG_CFLAGS
1219PNG_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222CCACHE'
1223
1224
1225# Initialize some variables set by options.
1226ac_init_help=
1227ac_init_version=false
1228ac_unrecognized_opts=
1229ac_unrecognized_sep=
1230# The variables have the same names as the options, with
1231# dashes changed to underlines.
1232cache_file=/dev/null
1233exec_prefix=NONE
1234no_create=
1235no_recursion=
1236prefix=NONE
1237program_prefix=NONE
1238program_suffix=NONE
1239program_transform_name=s,x,x,
1240silent=
1241site=
1242srcdir=
1243verbose=
1244x_includes=NONE
1245x_libraries=NONE
1246
1247# Installation directory options.
1248# These are left unexpanded so users can "make install exec_prefix=/foo"
1249# and all the variables that are supposed to be based on exec_prefix
1250# by default will actually change.
1251# Use braces instead of parens because sh, perl, etc. also accept them.
1252# (The list follows the same order as the GNU Coding Standards.)
1253bindir='${exec_prefix}/bin'
1254sbindir='${exec_prefix}/sbin'
1255libexecdir='${exec_prefix}/libexec'
1256datarootdir='${prefix}/share'
1257datadir='${datarootdir}'
1258sysconfdir='${prefix}/etc'
1259sharedstatedir='${prefix}/com'
1260localstatedir='${prefix}/var'
1261includedir='${prefix}/include'
1262oldincludedir='/usr/include'
1263docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264infodir='${datarootdir}/info'
1265htmldir='${docdir}'
1266dvidir='${docdir}'
1267pdfdir='${docdir}'
1268psdir='${docdir}'
1269libdir='${exec_prefix}/lib'
1270localedir='${datarootdir}/locale'
1271mandir='${datarootdir}/man'
1272
1273ac_prev=
1274ac_dashdash=
1275for ac_option
1276do
1277  # If the previous option needs an argument, assign it.
1278  if test -n "$ac_prev"; then
1279    eval $ac_prev=\$ac_option
1280    ac_prev=
1281    continue
1282  fi
1283
1284  case $ac_option in
1285  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286  *=)   ac_optarg= ;;
1287  *)    ac_optarg=yes ;;
1288  esac
1289
1290  # Accept the important Cygnus configure options, so we can diagnose typos.
1291
1292  case $ac_dashdash$ac_option in
1293  --)
1294    ac_dashdash=yes ;;
1295
1296  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297    ac_prev=bindir ;;
1298  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299    bindir=$ac_optarg ;;
1300
1301  -build | --build | --buil | --bui | --bu)
1302    ac_prev=build_alias ;;
1303  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304    build_alias=$ac_optarg ;;
1305
1306  -cache-file | --cache-file | --cache-fil | --cache-fi \
1307  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308    ac_prev=cache_file ;;
1309  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311    cache_file=$ac_optarg ;;
1312
1313  --config-cache | -C)
1314    cache_file=config.cache ;;
1315
1316  -datadir | --datadir | --datadi | --datad)
1317    ac_prev=datadir ;;
1318  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319    datadir=$ac_optarg ;;
1320
1321  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322  | --dataroo | --dataro | --datar)
1323    ac_prev=datarootdir ;;
1324  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326    datarootdir=$ac_optarg ;;
1327
1328  -disable-* | --disable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=no ;;
1343
1344  -docdir | --docdir | --docdi | --doc | --do)
1345    ac_prev=docdir ;;
1346  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347    docdir=$ac_optarg ;;
1348
1349  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350    ac_prev=dvidir ;;
1351  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352    dvidir=$ac_optarg ;;
1353
1354  -enable-* | --enable-*)
1355    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356    # Reject names that are not valid shell variable names.
1357    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358      as_fn_error $? "invalid feature name: $ac_useropt"
1359    ac_useropt_orig=$ac_useropt
1360    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361    case $ac_user_opts in
1362      *"
1363"enable_$ac_useropt"
1364"*) ;;
1365      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366	 ac_unrecognized_sep=', ';;
1367    esac
1368    eval enable_$ac_useropt=\$ac_optarg ;;
1369
1370  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372  | --exec | --exe | --ex)
1373    ac_prev=exec_prefix ;;
1374  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376  | --exec=* | --exe=* | --ex=*)
1377    exec_prefix=$ac_optarg ;;
1378
1379  -gas | --gas | --ga | --g)
1380    # Obsolete; use --with-gas.
1381    with_gas=yes ;;
1382
1383  -help | --help | --hel | --he | -h)
1384    ac_init_help=long ;;
1385  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386    ac_init_help=recursive ;;
1387  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388    ac_init_help=short ;;
1389
1390  -host | --host | --hos | --ho)
1391    ac_prev=host_alias ;;
1392  -host=* | --host=* | --hos=* | --ho=*)
1393    host_alias=$ac_optarg ;;
1394
1395  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396    ac_prev=htmldir ;;
1397  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398  | --ht=*)
1399    htmldir=$ac_optarg ;;
1400
1401  -includedir | --includedir | --includedi | --included | --include \
1402  | --includ | --inclu | --incl | --inc)
1403    ac_prev=includedir ;;
1404  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405  | --includ=* | --inclu=* | --incl=* | --inc=*)
1406    includedir=$ac_optarg ;;
1407
1408  -infodir | --infodir | --infodi | --infod | --info | --inf)
1409    ac_prev=infodir ;;
1410  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411    infodir=$ac_optarg ;;
1412
1413  -libdir | --libdir | --libdi | --libd)
1414    ac_prev=libdir ;;
1415  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416    libdir=$ac_optarg ;;
1417
1418  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419  | --libexe | --libex | --libe)
1420    ac_prev=libexecdir ;;
1421  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422  | --libexe=* | --libex=* | --libe=*)
1423    libexecdir=$ac_optarg ;;
1424
1425  -localedir | --localedir | --localedi | --localed | --locale)
1426    ac_prev=localedir ;;
1427  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428    localedir=$ac_optarg ;;
1429
1430  -localstatedir | --localstatedir | --localstatedi | --localstated \
1431  | --localstate | --localstat | --localsta | --localst | --locals)
1432    ac_prev=localstatedir ;;
1433  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435    localstatedir=$ac_optarg ;;
1436
1437  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438    ac_prev=mandir ;;
1439  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440    mandir=$ac_optarg ;;
1441
1442  -nfp | --nfp | --nf)
1443    # Obsolete; use --without-fp.
1444    with_fp=no ;;
1445
1446  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447  | --no-cr | --no-c | -n)
1448    no_create=yes ;;
1449
1450  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452    no_recursion=yes ;;
1453
1454  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456  | --oldin | --oldi | --old | --ol | --o)
1457    ac_prev=oldincludedir ;;
1458  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461    oldincludedir=$ac_optarg ;;
1462
1463  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464    ac_prev=prefix ;;
1465  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466    prefix=$ac_optarg ;;
1467
1468  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469  | --program-pre | --program-pr | --program-p)
1470    ac_prev=program_prefix ;;
1471  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473    program_prefix=$ac_optarg ;;
1474
1475  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476  | --program-suf | --program-su | --program-s)
1477    ac_prev=program_suffix ;;
1478  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480    program_suffix=$ac_optarg ;;
1481
1482  -program-transform-name | --program-transform-name \
1483  | --program-transform-nam | --program-transform-na \
1484  | --program-transform-n | --program-transform- \
1485  | --program-transform | --program-transfor \
1486  | --program-transfo | --program-transf \
1487  | --program-trans | --program-tran \
1488  | --progr-tra | --program-tr | --program-t)
1489    ac_prev=program_transform_name ;;
1490  -program-transform-name=* | --program-transform-name=* \
1491  | --program-transform-nam=* | --program-transform-na=* \
1492  | --program-transform-n=* | --program-transform-=* \
1493  | --program-transform=* | --program-transfor=* \
1494  | --program-transfo=* | --program-transf=* \
1495  | --program-trans=* | --program-tran=* \
1496  | --progr-tra=* | --program-tr=* | --program-t=*)
1497    program_transform_name=$ac_optarg ;;
1498
1499  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500    ac_prev=pdfdir ;;
1501  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502    pdfdir=$ac_optarg ;;
1503
1504  -psdir | --psdir | --psdi | --psd | --ps)
1505    ac_prev=psdir ;;
1506  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507    psdir=$ac_optarg ;;
1508
1509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510  | -silent | --silent | --silen | --sile | --sil)
1511    silent=yes ;;
1512
1513  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514    ac_prev=sbindir ;;
1515  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516  | --sbi=* | --sb=*)
1517    sbindir=$ac_optarg ;;
1518
1519  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521  | --sharedst | --shareds | --shared | --share | --shar \
1522  | --sha | --sh)
1523    ac_prev=sharedstatedir ;;
1524  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527  | --sha=* | --sh=*)
1528    sharedstatedir=$ac_optarg ;;
1529
1530  -site | --site | --sit)
1531    ac_prev=site ;;
1532  -site=* | --site=* | --sit=*)
1533    site=$ac_optarg ;;
1534
1535  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536    ac_prev=srcdir ;;
1537  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538    srcdir=$ac_optarg ;;
1539
1540  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541  | --syscon | --sysco | --sysc | --sys | --sy)
1542    ac_prev=sysconfdir ;;
1543  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545    sysconfdir=$ac_optarg ;;
1546
1547  -target | --target | --targe | --targ | --tar | --ta | --t)
1548    ac_prev=target_alias ;;
1549  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550    target_alias=$ac_optarg ;;
1551
1552  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553    verbose=yes ;;
1554
1555  -version | --version | --versio | --versi | --vers | -V)
1556    ac_init_version=: ;;
1557
1558  -with-* | --with-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=\$ac_optarg ;;
1573
1574  -without-* | --without-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=no ;;
1589
1590  --x)
1591    # Obsolete; use --with-x.
1592    with_x=yes ;;
1593
1594  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595  | --x-incl | --x-inc | --x-in | --x-i)
1596    ac_prev=x_includes ;;
1597  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599    x_includes=$ac_optarg ;;
1600
1601  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603    ac_prev=x_libraries ;;
1604  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606    x_libraries=$ac_optarg ;;
1607
1608  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609Try \`$0 --help' for more information"
1610    ;;
1611
1612  *=*)
1613    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614    # Reject names that are not valid shell variable names.
1615    case $ac_envvar in #(
1616      '' | [0-9]* | *[!_$as_cr_alnum]* )
1617      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618    esac
1619    eval $ac_envvar=\$ac_optarg
1620    export $ac_envvar ;;
1621
1622  *)
1623    # FIXME: should be removed in autoconf 3.0.
1624    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628    ;;
1629
1630  esac
1631done
1632
1633if test -n "$ac_prev"; then
1634  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635  as_fn_error $? "missing argument to $ac_option"
1636fi
1637
1638if test -n "$ac_unrecognized_opts"; then
1639  case $enable_option_checking in
1640    no) ;;
1641    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643  esac
1644fi
1645
1646# Check all directory arguments for consistency.
1647for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648		datadir sysconfdir sharedstatedir localstatedir includedir \
1649		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650		libdir localedir mandir
1651do
1652  eval ac_val=\$$ac_var
1653  # Remove trailing slashes.
1654  case $ac_val in
1655    */ )
1656      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657      eval $ac_var=\$ac_val;;
1658  esac
1659  # Be sure to have absolute directory names.
1660  case $ac_val in
1661    [\\/$]* | ?:[\\/]* )  continue;;
1662    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663  esac
1664  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665done
1666
1667# There might be people who depend on the old broken behavior: `$host'
1668# used to hold the argument of --host etc.
1669# FIXME: To remove some day.
1670build=$build_alias
1671host=$host_alias
1672target=$target_alias
1673
1674# FIXME: To remove some day.
1675if test "x$host_alias" != x; then
1676  if test "x$build_alias" = x; then
1677    cross_compiling=maybe
1678  elif test "x$build_alias" != "x$host_alias"; then
1679    cross_compiling=yes
1680  fi
1681fi
1682
1683ac_tool_prefix=
1684test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685
1686test "$silent" = yes && exec 6>/dev/null
1687
1688
1689ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690ac_ls_di=`ls -di .` &&
1691ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692  as_fn_error $? "working directory cannot be determined"
1693test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694  as_fn_error $? "pwd does not report name of working directory"
1695
1696
1697# Find the source files, if location was not specified.
1698if test -z "$srcdir"; then
1699  ac_srcdir_defaulted=yes
1700  # Try the directory containing this script, then the parent directory.
1701  ac_confdir=`$as_dirname -- "$as_myself" ||
1702$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703	 X"$as_myself" : 'X\(//\)[^/]' \| \
1704	 X"$as_myself" : 'X\(//\)$' \| \
1705	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706$as_echo X"$as_myself" |
1707    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)[^/].*/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\).*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  s/.*/./; q'`
1724  srcdir=$ac_confdir
1725  if test ! -r "$srcdir/$ac_unique_file"; then
1726    srcdir=..
1727  fi
1728else
1729  ac_srcdir_defaulted=no
1730fi
1731if test ! -r "$srcdir/$ac_unique_file"; then
1732  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734fi
1735ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736ac_abs_confdir=`(
1737	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738	pwd)`
1739# When building in place, set srcdir=.
1740if test "$ac_abs_confdir" = "$ac_pwd"; then
1741  srcdir=.
1742fi
1743# Remove unnecessary trailing slashes from srcdir.
1744# Double slashes in file names in object file debugging info
1745# mess up M-x gdb in Emacs.
1746case $srcdir in
1747*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748esac
1749for ac_var in $ac_precious_vars; do
1750  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_env_${ac_var}_value=\$${ac_var}
1752  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754done
1755
1756#
1757# Report the --help message.
1758#
1759if test "$ac_init_help" = "long"; then
1760  # Omit some internal or obsolete options to make the list less imposing.
1761  # This message is too long to be a string in the A/UX 3.1 sh.
1762  cat <<_ACEOF
1763\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764
1765Usage: $0 [OPTION]... [VAR=VALUE]...
1766
1767To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768VAR=VALUE.  See below for descriptions of some of the useful variables.
1769
1770Defaults for the options are specified in brackets.
1771
1772Configuration:
1773  -h, --help              display this help and exit
1774      --help=short        display options specific to this package
1775      --help=recursive    display the short help of all the included packages
1776  -V, --version           display version information and exit
1777  -q, --quiet, --silent   do not print \`checking ...' messages
1778      --cache-file=FILE   cache test results in FILE [disabled]
1779  -C, --config-cache      alias for \`--cache-file=config.cache'
1780  -n, --no-create         do not create output files
1781      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782
1783Installation directories:
1784  --prefix=PREFIX         install architecture-independent files in PREFIX
1785                          [$ac_default_prefix]
1786  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                          [PREFIX]
1788
1789By default, \`make install' will install all the files in
1790\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792for instance \`--prefix=\$HOME'.
1793
1794For better control, use the options below.
1795
1796Fine tuning of the installation directories:
1797  --bindir=DIR            user executables [EPREFIX/bin]
1798  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799  --libexecdir=DIR        program executables [EPREFIX/libexec]
1800  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803  --libdir=DIR            object code libraries [EPREFIX/lib]
1804  --includedir=DIR        C header files [PREFIX/include]
1805  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808  --infodir=DIR           info documentation [DATAROOTDIR/info]
1809  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810  --mandir=DIR            man documentation [DATAROOTDIR/man]
1811  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812  --htmldir=DIR           html documentation [DOCDIR]
1813  --dvidir=DIR            dvi documentation [DOCDIR]
1814  --pdfdir=DIR            pdf documentation [DOCDIR]
1815  --psdir=DIR             ps documentation [DOCDIR]
1816_ACEOF
1817
1818  cat <<\_ACEOF
1819
1820X features:
1821  --x-includes=DIR    X include files are in DIR
1822  --x-libraries=DIR   X library files are in DIR
1823
1824System types:
1825  --build=BUILD     configure for building on BUILD [guessed]
1826  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827  --target=TARGET   configure for building compilers for TARGET [HOST]
1828_ACEOF
1829fi
1830
1831if test -n "$ac_init_help"; then
1832  case $ac_init_help in
1833     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834   esac
1835  cat <<\_ACEOF
1836
1837Optional Features:
1838  --disable-option-checking  ignore unrecognized --enable/--with options
1839  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841  --enable-openjdk-only   suppress building custom source even if present
1842                          [disabled]
1843  --enable-debug          set the debug level to fastdebug (shorthand for
1844                          --with-debug-level=fastdebug) [disabled]
1845  --disable-headful       disable building headful support (graphical UI
1846                          support) [enabled]
1847  --enable-hotspot-test-in-build
1848                          run the Queens test after Hotspot build [disabled]
1849  --enable-unlimited-crypto
1850                          Enable unlimited crypto policy [disabled]
1851  --disable-warnings-as-errors
1852                          do not consider native warnings to be an error
1853                          [enabled]
1854  --disable-debug-symbols disable generation of debug symbols [enabled]
1855  --disable-zip-debug-info
1856                          disable zipping of debug-info files [enabled]
1857  --enable-native-coverage
1858                          enable native compilation with code coverage
1859                          data[disabled]
1860  --disable-freetype-bundling
1861                          disable bundling of the freetype library with the
1862                          build result [enabled on Windows or when using
1863                          --with-freetype, disabled otherwise]
1864  --enable-sjavac         use sjavac to do fast incremental compiles
1865                          [disabled]
1866  --disable-precompiled-headers
1867                          disable using precompiled headers when compiling C++
1868                          [enabled]
1869  --enable-ccache         enable using ccache to speed up recompilations
1870                          [disabled]
1871
1872Optional Packages:
1873  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1874  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1875  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1876                          support it), e.g. --with-target-bits=32 [guessed]
1877  --with-custom-make-dir  Deprecated. Option is kept for backwards
1878                          compatibility and is ignored
1879  --with-jdk-variant      JDK variant to build (normal) [normal]
1880  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1881  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1882                          client, minimal1, kernel, zero, zeroshark, core)
1883                          [server]
1884  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1885                          optimized (HotSpot build only)) [release]
1886  --with-devkit           use this devkit for compilers, tools and resources
1887  --with-sys-root         alias for --with-sysroot for backwards compatability
1888  --with-sysroot          use this directory as sysroot
1889  --with-tools-dir        alias for --with-toolchain-path for backwards
1890                          compatibility
1891  --with-toolchain-path   prepend these directories when searching for
1892                          toolchain binaries (compilers etc)
1893  --with-extra-path       prepend these directories to the default path
1894  --with-sdk-name         use the platform SDK of the given name. [macosx]
1895  --with-conf-name        use this as the name of the configuration [generated
1896                          from important configuration options]
1897  --with-output-sync      set make output sync type if supported by make.
1898                          [recurse]
1899  --with-builddeps-conf   use this configuration file for the builddeps
1900  --with-builddeps-server download and use build dependencies from this server
1901                          url
1902  --with-builddeps-dir    store downloaded build dependencies here
1903                          [/localhome/builddeps]
1904  --with-builddeps-group  chgrp the downloaded build dependencies to this
1905                          group
1906  --with-cacerts-file     specify alternative cacerts file
1907  --with-milestone        Set milestone value for build [internal]
1908  --with-update-version   Set update version value for build [b00]
1909  --with-user-release-suffix
1910                          Add a custom string to the version string if build
1911                          number is not set.[username_builddateb00]
1912  --with-build-number     Set build number value for build [b00]
1913  --with-copyright-year   Set copyright year value for build [current year]
1914  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915  --with-add-source-root  for each and every source directory, look in this
1916                          additional source root for the same directory; if it
1917                          exists and have files in it, include it in the build
1918  --with-override-source-root
1919                          for each and every source directory, look in this
1920                          override source root for the same directory; if it
1921                          exists, use that directory instead and ignore the
1922                          directory in the original source root
1923  --with-adds-and-overrides
1924                          use the subdirs 'adds' and 'overrides' in the
1925                          specified directory as add-source-root and
1926                          override-source-root
1927  --with-override-langtools
1928                          use this langtools dir for the build
1929  --with-override-corba   use this corba dir for the build
1930  --with-override-jaxp    use this jaxp dir for the build
1931  --with-override-jaxws   use this jaxws dir for the build
1932  --with-override-hotspot use this hotspot dir for the build
1933  --with-override-nashorn use this nashorn dir for the build
1934  --with-override-jdk     use this jdk dir for the build
1935  --with-import-hotspot   import hotspot binaries from this jdk image or
1936                          hotspot build dist dir instead of building from
1937                          source
1938  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                          to show possible values [platform dependent]
1940  --with-toolchain-version
1941                          the version of the toolchain to look for, use
1942                          '--help' to show possible values [platform
1943                          dependent]
1944  --with-jtreg            Regression Test Harness [probed]
1945  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947  --with-extra-ldflags    extra flags to be used when linking jdk
1948  --with-x                use the X Window System
1949  --with-cups             specify prefix directory for the cups package
1950                          (expecting the headers under PATH/include)
1951  --with-cups-include     specify directory for the cups include files
1952  --with-freetype         specify prefix directory for the freetype package
1953                          (expecting the libraries under PATH/lib and the
1954                          headers under PATH/include)
1955  --with-freetype-include specify directory for the freetype include files
1956  --with-freetype-lib     specify directory for the freetype library
1957  --with-freetype-src     specify directory with freetype sources to
1958                          automatically build the library (experimental,
1959                          Windows-only)
1960  --with-alsa             specify prefix directory for the alsa package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-alsa-include     specify directory for the alsa include files
1964  --with-alsa-lib         specify directory for the alsa library
1965  --with-libjpeg          use libjpeg from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-giflib           use giflib from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-lcms             use lcms2 from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-libpng           use libpng from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-zlib             use zlib from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-stdc++lib=<static>,<dynamic>,<default>
1976                          force linking of the C++ runtime on Linux to either
1977                          static or dynamic, default is static with dynamic as
1978                          fallback
1979  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1980                          (Windows only) [probed]
1981  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1982                          (Windows only) [probed]
1983  --with-dxsdk            Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-num-cores        number of cores in the build system, e.g.
1990                          --with-num-cores=8 [probed]
1991  --with-memory-size      memory (in MB) available in the build system, e.g.
1992                          --with-memory-size=1024 [probed]
1993  --with-jobs             number of parallel jobs to let make run [calculated
1994                          based on cores and memory]
1995  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                          invocations of boot JDK, overriding the default
1997                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                          -enableassertions"
1999  --with-sjavac-server-java
2000                          use this java binary for running the sjavac
2001                          background server [Boot JDK java]
2002  --with-ccache-dir       where to store ccache files [~/.ccache]
2003
2004Some influential environment variables:
2005  BASENAME    Override default value for BASENAME
2006  BASH        Override default value for BASH
2007  CAT         Override default value for CAT
2008  CHMOD       Override default value for CHMOD
2009  CMP         Override default value for CMP
2010  COMM        Override default value for COMM
2011  CP          Override default value for CP
2012  CUT         Override default value for CUT
2013  DATE        Override default value for DATE
2014  DIFF        Override default value for DIFF
2015  DIRNAME     Override default value for DIRNAME
2016  ECHO        Override default value for ECHO
2017  EXPR        Override default value for EXPR
2018  FILE        Override default value for FILE
2019  FIND        Override default value for FIND
2020  HEAD        Override default value for HEAD
2021  LN          Override default value for LN
2022  LS          Override default value for LS
2023  MKDIR       Override default value for MKDIR
2024  MKTEMP      Override default value for MKTEMP
2025  MV          Override default value for MV
2026  NAWK        Override default value for NAWK
2027  PRINTF      Override default value for PRINTF
2028  RM          Override default value for RM
2029  SH          Override default value for SH
2030  SORT        Override default value for SORT
2031  TAIL        Override default value for TAIL
2032  TAR         Override default value for TAR
2033  TEE         Override default value for TEE
2034  TOUCH       Override default value for TOUCH
2035  TR          Override default value for TR
2036  UNAME       Override default value for UNAME
2037  UNIQ        Override default value for UNIQ
2038  WC          Override default value for WC
2039  WHICH       Override default value for WHICH
2040  XARGS       Override default value for XARGS
2041  AWK         Override default value for AWK
2042  GREP        Override default value for GREP
2043  EGREP       Override default value for EGREP
2044  FGREP       Override default value for FGREP
2045  SED         Override default value for SED
2046  CYGPATH     Override default value for CYGPATH
2047  READLINK    Override default value for READLINK
2048  DF          Override default value for DF
2049  CPIO        Override default value for CPIO
2050  UNZIP       Override default value for UNZIP
2051  ZIP         Override default value for ZIP
2052  LDD         Override default value for LDD
2053  OTOOL       Override default value for OTOOL
2054  READELF     Override default value for READELF
2055  HG          Override default value for HG
2056  STAT        Override default value for STAT
2057  TIME        Override default value for TIME
2058  PATCH       Override default value for PATCH
2059  DSYMUTIL    Override default value for DSYMUTIL
2060  XATTR       Override default value for XATTR
2061  CODESIGN    Override default value for CODESIGN
2062  SETFILE     Override default value for SETFILE
2063  PKG_CONFIG  path to pkg-config utility
2064  JAVA        Override default value for JAVA
2065  JAVAC       Override default value for JAVAC
2066  JAVAH       Override default value for JAVAH
2067  JAR         Override default value for JAR
2068  JARSIGNER   Override default value for JARSIGNER
2069  CC          C compiler command
2070  CFLAGS      C compiler flags
2071  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2072              nonstandard directory <lib dir>
2073  LIBS        libraries to pass to the linker, e.g. -l<library>
2074  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2075              you have headers in a nonstandard directory <include dir>
2076  CXX         C++ compiler command
2077  CXXFLAGS    C++ compiler flags
2078  CPP         C preprocessor
2079  CXXCPP      C++ preprocessor
2080  AS          Override default value for AS
2081  AR          Override default value for AR
2082  LIPO        Override default value for LIPO
2083  STRIP       Override default value for STRIP
2084  NM          Override default value for NM
2085  GNM         Override default value for GNM
2086  OBJCOPY     Override default value for OBJCOPY
2087  OBJDUMP     Override default value for OBJDUMP
2088  BUILD_CC    Override default value for BUILD_CC
2089  BUILD_CXX   Override default value for BUILD_CXX
2090  BUILD_LD    Override default value for BUILD_LD
2091  JTREGEXE    Override default value for JTREGEXE
2092  XMKMF       Path to xmkmf, Makefile generator for X Window System
2093  FREETYPE_CFLAGS
2094              C compiler flags for FREETYPE, overriding pkg-config
2095  FREETYPE_LIBS
2096              linker flags for FREETYPE, overriding pkg-config
2097  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2098  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2099  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2100  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2101  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2102  PNG_LIBS    linker flags for PNG, overriding pkg-config
2103  LIBFFI_CFLAGS
2104              C compiler flags for LIBFFI, overriding pkg-config
2105  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2106  CCACHE      Override default value for CCACHE
2107
2108Use these variables to override the choices made by `configure' or to help
2109it to find libraries and programs with nonstandard names/locations.
2110
2111Report bugs to <build-dev@openjdk.java.net>.
2112OpenJDK home page: <http://openjdk.java.net>.
2113_ACEOF
2114ac_status=$?
2115fi
2116
2117if test "$ac_init_help" = "recursive"; then
2118  # If there are subdirs, report their specific --help.
2119  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2120    test -d "$ac_dir" ||
2121      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2122      continue
2123    ac_builddir=.
2124
2125case "$ac_dir" in
2126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2127*)
2128  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2129  # A ".." for each directory in $ac_dir_suffix.
2130  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2131  case $ac_top_builddir_sub in
2132  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2133  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2134  esac ;;
2135esac
2136ac_abs_top_builddir=$ac_pwd
2137ac_abs_builddir=$ac_pwd$ac_dir_suffix
2138# for backward compatibility:
2139ac_top_builddir=$ac_top_build_prefix
2140
2141case $srcdir in
2142  .)  # We are building in place.
2143    ac_srcdir=.
2144    ac_top_srcdir=$ac_top_builddir_sub
2145    ac_abs_top_srcdir=$ac_pwd ;;
2146  [\\/]* | ?:[\\/]* )  # Absolute name.
2147    ac_srcdir=$srcdir$ac_dir_suffix;
2148    ac_top_srcdir=$srcdir
2149    ac_abs_top_srcdir=$srcdir ;;
2150  *) # Relative name.
2151    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2152    ac_top_srcdir=$ac_top_build_prefix$srcdir
2153    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2154esac
2155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2156
2157    cd "$ac_dir" || { ac_status=$?; continue; }
2158    # Check for guested configure.
2159    if test -f "$ac_srcdir/configure.gnu"; then
2160      echo &&
2161      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2162    elif test -f "$ac_srcdir/configure"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure" --help=recursive
2165    else
2166      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2167    fi || ac_status=$?
2168    cd "$ac_pwd" || { ac_status=$?; break; }
2169  done
2170fi
2171
2172test -n "$ac_init_help" && exit $ac_status
2173if $ac_init_version; then
2174  cat <<\_ACEOF
2175OpenJDK configure jdk9
2176generated by GNU Autoconf 2.69
2177
2178Copyright (C) 2012 Free Software Foundation, Inc.
2179This configure script is free software; the Free Software Foundation
2180gives unlimited permission to copy, distribute and modify it.
2181_ACEOF
2182  exit
2183fi
2184
2185## ------------------------ ##
2186## Autoconf initialization. ##
2187## ------------------------ ##
2188
2189# ac_fn_c_try_compile LINENO
2190# --------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_c_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_c_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_try_compile
2226
2227# ac_fn_cxx_try_compile LINENO
2228# ----------------------------
2229# Try to compile conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_cxx_try_compile ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  rm -f conftest.$ac_objext
2234  if { { ac_try="$ac_compile"
2235case "(($ac_try" in
2236  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2237  *) ac_try_echo=$ac_try;;
2238esac
2239eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2240$as_echo "$ac_try_echo"; } >&5
2241  (eval "$ac_compile") 2>conftest.err
2242  ac_status=$?
2243  if test -s conftest.err; then
2244    grep -v '^ *+' conftest.err >conftest.er1
2245    cat conftest.er1 >&5
2246    mv -f conftest.er1 conftest.err
2247  fi
2248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2249  test $ac_status = 0; } && {
2250	 test -z "$ac_cxx_werror_flag" ||
2251	 test ! -s conftest.err
2252       } && test -s conftest.$ac_objext; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258	ac_retval=1
2259fi
2260  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261  as_fn_set_status $ac_retval
2262
2263} # ac_fn_cxx_try_compile
2264
2265# ac_fn_c_try_cpp LINENO
2266# ----------------------
2267# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2268ac_fn_c_try_cpp ()
2269{
2270  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271  if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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; } > conftest.i && {
2287	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2288	 test ! -s conftest.err
2289       }; 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_c_try_cpp
2301
2302# ac_fn_cxx_try_cpp LINENO
2303# ------------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_cxx_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_cxx_preproc_warn_flag$ac_cxx_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_cxx_try_cpp
2338
2339# ac_fn_c_try_link LINENO
2340# -----------------------
2341# Try to link conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_c_try_link ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  rm -f conftest.$ac_objext conftest$ac_exeext
2346  if { { ac_try="$ac_link"
2347case "(($ac_try" in
2348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349  *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353  (eval "$ac_link") 2>conftest.err
2354  ac_status=$?
2355  if test -s conftest.err; then
2356    grep -v '^ *+' conftest.err >conftest.er1
2357    cat conftest.er1 >&5
2358    mv -f conftest.er1 conftest.err
2359  fi
2360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361  test $ac_status = 0; } && {
2362	 test -z "$ac_c_werror_flag" ||
2363	 test ! -s conftest.err
2364       } && test -s conftest$ac_exeext && {
2365	 test "$cross_compiling" = yes ||
2366	 test -x conftest$ac_exeext
2367       }; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373	ac_retval=1
2374fi
2375  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2376  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2377  # interfere with the next link command; also delete a directory that is
2378  # left behind by Apple's compiler.  We do this before executing the actions.
2379  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_link
2384
2385# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2386# ---------------------------------------------------------
2387# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2388# the include files in INCLUDES and setting the cache variable VAR
2389# accordingly.
2390ac_fn_cxx_check_header_mongrel ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  if eval \${$3+:} false; then :
2394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2395$as_echo_n "checking for $2... " >&6; }
2396if eval \${$3+:} false; then :
2397  $as_echo_n "(cached) " >&6
2398fi
2399eval ac_res=\$$3
2400	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402else
2403  # Is the header compilable?
2404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2405$as_echo_n "checking $2 usability... " >&6; }
2406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h.  */
2408$4
2409#include <$2>
2410_ACEOF
2411if ac_fn_cxx_try_compile "$LINENO"; then :
2412  ac_header_compiler=yes
2413else
2414  ac_header_compiler=no
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2418$as_echo "$ac_header_compiler" >&6; }
2419
2420# Is the header present?
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2422$as_echo_n "checking $2 presence... " >&6; }
2423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425#include <$2>
2426_ACEOF
2427if ac_fn_cxx_try_cpp "$LINENO"; then :
2428  ac_header_preproc=yes
2429else
2430  ac_header_preproc=no
2431fi
2432rm -f conftest.err conftest.i conftest.$ac_ext
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2434$as_echo "$ac_header_preproc" >&6; }
2435
2436# So?  What about this header?
2437case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2438  yes:no: )
2439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2440$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2442$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2443    ;;
2444  no:yes:* )
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2446$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2448$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2450$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2452$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2454$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2455( $as_echo "## ----------------------------------------- ##
2456## Report this to build-dev@openjdk.java.net ##
2457## ----------------------------------------- ##"
2458     ) | sed "s/^/$as_me: WARNING:     /" >&2
2459    ;;
2460esac
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval \${$3+:} false; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  eval "$3=\$ac_header_compiler"
2467fi
2468eval ac_res=\$$3
2469	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2470$as_echo "$ac_res" >&6; }
2471fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473
2474} # ac_fn_cxx_check_header_mongrel
2475
2476# ac_fn_cxx_try_run LINENO
2477# ------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2479# that executables *can* be run.
2480ac_fn_cxx_try_run ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>&5
2491  ac_status=$?
2492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2493  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2494  { { case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_try") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; }; }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: program exited with status $ac_status" >&5
2507       $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510       ac_retval=$ac_status
2511fi
2512  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_cxx_try_run
2517
2518# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2519# ---------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_cxx_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval \${$3+:} false; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_cxx_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546
2547} # ac_fn_cxx_check_header_compile
2548
2549# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2550# ----------------------------------------------
2551# Tries to find the compile-time value of EXPR in a program that includes
2552# INCLUDES, setting VAR accordingly. Returns whether the value could be
2553# computed
2554ac_fn_cxx_compute_int ()
2555{
2556  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557  if test "$cross_compiling" = yes; then
2558    # Depending upon the size, compute the lo and hi bounds.
2559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562int
2563main ()
2564{
2565static int test_array [1 - 2 * !(($2) >= 0)];
2566test_array [0] = 0;
2567return test_array [0];
2568
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  ac_lo=0 ac_mid=0
2575  while :; do
2576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579int
2580main ()
2581{
2582static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2583test_array [0] = 0;
2584return test_array [0];
2585
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_hi=$ac_mid; break
2592else
2593  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2594			if test $ac_lo -le $ac_mid; then
2595			  ac_lo= ac_hi=
2596			  break
2597			fi
2598			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601  done
2602else
2603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606int
2607main ()
2608{
2609static int test_array [1 - 2 * !(($2) < 0)];
2610test_array [0] = 0;
2611return test_array [0];
2612
2613  ;
2614  return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_hi=-1 ac_mid=-1
2619  while :; do
2620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2627test_array [0] = 0;
2628return test_array [0];
2629
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_lo=$ac_mid; break
2636else
2637  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2638			if test $ac_mid -le $ac_hi; then
2639			  ac_lo= ac_hi=
2640			  break
2641			fi
2642			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2643fi
2644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2645  done
2646else
2647  ac_lo= ac_hi=
2648fi
2649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652# Binary search between lo and hi bounds.
2653while test "x$ac_lo" != "x$ac_hi"; do
2654  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_hi=$ac_mid
2671else
2672  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675done
2676case $ac_lo in #((
2677?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2678'') ac_retval=1 ;;
2679esac
2680  else
2681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684static long int longval () { return $2; }
2685static unsigned long int ulongval () { return $2; }
2686#include <stdio.h>
2687#include <stdlib.h>
2688int
2689main ()
2690{
2691
2692  FILE *f = fopen ("conftest.val", "w");
2693  if (! f)
2694    return 1;
2695  if (($2) < 0)
2696    {
2697      long int i = longval ();
2698      if (i != ($2))
2699	return 1;
2700      fprintf (f, "%ld", i);
2701    }
2702  else
2703    {
2704      unsigned long int i = ulongval ();
2705      if (i != ($2))
2706	return 1;
2707      fprintf (f, "%lu", i);
2708    }
2709  /* Do not output a trailing newline, as this causes \r\n confusion
2710     on some platforms.  */
2711  return ferror (f) || fclose (f) != 0;
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_run "$LINENO"; then :
2718  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2719else
2720  ac_retval=1
2721fi
2722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2723  conftest.$ac_objext conftest.beam conftest.$ac_ext
2724rm -f conftest.val
2725
2726  fi
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_compute_int
2731
2732# ac_fn_cxx_try_link LINENO
2733# -------------------------
2734# Try to link conftest.$ac_ext, and return whether this succeeded.
2735ac_fn_cxx_try_link ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  rm -f conftest.$ac_objext conftest$ac_exeext
2739  if { { ac_try="$ac_link"
2740case "(($ac_try" in
2741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2742  *) ac_try_echo=$ac_try;;
2743esac
2744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2745$as_echo "$ac_try_echo"; } >&5
2746  (eval "$ac_link") 2>conftest.err
2747  ac_status=$?
2748  if test -s conftest.err; then
2749    grep -v '^ *+' conftest.err >conftest.er1
2750    cat conftest.er1 >&5
2751    mv -f conftest.er1 conftest.err
2752  fi
2753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2754  test $ac_status = 0; } && {
2755	 test -z "$ac_cxx_werror_flag" ||
2756	 test ! -s conftest.err
2757       } && test -s conftest$ac_exeext && {
2758	 test "$cross_compiling" = yes ||
2759	 test -x conftest$ac_exeext
2760       }; then :
2761  ac_retval=0
2762else
2763  $as_echo "$as_me: failed program was:" >&5
2764sed 's/^/| /' conftest.$ac_ext >&5
2765
2766	ac_retval=1
2767fi
2768  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2769  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2770  # interfere with the next link command; also delete a directory that is
2771  # left behind by Apple's compiler.  We do this before executing the actions.
2772  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2773  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2774  as_fn_set_status $ac_retval
2775
2776} # ac_fn_cxx_try_link
2777
2778# ac_fn_cxx_check_func LINENO FUNC VAR
2779# ------------------------------------
2780# Tests whether FUNC exists, setting the cache variable VAR accordingly
2781ac_fn_cxx_check_func ()
2782{
2783  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2785$as_echo_n "checking for $2... " >&6; }
2786if eval \${$3+:} false; then :
2787  $as_echo_n "(cached) " >&6
2788else
2789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2792   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2793#define $2 innocuous_$2
2794
2795/* System header to define __stub macros and hopefully few prototypes,
2796    which can conflict with char $2 (); below.
2797    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2798    <limits.h> exists even on freestanding compilers.  */
2799
2800#ifdef __STDC__
2801# include <limits.h>
2802#else
2803# include <assert.h>
2804#endif
2805
2806#undef $2
2807
2808/* Override any GCC internal prototype to avoid an error.
2809   Use char because int might match the return type of a GCC
2810   builtin and then its argument prototype would still apply.  */
2811#ifdef __cplusplus
2812extern "C"
2813#endif
2814char $2 ();
2815/* The GNU C library defines this for functions which it implements
2816    to always fail with ENOSYS.  Some functions are actually named
2817    something starting with __ and the normal name is an alias.  */
2818#if defined __stub_$2 || defined __stub___$2
2819choke me
2820#endif
2821
2822int
2823main ()
2824{
2825return $2 ();
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_link "$LINENO"; then :
2831  eval "$3=yes"
2832else
2833  eval "$3=no"
2834fi
2835rm -f core conftest.err conftest.$ac_objext \
2836    conftest$ac_exeext conftest.$ac_ext
2837fi
2838eval ac_res=\$$3
2839	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2840$as_echo "$ac_res" >&6; }
2841  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842
2843} # ac_fn_cxx_check_func
2844
2845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2846# -------------------------------------------------------
2847# Tests whether HEADER exists and can be compiled using the include files in
2848# INCLUDES, setting the cache variable VAR accordingly.
2849ac_fn_c_check_header_compile ()
2850{
2851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2853$as_echo_n "checking for $2... " >&6; }
2854if eval \${$3+:} false; then :
2855  $as_echo_n "(cached) " >&6
2856else
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860#include <$2>
2861_ACEOF
2862if ac_fn_c_try_compile "$LINENO"; then :
2863  eval "$3=yes"
2864else
2865  eval "$3=no"
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_c_check_header_compile
2875cat >config.log <<_ACEOF
2876This file contains any messages produced by compilers while
2877running configure, to aid debugging if configure makes a mistake.
2878
2879It was created by OpenJDK $as_me jdk9, which was
2880generated by GNU Autoconf 2.69.  Invocation command line was
2881
2882  $ $0 $@
2883
2884_ACEOF
2885exec 5>>config.log
2886{
2887cat <<_ASUNAME
2888## --------- ##
2889## Platform. ##
2890## --------- ##
2891
2892hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2893uname -m = `(uname -m) 2>/dev/null || echo unknown`
2894uname -r = `(uname -r) 2>/dev/null || echo unknown`
2895uname -s = `(uname -s) 2>/dev/null || echo unknown`
2896uname -v = `(uname -v) 2>/dev/null || echo unknown`
2897
2898/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2899/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2900
2901/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2902/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2903/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2904/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2905/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2906/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2907/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2908
2909_ASUNAME
2910
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914  IFS=$as_save_IFS
2915  test -z "$as_dir" && as_dir=.
2916    $as_echo "PATH: $as_dir"
2917  done
2918IFS=$as_save_IFS
2919
2920} >&5
2921
2922cat >&5 <<_ACEOF
2923
2924
2925## ----------- ##
2926## Core tests. ##
2927## ----------- ##
2928
2929_ACEOF
2930
2931
2932# Keep a trace of the command line.
2933# Strip out --no-create and --no-recursion so they do not pile up.
2934# Strip out --silent because we don't want to record it for future runs.
2935# Also quote any args containing shell meta-characters.
2936# Make two passes to allow for proper duplicate-argument suppression.
2937ac_configure_args=
2938ac_configure_args0=
2939ac_configure_args1=
2940ac_must_keep_next=false
2941for ac_pass in 1 2
2942do
2943  for ac_arg
2944  do
2945    case $ac_arg in
2946    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2947    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2948    | -silent | --silent | --silen | --sile | --sil)
2949      continue ;;
2950    *\'*)
2951      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2952    esac
2953    case $ac_pass in
2954    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2955    2)
2956      as_fn_append ac_configure_args1 " '$ac_arg'"
2957      if test $ac_must_keep_next = true; then
2958	ac_must_keep_next=false # Got value, back to normal.
2959      else
2960	case $ac_arg in
2961	  *=* | --config-cache | -C | -disable-* | --disable-* \
2962	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2963	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2964	  | -with-* | --with-* | -without-* | --without-* | --x)
2965	    case "$ac_configure_args0 " in
2966	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2967	    esac
2968	    ;;
2969	  -* ) ac_must_keep_next=true ;;
2970	esac
2971      fi
2972      as_fn_append ac_configure_args " '$ac_arg'"
2973      ;;
2974    esac
2975  done
2976done
2977{ ac_configure_args0=; unset ac_configure_args0;}
2978{ ac_configure_args1=; unset ac_configure_args1;}
2979
2980# When interrupted or exit'd, cleanup temporary files, and complete
2981# config.log.  We remove comments because anyway the quotes in there
2982# would cause problems or look ugly.
2983# WARNING: Use '\'' to represent an apostrophe within the trap.
2984# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2985trap 'exit_status=$?
2986  # Save into config.log some information that might help in debugging.
2987  {
2988    echo
2989
2990    $as_echo "## ---------------- ##
2991## Cache variables. ##
2992## ---------------- ##"
2993    echo
2994    # The following way of writing the cache mishandles newlines in values,
2995(
2996  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2997    eval ac_val=\$$ac_var
2998    case $ac_val in #(
2999    *${as_nl}*)
3000      case $ac_var in #(
3001      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3002$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3003      esac
3004      case $ac_var in #(
3005      _ | IFS | as_nl) ;; #(
3006      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3007      *) { eval $ac_var=; unset $ac_var;} ;;
3008      esac ;;
3009    esac
3010  done
3011  (set) 2>&1 |
3012    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3013    *${as_nl}ac_space=\ *)
3014      sed -n \
3015	"s/'\''/'\''\\\\'\'''\''/g;
3016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3017      ;; #(
3018    *)
3019      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3020      ;;
3021    esac |
3022    sort
3023)
3024    echo
3025
3026    $as_echo "## ----------------- ##
3027## Output variables. ##
3028## ----------------- ##"
3029    echo
3030    for ac_var in $ac_subst_vars
3031    do
3032      eval ac_val=\$$ac_var
3033      case $ac_val in
3034      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3035      esac
3036      $as_echo "$ac_var='\''$ac_val'\''"
3037    done | sort
3038    echo
3039
3040    if test -n "$ac_subst_files"; then
3041      $as_echo "## ------------------- ##
3042## File substitutions. ##
3043## ------------------- ##"
3044      echo
3045      for ac_var in $ac_subst_files
3046      do
3047	eval ac_val=\$$ac_var
3048	case $ac_val in
3049	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3050	esac
3051	$as_echo "$ac_var='\''$ac_val'\''"
3052      done | sort
3053      echo
3054    fi
3055
3056    if test -s confdefs.h; then
3057      $as_echo "## ----------- ##
3058## confdefs.h. ##
3059## ----------- ##"
3060      echo
3061      cat confdefs.h
3062      echo
3063    fi
3064    test "$ac_signal" != 0 &&
3065      $as_echo "$as_me: caught signal $ac_signal"
3066    $as_echo "$as_me: exit $exit_status"
3067  } >&5
3068  rm -f core *.core core.conftest.* &&
3069    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3070    exit $exit_status
3071' 0
3072for ac_signal in 1 2 13 15; do
3073  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3074done
3075ac_signal=0
3076
3077# confdefs.h avoids OS command line length limits that DEFS can exceed.
3078rm -f -r conftest* confdefs.h
3079
3080$as_echo "/* confdefs.h */" > confdefs.h
3081
3082# Predefined preprocessor variables.
3083
3084cat >>confdefs.h <<_ACEOF
3085#define PACKAGE_NAME "$PACKAGE_NAME"
3086_ACEOF
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_VERSION "$PACKAGE_VERSION"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_STRING "$PACKAGE_STRING"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_URL "$PACKAGE_URL"
3106_ACEOF
3107
3108
3109# Let the site file select an alternate cache file if it wants to.
3110# Prefer an explicitly selected file to automatically selected ones.
3111ac_site_file1=NONE
3112ac_site_file2=NONE
3113if test -n "$CONFIG_SITE"; then
3114  # We do not want a PATH search for config.site.
3115  case $CONFIG_SITE in #((
3116    -*)  ac_site_file1=./$CONFIG_SITE;;
3117    */*) ac_site_file1=$CONFIG_SITE;;
3118    *)   ac_site_file1=./$CONFIG_SITE;;
3119  esac
3120elif test "x$prefix" != xNONE; then
3121  ac_site_file1=$prefix/share/config.site
3122  ac_site_file2=$prefix/etc/config.site
3123else
3124  ac_site_file1=$ac_default_prefix/share/config.site
3125  ac_site_file2=$ac_default_prefix/etc/config.site
3126fi
3127for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3128do
3129  test "x$ac_site_file" = xNONE && continue
3130  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3131    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3132$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3133    sed 's/^/| /' "$ac_site_file" >&5
3134    . "$ac_site_file" \
3135      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3137as_fn_error $? "failed to load site script $ac_site_file
3138See \`config.log' for more details" "$LINENO" 5; }
3139  fi
3140done
3141
3142if test -r "$cache_file"; then
3143  # Some versions of bash will fail to source /dev/null (special files
3144  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3145  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3147$as_echo "$as_me: loading cache $cache_file" >&6;}
3148    case $cache_file in
3149      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3150      *)                      . "./$cache_file";;
3151    esac
3152  fi
3153else
3154  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3155$as_echo "$as_me: creating cache $cache_file" >&6;}
3156  >$cache_file
3157fi
3158
3159# Check that the precious variables saved in the cache have kept the same
3160# value.
3161ac_cache_corrupted=false
3162for ac_var in $ac_precious_vars; do
3163  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3164  eval ac_new_set=\$ac_env_${ac_var}_set
3165  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3166  eval ac_new_val=\$ac_env_${ac_var}_value
3167  case $ac_old_set,$ac_new_set in
3168    set,)
3169      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3170$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3171      ac_cache_corrupted=: ;;
3172    ,set)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,);;
3177    *)
3178      if test "x$ac_old_val" != "x$ac_new_val"; then
3179	# differences in whitespace do not lead to failure.
3180	ac_old_val_w=`echo x $ac_old_val`
3181	ac_new_val_w=`echo x $ac_new_val`
3182	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3183	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3184$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3185	  ac_cache_corrupted=:
3186	else
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3188$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3189	  eval $ac_var=\$ac_old_val
3190	fi
3191	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3192$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3194$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3195      fi;;
3196  esac
3197  # Pass precious variables to config.status.
3198  if test "$ac_new_set" = set; then
3199    case $ac_new_val in
3200    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3201    *) ac_arg=$ac_var=$ac_new_val ;;
3202    esac
3203    case " $ac_configure_args " in
3204      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3205      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3206    esac
3207  fi
3208done
3209if $ac_cache_corrupted; then
3210  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3213$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3214  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3215fi
3216## -------------------- ##
3217## Main body of script. ##
3218## -------------------- ##
3219
3220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
3225
3226
3227
3228ac_aux_dir=
3229for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3230  if test -f "$ac_dir/install-sh"; then
3231    ac_aux_dir=$ac_dir
3232    ac_install_sh="$ac_aux_dir/install-sh -c"
3233    break
3234  elif test -f "$ac_dir/install.sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install.sh -c"
3237    break
3238  elif test -f "$ac_dir/shtool"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/shtool install -c"
3241    break
3242  fi
3243done
3244if test -z "$ac_aux_dir"; then
3245  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
3246fi
3247
3248# These three variables are undocumented and unsupported,
3249# and are intended to be withdrawn in a future Autoconf release.
3250# They can cause serious problems if a builder's source tree is in a directory
3251# whose full name contains unusual characters.
3252ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3253ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3254ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3255
3256
3257# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3258
3259#
3260# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284#
3285# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3286#
3287# This program is free software; you can redistribute it and/or modify
3288# it under the terms of the GNU General Public License as published by
3289# the Free Software Foundation; either version 2 of the License, or
3290# (at your option) any later version.
3291#
3292# This program is distributed in the hope that it will be useful, but
3293# WITHOUT ANY WARRANTY; without even the implied warranty of
3294# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3295# General Public License for more details.
3296#
3297# You should have received a copy of the GNU General Public License
3298# along with this program; if not, write to the Free Software
3299# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3300#
3301# As a special exception to the GNU General Public License, if you
3302# distribute this file as part of a program that contains a
3303# configuration script generated by Autoconf, you may include it under
3304# the same distribution terms that you use for the rest of that program.
3305
3306# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3307# ----------------------------------
3308# PKG_PROG_PKG_CONFIG
3309
3310# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3311#
3312# Check to see whether a particular set of modules exists.  Similar
3313# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3314#
3315#
3316# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3317# this or PKG_CHECK_MODULES is called, or make sure to call
3318# PKG_CHECK_EXISTS manually
3319# --------------------------------------------------------------
3320
3321
3322
3323# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3324# ---------------------------------------------
3325# _PKG_CONFIG
3326
3327# _PKG_SHORT_ERRORS_SUPPORTED
3328# -----------------------------
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330
3331
3332# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3333# [ACTION-IF-NOT-FOUND])
3334#
3335#
3336# Note that if there is a possibility the first call to
3337# PKG_CHECK_MODULES might not happen, you should be sure to include an
3338# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3339#
3340#
3341# --------------------------------------------------------------
3342# PKG_CHECK_MODULES
3343
3344
3345# Include these first...
3346#
3347# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3348# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349#
3350# This code is free software; you can redistribute it and/or modify it
3351# under the terms of the GNU General Public License version 2 only, as
3352# published by the Free Software Foundation.  Oracle designates this
3353# particular file as subject to the "Classpath" exception as provided
3354# by Oracle in the LICENSE file that accompanied this code.
3355#
3356# This code is distributed in the hope that it will be useful, but WITHOUT
3357# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3358# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3359# version 2 for more details (a copy is included in the LICENSE file that
3360# accompanied this code).
3361#
3362# You should have received a copy of the GNU General Public License version
3363# 2 along with this work; if not, write to the Free Software Foundation,
3364# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3365#
3366# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3367# or visit www.oracle.com if you need additional information or have any
3368# questions.
3369#
3370
3371# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3372# If so, then append $1 to $2 \
3373# Also set JVM_ARG_OK to true/false depending on outcome.
3374
3375
3376# Appends a string to a path variable, only adding the : when needed.
3377
3378
3379# Prepends a string to a path variable, only adding the : when needed.
3380
3381
3382# This will make sure the given variable points to a full and proper
3383# path. This means:
3384# 1) There will be no spaces in the path. On unix platforms,
3385#    spaces in the path will result in an error. On Windows,
3386#    the path will be rewritten using short-style to be space-free.
3387# 2) The path will be absolute, and it will be in unix-style (on
3388#     cygwin).
3389# $1: The name of the variable to fix
3390
3391
3392# This will make sure the given variable points to a executable
3393# with a full and proper path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# Any arguments given to the executable is preserved.
3400# If the input variable does not have a directory specification, then
3401# it need to be in the PATH.
3402# $1: The name of the variable to fix
3403
3404
3405
3406
3407# Register a --with argument but mark it as deprecated
3408# $1: The name of the with argument to deprecate, not including --with-
3409
3410
3411# Register a --enable argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --enable-
3413# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3414
3415
3416
3417
3418# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3419# $1: variable to check
3420
3421
3422# Check that there are no unprocessed overridden variables left.
3423# If so, they are an incorrect argument and we will exit with an error.
3424
3425
3426# Setup a tool for the given variable. If correctly specified by the user,
3427# use that value, otherwise search for the tool using the supplied code snippet.
3428# $1: variable to set
3429# $2: code snippet to call to look for the tool
3430
3431
3432# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3433# $1: variable to set
3434# $2: executable name (or list of names) to look for
3435
3436
3437# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3438# $1: variable to set
3439# $2: executable name (or list of names) to look for
3440
3441
3442# Like BASIC_PATH_PROGS but fails if no tool was found.
3443# $1: variable to set
3444# $2: executable name (or list of names) to look for
3445
3446
3447# Like BASIC_SETUP_TOOL but fails if no tool was found.
3448# $1: variable to set
3449# $2: autoconf macro to call to look for the special tool
3450
3451
3452# Setup the most fundamental tools that relies on not much else to set up,
3453# but is used by much of the early bootstrap code.
3454
3455
3456# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3457
3458
3459# Evaluates platform specific overrides for devkit variables.
3460# $1: Name of variable
3461
3462
3463
3464
3465
3466
3467#%%% Simple tools %%%
3468
3469# Check if we have found a usable version of make
3470# $1: the path to a potential make binary (or empty)
3471# $2: the description on how we found this
3472
3473
3474
3475
3476# Goes looking for a usable version of GNU make.
3477
3478
3479
3480
3481
3482
3483# Check if build directory is on local disk. If not possible to determine,
3484# we prefer to claim it's local.
3485# Argument 1: directory to test
3486# Argument 2: what to do if it is on local disk
3487# Argument 3: what to do otherwise (remote disk or failure)
3488
3489
3490# Check that source files have basic read permissions set. This might
3491# not be the case in cygwin in certain conditions.
3492
3493
3494
3495
3496# Check for support for specific options in bash
3497
3498
3499# Code to run after AC_OUTPUT
3500
3501
3502#
3503# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3505#
3506# This code is free software; you can redistribute it and/or modify it
3507# under the terms of the GNU General Public License version 2 only, as
3508# published by the Free Software Foundation.  Oracle designates this
3509# particular file as subject to the "Classpath" exception as provided
3510# by Oracle in the LICENSE file that accompanied this code.
3511#
3512# This code is distributed in the hope that it will be useful, but WITHOUT
3513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3515# version 2 for more details (a copy is included in the LICENSE file that
3516# accompanied this code).
3517#
3518# You should have received a copy of the GNU General Public License version
3519# 2 along with this work; if not, write to the Free Software Foundation,
3520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3521#
3522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3523# or visit www.oracle.com if you need additional information or have any
3524# questions.
3525#
3526
3527
3528
3529
3530
3531# Helper function which possibly converts a path using DOS-style short mode.
3532# If so, the updated path is stored in $new_path.
3533# $1: The path to check
3534
3535
3536# Helper function which possibly converts a path using DOS-style short mode.
3537# If so, the updated path is stored in $new_path.
3538# $1: The path to check
3539
3540
3541# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3542# and could probably be heavily simplified. However, all changes in this
3543# area tend to need lot of testing in different scenarios, and in lack of
3544# proper unit testing, cleaning this up has not been deemed worth the effort
3545# at the moment.
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3556
3557
3558
3559
3560#
3561# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563#
3564# This code is free software; you can redistribute it and/or modify it
3565# under the terms of the GNU General Public License version 2 only, as
3566# published by the Free Software Foundation.  Oracle designates this
3567# particular file as subject to the "Classpath" exception as provided
3568# by Oracle in the LICENSE file that accompanied this code.
3569#
3570# This code is distributed in the hope that it will be useful, but WITHOUT
3571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573# version 2 for more details (a copy is included in the LICENSE file that
3574# accompanied this code).
3575#
3576# You should have received a copy of the GNU General Public License version
3577# 2 along with this work; if not, write to the Free Software Foundation,
3578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579#
3580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581# or visit www.oracle.com if you need additional information or have any
3582# questions.
3583#
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595# ... then the rest
3596#
3597# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621########################################################################
3622# This file handles detection of the Boot JDK. The Boot JDK detection
3623# process has been developed as a response to solve a complex real-world
3624# problem. Initially, it was simple, but it has grown as platform after
3625# platform, idiosyncracy after idiosyncracy has been supported.
3626#
3627# The basic idea is this:
3628# 1) You need an acceptable *) JDK to use as a Boot JDK
3629# 2) There are several ways to locate a JDK, that are mostly platform
3630#    dependent **)
3631# 3) You can have multiple JDKs installed
3632# 4) If possible, configure should try to dig out an acceptable JDK
3633#    automatically, without having to resort to command-line options
3634#
3635# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3636#     javac) and not a JRE, etc.
3637#
3638# **) On Windows we typically use a well-known path.
3639#     On MacOSX we typically use the tool java_home.
3640#     On Linux we typically find javac in the $PATH, and then follow a
3641#     chain of symlinks that often ends up in a real JDK.
3642#
3643# This leads to the code where we check in different ways to locate a
3644# JDK, and if one is found, check if it is acceptable. If not, we print
3645# our reasons for rejecting it (useful when debugging non-working
3646# configure situations) and continue checking the next one.
3647########################################################################
3648
3649# Execute the check given as argument, and verify the result
3650# If the Boot JDK was previously found, do nothing
3651# $1 A command line (typically autoconf macro) to execute
3652
3653
3654# Test: Is bootjdk explicitely set by command line arguments?
3655
3656
3657# Test: Is bootjdk available from builddeps?
3658
3659
3660# Test: Is $JAVA_HOME set?
3661
3662
3663# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3664
3665
3666# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3667# $1: Argument to the java_home binary (optional)
3668
3669
3670# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3671
3672
3673# Look for a jdk in the given path. If there are multiple, try to select the newest.
3674# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3675# $1 = Path to directory containing jdk installations.
3676# $2 = String to append to the found JDK directory to get the proper JDK home
3677
3678
3679# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3680# environmental variable as base for where to look.
3681# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3682
3683
3684# Test: Is there a JDK installed in default, well-known locations?
3685
3686
3687# Check that a command-line tool in the Boot JDK is correct
3688# $1 = name of variable to assign
3689# $2 = name of binary
3690
3691
3692###############################################################################
3693#
3694# We need a Boot JDK to bootstrap the build.
3695#
3696
3697
3698
3699
3700
3701#
3702# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3704#
3705# This code is free software; you can redistribute it and/or modify it
3706# under the terms of the GNU General Public License version 2 only, as
3707# published by the Free Software Foundation.  Oracle designates this
3708# particular file as subject to the "Classpath" exception as provided
3709# by Oracle in the LICENSE file that accompanied this code.
3710#
3711# This code is distributed in the hope that it will be useful, but WITHOUT
3712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3714# version 2 for more details (a copy is included in the LICENSE file that
3715# accompanied this code).
3716#
3717# You should have received a copy of the GNU General Public License version
3718# 2 along with this work; if not, write to the Free Software Foundation,
3719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3720#
3721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3722# or visit www.oracle.com if you need additional information or have any
3723# questions.
3724#
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745#
3746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3748#
3749# This code is free software; you can redistribute it and/or modify it
3750# under the terms of the GNU General Public License version 2 only, as
3751# published by the Free Software Foundation.  Oracle designates this
3752# particular file as subject to the "Classpath" exception as provided
3753# by Oracle in the LICENSE file that accompanied this code.
3754#
3755# This code is distributed in the hope that it will be useful, but WITHOUT
3756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3758# version 2 for more details (a copy is included in the LICENSE file that
3759# accompanied this code).
3760#
3761# You should have received a copy of the GNU General Public License version
3762# 2 along with this work; if not, write to the Free Software Foundation,
3763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3764#
3765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3766# or visit www.oracle.com if you need additional information or have any
3767# questions.
3768#
3769
3770
3771
3772
3773
3774# Documentation on common flags used for solstudio in HIGHEST.
3775#
3776# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3777#          done with care, there are some assumptions below that need to
3778#          be understood about the use of pointers, and IEEE behavior.
3779#
3780# -fns: Use non-standard floating point mode (not IEEE 754)
3781# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3782# -fsingle: Use single precision floating point with 'float'
3783# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3784#   (Source with excessing pointer casting and data access with mixed
3785#    pointer types are not recommended)
3786# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3787#   (If you expect perfect errno behavior, do not use this)
3788# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3789# -xrestrict: Pointer parameters to functions do not overlap
3790#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3791#    If you pass in multiple pointers to the same data, do not use this)
3792# -xlibmil: Inline some library routines
3793#   (If you expect perfect errno behavior, do not use this)
3794# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3795#   (If you expect perfect errno behavior, do not use this)
3796#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3797
3798    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3799    # Bug?
3800    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3801    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3802    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3803    #fi
3804
3805
3806
3807
3808
3809# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3810#                                   [RUN-IF-FALSE])
3811# ------------------------------------------------------------
3812# Check that the c and c++ compilers support an argument
3813
3814
3815# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3816#                                    [RUN-IF-FALSE])
3817# ------------------------------------------------------------
3818# Check that the linker support an argument
3819
3820
3821
3822
3823#
3824# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3826#
3827# This code is free software; you can redistribute it and/or modify it
3828# under the terms of the GNU General Public License version 2 only, as
3829# published by the Free Software Foundation.  Oracle designates this
3830# particular file as subject to the "Classpath" exception as provided
3831# by Oracle in the LICENSE file that accompanied this code.
3832#
3833# This code is distributed in the hope that it will be useful, but WITHOUT
3834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3836# version 2 for more details (a copy is included in the LICENSE file that
3837# accompanied this code).
3838#
3839# You should have received a copy of the GNU General Public License version
3840# 2 along with this work; if not, write to the Free Software Foundation,
3841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3842#
3843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3844# or visit www.oracle.com if you need additional information or have any
3845# questions.
3846#
3847
3848
3849
3850
3851
3852cygwin_help() {
3853  case $1 in
3854    unzip)
3855      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3856      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3857      ;;
3858    zip)
3859      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3861      ;;
3862    make)
3863      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3864      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3865      ;;
3866    freetype)
3867      HELP_MSG="
3868The freetype library can now be build during the configure process.
3869Download the freetype sources and unpack them into an arbitrary directory:
3870
3871wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3872tar -xzf freetype-2.5.3.tar.gz
3873
3874Then run configure with '--with-freetype-src=<freetype_src>'. This will
3875automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3876builds or into '<freetype_src>/lib32' for 32-bit builds.
3877Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3878and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3879      ;;
3880  esac
3881}
3882
3883msys_help() {
3884  PKGHANDLER_COMMAND=""
3885}
3886
3887apt_help() {
3888  case $1 in
3889    devkit)
3890      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3891    openjdk)
3892      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3893    alsa)
3894      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3895    cups)
3896      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3897    freetype)
3898      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3899    pulse)
3900      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3901    x11)
3902      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3903    ccache)
3904      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3905  esac
3906}
3907
3908yum_help() {
3909  case $1 in
3910    devkit)
3911      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3912    openjdk)
3913      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3914    alsa)
3915      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3916    cups)
3917      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3918    freetype)
3919      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3920    pulse)
3921      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3922    x11)
3923      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3924    ccache)
3925      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3926  esac
3927}
3928
3929port_help() {
3930  PKGHANDLER_COMMAND=""
3931}
3932
3933pkgutil_help() {
3934  PKGHANDLER_COMMAND=""
3935}
3936
3937pkgadd_help() {
3938  PKGHANDLER_COMMAND=""
3939}
3940
3941# This function will check if we're called from the "configure" wrapper while
3942# printing --help. If so, we will print out additional information that can
3943# only be extracted within the autoconf script, and then exit. This must be
3944# called at the very beginning in configure.ac.
3945
3946
3947
3948
3949
3950
3951#
3952# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3953# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3954#
3955# This code is free software; you can redistribute it and/or modify it
3956# under the terms of the GNU General Public License version 2 only, as
3957# published by the Free Software Foundation.  Oracle designates this
3958# particular file as subject to the "Classpath" exception as provided
3959# by Oracle in the LICENSE file that accompanied this code.
3960#
3961# This code is distributed in the hope that it will be useful, but WITHOUT
3962# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3963# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3964# version 2 for more details (a copy is included in the LICENSE file that
3965# accompanied this code).
3966#
3967# You should have received a copy of the GNU General Public License version
3968# 2 along with this work; if not, write to the Free Software Foundation,
3969# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3970#
3971# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3972# or visit www.oracle.com if you need additional information or have any
3973# questions.
3974#
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985###############################################################################
3986#
3987# Should we build only OpenJDK even if closed sources are present?
3988#
3989
3990
3991
3992
3993###############################################################################
3994#
3995# Setup version numbers
3996#
3997
3998
3999
4000
4001
4002
4003################################################################################
4004#
4005# Gcov coverage data for hotspot
4006#
4007
4008
4009#
4010# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4011# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4012#
4013# This code is free software; you can redistribute it and/or modify it
4014# under the terms of the GNU General Public License version 2 only, as
4015# published by the Free Software Foundation.  Oracle designates this
4016# particular file as subject to the "Classpath" exception as provided
4017# by Oracle in the LICENSE file that accompanied this code.
4018#
4019# This code is distributed in the hope that it will be useful, but WITHOUT
4020# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4021# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4022# version 2 for more details (a copy is included in the LICENSE file that
4023# accompanied this code).
4024#
4025# You should have received a copy of the GNU General Public License version
4026# 2 along with this work; if not, write to the Free Software Foundation,
4027# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4028#
4029# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4030# or visit www.oracle.com if you need additional information or have any
4031# questions.
4032#
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054#
4055# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4057#
4058# This code is free software; you can redistribute it and/or modify it
4059# under the terms of the GNU General Public License version 2 only, as
4060# published by the Free Software Foundation.  Oracle designates this
4061# particular file as subject to the "Classpath" exception as provided
4062# by Oracle in the LICENSE file that accompanied this code.
4063#
4064# This code is distributed in the hope that it will be useful, but WITHOUT
4065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4067# version 2 for more details (a copy is included in the LICENSE file that
4068# accompanied this code).
4069#
4070# You should have received a copy of the GNU General Public License version
4071# 2 along with this work; if not, write to the Free Software Foundation,
4072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4073#
4074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4075# or visit www.oracle.com if you need additional information or have any
4076# questions.
4077#
4078
4079# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4080# Converts autoconf style CPU name to OpenJDK style, into
4081# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4082
4083
4084# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4085# Converts autoconf style OS name to OpenJDK style, into
4086# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4087
4088
4089# Expects $host_os $host_cpu $build_os and $build_cpu
4090# and $with_target_bits to have been setup!
4091#
4092# Translate the standard triplet(quadruplet) definition
4093# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4094# OPENJDK_BUILD_OS, etc.
4095
4096
4097# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4098# accordingly. Must be done after setting up build and target system, but before
4099# doing anything else with these values.
4100
4101
4102# Setup the legacy variables, for controlling the old makefiles.
4103#
4104
4105
4106
4107
4108#%%% Build and target systems %%%
4109
4110
4111
4112
4113# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4114# Add -mX to various FLAGS variables.
4115
4116
4117
4118
4119
4120
4121#
4122# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4123# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4124#
4125# This code is free software; you can redistribute it and/or modify it
4126# under the terms of the GNU General Public License version 2 only, as
4127# published by the Free Software Foundation.  Oracle designates this
4128# particular file as subject to the "Classpath" exception as provided
4129# by Oracle in the LICENSE file that accompanied this code.
4130#
4131# This code is distributed in the hope that it will be useful, but WITHOUT
4132# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4133# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4134# version 2 for more details (a copy is included in the LICENSE file that
4135# accompanied this code).
4136#
4137# You should have received a copy of the GNU General Public License version
4138# 2 along with this work; if not, write to the Free Software Foundation,
4139# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4140#
4141# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4142# or visit www.oracle.com if you need additional information or have any
4143# questions.
4144#
4145
4146
4147
4148
4149
4150
4151
4152
4153#
4154# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4155# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156#
4157# This code is free software; you can redistribute it and/or modify it
4158# under the terms of the GNU General Public License version 2 only, as
4159# published by the Free Software Foundation.  Oracle designates this
4160# particular file as subject to the "Classpath" exception as provided
4161# by Oracle in the LICENSE file that accompanied this code.
4162#
4163# This code is distributed in the hope that it will be useful, but WITHOUT
4164# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166# version 2 for more details (a copy is included in the LICENSE file that
4167# accompanied this code).
4168#
4169# You should have received a copy of the GNU General Public License version
4170# 2 along with this work; if not, write to the Free Software Foundation,
4171# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172#
4173# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174# or visit www.oracle.com if you need additional information or have any
4175# questions.
4176#
4177
4178########################################################################
4179# This file is responsible for detecting, verifying and setting up the
4180# toolchain, i.e. the compiler, linker and related utilities. It will setup
4181# proper paths to the binaries, but it will not setup any flags.
4182#
4183# The binaries used is determined by the toolchain type, which is the family of
4184# compilers and related tools that are used.
4185########################################################################
4186
4187
4188# All valid toolchains, regardless of platform (used by help.m4)
4189VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4190
4191# These toolchains are valid on different platforms
4192VALID_TOOLCHAINS_linux="gcc clang"
4193VALID_TOOLCHAINS_solaris="solstudio"
4194VALID_TOOLCHAINS_macosx="gcc clang"
4195VALID_TOOLCHAINS_aix="xlc"
4196VALID_TOOLCHAINS_windows="microsoft"
4197
4198# Toolchain descriptions
4199TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4200TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4201TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4202TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4203TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4204
4205# Setup a number of variables describing how native output files are
4206# named on this platform/toolchain.
4207
4208
4209# Determine which toolchain type to use, and make sure it is valid for this
4210# platform. Setup various information about the selected toolchain.
4211
4212
4213# Before we start detecting the toolchain executables, we might need some
4214# special setup, e.g. additional paths etc.
4215
4216
4217# Restore path, etc
4218
4219
4220# Check if a compiler is of the toolchain type we expect, and save the version
4221# information from it. If the compiler does not match the expected type,
4222# this function will abort using AC_MSG_ERROR. If it matches, the version will
4223# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4224# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4225#
4226# $1 = compiler to test (CC or CXX)
4227# $2 = human readable name of compiler (C or C++)
4228
4229
4230# Try to locate the given C or C++ compiler in the path, or otherwise.
4231#
4232# $1 = compiler to test (CC or CXX)
4233# $2 = human readable name of compiler (C or C++)
4234# $3 = list of compiler names to search for
4235
4236
4237# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4238# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4239# archiver (AR). Verify that the compilers are correct according to the
4240# toolchain type.
4241
4242
4243# Setup additional tools that is considered a part of the toolchain, but not the
4244# core part. Many of these are highly platform-specific and do not exist,
4245# and/or are not needed on all platforms.
4246
4247
4248# Setup the build tools (i.e, the compiler and linker used to build programs
4249# that should be run on the build platform, not the target platform, as a build
4250# helper). Since the non-cross-compile case uses the normal, target compilers
4251# for this, we can only do this after these have been setup.
4252
4253
4254# Setup legacy variables that are still needed as alternative ways to refer to
4255# parts of the toolchain.
4256
4257
4258# Do some additional checks on the detected tools.
4259
4260
4261# Setup the JTReg Regression Test Harness.
4262
4263
4264#
4265# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4266# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4267#
4268# This code is free software; you can redistribute it and/or modify it
4269# under the terms of the GNU General Public License version 2 only, as
4270# published by the Free Software Foundation.  Oracle designates this
4271# particular file as subject to the "Classpath" exception as provided
4272# by Oracle in the LICENSE file that accompanied this code.
4273#
4274# This code is distributed in the hope that it will be useful, but WITHOUT
4275# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4276# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4277# version 2 for more details (a copy is included in the LICENSE file that
4278# accompanied this code).
4279#
4280# You should have received a copy of the GNU General Public License version
4281# 2 along with this work; if not, write to the Free Software Foundation,
4282# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4283#
4284# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4285# or visit www.oracle.com if you need additional information or have any
4286# questions.
4287#
4288
4289################################################################################
4290# The order of these defines the priority by which we try to find them.
4291VALID_VS_VERSIONS="2013 2012 2010"
4292
4293VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4294VS_VERSION_INTERNAL_2010=100
4295VS_MSVCR_2010=msvcr100.dll
4296# We don't use msvcp on Visual Studio 2010
4297#VS_MSVCP_2010=msvcp100.dll
4298VS_ENVVAR_2010="VS100COMNTOOLS"
4299VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4300VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4301VS_VS_PLATFORM_NAME_2010="v100"
4302VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4303
4304VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4305VS_VERSION_INTERNAL_2012=110
4306VS_MSVCR_2012=msvcr110.dll
4307VS_MSVCP_2012=msvcp110.dll
4308VS_ENVVAR_2012="VS110COMNTOOLS"
4309VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4310VS_SDK_INSTALLDIR_2012=
4311VS_VS_PLATFORM_NAME_2012="v110"
4312VS_SDK_PLATFORM_NAME_2012=
4313
4314VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4315VS_VERSION_INTERNAL_2013=120
4316VS_MSVCR_2013=msvcr120.dll
4317VS_MSVCP_2013=msvcp120.dll
4318VS_ENVVAR_2013="VS120COMNTOOLS"
4319VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4320VS_SDK_INSTALLDIR_2013=
4321VS_VS_PLATFORM_NAME_2013="v120"
4322VS_SDK_PLATFORM_NAME_2013=
4323
4324################################################################################
4325
4326
4327
4328################################################################################
4329
4330
4331
4332################################################################################
4333# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4334# build environment and assigns it to VS_ENV_CMD
4335
4336
4337################################################################################
4338
4339
4340
4341################################################################################
4342# Check if the VS env variables were setup prior to running configure.
4343# If not, then find vcvarsall.bat and run it automatically, and integrate
4344# the set env variables into the spec file.
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359# This line needs to be here, verbatim, after all includes and the dummy hook
4360# definitions. It is replaced with custom functionality when building
4361# custom sources.
4362#CUSTOM_AUTOCONF_INCLUDE
4363
4364# Do not change or remove the following line, it is needed for consistency checks:
4365DATE_WHEN_GENERATED=1443470022
4366
4367###############################################################################
4368#
4369# Initialization / Boot-strapping
4370#
4371# The bootstrapping process needs to solve the "chicken or the egg" problem,
4372# thus it jumps back and forth, each time gaining something needed later on.
4373#
4374###############################################################################
4375
4376# If we are requested to print additional help, do that and then exit.
4377# This must be the very first call.
4378
4379  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4380    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4381    $PRINTF "Which are valid to use depends on the build platform.\n"
4382    for toolchain in $VALID_TOOLCHAINS_all; do
4383      # Use indirect variable referencing
4384      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4385      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4386      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4387    done
4388
4389    # And now exit directly
4390    exit 0
4391  fi
4392
4393
4394# Basic initialization that must happen first of all in the normal process.
4395
4396  # Save the original command line. This is passed to us by the wrapper configure script.
4397
4398  # Save the path variable before it gets changed
4399  ORIGINAL_PATH="$PATH"
4400
4401  DATE_WHEN_CONFIGURED=`LANG=C date`
4402
4403  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4404$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4406$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4407
4408
4409  # Start with tools that do not need have cross compilation support
4410  # and can be expected to be found in the default PATH. These tools are
4411  # used by configure. Nor are these tools expected to be found in the
4412  # devkit from the builddeps server either, since they are
4413  # needed to download the devkit.
4414
4415  # First are all the simple required tools.
4416
4417
4418
4419  # Publish this variable in the help.
4420
4421
4422  if test "x$BASENAME" = x; then
4423    # The variable is not set by user, try to locate tool using the code snippet
4424    for ac_prog in basename
4425do
4426  # Extract the first word of "$ac_prog", so it can be a program name with args.
4427set dummy $ac_prog; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_BASENAME+:} false; then :
4431  $as_echo_n "(cached) " >&6
4432else
4433  case $BASENAME in
4434  [\\/]* | ?:[\\/]*)
4435  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4436  ;;
4437  *)
4438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH
4440do
4441  IFS=$as_save_IFS
4442  test -z "$as_dir" && as_dir=.
4443    for ac_exec_ext in '' $ac_executable_extensions; do
4444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4445    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447    break 2
4448  fi
4449done
4450  done
4451IFS=$as_save_IFS
4452
4453  ;;
4454esac
4455fi
4456BASENAME=$ac_cv_path_BASENAME
4457if test -n "$BASENAME"; then
4458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4459$as_echo "$BASENAME" >&6; }
4460else
4461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466  test -n "$BASENAME" && break
4467done
4468
4469  else
4470    # The variable is set, but is it from the command line or the environment?
4471
4472    # Try to remove the string !BASENAME! from our list.
4473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4475      # If it failed, the variable was not from the command line. Ignore it,
4476      # but warn the user (except for BASH, which is always set by the calling BASH).
4477      if test "xBASENAME" != xBASH; then
4478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4479$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4480      fi
4481      # Try to locate tool using the code snippet
4482      for ac_prog in basename
4483do
4484  # Extract the first word of "$ac_prog", so it can be a program name with args.
4485set dummy $ac_prog; ac_word=$2
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_BASENAME+:} false; then :
4489  $as_echo_n "(cached) " >&6
4490else
4491  case $BASENAME in
4492  [\\/]* | ?:[\\/]*)
4493  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4494  ;;
4495  *)
4496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH
4498do
4499  IFS=$as_save_IFS
4500  test -z "$as_dir" && as_dir=.
4501    for ac_exec_ext in '' $ac_executable_extensions; do
4502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4503    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505    break 2
4506  fi
4507done
4508  done
4509IFS=$as_save_IFS
4510
4511  ;;
4512esac
4513fi
4514BASENAME=$ac_cv_path_BASENAME
4515if test -n "$BASENAME"; then
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4517$as_echo "$BASENAME" >&6; }
4518else
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
4523
4524  test -n "$BASENAME" && break
4525done
4526
4527    else
4528      # If it succeeded, then it was overridden by the user. We will use it
4529      # for the tool.
4530
4531      # First remove it from the list of overridden variables, so we can test
4532      # for unknown variables in the end.
4533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4534
4535      # Check if the provided tool contains a complete path.
4536      tool_specified="$BASENAME"
4537      tool_basename="${tool_specified##*/}"
4538      if test "x$tool_basename" = "x$tool_specified"; then
4539        # A command without a complete path is provided, search $PATH.
4540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4541$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4542        # Extract the first word of "$tool_basename", so it can be a program name with args.
4543set dummy $tool_basename; ac_word=$2
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
4546if ${ac_cv_path_BASENAME+:} false; then :
4547  $as_echo_n "(cached) " >&6
4548else
4549  case $BASENAME in
4550  [\\/]* | ?:[\\/]*)
4551  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4552  ;;
4553  *)
4554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4561    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569  ;;
4570esac
4571fi
4572BASENAME=$ac_cv_path_BASENAME
4573if test -n "$BASENAME"; then
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4575$as_echo "$BASENAME" >&6; }
4576else
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
4579fi
4580
4581
4582        if test "x$BASENAME" = x; then
4583          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4584        fi
4585      else
4586        # Otherwise we believe it is a complete path. Use it as it is.
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4588$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4590$as_echo_n "checking for BASENAME... " >&6; }
4591        if test ! -x "$tool_specified"; then
4592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4593$as_echo "not found" >&6; }
4594          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4595        fi
4596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4597$as_echo "$tool_specified" >&6; }
4598      fi
4599    fi
4600  fi
4601
4602
4603
4604  if test "x$BASENAME" = x; then
4605    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4606  fi
4607
4608
4609
4610
4611
4612  # Publish this variable in the help.
4613
4614
4615  if test "x$BASH" = x; then
4616    # The variable is not set by user, try to locate tool using the code snippet
4617    for ac_prog in bash
4618do
4619  # Extract the first word of "$ac_prog", so it can be a program name with args.
4620set dummy $ac_prog; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_BASH+:} false; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  case $BASH in
4627  [\\/]* | ?:[\\/]*)
4628  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4629  ;;
4630  *)
4631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH
4633do
4634  IFS=$as_save_IFS
4635  test -z "$as_dir" && as_dir=.
4636    for ac_exec_ext in '' $ac_executable_extensions; do
4637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4638    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640    break 2
4641  fi
4642done
4643  done
4644IFS=$as_save_IFS
4645
4646  ;;
4647esac
4648fi
4649BASH=$ac_cv_path_BASH
4650if test -n "$BASH"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4652$as_echo "$BASH" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658
4659  test -n "$BASH" && break
4660done
4661
4662  else
4663    # The variable is set, but is it from the command line or the environment?
4664
4665    # Try to remove the string !BASH! from our list.
4666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4668      # If it failed, the variable was not from the command line. Ignore it,
4669      # but warn the user (except for BASH, which is always set by the calling BASH).
4670      if test "xBASH" != xBASH; then
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4672$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4673      fi
4674      # Try to locate tool using the code snippet
4675      for ac_prog in bash
4676do
4677  # Extract the first word of "$ac_prog", so it can be a program name with args.
4678set dummy $ac_prog; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_BASH+:} false; then :
4682  $as_echo_n "(cached) " >&6
4683else
4684  case $BASH in
4685  [\\/]* | ?:[\\/]*)
4686  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4687  ;;
4688  *)
4689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in $PATH
4691do
4692  IFS=$as_save_IFS
4693  test -z "$as_dir" && as_dir=.
4694    for ac_exec_ext in '' $ac_executable_extensions; do
4695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698    break 2
4699  fi
4700done
4701  done
4702IFS=$as_save_IFS
4703
4704  ;;
4705esac
4706fi
4707BASH=$ac_cv_path_BASH
4708if test -n "$BASH"; then
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4710$as_echo "$BASH" >&6; }
4711else
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717  test -n "$BASH" && break
4718done
4719
4720    else
4721      # If it succeeded, then it was overridden by the user. We will use it
4722      # for the tool.
4723
4724      # First remove it from the list of overridden variables, so we can test
4725      # for unknown variables in the end.
4726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4727
4728      # Check if the provided tool contains a complete path.
4729      tool_specified="$BASH"
4730      tool_basename="${tool_specified##*/}"
4731      if test "x$tool_basename" = "x$tool_specified"; then
4732        # A command without a complete path is provided, search $PATH.
4733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4734$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4735        # Extract the first word of "$tool_basename", so it can be a program name with args.
4736set dummy $tool_basename; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_BASH+:} false; then :
4740  $as_echo_n "(cached) " >&6
4741else
4742  case $BASH in
4743  [\\/]* | ?:[\\/]*)
4744  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4745  ;;
4746  *)
4747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750  IFS=$as_save_IFS
4751  test -z "$as_dir" && as_dir=.
4752    for ac_exec_ext in '' $ac_executable_extensions; do
4753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756    break 2
4757  fi
4758done
4759  done
4760IFS=$as_save_IFS
4761
4762  ;;
4763esac
4764fi
4765BASH=$ac_cv_path_BASH
4766if test -n "$BASH"; then
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4768$as_echo "$BASH" >&6; }
4769else
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775        if test "x$BASH" = x; then
4776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4777        fi
4778      else
4779        # Otherwise we believe it is a complete path. Use it as it is.
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4781$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4783$as_echo_n "checking for BASH... " >&6; }
4784        if test ! -x "$tool_specified"; then
4785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4786$as_echo "not found" >&6; }
4787          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4788        fi
4789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4790$as_echo "$tool_specified" >&6; }
4791      fi
4792    fi
4793  fi
4794
4795
4796
4797  if test "x$BASH" = x; then
4798    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4799  fi
4800
4801
4802
4803
4804
4805  # Publish this variable in the help.
4806
4807
4808  if test "x$CAT" = x; then
4809    # The variable is not set by user, try to locate tool using the code snippet
4810    for ac_prog in cat
4811do
4812  # Extract the first word of "$ac_prog", so it can be a program name with args.
4813set dummy $ac_prog; ac_word=$2
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CAT+:} false; then :
4817  $as_echo_n "(cached) " >&6
4818else
4819  case $CAT in
4820  [\\/]* | ?:[\\/]*)
4821  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4822  ;;
4823  *)
4824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827  IFS=$as_save_IFS
4828  test -z "$as_dir" && as_dir=.
4829    for ac_exec_ext in '' $ac_executable_extensions; do
4830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4831    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833    break 2
4834  fi
4835done
4836  done
4837IFS=$as_save_IFS
4838
4839  ;;
4840esac
4841fi
4842CAT=$ac_cv_path_CAT
4843if test -n "$CAT"; then
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4845$as_echo "$CAT" >&6; }
4846else
4847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
4851
4852  test -n "$CAT" && break
4853done
4854
4855  else
4856    # The variable is set, but is it from the command line or the environment?
4857
4858    # Try to remove the string !CAT! from our list.
4859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4861      # If it failed, the variable was not from the command line. Ignore it,
4862      # but warn the user (except for BASH, which is always set by the calling BASH).
4863      if test "xCAT" != xBASH; then
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4865$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4866      fi
4867      # Try to locate tool using the code snippet
4868      for ac_prog in cat
4869do
4870  # Extract the first word of "$ac_prog", so it can be a program name with args.
4871set dummy $ac_prog; ac_word=$2
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if ${ac_cv_path_CAT+:} false; then :
4875  $as_echo_n "(cached) " >&6
4876else
4877  case $CAT in
4878  [\\/]* | ?:[\\/]*)
4879  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4880  ;;
4881  *)
4882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885  IFS=$as_save_IFS
4886  test -z "$as_dir" && as_dir=.
4887    for ac_exec_ext in '' $ac_executable_extensions; do
4888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4889    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891    break 2
4892  fi
4893done
4894  done
4895IFS=$as_save_IFS
4896
4897  ;;
4898esac
4899fi
4900CAT=$ac_cv_path_CAT
4901if test -n "$CAT"; then
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4903$as_echo "$CAT" >&6; }
4904else
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4906$as_echo "no" >&6; }
4907fi
4908
4909
4910  test -n "$CAT" && break
4911done
4912
4913    else
4914      # If it succeeded, then it was overridden by the user. We will use it
4915      # for the tool.
4916
4917      # First remove it from the list of overridden variables, so we can test
4918      # for unknown variables in the end.
4919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4920
4921      # Check if the provided tool contains a complete path.
4922      tool_specified="$CAT"
4923      tool_basename="${tool_specified##*/}"
4924      if test "x$tool_basename" = "x$tool_specified"; then
4925        # A command without a complete path is provided, search $PATH.
4926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4927$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4928        # Extract the first word of "$tool_basename", so it can be a program name with args.
4929set dummy $tool_basename; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CAT+:} false; then :
4933  $as_echo_n "(cached) " >&6
4934else
4935  case $CAT in
4936  [\\/]* | ?:[\\/]*)
4937  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4938  ;;
4939  *)
4940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in $PATH
4942do
4943  IFS=$as_save_IFS
4944  test -z "$as_dir" && as_dir=.
4945    for ac_exec_ext in '' $ac_executable_extensions; do
4946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949    break 2
4950  fi
4951done
4952  done
4953IFS=$as_save_IFS
4954
4955  ;;
4956esac
4957fi
4958CAT=$ac_cv_path_CAT
4959if test -n "$CAT"; then
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4961$as_echo "$CAT" >&6; }
4962else
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968        if test "x$CAT" = x; then
4969          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4970        fi
4971      else
4972        # Otherwise we believe it is a complete path. Use it as it is.
4973        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4974$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4976$as_echo_n "checking for CAT... " >&6; }
4977        if test ! -x "$tool_specified"; then
4978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4979$as_echo "not found" >&6; }
4980          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4981        fi
4982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4983$as_echo "$tool_specified" >&6; }
4984      fi
4985    fi
4986  fi
4987
4988
4989
4990  if test "x$CAT" = x; then
4991    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4992  fi
4993
4994
4995
4996
4997
4998  # Publish this variable in the help.
4999
5000
5001  if test "x$CHMOD" = x; then
5002    # The variable is not set by user, try to locate tool using the code snippet
5003    for ac_prog in chmod
5004do
5005  # Extract the first word of "$ac_prog", so it can be a program name with args.
5006set dummy $ac_prog; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_CHMOD+:} false; then :
5010  $as_echo_n "(cached) " >&6
5011else
5012  case $CHMOD in
5013  [\\/]* | ?:[\\/]*)
5014  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5015  ;;
5016  *)
5017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020  IFS=$as_save_IFS
5021  test -z "$as_dir" && as_dir=.
5022    for ac_exec_ext in '' $ac_executable_extensions; do
5023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026    break 2
5027  fi
5028done
5029  done
5030IFS=$as_save_IFS
5031
5032  ;;
5033esac
5034fi
5035CHMOD=$ac_cv_path_CHMOD
5036if test -n "$CHMOD"; then
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5038$as_echo "$CHMOD" >&6; }
5039else
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044
5045  test -n "$CHMOD" && break
5046done
5047
5048  else
5049    # The variable is set, but is it from the command line or the environment?
5050
5051    # Try to remove the string !CHMOD! from our list.
5052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5054      # If it failed, the variable was not from the command line. Ignore it,
5055      # but warn the user (except for BASH, which is always set by the calling BASH).
5056      if test "xCHMOD" != xBASH; then
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5058$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5059      fi
5060      # Try to locate tool using the code snippet
5061      for ac_prog in chmod
5062do
5063  # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_path_CHMOD+:} false; then :
5068  $as_echo_n "(cached) " >&6
5069else
5070  case $CHMOD in
5071  [\\/]* | ?:[\\/]*)
5072  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5073  ;;
5074  *)
5075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078  IFS=$as_save_IFS
5079  test -z "$as_dir" && as_dir=.
5080    for ac_exec_ext in '' $ac_executable_extensions; do
5081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5082    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5084    break 2
5085  fi
5086done
5087  done
5088IFS=$as_save_IFS
5089
5090  ;;
5091esac
5092fi
5093CHMOD=$ac_cv_path_CHMOD
5094if test -n "$CHMOD"; then
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5096$as_echo "$CHMOD" >&6; }
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
5100fi
5101
5102
5103  test -n "$CHMOD" && break
5104done
5105
5106    else
5107      # If it succeeded, then it was overridden by the user. We will use it
5108      # for the tool.
5109
5110      # First remove it from the list of overridden variables, so we can test
5111      # for unknown variables in the end.
5112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5113
5114      # Check if the provided tool contains a complete path.
5115      tool_specified="$CHMOD"
5116      tool_basename="${tool_specified##*/}"
5117      if test "x$tool_basename" = "x$tool_specified"; then
5118        # A command without a complete path is provided, search $PATH.
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5120$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5121        # Extract the first word of "$tool_basename", so it can be a program name with args.
5122set dummy $tool_basename; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_path_CHMOD+:} false; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $CHMOD in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151CHMOD=$ac_cv_path_CHMOD
5152if test -n "$CHMOD"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5154$as_echo "$CHMOD" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161        if test "x$CHMOD" = x; then
5162          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5163        fi
5164      else
5165        # Otherwise we believe it is a complete path. Use it as it is.
5166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5167$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5169$as_echo_n "checking for CHMOD... " >&6; }
5170        if test ! -x "$tool_specified"; then
5171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5172$as_echo "not found" >&6; }
5173          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5176$as_echo "$tool_specified" >&6; }
5177      fi
5178    fi
5179  fi
5180
5181
5182
5183  if test "x$CHMOD" = x; then
5184    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5185  fi
5186
5187
5188
5189
5190
5191  # Publish this variable in the help.
5192
5193
5194  if test "x$CMP" = x; then
5195    # The variable is not set by user, try to locate tool using the code snippet
5196    for ac_prog in cmp
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if ${ac_cv_path_CMP+:} false; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $CMP in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5217    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228CMP=$ac_cv_path_CMP
5229if test -n "$CMP"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5231$as_echo "$CMP" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$CMP" && break
5239done
5240
5241  else
5242    # The variable is set, but is it from the command line or the environment?
5243
5244    # Try to remove the string !CMP! from our list.
5245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5247      # If it failed, the variable was not from the command line. Ignore it,
5248      # but warn the user (except for BASH, which is always set by the calling BASH).
5249      if test "xCMP" != xBASH; then
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5251$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5252      fi
5253      # Try to locate tool using the code snippet
5254      for ac_prog in cmp
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_path_CMP+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263  case $CMP in
5264  [\\/]* | ?:[\\/]*)
5265  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5266  ;;
5267  *)
5268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271  IFS=$as_save_IFS
5272  test -z "$as_dir" && as_dir=.
5273    for ac_exec_ext in '' $ac_executable_extensions; do
5274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5275    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283  ;;
5284esac
5285fi
5286CMP=$ac_cv_path_CMP
5287if test -n "$CMP"; then
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5289$as_echo "$CMP" >&6; }
5290else
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296  test -n "$CMP" && break
5297done
5298
5299    else
5300      # If it succeeded, then it was overridden by the user. We will use it
5301      # for the tool.
5302
5303      # First remove it from the list of overridden variables, so we can test
5304      # for unknown variables in the end.
5305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5306
5307      # Check if the provided tool contains a complete path.
5308      tool_specified="$CMP"
5309      tool_basename="${tool_specified##*/}"
5310      if test "x$tool_basename" = "x$tool_specified"; then
5311        # A command without a complete path is provided, search $PATH.
5312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5313$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5314        # Extract the first word of "$tool_basename", so it can be a program name with args.
5315set dummy $tool_basename; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_CMP+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $CMP in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_CMP="$CMP" # 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_CMP="$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
5344CMP=$ac_cv_path_CMP
5345if test -n "$CMP"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5347$as_echo "$CMP" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354        if test "x$CMP" = x; then
5355          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5356        fi
5357      else
5358        # Otherwise we believe it is a complete path. Use it as it is.
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5360$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5362$as_echo_n "checking for CMP... " >&6; }
5363        if test ! -x "$tool_specified"; then
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5365$as_echo "not found" >&6; }
5366          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5367        fi
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5369$as_echo "$tool_specified" >&6; }
5370      fi
5371    fi
5372  fi
5373
5374
5375
5376  if test "x$CMP" = x; then
5377    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5378  fi
5379
5380
5381
5382
5383
5384  # Publish this variable in the help.
5385
5386
5387  if test "x$COMM" = x; then
5388    # The variable is not set by user, try to locate tool using the code snippet
5389    for ac_prog in comm
5390do
5391  # Extract the first word of "$ac_prog", so it can be a program name with args.
5392set dummy $ac_prog; ac_word=$2
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394$as_echo_n "checking for $ac_word... " >&6; }
5395if ${ac_cv_path_COMM+:} false; then :
5396  $as_echo_n "(cached) " >&6
5397else
5398  case $COMM in
5399  [\\/]* | ?:[\\/]*)
5400  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5401  ;;
5402  *)
5403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406  IFS=$as_save_IFS
5407  test -z "$as_dir" && as_dir=.
5408    for ac_exec_ext in '' $ac_executable_extensions; do
5409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412    break 2
5413  fi
5414done
5415  done
5416IFS=$as_save_IFS
5417
5418  ;;
5419esac
5420fi
5421COMM=$ac_cv_path_COMM
5422if test -n "$COMM"; then
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5424$as_echo "$COMM" >&6; }
5425else
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431  test -n "$COMM" && break
5432done
5433
5434  else
5435    # The variable is set, but is it from the command line or the environment?
5436
5437    # Try to remove the string !COMM! from our list.
5438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5440      # If it failed, the variable was not from the command line. Ignore it,
5441      # but warn the user (except for BASH, which is always set by the calling BASH).
5442      if test "xCOMM" != xBASH; then
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5444$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5445      fi
5446      # Try to locate tool using the code snippet
5447      for ac_prog in comm
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_COMM+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $COMM in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479COMM=$ac_cv_path_COMM
5480if test -n "$COMM"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5482$as_echo "$COMM" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$COMM" && break
5490done
5491
5492    else
5493      # If it succeeded, then it was overridden by the user. We will use it
5494      # for the tool.
5495
5496      # First remove it from the list of overridden variables, so we can test
5497      # for unknown variables in the end.
5498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5499
5500      # Check if the provided tool contains a complete path.
5501      tool_specified="$COMM"
5502      tool_basename="${tool_specified##*/}"
5503      if test "x$tool_basename" = "x$tool_specified"; then
5504        # A command without a complete path is provided, search $PATH.
5505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5506$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5507        # Extract the first word of "$tool_basename", so it can be a program name with args.
5508set dummy $tool_basename; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_COMM+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $COMM in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537COMM=$ac_cv_path_COMM
5538if test -n "$COMM"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5540$as_echo "$COMM" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547        if test "x$COMM" = x; then
5548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5549        fi
5550      else
5551        # Otherwise we believe it is a complete path. Use it as it is.
5552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5553$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5555$as_echo_n "checking for COMM... " >&6; }
5556        if test ! -x "$tool_specified"; then
5557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5558$as_echo "not found" >&6; }
5559          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5560        fi
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5562$as_echo "$tool_specified" >&6; }
5563      fi
5564    fi
5565  fi
5566
5567
5568
5569  if test "x$COMM" = x; then
5570    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5571  fi
5572
5573
5574
5575
5576
5577  # Publish this variable in the help.
5578
5579
5580  if test "x$CP" = x; then
5581    # The variable is not set by user, try to locate tool using the code snippet
5582    for ac_prog in cp
5583do
5584  # Extract the first word of "$ac_prog", so it can be a program name with args.
5585set dummy $ac_prog; ac_word=$2
5586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5587$as_echo_n "checking for $ac_word... " >&6; }
5588if ${ac_cv_path_CP+:} false; then :
5589  $as_echo_n "(cached) " >&6
5590else
5591  case $CP in
5592  [\\/]* | ?:[\\/]*)
5593  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5594  ;;
5595  *)
5596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599  IFS=$as_save_IFS
5600  test -z "$as_dir" && as_dir=.
5601    for ac_exec_ext in '' $ac_executable_extensions; do
5602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5603    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605    break 2
5606  fi
5607done
5608  done
5609IFS=$as_save_IFS
5610
5611  ;;
5612esac
5613fi
5614CP=$ac_cv_path_CP
5615if test -n "$CP"; then
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5617$as_echo "$CP" >&6; }
5618else
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620$as_echo "no" >&6; }
5621fi
5622
5623
5624  test -n "$CP" && break
5625done
5626
5627  else
5628    # The variable is set, but is it from the command line or the environment?
5629
5630    # Try to remove the string !CP! from our list.
5631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5633      # If it failed, the variable was not from the command line. Ignore it,
5634      # but warn the user (except for BASH, which is always set by the calling BASH).
5635      if test "xCP" != xBASH; then
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5637$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5638      fi
5639      # Try to locate tool using the code snippet
5640      for ac_prog in cp
5641do
5642  # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_path_CP+:} false; then :
5647  $as_echo_n "(cached) " >&6
5648else
5649  case $CP in
5650  [\\/]* | ?:[\\/]*)
5651  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5652  ;;
5653  *)
5654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657  IFS=$as_save_IFS
5658  test -z "$as_dir" && as_dir=.
5659    for ac_exec_ext in '' $ac_executable_extensions; do
5660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5661    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663    break 2
5664  fi
5665done
5666  done
5667IFS=$as_save_IFS
5668
5669  ;;
5670esac
5671fi
5672CP=$ac_cv_path_CP
5673if test -n "$CP"; then
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5675$as_echo "$CP" >&6; }
5676else
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5678$as_echo "no" >&6; }
5679fi
5680
5681
5682  test -n "$CP" && break
5683done
5684
5685    else
5686      # If it succeeded, then it was overridden by the user. We will use it
5687      # for the tool.
5688
5689      # First remove it from the list of overridden variables, so we can test
5690      # for unknown variables in the end.
5691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5692
5693      # Check if the provided tool contains a complete path.
5694      tool_specified="$CP"
5695      tool_basename="${tool_specified##*/}"
5696      if test "x$tool_basename" = "x$tool_specified"; then
5697        # A command without a complete path is provided, search $PATH.
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5699$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5700        # Extract the first word of "$tool_basename", so it can be a program name with args.
5701set dummy $tool_basename; ac_word=$2
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
5704if ${ac_cv_path_CP+:} false; then :
5705  $as_echo_n "(cached) " >&6
5706else
5707  case $CP in
5708  [\\/]* | ?:[\\/]*)
5709  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5710  ;;
5711  *)
5712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715  IFS=$as_save_IFS
5716  test -z "$as_dir" && as_dir=.
5717    for ac_exec_ext in '' $ac_executable_extensions; do
5718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5719    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5721    break 2
5722  fi
5723done
5724  done
5725IFS=$as_save_IFS
5726
5727  ;;
5728esac
5729fi
5730CP=$ac_cv_path_CP
5731if test -n "$CP"; then
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5733$as_echo "$CP" >&6; }
5734else
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736$as_echo "no" >&6; }
5737fi
5738
5739
5740        if test "x$CP" = x; then
5741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5742        fi
5743      else
5744        # Otherwise we believe it is a complete path. Use it as it is.
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5746$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5748$as_echo_n "checking for CP... " >&6; }
5749        if test ! -x "$tool_specified"; then
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5751$as_echo "not found" >&6; }
5752          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5753        fi
5754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5755$as_echo "$tool_specified" >&6; }
5756      fi
5757    fi
5758  fi
5759
5760
5761
5762  if test "x$CP" = x; then
5763    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if test "x$CUT" = x; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in cut
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CUT+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CUT in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CUT=$ac_cv_path_CUT
5808if test -n "$CUT"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5810$as_echo "$CUT" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CUT" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CUT! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCUT" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in cut
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CUT+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CUT in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CUT=$ac_cv_path_CUT
5866if test -n "$CUT"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5868$as_echo "$CUT" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CUT" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if the provided tool contains a complete path.
5887      tool_specified="$CUT"
5888      tool_basename="${tool_specified##*/}"
5889      if test "x$tool_basename" = "x$tool_specified"; then
5890        # A command without a complete path is provided, search $PATH.
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5892$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5893        # Extract the first word of "$tool_basename", so it can be a program name with args.
5894set dummy $tool_basename; ac_word=$2
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5896$as_echo_n "checking for $ac_word... " >&6; }
5897if ${ac_cv_path_CUT+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  case $CUT in
5901  [\\/]* | ?:[\\/]*)
5902  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5903  ;;
5904  *)
5905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908  IFS=$as_save_IFS
5909  test -z "$as_dir" && as_dir=.
5910    for ac_exec_ext in '' $ac_executable_extensions; do
5911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5912    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914    break 2
5915  fi
5916done
5917  done
5918IFS=$as_save_IFS
5919
5920  ;;
5921esac
5922fi
5923CUT=$ac_cv_path_CUT
5924if test -n "$CUT"; then
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5926$as_echo "$CUT" >&6; }
5927else
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933        if test "x$CUT" = x; then
5934          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5935        fi
5936      else
5937        # Otherwise we believe it is a complete path. Use it as it is.
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5939$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5941$as_echo_n "checking for CUT... " >&6; }
5942        if test ! -x "$tool_specified"; then
5943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5944$as_echo "not found" >&6; }
5945          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5946        fi
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5948$as_echo "$tool_specified" >&6; }
5949      fi
5950    fi
5951  fi
5952
5953
5954
5955  if test "x$CUT" = x; then
5956    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5957  fi
5958
5959
5960
5961
5962
5963  # Publish this variable in the help.
5964
5965
5966  if test "x$DATE" = x; then
5967    # The variable is not set by user, try to locate tool using the code snippet
5968    for ac_prog in date
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_path_DATE+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  case $DATE in
5978  [\\/]* | ?:[\\/]*)
5979  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5980  ;;
5981  *)
5982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985  IFS=$as_save_IFS
5986  test -z "$as_dir" && as_dir=.
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991    break 2
5992  fi
5993done
5994  done
5995IFS=$as_save_IFS
5996
5997  ;;
5998esac
5999fi
6000DATE=$ac_cv_path_DATE
6001if test -n "$DATE"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6003$as_echo "$DATE" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$DATE" && break
6011done
6012
6013  else
6014    # The variable is set, but is it from the command line or the environment?
6015
6016    # Try to remove the string !DATE! from our list.
6017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6019      # If it failed, the variable was not from the command line. Ignore it,
6020      # but warn the user (except for BASH, which is always set by the calling BASH).
6021      if test "xDATE" != xBASH; then
6022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6023$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6024      fi
6025      # Try to locate tool using the code snippet
6026      for ac_prog in date
6027do
6028  # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_path_DATE+:} false; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  case $DATE in
6036  [\\/]* | ?:[\\/]*)
6037  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6038  ;;
6039  *)
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055  ;;
6056esac
6057fi
6058DATE=$ac_cv_path_DATE
6059if test -n "$DATE"; then
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6061$as_echo "$DATE" >&6; }
6062else
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
6065fi
6066
6067
6068  test -n "$DATE" && break
6069done
6070
6071    else
6072      # If it succeeded, then it was overridden by the user. We will use it
6073      # for the tool.
6074
6075      # First remove it from the list of overridden variables, so we can test
6076      # for unknown variables in the end.
6077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6078
6079      # Check if the provided tool contains a complete path.
6080      tool_specified="$DATE"
6081      tool_basename="${tool_specified##*/}"
6082      if test "x$tool_basename" = "x$tool_specified"; then
6083        # A command without a complete path is provided, search $PATH.
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6085$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6086        # Extract the first word of "$tool_basename", so it can be a program name with args.
6087set dummy $tool_basename; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_path_DATE+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  case $DATE in
6094  [\\/]* | ?:[\\/]*)
6095  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6096  ;;
6097  *)
6098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101  IFS=$as_save_IFS
6102  test -z "$as_dir" && as_dir=.
6103    for ac_exec_ext in '' $ac_executable_extensions; do
6104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6105    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107    break 2
6108  fi
6109done
6110  done
6111IFS=$as_save_IFS
6112
6113  ;;
6114esac
6115fi
6116DATE=$ac_cv_path_DATE
6117if test -n "$DATE"; then
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6119$as_echo "$DATE" >&6; }
6120else
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126        if test "x$DATE" = x; then
6127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6128        fi
6129      else
6130        # Otherwise we believe it is a complete path. Use it as it is.
6131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6132$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6134$as_echo_n "checking for DATE... " >&6; }
6135        if test ! -x "$tool_specified"; then
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6137$as_echo "not found" >&6; }
6138          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6139        fi
6140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6141$as_echo "$tool_specified" >&6; }
6142      fi
6143    fi
6144  fi
6145
6146
6147
6148  if test "x$DATE" = x; then
6149    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6150  fi
6151
6152
6153
6154
6155
6156  # Publish this variable in the help.
6157
6158
6159  if test "x$DIFF" = x; then
6160    # The variable is not set by user, try to locate tool using the code snippet
6161    for ac_prog in gdiff diff
6162do
6163  # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_DIFF+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $DIFF in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193DIFF=$ac_cv_path_DIFF
6194if test -n "$DIFF"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6196$as_echo "$DIFF" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203  test -n "$DIFF" && break
6204done
6205
6206  else
6207    # The variable is set, but is it from the command line or the environment?
6208
6209    # Try to remove the string !DIFF! from our list.
6210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6212      # If it failed, the variable was not from the command line. Ignore it,
6213      # but warn the user (except for BASH, which is always set by the calling BASH).
6214      if test "xDIFF" != xBASH; then
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6216$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6217      fi
6218      # Try to locate tool using the code snippet
6219      for ac_prog in gdiff diff
6220do
6221  # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_path_DIFF+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  case $DIFF in
6229  [\\/]* | ?:[\\/]*)
6230  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6231  ;;
6232  *)
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242    break 2
6243  fi
6244done
6245  done
6246IFS=$as_save_IFS
6247
6248  ;;
6249esac
6250fi
6251DIFF=$ac_cv_path_DIFF
6252if test -n "$DIFF"; then
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6254$as_echo "$DIFF" >&6; }
6255else
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261  test -n "$DIFF" && break
6262done
6263
6264    else
6265      # If it succeeded, then it was overridden by the user. We will use it
6266      # for the tool.
6267
6268      # First remove it from the list of overridden variables, so we can test
6269      # for unknown variables in the end.
6270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6271
6272      # Check if the provided tool contains a complete path.
6273      tool_specified="$DIFF"
6274      tool_basename="${tool_specified##*/}"
6275      if test "x$tool_basename" = "x$tool_specified"; then
6276        # A command without a complete path is provided, search $PATH.
6277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6278$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6279        # Extract the first word of "$tool_basename", so it can be a program name with args.
6280set dummy $tool_basename; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_path_DIFF+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  case $DIFF in
6287  [\\/]* | ?:[\\/]*)
6288  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6289  ;;
6290  *)
6291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292for as_dir in $PATH
6293do
6294  IFS=$as_save_IFS
6295  test -z "$as_dir" && as_dir=.
6296    for ac_exec_ext in '' $ac_executable_extensions; do
6297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300    break 2
6301  fi
6302done
6303  done
6304IFS=$as_save_IFS
6305
6306  ;;
6307esac
6308fi
6309DIFF=$ac_cv_path_DIFF
6310if test -n "$DIFF"; then
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6312$as_echo "$DIFF" >&6; }
6313else
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319        if test "x$DIFF" = x; then
6320          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6321        fi
6322      else
6323        # Otherwise we believe it is a complete path. Use it as it is.
6324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6325$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6327$as_echo_n "checking for DIFF... " >&6; }
6328        if test ! -x "$tool_specified"; then
6329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6330$as_echo "not found" >&6; }
6331          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6332        fi
6333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6334$as_echo "$tool_specified" >&6; }
6335      fi
6336    fi
6337  fi
6338
6339
6340
6341  if test "x$DIFF" = x; then
6342    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6343  fi
6344
6345
6346
6347
6348
6349  # Publish this variable in the help.
6350
6351
6352  if test "x$DIRNAME" = x; then
6353    # The variable is not set by user, try to locate tool using the code snippet
6354    for ac_prog in dirname
6355do
6356  # Extract the first word of "$ac_prog", so it can be a program name with args.
6357set dummy $ac_prog; ac_word=$2
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6359$as_echo_n "checking for $ac_word... " >&6; }
6360if ${ac_cv_path_DIRNAME+:} false; then :
6361  $as_echo_n "(cached) " >&6
6362else
6363  case $DIRNAME in
6364  [\\/]* | ?:[\\/]*)
6365  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6366  ;;
6367  *)
6368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH
6370do
6371  IFS=$as_save_IFS
6372  test -z "$as_dir" && as_dir=.
6373    for ac_exec_ext in '' $ac_executable_extensions; do
6374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377    break 2
6378  fi
6379done
6380  done
6381IFS=$as_save_IFS
6382
6383  ;;
6384esac
6385fi
6386DIRNAME=$ac_cv_path_DIRNAME
6387if test -n "$DIRNAME"; then
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6389$as_echo "$DIRNAME" >&6; }
6390else
6391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395
6396  test -n "$DIRNAME" && break
6397done
6398
6399  else
6400    # The variable is set, but is it from the command line or the environment?
6401
6402    # Try to remove the string !DIRNAME! from our list.
6403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6405      # If it failed, the variable was not from the command line. Ignore it,
6406      # but warn the user (except for BASH, which is always set by the calling BASH).
6407      if test "xDIRNAME" != xBASH; then
6408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6409$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6410      fi
6411      # Try to locate tool using the code snippet
6412      for ac_prog in dirname
6413do
6414  # Extract the first word of "$ac_prog", so it can be a program name with args.
6415set dummy $ac_prog; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_DIRNAME+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $DIRNAME in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444DIRNAME=$ac_cv_path_DIRNAME
6445if test -n "$DIRNAME"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6447$as_echo "$DIRNAME" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454  test -n "$DIRNAME" && break
6455done
6456
6457    else
6458      # If it succeeded, then it was overridden by the user. We will use it
6459      # for the tool.
6460
6461      # First remove it from the list of overridden variables, so we can test
6462      # for unknown variables in the end.
6463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6464
6465      # Check if the provided tool contains a complete path.
6466      tool_specified="$DIRNAME"
6467      tool_basename="${tool_specified##*/}"
6468      if test "x$tool_basename" = "x$tool_specified"; then
6469        # A command without a complete path is provided, search $PATH.
6470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6471$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6472        # Extract the first word of "$tool_basename", so it can be a program name with args.
6473set dummy $tool_basename; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
6476if ${ac_cv_path_DIRNAME+:} false; then :
6477  $as_echo_n "(cached) " >&6
6478else
6479  case $DIRNAME in
6480  [\\/]* | ?:[\\/]*)
6481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6482  ;;
6483  *)
6484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485for as_dir in $PATH
6486do
6487  IFS=$as_save_IFS
6488  test -z "$as_dir" && as_dir=.
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493    break 2
6494  fi
6495done
6496  done
6497IFS=$as_save_IFS
6498
6499  ;;
6500esac
6501fi
6502DIRNAME=$ac_cv_path_DIRNAME
6503if test -n "$DIRNAME"; then
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6505$as_echo "$DIRNAME" >&6; }
6506else
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }
6509fi
6510
6511
6512        if test "x$DIRNAME" = x; then
6513          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6514        fi
6515      else
6516        # Otherwise we believe it is a complete path. Use it as it is.
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6518$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6520$as_echo_n "checking for DIRNAME... " >&6; }
6521        if test ! -x "$tool_specified"; then
6522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6523$as_echo "not found" >&6; }
6524          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6525        fi
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6527$as_echo "$tool_specified" >&6; }
6528      fi
6529    fi
6530  fi
6531
6532
6533
6534  if test "x$DIRNAME" = x; then
6535    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6536  fi
6537
6538
6539
6540
6541
6542  # Publish this variable in the help.
6543
6544
6545  if test "x$ECHO" = x; then
6546    # The variable is not set by user, try to locate tool using the code snippet
6547    for ac_prog in echo
6548do
6549  # Extract the first word of "$ac_prog", so it can be a program name with args.
6550set dummy $ac_prog; ac_word=$2
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552$as_echo_n "checking for $ac_word... " >&6; }
6553if ${ac_cv_path_ECHO+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  case $ECHO in
6557  [\\/]* | ?:[\\/]*)
6558  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6559  ;;
6560  *)
6561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH
6563do
6564  IFS=$as_save_IFS
6565  test -z "$as_dir" && as_dir=.
6566    for ac_exec_ext in '' $ac_executable_extensions; do
6567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570    break 2
6571  fi
6572done
6573  done
6574IFS=$as_save_IFS
6575
6576  ;;
6577esac
6578fi
6579ECHO=$ac_cv_path_ECHO
6580if test -n "$ECHO"; then
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6582$as_echo "$ECHO" >&6; }
6583else
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588
6589  test -n "$ECHO" && break
6590done
6591
6592  else
6593    # The variable is set, but is it from the command line or the environment?
6594
6595    # Try to remove the string !ECHO! from our list.
6596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6598      # If it failed, the variable was not from the command line. Ignore it,
6599      # but warn the user (except for BASH, which is always set by the calling BASH).
6600      if test "xECHO" != xBASH; then
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6602$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6603      fi
6604      # Try to locate tool using the code snippet
6605      for ac_prog in echo
6606do
6607  # Extract the first word of "$ac_prog", so it can be a program name with args.
6608set dummy $ac_prog; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_ECHO+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $ECHO in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637ECHO=$ac_cv_path_ECHO
6638if test -n "$ECHO"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6640$as_echo "$ECHO" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647  test -n "$ECHO" && break
6648done
6649
6650    else
6651      # If it succeeded, then it was overridden by the user. We will use it
6652      # for the tool.
6653
6654      # First remove it from the list of overridden variables, so we can test
6655      # for unknown variables in the end.
6656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6657
6658      # Check if the provided tool contains a complete path.
6659      tool_specified="$ECHO"
6660      tool_basename="${tool_specified##*/}"
6661      if test "x$tool_basename" = "x$tool_specified"; then
6662        # A command without a complete path is provided, search $PATH.
6663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6664$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6665        # Extract the first word of "$tool_basename", so it can be a program name with args.
6666set dummy $tool_basename; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ECHO+:} false; then :
6670  $as_echo_n "(cached) " >&6
6671else
6672  case $ECHO in
6673  [\\/]* | ?:[\\/]*)
6674  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6675  ;;
6676  *)
6677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in $PATH
6679do
6680  IFS=$as_save_IFS
6681  test -z "$as_dir" && as_dir=.
6682    for ac_exec_ext in '' $ac_executable_extensions; do
6683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686    break 2
6687  fi
6688done
6689  done
6690IFS=$as_save_IFS
6691
6692  ;;
6693esac
6694fi
6695ECHO=$ac_cv_path_ECHO
6696if test -n "$ECHO"; then
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6698$as_echo "$ECHO" >&6; }
6699else
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701$as_echo "no" >&6; }
6702fi
6703
6704
6705        if test "x$ECHO" = x; then
6706          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6707        fi
6708      else
6709        # Otherwise we believe it is a complete path. Use it as it is.
6710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6711$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6713$as_echo_n "checking for ECHO... " >&6; }
6714        if test ! -x "$tool_specified"; then
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6716$as_echo "not found" >&6; }
6717          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6718        fi
6719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6720$as_echo "$tool_specified" >&6; }
6721      fi
6722    fi
6723  fi
6724
6725
6726
6727  if test "x$ECHO" = x; then
6728    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6729  fi
6730
6731
6732
6733
6734
6735  # Publish this variable in the help.
6736
6737
6738  if test "x$EXPR" = x; then
6739    # The variable is not set by user, try to locate tool using the code snippet
6740    for ac_prog in expr
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_EXPR+:} false; then :
6747  $as_echo_n "(cached) " >&6
6748else
6749  case $EXPR in
6750  [\\/]* | ?:[\\/]*)
6751  ac_cv_path_EXPR="$EXPR" # 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_EXPR="$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
6772EXPR=$ac_cv_path_EXPR
6773if test -n "$EXPR"; then
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6775$as_echo "$EXPR" >&6; }
6776else
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
6781
6782  test -n "$EXPR" && 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 !EXPR! from our list.
6789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
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 "xEXPR" != xBASH; then
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6795$as_echo "$as_me: WARNING: Ignoring value of EXPR 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 expr
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_EXPR+:} false; then :
6805  $as_echo_n "(cached) " >&6
6806else
6807  case $EXPR in
6808  [\\/]* | ?:[\\/]*)
6809  ac_cv_path_EXPR="$EXPR" # 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_EXPR="$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
6830EXPR=$ac_cv_path_EXPR
6831if test -n "$EXPR"; then
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6833$as_echo "$EXPR" >&6; }
6834else
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836$as_echo "no" >&6; }
6837fi
6838
6839
6840  test -n "$EXPR" && 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 the provided tool contains a complete path.
6852      tool_specified="$EXPR"
6853      tool_basename="${tool_specified##*/}"
6854      if test "x$tool_basename" = "x$tool_specified"; then
6855        # A command without a complete path is provided, search $PATH.
6856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6857$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6858        # Extract the first word of "$tool_basename", so it can be a program name with args.
6859set dummy $tool_basename; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_EXPR+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $EXPR in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888EXPR=$ac_cv_path_EXPR
6889if test -n "$EXPR"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6891$as_echo "$EXPR" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898        if test "x$EXPR" = x; then
6899          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6900        fi
6901      else
6902        # Otherwise we believe it is a complete path. Use it as it is.
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6904$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6906$as_echo_n "checking for EXPR... " >&6; }
6907        if test ! -x "$tool_specified"; then
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6909$as_echo "not found" >&6; }
6910          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6911        fi
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6913$as_echo "$tool_specified" >&6; }
6914      fi
6915    fi
6916  fi
6917
6918
6919
6920  if test "x$EXPR" = x; then
6921    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6922  fi
6923
6924
6925
6926
6927
6928  # Publish this variable in the help.
6929
6930
6931  if test "x$FILE" = x; then
6932    # The variable is not set by user, try to locate tool using the code snippet
6933    for ac_prog in file
6934do
6935  # Extract the first word of "$ac_prog", so it can be a program name with args.
6936set dummy $ac_prog; ac_word=$2
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6938$as_echo_n "checking for $ac_word... " >&6; }
6939if ${ac_cv_path_FILE+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  case $FILE in
6943  [\\/]* | ?:[\\/]*)
6944  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6945  ;;
6946  *)
6947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948for as_dir in $PATH
6949do
6950  IFS=$as_save_IFS
6951  test -z "$as_dir" && as_dir=.
6952    for ac_exec_ext in '' $ac_executable_extensions; do
6953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6954    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6956    break 2
6957  fi
6958done
6959  done
6960IFS=$as_save_IFS
6961
6962  ;;
6963esac
6964fi
6965FILE=$ac_cv_path_FILE
6966if test -n "$FILE"; then
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6968$as_echo "$FILE" >&6; }
6969else
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6971$as_echo "no" >&6; }
6972fi
6973
6974
6975  test -n "$FILE" && break
6976done
6977
6978  else
6979    # The variable is set, but is it from the command line or the environment?
6980
6981    # Try to remove the string !FILE! from our list.
6982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6984      # If it failed, the variable was not from the command line. Ignore it,
6985      # but warn the user (except for BASH, which is always set by the calling BASH).
6986      if test "xFILE" != xBASH; then
6987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6988$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6989      fi
6990      # Try to locate tool using the code snippet
6991      for ac_prog in file
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_FILE+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $FILE in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023FILE=$ac_cv_path_FILE
7024if test -n "$FILE"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7026$as_echo "$FILE" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$FILE" && break
7034done
7035
7036    else
7037      # If it succeeded, then it was overridden by the user. We will use it
7038      # for the tool.
7039
7040      # First remove it from the list of overridden variables, so we can test
7041      # for unknown variables in the end.
7042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7043
7044      # Check if the provided tool contains a complete path.
7045      tool_specified="$FILE"
7046      tool_basename="${tool_specified##*/}"
7047      if test "x$tool_basename" = "x$tool_specified"; then
7048        # A command without a complete path is provided, search $PATH.
7049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7050$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7051        # Extract the first word of "$tool_basename", so it can be a program name with args.
7052set dummy $tool_basename; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_FILE+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $FILE in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081FILE=$ac_cv_path_FILE
7082if test -n "$FILE"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7084$as_echo "$FILE" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091        if test "x$FILE" = x; then
7092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7093        fi
7094      else
7095        # Otherwise we believe it is a complete path. Use it as it is.
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7097$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7099$as_echo_n "checking for FILE... " >&6; }
7100        if test ! -x "$tool_specified"; then
7101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7102$as_echo "not found" >&6; }
7103          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7104        fi
7105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7106$as_echo "$tool_specified" >&6; }
7107      fi
7108    fi
7109  fi
7110
7111
7112
7113  if test "x$FILE" = x; then
7114    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7115  fi
7116
7117
7118
7119
7120
7121  # Publish this variable in the help.
7122
7123
7124  if test "x$FIND" = x; then
7125    # The variable is not set by user, try to locate tool using the code snippet
7126    for ac_prog in find
7127do
7128  # Extract the first word of "$ac_prog", so it can be a program name with args.
7129set dummy $ac_prog; ac_word=$2
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7131$as_echo_n "checking for $ac_word... " >&6; }
7132if ${ac_cv_path_FIND+:} false; then :
7133  $as_echo_n "(cached) " >&6
7134else
7135  case $FIND in
7136  [\\/]* | ?:[\\/]*)
7137  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7138  ;;
7139  *)
7140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7141for as_dir in $PATH
7142do
7143  IFS=$as_save_IFS
7144  test -z "$as_dir" && as_dir=.
7145    for ac_exec_ext in '' $ac_executable_extensions; do
7146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7147    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7149    break 2
7150  fi
7151done
7152  done
7153IFS=$as_save_IFS
7154
7155  ;;
7156esac
7157fi
7158FIND=$ac_cv_path_FIND
7159if test -n "$FIND"; then
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7161$as_echo "$FIND" >&6; }
7162else
7163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7164$as_echo "no" >&6; }
7165fi
7166
7167
7168  test -n "$FIND" && break
7169done
7170
7171  else
7172    # The variable is set, but is it from the command line or the environment?
7173
7174    # Try to remove the string !FIND! from our list.
7175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7177      # If it failed, the variable was not from the command line. Ignore it,
7178      # but warn the user (except for BASH, which is always set by the calling BASH).
7179      if test "xFIND" != xBASH; then
7180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7181$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7182      fi
7183      # Try to locate tool using the code snippet
7184      for ac_prog in find
7185do
7186  # Extract the first word of "$ac_prog", so it can be a program name with args.
7187set dummy $ac_prog; ac_word=$2
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7189$as_echo_n "checking for $ac_word... " >&6; }
7190if ${ac_cv_path_FIND+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  case $FIND in
7194  [\\/]* | ?:[\\/]*)
7195  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7196  ;;
7197  *)
7198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199for as_dir in $PATH
7200do
7201  IFS=$as_save_IFS
7202  test -z "$as_dir" && as_dir=.
7203    for ac_exec_ext in '' $ac_executable_extensions; do
7204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7205    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7207    break 2
7208  fi
7209done
7210  done
7211IFS=$as_save_IFS
7212
7213  ;;
7214esac
7215fi
7216FIND=$ac_cv_path_FIND
7217if test -n "$FIND"; then
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7219$as_echo "$FIND" >&6; }
7220else
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223fi
7224
7225
7226  test -n "$FIND" && break
7227done
7228
7229    else
7230      # If it succeeded, then it was overridden by the user. We will use it
7231      # for the tool.
7232
7233      # First remove it from the list of overridden variables, so we can test
7234      # for unknown variables in the end.
7235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7236
7237      # Check if the provided tool contains a complete path.
7238      tool_specified="$FIND"
7239      tool_basename="${tool_specified##*/}"
7240      if test "x$tool_basename" = "x$tool_specified"; then
7241        # A command without a complete path is provided, search $PATH.
7242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7243$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7244        # Extract the first word of "$tool_basename", so it can be a program name with args.
7245set dummy $tool_basename; ac_word=$2
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7247$as_echo_n "checking for $ac_word... " >&6; }
7248if ${ac_cv_path_FIND+:} false; then :
7249  $as_echo_n "(cached) " >&6
7250else
7251  case $FIND in
7252  [\\/]* | ?:[\\/]*)
7253  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7254  ;;
7255  *)
7256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259  IFS=$as_save_IFS
7260  test -z "$as_dir" && as_dir=.
7261    for ac_exec_ext in '' $ac_executable_extensions; do
7262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7265    break 2
7266  fi
7267done
7268  done
7269IFS=$as_save_IFS
7270
7271  ;;
7272esac
7273fi
7274FIND=$ac_cv_path_FIND
7275if test -n "$FIND"; then
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7277$as_echo "$FIND" >&6; }
7278else
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280$as_echo "no" >&6; }
7281fi
7282
7283
7284        if test "x$FIND" = x; then
7285          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7286        fi
7287      else
7288        # Otherwise we believe it is a complete path. Use it as it is.
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7290$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7292$as_echo_n "checking for FIND... " >&6; }
7293        if test ! -x "$tool_specified"; then
7294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7295$as_echo "not found" >&6; }
7296          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7297        fi
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7299$as_echo "$tool_specified" >&6; }
7300      fi
7301    fi
7302  fi
7303
7304
7305
7306  if test "x$FIND" = x; then
7307    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7308  fi
7309
7310
7311
7312
7313
7314  # Publish this variable in the help.
7315
7316
7317  if test "x$HEAD" = x; then
7318    # The variable is not set by user, try to locate tool using the code snippet
7319    for ac_prog in head
7320do
7321  # Extract the first word of "$ac_prog", so it can be a program name with args.
7322set dummy $ac_prog; ac_word=$2
7323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7324$as_echo_n "checking for $ac_word... " >&6; }
7325if ${ac_cv_path_HEAD+:} false; then :
7326  $as_echo_n "(cached) " >&6
7327else
7328  case $HEAD in
7329  [\\/]* | ?:[\\/]*)
7330  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7331  ;;
7332  *)
7333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334for as_dir in $PATH
7335do
7336  IFS=$as_save_IFS
7337  test -z "$as_dir" && as_dir=.
7338    for ac_exec_ext in '' $ac_executable_extensions; do
7339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7340    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7342    break 2
7343  fi
7344done
7345  done
7346IFS=$as_save_IFS
7347
7348  ;;
7349esac
7350fi
7351HEAD=$ac_cv_path_HEAD
7352if test -n "$HEAD"; then
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7354$as_echo "$HEAD" >&6; }
7355else
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357$as_echo "no" >&6; }
7358fi
7359
7360
7361  test -n "$HEAD" && break
7362done
7363
7364  else
7365    # The variable is set, but is it from the command line or the environment?
7366
7367    # Try to remove the string !HEAD! from our list.
7368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7370      # If it failed, the variable was not from the command line. Ignore it,
7371      # but warn the user (except for BASH, which is always set by the calling BASH).
7372      if test "xHEAD" != xBASH; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7374$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7375      fi
7376      # Try to locate tool using the code snippet
7377      for ac_prog in head
7378do
7379  # Extract the first word of "$ac_prog", so it can be a program name with args.
7380set dummy $ac_prog; ac_word=$2
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7382$as_echo_n "checking for $ac_word... " >&6; }
7383if ${ac_cv_path_HEAD+:} false; then :
7384  $as_echo_n "(cached) " >&6
7385else
7386  case $HEAD in
7387  [\\/]* | ?:[\\/]*)
7388  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7389  ;;
7390  *)
7391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7392for as_dir in $PATH
7393do
7394  IFS=$as_save_IFS
7395  test -z "$as_dir" && as_dir=.
7396    for ac_exec_ext in '' $ac_executable_extensions; do
7397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7398    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7400    break 2
7401  fi
7402done
7403  done
7404IFS=$as_save_IFS
7405
7406  ;;
7407esac
7408fi
7409HEAD=$ac_cv_path_HEAD
7410if test -n "$HEAD"; then
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7412$as_echo "$HEAD" >&6; }
7413else
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7415$as_echo "no" >&6; }
7416fi
7417
7418
7419  test -n "$HEAD" && break
7420done
7421
7422    else
7423      # If it succeeded, then it was overridden by the user. We will use it
7424      # for the tool.
7425
7426      # First remove it from the list of overridden variables, so we can test
7427      # for unknown variables in the end.
7428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7429
7430      # Check if the provided tool contains a complete path.
7431      tool_specified="$HEAD"
7432      tool_basename="${tool_specified##*/}"
7433      if test "x$tool_basename" = "x$tool_specified"; then
7434        # A command without a complete path is provided, search $PATH.
7435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7436$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7437        # Extract the first word of "$tool_basename", so it can be a program name with args.
7438set dummy $tool_basename; ac_word=$2
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7440$as_echo_n "checking for $ac_word... " >&6; }
7441if ${ac_cv_path_HEAD+:} false; then :
7442  $as_echo_n "(cached) " >&6
7443else
7444  case $HEAD in
7445  [\\/]* | ?:[\\/]*)
7446  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7447  ;;
7448  *)
7449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452  IFS=$as_save_IFS
7453  test -z "$as_dir" && as_dir=.
7454    for ac_exec_ext in '' $ac_executable_extensions; do
7455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458    break 2
7459  fi
7460done
7461  done
7462IFS=$as_save_IFS
7463
7464  ;;
7465esac
7466fi
7467HEAD=$ac_cv_path_HEAD
7468if test -n "$HEAD"; then
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7470$as_echo "$HEAD" >&6; }
7471else
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
7474fi
7475
7476
7477        if test "x$HEAD" = x; then
7478          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7479        fi
7480      else
7481        # Otherwise we believe it is a complete path. Use it as it is.
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7483$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7485$as_echo_n "checking for HEAD... " >&6; }
7486        if test ! -x "$tool_specified"; then
7487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7488$as_echo "not found" >&6; }
7489          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7490        fi
7491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7492$as_echo "$tool_specified" >&6; }
7493      fi
7494    fi
7495  fi
7496
7497
7498
7499  if test "x$HEAD" = x; then
7500    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7501  fi
7502
7503
7504
7505
7506
7507  # Publish this variable in the help.
7508
7509
7510  if test "x$LN" = x; then
7511    # The variable is not set by user, try to locate tool using the code snippet
7512    for ac_prog in ln
7513do
7514  # Extract the first word of "$ac_prog", so it can be a program name with args.
7515set dummy $ac_prog; ac_word=$2
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517$as_echo_n "checking for $ac_word... " >&6; }
7518if ${ac_cv_path_LN+:} false; then :
7519  $as_echo_n "(cached) " >&6
7520else
7521  case $LN in
7522  [\\/]* | ?:[\\/]*)
7523  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7524  ;;
7525  *)
7526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527for as_dir in $PATH
7528do
7529  IFS=$as_save_IFS
7530  test -z "$as_dir" && as_dir=.
7531    for ac_exec_ext in '' $ac_executable_extensions; do
7532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7533    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7535    break 2
7536  fi
7537done
7538  done
7539IFS=$as_save_IFS
7540
7541  ;;
7542esac
7543fi
7544LN=$ac_cv_path_LN
7545if test -n "$LN"; then
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7547$as_echo "$LN" >&6; }
7548else
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
7551fi
7552
7553
7554  test -n "$LN" && break
7555done
7556
7557  else
7558    # The variable is set, but is it from the command line or the environment?
7559
7560    # Try to remove the string !LN! from our list.
7561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7563      # If it failed, the variable was not from the command line. Ignore it,
7564      # but warn the user (except for BASH, which is always set by the calling BASH).
7565      if test "xLN" != xBASH; then
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7567$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7568      fi
7569      # Try to locate tool using the code snippet
7570      for ac_prog in ln
7571do
7572  # Extract the first word of "$ac_prog", so it can be a program name with args.
7573set dummy $ac_prog; ac_word=$2
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575$as_echo_n "checking for $ac_word... " >&6; }
7576if ${ac_cv_path_LN+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  case $LN in
7580  [\\/]* | ?:[\\/]*)
7581  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7582  ;;
7583  *)
7584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587  IFS=$as_save_IFS
7588  test -z "$as_dir" && as_dir=.
7589    for ac_exec_ext in '' $ac_executable_extensions; do
7590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7591    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593    break 2
7594  fi
7595done
7596  done
7597IFS=$as_save_IFS
7598
7599  ;;
7600esac
7601fi
7602LN=$ac_cv_path_LN
7603if test -n "$LN"; then
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7605$as_echo "$LN" >&6; }
7606else
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
7609fi
7610
7611
7612  test -n "$LN" && break
7613done
7614
7615    else
7616      # If it succeeded, then it was overridden by the user. We will use it
7617      # for the tool.
7618
7619      # First remove it from the list of overridden variables, so we can test
7620      # for unknown variables in the end.
7621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7622
7623      # Check if the provided tool contains a complete path.
7624      tool_specified="$LN"
7625      tool_basename="${tool_specified##*/}"
7626      if test "x$tool_basename" = "x$tool_specified"; then
7627        # A command without a complete path is provided, search $PATH.
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7629$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7630        # Extract the first word of "$tool_basename", so it can be a program name with args.
7631set dummy $tool_basename; ac_word=$2
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7633$as_echo_n "checking for $ac_word... " >&6; }
7634if ${ac_cv_path_LN+:} false; then :
7635  $as_echo_n "(cached) " >&6
7636else
7637  case $LN in
7638  [\\/]* | ?:[\\/]*)
7639  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7640  ;;
7641  *)
7642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645  IFS=$as_save_IFS
7646  test -z "$as_dir" && as_dir=.
7647    for ac_exec_ext in '' $ac_executable_extensions; do
7648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7649    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7651    break 2
7652  fi
7653done
7654  done
7655IFS=$as_save_IFS
7656
7657  ;;
7658esac
7659fi
7660LN=$ac_cv_path_LN
7661if test -n "$LN"; then
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7663$as_echo "$LN" >&6; }
7664else
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666$as_echo "no" >&6; }
7667fi
7668
7669
7670        if test "x$LN" = x; then
7671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7672        fi
7673      else
7674        # Otherwise we believe it is a complete path. Use it as it is.
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7676$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7678$as_echo_n "checking for LN... " >&6; }
7679        if test ! -x "$tool_specified"; then
7680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7681$as_echo "not found" >&6; }
7682          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7683        fi
7684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7685$as_echo "$tool_specified" >&6; }
7686      fi
7687    fi
7688  fi
7689
7690
7691
7692  if test "x$LN" = x; then
7693    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7694  fi
7695
7696
7697
7698
7699
7700  # Publish this variable in the help.
7701
7702
7703  if test "x$LS" = x; then
7704    # The variable is not set by user, try to locate tool using the code snippet
7705    for ac_prog in ls
7706do
7707  # Extract the first word of "$ac_prog", so it can be a program name with args.
7708set dummy $ac_prog; ac_word=$2
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710$as_echo_n "checking for $ac_word... " >&6; }
7711if ${ac_cv_path_LS+:} false; then :
7712  $as_echo_n "(cached) " >&6
7713else
7714  case $LS in
7715  [\\/]* | ?:[\\/]*)
7716  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7717  ;;
7718  *)
7719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722  IFS=$as_save_IFS
7723  test -z "$as_dir" && as_dir=.
7724    for ac_exec_ext in '' $ac_executable_extensions; do
7725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7726    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7728    break 2
7729  fi
7730done
7731  done
7732IFS=$as_save_IFS
7733
7734  ;;
7735esac
7736fi
7737LS=$ac_cv_path_LS
7738if test -n "$LS"; then
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7740$as_echo "$LS" >&6; }
7741else
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743$as_echo "no" >&6; }
7744fi
7745
7746
7747  test -n "$LS" && break
7748done
7749
7750  else
7751    # The variable is set, but is it from the command line or the environment?
7752
7753    # Try to remove the string !LS! from our list.
7754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7756      # If it failed, the variable was not from the command line. Ignore it,
7757      # but warn the user (except for BASH, which is always set by the calling BASH).
7758      if test "xLS" != xBASH; then
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7760$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7761      fi
7762      # Try to locate tool using the code snippet
7763      for ac_prog in ls
7764do
7765  # Extract the first word of "$ac_prog", so it can be a program name with args.
7766set dummy $ac_prog; ac_word=$2
7767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768$as_echo_n "checking for $ac_word... " >&6; }
7769if ${ac_cv_path_LS+:} false; then :
7770  $as_echo_n "(cached) " >&6
7771else
7772  case $LS in
7773  [\\/]* | ?:[\\/]*)
7774  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7775  ;;
7776  *)
7777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778for as_dir in $PATH
7779do
7780  IFS=$as_save_IFS
7781  test -z "$as_dir" && as_dir=.
7782    for ac_exec_ext in '' $ac_executable_extensions; do
7783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786    break 2
7787  fi
7788done
7789  done
7790IFS=$as_save_IFS
7791
7792  ;;
7793esac
7794fi
7795LS=$ac_cv_path_LS
7796if test -n "$LS"; then
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7798$as_echo "$LS" >&6; }
7799else
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
7802fi
7803
7804
7805  test -n "$LS" && break
7806done
7807
7808    else
7809      # If it succeeded, then it was overridden by the user. We will use it
7810      # for the tool.
7811
7812      # First remove it from the list of overridden variables, so we can test
7813      # for unknown variables in the end.
7814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7815
7816      # Check if the provided tool contains a complete path.
7817      tool_specified="$LS"
7818      tool_basename="${tool_specified##*/}"
7819      if test "x$tool_basename" = "x$tool_specified"; then
7820        # A command without a complete path is provided, search $PATH.
7821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7822$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7823        # Extract the first word of "$tool_basename", so it can be a program name with args.
7824set dummy $tool_basename; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_LS+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $LS in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853LS=$ac_cv_path_LS
7854if test -n "$LS"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7856$as_echo "$LS" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863        if test "x$LS" = x; then
7864          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7865        fi
7866      else
7867        # Otherwise we believe it is a complete path. Use it as it is.
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7869$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7871$as_echo_n "checking for LS... " >&6; }
7872        if test ! -x "$tool_specified"; then
7873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7874$as_echo "not found" >&6; }
7875          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7876        fi
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7878$as_echo "$tool_specified" >&6; }
7879      fi
7880    fi
7881  fi
7882
7883
7884
7885  if test "x$LS" = x; then
7886    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7887  fi
7888
7889
7890
7891
7892
7893  # Publish this variable in the help.
7894
7895
7896  if test "x$MKDIR" = x; then
7897    # The variable is not set by user, try to locate tool using the code snippet
7898    for ac_prog in mkdir
7899do
7900  # Extract the first word of "$ac_prog", so it can be a program name with args.
7901set dummy $ac_prog; ac_word=$2
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903$as_echo_n "checking for $ac_word... " >&6; }
7904if ${ac_cv_path_MKDIR+:} false; then :
7905  $as_echo_n "(cached) " >&6
7906else
7907  case $MKDIR in
7908  [\\/]* | ?:[\\/]*)
7909  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7910  ;;
7911  *)
7912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH
7914do
7915  IFS=$as_save_IFS
7916  test -z "$as_dir" && as_dir=.
7917    for ac_exec_ext in '' $ac_executable_extensions; do
7918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7919    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7921    break 2
7922  fi
7923done
7924  done
7925IFS=$as_save_IFS
7926
7927  ;;
7928esac
7929fi
7930MKDIR=$ac_cv_path_MKDIR
7931if test -n "$MKDIR"; then
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7933$as_echo "$MKDIR" >&6; }
7934else
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
7937fi
7938
7939
7940  test -n "$MKDIR" && break
7941done
7942
7943  else
7944    # The variable is set, but is it from the command line or the environment?
7945
7946    # Try to remove the string !MKDIR! from our list.
7947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7949      # If it failed, the variable was not from the command line. Ignore it,
7950      # but warn the user (except for BASH, which is always set by the calling BASH).
7951      if test "xMKDIR" != xBASH; then
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7953$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7954      fi
7955      # Try to locate tool using the code snippet
7956      for ac_prog in mkdir
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_MKDIR+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $MKDIR in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988MKDIR=$ac_cv_path_MKDIR
7989if test -n "$MKDIR"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7991$as_echo "$MKDIR" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$MKDIR" && break
7999done
8000
8001    else
8002      # If it succeeded, then it was overridden by the user. We will use it
8003      # for the tool.
8004
8005      # First remove it from the list of overridden variables, so we can test
8006      # for unknown variables in the end.
8007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8008
8009      # Check if the provided tool contains a complete path.
8010      tool_specified="$MKDIR"
8011      tool_basename="${tool_specified##*/}"
8012      if test "x$tool_basename" = "x$tool_specified"; then
8013        # A command without a complete path is provided, search $PATH.
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8015$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8016        # Extract the first word of "$tool_basename", so it can be a program name with args.
8017set dummy $tool_basename; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_MKDIR+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $MKDIR in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046MKDIR=$ac_cv_path_MKDIR
8047if test -n "$MKDIR"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8049$as_echo "$MKDIR" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056        if test "x$MKDIR" = x; then
8057          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8058        fi
8059      else
8060        # Otherwise we believe it is a complete path. Use it as it is.
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8062$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8064$as_echo_n "checking for MKDIR... " >&6; }
8065        if test ! -x "$tool_specified"; then
8066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8067$as_echo "not found" >&6; }
8068          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8069        fi
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8071$as_echo "$tool_specified" >&6; }
8072      fi
8073    fi
8074  fi
8075
8076
8077
8078  if test "x$MKDIR" = x; then
8079    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8080  fi
8081
8082
8083
8084
8085
8086  # Publish this variable in the help.
8087
8088
8089  if test "x$MKTEMP" = x; then
8090    # The variable is not set by user, try to locate tool using the code snippet
8091    for ac_prog in mktemp
8092do
8093  # Extract the first word of "$ac_prog", so it can be a program name with args.
8094set dummy $ac_prog; ac_word=$2
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096$as_echo_n "checking for $ac_word... " >&6; }
8097if ${ac_cv_path_MKTEMP+:} false; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  case $MKTEMP in
8101  [\\/]* | ?:[\\/]*)
8102  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8103  ;;
8104  *)
8105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106for as_dir in $PATH
8107do
8108  IFS=$as_save_IFS
8109  test -z "$as_dir" && as_dir=.
8110    for ac_exec_ext in '' $ac_executable_extensions; do
8111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114    break 2
8115  fi
8116done
8117  done
8118IFS=$as_save_IFS
8119
8120  ;;
8121esac
8122fi
8123MKTEMP=$ac_cv_path_MKTEMP
8124if test -n "$MKTEMP"; then
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8126$as_echo "$MKTEMP" >&6; }
8127else
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }
8130fi
8131
8132
8133  test -n "$MKTEMP" && break
8134done
8135
8136  else
8137    # The variable is set, but is it from the command line or the environment?
8138
8139    # Try to remove the string !MKTEMP! from our list.
8140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8142      # If it failed, the variable was not from the command line. Ignore it,
8143      # but warn the user (except for BASH, which is always set by the calling BASH).
8144      if test "xMKTEMP" != xBASH; then
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8146$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8147      fi
8148      # Try to locate tool using the code snippet
8149      for ac_prog in mktemp
8150do
8151  # Extract the first word of "$ac_prog", so it can be a program name with args.
8152set dummy $ac_prog; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if ${ac_cv_path_MKTEMP+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  case $MKTEMP in
8159  [\\/]* | ?:[\\/]*)
8160  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8161  ;;
8162  *)
8163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166  IFS=$as_save_IFS
8167  test -z "$as_dir" && as_dir=.
8168    for ac_exec_ext in '' $ac_executable_extensions; do
8169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8170    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172    break 2
8173  fi
8174done
8175  done
8176IFS=$as_save_IFS
8177
8178  ;;
8179esac
8180fi
8181MKTEMP=$ac_cv_path_MKTEMP
8182if test -n "$MKTEMP"; then
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8184$as_echo "$MKTEMP" >&6; }
8185else
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
8188fi
8189
8190
8191  test -n "$MKTEMP" && break
8192done
8193
8194    else
8195      # If it succeeded, then it was overridden by the user. We will use it
8196      # for the tool.
8197
8198      # First remove it from the list of overridden variables, so we can test
8199      # for unknown variables in the end.
8200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8201
8202      # Check if the provided tool contains a complete path.
8203      tool_specified="$MKTEMP"
8204      tool_basename="${tool_specified##*/}"
8205      if test "x$tool_basename" = "x$tool_specified"; then
8206        # A command without a complete path is provided, search $PATH.
8207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8208$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8209        # Extract the first word of "$tool_basename", so it can be a program name with args.
8210set dummy $tool_basename; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_path_MKTEMP+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  case $MKTEMP in
8217  [\\/]* | ?:[\\/]*)
8218  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8219  ;;
8220  *)
8221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236  ;;
8237esac
8238fi
8239MKTEMP=$ac_cv_path_MKTEMP
8240if test -n "$MKTEMP"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8242$as_echo "$MKTEMP" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249        if test "x$MKTEMP" = x; then
8250          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8251        fi
8252      else
8253        # Otherwise we believe it is a complete path. Use it as it is.
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8255$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8257$as_echo_n "checking for MKTEMP... " >&6; }
8258        if test ! -x "$tool_specified"; then
8259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8260$as_echo "not found" >&6; }
8261          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8262        fi
8263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8264$as_echo "$tool_specified" >&6; }
8265      fi
8266    fi
8267  fi
8268
8269
8270
8271  if test "x$MKTEMP" = x; then
8272    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8273  fi
8274
8275
8276
8277
8278
8279  # Publish this variable in the help.
8280
8281
8282  if test "x$MV" = x; then
8283    # The variable is not set by user, try to locate tool using the code snippet
8284    for ac_prog in mv
8285do
8286  # Extract the first word of "$ac_prog", so it can be a program name with args.
8287set dummy $ac_prog; ac_word=$2
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289$as_echo_n "checking for $ac_word... " >&6; }
8290if ${ac_cv_path_MV+:} false; then :
8291  $as_echo_n "(cached) " >&6
8292else
8293  case $MV in
8294  [\\/]* | ?:[\\/]*)
8295  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8296  ;;
8297  *)
8298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301  IFS=$as_save_IFS
8302  test -z "$as_dir" && as_dir=.
8303    for ac_exec_ext in '' $ac_executable_extensions; do
8304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8305    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307    break 2
8308  fi
8309done
8310  done
8311IFS=$as_save_IFS
8312
8313  ;;
8314esac
8315fi
8316MV=$ac_cv_path_MV
8317if test -n "$MV"; then
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8319$as_echo "$MV" >&6; }
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
8324
8325
8326  test -n "$MV" && break
8327done
8328
8329  else
8330    # The variable is set, but is it from the command line or the environment?
8331
8332    # Try to remove the string !MV! from our list.
8333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8335      # If it failed, the variable was not from the command line. Ignore it,
8336      # but warn the user (except for BASH, which is always set by the calling BASH).
8337      if test "xMV" != xBASH; then
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8339$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8340      fi
8341      # Try to locate tool using the code snippet
8342      for ac_prog in mv
8343do
8344  # Extract the first word of "$ac_prog", so it can be a program name with args.
8345set dummy $ac_prog; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_MV+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $MV in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374MV=$ac_cv_path_MV
8375if test -n "$MV"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8377$as_echo "$MV" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384  test -n "$MV" && break
8385done
8386
8387    else
8388      # If it succeeded, then it was overridden by the user. We will use it
8389      # for the tool.
8390
8391      # First remove it from the list of overridden variables, so we can test
8392      # for unknown variables in the end.
8393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8394
8395      # Check if the provided tool contains a complete path.
8396      tool_specified="$MV"
8397      tool_basename="${tool_specified##*/}"
8398      if test "x$tool_basename" = "x$tool_specified"; then
8399        # A command without a complete path is provided, search $PATH.
8400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8401$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8402        # Extract the first word of "$tool_basename", so it can be a program name with args.
8403set dummy $tool_basename; ac_word=$2
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405$as_echo_n "checking for $ac_word... " >&6; }
8406if ${ac_cv_path_MV+:} false; then :
8407  $as_echo_n "(cached) " >&6
8408else
8409  case $MV in
8410  [\\/]* | ?:[\\/]*)
8411  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8412  ;;
8413  *)
8414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417  IFS=$as_save_IFS
8418  test -z "$as_dir" && as_dir=.
8419    for ac_exec_ext in '' $ac_executable_extensions; do
8420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423    break 2
8424  fi
8425done
8426  done
8427IFS=$as_save_IFS
8428
8429  ;;
8430esac
8431fi
8432MV=$ac_cv_path_MV
8433if test -n "$MV"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8435$as_echo "$MV" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442        if test "x$MV" = x; then
8443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8444        fi
8445      else
8446        # Otherwise we believe it is a complete path. Use it as it is.
8447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8448$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8450$as_echo_n "checking for MV... " >&6; }
8451        if test ! -x "$tool_specified"; then
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8453$as_echo "not found" >&6; }
8454          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8455        fi
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8457$as_echo "$tool_specified" >&6; }
8458      fi
8459    fi
8460  fi
8461
8462
8463
8464  if test "x$MV" = x; then
8465    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8466  fi
8467
8468
8469
8470
8471
8472  # Publish this variable in the help.
8473
8474
8475  if test "x$NAWK" = x; then
8476    # The variable is not set by user, try to locate tool using the code snippet
8477    for ac_prog in nawk gawk awk
8478do
8479  # Extract the first word of "$ac_prog", so it can be a program name with args.
8480set dummy $ac_prog; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_path_NAWK+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  case $NAWK in
8487  [\\/]* | ?:[\\/]*)
8488  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8489  ;;
8490  *)
8491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506  ;;
8507esac
8508fi
8509NAWK=$ac_cv_path_NAWK
8510if test -n "$NAWK"; then
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8512$as_echo "$NAWK" >&6; }
8513else
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
8516fi
8517
8518
8519  test -n "$NAWK" && break
8520done
8521
8522  else
8523    # The variable is set, but is it from the command line or the environment?
8524
8525    # Try to remove the string !NAWK! from our list.
8526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8528      # If it failed, the variable was not from the command line. Ignore it,
8529      # but warn the user (except for BASH, which is always set by the calling BASH).
8530      if test "xNAWK" != xBASH; then
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8532$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8533      fi
8534      # Try to locate tool using the code snippet
8535      for ac_prog in nawk gawk awk
8536do
8537  # Extract the first word of "$ac_prog", so it can be a program name with args.
8538set dummy $ac_prog; ac_word=$2
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8540$as_echo_n "checking for $ac_word... " >&6; }
8541if ${ac_cv_path_NAWK+:} false; then :
8542  $as_echo_n "(cached) " >&6
8543else
8544  case $NAWK in
8545  [\\/]* | ?:[\\/]*)
8546  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8547  ;;
8548  *)
8549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552  IFS=$as_save_IFS
8553  test -z "$as_dir" && as_dir=.
8554    for ac_exec_ext in '' $ac_executable_extensions; do
8555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8556    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8558    break 2
8559  fi
8560done
8561  done
8562IFS=$as_save_IFS
8563
8564  ;;
8565esac
8566fi
8567NAWK=$ac_cv_path_NAWK
8568if test -n "$NAWK"; then
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8570$as_echo "$NAWK" >&6; }
8571else
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
8574fi
8575
8576
8577  test -n "$NAWK" && break
8578done
8579
8580    else
8581      # If it succeeded, then it was overridden by the user. We will use it
8582      # for the tool.
8583
8584      # First remove it from the list of overridden variables, so we can test
8585      # for unknown variables in the end.
8586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8587
8588      # Check if the provided tool contains a complete path.
8589      tool_specified="$NAWK"
8590      tool_basename="${tool_specified##*/}"
8591      if test "x$tool_basename" = "x$tool_specified"; then
8592        # A command without a complete path is provided, search $PATH.
8593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8594$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8595        # Extract the first word of "$tool_basename", so it can be a program name with args.
8596set dummy $tool_basename; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_NAWK+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $NAWK in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625NAWK=$ac_cv_path_NAWK
8626if test -n "$NAWK"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8628$as_echo "$NAWK" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635        if test "x$NAWK" = x; then
8636          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8637        fi
8638      else
8639        # Otherwise we believe it is a complete path. Use it as it is.
8640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8641$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8643$as_echo_n "checking for NAWK... " >&6; }
8644        if test ! -x "$tool_specified"; then
8645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8646$as_echo "not found" >&6; }
8647          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8648        fi
8649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8650$as_echo "$tool_specified" >&6; }
8651      fi
8652    fi
8653  fi
8654
8655
8656
8657  if test "x$NAWK" = x; then
8658    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8659  fi
8660
8661
8662
8663
8664
8665  # Publish this variable in the help.
8666
8667
8668  if test "x$PRINTF" = x; then
8669    # The variable is not set by user, try to locate tool using the code snippet
8670    for ac_prog in printf
8671do
8672  # Extract the first word of "$ac_prog", so it can be a program name with args.
8673set dummy $ac_prog; ac_word=$2
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675$as_echo_n "checking for $ac_word... " >&6; }
8676if ${ac_cv_path_PRINTF+:} false; then :
8677  $as_echo_n "(cached) " >&6
8678else
8679  case $PRINTF in
8680  [\\/]* | ?:[\\/]*)
8681  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8682  ;;
8683  *)
8684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8685for as_dir in $PATH
8686do
8687  IFS=$as_save_IFS
8688  test -z "$as_dir" && as_dir=.
8689    for ac_exec_ext in '' $ac_executable_extensions; do
8690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8691    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8693    break 2
8694  fi
8695done
8696  done
8697IFS=$as_save_IFS
8698
8699  ;;
8700esac
8701fi
8702PRINTF=$ac_cv_path_PRINTF
8703if test -n "$PRINTF"; then
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8705$as_echo "$PRINTF" >&6; }
8706else
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
8709fi
8710
8711
8712  test -n "$PRINTF" && break
8713done
8714
8715  else
8716    # The variable is set, but is it from the command line or the environment?
8717
8718    # Try to remove the string !PRINTF! from our list.
8719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8721      # If it failed, the variable was not from the command line. Ignore it,
8722      # but warn the user (except for BASH, which is always set by the calling BASH).
8723      if test "xPRINTF" != xBASH; then
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8725$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8726      fi
8727      # Try to locate tool using the code snippet
8728      for ac_prog in printf
8729do
8730  # Extract the first word of "$ac_prog", so it can be a program name with args.
8731set dummy $ac_prog; ac_word=$2
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if ${ac_cv_path_PRINTF+:} false; then :
8735  $as_echo_n "(cached) " >&6
8736else
8737  case $PRINTF in
8738  [\\/]* | ?:[\\/]*)
8739  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8740  ;;
8741  *)
8742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  test -z "$as_dir" && as_dir=.
8747    for ac_exec_ext in '' $ac_executable_extensions; do
8748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8749    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8751    break 2
8752  fi
8753done
8754  done
8755IFS=$as_save_IFS
8756
8757  ;;
8758esac
8759fi
8760PRINTF=$ac_cv_path_PRINTF
8761if test -n "$PRINTF"; then
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8763$as_echo "$PRINTF" >&6; }
8764else
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
8767fi
8768
8769
8770  test -n "$PRINTF" && break
8771done
8772
8773    else
8774      # If it succeeded, then it was overridden by the user. We will use it
8775      # for the tool.
8776
8777      # First remove it from the list of overridden variables, so we can test
8778      # for unknown variables in the end.
8779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8780
8781      # Check if the provided tool contains a complete path.
8782      tool_specified="$PRINTF"
8783      tool_basename="${tool_specified##*/}"
8784      if test "x$tool_basename" = "x$tool_specified"; then
8785        # A command without a complete path is provided, search $PATH.
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8787$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8788        # Extract the first word of "$tool_basename", so it can be a program name with args.
8789set dummy $tool_basename; ac_word=$2
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8791$as_echo_n "checking for $ac_word... " >&6; }
8792if ${ac_cv_path_PRINTF+:} false; then :
8793  $as_echo_n "(cached) " >&6
8794else
8795  case $PRINTF in
8796  [\\/]* | ?:[\\/]*)
8797  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8798  ;;
8799  *)
8800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8801for as_dir in $PATH
8802do
8803  IFS=$as_save_IFS
8804  test -z "$as_dir" && as_dir=.
8805    for ac_exec_ext in '' $ac_executable_extensions; do
8806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8807    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8809    break 2
8810  fi
8811done
8812  done
8813IFS=$as_save_IFS
8814
8815  ;;
8816esac
8817fi
8818PRINTF=$ac_cv_path_PRINTF
8819if test -n "$PRINTF"; then
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8821$as_echo "$PRINTF" >&6; }
8822else
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
8825fi
8826
8827
8828        if test "x$PRINTF" = x; then
8829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8830        fi
8831      else
8832        # Otherwise we believe it is a complete path. Use it as it is.
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8834$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8836$as_echo_n "checking for PRINTF... " >&6; }
8837        if test ! -x "$tool_specified"; then
8838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8839$as_echo "not found" >&6; }
8840          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8841        fi
8842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8843$as_echo "$tool_specified" >&6; }
8844      fi
8845    fi
8846  fi
8847
8848
8849
8850  if test "x$PRINTF" = x; then
8851    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8852  fi
8853
8854
8855
8856
8857
8858  # Publish this variable in the help.
8859
8860
8861  if test "x$RM" = x; then
8862    # The variable is not set by user, try to locate tool using the code snippet
8863    for ac_prog in rm
8864do
8865  # Extract the first word of "$ac_prog", so it can be a program name with args.
8866set dummy $ac_prog; ac_word=$2
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
8869if ${ac_cv_path_RM+:} false; then :
8870  $as_echo_n "(cached) " >&6
8871else
8872  case $RM in
8873  [\\/]* | ?:[\\/]*)
8874  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8875  ;;
8876  *)
8877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880  IFS=$as_save_IFS
8881  test -z "$as_dir" && as_dir=.
8882    for ac_exec_ext in '' $ac_executable_extensions; do
8883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8884    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886    break 2
8887  fi
8888done
8889  done
8890IFS=$as_save_IFS
8891
8892  ;;
8893esac
8894fi
8895RM=$ac_cv_path_RM
8896if test -n "$RM"; then
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8898$as_echo "$RM" >&6; }
8899else
8900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
8902fi
8903
8904
8905  test -n "$RM" && break
8906done
8907
8908  else
8909    # The variable is set, but is it from the command line or the environment?
8910
8911    # Try to remove the string !RM! from our list.
8912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8914      # If it failed, the variable was not from the command line. Ignore it,
8915      # but warn the user (except for BASH, which is always set by the calling BASH).
8916      if test "xRM" != xBASH; then
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8918$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8919      fi
8920      # Try to locate tool using the code snippet
8921      for ac_prog in rm
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_RM+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $RM in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953RM=$ac_cv_path_RM
8954if test -n "$RM"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8956$as_echo "$RM" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$RM" && break
8964done
8965
8966    else
8967      # If it succeeded, then it was overridden by the user. We will use it
8968      # for the tool.
8969
8970      # First remove it from the list of overridden variables, so we can test
8971      # for unknown variables in the end.
8972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8973
8974      # Check if the provided tool contains a complete path.
8975      tool_specified="$RM"
8976      tool_basename="${tool_specified##*/}"
8977      if test "x$tool_basename" = "x$tool_specified"; then
8978        # A command without a complete path is provided, search $PATH.
8979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8980$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8981        # Extract the first word of "$tool_basename", so it can be a program name with args.
8982set dummy $tool_basename; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_RM+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $RM in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011RM=$ac_cv_path_RM
9012if test -n "$RM"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9014$as_echo "$RM" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021        if test "x$RM" = x; then
9022          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9023        fi
9024      else
9025        # Otherwise we believe it is a complete path. Use it as it is.
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9027$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9029$as_echo_n "checking for RM... " >&6; }
9030        if test ! -x "$tool_specified"; then
9031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9032$as_echo "not found" >&6; }
9033          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9034        fi
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9036$as_echo "$tool_specified" >&6; }
9037      fi
9038    fi
9039  fi
9040
9041
9042
9043  if test "x$RM" = x; then
9044    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9045  fi
9046
9047
9048
9049
9050
9051  # Publish this variable in the help.
9052
9053
9054  if test "x$SH" = x; then
9055    # The variable is not set by user, try to locate tool using the code snippet
9056    for ac_prog in sh
9057do
9058  # Extract the first word of "$ac_prog", so it can be a program name with args.
9059set dummy $ac_prog; ac_word=$2
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9061$as_echo_n "checking for $ac_word... " >&6; }
9062if ${ac_cv_path_SH+:} false; then :
9063  $as_echo_n "(cached) " >&6
9064else
9065  case $SH in
9066  [\\/]* | ?:[\\/]*)
9067  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9068  ;;
9069  *)
9070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9071for as_dir in $PATH
9072do
9073  IFS=$as_save_IFS
9074  test -z "$as_dir" && as_dir=.
9075    for ac_exec_ext in '' $ac_executable_extensions; do
9076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9077    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9079    break 2
9080  fi
9081done
9082  done
9083IFS=$as_save_IFS
9084
9085  ;;
9086esac
9087fi
9088SH=$ac_cv_path_SH
9089if test -n "$SH"; then
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9091$as_echo "$SH" >&6; }
9092else
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
9095fi
9096
9097
9098  test -n "$SH" && break
9099done
9100
9101  else
9102    # The variable is set, but is it from the command line or the environment?
9103
9104    # Try to remove the string !SH! from our list.
9105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9107      # If it failed, the variable was not from the command line. Ignore it,
9108      # but warn the user (except for BASH, which is always set by the calling BASH).
9109      if test "xSH" != xBASH; then
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9111$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9112      fi
9113      # Try to locate tool using the code snippet
9114      for ac_prog in sh
9115do
9116  # Extract the first word of "$ac_prog", so it can be a program name with args.
9117set dummy $ac_prog; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_SH+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $SH in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146SH=$ac_cv_path_SH
9147if test -n "$SH"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9149$as_echo "$SH" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156  test -n "$SH" && break
9157done
9158
9159    else
9160      # If it succeeded, then it was overridden by the user. We will use it
9161      # for the tool.
9162
9163      # First remove it from the list of overridden variables, so we can test
9164      # for unknown variables in the end.
9165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9166
9167      # Check if the provided tool contains a complete path.
9168      tool_specified="$SH"
9169      tool_basename="${tool_specified##*/}"
9170      if test "x$tool_basename" = "x$tool_specified"; then
9171        # A command without a complete path is provided, search $PATH.
9172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9173$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9174        # Extract the first word of "$tool_basename", so it can be a program name with args.
9175set dummy $tool_basename; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_SH+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $SH in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204SH=$ac_cv_path_SH
9205if test -n "$SH"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9207$as_echo "$SH" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214        if test "x$SH" = x; then
9215          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9216        fi
9217      else
9218        # Otherwise we believe it is a complete path. Use it as it is.
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9220$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9222$as_echo_n "checking for SH... " >&6; }
9223        if test ! -x "$tool_specified"; then
9224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9225$as_echo "not found" >&6; }
9226          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9227        fi
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9229$as_echo "$tool_specified" >&6; }
9230      fi
9231    fi
9232  fi
9233
9234
9235
9236  if test "x$SH" = x; then
9237    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9238  fi
9239
9240
9241
9242
9243
9244  # Publish this variable in the help.
9245
9246
9247  if test "x$SORT" = x; then
9248    # The variable is not set by user, try to locate tool using the code snippet
9249    for ac_prog in sort
9250do
9251  # Extract the first word of "$ac_prog", so it can be a program name with args.
9252set dummy $ac_prog; ac_word=$2
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
9255if ${ac_cv_path_SORT+:} false; then :
9256  $as_echo_n "(cached) " >&6
9257else
9258  case $SORT in
9259  [\\/]* | ?:[\\/]*)
9260  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9261  ;;
9262  *)
9263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266  IFS=$as_save_IFS
9267  test -z "$as_dir" && as_dir=.
9268    for ac_exec_ext in '' $ac_executable_extensions; do
9269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9270    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9272    break 2
9273  fi
9274done
9275  done
9276IFS=$as_save_IFS
9277
9278  ;;
9279esac
9280fi
9281SORT=$ac_cv_path_SORT
9282if test -n "$SORT"; then
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9284$as_echo "$SORT" >&6; }
9285else
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
9288fi
9289
9290
9291  test -n "$SORT" && break
9292done
9293
9294  else
9295    # The variable is set, but is it from the command line or the environment?
9296
9297    # Try to remove the string !SORT! from our list.
9298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9300      # If it failed, the variable was not from the command line. Ignore it,
9301      # but warn the user (except for BASH, which is always set by the calling BASH).
9302      if test "xSORT" != xBASH; then
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9304$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9305      fi
9306      # Try to locate tool using the code snippet
9307      for ac_prog in sort
9308do
9309  # Extract the first word of "$ac_prog", so it can be a program name with args.
9310set dummy $ac_prog; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if ${ac_cv_path_SORT+:} false; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $SORT in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  ;;
9337esac
9338fi
9339SORT=$ac_cv_path_SORT
9340if test -n "$SORT"; then
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9342$as_echo "$SORT" >&6; }
9343else
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346fi
9347
9348
9349  test -n "$SORT" && break
9350done
9351
9352    else
9353      # If it succeeded, then it was overridden by the user. We will use it
9354      # for the tool.
9355
9356      # First remove it from the list of overridden variables, so we can test
9357      # for unknown variables in the end.
9358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9359
9360      # Check if the provided tool contains a complete path.
9361      tool_specified="$SORT"
9362      tool_basename="${tool_specified##*/}"
9363      if test "x$tool_basename" = "x$tool_specified"; then
9364        # A command without a complete path is provided, search $PATH.
9365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9366$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9367        # Extract the first word of "$tool_basename", so it can be a program name with args.
9368set dummy $tool_basename; ac_word=$2
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370$as_echo_n "checking for $ac_word... " >&6; }
9371if ${ac_cv_path_SORT+:} false; then :
9372  $as_echo_n "(cached) " >&6
9373else
9374  case $SORT in
9375  [\\/]* | ?:[\\/]*)
9376  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9377  ;;
9378  *)
9379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380for as_dir in $PATH
9381do
9382  IFS=$as_save_IFS
9383  test -z "$as_dir" && as_dir=.
9384    for ac_exec_ext in '' $ac_executable_extensions; do
9385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388    break 2
9389  fi
9390done
9391  done
9392IFS=$as_save_IFS
9393
9394  ;;
9395esac
9396fi
9397SORT=$ac_cv_path_SORT
9398if test -n "$SORT"; then
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9400$as_echo "$SORT" >&6; }
9401else
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404fi
9405
9406
9407        if test "x$SORT" = x; then
9408          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9409        fi
9410      else
9411        # Otherwise we believe it is a complete path. Use it as it is.
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9413$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9415$as_echo_n "checking for SORT... " >&6; }
9416        if test ! -x "$tool_specified"; then
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9418$as_echo "not found" >&6; }
9419          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9420        fi
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9422$as_echo "$tool_specified" >&6; }
9423      fi
9424    fi
9425  fi
9426
9427
9428
9429  if test "x$SORT" = x; then
9430    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9431  fi
9432
9433
9434
9435
9436
9437  # Publish this variable in the help.
9438
9439
9440  if test "x$TAIL" = x; then
9441    # The variable is not set by user, try to locate tool using the code snippet
9442    for ac_prog in tail
9443do
9444  # Extract the first word of "$ac_prog", so it can be a program name with args.
9445set dummy $ac_prog; ac_word=$2
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447$as_echo_n "checking for $ac_word... " >&6; }
9448if ${ac_cv_path_TAIL+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $TAIL in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9454  ;;
9455  *)
9456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457for as_dir in $PATH
9458do
9459  IFS=$as_save_IFS
9460  test -z "$as_dir" && as_dir=.
9461    for ac_exec_ext in '' $ac_executable_extensions; do
9462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465    break 2
9466  fi
9467done
9468  done
9469IFS=$as_save_IFS
9470
9471  ;;
9472esac
9473fi
9474TAIL=$ac_cv_path_TAIL
9475if test -n "$TAIL"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9477$as_echo "$TAIL" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484  test -n "$TAIL" && break
9485done
9486
9487  else
9488    # The variable is set, but is it from the command line or the environment?
9489
9490    # Try to remove the string !TAIL! from our list.
9491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9493      # If it failed, the variable was not from the command line. Ignore it,
9494      # but warn the user (except for BASH, which is always set by the calling BASH).
9495      if test "xTAIL" != xBASH; then
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9497$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9498      fi
9499      # Try to locate tool using the code snippet
9500      for ac_prog in tail
9501do
9502  # Extract the first word of "$ac_prog", so it can be a program name with args.
9503set dummy $ac_prog; ac_word=$2
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9505$as_echo_n "checking for $ac_word... " >&6; }
9506if ${ac_cv_path_TAIL+:} false; then :
9507  $as_echo_n "(cached) " >&6
9508else
9509  case $TAIL in
9510  [\\/]* | ?:[\\/]*)
9511  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9512  ;;
9513  *)
9514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515for as_dir in $PATH
9516do
9517  IFS=$as_save_IFS
9518  test -z "$as_dir" && as_dir=.
9519    for ac_exec_ext in '' $ac_executable_extensions; do
9520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523    break 2
9524  fi
9525done
9526  done
9527IFS=$as_save_IFS
9528
9529  ;;
9530esac
9531fi
9532TAIL=$ac_cv_path_TAIL
9533if test -n "$TAIL"; then
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9535$as_echo "$TAIL" >&6; }
9536else
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539fi
9540
9541
9542  test -n "$TAIL" && break
9543done
9544
9545    else
9546      # If it succeeded, then it was overridden by the user. We will use it
9547      # for the tool.
9548
9549      # First remove it from the list of overridden variables, so we can test
9550      # for unknown variables in the end.
9551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9552
9553      # Check if the provided tool contains a complete path.
9554      tool_specified="$TAIL"
9555      tool_basename="${tool_specified##*/}"
9556      if test "x$tool_basename" = "x$tool_specified"; then
9557        # A command without a complete path is provided, search $PATH.
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9559$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9560        # Extract the first word of "$tool_basename", so it can be a program name with args.
9561set dummy $tool_basename; ac_word=$2
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563$as_echo_n "checking for $ac_word... " >&6; }
9564if ${ac_cv_path_TAIL+:} false; then :
9565  $as_echo_n "(cached) " >&6
9566else
9567  case $TAIL in
9568  [\\/]* | ?:[\\/]*)
9569  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9570  ;;
9571  *)
9572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9573for as_dir in $PATH
9574do
9575  IFS=$as_save_IFS
9576  test -z "$as_dir" && as_dir=.
9577    for ac_exec_ext in '' $ac_executable_extensions; do
9578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9579    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9581    break 2
9582  fi
9583done
9584  done
9585IFS=$as_save_IFS
9586
9587  ;;
9588esac
9589fi
9590TAIL=$ac_cv_path_TAIL
9591if test -n "$TAIL"; then
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9593$as_echo "$TAIL" >&6; }
9594else
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
9597fi
9598
9599
9600        if test "x$TAIL" = x; then
9601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9602        fi
9603      else
9604        # Otherwise we believe it is a complete path. Use it as it is.
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9606$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9608$as_echo_n "checking for TAIL... " >&6; }
9609        if test ! -x "$tool_specified"; then
9610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9611$as_echo "not found" >&6; }
9612          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9613        fi
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9615$as_echo "$tool_specified" >&6; }
9616      fi
9617    fi
9618  fi
9619
9620
9621
9622  if test "x$TAIL" = x; then
9623    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9624  fi
9625
9626
9627
9628
9629
9630  # Publish this variable in the help.
9631
9632
9633  if test "x$TAR" = x; then
9634    # The variable is not set by user, try to locate tool using the code snippet
9635    for ac_prog in tar
9636do
9637  # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
9641if ${ac_cv_path_TAR+:} false; then :
9642  $as_echo_n "(cached) " >&6
9643else
9644  case $TAR in
9645  [\\/]* | ?:[\\/]*)
9646  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9647  ;;
9648  *)
9649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650for as_dir in $PATH
9651do
9652  IFS=$as_save_IFS
9653  test -z "$as_dir" && as_dir=.
9654    for ac_exec_ext in '' $ac_executable_extensions; do
9655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658    break 2
9659  fi
9660done
9661  done
9662IFS=$as_save_IFS
9663
9664  ;;
9665esac
9666fi
9667TAR=$ac_cv_path_TAR
9668if test -n "$TAR"; then
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9670$as_echo "$TAR" >&6; }
9671else
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676
9677  test -n "$TAR" && break
9678done
9679
9680  else
9681    # The variable is set, but is it from the command line or the environment?
9682
9683    # Try to remove the string !TAR! from our list.
9684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9686      # If it failed, the variable was not from the command line. Ignore it,
9687      # but warn the user (except for BASH, which is always set by the calling BASH).
9688      if test "xTAR" != xBASH; then
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9690$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9691      fi
9692      # Try to locate tool using the code snippet
9693      for ac_prog in tar
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_TAR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $TAR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725TAR=$ac_cv_path_TAR
9726if test -n "$TAR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9728$as_echo "$TAR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$TAR" && break
9736done
9737
9738    else
9739      # If it succeeded, then it was overridden by the user. We will use it
9740      # for the tool.
9741
9742      # First remove it from the list of overridden variables, so we can test
9743      # for unknown variables in the end.
9744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9745
9746      # Check if the provided tool contains a complete path.
9747      tool_specified="$TAR"
9748      tool_basename="${tool_specified##*/}"
9749      if test "x$tool_basename" = "x$tool_specified"; then
9750        # A command without a complete path is provided, search $PATH.
9751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9752$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9753        # Extract the first word of "$tool_basename", so it can be a program name with args.
9754set dummy $tool_basename; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if ${ac_cv_path_TAR+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $TAR in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783TAR=$ac_cv_path_TAR
9784if test -n "$TAR"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9786$as_echo "$TAR" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793        if test "x$TAR" = x; then
9794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9795        fi
9796      else
9797        # Otherwise we believe it is a complete path. Use it as it is.
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9799$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9801$as_echo_n "checking for TAR... " >&6; }
9802        if test ! -x "$tool_specified"; then
9803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9804$as_echo "not found" >&6; }
9805          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9806        fi
9807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9808$as_echo "$tool_specified" >&6; }
9809      fi
9810    fi
9811  fi
9812
9813
9814
9815  if test "x$TAR" = x; then
9816    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9817  fi
9818
9819
9820
9821
9822
9823  # Publish this variable in the help.
9824
9825
9826  if test "x$TEE" = x; then
9827    # The variable is not set by user, try to locate tool using the code snippet
9828    for ac_prog in tee
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if ${ac_cv_path_TEE+:} false; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $TEE in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9849    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860TEE=$ac_cv_path_TEE
9861if test -n "$TEE"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9863$as_echo "$TEE" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$TEE" && break
9871done
9872
9873  else
9874    # The variable is set, but is it from the command line or the environment?
9875
9876    # Try to remove the string !TEE! from our list.
9877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9879      # If it failed, the variable was not from the command line. Ignore it,
9880      # but warn the user (except for BASH, which is always set by the calling BASH).
9881      if test "xTEE" != xBASH; then
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9883$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9884      fi
9885      # Try to locate tool using the code snippet
9886      for ac_prog in tee
9887do
9888  # Extract the first word of "$ac_prog", so it can be a program name with args.
9889set dummy $ac_prog; ac_word=$2
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891$as_echo_n "checking for $ac_word... " >&6; }
9892if ${ac_cv_path_TEE+:} false; then :
9893  $as_echo_n "(cached) " >&6
9894else
9895  case $TEE in
9896  [\\/]* | ?:[\\/]*)
9897  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9898  ;;
9899  *)
9900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901for as_dir in $PATH
9902do
9903  IFS=$as_save_IFS
9904  test -z "$as_dir" && as_dir=.
9905    for ac_exec_ext in '' $ac_executable_extensions; do
9906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9907    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909    break 2
9910  fi
9911done
9912  done
9913IFS=$as_save_IFS
9914
9915  ;;
9916esac
9917fi
9918TEE=$ac_cv_path_TEE
9919if test -n "$TEE"; then
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9921$as_echo "$TEE" >&6; }
9922else
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925fi
9926
9927
9928  test -n "$TEE" && break
9929done
9930
9931    else
9932      # If it succeeded, then it was overridden by the user. We will use it
9933      # for the tool.
9934
9935      # First remove it from the list of overridden variables, so we can test
9936      # for unknown variables in the end.
9937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9938
9939      # Check if the provided tool contains a complete path.
9940      tool_specified="$TEE"
9941      tool_basename="${tool_specified##*/}"
9942      if test "x$tool_basename" = "x$tool_specified"; then
9943        # A command without a complete path is provided, search $PATH.
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9945$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9946        # Extract the first word of "$tool_basename", so it can be a program name with args.
9947set dummy $tool_basename; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_TEE+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $TEE in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976TEE=$ac_cv_path_TEE
9977if test -n "$TEE"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9979$as_echo "$TEE" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986        if test "x$TEE" = x; then
9987          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9988        fi
9989      else
9990        # Otherwise we believe it is a complete path. Use it as it is.
9991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9992$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9994$as_echo_n "checking for TEE... " >&6; }
9995        if test ! -x "$tool_specified"; then
9996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9997$as_echo "not found" >&6; }
9998          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9999        fi
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10001$as_echo "$tool_specified" >&6; }
10002      fi
10003    fi
10004  fi
10005
10006
10007
10008  if test "x$TEE" = x; then
10009    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if test "x$TOUCH" = x; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in touch
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_TOUCH+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $TOUCH in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053TOUCH=$ac_cv_path_TOUCH
10054if test -n "$TOUCH"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10056$as_echo "$TOUCH" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$TOUCH" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !TOUCH! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xTOUCH" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in touch
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_TOUCH+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $TOUCH in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111TOUCH=$ac_cv_path_TOUCH
10112if test -n "$TOUCH"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10114$as_echo "$TOUCH" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$TOUCH" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if the provided tool contains a complete path.
10133      tool_specified="$TOUCH"
10134      tool_basename="${tool_specified##*/}"
10135      if test "x$tool_basename" = "x$tool_specified"; then
10136        # A command without a complete path is provided, search $PATH.
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10138$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10139        # Extract the first word of "$tool_basename", so it can be a program name with args.
10140set dummy $tool_basename; ac_word=$2
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142$as_echo_n "checking for $ac_word... " >&6; }
10143if ${ac_cv_path_TOUCH+:} false; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  case $TOUCH in
10147  [\\/]* | ?:[\\/]*)
10148  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10149  ;;
10150  *)
10151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152for as_dir in $PATH
10153do
10154  IFS=$as_save_IFS
10155  test -z "$as_dir" && as_dir=.
10156    for ac_exec_ext in '' $ac_executable_extensions; do
10157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10158    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160    break 2
10161  fi
10162done
10163  done
10164IFS=$as_save_IFS
10165
10166  ;;
10167esac
10168fi
10169TOUCH=$ac_cv_path_TOUCH
10170if test -n "$TOUCH"; then
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10172$as_echo "$TOUCH" >&6; }
10173else
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175$as_echo "no" >&6; }
10176fi
10177
10178
10179        if test "x$TOUCH" = x; then
10180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10181        fi
10182      else
10183        # Otherwise we believe it is a complete path. Use it as it is.
10184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10185$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10187$as_echo_n "checking for TOUCH... " >&6; }
10188        if test ! -x "$tool_specified"; then
10189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10190$as_echo "not found" >&6; }
10191          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10192        fi
10193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10194$as_echo "$tool_specified" >&6; }
10195      fi
10196    fi
10197  fi
10198
10199
10200
10201  if test "x$TOUCH" = x; then
10202    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10203  fi
10204
10205
10206
10207
10208
10209  # Publish this variable in the help.
10210
10211
10212  if test "x$TR" = x; then
10213    # The variable is not set by user, try to locate tool using the code snippet
10214    for ac_prog in tr
10215do
10216  # Extract the first word of "$ac_prog", so it can be a program name with args.
10217set dummy $ac_prog; ac_word=$2
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10219$as_echo_n "checking for $ac_word... " >&6; }
10220if ${ac_cv_path_TR+:} false; then :
10221  $as_echo_n "(cached) " >&6
10222else
10223  case $TR in
10224  [\\/]* | ?:[\\/]*)
10225  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10226  ;;
10227  *)
10228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10229for as_dir in $PATH
10230do
10231  IFS=$as_save_IFS
10232  test -z "$as_dir" && as_dir=.
10233    for ac_exec_ext in '' $ac_executable_extensions; do
10234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10235    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10237    break 2
10238  fi
10239done
10240  done
10241IFS=$as_save_IFS
10242
10243  ;;
10244esac
10245fi
10246TR=$ac_cv_path_TR
10247if test -n "$TR"; then
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10249$as_echo "$TR" >&6; }
10250else
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10252$as_echo "no" >&6; }
10253fi
10254
10255
10256  test -n "$TR" && break
10257done
10258
10259  else
10260    # The variable is set, but is it from the command line or the environment?
10261
10262    # Try to remove the string !TR! from our list.
10263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10265      # If it failed, the variable was not from the command line. Ignore it,
10266      # but warn the user (except for BASH, which is always set by the calling BASH).
10267      if test "xTR" != xBASH; then
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10269$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10270      fi
10271      # Try to locate tool using the code snippet
10272      for ac_prog in tr
10273do
10274  # Extract the first word of "$ac_prog", so it can be a program name with args.
10275set dummy $ac_prog; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if ${ac_cv_path_TR+:} false; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $TR in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10293    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304TR=$ac_cv_path_TR
10305if test -n "$TR"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10307$as_echo "$TR" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314  test -n "$TR" && break
10315done
10316
10317    else
10318      # If it succeeded, then it was overridden by the user. We will use it
10319      # for the tool.
10320
10321      # First remove it from the list of overridden variables, so we can test
10322      # for unknown variables in the end.
10323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10324
10325      # Check if the provided tool contains a complete path.
10326      tool_specified="$TR"
10327      tool_basename="${tool_specified##*/}"
10328      if test "x$tool_basename" = "x$tool_specified"; then
10329        # A command without a complete path is provided, search $PATH.
10330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10331$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10332        # Extract the first word of "$tool_basename", so it can be a program name with args.
10333set dummy $tool_basename; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_TR+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $TR in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362TR=$ac_cv_path_TR
10363if test -n "$TR"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10365$as_echo "$TR" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372        if test "x$TR" = x; then
10373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10374        fi
10375      else
10376        # Otherwise we believe it is a complete path. Use it as it is.
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10378$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10380$as_echo_n "checking for TR... " >&6; }
10381        if test ! -x "$tool_specified"; then
10382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10383$as_echo "not found" >&6; }
10384          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10385        fi
10386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10387$as_echo "$tool_specified" >&6; }
10388      fi
10389    fi
10390  fi
10391
10392
10393
10394  if test "x$TR" = x; then
10395    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10396  fi
10397
10398
10399
10400
10401
10402  # Publish this variable in the help.
10403
10404
10405  if test "x$UNAME" = x; then
10406    # The variable is not set by user, try to locate tool using the code snippet
10407    for ac_prog in uname
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_UNAME+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $UNAME in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439UNAME=$ac_cv_path_UNAME
10440if test -n "$UNAME"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10442$as_echo "$UNAME" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$UNAME" && break
10450done
10451
10452  else
10453    # The variable is set, but is it from the command line or the environment?
10454
10455    # Try to remove the string !UNAME! from our list.
10456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10458      # If it failed, the variable was not from the command line. Ignore it,
10459      # but warn the user (except for BASH, which is always set by the calling BASH).
10460      if test "xUNAME" != xBASH; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10462$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10463      fi
10464      # Try to locate tool using the code snippet
10465      for ac_prog in uname
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_UNAME+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $UNAME in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497UNAME=$ac_cv_path_UNAME
10498if test -n "$UNAME"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10500$as_echo "$UNAME" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$UNAME" && break
10508done
10509
10510    else
10511      # If it succeeded, then it was overridden by the user. We will use it
10512      # for the tool.
10513
10514      # First remove it from the list of overridden variables, so we can test
10515      # for unknown variables in the end.
10516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10517
10518      # Check if the provided tool contains a complete path.
10519      tool_specified="$UNAME"
10520      tool_basename="${tool_specified##*/}"
10521      if test "x$tool_basename" = "x$tool_specified"; then
10522        # A command without a complete path is provided, search $PATH.
10523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10524$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10525        # Extract the first word of "$tool_basename", so it can be a program name with args.
10526set dummy $tool_basename; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
10529if ${ac_cv_path_UNAME+:} false; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  case $UNAME in
10533  [\\/]* | ?:[\\/]*)
10534  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10535  ;;
10536  *)
10537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540  IFS=$as_save_IFS
10541  test -z "$as_dir" && as_dir=.
10542    for ac_exec_ext in '' $ac_executable_extensions; do
10543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546    break 2
10547  fi
10548done
10549  done
10550IFS=$as_save_IFS
10551
10552  ;;
10553esac
10554fi
10555UNAME=$ac_cv_path_UNAME
10556if test -n "$UNAME"; then
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10558$as_echo "$UNAME" >&6; }
10559else
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
10562fi
10563
10564
10565        if test "x$UNAME" = x; then
10566          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10567        fi
10568      else
10569        # Otherwise we believe it is a complete path. Use it as it is.
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10571$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10573$as_echo_n "checking for UNAME... " >&6; }
10574        if test ! -x "$tool_specified"; then
10575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10576$as_echo "not found" >&6; }
10577          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10578        fi
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10580$as_echo "$tool_specified" >&6; }
10581      fi
10582    fi
10583  fi
10584
10585
10586
10587  if test "x$UNAME" = x; then
10588    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10589  fi
10590
10591
10592
10593
10594
10595  # Publish this variable in the help.
10596
10597
10598  if test "x$UNIQ" = x; then
10599    # The variable is not set by user, try to locate tool using the code snippet
10600    for ac_prog in uniq
10601do
10602  # Extract the first word of "$ac_prog", so it can be a program name with args.
10603set dummy $ac_prog; ac_word=$2
10604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10605$as_echo_n "checking for $ac_word... " >&6; }
10606if ${ac_cv_path_UNIQ+:} false; then :
10607  $as_echo_n "(cached) " >&6
10608else
10609  case $UNIQ in
10610  [\\/]* | ?:[\\/]*)
10611  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10612  ;;
10613  *)
10614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10615for as_dir in $PATH
10616do
10617  IFS=$as_save_IFS
10618  test -z "$as_dir" && as_dir=.
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10621    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629  ;;
10630esac
10631fi
10632UNIQ=$ac_cv_path_UNIQ
10633if test -n "$UNIQ"; then
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10635$as_echo "$UNIQ" >&6; }
10636else
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
10639fi
10640
10641
10642  test -n "$UNIQ" && break
10643done
10644
10645  else
10646    # The variable is set, but is it from the command line or the environment?
10647
10648    # Try to remove the string !UNIQ! from our list.
10649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10651      # If it failed, the variable was not from the command line. Ignore it,
10652      # but warn the user (except for BASH, which is always set by the calling BASH).
10653      if test "xUNIQ" != xBASH; then
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10655$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10656      fi
10657      # Try to locate tool using the code snippet
10658      for ac_prog in uniq
10659do
10660  # Extract the first word of "$ac_prog", so it can be a program name with args.
10661set dummy $ac_prog; ac_word=$2
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10663$as_echo_n "checking for $ac_word... " >&6; }
10664if ${ac_cv_path_UNIQ+:} false; then :
10665  $as_echo_n "(cached) " >&6
10666else
10667  case $UNIQ in
10668  [\\/]* | ?:[\\/]*)
10669  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10670  ;;
10671  *)
10672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10673for as_dir in $PATH
10674do
10675  IFS=$as_save_IFS
10676  test -z "$as_dir" && as_dir=.
10677    for ac_exec_ext in '' $ac_executable_extensions; do
10678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10679    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10681    break 2
10682  fi
10683done
10684  done
10685IFS=$as_save_IFS
10686
10687  ;;
10688esac
10689fi
10690UNIQ=$ac_cv_path_UNIQ
10691if test -n "$UNIQ"; then
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10693$as_echo "$UNIQ" >&6; }
10694else
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
10697fi
10698
10699
10700  test -n "$UNIQ" && break
10701done
10702
10703    else
10704      # If it succeeded, then it was overridden by the user. We will use it
10705      # for the tool.
10706
10707      # First remove it from the list of overridden variables, so we can test
10708      # for unknown variables in the end.
10709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10710
10711      # Check if the provided tool contains a complete path.
10712      tool_specified="$UNIQ"
10713      tool_basename="${tool_specified##*/}"
10714      if test "x$tool_basename" = "x$tool_specified"; then
10715        # A command without a complete path is provided, search $PATH.
10716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10717$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10718        # Extract the first word of "$tool_basename", so it can be a program name with args.
10719set dummy $tool_basename; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_path_UNIQ+:} false; then :
10723  $as_echo_n "(cached) " >&6
10724else
10725  case $UNIQ in
10726  [\\/]* | ?:[\\/]*)
10727  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10728  ;;
10729  *)
10730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10737    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745  ;;
10746esac
10747fi
10748UNIQ=$ac_cv_path_UNIQ
10749if test -n "$UNIQ"; then
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10751$as_echo "$UNIQ" >&6; }
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756
10757
10758        if test "x$UNIQ" = x; then
10759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10760        fi
10761      else
10762        # Otherwise we believe it is a complete path. Use it as it is.
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10764$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10766$as_echo_n "checking for UNIQ... " >&6; }
10767        if test ! -x "$tool_specified"; then
10768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10769$as_echo "not found" >&6; }
10770          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10771        fi
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10773$as_echo "$tool_specified" >&6; }
10774      fi
10775    fi
10776  fi
10777
10778
10779
10780  if test "x$UNIQ" = x; then
10781    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10782  fi
10783
10784
10785
10786
10787
10788  # Publish this variable in the help.
10789
10790
10791  if test "x$WC" = x; then
10792    # The variable is not set by user, try to locate tool using the code snippet
10793    for ac_prog in wc
10794do
10795  # Extract the first word of "$ac_prog", so it can be a program name with args.
10796set dummy $ac_prog; ac_word=$2
10797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10798$as_echo_n "checking for $ac_word... " >&6; }
10799if ${ac_cv_path_WC+:} false; then :
10800  $as_echo_n "(cached) " >&6
10801else
10802  case $WC in
10803  [\\/]* | ?:[\\/]*)
10804  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10805  ;;
10806  *)
10807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10808for as_dir in $PATH
10809do
10810  IFS=$as_save_IFS
10811  test -z "$as_dir" && as_dir=.
10812    for ac_exec_ext in '' $ac_executable_extensions; do
10813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10814    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10816    break 2
10817  fi
10818done
10819  done
10820IFS=$as_save_IFS
10821
10822  ;;
10823esac
10824fi
10825WC=$ac_cv_path_WC
10826if test -n "$WC"; then
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10828$as_echo "$WC" >&6; }
10829else
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
10832fi
10833
10834
10835  test -n "$WC" && break
10836done
10837
10838  else
10839    # The variable is set, but is it from the command line or the environment?
10840
10841    # Try to remove the string !WC! from our list.
10842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10844      # If it failed, the variable was not from the command line. Ignore it,
10845      # but warn the user (except for BASH, which is always set by the calling BASH).
10846      if test "xWC" != xBASH; then
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10848$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10849      fi
10850      # Try to locate tool using the code snippet
10851      for ac_prog in wc
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_WC+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $WC in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883WC=$ac_cv_path_WC
10884if test -n "$WC"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10886$as_echo "$WC" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$WC" && break
10894done
10895
10896    else
10897      # If it succeeded, then it was overridden by the user. We will use it
10898      # for the tool.
10899
10900      # First remove it from the list of overridden variables, so we can test
10901      # for unknown variables in the end.
10902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10903
10904      # Check if the provided tool contains a complete path.
10905      tool_specified="$WC"
10906      tool_basename="${tool_specified##*/}"
10907      if test "x$tool_basename" = "x$tool_specified"; then
10908        # A command without a complete path is provided, search $PATH.
10909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10910$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10911        # Extract the first word of "$tool_basename", so it can be a program name with args.
10912set dummy $tool_basename; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_WC+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $WC in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941WC=$ac_cv_path_WC
10942if test -n "$WC"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10944$as_echo "$WC" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951        if test "x$WC" = x; then
10952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10953        fi
10954      else
10955        # Otherwise we believe it is a complete path. Use it as it is.
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10957$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10959$as_echo_n "checking for WC... " >&6; }
10960        if test ! -x "$tool_specified"; then
10961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10962$as_echo "not found" >&6; }
10963          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10964        fi
10965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10966$as_echo "$tool_specified" >&6; }
10967      fi
10968    fi
10969  fi
10970
10971
10972
10973  if test "x$WC" = x; then
10974    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10975  fi
10976
10977
10978
10979
10980
10981  # Publish this variable in the help.
10982
10983
10984  if test "x$WHICH" = x; then
10985    # The variable is not set by user, try to locate tool using the code snippet
10986    for ac_prog in which
10987do
10988  # Extract the first word of "$ac_prog", so it can be a program name with args.
10989set dummy $ac_prog; ac_word=$2
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991$as_echo_n "checking for $ac_word... " >&6; }
10992if ${ac_cv_path_WHICH+:} false; then :
10993  $as_echo_n "(cached) " >&6
10994else
10995  case $WHICH in
10996  [\\/]* | ?:[\\/]*)
10997  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10998  ;;
10999  *)
11000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11001for as_dir in $PATH
11002do
11003  IFS=$as_save_IFS
11004  test -z "$as_dir" && as_dir=.
11005    for ac_exec_ext in '' $ac_executable_extensions; do
11006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11007    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11009    break 2
11010  fi
11011done
11012  done
11013IFS=$as_save_IFS
11014
11015  ;;
11016esac
11017fi
11018WHICH=$ac_cv_path_WHICH
11019if test -n "$WHICH"; then
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11021$as_echo "$WHICH" >&6; }
11022else
11023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024$as_echo "no" >&6; }
11025fi
11026
11027
11028  test -n "$WHICH" && break
11029done
11030
11031  else
11032    # The variable is set, but is it from the command line or the environment?
11033
11034    # Try to remove the string !WHICH! from our list.
11035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11037      # If it failed, the variable was not from the command line. Ignore it,
11038      # but warn the user (except for BASH, which is always set by the calling BASH).
11039      if test "xWHICH" != xBASH; then
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11041$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11042      fi
11043      # Try to locate tool using the code snippet
11044      for ac_prog in which
11045do
11046  # Extract the first word of "$ac_prog", so it can be a program name with args.
11047set dummy $ac_prog; ac_word=$2
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049$as_echo_n "checking for $ac_word... " >&6; }
11050if ${ac_cv_path_WHICH+:} false; then :
11051  $as_echo_n "(cached) " >&6
11052else
11053  case $WHICH in
11054  [\\/]* | ?:[\\/]*)
11055  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11056  ;;
11057  *)
11058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059for as_dir in $PATH
11060do
11061  IFS=$as_save_IFS
11062  test -z "$as_dir" && as_dir=.
11063    for ac_exec_ext in '' $ac_executable_extensions; do
11064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067    break 2
11068  fi
11069done
11070  done
11071IFS=$as_save_IFS
11072
11073  ;;
11074esac
11075fi
11076WHICH=$ac_cv_path_WHICH
11077if test -n "$WHICH"; then
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11079$as_echo "$WHICH" >&6; }
11080else
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
11083fi
11084
11085
11086  test -n "$WHICH" && break
11087done
11088
11089    else
11090      # If it succeeded, then it was overridden by the user. We will use it
11091      # for the tool.
11092
11093      # First remove it from the list of overridden variables, so we can test
11094      # for unknown variables in the end.
11095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11096
11097      # Check if the provided tool contains a complete path.
11098      tool_specified="$WHICH"
11099      tool_basename="${tool_specified##*/}"
11100      if test "x$tool_basename" = "x$tool_specified"; then
11101        # A command without a complete path is provided, search $PATH.
11102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11103$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11104        # Extract the first word of "$tool_basename", so it can be a program name with args.
11105set dummy $tool_basename; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
11108if ${ac_cv_path_WHICH+:} false; then :
11109  $as_echo_n "(cached) " >&6
11110else
11111  case $WHICH in
11112  [\\/]* | ?:[\\/]*)
11113  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11114  ;;
11115  *)
11116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119  IFS=$as_save_IFS
11120  test -z "$as_dir" && as_dir=.
11121    for ac_exec_ext in '' $ac_executable_extensions; do
11122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125    break 2
11126  fi
11127done
11128  done
11129IFS=$as_save_IFS
11130
11131  ;;
11132esac
11133fi
11134WHICH=$ac_cv_path_WHICH
11135if test -n "$WHICH"; then
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11137$as_echo "$WHICH" >&6; }
11138else
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144        if test "x$WHICH" = x; then
11145          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11146        fi
11147      else
11148        # Otherwise we believe it is a complete path. Use it as it is.
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11150$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11152$as_echo_n "checking for WHICH... " >&6; }
11153        if test ! -x "$tool_specified"; then
11154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11155$as_echo "not found" >&6; }
11156          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11157        fi
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11159$as_echo "$tool_specified" >&6; }
11160      fi
11161    fi
11162  fi
11163
11164
11165
11166  if test "x$WHICH" = x; then
11167    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11168  fi
11169
11170
11171
11172
11173
11174  # Publish this variable in the help.
11175
11176
11177  if test "x$XARGS" = x; then
11178    # The variable is not set by user, try to locate tool using the code snippet
11179    for ac_prog in xargs
11180do
11181  # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
11185if ${ac_cv_path_XARGS+:} false; then :
11186  $as_echo_n "(cached) " >&6
11187else
11188  case $XARGS in
11189  [\\/]* | ?:[\\/]*)
11190  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11191  ;;
11192  *)
11193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11194for as_dir in $PATH
11195do
11196  IFS=$as_save_IFS
11197  test -z "$as_dir" && as_dir=.
11198    for ac_exec_ext in '' $ac_executable_extensions; do
11199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11200    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11202    break 2
11203  fi
11204done
11205  done
11206IFS=$as_save_IFS
11207
11208  ;;
11209esac
11210fi
11211XARGS=$ac_cv_path_XARGS
11212if test -n "$XARGS"; then
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11214$as_echo "$XARGS" >&6; }
11215else
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218fi
11219
11220
11221  test -n "$XARGS" && break
11222done
11223
11224  else
11225    # The variable is set, but is it from the command line or the environment?
11226
11227    # Try to remove the string !XARGS! from our list.
11228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11230      # If it failed, the variable was not from the command line. Ignore it,
11231      # but warn the user (except for BASH, which is always set by the calling BASH).
11232      if test "xXARGS" != xBASH; then
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11234$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11235      fi
11236      # Try to locate tool using the code snippet
11237      for ac_prog in xargs
11238do
11239  # Extract the first word of "$ac_prog", so it can be a program name with args.
11240set dummy $ac_prog; ac_word=$2
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if ${ac_cv_path_XARGS+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $XARGS in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256    for ac_exec_ext in '' $ac_executable_extensions; do
11257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11258    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263  done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269XARGS=$ac_cv_path_XARGS
11270if test -n "$XARGS"; then
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11272$as_echo "$XARGS" >&6; }
11273else
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279  test -n "$XARGS" && break
11280done
11281
11282    else
11283      # If it succeeded, then it was overridden by the user. We will use it
11284      # for the tool.
11285
11286      # First remove it from the list of overridden variables, so we can test
11287      # for unknown variables in the end.
11288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11289
11290      # Check if the provided tool contains a complete path.
11291      tool_specified="$XARGS"
11292      tool_basename="${tool_specified##*/}"
11293      if test "x$tool_basename" = "x$tool_specified"; then
11294        # A command without a complete path is provided, search $PATH.
11295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11296$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11297        # Extract the first word of "$tool_basename", so it can be a program name with args.
11298set dummy $tool_basename; ac_word=$2
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11300$as_echo_n "checking for $ac_word... " >&6; }
11301if ${ac_cv_path_XARGS+:} false; then :
11302  $as_echo_n "(cached) " >&6
11303else
11304  case $XARGS in
11305  [\\/]* | ?:[\\/]*)
11306  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11307  ;;
11308  *)
11309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11310for as_dir in $PATH
11311do
11312  IFS=$as_save_IFS
11313  test -z "$as_dir" && as_dir=.
11314    for ac_exec_ext in '' $ac_executable_extensions; do
11315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11316    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11318    break 2
11319  fi
11320done
11321  done
11322IFS=$as_save_IFS
11323
11324  ;;
11325esac
11326fi
11327XARGS=$ac_cv_path_XARGS
11328if test -n "$XARGS"; then
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11330$as_echo "$XARGS" >&6; }
11331else
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337        if test "x$XARGS" = x; then
11338          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11339        fi
11340      else
11341        # Otherwise we believe it is a complete path. Use it as it is.
11342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11343$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11345$as_echo_n "checking for XARGS... " >&6; }
11346        if test ! -x "$tool_specified"; then
11347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11348$as_echo "not found" >&6; }
11349          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11350        fi
11351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11352$as_echo "$tool_specified" >&6; }
11353      fi
11354    fi
11355  fi
11356
11357
11358
11359  if test "x$XARGS" = x; then
11360    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11361  fi
11362
11363
11364
11365  # Then required tools that require some special treatment.
11366
11367
11368  # Publish this variable in the help.
11369
11370
11371  if test "x$AWK" = x; then
11372    # The variable is not set by user, try to locate tool using the code snippet
11373    for ac_prog in gawk mawk nawk awk
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_prog_AWK+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  if test -n "$AWK"; then
11383  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11384else
11385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_prog_AWK="$ac_prog"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400fi
11401fi
11402AWK=$ac_cv_prog_AWK
11403if test -n "$AWK"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11405$as_echo "$AWK" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412  test -n "$AWK" && break
11413done
11414
11415  else
11416    # The variable is set, but is it from the command line or the environment?
11417
11418    # Try to remove the string !AWK! from our list.
11419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11421      # If it failed, the variable was not from the command line. Ignore it,
11422      # but warn the user (except for BASH, which is always set by the calling BASH).
11423      if test "xAWK" != xBASH; then
11424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11425$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11426      fi
11427      # Try to locate tool using the code snippet
11428      for ac_prog in gawk mawk nawk awk
11429do
11430  # Extract the first word of "$ac_prog", so it can be a program name with args.
11431set dummy $ac_prog; ac_word=$2
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11433$as_echo_n "checking for $ac_word... " >&6; }
11434if ${ac_cv_prog_AWK+:} false; then :
11435  $as_echo_n "(cached) " >&6
11436else
11437  if test -n "$AWK"; then
11438  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11439else
11440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11441for as_dir in $PATH
11442do
11443  IFS=$as_save_IFS
11444  test -z "$as_dir" && as_dir=.
11445    for ac_exec_ext in '' $ac_executable_extensions; do
11446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11447    ac_cv_prog_AWK="$ac_prog"
11448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11449    break 2
11450  fi
11451done
11452  done
11453IFS=$as_save_IFS
11454
11455fi
11456fi
11457AWK=$ac_cv_prog_AWK
11458if test -n "$AWK"; then
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11460$as_echo "$AWK" >&6; }
11461else
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464fi
11465
11466
11467  test -n "$AWK" && break
11468done
11469
11470    else
11471      # If it succeeded, then it was overridden by the user. We will use it
11472      # for the tool.
11473
11474      # First remove it from the list of overridden variables, so we can test
11475      # for unknown variables in the end.
11476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11477
11478      # Check if the provided tool contains a complete path.
11479      tool_specified="$AWK"
11480      tool_basename="${tool_specified##*/}"
11481      if test "x$tool_basename" = "x$tool_specified"; then
11482        # A command without a complete path is provided, search $PATH.
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11484$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11485        # Extract the first word of "$tool_basename", so it can be a program name with args.
11486set dummy $tool_basename; ac_word=$2
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11488$as_echo_n "checking for $ac_word... " >&6; }
11489if ${ac_cv_path_AWK+:} false; then :
11490  $as_echo_n "(cached) " >&6
11491else
11492  case $AWK in
11493  [\\/]* | ?:[\\/]*)
11494  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11495  ;;
11496  *)
11497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11498for as_dir in $PATH
11499do
11500  IFS=$as_save_IFS
11501  test -z "$as_dir" && as_dir=.
11502    for ac_exec_ext in '' $ac_executable_extensions; do
11503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11504    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11506    break 2
11507  fi
11508done
11509  done
11510IFS=$as_save_IFS
11511
11512  ;;
11513esac
11514fi
11515AWK=$ac_cv_path_AWK
11516if test -n "$AWK"; then
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11518$as_echo "$AWK" >&6; }
11519else
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521$as_echo "no" >&6; }
11522fi
11523
11524
11525        if test "x$AWK" = x; then
11526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11527        fi
11528      else
11529        # Otherwise we believe it is a complete path. Use it as it is.
11530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11531$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11533$as_echo_n "checking for AWK... " >&6; }
11534        if test ! -x "$tool_specified"; then
11535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11536$as_echo "not found" >&6; }
11537          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11538        fi
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11540$as_echo "$tool_specified" >&6; }
11541      fi
11542    fi
11543  fi
11544
11545
11546  if test "x$AWK" = x; then
11547    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11548  fi
11549
11550
11551
11552
11553  # Publish this variable in the help.
11554
11555
11556  if test "x$GREP" = x; then
11557    # The variable is not set by user, try to locate tool using the code snippet
11558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11559$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11560if ${ac_cv_path_GREP+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  if test -z "$GREP"; then
11564  ac_path_GREP_found=false
11565  # Loop through the user's path and test for each of PROGNAME-LIST
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_prog in grep ggrep; do
11572    for ac_exec_ext in '' $ac_executable_extensions; do
11573      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11574      as_fn_executable_p "$ac_path_GREP" || continue
11575# Check for GNU ac_path_GREP and select it if it is found.
11576  # Check for GNU $ac_path_GREP
11577case `"$ac_path_GREP" --version 2>&1` in
11578*GNU*)
11579  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11580*)
11581  ac_count=0
11582  $as_echo_n 0123456789 >"conftest.in"
11583  while :
11584  do
11585    cat "conftest.in" "conftest.in" >"conftest.tmp"
11586    mv "conftest.tmp" "conftest.in"
11587    cp "conftest.in" "conftest.nl"
11588    $as_echo 'GREP' >> "conftest.nl"
11589    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11591    as_fn_arith $ac_count + 1 && ac_count=$as_val
11592    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11593      # Best one so far, save it but keep looking for a better one
11594      ac_cv_path_GREP="$ac_path_GREP"
11595      ac_path_GREP_max=$ac_count
11596    fi
11597    # 10*(2^10) chars as input seems more than enough
11598    test $ac_count -gt 10 && break
11599  done
11600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11601esac
11602
11603      $ac_path_GREP_found && break 3
11604    done
11605  done
11606  done
11607IFS=$as_save_IFS
11608  if test -z "$ac_cv_path_GREP"; then
11609    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11610  fi
11611else
11612  ac_cv_path_GREP=$GREP
11613fi
11614
11615fi
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11617$as_echo "$ac_cv_path_GREP" >&6; }
11618 GREP="$ac_cv_path_GREP"
11619
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !GREP! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xGREP" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697    else
11698      # If it succeeded, then it was overridden by the user. We will use it
11699      # for the tool.
11700
11701      # First remove it from the list of overridden variables, so we can test
11702      # for unknown variables in the end.
11703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11704
11705      # Check if the provided tool contains a complete path.
11706      tool_specified="$GREP"
11707      tool_basename="${tool_specified##*/}"
11708      if test "x$tool_basename" = "x$tool_specified"; then
11709        # A command without a complete path is provided, search $PATH.
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11711$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11712        # Extract the first word of "$tool_basename", so it can be a program name with args.
11713set dummy $tool_basename; ac_word=$2
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11715$as_echo_n "checking for $ac_word... " >&6; }
11716if ${ac_cv_path_GREP+:} false; then :
11717  $as_echo_n "(cached) " >&6
11718else
11719  case $GREP in
11720  [\\/]* | ?:[\\/]*)
11721  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11722  ;;
11723  *)
11724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11725for as_dir in $PATH
11726do
11727  IFS=$as_save_IFS
11728  test -z "$as_dir" && as_dir=.
11729    for ac_exec_ext in '' $ac_executable_extensions; do
11730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11731    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11733    break 2
11734  fi
11735done
11736  done
11737IFS=$as_save_IFS
11738
11739  ;;
11740esac
11741fi
11742GREP=$ac_cv_path_GREP
11743if test -n "$GREP"; then
11744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11745$as_echo "$GREP" >&6; }
11746else
11747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
11749fi
11750
11751
11752        if test "x$GREP" = x; then
11753          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11754        fi
11755      else
11756        # Otherwise we believe it is a complete path. Use it as it is.
11757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11758$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11760$as_echo_n "checking for GREP... " >&6; }
11761        if test ! -x "$tool_specified"; then
11762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11763$as_echo "not found" >&6; }
11764          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11765        fi
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11767$as_echo "$tool_specified" >&6; }
11768      fi
11769    fi
11770  fi
11771
11772
11773  if test "x$GREP" = x; then
11774    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11775  fi
11776
11777
11778
11779
11780  # Publish this variable in the help.
11781
11782
11783  if test "x$EGREP" = x; then
11784    # The variable is not set by user, try to locate tool using the code snippet
11785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11786$as_echo_n "checking for egrep... " >&6; }
11787if ${ac_cv_path_EGREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11791   then ac_cv_path_EGREP="$GREP -E"
11792   else
11793     if test -z "$EGREP"; then
11794  ac_path_EGREP_found=false
11795  # Loop through the user's path and test for each of PROGNAME-LIST
11796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11797for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11798do
11799  IFS=$as_save_IFS
11800  test -z "$as_dir" && as_dir=.
11801    for ac_prog in egrep; do
11802    for ac_exec_ext in '' $ac_executable_extensions; do
11803      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11804      as_fn_executable_p "$ac_path_EGREP" || continue
11805# Check for GNU ac_path_EGREP and select it if it is found.
11806  # Check for GNU $ac_path_EGREP
11807case `"$ac_path_EGREP" --version 2>&1` in
11808*GNU*)
11809  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11810*)
11811  ac_count=0
11812  $as_echo_n 0123456789 >"conftest.in"
11813  while :
11814  do
11815    cat "conftest.in" "conftest.in" >"conftest.tmp"
11816    mv "conftest.tmp" "conftest.in"
11817    cp "conftest.in" "conftest.nl"
11818    $as_echo 'EGREP' >> "conftest.nl"
11819    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11820    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11821    as_fn_arith $ac_count + 1 && ac_count=$as_val
11822    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11823      # Best one so far, save it but keep looking for a better one
11824      ac_cv_path_EGREP="$ac_path_EGREP"
11825      ac_path_EGREP_max=$ac_count
11826    fi
11827    # 10*(2^10) chars as input seems more than enough
11828    test $ac_count -gt 10 && break
11829  done
11830  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11831esac
11832
11833      $ac_path_EGREP_found && break 3
11834    done
11835  done
11836  done
11837IFS=$as_save_IFS
11838  if test -z "$ac_cv_path_EGREP"; then
11839    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11840  fi
11841else
11842  ac_cv_path_EGREP=$EGREP
11843fi
11844
11845   fi
11846fi
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11848$as_echo "$ac_cv_path_EGREP" >&6; }
11849 EGREP="$ac_cv_path_EGREP"
11850
11851
11852  else
11853    # The variable is set, but is it from the command line or the environment?
11854
11855    # Try to remove the string !EGREP! from our list.
11856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11858      # If it failed, the variable was not from the command line. Ignore it,
11859      # but warn the user (except for BASH, which is always set by the calling BASH).
11860      if test "xEGREP" != xBASH; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11862$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11863      fi
11864      # Try to locate tool using the code snippet
11865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11866$as_echo_n "checking for egrep... " >&6; }
11867if ${ac_cv_path_EGREP+:} false; then :
11868  $as_echo_n "(cached) " >&6
11869else
11870  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11871   then ac_cv_path_EGREP="$GREP -E"
11872   else
11873     if test -z "$EGREP"; then
11874  ac_path_EGREP_found=false
11875  # Loop through the user's path and test for each of PROGNAME-LIST
11876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11877for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11878do
11879  IFS=$as_save_IFS
11880  test -z "$as_dir" && as_dir=.
11881    for ac_prog in egrep; do
11882    for ac_exec_ext in '' $ac_executable_extensions; do
11883      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11884      as_fn_executable_p "$ac_path_EGREP" || continue
11885# Check for GNU ac_path_EGREP and select it if it is found.
11886  # Check for GNU $ac_path_EGREP
11887case `"$ac_path_EGREP" --version 2>&1` in
11888*GNU*)
11889  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11890*)
11891  ac_count=0
11892  $as_echo_n 0123456789 >"conftest.in"
11893  while :
11894  do
11895    cat "conftest.in" "conftest.in" >"conftest.tmp"
11896    mv "conftest.tmp" "conftest.in"
11897    cp "conftest.in" "conftest.nl"
11898    $as_echo 'EGREP' >> "conftest.nl"
11899    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11900    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11901    as_fn_arith $ac_count + 1 && ac_count=$as_val
11902    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11903      # Best one so far, save it but keep looking for a better one
11904      ac_cv_path_EGREP="$ac_path_EGREP"
11905      ac_path_EGREP_max=$ac_count
11906    fi
11907    # 10*(2^10) chars as input seems more than enough
11908    test $ac_count -gt 10 && break
11909  done
11910  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11911esac
11912
11913      $ac_path_EGREP_found && break 3
11914    done
11915  done
11916  done
11917IFS=$as_save_IFS
11918  if test -z "$ac_cv_path_EGREP"; then
11919    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11920  fi
11921else
11922  ac_cv_path_EGREP=$EGREP
11923fi
11924
11925   fi
11926fi
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11928$as_echo "$ac_cv_path_EGREP" >&6; }
11929 EGREP="$ac_cv_path_EGREP"
11930
11931
11932    else
11933      # If it succeeded, then it was overridden by the user. We will use it
11934      # for the tool.
11935
11936      # First remove it from the list of overridden variables, so we can test
11937      # for unknown variables in the end.
11938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11939
11940      # Check if the provided tool contains a complete path.
11941      tool_specified="$EGREP"
11942      tool_basename="${tool_specified##*/}"
11943      if test "x$tool_basename" = "x$tool_specified"; then
11944        # A command without a complete path is provided, search $PATH.
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11946$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11947        # Extract the first word of "$tool_basename", so it can be a program name with args.
11948set dummy $tool_basename; ac_word=$2
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
11951if ${ac_cv_path_EGREP+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  case $EGREP in
11955  [\\/]* | ?:[\\/]*)
11956  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11957  ;;
11958  *)
11959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11960for as_dir in $PATH
11961do
11962  IFS=$as_save_IFS
11963  test -z "$as_dir" && as_dir=.
11964    for ac_exec_ext in '' $ac_executable_extensions; do
11965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11966    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11968    break 2
11969  fi
11970done
11971  done
11972IFS=$as_save_IFS
11973
11974  ;;
11975esac
11976fi
11977EGREP=$ac_cv_path_EGREP
11978if test -n "$EGREP"; then
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11980$as_echo "$EGREP" >&6; }
11981else
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11983$as_echo "no" >&6; }
11984fi
11985
11986
11987        if test "x$EGREP" = x; then
11988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11989        fi
11990      else
11991        # Otherwise we believe it is a complete path. Use it as it is.
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11993$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11995$as_echo_n "checking for EGREP... " >&6; }
11996        if test ! -x "$tool_specified"; then
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11998$as_echo "not found" >&6; }
11999          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12000        fi
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12002$as_echo "$tool_specified" >&6; }
12003      fi
12004    fi
12005  fi
12006
12007
12008  if test "x$EGREP" = x; then
12009    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12010  fi
12011
12012
12013
12014
12015  # Publish this variable in the help.
12016
12017
12018  if test "x$FGREP" = x; then
12019    # The variable is not set by user, try to locate tool using the code snippet
12020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12021$as_echo_n "checking for fgrep... " >&6; }
12022if ${ac_cv_path_FGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12026   then ac_cv_path_FGREP="$GREP -F"
12027   else
12028     if test -z "$FGREP"; then
12029  ac_path_FGREP_found=false
12030  # Loop through the user's path and test for each of PROGNAME-LIST
12031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_prog in fgrep; do
12037    for ac_exec_ext in '' $ac_executable_extensions; do
12038      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12039      as_fn_executable_p "$ac_path_FGREP" || continue
12040# Check for GNU ac_path_FGREP and select it if it is found.
12041  # Check for GNU $ac_path_FGREP
12042case `"$ac_path_FGREP" --version 2>&1` in
12043*GNU*)
12044  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12045*)
12046  ac_count=0
12047  $as_echo_n 0123456789 >"conftest.in"
12048  while :
12049  do
12050    cat "conftest.in" "conftest.in" >"conftest.tmp"
12051    mv "conftest.tmp" "conftest.in"
12052    cp "conftest.in" "conftest.nl"
12053    $as_echo 'FGREP' >> "conftest.nl"
12054    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12055    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12056    as_fn_arith $ac_count + 1 && ac_count=$as_val
12057    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12058      # Best one so far, save it but keep looking for a better one
12059      ac_cv_path_FGREP="$ac_path_FGREP"
12060      ac_path_FGREP_max=$ac_count
12061    fi
12062    # 10*(2^10) chars as input seems more than enough
12063    test $ac_count -gt 10 && break
12064  done
12065  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12066esac
12067
12068      $ac_path_FGREP_found && break 3
12069    done
12070  done
12071  done
12072IFS=$as_save_IFS
12073  if test -z "$ac_cv_path_FGREP"; then
12074    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12075  fi
12076else
12077  ac_cv_path_FGREP=$FGREP
12078fi
12079
12080   fi
12081fi
12082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12083$as_echo "$ac_cv_path_FGREP" >&6; }
12084 FGREP="$ac_cv_path_FGREP"
12085
12086
12087  else
12088    # The variable is set, but is it from the command line or the environment?
12089
12090    # Try to remove the string !FGREP! from our list.
12091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12093      # If it failed, the variable was not from the command line. Ignore it,
12094      # but warn the user (except for BASH, which is always set by the calling BASH).
12095      if test "xFGREP" != xBASH; then
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12097$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12098      fi
12099      # Try to locate tool using the code snippet
12100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12101$as_echo_n "checking for fgrep... " >&6; }
12102if ${ac_cv_path_FGREP+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12106   then ac_cv_path_FGREP="$GREP -F"
12107   else
12108     if test -z "$FGREP"; then
12109  ac_path_FGREP_found=false
12110  # Loop through the user's path and test for each of PROGNAME-LIST
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_prog in fgrep; do
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12119      as_fn_executable_p "$ac_path_FGREP" || continue
12120# Check for GNU ac_path_FGREP and select it if it is found.
12121  # Check for GNU $ac_path_FGREP
12122case `"$ac_path_FGREP" --version 2>&1` in
12123*GNU*)
12124  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12125*)
12126  ac_count=0
12127  $as_echo_n 0123456789 >"conftest.in"
12128  while :
12129  do
12130    cat "conftest.in" "conftest.in" >"conftest.tmp"
12131    mv "conftest.tmp" "conftest.in"
12132    cp "conftest.in" "conftest.nl"
12133    $as_echo 'FGREP' >> "conftest.nl"
12134    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12135    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12136    as_fn_arith $ac_count + 1 && ac_count=$as_val
12137    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12138      # Best one so far, save it but keep looking for a better one
12139      ac_cv_path_FGREP="$ac_path_FGREP"
12140      ac_path_FGREP_max=$ac_count
12141    fi
12142    # 10*(2^10) chars as input seems more than enough
12143    test $ac_count -gt 10 && break
12144  done
12145  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12146esac
12147
12148      $ac_path_FGREP_found && break 3
12149    done
12150  done
12151  done
12152IFS=$as_save_IFS
12153  if test -z "$ac_cv_path_FGREP"; then
12154    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12155  fi
12156else
12157  ac_cv_path_FGREP=$FGREP
12158fi
12159
12160   fi
12161fi
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12163$as_echo "$ac_cv_path_FGREP" >&6; }
12164 FGREP="$ac_cv_path_FGREP"
12165
12166
12167    else
12168      # If it succeeded, then it was overridden by the user. We will use it
12169      # for the tool.
12170
12171      # First remove it from the list of overridden variables, so we can test
12172      # for unknown variables in the end.
12173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12174
12175      # Check if the provided tool contains a complete path.
12176      tool_specified="$FGREP"
12177      tool_basename="${tool_specified##*/}"
12178      if test "x$tool_basename" = "x$tool_specified"; then
12179        # A command without a complete path is provided, search $PATH.
12180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12181$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12182        # Extract the first word of "$tool_basename", so it can be a program name with args.
12183set dummy $tool_basename; ac_word=$2
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185$as_echo_n "checking for $ac_word... " >&6; }
12186if ${ac_cv_path_FGREP+:} false; then :
12187  $as_echo_n "(cached) " >&6
12188else
12189  case $FGREP in
12190  [\\/]* | ?:[\\/]*)
12191  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12192  ;;
12193  *)
12194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195for as_dir in $PATH
12196do
12197  IFS=$as_save_IFS
12198  test -z "$as_dir" && as_dir=.
12199    for ac_exec_ext in '' $ac_executable_extensions; do
12200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203    break 2
12204  fi
12205done
12206  done
12207IFS=$as_save_IFS
12208
12209  ;;
12210esac
12211fi
12212FGREP=$ac_cv_path_FGREP
12213if test -n "$FGREP"; then
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12215$as_echo "$FGREP" >&6; }
12216else
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218$as_echo "no" >&6; }
12219fi
12220
12221
12222        if test "x$FGREP" = x; then
12223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12224        fi
12225      else
12226        # Otherwise we believe it is a complete path. Use it as it is.
12227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12228$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12230$as_echo_n "checking for FGREP... " >&6; }
12231        if test ! -x "$tool_specified"; then
12232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12233$as_echo "not found" >&6; }
12234          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12235        fi
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12237$as_echo "$tool_specified" >&6; }
12238      fi
12239    fi
12240  fi
12241
12242
12243  if test "x$FGREP" = x; then
12244    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12245  fi
12246
12247
12248
12249
12250  # Publish this variable in the help.
12251
12252
12253  if test "x$SED" = x; then
12254    # The variable is not set by user, try to locate tool using the code snippet
12255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12256$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12257if ${ac_cv_path_SED+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12261     for ac_i in 1 2 3 4 5 6 7; do
12262       ac_script="$ac_script$as_nl$ac_script"
12263     done
12264     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12265     { ac_script=; unset ac_script;}
12266     if test -z "$SED"; then
12267  ac_path_SED_found=false
12268  # Loop through the user's path and test for each of PROGNAME-LIST
12269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270for as_dir in $PATH
12271do
12272  IFS=$as_save_IFS
12273  test -z "$as_dir" && as_dir=.
12274    for ac_prog in sed gsed; do
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12277      as_fn_executable_p "$ac_path_SED" || continue
12278# Check for GNU ac_path_SED and select it if it is found.
12279  # Check for GNU $ac_path_SED
12280case `"$ac_path_SED" --version 2>&1` in
12281*GNU*)
12282  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12283*)
12284  ac_count=0
12285  $as_echo_n 0123456789 >"conftest.in"
12286  while :
12287  do
12288    cat "conftest.in" "conftest.in" >"conftest.tmp"
12289    mv "conftest.tmp" "conftest.in"
12290    cp "conftest.in" "conftest.nl"
12291    $as_echo '' >> "conftest.nl"
12292    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12293    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12294    as_fn_arith $ac_count + 1 && ac_count=$as_val
12295    if test $ac_count -gt ${ac_path_SED_max-0}; then
12296      # Best one so far, save it but keep looking for a better one
12297      ac_cv_path_SED="$ac_path_SED"
12298      ac_path_SED_max=$ac_count
12299    fi
12300    # 10*(2^10) chars as input seems more than enough
12301    test $ac_count -gt 10 && break
12302  done
12303  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12304esac
12305
12306      $ac_path_SED_found && break 3
12307    done
12308  done
12309  done
12310IFS=$as_save_IFS
12311  if test -z "$ac_cv_path_SED"; then
12312    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12313  fi
12314else
12315  ac_cv_path_SED=$SED
12316fi
12317
12318fi
12319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12320$as_echo "$ac_cv_path_SED" >&6; }
12321 SED="$ac_cv_path_SED"
12322  rm -f conftest.sed
12323
12324  else
12325    # The variable is set, but is it from the command line or the environment?
12326
12327    # Try to remove the string !SED! from our list.
12328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12330      # If it failed, the variable was not from the command line. Ignore it,
12331      # but warn the user (except for BASH, which is always set by the calling BASH).
12332      if test "xSED" != xBASH; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12334$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12335      fi
12336      # Try to locate tool using the code snippet
12337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12338$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12339if ${ac_cv_path_SED+:} false; then :
12340  $as_echo_n "(cached) " >&6
12341else
12342            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12343     for ac_i in 1 2 3 4 5 6 7; do
12344       ac_script="$ac_script$as_nl$ac_script"
12345     done
12346     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12347     { ac_script=; unset ac_script;}
12348     if test -z "$SED"; then
12349  ac_path_SED_found=false
12350  # Loop through the user's path and test for each of PROGNAME-LIST
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_prog in sed gsed; do
12357    for ac_exec_ext in '' $ac_executable_extensions; do
12358      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12359      as_fn_executable_p "$ac_path_SED" || continue
12360# Check for GNU ac_path_SED and select it if it is found.
12361  # Check for GNU $ac_path_SED
12362case `"$ac_path_SED" --version 2>&1` in
12363*GNU*)
12364  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12365*)
12366  ac_count=0
12367  $as_echo_n 0123456789 >"conftest.in"
12368  while :
12369  do
12370    cat "conftest.in" "conftest.in" >"conftest.tmp"
12371    mv "conftest.tmp" "conftest.in"
12372    cp "conftest.in" "conftest.nl"
12373    $as_echo '' >> "conftest.nl"
12374    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12375    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12376    as_fn_arith $ac_count + 1 && ac_count=$as_val
12377    if test $ac_count -gt ${ac_path_SED_max-0}; then
12378      # Best one so far, save it but keep looking for a better one
12379      ac_cv_path_SED="$ac_path_SED"
12380      ac_path_SED_max=$ac_count
12381    fi
12382    # 10*(2^10) chars as input seems more than enough
12383    test $ac_count -gt 10 && break
12384  done
12385  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12386esac
12387
12388      $ac_path_SED_found && break 3
12389    done
12390  done
12391  done
12392IFS=$as_save_IFS
12393  if test -z "$ac_cv_path_SED"; then
12394    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12395  fi
12396else
12397  ac_cv_path_SED=$SED
12398fi
12399
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12402$as_echo "$ac_cv_path_SED" >&6; }
12403 SED="$ac_cv_path_SED"
12404  rm -f conftest.sed
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if the provided tool contains a complete path.
12415      tool_specified="$SED"
12416      tool_basename="${tool_specified##*/}"
12417      if test "x$tool_basename" = "x$tool_specified"; then
12418        # A command without a complete path is provided, search $PATH.
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12420$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12421        # Extract the first word of "$tool_basename", so it can be a program name with args.
12422set dummy $tool_basename; ac_word=$2
12423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12424$as_echo_n "checking for $ac_word... " >&6; }
12425if ${ac_cv_path_SED+:} false; then :
12426  $as_echo_n "(cached) " >&6
12427else
12428  case $SED in
12429  [\\/]* | ?:[\\/]*)
12430  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12431  ;;
12432  *)
12433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12434for as_dir in $PATH
12435do
12436  IFS=$as_save_IFS
12437  test -z "$as_dir" && as_dir=.
12438    for ac_exec_ext in '' $ac_executable_extensions; do
12439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12440    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12442    break 2
12443  fi
12444done
12445  done
12446IFS=$as_save_IFS
12447
12448  ;;
12449esac
12450fi
12451SED=$ac_cv_path_SED
12452if test -n "$SED"; then
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12454$as_echo "$SED" >&6; }
12455else
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12457$as_echo "no" >&6; }
12458fi
12459
12460
12461        if test "x$SED" = x; then
12462          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12463        fi
12464      else
12465        # Otherwise we believe it is a complete path. Use it as it is.
12466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12467$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12469$as_echo_n "checking for SED... " >&6; }
12470        if test ! -x "$tool_specified"; then
12471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12472$as_echo "not found" >&6; }
12473          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12474        fi
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12476$as_echo "$tool_specified" >&6; }
12477      fi
12478    fi
12479  fi
12480
12481
12482  if test "x$SED" = x; then
12483    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12484  fi
12485
12486
12487
12488  # Always force rm.
12489  RM="$RM -f"
12490
12491  # pwd behaves differently on various platforms and some don't support the -L flag.
12492  # Always use the bash builtin pwd to get uniform behavior.
12493  THEPWDCMD=pwd
12494
12495  # These are not required on all platforms
12496
12497
12498  # Publish this variable in the help.
12499
12500
12501  if test "x$CYGPATH" = x; then
12502    # The variable is not set by user, try to locate tool using the code snippet
12503    for ac_prog in cygpath
12504do
12505  # Extract the first word of "$ac_prog", so it can be a program name with args.
12506set dummy $ac_prog; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_path_CYGPATH+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  case $CYGPATH in
12513  [\\/]* | ?:[\\/]*)
12514  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12515  ;;
12516  *)
12517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12518for as_dir in $PATH
12519do
12520  IFS=$as_save_IFS
12521  test -z "$as_dir" && as_dir=.
12522    for ac_exec_ext in '' $ac_executable_extensions; do
12523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12524    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12526    break 2
12527  fi
12528done
12529  done
12530IFS=$as_save_IFS
12531
12532  ;;
12533esac
12534fi
12535CYGPATH=$ac_cv_path_CYGPATH
12536if test -n "$CYGPATH"; then
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12538$as_echo "$CYGPATH" >&6; }
12539else
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
12542fi
12543
12544
12545  test -n "$CYGPATH" && break
12546done
12547
12548  else
12549    # The variable is set, but is it from the command line or the environment?
12550
12551    # Try to remove the string !CYGPATH! from our list.
12552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12554      # If it failed, the variable was not from the command line. Ignore it,
12555      # but warn the user (except for BASH, which is always set by the calling BASH).
12556      if test "xCYGPATH" != xBASH; then
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12558$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12559      fi
12560      # Try to locate tool using the code snippet
12561      for ac_prog in cygpath
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_CYGPATH+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $CYGPATH in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593CYGPATH=$ac_cv_path_CYGPATH
12594if test -n "$CYGPATH"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12596$as_echo "$CYGPATH" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$CYGPATH" && break
12604done
12605
12606    else
12607      # If it succeeded, then it was overridden by the user. We will use it
12608      # for the tool.
12609
12610      # First remove it from the list of overridden variables, so we can test
12611      # for unknown variables in the end.
12612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12613
12614      # Check if the provided tool contains a complete path.
12615      tool_specified="$CYGPATH"
12616      tool_basename="${tool_specified##*/}"
12617      if test "x$tool_basename" = "x$tool_specified"; then
12618        # A command without a complete path is provided, search $PATH.
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12620$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12621        # Extract the first word of "$tool_basename", so it can be a program name with args.
12622set dummy $tool_basename; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_CYGPATH+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $CYGPATH in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651CYGPATH=$ac_cv_path_CYGPATH
12652if test -n "$CYGPATH"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12654$as_echo "$CYGPATH" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661        if test "x$CYGPATH" = x; then
12662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12663        fi
12664      else
12665        # Otherwise we believe it is a complete path. Use it as it is.
12666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12667$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12669$as_echo_n "checking for CYGPATH... " >&6; }
12670        if test ! -x "$tool_specified"; then
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12672$as_echo "not found" >&6; }
12673          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12674        fi
12675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12676$as_echo "$tool_specified" >&6; }
12677      fi
12678    fi
12679  fi
12680
12681
12682
12683
12684  # Publish this variable in the help.
12685
12686
12687  if test "x$READLINK" = x; then
12688    # The variable is not set by user, try to locate tool using the code snippet
12689    for ac_prog in greadlink readlink
12690do
12691  # Extract the first word of "$ac_prog", so it can be a program name with args.
12692set dummy $ac_prog; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_READLINK+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $READLINK in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721READLINK=$ac_cv_path_READLINK
12722if test -n "$READLINK"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12724$as_echo "$READLINK" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731  test -n "$READLINK" && break
12732done
12733
12734  else
12735    # The variable is set, but is it from the command line or the environment?
12736
12737    # Try to remove the string !READLINK! from our list.
12738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12740      # If it failed, the variable was not from the command line. Ignore it,
12741      # but warn the user (except for BASH, which is always set by the calling BASH).
12742      if test "xREADLINK" != xBASH; then
12743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12744$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12745      fi
12746      # Try to locate tool using the code snippet
12747      for ac_prog in greadlink readlink
12748do
12749  # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12752$as_echo_n "checking for $ac_word... " >&6; }
12753if ${ac_cv_path_READLINK+:} false; then :
12754  $as_echo_n "(cached) " >&6
12755else
12756  case $READLINK in
12757  [\\/]* | ?:[\\/]*)
12758  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12759  ;;
12760  *)
12761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776  ;;
12777esac
12778fi
12779READLINK=$ac_cv_path_READLINK
12780if test -n "$READLINK"; then
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12782$as_echo "$READLINK" >&6; }
12783else
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786fi
12787
12788
12789  test -n "$READLINK" && break
12790done
12791
12792    else
12793      # If it succeeded, then it was overridden by the user. We will use it
12794      # for the tool.
12795
12796      # First remove it from the list of overridden variables, so we can test
12797      # for unknown variables in the end.
12798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12799
12800      # Check if the provided tool contains a complete path.
12801      tool_specified="$READLINK"
12802      tool_basename="${tool_specified##*/}"
12803      if test "x$tool_basename" = "x$tool_specified"; then
12804        # A command without a complete path is provided, search $PATH.
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12806$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12807        # Extract the first word of "$tool_basename", so it can be a program name with args.
12808set dummy $tool_basename; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_READLINK+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $READLINK in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837READLINK=$ac_cv_path_READLINK
12838if test -n "$READLINK"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12840$as_echo "$READLINK" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847        if test "x$READLINK" = x; then
12848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12849        fi
12850      else
12851        # Otherwise we believe it is a complete path. Use it as it is.
12852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12853$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12855$as_echo_n "checking for READLINK... " >&6; }
12856        if test ! -x "$tool_specified"; then
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12858$as_echo "not found" >&6; }
12859          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12860        fi
12861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12862$as_echo "$tool_specified" >&6; }
12863      fi
12864    fi
12865  fi
12866
12867
12868
12869
12870  # Publish this variable in the help.
12871
12872
12873  if test "x$DF" = x; then
12874    # The variable is not set by user, try to locate tool using the code snippet
12875    for ac_prog in df
12876do
12877  # Extract the first word of "$ac_prog", so it can be a program name with args.
12878set dummy $ac_prog; ac_word=$2
12879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12880$as_echo_n "checking for $ac_word... " >&6; }
12881if ${ac_cv_path_DF+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884  case $DF in
12885  [\\/]* | ?:[\\/]*)
12886  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12887  ;;
12888  *)
12889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12890for as_dir in $PATH
12891do
12892  IFS=$as_save_IFS
12893  test -z "$as_dir" && as_dir=.
12894    for ac_exec_ext in '' $ac_executable_extensions; do
12895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12896    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12898    break 2
12899  fi
12900done
12901  done
12902IFS=$as_save_IFS
12903
12904  ;;
12905esac
12906fi
12907DF=$ac_cv_path_DF
12908if test -n "$DF"; then
12909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12910$as_echo "$DF" >&6; }
12911else
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12913$as_echo "no" >&6; }
12914fi
12915
12916
12917  test -n "$DF" && break
12918done
12919
12920  else
12921    # The variable is set, but is it from the command line or the environment?
12922
12923    # Try to remove the string !DF! from our list.
12924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12926      # If it failed, the variable was not from the command line. Ignore it,
12927      # but warn the user (except for BASH, which is always set by the calling BASH).
12928      if test "xDF" != xBASH; then
12929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12930$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12931      fi
12932      # Try to locate tool using the code snippet
12933      for ac_prog in df
12934do
12935  # Extract the first word of "$ac_prog", so it can be a program name with args.
12936set dummy $ac_prog; ac_word=$2
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12938$as_echo_n "checking for $ac_word... " >&6; }
12939if ${ac_cv_path_DF+:} false; then :
12940  $as_echo_n "(cached) " >&6
12941else
12942  case $DF in
12943  [\\/]* | ?:[\\/]*)
12944  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12945  ;;
12946  *)
12947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12948for as_dir in $PATH
12949do
12950  IFS=$as_save_IFS
12951  test -z "$as_dir" && as_dir=.
12952    for ac_exec_ext in '' $ac_executable_extensions; do
12953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12954    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12956    break 2
12957  fi
12958done
12959  done
12960IFS=$as_save_IFS
12961
12962  ;;
12963esac
12964fi
12965DF=$ac_cv_path_DF
12966if test -n "$DF"; then
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12968$as_echo "$DF" >&6; }
12969else
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12971$as_echo "no" >&6; }
12972fi
12973
12974
12975  test -n "$DF" && break
12976done
12977
12978    else
12979      # If it succeeded, then it was overridden by the user. We will use it
12980      # for the tool.
12981
12982      # First remove it from the list of overridden variables, so we can test
12983      # for unknown variables in the end.
12984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12985
12986      # Check if the provided tool contains a complete path.
12987      tool_specified="$DF"
12988      tool_basename="${tool_specified##*/}"
12989      if test "x$tool_basename" = "x$tool_specified"; then
12990        # A command without a complete path is provided, search $PATH.
12991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12992$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12993        # Extract the first word of "$tool_basename", so it can be a program name with args.
12994set dummy $tool_basename; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_DF+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $DF in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023DF=$ac_cv_path_DF
13024if test -n "$DF"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13026$as_echo "$DF" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033        if test "x$DF" = x; then
13034          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13035        fi
13036      else
13037        # Otherwise we believe it is a complete path. Use it as it is.
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13039$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13041$as_echo_n "checking for DF... " >&6; }
13042        if test ! -x "$tool_specified"; then
13043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13044$as_echo "not found" >&6; }
13045          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13046        fi
13047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13048$as_echo "$tool_specified" >&6; }
13049      fi
13050    fi
13051  fi
13052
13053
13054
13055
13056  # Publish this variable in the help.
13057
13058
13059  if test "x$CPIO" = x; then
13060    # The variable is not set by user, try to locate tool using the code snippet
13061    for ac_prog in cpio bsdcpio
13062do
13063  # Extract the first word of "$ac_prog", so it can be a program name with args.
13064set dummy $ac_prog; ac_word=$2
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13066$as_echo_n "checking for $ac_word... " >&6; }
13067if ${ac_cv_path_CPIO+:} false; then :
13068  $as_echo_n "(cached) " >&6
13069else
13070  case $CPIO in
13071  [\\/]* | ?:[\\/]*)
13072  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13073  ;;
13074  *)
13075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13076for as_dir in $PATH
13077do
13078  IFS=$as_save_IFS
13079  test -z "$as_dir" && as_dir=.
13080    for ac_exec_ext in '' $ac_executable_extensions; do
13081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13082    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13084    break 2
13085  fi
13086done
13087  done
13088IFS=$as_save_IFS
13089
13090  ;;
13091esac
13092fi
13093CPIO=$ac_cv_path_CPIO
13094if test -n "$CPIO"; then
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13096$as_echo "$CPIO" >&6; }
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
13100fi
13101
13102
13103  test -n "$CPIO" && break
13104done
13105
13106  else
13107    # The variable is set, but is it from the command line or the environment?
13108
13109    # Try to remove the string !CPIO! from our list.
13110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13112      # If it failed, the variable was not from the command line. Ignore it,
13113      # but warn the user (except for BASH, which is always set by the calling BASH).
13114      if test "xCPIO" != xBASH; then
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13116$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13117      fi
13118      # Try to locate tool using the code snippet
13119      for ac_prog in cpio bsdcpio
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_path_CPIO+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  case $CPIO in
13129  [\\/]* | ?:[\\/]*)
13130  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13131  ;;
13132  *)
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148  ;;
13149esac
13150fi
13151CPIO=$ac_cv_path_CPIO
13152if test -n "$CPIO"; then
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13154$as_echo "$CPIO" >&6; }
13155else
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13157$as_echo "no" >&6; }
13158fi
13159
13160
13161  test -n "$CPIO" && break
13162done
13163
13164    else
13165      # If it succeeded, then it was overridden by the user. We will use it
13166      # for the tool.
13167
13168      # First remove it from the list of overridden variables, so we can test
13169      # for unknown variables in the end.
13170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13171
13172      # Check if the provided tool contains a complete path.
13173      tool_specified="$CPIO"
13174      tool_basename="${tool_specified##*/}"
13175      if test "x$tool_basename" = "x$tool_specified"; then
13176        # A command without a complete path is provided, search $PATH.
13177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13178$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13179        # Extract the first word of "$tool_basename", so it can be a program name with args.
13180set dummy $tool_basename; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_path_CPIO+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  case $CPIO in
13187  [\\/]* | ?:[\\/]*)
13188  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13189  ;;
13190  *)
13191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13192for as_dir in $PATH
13193do
13194  IFS=$as_save_IFS
13195  test -z "$as_dir" && as_dir=.
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13198    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13200    break 2
13201  fi
13202done
13203  done
13204IFS=$as_save_IFS
13205
13206  ;;
13207esac
13208fi
13209CPIO=$ac_cv_path_CPIO
13210if test -n "$CPIO"; then
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13212$as_echo "$CPIO" >&6; }
13213else
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
13216fi
13217
13218
13219        if test "x$CPIO" = x; then
13220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13221        fi
13222      else
13223        # Otherwise we believe it is a complete path. Use it as it is.
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13225$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13227$as_echo_n "checking for CPIO... " >&6; }
13228        if test ! -x "$tool_specified"; then
13229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13230$as_echo "not found" >&6; }
13231          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13232        fi
13233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13234$as_echo "$tool_specified" >&6; }
13235      fi
13236    fi
13237  fi
13238
13239
13240
13241
13242# Now we can determine OpenJDK build and target platforms. This is required to
13243# have early on.
13244# Make sure we can run config.sub.
13245$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13246  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13247
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13249$as_echo_n "checking build system type... " >&6; }
13250if ${ac_cv_build+:} false; then :
13251  $as_echo_n "(cached) " >&6
13252else
13253  ac_build_alias=$build_alias
13254test "x$ac_build_alias" = x &&
13255  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13256test "x$ac_build_alias" = x &&
13257  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13258ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13259  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13260
13261fi
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13263$as_echo "$ac_cv_build" >&6; }
13264case $ac_cv_build in
13265*-*-*) ;;
13266*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13267esac
13268build=$ac_cv_build
13269ac_save_IFS=$IFS; IFS='-'
13270set x $ac_cv_build
13271shift
13272build_cpu=$1
13273build_vendor=$2
13274shift; shift
13275# Remember, the first character of IFS is used to create $*,
13276# except with old shells:
13277build_os=$*
13278IFS=$ac_save_IFS
13279case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13280
13281
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13283$as_echo_n "checking host system type... " >&6; }
13284if ${ac_cv_host+:} false; then :
13285  $as_echo_n "(cached) " >&6
13286else
13287  if test "x$host_alias" = x; then
13288  ac_cv_host=$ac_cv_build
13289else
13290  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13291    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13292fi
13293
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13296$as_echo "$ac_cv_host" >&6; }
13297case $ac_cv_host in
13298*-*-*) ;;
13299*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13300esac
13301host=$ac_cv_host
13302ac_save_IFS=$IFS; IFS='-'
13303set x $ac_cv_host
13304shift
13305host_cpu=$1
13306host_vendor=$2
13307shift; shift
13308# Remember, the first character of IFS is used to create $*,
13309# except with old shells:
13310host_os=$*
13311IFS=$ac_save_IFS
13312case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13313
13314
13315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13316$as_echo_n "checking target system type... " >&6; }
13317if ${ac_cv_target+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test "x$target_alias" = x; then
13321  ac_cv_target=$ac_cv_host
13322else
13323  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13324    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13325fi
13326
13327fi
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13329$as_echo "$ac_cv_target" >&6; }
13330case $ac_cv_target in
13331*-*-*) ;;
13332*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13333esac
13334target=$ac_cv_target
13335ac_save_IFS=$IFS; IFS='-'
13336set x $ac_cv_target
13337shift
13338target_cpu=$1
13339target_vendor=$2
13340shift; shift
13341# Remember, the first character of IFS is used to create $*,
13342# except with old shells:
13343target_os=$*
13344IFS=$ac_save_IFS
13345case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13346
13347
13348# The aliases save the names the user supplied, while $host etc.
13349# will get canonicalized.
13350test -n "$target_alias" &&
13351  test "$program_prefix$program_suffix$program_transform_name" = \
13352    NONENONEs,x,x, &&
13353  program_prefix=${target_alias}-
13354
13355  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13356  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13357  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13358  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13359  # to use the configure naming style.
13360
13361
13362
13363
13364
13365  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13366  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13367  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13368  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13369  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13370  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13371
13372
13373
13374  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13375
13376  case "$build_os" in
13377    *linux*)
13378      VAR_OS=linux
13379      VAR_OS_TYPE=unix
13380      ;;
13381    *solaris*)
13382      VAR_OS=solaris
13383      VAR_OS_TYPE=unix
13384      ;;
13385    *darwin*)
13386      VAR_OS=macosx
13387      VAR_OS_TYPE=unix
13388      ;;
13389    *bsd*)
13390      VAR_OS=bsd
13391      VAR_OS_TYPE=unix
13392      ;;
13393    *cygwin*)
13394      VAR_OS=windows
13395      VAR_OS_ENV=windows.cygwin
13396      ;;
13397    *mingw*)
13398      VAR_OS=windows
13399      VAR_OS_ENV=windows.msys
13400      ;;
13401    *aix*)
13402      VAR_OS=aix
13403      VAR_OS_TYPE=unix
13404      ;;
13405    *)
13406      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13407      ;;
13408  esac
13409
13410
13411  # First argument is the cpu name from the trip/quad
13412  case "$build_cpu" in
13413    x86_64)
13414      VAR_CPU=x86_64
13415      VAR_CPU_ARCH=x86
13416      VAR_CPU_BITS=64
13417      VAR_CPU_ENDIAN=little
13418      ;;
13419    i?86)
13420      VAR_CPU=x86
13421      VAR_CPU_ARCH=x86
13422      VAR_CPU_BITS=32
13423      VAR_CPU_ENDIAN=little
13424      ;;
13425    arm*)
13426      VAR_CPU=arm
13427      VAR_CPU_ARCH=arm
13428      VAR_CPU_BITS=32
13429      VAR_CPU_ENDIAN=little
13430      ;;
13431    aarch64)
13432      VAR_CPU=aarch64
13433      VAR_CPU_ARCH=aarch64
13434      VAR_CPU_BITS=64
13435      VAR_CPU_ENDIAN=little
13436      ;;
13437    powerpc)
13438      VAR_CPU=ppc
13439      VAR_CPU_ARCH=ppc
13440      VAR_CPU_BITS=32
13441      VAR_CPU_ENDIAN=big
13442      ;;
13443    powerpc64)
13444      VAR_CPU=ppc64
13445      VAR_CPU_ARCH=ppc
13446      VAR_CPU_BITS=64
13447      VAR_CPU_ENDIAN=big
13448      ;;
13449    powerpc64le)
13450      VAR_CPU=ppc64
13451      VAR_CPU_ARCH=ppc
13452      VAR_CPU_BITS=64
13453      VAR_CPU_ENDIAN=little
13454      ;;
13455    s390)
13456      VAR_CPU=s390
13457      VAR_CPU_ARCH=s390
13458      VAR_CPU_BITS=32
13459      VAR_CPU_ENDIAN=big
13460      ;;
13461    s390x)
13462      VAR_CPU=s390x
13463      VAR_CPU_ARCH=s390
13464      VAR_CPU_BITS=64
13465      VAR_CPU_ENDIAN=big
13466      ;;
13467    sparc)
13468      VAR_CPU=sparc
13469      VAR_CPU_ARCH=sparc
13470      VAR_CPU_BITS=32
13471      VAR_CPU_ENDIAN=big
13472      ;;
13473    sparcv9|sparc64)
13474      VAR_CPU=sparcv9
13475      VAR_CPU_ARCH=sparc
13476      VAR_CPU_BITS=64
13477      VAR_CPU_ENDIAN=big
13478      ;;
13479    *)
13480      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13481      ;;
13482  esac
13483
13484  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13485  OPENJDK_BUILD_OS="$VAR_OS"
13486  if test "x$VAR_OS_TYPE" != x; then
13487    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13488  else
13489    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13490  fi
13491  if test "x$VAR_OS_ENV" != x; then
13492    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13493  else
13494    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13495  fi
13496  OPENJDK_BUILD_CPU="$VAR_CPU"
13497  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13498  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13499  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13500
13501
13502
13503
13504
13505
13506
13507
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13509$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13511$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13512
13513  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13514
13515  case "$host_os" in
13516    *linux*)
13517      VAR_OS=linux
13518      VAR_OS_TYPE=unix
13519      ;;
13520    *solaris*)
13521      VAR_OS=solaris
13522      VAR_OS_TYPE=unix
13523      ;;
13524    *darwin*)
13525      VAR_OS=macosx
13526      VAR_OS_TYPE=unix
13527      ;;
13528    *bsd*)
13529      VAR_OS=bsd
13530      VAR_OS_TYPE=unix
13531      ;;
13532    *cygwin*)
13533      VAR_OS=windows
13534      VAR_OS_ENV=windows.cygwin
13535      ;;
13536    *mingw*)
13537      VAR_OS=windows
13538      VAR_OS_ENV=windows.msys
13539      ;;
13540    *aix*)
13541      VAR_OS=aix
13542      VAR_OS_TYPE=unix
13543      ;;
13544    *)
13545      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13546      ;;
13547  esac
13548
13549
13550  # First argument is the cpu name from the trip/quad
13551  case "$host_cpu" in
13552    x86_64)
13553      VAR_CPU=x86_64
13554      VAR_CPU_ARCH=x86
13555      VAR_CPU_BITS=64
13556      VAR_CPU_ENDIAN=little
13557      ;;
13558    i?86)
13559      VAR_CPU=x86
13560      VAR_CPU_ARCH=x86
13561      VAR_CPU_BITS=32
13562      VAR_CPU_ENDIAN=little
13563      ;;
13564    arm*)
13565      VAR_CPU=arm
13566      VAR_CPU_ARCH=arm
13567      VAR_CPU_BITS=32
13568      VAR_CPU_ENDIAN=little
13569      ;;
13570    aarch64)
13571      VAR_CPU=aarch64
13572      VAR_CPU_ARCH=aarch64
13573      VAR_CPU_BITS=64
13574      VAR_CPU_ENDIAN=little
13575      ;;
13576    powerpc)
13577      VAR_CPU=ppc
13578      VAR_CPU_ARCH=ppc
13579      VAR_CPU_BITS=32
13580      VAR_CPU_ENDIAN=big
13581      ;;
13582    powerpc64)
13583      VAR_CPU=ppc64
13584      VAR_CPU_ARCH=ppc
13585      VAR_CPU_BITS=64
13586      VAR_CPU_ENDIAN=big
13587      ;;
13588    powerpc64le)
13589      VAR_CPU=ppc64
13590      VAR_CPU_ARCH=ppc
13591      VAR_CPU_BITS=64
13592      VAR_CPU_ENDIAN=little
13593      ;;
13594    s390)
13595      VAR_CPU=s390
13596      VAR_CPU_ARCH=s390
13597      VAR_CPU_BITS=32
13598      VAR_CPU_ENDIAN=big
13599      ;;
13600    s390x)
13601      VAR_CPU=s390x
13602      VAR_CPU_ARCH=s390
13603      VAR_CPU_BITS=64
13604      VAR_CPU_ENDIAN=big
13605      ;;
13606    sparc)
13607      VAR_CPU=sparc
13608      VAR_CPU_ARCH=sparc
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=big
13611      ;;
13612    sparcv9|sparc64)
13613      VAR_CPU=sparcv9
13614      VAR_CPU_ARCH=sparc
13615      VAR_CPU_BITS=64
13616      VAR_CPU_ENDIAN=big
13617      ;;
13618    *)
13619      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13620      ;;
13621  esac
13622
13623  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13624  OPENJDK_TARGET_OS="$VAR_OS"
13625  if test "x$VAR_OS_TYPE" != x; then
13626    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13627  else
13628    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13629  fi
13630  if test "x$VAR_OS_ENV" != x; then
13631    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13632  else
13633    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13634  fi
13635  OPENJDK_TARGET_CPU="$VAR_CPU"
13636  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13637  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13638  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13639
13640
13641
13642
13643
13644
13645
13646
13647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13648$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13650$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13651
13652
13653
13654# Check whether --with-target-bits was given.
13655if test "${with_target_bits+set}" = set; then :
13656  withval=$with_target_bits;
13657fi
13658
13659
13660  # We have three types of compiles:
13661  # native  == normal compilation, target system == build system
13662  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13663  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13664  #
13665  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13666    # We're doing a proper cross-compilation
13667    COMPILE_TYPE="cross"
13668  else
13669    COMPILE_TYPE="native"
13670  fi
13671
13672  if test "x$with_target_bits" != x; then
13673    if test "x$COMPILE_TYPE" = "xcross"; then
13674      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13675    fi
13676
13677    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13678      # A reduced build is requested
13679      COMPILE_TYPE="reduced"
13680      OPENJDK_TARGET_CPU_BITS=32
13681      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13682        OPENJDK_TARGET_CPU=x86
13683      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13684        OPENJDK_TARGET_CPU=sparc
13685      else
13686        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13687      fi
13688    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13689      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
13690    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13692$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13693    else
13694      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13695    fi
13696  fi
13697
13698
13699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13700$as_echo_n "checking compilation type... " >&6; }
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13702$as_echo "$COMPILE_TYPE" >&6; }
13703
13704
13705  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13706    REQUIRED_OS_NAME=SunOS
13707    REQUIRED_OS_VERSION=5.10
13708  fi
13709  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13710    REQUIRED_OS_NAME=Linux
13711    REQUIRED_OS_VERSION=2.6
13712  fi
13713  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13714    REQUIRED_OS_NAME=Windows
13715    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13716      REQUIRED_OS_VERSION=5.2
13717    else
13718      REQUIRED_OS_VERSION=5.1
13719    fi
13720  fi
13721  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13722    REQUIRED_OS_NAME=Darwin
13723    REQUIRED_OS_VERSION=11.2
13724  fi
13725
13726
13727
13728
13729
13730  # Also store the legacy naming of the cpu.
13731  # Ie i586 and amd64 instead of x86 and x86_64
13732  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13733  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13734    OPENJDK_TARGET_CPU_LEGACY="i586"
13735  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13736    # On all platforms except MacOSX replace x86_64 with amd64.
13737    OPENJDK_TARGET_CPU_LEGACY="amd64"
13738  fi
13739
13740
13741  # And the second legacy naming of the cpu.
13742  # Ie i386 and amd64 instead of x86 and x86_64.
13743  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13744  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13745    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13746  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13747    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13748  fi
13749
13750
13751  # This is the name of the cpu (but using i386 and amd64 instead of
13752  # x86 and x86_64, respectively), preceeded by a /, to be used when
13753  # locating libraries. On macosx, it's empty, though.
13754  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13756    OPENJDK_TARGET_CPU_LIBDIR=""
13757  fi
13758
13759
13760  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13761  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13762  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13763  OPENJDK_TARGET_CPU_ISADIR=""
13764  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13765    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13766      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13767    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13768      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13769    fi
13770  fi
13771
13772
13773  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13774  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13775  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13776    # On linux only, we replace x86 with i386.
13777    OPENJDK_TARGET_CPU_OSARCH="i386"
13778  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779    # On all platforms except macosx, we replace x86_64 with amd64.
13780    OPENJDK_TARGET_CPU_OSARCH="amd64"
13781  fi
13782
13783
13784  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13785  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13786    OPENJDK_TARGET_CPU_JLI="i386"
13787  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13788    # On all platforms except macosx, we replace x86_64 with amd64.
13789    OPENJDK_TARGET_CPU_JLI="amd64"
13790  fi
13791  # Now setup the -D flags for building libjli.
13792  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13793  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13794    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13795      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13796    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13797      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13798    fi
13799  fi
13800
13801
13802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13803      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13804  else
13805      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13806  fi
13807
13808
13809  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13810    A_LP64="LP64:="
13811    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13812    # unpack200.exe
13813    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13814      ADD_LP64="-D_LP64=1"
13815    fi
13816  fi
13817  LP64=$A_LP64
13818
13819
13820  if test "x$COMPILE_TYPE" = "xcross"; then
13821    # FIXME: ... or should this include reduced builds..?
13822    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13823  else
13824    DEFINE_CROSS_COMPILE_ARCH=""
13825  fi
13826
13827
13828  # ZERO_ARCHDEF is used to enable architecture-specific code
13829  case "${OPENJDK_TARGET_CPU}" in
13830    ppc)     ZERO_ARCHDEF=PPC32 ;;
13831    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13832    s390*)   ZERO_ARCHDEF=S390  ;;
13833    sparc*)  ZERO_ARCHDEF=SPARC ;;
13834    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13835    x86)     ZERO_ARCHDEF=IA32  ;;
13836    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13837  esac
13838
13839
13840
13841
13842# Continue setting up basic stuff. Most remaining code require fundamental tools.
13843
13844  # Save the current directory this script was started from
13845  CURDIR="$PWD"
13846
13847  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
13848  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
13849  # was not available at that time.
13850  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
13851  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
13852    ORIGINAL_PATH="$REWRITTEN_PATH"
13853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
13854$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
13855  fi
13856
13857  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13858    PATH_SEP=";"
13859
13860  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13861  if test $SRC_ROOT_LENGTH -gt 100; then
13862    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13863  fi
13864
13865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13867$as_echo_n "checking cygwin release... " >&6; }
13868    CYGWIN_VERSION=`$UNAME -r`
13869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13870$as_echo "$CYGWIN_VERSION" >&6; }
13871    WINDOWS_ENV_VENDOR='cygwin'
13872    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13873
13874    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13875    if test "x$CYGWIN_VERSION_OLD" != x; then
13876      { $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
13877$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;}
13878      as_fn_error $? "Cannot continue" "$LINENO" 5
13879    fi
13880    if test "x$CYGPATH" = x; then
13881      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13882    fi
13883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13884$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13885    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13886    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13887    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13888    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13890$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13891    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13892    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13893    if test "x$test_cygdrive_prefix" = x; then
13894      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13895    fi
13896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13898$as_echo_n "checking msys release... " >&6; }
13899    MSYS_VERSION=`$UNAME -r`
13900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13901$as_echo "$MSYS_VERSION" >&6; }
13902
13903    WINDOWS_ENV_VENDOR='msys'
13904    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13905
13906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13907$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13908    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13909    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13910
13911  windows_path="$MSYS_ROOT_PATH"
13912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13913    unix_path=`$CYGPATH -u "$windows_path"`
13914    MSYS_ROOT_PATH="$unix_path"
13915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13917    MSYS_ROOT_PATH="$unix_path"
13918  fi
13919
13920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13921$as_echo "$MSYS_ROOT_PATH" >&6; }
13922    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13923  else
13924    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13925  fi
13926
13927  # Test if windows or unix (cygwin/msys) find is first in path.
13928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13929$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13930  FIND_BINARY_OUTPUT=`find --version 2>&1`
13931  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13933$as_echo "unix style" >&6; }
13934  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13936$as_echo "Windows" >&6; }
13937    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13938$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13939    { $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
13940$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13941    as_fn_error $? "Cannot continue" "$LINENO" 5
13942  else
13943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13944$as_echo "unknown" >&6; }
13945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13946$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13947  fi
13948
13949  else
13950    PATH_SEP=":"
13951  fi
13952
13953
13954  # We get the top-level directory from the supporting wrappers.
13955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13956$as_echo_n "checking for top-level directory... " >&6; }
13957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13958$as_echo "$TOPDIR" >&6; }
13959
13960
13961  # Save the original version of TOPDIR for string comparisons
13962  ORIGINAL_TOPDIR="$TOPDIR"
13963
13964
13965  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13966
13967  # Only process if variable expands to non-empty
13968
13969  if test "x$CURDIR" != x; then
13970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13971
13972  # Input might be given as Windows format, start by converting to
13973  # unix format.
13974  path="$CURDIR"
13975  new_path=`$CYGPATH -u "$path"`
13976
13977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13980  # "foo.exe" is OK but "foo" is an error.
13981  #
13982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13983  # It is also a way to make sure we got the proper file name for the real test later on.
13984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13985  if test "x$test_shortpath" = x; then
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13987$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13988    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13989  fi
13990
13991  # Call helper function which possibly converts this using DOS-style short mode.
13992  # If so, the updated path is stored in $new_path.
13993
13994  input_path="$new_path"
13995  # Check if we need to convert this using DOS-style short mode. If the path
13996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13997  # take no chances and rewrite it.
13998  # Note: m4 eats our [], so we need to use [ and ] instead.
13999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14000  if test "x$has_forbidden_chars" != x; then
14001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14005      # Going to short mode and back again did indeed matter. Since short mode is
14006      # case insensitive, let's make it lowercase to improve readability.
14007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14008      # Now convert it back to Unix-style (cygpath)
14009      input_path=`$CYGPATH -u "$shortmode_path"`
14010      new_path="$input_path"
14011    fi
14012  fi
14013
14014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14015  if test "x$test_cygdrive_prefix" = x; then
14016    # As a simple fix, exclude /usr/bin since it's not a real path.
14017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14019      # a path prefixed by /cygdrive for fixpath to work.
14020      new_path="$CYGWIN_ROOT_PATH$input_path"
14021    fi
14022  fi
14023
14024
14025  if test "x$path" != "x$new_path"; then
14026    CURDIR="$new_path"
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14028$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14029  fi
14030
14031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14032
14033  path="$CURDIR"
14034  has_colon=`$ECHO $path | $GREP ^.:`
14035  new_path="$path"
14036  if test "x$has_colon" = x; then
14037    # Not in mixed or Windows style, start by that.
14038    new_path=`cmd //c echo $path`
14039  fi
14040
14041
14042  input_path="$new_path"
14043  # Check if we need to convert this using DOS-style short mode. If the path
14044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14045  # take no chances and rewrite it.
14046  # Note: m4 eats our [], so we need to use [ and ] instead.
14047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14048  if test "x$has_forbidden_chars" != x; then
14049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14051  fi
14052
14053
14054  windows_path="$new_path"
14055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14056    unix_path=`$CYGPATH -u "$windows_path"`
14057    new_path="$unix_path"
14058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14060    new_path="$unix_path"
14061  fi
14062
14063  if test "x$path" != "x$new_path"; then
14064    CURDIR="$new_path"
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14066$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14067  fi
14068
14069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14071
14072    else
14073      # We're on a unix platform. Hooray! :)
14074      path="$CURDIR"
14075      has_space=`$ECHO "$path" | $GREP " "`
14076      if test "x$has_space" != x; then
14077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14078$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14080      fi
14081
14082      # Use eval to expand a potential ~
14083      eval path="$path"
14084      if test ! -f "$path" && test ! -d "$path"; then
14085        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14086      fi
14087
14088      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14089    fi
14090  fi
14091
14092
14093  # Only process if variable expands to non-empty
14094
14095  if test "x$TOPDIR" != x; then
14096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14097
14098  # Input might be given as Windows format, start by converting to
14099  # unix format.
14100  path="$TOPDIR"
14101  new_path=`$CYGPATH -u "$path"`
14102
14103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14106  # "foo.exe" is OK but "foo" is an error.
14107  #
14108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14109  # It is also a way to make sure we got the proper file name for the real test later on.
14110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14111  if test "x$test_shortpath" = x; then
14112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14113$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14114    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14115  fi
14116
14117  # Call helper function which possibly converts this using DOS-style short mode.
14118  # If so, the updated path is stored in $new_path.
14119
14120  input_path="$new_path"
14121  # Check if we need to convert this using DOS-style short mode. If the path
14122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14123  # take no chances and rewrite it.
14124  # Note: m4 eats our [], so we need to use [ and ] instead.
14125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14126  if test "x$has_forbidden_chars" != x; then
14127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14131      # Going to short mode and back again did indeed matter. Since short mode is
14132      # case insensitive, let's make it lowercase to improve readability.
14133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14134      # Now convert it back to Unix-style (cygpath)
14135      input_path=`$CYGPATH -u "$shortmode_path"`
14136      new_path="$input_path"
14137    fi
14138  fi
14139
14140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14141  if test "x$test_cygdrive_prefix" = x; then
14142    # As a simple fix, exclude /usr/bin since it's not a real path.
14143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14145      # a path prefixed by /cygdrive for fixpath to work.
14146      new_path="$CYGWIN_ROOT_PATH$input_path"
14147    fi
14148  fi
14149
14150
14151  if test "x$path" != "x$new_path"; then
14152    TOPDIR="$new_path"
14153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14154$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14155  fi
14156
14157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14158
14159  path="$TOPDIR"
14160  has_colon=`$ECHO $path | $GREP ^.:`
14161  new_path="$path"
14162  if test "x$has_colon" = x; then
14163    # Not in mixed or Windows style, start by that.
14164    new_path=`cmd //c echo $path`
14165  fi
14166
14167
14168  input_path="$new_path"
14169  # Check if we need to convert this using DOS-style short mode. If the path
14170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14171  # take no chances and rewrite it.
14172  # Note: m4 eats our [], so we need to use [ and ] instead.
14173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14174  if test "x$has_forbidden_chars" != x; then
14175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14177  fi
14178
14179
14180  windows_path="$new_path"
14181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14182    unix_path=`$CYGPATH -u "$windows_path"`
14183    new_path="$unix_path"
14184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14186    new_path="$unix_path"
14187  fi
14188
14189  if test "x$path" != "x$new_path"; then
14190    TOPDIR="$new_path"
14191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14192$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14193  fi
14194
14195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14197
14198    else
14199      # We're on a unix platform. Hooray! :)
14200      path="$TOPDIR"
14201      has_space=`$ECHO "$path" | $GREP " "`
14202      if test "x$has_space" != x; then
14203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14204$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14206      fi
14207
14208      # Use eval to expand a potential ~
14209      eval path="$path"
14210      if test ! -f "$path" && test ! -d "$path"; then
14211        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14212      fi
14213
14214      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14215    fi
14216  fi
14217
14218  # SRC_ROOT is a traditional alias for TOPDIR.
14219  SRC_ROOT=$TOPDIR
14220
14221  # Calculate a canonical version of TOPDIR for string comparisons
14222  CANONICAL_TOPDIR=$TOPDIR
14223
14224  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14225    # Follow a chain of symbolic links. Use readlink
14226    # where it exists, else fall back to horribly
14227    # complicated shell code.
14228    if test "x$READLINK_TESTED" != yes; then
14229      # On MacOSX there is a readlink tool with a different
14230      # purpose than the GNU readlink tool. Check the found readlink.
14231      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14232      if test "x$ISGNU" = x; then
14233        # A readlink that we do not know how to use.
14234        # Are there other non-GNU readlinks out there?
14235        READLINK_TESTED=yes
14236        READLINK=
14237      fi
14238    fi
14239
14240    if test "x$READLINK" != x; then
14241      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14242    else
14243      # Save the current directory for restoring afterwards
14244      STARTDIR=$PWD
14245      COUNTER=0
14246      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14247      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14248      cd $sym_link_dir
14249      # Use -P flag to resolve symlinks in directories.
14250      cd `$THEPWDCMD -P`
14251      sym_link_dir=`$THEPWDCMD -P`
14252      # Resolve file symlinks
14253      while test $COUNTER -lt 20; do
14254        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14255        if test "x$ISLINK" == x; then
14256          # This is not a symbolic link! We are done!
14257          break
14258        fi
14259        # Again resolve directory symlinks since the target of the just found
14260        # link could be in a different directory
14261        cd `$DIRNAME $ISLINK`
14262        sym_link_dir=`$THEPWDCMD -P`
14263        sym_link_file=`$BASENAME $ISLINK`
14264        let COUNTER=COUNTER+1
14265      done
14266      cd $STARTDIR
14267      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14268    fi
14269  fi
14270
14271
14272
14273  # Locate the directory of this script.
14274  AUTOCONF_DIR=$TOPDIR/common/autoconf
14275
14276
14277# Check if it's a pure open build or if custom sources are to be used.
14278
14279  # Check whether --enable-openjdk-only was given.
14280if test "${enable_openjdk_only+set}" = set; then :
14281  enableval=$enable_openjdk_only;
14282else
14283  enable_openjdk_only="no"
14284fi
14285
14286
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14288$as_echo_n "checking for presence of closed sources... " >&6; }
14289  if test -d "$SRC_ROOT/jdk/src/closed"; then
14290    CLOSED_SOURCE_PRESENT=yes
14291  else
14292    CLOSED_SOURCE_PRESENT=no
14293  fi
14294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14295$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14296
14297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14298$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14299  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14301$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14302
14303  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14304    OPENJDK=true
14305    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14306      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14307$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14308    fi
14309  else
14310    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14311      OPENJDK=true
14312    else
14313      OPENJDK=false
14314    fi
14315  fi
14316
14317  if test "x$OPENJDK" = "xtrue"; then
14318    SET_OPENJDK="OPENJDK=true"
14319  fi
14320
14321
14322
14323  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14324  # the IncludeCustomExtension macro.
14325
14326
14327# Check whether --with-custom-make-dir was given.
14328if test "${with_custom_make_dir+set}" = set; then :
14329  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
14330$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14331fi
14332
14333
14334
14335
14336# These are needed to be able to create a configuration name (and thus the output directory)
14337
14338  ###############################################################################
14339  #
14340  # Check which variant of the JDK that we want to build.
14341  # Currently we have:
14342  #    normal:   standard edition
14343  # but the custom make system may add other variants
14344  #
14345  # Effectively the JDK variant gives a name to a specific set of
14346  # modules to compile into the JDK. In the future, these modules
14347  # might even be Jigsaw modules.
14348  #
14349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14350$as_echo_n "checking which variant of the JDK to build... " >&6; }
14351
14352# Check whether --with-jdk-variant was given.
14353if test "${with_jdk_variant+set}" = set; then :
14354  withval=$with_jdk_variant;
14355fi
14356
14357
14358  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14359    JDK_VARIANT="normal"
14360  else
14361    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14362  fi
14363
14364
14365
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14367$as_echo "$JDK_VARIANT" >&6; }
14368
14369
14370###############################################################################
14371#
14372# Check which interpreter of the JVM we want to build.
14373# Currently we have:
14374#    template: Template interpreter (the default)
14375#    cpp     : C++ interpreter
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14377$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14378
14379# Check whether --with-jvm-interpreter was given.
14380if test "${with_jvm_interpreter+set}" = set; then :
14381  withval=$with_jvm_interpreter;
14382fi
14383
14384
14385if test "x$with_jvm_interpreter" = x; then
14386     with_jvm_interpreter="template"
14387fi
14388
14389JVM_INTERPRETER="$with_jvm_interpreter"
14390
14391if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14392   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14393fi
14394
14395
14396
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14398$as_echo "$with_jvm_interpreter" >&6; }
14399
14400
14401
14402  ###############################################################################
14403  #
14404  # Check which variants of the JVM that we want to build.
14405  # Currently we have:
14406  #    server: normal interpreter and a tiered C1/C2 compiler
14407  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14408  #    minimal1: reduced form of client with optional VM services and features stripped out
14409  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14410  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14411  #    zero: no machine code interpreter, no compiler
14412  #    zeroshark: zero interpreter and shark/llvm compiler backend
14413#    core: interpreter only, no compiler (only works on some platforms)
14414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14415$as_echo_n "checking which variants of the JVM to build... " >&6; }
14416
14417# Check whether --with-jvm-variants was given.
14418if test "${with_jvm_variants+set}" = set; then :
14419  withval=$with_jvm_variants;
14420fi
14421
14422
14423  if test "x$with_jvm_variants" = x; then
14424    with_jvm_variants="server"
14425  fi
14426
14427  JVM_VARIANTS=",$with_jvm_variants,"
14428  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,//'`
14429
14430  if test "x$TEST_VARIANTS" != "x,"; then
14431     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14432  fi
14433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14434$as_echo "$with_jvm_variants" >&6; }
14435
14436  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14437  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14438  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14439  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14440  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14441  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14442  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14443
14444  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14445    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14446      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14447    fi
14448  fi
14449  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14450    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14451      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14452    fi
14453  fi
14454  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14455    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14456      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14457    fi
14458  fi
14459
14460  # Replace the commas with AND for use in the build directory name.
14461  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14462  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/'`
14463  if test "x$COUNT_VARIANTS" != "x,1"; then
14464    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14465  else
14466    BUILDING_MULTIPLE_JVM_VARIANTS=no
14467  fi
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478  INCLUDE_SA=true
14479  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14480    INCLUDE_SA=false
14481  fi
14482  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14483    INCLUDE_SA=false
14484  fi
14485  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14486    INCLUDE_SA=false
14487  fi
14488  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14489    INCLUDE_SA=false
14490  fi
14491
14492
14493  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14494    MACOSX_UNIVERSAL="true"
14495  fi
14496
14497
14498
14499
14500  ###############################################################################
14501  #
14502  # Set the debug level
14503  #    release: no debug information, all optimizations, no asserts.
14504  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14505  #    fastdebug: debug information (-g), all optimizations, all asserts
14506  #    slowdebug: debug information (-g), no optimizations, all asserts
14507  #
14508  DEBUG_LEVEL="release"
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14510$as_echo_n "checking which debug level to use... " >&6; }
14511  # Check whether --enable-debug was given.
14512if test "${enable_debug+set}" = set; then :
14513  enableval=$enable_debug;
14514        ENABLE_DEBUG="${enableval}"
14515        DEBUG_LEVEL="fastdebug"
14516
14517else
14518  ENABLE_DEBUG="no"
14519fi
14520
14521
14522
14523# Check whether --with-debug-level was given.
14524if test "${with_debug_level+set}" = set; then :
14525  withval=$with_debug_level;
14526        DEBUG_LEVEL="${withval}"
14527        if test "x$ENABLE_DEBUG" = xyes; then
14528          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14529        fi
14530
14531fi
14532
14533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14534$as_echo "$DEBUG_LEVEL" >&6; }
14535
14536  if test "x$DEBUG_LEVEL" != xrelease && \
14537      test "x$DEBUG_LEVEL" != xoptimized && \
14538      test "x$DEBUG_LEVEL" != xfastdebug && \
14539      test "x$DEBUG_LEVEL" != xslowdebug; then
14540    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14541  fi
14542
14543
14544  ###############################################################################
14545  #
14546  # Setup legacy vars/targets and new vars to deal with different debug levels.
14547  #
14548
14549  case $DEBUG_LEVEL in
14550    release )
14551      VARIANT="OPT"
14552      FASTDEBUG="false"
14553      DEBUG_CLASSFILES="false"
14554      BUILD_VARIANT_RELEASE=""
14555      HOTSPOT_DEBUG_LEVEL="product"
14556      HOTSPOT_EXPORT="product"
14557      ;;
14558    fastdebug )
14559      VARIANT="DBG"
14560      FASTDEBUG="true"
14561      DEBUG_CLASSFILES="true"
14562      BUILD_VARIANT_RELEASE="-fastdebug"
14563      HOTSPOT_DEBUG_LEVEL="fastdebug"
14564      HOTSPOT_EXPORT="fastdebug"
14565      ;;
14566    slowdebug )
14567      VARIANT="DBG"
14568      FASTDEBUG="false"
14569      DEBUG_CLASSFILES="true"
14570      BUILD_VARIANT_RELEASE="-debug"
14571      HOTSPOT_DEBUG_LEVEL="debug"
14572      HOTSPOT_EXPORT="debug"
14573      ;;
14574    optimized )
14575      VARIANT="OPT"
14576      FASTDEBUG="false"
14577      DEBUG_CLASSFILES="false"
14578      BUILD_VARIANT_RELEASE="-optimized"
14579      HOTSPOT_DEBUG_LEVEL="optimized"
14580      HOTSPOT_EXPORT="optimized"
14581      ;;
14582  esac
14583
14584  # The debug level 'optimized' is a little special because it is currently only
14585  # applicable to the HotSpot build where it means to build a completely
14586  # optimized version of the VM without any debugging code (like for the
14587  # 'release' debug level which is called 'product' in the HotSpot build) but
14588  # with the exception that it can contain additional code which is otherwise
14589  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14590  # test new and/or experimental features which are not intended for customer
14591  # shipment. Because these new features need to be tested and benchmarked in
14592  # real world scenarios, we want to build the containing JDK at the 'release'
14593  # debug level.
14594  if test "x$DEBUG_LEVEL" = xoptimized; then
14595    DEBUG_LEVEL="release"
14596  fi
14597
14598  #####
14599  # Generate the legacy makefile targets for hotspot.
14600  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14601  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14602  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14603  # But until then ...
14604  HOTSPOT_TARGET=""
14605
14606  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14607    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14608  fi
14609
14610  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14611    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14612  fi
14613
14614  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14615    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14616  fi
14617
14618  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14619    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14620  fi
14621
14622  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14623    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14624  fi
14625
14626  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14627    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14628  fi
14629
14630  if test "x$JVM_VARIANT_CORE" = xtrue; then
14631    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14632  fi
14633
14634  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14635
14636  # On Macosx universal binaries are produced, but they only contain
14637  # 64 bit intel. This invalidates control of which jvms are built
14638  # from configure, but only server is valid anyway. Fix this
14639  # when hotspot makefiles are rewritten.
14640  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14641    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14642  fi
14643
14644  #####
14645
14646
14647
14648
14649
14650
14651
14652
14653# With basic setup done, call the custom early hook.
14654
14655
14656# Check if we have devkits, extra paths or sysroot set.
14657
14658
14659# Check whether --with-devkit was given.
14660if test "${with_devkit+set}" = set; then :
14661  withval=$with_devkit;
14662
14663  # Only process if variable expands to non-empty
14664
14665  if test "x$with_devkit" != x; then
14666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14667
14668  # Input might be given as Windows format, start by converting to
14669  # unix format.
14670  path="$with_devkit"
14671  new_path=`$CYGPATH -u "$path"`
14672
14673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14676  # "foo.exe" is OK but "foo" is an error.
14677  #
14678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14679  # It is also a way to make sure we got the proper file name for the real test later on.
14680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14681  if test "x$test_shortpath" = x; then
14682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14683$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14684    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14685  fi
14686
14687  # Call helper function which possibly converts this using DOS-style short mode.
14688  # If so, the updated path is stored in $new_path.
14689
14690  input_path="$new_path"
14691  # Check if we need to convert this using DOS-style short mode. If the path
14692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14693  # take no chances and rewrite it.
14694  # Note: m4 eats our [], so we need to use [ and ] instead.
14695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14696  if test "x$has_forbidden_chars" != x; then
14697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14701      # Going to short mode and back again did indeed matter. Since short mode is
14702      # case insensitive, let's make it lowercase to improve readability.
14703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14704      # Now convert it back to Unix-style (cygpath)
14705      input_path=`$CYGPATH -u "$shortmode_path"`
14706      new_path="$input_path"
14707    fi
14708  fi
14709
14710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14711  if test "x$test_cygdrive_prefix" = x; then
14712    # As a simple fix, exclude /usr/bin since it's not a real path.
14713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14715      # a path prefixed by /cygdrive for fixpath to work.
14716      new_path="$CYGWIN_ROOT_PATH$input_path"
14717    fi
14718  fi
14719
14720
14721  if test "x$path" != "x$new_path"; then
14722    with_devkit="$new_path"
14723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14724$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14725  fi
14726
14727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14728
14729  path="$with_devkit"
14730  has_colon=`$ECHO $path | $GREP ^.:`
14731  new_path="$path"
14732  if test "x$has_colon" = x; then
14733    # Not in mixed or Windows style, start by that.
14734    new_path=`cmd //c echo $path`
14735  fi
14736
14737
14738  input_path="$new_path"
14739  # Check if we need to convert this using DOS-style short mode. If the path
14740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14741  # take no chances and rewrite it.
14742  # Note: m4 eats our [], so we need to use [ and ] instead.
14743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14744  if test "x$has_forbidden_chars" != x; then
14745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14747  fi
14748
14749
14750  windows_path="$new_path"
14751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14752    unix_path=`$CYGPATH -u "$windows_path"`
14753    new_path="$unix_path"
14754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14756    new_path="$unix_path"
14757  fi
14758
14759  if test "x$path" != "x$new_path"; then
14760    with_devkit="$new_path"
14761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14762$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14763  fi
14764
14765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14767
14768    else
14769      # We're on a unix platform. Hooray! :)
14770      path="$with_devkit"
14771      has_space=`$ECHO "$path" | $GREP " "`
14772      if test "x$has_space" != x; then
14773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14774$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14776      fi
14777
14778      # Use eval to expand a potential ~
14779      eval path="$path"
14780      if test ! -f "$path" && test ! -d "$path"; then
14781        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14782      fi
14783
14784      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14785    fi
14786  fi
14787
14788        DEVKIT_ROOT="$with_devkit"
14789        # Check for a meta data info file in the root of the devkit
14790        if test -f "$DEVKIT_ROOT/devkit.info"; then
14791          . $DEVKIT_ROOT/devkit.info
14792          # This potentially sets the following:
14793          # A descriptive name of the devkit
14794
14795  if test "x$DEVKIT_NAME" = x; then
14796    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14797  fi
14798
14799          # Corresponds to --with-extra-path
14800
14801  if test "x$DEVKIT_EXTRA_PATH" = x; then
14802    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14803  fi
14804
14805          # Corresponds to --with-toolchain-path
14806
14807  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14808    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14809  fi
14810
14811          # Corresponds to --with-sysroot
14812
14813  if test "x$DEVKIT_SYSROOT" = x; then
14814    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14815  fi
14816
14817
14818          # Identifies the Visual Studio version in the devkit
14819
14820  if test "x$DEVKIT_VS_VERSION" = x; then
14821    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14822  fi
14823
14824          # The Visual Studio include environment variable
14825
14826  if test "x$DEVKIT_VS_INCLUDE" = x; then
14827    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14828  fi
14829
14830          # The Visual Studio lib environment variable
14831
14832  if test "x$DEVKIT_VS_LIB" = x; then
14833    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14834  fi
14835
14836          # Corresponds to --with-msvcr-dll
14837
14838  if test "x$DEVKIT_MSVCR_DLL" = x; then
14839    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14840  fi
14841
14842          # Corresponds to --with-msvcp-dll
14843
14844  if test "x$DEVKIT_MSVCP_DLL" = x; then
14845    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14846  fi
14847
14848        fi
14849
14850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14851$as_echo_n "checking for devkit... " >&6; }
14852        if test "x$DEVKIT_NAME" != x; then
14853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14854$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14855        else
14856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14857$as_echo "$DEVKIT_ROOT" >&6; }
14858        fi
14859
14860
14861  if test "x$DEVKIT_EXTRA_PATH" != x; then
14862    if test "x$EXTRA_PATH" = x; then
14863      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14864    else
14865      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14866    fi
14867  fi
14868
14869
14870        # Fallback default of just /bin if DEVKIT_PATH is not defined
14871        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14872          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14873        fi
14874
14875  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14876    if test "x$TOOLCHAIN_PATH" = x; then
14877      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14878    else
14879      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14880    fi
14881  fi
14882
14883
14884        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14885        # places for backwards compatiblity.
14886        if test "x$DEVKIT_SYSROOT" != x; then
14887          SYSROOT="$DEVKIT_SYSROOT"
14888        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14889          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14890        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14891          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14892        fi
14893
14894
14895fi
14896
14897
14898  # You can force the sysroot if the sysroot encoded into the compiler tools
14899  # is not correct.
14900
14901# Check whether --with-sys-root was given.
14902if test "${with_sys_root+set}" = set; then :
14903  withval=$with_sys_root; SYSROOT=$with_sys_root
14904
14905fi
14906
14907
14908
14909# Check whether --with-sysroot was given.
14910if test "${with_sysroot+set}" = set; then :
14911  withval=$with_sysroot; SYSROOT=$with_sysroot
14912
14913fi
14914
14915
14916
14917# Check whether --with-tools-dir was given.
14918if test "${with_tools_dir+set}" = set; then :
14919  withval=$with_tools_dir;
14920  if test "x$with_tools_dir" != x; then
14921    if test "x$TOOLCHAIN_PATH" = x; then
14922      TOOLCHAIN_PATH="$with_tools_dir"
14923    else
14924      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14925    fi
14926  fi
14927
14928
14929fi
14930
14931
14932
14933# Check whether --with-toolchain-path was given.
14934if test "${with_toolchain_path+set}" = set; then :
14935  withval=$with_toolchain_path;
14936  if test "x$with_toolchain_path" != x; then
14937    if test "x$TOOLCHAIN_PATH" = x; then
14938      TOOLCHAIN_PATH="$with_toolchain_path"
14939    else
14940      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14941    fi
14942  fi
14943
14944
14945fi
14946
14947
14948
14949# Check whether --with-extra-path was given.
14950if test "${with_extra_path+set}" = set; then :
14951  withval=$with_extra_path;
14952  if test "x$with_extra_path" != x; then
14953    if test "x$EXTRA_PATH" = x; then
14954      EXTRA_PATH="$with_extra_path"
14955    else
14956      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14957    fi
14958  fi
14959
14960
14961fi
14962
14963
14964  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14965    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14966    # If not, detect if Xcode is installed by running xcodebuild -version
14967    # if no Xcode installed, xcodebuild exits with 1
14968    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14969    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14970      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14971      # fall back on the stub binary in /usr/bin/xcodebuild
14972      # Extract the first word of "xcodebuild", so it can be a program name with args.
14973set dummy xcodebuild; ac_word=$2
14974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14975$as_echo_n "checking for $ac_word... " >&6; }
14976if ${ac_cv_path_XCODEBUILD+:} false; then :
14977  $as_echo_n "(cached) " >&6
14978else
14979  case $XCODEBUILD in
14980  [\\/]* | ?:[\\/]*)
14981  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14982  ;;
14983  *)
14984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14985for as_dir in $TOOLCHAIN_PATH
14986do
14987  IFS=$as_save_IFS
14988  test -z "$as_dir" && as_dir=.
14989    for ac_exec_ext in '' $ac_executable_extensions; do
14990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14991    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14993    break 2
14994  fi
14995done
14996  done
14997IFS=$as_save_IFS
14998
14999  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15000  ;;
15001esac
15002fi
15003XCODEBUILD=$ac_cv_path_XCODEBUILD
15004if test -n "$XCODEBUILD"; then
15005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15006$as_echo "$XCODEBUILD" >&6; }
15007else
15008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009$as_echo "no" >&6; }
15010fi
15011
15012
15013    else
15014      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15015      # when only the command line tools are installed there are no SDKs, so headers
15016      # are copied into the system frameworks
15017      XCODEBUILD=
15018
15019    fi
15020
15021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15022$as_echo_n "checking for sdk name... " >&6; }
15023
15024# Check whether --with-sdk-name was given.
15025if test "${with_sdk_name+set}" = set; then :
15026  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15027
15028fi
15029
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15031$as_echo "$SDKNAME" >&6; }
15032
15033    # if toolchain path is specified then don't rely on system headers, they may not compile
15034    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15035    test -z "$TOOLCHAIN_PATH" && \
15036      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15037
15038    if test -z "$SYSROOT"; then
15039      if test -n "$XCODEBUILD"; then
15040        # if we don't have system headers, use default SDK name (last resort)
15041        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15042          SDKNAME=${SDKNAME:-macosx}
15043        fi
15044
15045        if test -n "$SDKNAME"; then
15046          # Call xcodebuild to determine SYSROOT
15047          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15048        fi
15049      else
15050        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15051          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
15052        fi
15053      fi
15054    else
15055      # warn user if --with-sdk-name was also set
15056      if test -n "$with_sdk_name"; then
15057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15058$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15059      fi
15060    fi
15061
15062    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15063      # If no system framework headers, then SYSROOT must be set, or we won't build
15064      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
15065    fi
15066
15067    # Perform a basic sanity test
15068    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15069      if test -z "$SYSROOT"; then
15070        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
15071      else
15072        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15073      fi
15074    fi
15075
15076    # set SDKROOT too, Xcode tools will pick it up
15077    SDKROOT=$SYSROOT
15078
15079  fi
15080
15081  # Prepend the extra path to the global path
15082
15083  if test "x$EXTRA_PATH" != x; then
15084    if test "x$PATH" = x; then
15085      PATH="$EXTRA_PATH"
15086    else
15087      PATH="$EXTRA_PATH:$PATH"
15088    fi
15089  fi
15090
15091
15092  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15093    # Add extra search paths on solaris for utilities like ar and as etc...
15094    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15095  fi
15096
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15098$as_echo_n "checking for sysroot... " >&6; }
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15100$as_echo "$SYSROOT" >&6; }
15101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15102$as_echo_n "checking for toolchain path... " >&6; }
15103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15104$as_echo "$TOOLCHAIN_PATH" >&6; }
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15106$as_echo_n "checking for extra path... " >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15108$as_echo "$EXTRA_PATH" >&6; }
15109
15110
15111# To properly create a configuration name, we need to have the OpenJDK target
15112# and options (variants and debug level) parsed.
15113
15114
15115
15116# Check whether --with-conf-name was given.
15117if test "${with_conf_name+set}" = set; then :
15118  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15119fi
15120
15121
15122  # Test from where we are running configure, in or outside of src root.
15123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15124$as_echo_n "checking where to store configuration... " >&6; }
15125  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15126      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15127      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15128    # We are running configure from the src root.
15129    # Create a default ./build/target-variant-debuglevel output root.
15130    if test "x${CONF_NAME}" = x; then
15131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15132$as_echo "in default location" >&6; }
15133      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15134    else
15135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15136$as_echo "in build directory with custom name" >&6; }
15137    fi
15138    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15139    $MKDIR -p "$OUTPUT_ROOT"
15140    if test ! -d "$OUTPUT_ROOT"; then
15141      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15142    fi
15143  else
15144    # We are running configure from outside of the src dir.
15145    # Then use the current directory as output dir!
15146    # If configuration is situated in normal build directory, just use the build
15147    # directory name as configuration name, otherwise use the complete path.
15148    if test "x${CONF_NAME}" = x; then
15149      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15150    fi
15151    OUTPUT_ROOT="$CURDIR"
15152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15153$as_echo "in current directory" >&6; }
15154
15155    # WARNING: This might be a bad thing to do. You need to be sure you want to
15156    # have a configuration in this directory. Do some sanity checks!
15157
15158    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15159      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15160      # other files
15161      files_present=`$LS $OUTPUT_ROOT`
15162      # Configure has already touched config.log and confdefs.h in the current dir when this check
15163      # is performed.
15164      filtered_files=`$ECHO "$files_present" \
15165          | $SED -e 's/config.log//g' \
15166              -e 's/configure.log//g' \
15167              -e 's/confdefs.h//g' \
15168              -e 's/ //g' \
15169          | $TR -d '\n'`
15170      if test "x$filtered_files" != x; then
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15172$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15174$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15176$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15177        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15178$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15179        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15180$as_echo "$as_me: seriously mess up just about everything." >&6;}
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15182$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15184$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15185        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15186      fi
15187    fi
15188  fi
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15190$as_echo_n "checking what configuration name to use... " >&6; }
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15192$as_echo "$CONF_NAME" >&6; }
15193
15194
15195  # Only process if variable expands to non-empty
15196
15197  if test "x$OUTPUT_ROOT" != x; then
15198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15199
15200  # Input might be given as Windows format, start by converting to
15201  # unix format.
15202  path="$OUTPUT_ROOT"
15203  new_path=`$CYGPATH -u "$path"`
15204
15205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15208  # "foo.exe" is OK but "foo" is an error.
15209  #
15210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15211  # It is also a way to make sure we got the proper file name for the real test later on.
15212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15213  if test "x$test_shortpath" = x; then
15214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15215$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15216    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15217  fi
15218
15219  # Call helper function which possibly converts this using DOS-style short mode.
15220  # If so, the updated path is stored in $new_path.
15221
15222  input_path="$new_path"
15223  # Check if we need to convert this using DOS-style short mode. If the path
15224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15225  # take no chances and rewrite it.
15226  # Note: m4 eats our [], so we need to use [ and ] instead.
15227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15228  if test "x$has_forbidden_chars" != x; then
15229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15233      # Going to short mode and back again did indeed matter. Since short mode is
15234      # case insensitive, let's make it lowercase to improve readability.
15235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15236      # Now convert it back to Unix-style (cygpath)
15237      input_path=`$CYGPATH -u "$shortmode_path"`
15238      new_path="$input_path"
15239    fi
15240  fi
15241
15242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15243  if test "x$test_cygdrive_prefix" = x; then
15244    # As a simple fix, exclude /usr/bin since it's not a real path.
15245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15247      # a path prefixed by /cygdrive for fixpath to work.
15248      new_path="$CYGWIN_ROOT_PATH$input_path"
15249    fi
15250  fi
15251
15252
15253  if test "x$path" != "x$new_path"; then
15254    OUTPUT_ROOT="$new_path"
15255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15256$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15257  fi
15258
15259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15260
15261  path="$OUTPUT_ROOT"
15262  has_colon=`$ECHO $path | $GREP ^.:`
15263  new_path="$path"
15264  if test "x$has_colon" = x; then
15265    # Not in mixed or Windows style, start by that.
15266    new_path=`cmd //c echo $path`
15267  fi
15268
15269
15270  input_path="$new_path"
15271  # Check if we need to convert this using DOS-style short mode. If the path
15272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15273  # take no chances and rewrite it.
15274  # Note: m4 eats our [], so we need to use [ and ] instead.
15275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15276  if test "x$has_forbidden_chars" != x; then
15277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15279  fi
15280
15281
15282  windows_path="$new_path"
15283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15284    unix_path=`$CYGPATH -u "$windows_path"`
15285    new_path="$unix_path"
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15288    new_path="$unix_path"
15289  fi
15290
15291  if test "x$path" != "x$new_path"; then
15292    OUTPUT_ROOT="$new_path"
15293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15294$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15295  fi
15296
15297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15299
15300    else
15301      # We're on a unix platform. Hooray! :)
15302      path="$OUTPUT_ROOT"
15303      has_space=`$ECHO "$path" | $GREP " "`
15304      if test "x$has_space" != x; then
15305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15306$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15308      fi
15309
15310      # Use eval to expand a potential ~
15311      eval path="$path"
15312      if test ! -f "$path" && test ! -d "$path"; then
15313        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15314      fi
15315
15316      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15317    fi
15318  fi
15319
15320
15321  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15322  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15323
15324  SPEC=$OUTPUT_ROOT/spec.gmk
15325
15326  CONF_NAME=$CONF_NAME
15327
15328  OUTPUT_ROOT=$OUTPUT_ROOT
15329
15330
15331
15332  # The spec.gmk file contains all variables for the make system.
15333  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15334
15335  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15336  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15337
15338  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15340
15341  # The compare.sh is used to compare the build output to other builds.
15342  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15343
15344  # The generated Makefile knows where the spec.gmk is and where the source is.
15345  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15346  # which will look for generated configurations
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15348
15349
15350
15351# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15352
15353  for ac_prog in apt-get yum port pkgutil pkgadd
15354do
15355  # Extract the first word of "$ac_prog", so it can be a program name with args.
15356set dummy $ac_prog; ac_word=$2
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15358$as_echo_n "checking for $ac_word... " >&6; }
15359if ${ac_cv_prog_PKGHANDLER+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test -n "$PKGHANDLER"; then
15363  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15364else
15365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15366for as_dir in $PATH
15367do
15368  IFS=$as_save_IFS
15369  test -z "$as_dir" && as_dir=.
15370    for ac_exec_ext in '' $ac_executable_extensions; do
15371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15372    ac_cv_prog_PKGHANDLER="$ac_prog"
15373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15374    break 2
15375  fi
15376done
15377  done
15378IFS=$as_save_IFS
15379
15380fi
15381fi
15382PKGHANDLER=$ac_cv_prog_PKGHANDLER
15383if test -n "$PKGHANDLER"; then
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15385$as_echo "$PKGHANDLER" >&6; }
15386else
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15388$as_echo "no" >&6; }
15389fi
15390
15391
15392  test -n "$PKGHANDLER" && break
15393done
15394
15395
15396
15397# Setup tools that requires more complex handling, or that is not needed by the configure script.
15398
15399
15400  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15401  if test "x$MAKE" != x; then
15402    # User has supplied a make, test it.
15403    if test ! -f "$MAKE"; then
15404      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15405    fi
15406
15407  MAKE_CANDIDATE=""$MAKE""
15408  DESCRIPTION="user supplied MAKE=$MAKE"
15409
15410  # On Cygwin, we require a newer version of make than on other platforms
15411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15412    MAKE_VERSION_EXPR="-e 4\."
15413    MAKE_REQUIRED_VERSION="4.0"
15414   else
15415    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15416    MAKE_REQUIRED_VERSION="3.81"
15417  fi
15418
15419  if test "x$MAKE_CANDIDATE" != x; then
15420    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15421$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15422    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15423    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15424    if test "x$IS_GNU_MAKE" = x; then
15425      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15426$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15427    else
15428      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15429      if test "x$IS_MODERN_MAKE" = x; then
15430        { $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
15431$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;}
15432      else
15433        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15434          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15435            MAKE_EXPECTED_ENV='cygwin'
15436          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15437            MAKE_EXPECTED_ENV='msys'
15438          else
15439            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15440          fi
15441          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15442          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15443        else
15444          # Not relevant for non-Windows
15445          IS_MAKE_CORRECT_ENV=true
15446        fi
15447        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15448          { $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
15449$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;}
15450        else
15451          FOUND_MAKE=$MAKE_CANDIDATE
15452
15453  # Only process if variable expands to non-empty
15454
15455  if test "x$FOUND_MAKE" != x; then
15456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15457
15458  # First separate the path from the arguments. This will split at the first
15459  # space.
15460  complete="$FOUND_MAKE"
15461  path="${complete%% *}"
15462  tmp="$complete EOL"
15463  arguments="${tmp#* }"
15464
15465  # Input might be given as Windows format, start by converting to
15466  # unix format.
15467  new_path=`$CYGPATH -u "$path"`
15468
15469  # Now try to locate executable using which
15470  new_path=`$WHICH "$new_path" 2> /dev/null`
15471  # bat and cmd files are not always considered executable in cygwin causing which
15472  # to not find them
15473  if test "x$new_path" = x \
15474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15476    new_path=`$CYGPATH -u "$path"`
15477  fi
15478  if test "x$new_path" = x; then
15479    # Oops. Which didn't find the executable.
15480    # The splitting of arguments from the executable at a space might have been incorrect,
15481    # since paths with space are more likely in Windows. Give it another try with the whole
15482    # argument.
15483    path="$complete"
15484    arguments="EOL"
15485    new_path=`$CYGPATH -u "$path"`
15486    new_path=`$WHICH "$new_path" 2> /dev/null`
15487    # bat and cmd files are not always considered executable in cygwin causing which
15488    # to not find them
15489    if test "x$new_path" = x \
15490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15492      new_path=`$CYGPATH -u "$path"`
15493    fi
15494    if test "x$new_path" = x; then
15495      # It's still not found. Now this is an unrecoverable error.
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15498      has_space=`$ECHO "$complete" | $GREP " "`
15499      if test "x$has_space" != x; then
15500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15502      fi
15503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15504    fi
15505  fi
15506
15507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15510  # "foo.exe" is OK but "foo" is an error.
15511  #
15512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15513  # It is also a way to make sure we got the proper file name for the real test later on.
15514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15515  if test "x$test_shortpath" = x; then
15516    # Short path failed, file does not exist as specified.
15517    # Try adding .exe or .cmd
15518    if test -f "${new_path}.exe"; then
15519      input_to_shortpath="${new_path}.exe"
15520    elif test -f "${new_path}.cmd"; then
15521      input_to_shortpath="${new_path}.cmd"
15522    else
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15524$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15527      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15528    fi
15529  else
15530    input_to_shortpath="$new_path"
15531  fi
15532
15533  # Call helper function which possibly converts this using DOS-style short mode.
15534  # If so, the updated path is stored in $new_path.
15535  new_path="$input_to_shortpath"
15536
15537  input_path="$input_to_shortpath"
15538  # Check if we need to convert this using DOS-style short mode. If the path
15539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15540  # take no chances and rewrite it.
15541  # Note: m4 eats our [], so we need to use [ and ] instead.
15542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15543  if test "x$has_forbidden_chars" != x; then
15544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15548      # Going to short mode and back again did indeed matter. Since short mode is
15549      # case insensitive, let's make it lowercase to improve readability.
15550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15551      # Now convert it back to Unix-style (cygpath)
15552      input_path=`$CYGPATH -u "$shortmode_path"`
15553      new_path="$input_path"
15554    fi
15555  fi
15556
15557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15558  if test "x$test_cygdrive_prefix" = x; then
15559    # As a simple fix, exclude /usr/bin since it's not a real path.
15560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15562      # a path prefixed by /cygdrive for fixpath to work.
15563      new_path="$CYGWIN_ROOT_PATH$input_path"
15564    fi
15565  fi
15566
15567  # remove trailing .exe if any
15568  new_path="${new_path/%.exe/}"
15569
15570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15571
15572  # First separate the path from the arguments. This will split at the first
15573  # space.
15574  complete="$FOUND_MAKE"
15575  path="${complete%% *}"
15576  tmp="$complete EOL"
15577  arguments="${tmp#* }"
15578
15579  # Input might be given as Windows format, start by converting to
15580  # unix format.
15581  new_path="$path"
15582
15583  windows_path="$new_path"
15584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15585    unix_path=`$CYGPATH -u "$windows_path"`
15586    new_path="$unix_path"
15587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15589    new_path="$unix_path"
15590  fi
15591
15592
15593  # Now try to locate executable using which
15594  new_path=`$WHICH "$new_path" 2> /dev/null`
15595
15596  if test "x$new_path" = x; then
15597    # Oops. Which didn't find the executable.
15598    # The splitting of arguments from the executable at a space might have been incorrect,
15599    # since paths with space are more likely in Windows. Give it another try with the whole
15600    # argument.
15601    path="$complete"
15602    arguments="EOL"
15603    new_path="$path"
15604
15605  windows_path="$new_path"
15606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15607    unix_path=`$CYGPATH -u "$windows_path"`
15608    new_path="$unix_path"
15609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15611    new_path="$unix_path"
15612  fi
15613
15614
15615    new_path=`$WHICH "$new_path" 2> /dev/null`
15616    # bat and cmd files are not always considered executable in MSYS causing which
15617    # to not find them
15618    if test "x$new_path" = x \
15619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15621      new_path="$path"
15622
15623  windows_path="$new_path"
15624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15625    unix_path=`$CYGPATH -u "$windows_path"`
15626    new_path="$unix_path"
15627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15629    new_path="$unix_path"
15630  fi
15631
15632    fi
15633
15634    if test "x$new_path" = x; then
15635      # It's still not found. Now this is an unrecoverable error.
15636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15638      has_space=`$ECHO "$complete" | $GREP " "`
15639      if test "x$has_space" != x; then
15640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15642      fi
15643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15644    fi
15645  fi
15646
15647  # Now new_path has a complete unix path to the binary
15648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15649    # Keep paths in /bin as-is, but remove trailing .exe if any
15650    new_path="${new_path/%.exe/}"
15651    # Do not save /bin paths to all_fixpath_prefixes!
15652  else
15653    # Not in mixed or Windows style, start by that.
15654    new_path=`cmd //c echo $new_path`
15655
15656  input_path="$new_path"
15657  # Check if we need to convert this using DOS-style short mode. If the path
15658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15659  # take no chances and rewrite it.
15660  # Note: m4 eats our [], so we need to use [ and ] instead.
15661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15662  if test "x$has_forbidden_chars" != x; then
15663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15665  fi
15666
15667    # Output is in $new_path
15668
15669  windows_path="$new_path"
15670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15671    unix_path=`$CYGPATH -u "$windows_path"`
15672    new_path="$unix_path"
15673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15675    new_path="$unix_path"
15676  fi
15677
15678    # remove trailing .exe if any
15679    new_path="${new_path/%.exe/}"
15680
15681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15683  fi
15684
15685    else
15686      # We're on a unix platform. Hooray! :)
15687      # First separate the path from the arguments. This will split at the first
15688      # space.
15689      complete="$FOUND_MAKE"
15690      path="${complete%% *}"
15691      tmp="$complete EOL"
15692      arguments="${tmp#* }"
15693
15694      # Cannot rely on the command "which" here since it doesn't always work.
15695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15696      if test -z "$is_absolute_path"; then
15697        # Path to executable is not absolute. Find it.
15698        IFS_save="$IFS"
15699        IFS=:
15700        for p in $PATH; do
15701          if test -f "$p/$path" && test -x "$p/$path"; then
15702            new_path="$p/$path"
15703            break
15704          fi
15705        done
15706        IFS="$IFS_save"
15707      else
15708        # This is an absolute path, we can use it without further modifications.
15709        new_path="$path"
15710      fi
15711
15712      if test "x$new_path" = x; then
15713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15715        has_space=`$ECHO "$complete" | $GREP " "`
15716        if test "x$has_space" != x; then
15717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15719        fi
15720        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15721      fi
15722    fi
15723
15724    # Now join together the path and the arguments once again
15725    if test "x$arguments" != xEOL; then
15726      new_complete="$new_path ${arguments% *}"
15727    else
15728      new_complete="$new_path"
15729    fi
15730
15731    if test "x$complete" != "x$new_complete"; then
15732      FOUND_MAKE="$new_complete"
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15734$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15735    fi
15736  fi
15737
15738        fi
15739      fi
15740    fi
15741  fi
15742
15743    if test "x$FOUND_MAKE" = x; then
15744      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15745    fi
15746  else
15747    # Try our hardest to locate a correct version of GNU make
15748    for ac_prog in gmake
15749do
15750  # Extract the first word of "$ac_prog", so it can be a program name with args.
15751set dummy $ac_prog; ac_word=$2
15752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15753$as_echo_n "checking for $ac_word... " >&6; }
15754if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15755  $as_echo_n "(cached) " >&6
15756else
15757  case $CHECK_GMAKE in
15758  [\\/]* | ?:[\\/]*)
15759  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15760  ;;
15761  *)
15762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15763for as_dir in $PATH
15764do
15765  IFS=$as_save_IFS
15766  test -z "$as_dir" && as_dir=.
15767    for ac_exec_ext in '' $ac_executable_extensions; do
15768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15769    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15771    break 2
15772  fi
15773done
15774  done
15775IFS=$as_save_IFS
15776
15777  ;;
15778esac
15779fi
15780CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15781if test -n "$CHECK_GMAKE"; then
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15783$as_echo "$CHECK_GMAKE" >&6; }
15784else
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15786$as_echo "no" >&6; }
15787fi
15788
15789
15790  test -n "$CHECK_GMAKE" && break
15791done
15792
15793
15794  MAKE_CANDIDATE=""$CHECK_GMAKE""
15795  DESCRIPTION="gmake in PATH"
15796
15797  # On Cygwin, we require a newer version of make than on other platforms
15798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15799    MAKE_VERSION_EXPR="-e 4\."
15800    MAKE_REQUIRED_VERSION="4.0"
15801   else
15802    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15803    MAKE_REQUIRED_VERSION="3.81"
15804  fi
15805
15806  if test "x$MAKE_CANDIDATE" != x; then
15807    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15808$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15809    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15810    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15811    if test "x$IS_GNU_MAKE" = x; then
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15813$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15814    else
15815      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15816      if test "x$IS_MODERN_MAKE" = x; then
15817        { $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
15818$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;}
15819      else
15820        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15821          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822            MAKE_EXPECTED_ENV='cygwin'
15823          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15824            MAKE_EXPECTED_ENV='msys'
15825          else
15826            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15827          fi
15828          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15829          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15830        else
15831          # Not relevant for non-Windows
15832          IS_MAKE_CORRECT_ENV=true
15833        fi
15834        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15835          { $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
15836$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;}
15837        else
15838          FOUND_MAKE=$MAKE_CANDIDATE
15839
15840  # Only process if variable expands to non-empty
15841
15842  if test "x$FOUND_MAKE" != x; then
15843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15844
15845  # First separate the path from the arguments. This will split at the first
15846  # space.
15847  complete="$FOUND_MAKE"
15848  path="${complete%% *}"
15849  tmp="$complete EOL"
15850  arguments="${tmp#* }"
15851
15852  # Input might be given as Windows format, start by converting to
15853  # unix format.
15854  new_path=`$CYGPATH -u "$path"`
15855
15856  # Now try to locate executable using which
15857  new_path=`$WHICH "$new_path" 2> /dev/null`
15858  # bat and cmd files are not always considered executable in cygwin causing which
15859  # to not find them
15860  if test "x$new_path" = x \
15861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15863    new_path=`$CYGPATH -u "$path"`
15864  fi
15865  if test "x$new_path" = x; then
15866    # Oops. Which didn't find the executable.
15867    # The splitting of arguments from the executable at a space might have been incorrect,
15868    # since paths with space are more likely in Windows. Give it another try with the whole
15869    # argument.
15870    path="$complete"
15871    arguments="EOL"
15872    new_path=`$CYGPATH -u "$path"`
15873    new_path=`$WHICH "$new_path" 2> /dev/null`
15874    # bat and cmd files are not always considered executable in cygwin causing which
15875    # to not find them
15876    if test "x$new_path" = x \
15877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15879      new_path=`$CYGPATH -u "$path"`
15880    fi
15881    if test "x$new_path" = x; then
15882      # It's still not found. Now this is an unrecoverable error.
15883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15885      has_space=`$ECHO "$complete" | $GREP " "`
15886      if test "x$has_space" != x; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15889      fi
15890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15891    fi
15892  fi
15893
15894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15897  # "foo.exe" is OK but "foo" is an error.
15898  #
15899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15900  # It is also a way to make sure we got the proper file name for the real test later on.
15901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15902  if test "x$test_shortpath" = x; then
15903    # Short path failed, file does not exist as specified.
15904    # Try adding .exe or .cmd
15905    if test -f "${new_path}.exe"; then
15906      input_to_shortpath="${new_path}.exe"
15907    elif test -f "${new_path}.cmd"; then
15908      input_to_shortpath="${new_path}.cmd"
15909    else
15910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15915    fi
15916  else
15917    input_to_shortpath="$new_path"
15918  fi
15919
15920  # Call helper function which possibly converts this using DOS-style short mode.
15921  # If so, the updated path is stored in $new_path.
15922  new_path="$input_to_shortpath"
15923
15924  input_path="$input_to_shortpath"
15925  # Check if we need to convert this using DOS-style short mode. If the path
15926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15927  # take no chances and rewrite it.
15928  # Note: m4 eats our [], so we need to use [ and ] instead.
15929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15930  if test "x$has_forbidden_chars" != x; then
15931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15935      # Going to short mode and back again did indeed matter. Since short mode is
15936      # case insensitive, let's make it lowercase to improve readability.
15937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15938      # Now convert it back to Unix-style (cygpath)
15939      input_path=`$CYGPATH -u "$shortmode_path"`
15940      new_path="$input_path"
15941    fi
15942  fi
15943
15944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15945  if test "x$test_cygdrive_prefix" = x; then
15946    # As a simple fix, exclude /usr/bin since it's not a real path.
15947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15949      # a path prefixed by /cygdrive for fixpath to work.
15950      new_path="$CYGWIN_ROOT_PATH$input_path"
15951    fi
15952  fi
15953
15954  # remove trailing .exe if any
15955  new_path="${new_path/%.exe/}"
15956
15957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15958
15959  # First separate the path from the arguments. This will split at the first
15960  # space.
15961  complete="$FOUND_MAKE"
15962  path="${complete%% *}"
15963  tmp="$complete EOL"
15964  arguments="${tmp#* }"
15965
15966  # Input might be given as Windows format, start by converting to
15967  # unix format.
15968  new_path="$path"
15969
15970  windows_path="$new_path"
15971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972    unix_path=`$CYGPATH -u "$windows_path"`
15973    new_path="$unix_path"
15974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15976    new_path="$unix_path"
15977  fi
15978
15979
15980  # Now try to locate executable using which
15981  new_path=`$WHICH "$new_path" 2> /dev/null`
15982
15983  if test "x$new_path" = x; then
15984    # Oops. Which didn't find the executable.
15985    # The splitting of arguments from the executable at a space might have been incorrect,
15986    # since paths with space are more likely in Windows. Give it another try with the whole
15987    # argument.
15988    path="$complete"
15989    arguments="EOL"
15990    new_path="$path"
15991
15992  windows_path="$new_path"
15993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994    unix_path=`$CYGPATH -u "$windows_path"`
15995    new_path="$unix_path"
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15998    new_path="$unix_path"
15999  fi
16000
16001
16002    new_path=`$WHICH "$new_path" 2> /dev/null`
16003    # bat and cmd files are not always considered executable in MSYS causing which
16004    # to not find them
16005    if test "x$new_path" = x \
16006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16008      new_path="$path"
16009
16010  windows_path="$new_path"
16011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012    unix_path=`$CYGPATH -u "$windows_path"`
16013    new_path="$unix_path"
16014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16016    new_path="$unix_path"
16017  fi
16018
16019    fi
16020
16021    if test "x$new_path" = x; then
16022      # It's still not found. Now this is an unrecoverable error.
16023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16024$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16025      has_space=`$ECHO "$complete" | $GREP " "`
16026      if test "x$has_space" != x; then
16027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16029      fi
16030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16031    fi
16032  fi
16033
16034  # Now new_path has a complete unix path to the binary
16035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16036    # Keep paths in /bin as-is, but remove trailing .exe if any
16037    new_path="${new_path/%.exe/}"
16038    # Do not save /bin paths to all_fixpath_prefixes!
16039  else
16040    # Not in mixed or Windows style, start by that.
16041    new_path=`cmd //c echo $new_path`
16042
16043  input_path="$new_path"
16044  # Check if we need to convert this using DOS-style short mode. If the path
16045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16046  # take no chances and rewrite it.
16047  # Note: m4 eats our [], so we need to use [ and ] instead.
16048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16049  if test "x$has_forbidden_chars" != x; then
16050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16052  fi
16053
16054    # Output is in $new_path
16055
16056  windows_path="$new_path"
16057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16058    unix_path=`$CYGPATH -u "$windows_path"`
16059    new_path="$unix_path"
16060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16062    new_path="$unix_path"
16063  fi
16064
16065    # remove trailing .exe if any
16066    new_path="${new_path/%.exe/}"
16067
16068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16070  fi
16071
16072    else
16073      # We're on a unix platform. Hooray! :)
16074      # First separate the path from the arguments. This will split at the first
16075      # space.
16076      complete="$FOUND_MAKE"
16077      path="${complete%% *}"
16078      tmp="$complete EOL"
16079      arguments="${tmp#* }"
16080
16081      # Cannot rely on the command "which" here since it doesn't always work.
16082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16083      if test -z "$is_absolute_path"; then
16084        # Path to executable is not absolute. Find it.
16085        IFS_save="$IFS"
16086        IFS=:
16087        for p in $PATH; do
16088          if test -f "$p/$path" && test -x "$p/$path"; then
16089            new_path="$p/$path"
16090            break
16091          fi
16092        done
16093        IFS="$IFS_save"
16094      else
16095        # This is an absolute path, we can use it without further modifications.
16096        new_path="$path"
16097      fi
16098
16099      if test "x$new_path" = x; then
16100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16102        has_space=`$ECHO "$complete" | $GREP " "`
16103        if test "x$has_space" != x; then
16104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16106        fi
16107        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16108      fi
16109    fi
16110
16111    # Now join together the path and the arguments once again
16112    if test "x$arguments" != xEOL; then
16113      new_complete="$new_path ${arguments% *}"
16114    else
16115      new_complete="$new_path"
16116    fi
16117
16118    if test "x$complete" != "x$new_complete"; then
16119      FOUND_MAKE="$new_complete"
16120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16121$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16122    fi
16123  fi
16124
16125        fi
16126      fi
16127    fi
16128  fi
16129
16130
16131    if test "x$FOUND_MAKE" = x; then
16132      for ac_prog in make
16133do
16134  # Extract the first word of "$ac_prog", so it can be a program name with args.
16135set dummy $ac_prog; ac_word=$2
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16137$as_echo_n "checking for $ac_word... " >&6; }
16138if ${ac_cv_path_CHECK_MAKE+:} false; then :
16139  $as_echo_n "(cached) " >&6
16140else
16141  case $CHECK_MAKE in
16142  [\\/]* | ?:[\\/]*)
16143  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16144  ;;
16145  *)
16146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16147for as_dir in $PATH
16148do
16149  IFS=$as_save_IFS
16150  test -z "$as_dir" && as_dir=.
16151    for ac_exec_ext in '' $ac_executable_extensions; do
16152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16153    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16155    break 2
16156  fi
16157done
16158  done
16159IFS=$as_save_IFS
16160
16161  ;;
16162esac
16163fi
16164CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16165if test -n "$CHECK_MAKE"; then
16166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16167$as_echo "$CHECK_MAKE" >&6; }
16168else
16169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170$as_echo "no" >&6; }
16171fi
16172
16173
16174  test -n "$CHECK_MAKE" && break
16175done
16176
16177
16178  MAKE_CANDIDATE=""$CHECK_MAKE""
16179  DESCRIPTION="make in PATH"
16180
16181  # On Cygwin, we require a newer version of make than on other platforms
16182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16183    MAKE_VERSION_EXPR="-e 4\."
16184    MAKE_REQUIRED_VERSION="4.0"
16185   else
16186    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16187    MAKE_REQUIRED_VERSION="3.81"
16188  fi
16189
16190  if test "x$MAKE_CANDIDATE" != x; then
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16192$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16193    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16194    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16195    if test "x$IS_GNU_MAKE" = x; then
16196      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16197$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16198    else
16199      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16200      if test "x$IS_MODERN_MAKE" = x; then
16201        { $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
16202$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;}
16203      else
16204        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16205          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206            MAKE_EXPECTED_ENV='cygwin'
16207          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16208            MAKE_EXPECTED_ENV='msys'
16209          else
16210            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16211          fi
16212          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16213          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16214        else
16215          # Not relevant for non-Windows
16216          IS_MAKE_CORRECT_ENV=true
16217        fi
16218        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16219          { $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
16220$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;}
16221        else
16222          FOUND_MAKE=$MAKE_CANDIDATE
16223
16224  # Only process if variable expands to non-empty
16225
16226  if test "x$FOUND_MAKE" != x; then
16227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16228
16229  # First separate the path from the arguments. This will split at the first
16230  # space.
16231  complete="$FOUND_MAKE"
16232  path="${complete%% *}"
16233  tmp="$complete EOL"
16234  arguments="${tmp#* }"
16235
16236  # Input might be given as Windows format, start by converting to
16237  # unix format.
16238  new_path=`$CYGPATH -u "$path"`
16239
16240  # Now try to locate executable using which
16241  new_path=`$WHICH "$new_path" 2> /dev/null`
16242  # bat and cmd files are not always considered executable in cygwin causing which
16243  # to not find them
16244  if test "x$new_path" = x \
16245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16247    new_path=`$CYGPATH -u "$path"`
16248  fi
16249  if test "x$new_path" = x; then
16250    # Oops. Which didn't find the executable.
16251    # The splitting of arguments from the executable at a space might have been incorrect,
16252    # since paths with space are more likely in Windows. Give it another try with the whole
16253    # argument.
16254    path="$complete"
16255    arguments="EOL"
16256    new_path=`$CYGPATH -u "$path"`
16257    new_path=`$WHICH "$new_path" 2> /dev/null`
16258    # bat and cmd files are not always considered executable in cygwin causing which
16259    # to not find them
16260    if test "x$new_path" = x \
16261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16263      new_path=`$CYGPATH -u "$path"`
16264    fi
16265    if test "x$new_path" = x; then
16266      # It's still not found. Now this is an unrecoverable error.
16267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16269      has_space=`$ECHO "$complete" | $GREP " "`
16270      if test "x$has_space" != x; then
16271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16273      fi
16274      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16275    fi
16276  fi
16277
16278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16281  # "foo.exe" is OK but "foo" is an error.
16282  #
16283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16284  # It is also a way to make sure we got the proper file name for the real test later on.
16285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16286  if test "x$test_shortpath" = x; then
16287    # Short path failed, file does not exist as specified.
16288    # Try adding .exe or .cmd
16289    if test -f "${new_path}.exe"; then
16290      input_to_shortpath="${new_path}.exe"
16291    elif test -f "${new_path}.cmd"; then
16292      input_to_shortpath="${new_path}.cmd"
16293    else
16294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16299    fi
16300  else
16301    input_to_shortpath="$new_path"
16302  fi
16303
16304  # Call helper function which possibly converts this using DOS-style short mode.
16305  # If so, the updated path is stored in $new_path.
16306  new_path="$input_to_shortpath"
16307
16308  input_path="$input_to_shortpath"
16309  # Check if we need to convert this using DOS-style short mode. If the path
16310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16311  # take no chances and rewrite it.
16312  # Note: m4 eats our [], so we need to use [ and ] instead.
16313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16314  if test "x$has_forbidden_chars" != x; then
16315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16319      # Going to short mode and back again did indeed matter. Since short mode is
16320      # case insensitive, let's make it lowercase to improve readability.
16321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16322      # Now convert it back to Unix-style (cygpath)
16323      input_path=`$CYGPATH -u "$shortmode_path"`
16324      new_path="$input_path"
16325    fi
16326  fi
16327
16328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16329  if test "x$test_cygdrive_prefix" = x; then
16330    # As a simple fix, exclude /usr/bin since it's not a real path.
16331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16333      # a path prefixed by /cygdrive for fixpath to work.
16334      new_path="$CYGWIN_ROOT_PATH$input_path"
16335    fi
16336  fi
16337
16338  # remove trailing .exe if any
16339  new_path="${new_path/%.exe/}"
16340
16341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16342
16343  # First separate the path from the arguments. This will split at the first
16344  # space.
16345  complete="$FOUND_MAKE"
16346  path="${complete%% *}"
16347  tmp="$complete EOL"
16348  arguments="${tmp#* }"
16349
16350  # Input might be given as Windows format, start by converting to
16351  # unix format.
16352  new_path="$path"
16353
16354  windows_path="$new_path"
16355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16356    unix_path=`$CYGPATH -u "$windows_path"`
16357    new_path="$unix_path"
16358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16360    new_path="$unix_path"
16361  fi
16362
16363
16364  # Now try to locate executable using which
16365  new_path=`$WHICH "$new_path" 2> /dev/null`
16366
16367  if test "x$new_path" = x; then
16368    # Oops. Which didn't find the executable.
16369    # The splitting of arguments from the executable at a space might have been incorrect,
16370    # since paths with space are more likely in Windows. Give it another try with the whole
16371    # argument.
16372    path="$complete"
16373    arguments="EOL"
16374    new_path="$path"
16375
16376  windows_path="$new_path"
16377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378    unix_path=`$CYGPATH -u "$windows_path"`
16379    new_path="$unix_path"
16380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382    new_path="$unix_path"
16383  fi
16384
16385
16386    new_path=`$WHICH "$new_path" 2> /dev/null`
16387    # bat and cmd files are not always considered executable in MSYS causing which
16388    # to not find them
16389    if test "x$new_path" = x \
16390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16392      new_path="$path"
16393
16394  windows_path="$new_path"
16395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396    unix_path=`$CYGPATH -u "$windows_path"`
16397    new_path="$unix_path"
16398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16400    new_path="$unix_path"
16401  fi
16402
16403    fi
16404
16405    if test "x$new_path" = x; then
16406      # It's still not found. Now this is an unrecoverable error.
16407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16409      has_space=`$ECHO "$complete" | $GREP " "`
16410      if test "x$has_space" != x; then
16411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16413      fi
16414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16415    fi
16416  fi
16417
16418  # Now new_path has a complete unix path to the binary
16419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16420    # Keep paths in /bin as-is, but remove trailing .exe if any
16421    new_path="${new_path/%.exe/}"
16422    # Do not save /bin paths to all_fixpath_prefixes!
16423  else
16424    # Not in mixed or Windows style, start by that.
16425    new_path=`cmd //c echo $new_path`
16426
16427  input_path="$new_path"
16428  # Check if we need to convert this using DOS-style short mode. If the path
16429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16430  # take no chances and rewrite it.
16431  # Note: m4 eats our [], so we need to use [ and ] instead.
16432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16433  if test "x$has_forbidden_chars" != x; then
16434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16436  fi
16437
16438    # Output is in $new_path
16439
16440  windows_path="$new_path"
16441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442    unix_path=`$CYGPATH -u "$windows_path"`
16443    new_path="$unix_path"
16444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16446    new_path="$unix_path"
16447  fi
16448
16449    # remove trailing .exe if any
16450    new_path="${new_path/%.exe/}"
16451
16452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16454  fi
16455
16456    else
16457      # We're on a unix platform. Hooray! :)
16458      # First separate the path from the arguments. This will split at the first
16459      # space.
16460      complete="$FOUND_MAKE"
16461      path="${complete%% *}"
16462      tmp="$complete EOL"
16463      arguments="${tmp#* }"
16464
16465      # Cannot rely on the command "which" here since it doesn't always work.
16466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16467      if test -z "$is_absolute_path"; then
16468        # Path to executable is not absolute. Find it.
16469        IFS_save="$IFS"
16470        IFS=:
16471        for p in $PATH; do
16472          if test -f "$p/$path" && test -x "$p/$path"; then
16473            new_path="$p/$path"
16474            break
16475          fi
16476        done
16477        IFS="$IFS_save"
16478      else
16479        # This is an absolute path, we can use it without further modifications.
16480        new_path="$path"
16481      fi
16482
16483      if test "x$new_path" = x; then
16484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16486        has_space=`$ECHO "$complete" | $GREP " "`
16487        if test "x$has_space" != x; then
16488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16490        fi
16491        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16492      fi
16493    fi
16494
16495    # Now join together the path and the arguments once again
16496    if test "x$arguments" != xEOL; then
16497      new_complete="$new_path ${arguments% *}"
16498    else
16499      new_complete="$new_path"
16500    fi
16501
16502    if test "x$complete" != "x$new_complete"; then
16503      FOUND_MAKE="$new_complete"
16504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16505$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16506    fi
16507  fi
16508
16509        fi
16510      fi
16511    fi
16512  fi
16513
16514    fi
16515
16516    if test "x$FOUND_MAKE" = x; then
16517      if test "x$TOOLCHAIN_PATH" != x; then
16518        # We have a toolchain path, check that as well before giving up.
16519        OLD_PATH=$PATH
16520        PATH=$TOOLCHAIN_PATH:$PATH
16521        for ac_prog in gmake
16522do
16523  # Extract the first word of "$ac_prog", so it can be a program name with args.
16524set dummy $ac_prog; ac_word=$2
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16526$as_echo_n "checking for $ac_word... " >&6; }
16527if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16528  $as_echo_n "(cached) " >&6
16529else
16530  case $CHECK_TOOLSDIR_GMAKE in
16531  [\\/]* | ?:[\\/]*)
16532  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16533  ;;
16534  *)
16535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16536for as_dir in $PATH
16537do
16538  IFS=$as_save_IFS
16539  test -z "$as_dir" && as_dir=.
16540    for ac_exec_ext in '' $ac_executable_extensions; do
16541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16542    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16544    break 2
16545  fi
16546done
16547  done
16548IFS=$as_save_IFS
16549
16550  ;;
16551esac
16552fi
16553CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16554if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16556$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16557else
16558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16559$as_echo "no" >&6; }
16560fi
16561
16562
16563  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16564done
16565
16566
16567  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16568  DESCRIPTION="gmake in tools-dir"
16569
16570  # On Cygwin, we require a newer version of make than on other platforms
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572    MAKE_VERSION_EXPR="-e 4\."
16573    MAKE_REQUIRED_VERSION="4.0"
16574   else
16575    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16576    MAKE_REQUIRED_VERSION="3.81"
16577  fi
16578
16579  if test "x$MAKE_CANDIDATE" != x; then
16580    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16581$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16582    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16583    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16584    if test "x$IS_GNU_MAKE" = x; then
16585      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16586$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16587    else
16588      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16589      if test "x$IS_MODERN_MAKE" = x; then
16590        { $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
16591$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;}
16592      else
16593        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16594          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595            MAKE_EXPECTED_ENV='cygwin'
16596          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16597            MAKE_EXPECTED_ENV='msys'
16598          else
16599            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16600          fi
16601          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16602          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16603        else
16604          # Not relevant for non-Windows
16605          IS_MAKE_CORRECT_ENV=true
16606        fi
16607        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16608          { $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
16609$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;}
16610        else
16611          FOUND_MAKE=$MAKE_CANDIDATE
16612
16613  # Only process if variable expands to non-empty
16614
16615  if test "x$FOUND_MAKE" != x; then
16616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16617
16618  # First separate the path from the arguments. This will split at the first
16619  # space.
16620  complete="$FOUND_MAKE"
16621  path="${complete%% *}"
16622  tmp="$complete EOL"
16623  arguments="${tmp#* }"
16624
16625  # Input might be given as Windows format, start by converting to
16626  # unix format.
16627  new_path=`$CYGPATH -u "$path"`
16628
16629  # Now try to locate executable using which
16630  new_path=`$WHICH "$new_path" 2> /dev/null`
16631  # bat and cmd files are not always considered executable in cygwin causing which
16632  # to not find them
16633  if test "x$new_path" = x \
16634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16636    new_path=`$CYGPATH -u "$path"`
16637  fi
16638  if test "x$new_path" = x; then
16639    # Oops. Which didn't find the executable.
16640    # The splitting of arguments from the executable at a space might have been incorrect,
16641    # since paths with space are more likely in Windows. Give it another try with the whole
16642    # argument.
16643    path="$complete"
16644    arguments="EOL"
16645    new_path=`$CYGPATH -u "$path"`
16646    new_path=`$WHICH "$new_path" 2> /dev/null`
16647    # bat and cmd files are not always considered executable in cygwin causing which
16648    # to not find them
16649    if test "x$new_path" = x \
16650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16652      new_path=`$CYGPATH -u "$path"`
16653    fi
16654    if test "x$new_path" = x; then
16655      # It's still not found. Now this is an unrecoverable error.
16656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16658      has_space=`$ECHO "$complete" | $GREP " "`
16659      if test "x$has_space" != x; then
16660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16662      fi
16663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16664    fi
16665  fi
16666
16667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16670  # "foo.exe" is OK but "foo" is an error.
16671  #
16672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16673  # It is also a way to make sure we got the proper file name for the real test later on.
16674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16675  if test "x$test_shortpath" = x; then
16676    # Short path failed, file does not exist as specified.
16677    # Try adding .exe or .cmd
16678    if test -f "${new_path}.exe"; then
16679      input_to_shortpath="${new_path}.exe"
16680    elif test -f "${new_path}.cmd"; then
16681      input_to_shortpath="${new_path}.cmd"
16682    else
16683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16688    fi
16689  else
16690    input_to_shortpath="$new_path"
16691  fi
16692
16693  # Call helper function which possibly converts this using DOS-style short mode.
16694  # If so, the updated path is stored in $new_path.
16695  new_path="$input_to_shortpath"
16696
16697  input_path="$input_to_shortpath"
16698  # Check if we need to convert this using DOS-style short mode. If the path
16699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16700  # take no chances and rewrite it.
16701  # Note: m4 eats our [], so we need to use [ and ] instead.
16702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16703  if test "x$has_forbidden_chars" != x; then
16704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16708      # Going to short mode and back again did indeed matter. Since short mode is
16709      # case insensitive, let's make it lowercase to improve readability.
16710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16711      # Now convert it back to Unix-style (cygpath)
16712      input_path=`$CYGPATH -u "$shortmode_path"`
16713      new_path="$input_path"
16714    fi
16715  fi
16716
16717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16718  if test "x$test_cygdrive_prefix" = x; then
16719    # As a simple fix, exclude /usr/bin since it's not a real path.
16720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16722      # a path prefixed by /cygdrive for fixpath to work.
16723      new_path="$CYGWIN_ROOT_PATH$input_path"
16724    fi
16725  fi
16726
16727  # remove trailing .exe if any
16728  new_path="${new_path/%.exe/}"
16729
16730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731
16732  # First separate the path from the arguments. This will split at the first
16733  # space.
16734  complete="$FOUND_MAKE"
16735  path="${complete%% *}"
16736  tmp="$complete EOL"
16737  arguments="${tmp#* }"
16738
16739  # Input might be given as Windows format, start by converting to
16740  # unix format.
16741  new_path="$path"
16742
16743  windows_path="$new_path"
16744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745    unix_path=`$CYGPATH -u "$windows_path"`
16746    new_path="$unix_path"
16747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16749    new_path="$unix_path"
16750  fi
16751
16752
16753  # Now try to locate executable using which
16754  new_path=`$WHICH "$new_path" 2> /dev/null`
16755
16756  if test "x$new_path" = x; then
16757    # Oops. Which didn't find the executable.
16758    # The splitting of arguments from the executable at a space might have been incorrect,
16759    # since paths with space are more likely in Windows. Give it another try with the whole
16760    # argument.
16761    path="$complete"
16762    arguments="EOL"
16763    new_path="$path"
16764
16765  windows_path="$new_path"
16766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16767    unix_path=`$CYGPATH -u "$windows_path"`
16768    new_path="$unix_path"
16769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16771    new_path="$unix_path"
16772  fi
16773
16774
16775    new_path=`$WHICH "$new_path" 2> /dev/null`
16776    # bat and cmd files are not always considered executable in MSYS causing which
16777    # to not find them
16778    if test "x$new_path" = x \
16779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16781      new_path="$path"
16782
16783  windows_path="$new_path"
16784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16785    unix_path=`$CYGPATH -u "$windows_path"`
16786    new_path="$unix_path"
16787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16789    new_path="$unix_path"
16790  fi
16791
16792    fi
16793
16794    if test "x$new_path" = x; then
16795      # It's still not found. Now this is an unrecoverable error.
16796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16797$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16798      has_space=`$ECHO "$complete" | $GREP " "`
16799      if test "x$has_space" != x; then
16800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16802      fi
16803      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16804    fi
16805  fi
16806
16807  # Now new_path has a complete unix path to the binary
16808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16809    # Keep paths in /bin as-is, but remove trailing .exe if any
16810    new_path="${new_path/%.exe/}"
16811    # Do not save /bin paths to all_fixpath_prefixes!
16812  else
16813    # Not in mixed or Windows style, start by that.
16814    new_path=`cmd //c echo $new_path`
16815
16816  input_path="$new_path"
16817  # Check if we need to convert this using DOS-style short mode. If the path
16818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16819  # take no chances and rewrite it.
16820  # Note: m4 eats our [], so we need to use [ and ] instead.
16821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16822  if test "x$has_forbidden_chars" != x; then
16823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16825  fi
16826
16827    # Output is in $new_path
16828
16829  windows_path="$new_path"
16830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16831    unix_path=`$CYGPATH -u "$windows_path"`
16832    new_path="$unix_path"
16833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16835    new_path="$unix_path"
16836  fi
16837
16838    # remove trailing .exe if any
16839    new_path="${new_path/%.exe/}"
16840
16841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16843  fi
16844
16845    else
16846      # We're on a unix platform. Hooray! :)
16847      # First separate the path from the arguments. This will split at the first
16848      # space.
16849      complete="$FOUND_MAKE"
16850      path="${complete%% *}"
16851      tmp="$complete EOL"
16852      arguments="${tmp#* }"
16853
16854      # Cannot rely on the command "which" here since it doesn't always work.
16855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16856      if test -z "$is_absolute_path"; then
16857        # Path to executable is not absolute. Find it.
16858        IFS_save="$IFS"
16859        IFS=:
16860        for p in $PATH; do
16861          if test -f "$p/$path" && test -x "$p/$path"; then
16862            new_path="$p/$path"
16863            break
16864          fi
16865        done
16866        IFS="$IFS_save"
16867      else
16868        # This is an absolute path, we can use it without further modifications.
16869        new_path="$path"
16870      fi
16871
16872      if test "x$new_path" = x; then
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16875        has_space=`$ECHO "$complete" | $GREP " "`
16876        if test "x$has_space" != x; then
16877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16879        fi
16880        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16881      fi
16882    fi
16883
16884    # Now join together the path and the arguments once again
16885    if test "x$arguments" != xEOL; then
16886      new_complete="$new_path ${arguments% *}"
16887    else
16888      new_complete="$new_path"
16889    fi
16890
16891    if test "x$complete" != "x$new_complete"; then
16892      FOUND_MAKE="$new_complete"
16893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16894$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16895    fi
16896  fi
16897
16898        fi
16899      fi
16900    fi
16901  fi
16902
16903        if test "x$FOUND_MAKE" = x; then
16904          for ac_prog in make
16905do
16906  # Extract the first word of "$ac_prog", so it can be a program name with args.
16907set dummy $ac_prog; ac_word=$2
16908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16909$as_echo_n "checking for $ac_word... " >&6; }
16910if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16911  $as_echo_n "(cached) " >&6
16912else
16913  case $CHECK_TOOLSDIR_MAKE in
16914  [\\/]* | ?:[\\/]*)
16915  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16916  ;;
16917  *)
16918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16919for as_dir in $PATH
16920do
16921  IFS=$as_save_IFS
16922  test -z "$as_dir" && as_dir=.
16923    for ac_exec_ext in '' $ac_executable_extensions; do
16924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16925    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16927    break 2
16928  fi
16929done
16930  done
16931IFS=$as_save_IFS
16932
16933  ;;
16934esac
16935fi
16936CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16937if test -n "$CHECK_TOOLSDIR_MAKE"; then
16938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16939$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16940else
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16942$as_echo "no" >&6; }
16943fi
16944
16945
16946  test -n "$CHECK_TOOLSDIR_MAKE" && break
16947done
16948
16949
16950  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16951  DESCRIPTION="make in tools-dir"
16952
16953  # On Cygwin, we require a newer version of make than on other platforms
16954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16955    MAKE_VERSION_EXPR="-e 4\."
16956    MAKE_REQUIRED_VERSION="4.0"
16957   else
16958    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16959    MAKE_REQUIRED_VERSION="3.81"
16960  fi
16961
16962  if test "x$MAKE_CANDIDATE" != x; then
16963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16967    if test "x$IS_GNU_MAKE" = x; then
16968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16970    else
16971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16972      if test "x$IS_MODERN_MAKE" = x; then
16973        { $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
16974$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;}
16975      else
16976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978            MAKE_EXPECTED_ENV='cygwin'
16979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980            MAKE_EXPECTED_ENV='msys'
16981          else
16982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16983          fi
16984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16986        else
16987          # Not relevant for non-Windows
16988          IS_MAKE_CORRECT_ENV=true
16989        fi
16990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16991          { $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
16992$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;}
16993        else
16994          FOUND_MAKE=$MAKE_CANDIDATE
16995
16996  # Only process if variable expands to non-empty
16997
16998  if test "x$FOUND_MAKE" != x; then
16999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000
17001  # First separate the path from the arguments. This will split at the first
17002  # space.
17003  complete="$FOUND_MAKE"
17004  path="${complete%% *}"
17005  tmp="$complete EOL"
17006  arguments="${tmp#* }"
17007
17008  # Input might be given as Windows format, start by converting to
17009  # unix format.
17010  new_path=`$CYGPATH -u "$path"`
17011
17012  # Now try to locate executable using which
17013  new_path=`$WHICH "$new_path" 2> /dev/null`
17014  # bat and cmd files are not always considered executable in cygwin causing which
17015  # to not find them
17016  if test "x$new_path" = x \
17017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17019    new_path=`$CYGPATH -u "$path"`
17020  fi
17021  if test "x$new_path" = x; then
17022    # Oops. Which didn't find the executable.
17023    # The splitting of arguments from the executable at a space might have been incorrect,
17024    # since paths with space are more likely in Windows. Give it another try with the whole
17025    # argument.
17026    path="$complete"
17027    arguments="EOL"
17028    new_path=`$CYGPATH -u "$path"`
17029    new_path=`$WHICH "$new_path" 2> /dev/null`
17030    # bat and cmd files are not always considered executable in cygwin causing which
17031    # to not find them
17032    if test "x$new_path" = x \
17033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17035      new_path=`$CYGPATH -u "$path"`
17036    fi
17037    if test "x$new_path" = x; then
17038      # It's still not found. Now this is an unrecoverable error.
17039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17041      has_space=`$ECHO "$complete" | $GREP " "`
17042      if test "x$has_space" != x; then
17043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17045      fi
17046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17047    fi
17048  fi
17049
17050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17053  # "foo.exe" is OK but "foo" is an error.
17054  #
17055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17056  # It is also a way to make sure we got the proper file name for the real test later on.
17057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17058  if test "x$test_shortpath" = x; then
17059    # Short path failed, file does not exist as specified.
17060    # Try adding .exe or .cmd
17061    if test -f "${new_path}.exe"; then
17062      input_to_shortpath="${new_path}.exe"
17063    elif test -f "${new_path}.cmd"; then
17064      input_to_shortpath="${new_path}.cmd"
17065    else
17066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17071    fi
17072  else
17073    input_to_shortpath="$new_path"
17074  fi
17075
17076  # Call helper function which possibly converts this using DOS-style short mode.
17077  # If so, the updated path is stored in $new_path.
17078  new_path="$input_to_shortpath"
17079
17080  input_path="$input_to_shortpath"
17081  # Check if we need to convert this using DOS-style short mode. If the path
17082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17083  # take no chances and rewrite it.
17084  # Note: m4 eats our [], so we need to use [ and ] instead.
17085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17086  if test "x$has_forbidden_chars" != x; then
17087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17091      # Going to short mode and back again did indeed matter. Since short mode is
17092      # case insensitive, let's make it lowercase to improve readability.
17093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17094      # Now convert it back to Unix-style (cygpath)
17095      input_path=`$CYGPATH -u "$shortmode_path"`
17096      new_path="$input_path"
17097    fi
17098  fi
17099
17100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17101  if test "x$test_cygdrive_prefix" = x; then
17102    # As a simple fix, exclude /usr/bin since it's not a real path.
17103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17105      # a path prefixed by /cygdrive for fixpath to work.
17106      new_path="$CYGWIN_ROOT_PATH$input_path"
17107    fi
17108  fi
17109
17110  # remove trailing .exe if any
17111  new_path="${new_path/%.exe/}"
17112
17113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114
17115  # First separate the path from the arguments. This will split at the first
17116  # space.
17117  complete="$FOUND_MAKE"
17118  path="${complete%% *}"
17119  tmp="$complete EOL"
17120  arguments="${tmp#* }"
17121
17122  # Input might be given as Windows format, start by converting to
17123  # unix format.
17124  new_path="$path"
17125
17126  windows_path="$new_path"
17127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17128    unix_path=`$CYGPATH -u "$windows_path"`
17129    new_path="$unix_path"
17130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17132    new_path="$unix_path"
17133  fi
17134
17135
17136  # Now try to locate executable using which
17137  new_path=`$WHICH "$new_path" 2> /dev/null`
17138
17139  if test "x$new_path" = x; then
17140    # Oops. Which didn't find the executable.
17141    # The splitting of arguments from the executable at a space might have been incorrect,
17142    # since paths with space are more likely in Windows. Give it another try with the whole
17143    # argument.
17144    path="$complete"
17145    arguments="EOL"
17146    new_path="$path"
17147
17148  windows_path="$new_path"
17149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17150    unix_path=`$CYGPATH -u "$windows_path"`
17151    new_path="$unix_path"
17152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17154    new_path="$unix_path"
17155  fi
17156
17157
17158    new_path=`$WHICH "$new_path" 2> /dev/null`
17159    # bat and cmd files are not always considered executable in MSYS causing which
17160    # to not find them
17161    if test "x$new_path" = x \
17162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17164      new_path="$path"
17165
17166  windows_path="$new_path"
17167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168    unix_path=`$CYGPATH -u "$windows_path"`
17169    new_path="$unix_path"
17170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17172    new_path="$unix_path"
17173  fi
17174
17175    fi
17176
17177    if test "x$new_path" = x; then
17178      # It's still not found. Now this is an unrecoverable error.
17179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17181      has_space=`$ECHO "$complete" | $GREP " "`
17182      if test "x$has_space" != x; then
17183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17185      fi
17186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17187    fi
17188  fi
17189
17190  # Now new_path has a complete unix path to the binary
17191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17192    # Keep paths in /bin as-is, but remove trailing .exe if any
17193    new_path="${new_path/%.exe/}"
17194    # Do not save /bin paths to all_fixpath_prefixes!
17195  else
17196    # Not in mixed or Windows style, start by that.
17197    new_path=`cmd //c echo $new_path`
17198
17199  input_path="$new_path"
17200  # Check if we need to convert this using DOS-style short mode. If the path
17201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17202  # take no chances and rewrite it.
17203  # Note: m4 eats our [], so we need to use [ and ] instead.
17204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17205  if test "x$has_forbidden_chars" != x; then
17206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17208  fi
17209
17210    # Output is in $new_path
17211
17212  windows_path="$new_path"
17213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17214    unix_path=`$CYGPATH -u "$windows_path"`
17215    new_path="$unix_path"
17216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17218    new_path="$unix_path"
17219  fi
17220
17221    # remove trailing .exe if any
17222    new_path="${new_path/%.exe/}"
17223
17224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17226  fi
17227
17228    else
17229      # We're on a unix platform. Hooray! :)
17230      # First separate the path from the arguments. This will split at the first
17231      # space.
17232      complete="$FOUND_MAKE"
17233      path="${complete%% *}"
17234      tmp="$complete EOL"
17235      arguments="${tmp#* }"
17236
17237      # Cannot rely on the command "which" here since it doesn't always work.
17238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17239      if test -z "$is_absolute_path"; then
17240        # Path to executable is not absolute. Find it.
17241        IFS_save="$IFS"
17242        IFS=:
17243        for p in $PATH; do
17244          if test -f "$p/$path" && test -x "$p/$path"; then
17245            new_path="$p/$path"
17246            break
17247          fi
17248        done
17249        IFS="$IFS_save"
17250      else
17251        # This is an absolute path, we can use it without further modifications.
17252        new_path="$path"
17253      fi
17254
17255      if test "x$new_path" = x; then
17256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17258        has_space=`$ECHO "$complete" | $GREP " "`
17259        if test "x$has_space" != x; then
17260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17262        fi
17263        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17264      fi
17265    fi
17266
17267    # Now join together the path and the arguments once again
17268    if test "x$arguments" != xEOL; then
17269      new_complete="$new_path ${arguments% *}"
17270    else
17271      new_complete="$new_path"
17272    fi
17273
17274    if test "x$complete" != "x$new_complete"; then
17275      FOUND_MAKE="$new_complete"
17276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17277$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17278    fi
17279  fi
17280
17281        fi
17282      fi
17283    fi
17284  fi
17285
17286        fi
17287        PATH=$OLD_PATH
17288      fi
17289    fi
17290
17291    if test "x$FOUND_MAKE" = x; then
17292      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
17293    fi
17294  fi
17295
17296  MAKE=$FOUND_MAKE
17297
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17299$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17300
17301
17302  # Check if make supports the output sync option and if so, setup using it.
17303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17304$as_echo_n "checking if make --output-sync is supported... " >&6; }
17305  if $MAKE --version -O > /dev/null 2>&1; then
17306    OUTPUT_SYNC_SUPPORTED=true
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17308$as_echo "yes" >&6; }
17309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17310$as_echo_n "checking for output-sync value... " >&6; }
17311
17312# Check whether --with-output-sync was given.
17313if test "${with_output_sync+set}" = set; then :
17314  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17315fi
17316
17317    if test "x$OUTPUT_SYNC" = "x"; then
17318      OUTPUT_SYNC=none
17319    fi
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17321$as_echo "$OUTPUT_SYNC" >&6; }
17322    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17323      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17324    fi
17325  else
17326    OUTPUT_SYNC_SUPPORTED=false
17327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328$as_echo "no" >&6; }
17329  fi
17330
17331
17332
17333
17334
17335
17336  # Test if find supports -delete
17337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17338$as_echo_n "checking if find supports -delete... " >&6; }
17339  FIND_DELETE="-delete"
17340
17341  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17342
17343  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17344
17345  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17346  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17347    # No, it does not.
17348    rm $DELETEDIR/TestIfFindSupportsDelete
17349    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17350      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17351      FIND_DELETE="-print | xargs rm"
17352    else
17353      FIND_DELETE="-exec rm \{\} \+"
17354    fi
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17356$as_echo "no" >&6; }
17357  else
17358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17359$as_echo "yes" >&6; }
17360  fi
17361  rmdir $DELETEDIR
17362
17363
17364
17365  # These tools might not be installed by default,
17366  # need hint on how to install them.
17367
17368
17369
17370  # Publish this variable in the help.
17371
17372
17373  if test "x$UNZIP" = x; then
17374    # The variable is not set by user, try to locate tool using the code snippet
17375    for ac_prog in unzip
17376do
17377  # Extract the first word of "$ac_prog", so it can be a program name with args.
17378set dummy $ac_prog; ac_word=$2
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380$as_echo_n "checking for $ac_word... " >&6; }
17381if ${ac_cv_path_UNZIP+:} false; then :
17382  $as_echo_n "(cached) " >&6
17383else
17384  case $UNZIP in
17385  [\\/]* | ?:[\\/]*)
17386  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17387  ;;
17388  *)
17389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17390for as_dir in $PATH
17391do
17392  IFS=$as_save_IFS
17393  test -z "$as_dir" && as_dir=.
17394    for ac_exec_ext in '' $ac_executable_extensions; do
17395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17396    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17398    break 2
17399  fi
17400done
17401  done
17402IFS=$as_save_IFS
17403
17404  ;;
17405esac
17406fi
17407UNZIP=$ac_cv_path_UNZIP
17408if test -n "$UNZIP"; then
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17410$as_echo "$UNZIP" >&6; }
17411else
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413$as_echo "no" >&6; }
17414fi
17415
17416
17417  test -n "$UNZIP" && break
17418done
17419
17420  else
17421    # The variable is set, but is it from the command line or the environment?
17422
17423    # Try to remove the string !UNZIP! from our list.
17424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17426      # If it failed, the variable was not from the command line. Ignore it,
17427      # but warn the user (except for BASH, which is always set by the calling BASH).
17428      if test "xUNZIP" != xBASH; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17430$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17431      fi
17432      # Try to locate tool using the code snippet
17433      for ac_prog in unzip
17434do
17435  # Extract the first word of "$ac_prog", so it can be a program name with args.
17436set dummy $ac_prog; ac_word=$2
17437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438$as_echo_n "checking for $ac_word... " >&6; }
17439if ${ac_cv_path_UNZIP+:} false; then :
17440  $as_echo_n "(cached) " >&6
17441else
17442  case $UNZIP in
17443  [\\/]* | ?:[\\/]*)
17444  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17445  ;;
17446  *)
17447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450  IFS=$as_save_IFS
17451  test -z "$as_dir" && as_dir=.
17452    for ac_exec_ext in '' $ac_executable_extensions; do
17453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17454    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456    break 2
17457  fi
17458done
17459  done
17460IFS=$as_save_IFS
17461
17462  ;;
17463esac
17464fi
17465UNZIP=$ac_cv_path_UNZIP
17466if test -n "$UNZIP"; then
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17468$as_echo "$UNZIP" >&6; }
17469else
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471$as_echo "no" >&6; }
17472fi
17473
17474
17475  test -n "$UNZIP" && break
17476done
17477
17478    else
17479      # If it succeeded, then it was overridden by the user. We will use it
17480      # for the tool.
17481
17482      # First remove it from the list of overridden variables, so we can test
17483      # for unknown variables in the end.
17484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17485
17486      # Check if the provided tool contains a complete path.
17487      tool_specified="$UNZIP"
17488      tool_basename="${tool_specified##*/}"
17489      if test "x$tool_basename" = "x$tool_specified"; then
17490        # A command without a complete path is provided, search $PATH.
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17492$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17493        # Extract the first word of "$tool_basename", so it can be a program name with args.
17494set dummy $tool_basename; ac_word=$2
17495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17496$as_echo_n "checking for $ac_word... " >&6; }
17497if ${ac_cv_path_UNZIP+:} false; then :
17498  $as_echo_n "(cached) " >&6
17499else
17500  case $UNZIP in
17501  [\\/]* | ?:[\\/]*)
17502  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17503  ;;
17504  *)
17505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17506for as_dir in $PATH
17507do
17508  IFS=$as_save_IFS
17509  test -z "$as_dir" && as_dir=.
17510    for ac_exec_ext in '' $ac_executable_extensions; do
17511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17512    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17514    break 2
17515  fi
17516done
17517  done
17518IFS=$as_save_IFS
17519
17520  ;;
17521esac
17522fi
17523UNZIP=$ac_cv_path_UNZIP
17524if test -n "$UNZIP"; then
17525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17526$as_echo "$UNZIP" >&6; }
17527else
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17529$as_echo "no" >&6; }
17530fi
17531
17532
17533        if test "x$UNZIP" = x; then
17534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17535        fi
17536      else
17537        # Otherwise we believe it is a complete path. Use it as it is.
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17539$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17541$as_echo_n "checking for UNZIP... " >&6; }
17542        if test ! -x "$tool_specified"; then
17543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17544$as_echo "not found" >&6; }
17545          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17546        fi
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17548$as_echo "$tool_specified" >&6; }
17549      fi
17550    fi
17551  fi
17552
17553
17554
17555  if test "x$UNZIP" = x; then
17556    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17557  fi
17558
17559
17560
17561
17562
17563  # Publish this variable in the help.
17564
17565
17566  if test "x$ZIP" = x; then
17567    # The variable is not set by user, try to locate tool using the code snippet
17568    for ac_prog in zip
17569do
17570  # Extract the first word of "$ac_prog", so it can be a program name with args.
17571set dummy $ac_prog; ac_word=$2
17572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17573$as_echo_n "checking for $ac_word... " >&6; }
17574if ${ac_cv_path_ZIP+:} false; then :
17575  $as_echo_n "(cached) " >&6
17576else
17577  case $ZIP in
17578  [\\/]* | ?:[\\/]*)
17579  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17580  ;;
17581  *)
17582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17583for as_dir in $PATH
17584do
17585  IFS=$as_save_IFS
17586  test -z "$as_dir" && as_dir=.
17587    for ac_exec_ext in '' $ac_executable_extensions; do
17588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17589    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17591    break 2
17592  fi
17593done
17594  done
17595IFS=$as_save_IFS
17596
17597  ;;
17598esac
17599fi
17600ZIP=$ac_cv_path_ZIP
17601if test -n "$ZIP"; then
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17603$as_echo "$ZIP" >&6; }
17604else
17605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17606$as_echo "no" >&6; }
17607fi
17608
17609
17610  test -n "$ZIP" && break
17611done
17612
17613  else
17614    # The variable is set, but is it from the command line or the environment?
17615
17616    # Try to remove the string !ZIP! from our list.
17617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17619      # If it failed, the variable was not from the command line. Ignore it,
17620      # but warn the user (except for BASH, which is always set by the calling BASH).
17621      if test "xZIP" != xBASH; then
17622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17623$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17624      fi
17625      # Try to locate tool using the code snippet
17626      for ac_prog in zip
17627do
17628  # Extract the first word of "$ac_prog", so it can be a program name with args.
17629set dummy $ac_prog; ac_word=$2
17630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17631$as_echo_n "checking for $ac_word... " >&6; }
17632if ${ac_cv_path_ZIP+:} false; then :
17633  $as_echo_n "(cached) " >&6
17634else
17635  case $ZIP in
17636  [\\/]* | ?:[\\/]*)
17637  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17638  ;;
17639  *)
17640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641for as_dir in $PATH
17642do
17643  IFS=$as_save_IFS
17644  test -z "$as_dir" && as_dir=.
17645    for ac_exec_ext in '' $ac_executable_extensions; do
17646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17647    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17649    break 2
17650  fi
17651done
17652  done
17653IFS=$as_save_IFS
17654
17655  ;;
17656esac
17657fi
17658ZIP=$ac_cv_path_ZIP
17659if test -n "$ZIP"; then
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17661$as_echo "$ZIP" >&6; }
17662else
17663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17664$as_echo "no" >&6; }
17665fi
17666
17667
17668  test -n "$ZIP" && break
17669done
17670
17671    else
17672      # If it succeeded, then it was overridden by the user. We will use it
17673      # for the tool.
17674
17675      # First remove it from the list of overridden variables, so we can test
17676      # for unknown variables in the end.
17677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17678
17679      # Check if the provided tool contains a complete path.
17680      tool_specified="$ZIP"
17681      tool_basename="${tool_specified##*/}"
17682      if test "x$tool_basename" = "x$tool_specified"; then
17683        # A command without a complete path is provided, search $PATH.
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17685$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17686        # Extract the first word of "$tool_basename", so it can be a program name with args.
17687set dummy $tool_basename; ac_word=$2
17688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17689$as_echo_n "checking for $ac_word... " >&6; }
17690if ${ac_cv_path_ZIP+:} false; then :
17691  $as_echo_n "(cached) " >&6
17692else
17693  case $ZIP in
17694  [\\/]* | ?:[\\/]*)
17695  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17696  ;;
17697  *)
17698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17699for as_dir in $PATH
17700do
17701  IFS=$as_save_IFS
17702  test -z "$as_dir" && as_dir=.
17703    for ac_exec_ext in '' $ac_executable_extensions; do
17704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17705    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17707    break 2
17708  fi
17709done
17710  done
17711IFS=$as_save_IFS
17712
17713  ;;
17714esac
17715fi
17716ZIP=$ac_cv_path_ZIP
17717if test -n "$ZIP"; then
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17719$as_echo "$ZIP" >&6; }
17720else
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17722$as_echo "no" >&6; }
17723fi
17724
17725
17726        if test "x$ZIP" = x; then
17727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17728        fi
17729      else
17730        # Otherwise we believe it is a complete path. Use it as it is.
17731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17732$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17734$as_echo_n "checking for ZIP... " >&6; }
17735        if test ! -x "$tool_specified"; then
17736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17737$as_echo "not found" >&6; }
17738          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17739        fi
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17741$as_echo "$tool_specified" >&6; }
17742      fi
17743    fi
17744  fi
17745
17746
17747
17748  if test "x$ZIP" = x; then
17749    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17750  fi
17751
17752
17753
17754  # Non-required basic tools
17755
17756
17757
17758  # Publish this variable in the help.
17759
17760
17761  if test "x$LDD" = x; then
17762    # The variable is not set by user, try to locate tool using the code snippet
17763    for ac_prog in ldd
17764do
17765  # Extract the first word of "$ac_prog", so it can be a program name with args.
17766set dummy $ac_prog; ac_word=$2
17767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17768$as_echo_n "checking for $ac_word... " >&6; }
17769if ${ac_cv_path_LDD+:} false; then :
17770  $as_echo_n "(cached) " >&6
17771else
17772  case $LDD in
17773  [\\/]* | ?:[\\/]*)
17774  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17775  ;;
17776  *)
17777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17778for as_dir in $PATH
17779do
17780  IFS=$as_save_IFS
17781  test -z "$as_dir" && as_dir=.
17782    for ac_exec_ext in '' $ac_executable_extensions; do
17783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17784    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17786    break 2
17787  fi
17788done
17789  done
17790IFS=$as_save_IFS
17791
17792  ;;
17793esac
17794fi
17795LDD=$ac_cv_path_LDD
17796if test -n "$LDD"; then
17797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17798$as_echo "$LDD" >&6; }
17799else
17800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17801$as_echo "no" >&6; }
17802fi
17803
17804
17805  test -n "$LDD" && break
17806done
17807
17808  else
17809    # The variable is set, but is it from the command line or the environment?
17810
17811    # Try to remove the string !LDD! from our list.
17812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17814      # If it failed, the variable was not from the command line. Ignore it,
17815      # but warn the user (except for BASH, which is always set by the calling BASH).
17816      if test "xLDD" != xBASH; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17818$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17819      fi
17820      # Try to locate tool using the code snippet
17821      for ac_prog in ldd
17822do
17823  # Extract the first word of "$ac_prog", so it can be a program name with args.
17824set dummy $ac_prog; ac_word=$2
17825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17826$as_echo_n "checking for $ac_word... " >&6; }
17827if ${ac_cv_path_LDD+:} false; then :
17828  $as_echo_n "(cached) " >&6
17829else
17830  case $LDD in
17831  [\\/]* | ?:[\\/]*)
17832  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17833  ;;
17834  *)
17835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17836for as_dir in $PATH
17837do
17838  IFS=$as_save_IFS
17839  test -z "$as_dir" && as_dir=.
17840    for ac_exec_ext in '' $ac_executable_extensions; do
17841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17842    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17844    break 2
17845  fi
17846done
17847  done
17848IFS=$as_save_IFS
17849
17850  ;;
17851esac
17852fi
17853LDD=$ac_cv_path_LDD
17854if test -n "$LDD"; then
17855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17856$as_echo "$LDD" >&6; }
17857else
17858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17859$as_echo "no" >&6; }
17860fi
17861
17862
17863  test -n "$LDD" && break
17864done
17865
17866    else
17867      # If it succeeded, then it was overridden by the user. We will use it
17868      # for the tool.
17869
17870      # First remove it from the list of overridden variables, so we can test
17871      # for unknown variables in the end.
17872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17873
17874      # Check if the provided tool contains a complete path.
17875      tool_specified="$LDD"
17876      tool_basename="${tool_specified##*/}"
17877      if test "x$tool_basename" = "x$tool_specified"; then
17878        # A command without a complete path is provided, search $PATH.
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17880$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17881        # Extract the first word of "$tool_basename", so it can be a program name with args.
17882set dummy $tool_basename; ac_word=$2
17883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17884$as_echo_n "checking for $ac_word... " >&6; }
17885if ${ac_cv_path_LDD+:} false; then :
17886  $as_echo_n "(cached) " >&6
17887else
17888  case $LDD in
17889  [\\/]* | ?:[\\/]*)
17890  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17891  ;;
17892  *)
17893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17894for as_dir in $PATH
17895do
17896  IFS=$as_save_IFS
17897  test -z "$as_dir" && as_dir=.
17898    for ac_exec_ext in '' $ac_executable_extensions; do
17899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17900    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17902    break 2
17903  fi
17904done
17905  done
17906IFS=$as_save_IFS
17907
17908  ;;
17909esac
17910fi
17911LDD=$ac_cv_path_LDD
17912if test -n "$LDD"; then
17913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17914$as_echo "$LDD" >&6; }
17915else
17916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17917$as_echo "no" >&6; }
17918fi
17919
17920
17921        if test "x$LDD" = x; then
17922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17923        fi
17924      else
17925        # Otherwise we believe it is a complete path. Use it as it is.
17926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17927$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17929$as_echo_n "checking for LDD... " >&6; }
17930        if test ! -x "$tool_specified"; then
17931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17932$as_echo "not found" >&6; }
17933          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17934        fi
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17936$as_echo "$tool_specified" >&6; }
17937      fi
17938    fi
17939  fi
17940
17941
17942  if test "x$LDD" = "x"; then
17943    # List shared lib dependencies is used for
17944    # debug output and checking for forbidden dependencies.
17945    # We can build without it.
17946    LDD="true"
17947  fi
17948
17949
17950  # Publish this variable in the help.
17951
17952
17953  if test "x$OTOOL" = x; then
17954    # The variable is not set by user, try to locate tool using the code snippet
17955    for ac_prog in otool
17956do
17957  # Extract the first word of "$ac_prog", so it can be a program name with args.
17958set dummy $ac_prog; ac_word=$2
17959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17960$as_echo_n "checking for $ac_word... " >&6; }
17961if ${ac_cv_path_OTOOL+:} false; then :
17962  $as_echo_n "(cached) " >&6
17963else
17964  case $OTOOL in
17965  [\\/]* | ?:[\\/]*)
17966  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17967  ;;
17968  *)
17969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17970for as_dir in $PATH
17971do
17972  IFS=$as_save_IFS
17973  test -z "$as_dir" && as_dir=.
17974    for ac_exec_ext in '' $ac_executable_extensions; do
17975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17976    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17978    break 2
17979  fi
17980done
17981  done
17982IFS=$as_save_IFS
17983
17984  ;;
17985esac
17986fi
17987OTOOL=$ac_cv_path_OTOOL
17988if test -n "$OTOOL"; then
17989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17990$as_echo "$OTOOL" >&6; }
17991else
17992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17993$as_echo "no" >&6; }
17994fi
17995
17996
17997  test -n "$OTOOL" && break
17998done
17999
18000  else
18001    # The variable is set, but is it from the command line or the environment?
18002
18003    # Try to remove the string !OTOOL! from our list.
18004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18006      # If it failed, the variable was not from the command line. Ignore it,
18007      # but warn the user (except for BASH, which is always set by the calling BASH).
18008      if test "xOTOOL" != xBASH; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18010$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18011      fi
18012      # Try to locate tool using the code snippet
18013      for ac_prog in otool
18014do
18015  # Extract the first word of "$ac_prog", so it can be a program name with args.
18016set dummy $ac_prog; ac_word=$2
18017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18018$as_echo_n "checking for $ac_word... " >&6; }
18019if ${ac_cv_path_OTOOL+:} false; then :
18020  $as_echo_n "(cached) " >&6
18021else
18022  case $OTOOL in
18023  [\\/]* | ?:[\\/]*)
18024  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18025  ;;
18026  *)
18027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18028for as_dir in $PATH
18029do
18030  IFS=$as_save_IFS
18031  test -z "$as_dir" && as_dir=.
18032    for ac_exec_ext in '' $ac_executable_extensions; do
18033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18034    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18036    break 2
18037  fi
18038done
18039  done
18040IFS=$as_save_IFS
18041
18042  ;;
18043esac
18044fi
18045OTOOL=$ac_cv_path_OTOOL
18046if test -n "$OTOOL"; then
18047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18048$as_echo "$OTOOL" >&6; }
18049else
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18051$as_echo "no" >&6; }
18052fi
18053
18054
18055  test -n "$OTOOL" && break
18056done
18057
18058    else
18059      # If it succeeded, then it was overridden by the user. We will use it
18060      # for the tool.
18061
18062      # First remove it from the list of overridden variables, so we can test
18063      # for unknown variables in the end.
18064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18065
18066      # Check if the provided tool contains a complete path.
18067      tool_specified="$OTOOL"
18068      tool_basename="${tool_specified##*/}"
18069      if test "x$tool_basename" = "x$tool_specified"; then
18070        # A command without a complete path is provided, search $PATH.
18071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18072$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18073        # Extract the first word of "$tool_basename", so it can be a program name with args.
18074set dummy $tool_basename; ac_word=$2
18075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18076$as_echo_n "checking for $ac_word... " >&6; }
18077if ${ac_cv_path_OTOOL+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  case $OTOOL in
18081  [\\/]* | ?:[\\/]*)
18082  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18083  ;;
18084  *)
18085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18086for as_dir in $PATH
18087do
18088  IFS=$as_save_IFS
18089  test -z "$as_dir" && as_dir=.
18090    for ac_exec_ext in '' $ac_executable_extensions; do
18091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18092    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18094    break 2
18095  fi
18096done
18097  done
18098IFS=$as_save_IFS
18099
18100  ;;
18101esac
18102fi
18103OTOOL=$ac_cv_path_OTOOL
18104if test -n "$OTOOL"; then
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18106$as_echo "$OTOOL" >&6; }
18107else
18108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18109$as_echo "no" >&6; }
18110fi
18111
18112
18113        if test "x$OTOOL" = x; then
18114          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18115        fi
18116      else
18117        # Otherwise we believe it is a complete path. Use it as it is.
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18119$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18121$as_echo_n "checking for OTOOL... " >&6; }
18122        if test ! -x "$tool_specified"; then
18123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18124$as_echo "not found" >&6; }
18125          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18126        fi
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18128$as_echo "$tool_specified" >&6; }
18129      fi
18130    fi
18131  fi
18132
18133
18134  if test "x$OTOOL" = "x"; then
18135    OTOOL="true"
18136  fi
18137
18138
18139  # Publish this variable in the help.
18140
18141
18142  if test "x$READELF" = x; then
18143    # The variable is not set by user, try to locate tool using the code snippet
18144    for ac_prog in greadelf readelf
18145do
18146  # Extract the first word of "$ac_prog", so it can be a program name with args.
18147set dummy $ac_prog; ac_word=$2
18148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18149$as_echo_n "checking for $ac_word... " >&6; }
18150if ${ac_cv_path_READELF+:} false; then :
18151  $as_echo_n "(cached) " >&6
18152else
18153  case $READELF in
18154  [\\/]* | ?:[\\/]*)
18155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18156  ;;
18157  *)
18158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18159for as_dir in $PATH
18160do
18161  IFS=$as_save_IFS
18162  test -z "$as_dir" && as_dir=.
18163    for ac_exec_ext in '' $ac_executable_extensions; do
18164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18167    break 2
18168  fi
18169done
18170  done
18171IFS=$as_save_IFS
18172
18173  ;;
18174esac
18175fi
18176READELF=$ac_cv_path_READELF
18177if test -n "$READELF"; then
18178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18179$as_echo "$READELF" >&6; }
18180else
18181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18182$as_echo "no" >&6; }
18183fi
18184
18185
18186  test -n "$READELF" && break
18187done
18188
18189  else
18190    # The variable is set, but is it from the command line or the environment?
18191
18192    # Try to remove the string !READELF! from our list.
18193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18195      # If it failed, the variable was not from the command line. Ignore it,
18196      # but warn the user (except for BASH, which is always set by the calling BASH).
18197      if test "xREADELF" != xBASH; then
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18199$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18200      fi
18201      # Try to locate tool using the code snippet
18202      for ac_prog in greadelf readelf
18203do
18204  # Extract the first word of "$ac_prog", so it can be a program name with args.
18205set dummy $ac_prog; ac_word=$2
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18207$as_echo_n "checking for $ac_word... " >&6; }
18208if ${ac_cv_path_READELF+:} false; then :
18209  $as_echo_n "(cached) " >&6
18210else
18211  case $READELF in
18212  [\\/]* | ?:[\\/]*)
18213  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18214  ;;
18215  *)
18216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18217for as_dir in $PATH
18218do
18219  IFS=$as_save_IFS
18220  test -z "$as_dir" && as_dir=.
18221    for ac_exec_ext in '' $ac_executable_extensions; do
18222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18223    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18225    break 2
18226  fi
18227done
18228  done
18229IFS=$as_save_IFS
18230
18231  ;;
18232esac
18233fi
18234READELF=$ac_cv_path_READELF
18235if test -n "$READELF"; then
18236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18237$as_echo "$READELF" >&6; }
18238else
18239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18240$as_echo "no" >&6; }
18241fi
18242
18243
18244  test -n "$READELF" && break
18245done
18246
18247    else
18248      # If it succeeded, then it was overridden by the user. We will use it
18249      # for the tool.
18250
18251      # First remove it from the list of overridden variables, so we can test
18252      # for unknown variables in the end.
18253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18254
18255      # Check if the provided tool contains a complete path.
18256      tool_specified="$READELF"
18257      tool_basename="${tool_specified##*/}"
18258      if test "x$tool_basename" = "x$tool_specified"; then
18259        # A command without a complete path is provided, search $PATH.
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18261$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18262        # Extract the first word of "$tool_basename", so it can be a program name with args.
18263set dummy $tool_basename; ac_word=$2
18264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18265$as_echo_n "checking for $ac_word... " >&6; }
18266if ${ac_cv_path_READELF+:} false; then :
18267  $as_echo_n "(cached) " >&6
18268else
18269  case $READELF in
18270  [\\/]* | ?:[\\/]*)
18271  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18272  ;;
18273  *)
18274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18275for as_dir in $PATH
18276do
18277  IFS=$as_save_IFS
18278  test -z "$as_dir" && as_dir=.
18279    for ac_exec_ext in '' $ac_executable_extensions; do
18280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18281    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18283    break 2
18284  fi
18285done
18286  done
18287IFS=$as_save_IFS
18288
18289  ;;
18290esac
18291fi
18292READELF=$ac_cv_path_READELF
18293if test -n "$READELF"; then
18294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18295$as_echo "$READELF" >&6; }
18296else
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18298$as_echo "no" >&6; }
18299fi
18300
18301
18302        if test "x$READELF" = x; then
18303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18304        fi
18305      else
18306        # Otherwise we believe it is a complete path. Use it as it is.
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18308$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18310$as_echo_n "checking for READELF... " >&6; }
18311        if test ! -x "$tool_specified"; then
18312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18313$as_echo "not found" >&6; }
18314          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18315        fi
18316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18317$as_echo "$tool_specified" >&6; }
18318      fi
18319    fi
18320  fi
18321
18322
18323
18324
18325  # Publish this variable in the help.
18326
18327
18328  if test "x$HG" = x; then
18329    # The variable is not set by user, try to locate tool using the code snippet
18330    for ac_prog in hg
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_HG+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $HG in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362HG=$ac_cv_path_HG
18363if test -n "$HG"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18365$as_echo "$HG" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$HG" && break
18373done
18374
18375  else
18376    # The variable is set, but is it from the command line or the environment?
18377
18378    # Try to remove the string !HG! from our list.
18379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18381      # If it failed, the variable was not from the command line. Ignore it,
18382      # but warn the user (except for BASH, which is always set by the calling BASH).
18383      if test "xHG" != xBASH; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18385$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18386      fi
18387      # Try to locate tool using the code snippet
18388      for ac_prog in hg
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_HG+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $HG in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420HG=$ac_cv_path_HG
18421if test -n "$HG"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18423$as_echo "$HG" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$HG" && break
18431done
18432
18433    else
18434      # If it succeeded, then it was overridden by the user. We will use it
18435      # for the tool.
18436
18437      # First remove it from the list of overridden variables, so we can test
18438      # for unknown variables in the end.
18439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18440
18441      # Check if the provided tool contains a complete path.
18442      tool_specified="$HG"
18443      tool_basename="${tool_specified##*/}"
18444      if test "x$tool_basename" = "x$tool_specified"; then
18445        # A command without a complete path is provided, search $PATH.
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18447$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18448        # Extract the first word of "$tool_basename", so it can be a program name with args.
18449set dummy $tool_basename; ac_word=$2
18450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451$as_echo_n "checking for $ac_word... " >&6; }
18452if ${ac_cv_path_HG+:} false; then :
18453  $as_echo_n "(cached) " >&6
18454else
18455  case $HG in
18456  [\\/]* | ?:[\\/]*)
18457  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18458  ;;
18459  *)
18460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461for as_dir in $PATH
18462do
18463  IFS=$as_save_IFS
18464  test -z "$as_dir" && as_dir=.
18465    for ac_exec_ext in '' $ac_executable_extensions; do
18466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469    break 2
18470  fi
18471done
18472  done
18473IFS=$as_save_IFS
18474
18475  ;;
18476esac
18477fi
18478HG=$ac_cv_path_HG
18479if test -n "$HG"; then
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18481$as_echo "$HG" >&6; }
18482else
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484$as_echo "no" >&6; }
18485fi
18486
18487
18488        if test "x$HG" = x; then
18489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18490        fi
18491      else
18492        # Otherwise we believe it is a complete path. Use it as it is.
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18494$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18496$as_echo_n "checking for HG... " >&6; }
18497        if test ! -x "$tool_specified"; then
18498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18499$as_echo "not found" >&6; }
18500          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18501        fi
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18503$as_echo "$tool_specified" >&6; }
18504      fi
18505    fi
18506  fi
18507
18508
18509
18510
18511  # Publish this variable in the help.
18512
18513
18514  if test "x$STAT" = x; then
18515    # The variable is not set by user, try to locate tool using the code snippet
18516    for ac_prog in stat
18517do
18518  # Extract the first word of "$ac_prog", so it can be a program name with args.
18519set dummy $ac_prog; ac_word=$2
18520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18521$as_echo_n "checking for $ac_word... " >&6; }
18522if ${ac_cv_path_STAT+:} false; then :
18523  $as_echo_n "(cached) " >&6
18524else
18525  case $STAT in
18526  [\\/]* | ?:[\\/]*)
18527  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18528  ;;
18529  *)
18530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18531for as_dir in $PATH
18532do
18533  IFS=$as_save_IFS
18534  test -z "$as_dir" && as_dir=.
18535    for ac_exec_ext in '' $ac_executable_extensions; do
18536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18537    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18539    break 2
18540  fi
18541done
18542  done
18543IFS=$as_save_IFS
18544
18545  ;;
18546esac
18547fi
18548STAT=$ac_cv_path_STAT
18549if test -n "$STAT"; then
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18551$as_echo "$STAT" >&6; }
18552else
18553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18554$as_echo "no" >&6; }
18555fi
18556
18557
18558  test -n "$STAT" && break
18559done
18560
18561  else
18562    # The variable is set, but is it from the command line or the environment?
18563
18564    # Try to remove the string !STAT! from our list.
18565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18567      # If it failed, the variable was not from the command line. Ignore it,
18568      # but warn the user (except for BASH, which is always set by the calling BASH).
18569      if test "xSTAT" != xBASH; then
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18571$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18572      fi
18573      # Try to locate tool using the code snippet
18574      for ac_prog in stat
18575do
18576  # Extract the first word of "$ac_prog", so it can be a program name with args.
18577set dummy $ac_prog; ac_word=$2
18578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579$as_echo_n "checking for $ac_word... " >&6; }
18580if ${ac_cv_path_STAT+:} false; then :
18581  $as_echo_n "(cached) " >&6
18582else
18583  case $STAT in
18584  [\\/]* | ?:[\\/]*)
18585  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18586  ;;
18587  *)
18588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589for as_dir in $PATH
18590do
18591  IFS=$as_save_IFS
18592  test -z "$as_dir" && as_dir=.
18593    for ac_exec_ext in '' $ac_executable_extensions; do
18594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18595    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597    break 2
18598  fi
18599done
18600  done
18601IFS=$as_save_IFS
18602
18603  ;;
18604esac
18605fi
18606STAT=$ac_cv_path_STAT
18607if test -n "$STAT"; then
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18609$as_echo "$STAT" >&6; }
18610else
18611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18612$as_echo "no" >&6; }
18613fi
18614
18615
18616  test -n "$STAT" && break
18617done
18618
18619    else
18620      # If it succeeded, then it was overridden by the user. We will use it
18621      # for the tool.
18622
18623      # First remove it from the list of overridden variables, so we can test
18624      # for unknown variables in the end.
18625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18626
18627      # Check if the provided tool contains a complete path.
18628      tool_specified="$STAT"
18629      tool_basename="${tool_specified##*/}"
18630      if test "x$tool_basename" = "x$tool_specified"; then
18631        # A command without a complete path is provided, search $PATH.
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18633$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18634        # Extract the first word of "$tool_basename", so it can be a program name with args.
18635set dummy $tool_basename; ac_word=$2
18636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18637$as_echo_n "checking for $ac_word... " >&6; }
18638if ${ac_cv_path_STAT+:} false; then :
18639  $as_echo_n "(cached) " >&6
18640else
18641  case $STAT in
18642  [\\/]* | ?:[\\/]*)
18643  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18644  ;;
18645  *)
18646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18647for as_dir in $PATH
18648do
18649  IFS=$as_save_IFS
18650  test -z "$as_dir" && as_dir=.
18651    for ac_exec_ext in '' $ac_executable_extensions; do
18652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18653    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18655    break 2
18656  fi
18657done
18658  done
18659IFS=$as_save_IFS
18660
18661  ;;
18662esac
18663fi
18664STAT=$ac_cv_path_STAT
18665if test -n "$STAT"; then
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18667$as_echo "$STAT" >&6; }
18668else
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18670$as_echo "no" >&6; }
18671fi
18672
18673
18674        if test "x$STAT" = x; then
18675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18676        fi
18677      else
18678        # Otherwise we believe it is a complete path. Use it as it is.
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18680$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18682$as_echo_n "checking for STAT... " >&6; }
18683        if test ! -x "$tool_specified"; then
18684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18685$as_echo "not found" >&6; }
18686          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18687        fi
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18689$as_echo "$tool_specified" >&6; }
18690      fi
18691    fi
18692  fi
18693
18694
18695
18696
18697  # Publish this variable in the help.
18698
18699
18700  if test "x$TIME" = x; then
18701    # The variable is not set by user, try to locate tool using the code snippet
18702    for ac_prog in time
18703do
18704  # Extract the first word of "$ac_prog", so it can be a program name with args.
18705set dummy $ac_prog; ac_word=$2
18706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18707$as_echo_n "checking for $ac_word... " >&6; }
18708if ${ac_cv_path_TIME+:} false; then :
18709  $as_echo_n "(cached) " >&6
18710else
18711  case $TIME in
18712  [\\/]* | ?:[\\/]*)
18713  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18714  ;;
18715  *)
18716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18717for as_dir in $PATH
18718do
18719  IFS=$as_save_IFS
18720  test -z "$as_dir" && as_dir=.
18721    for ac_exec_ext in '' $ac_executable_extensions; do
18722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18723    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18725    break 2
18726  fi
18727done
18728  done
18729IFS=$as_save_IFS
18730
18731  ;;
18732esac
18733fi
18734TIME=$ac_cv_path_TIME
18735if test -n "$TIME"; then
18736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18737$as_echo "$TIME" >&6; }
18738else
18739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18740$as_echo "no" >&6; }
18741fi
18742
18743
18744  test -n "$TIME" && break
18745done
18746
18747  else
18748    # The variable is set, but is it from the command line or the environment?
18749
18750    # Try to remove the string !TIME! from our list.
18751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18753      # If it failed, the variable was not from the command line. Ignore it,
18754      # but warn the user (except for BASH, which is always set by the calling BASH).
18755      if test "xTIME" != xBASH; then
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18757$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18758      fi
18759      # Try to locate tool using the code snippet
18760      for ac_prog in time
18761do
18762  # Extract the first word of "$ac_prog", so it can be a program name with args.
18763set dummy $ac_prog; ac_word=$2
18764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18765$as_echo_n "checking for $ac_word... " >&6; }
18766if ${ac_cv_path_TIME+:} false; then :
18767  $as_echo_n "(cached) " >&6
18768else
18769  case $TIME in
18770  [\\/]* | ?:[\\/]*)
18771  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18772  ;;
18773  *)
18774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18775for as_dir in $PATH
18776do
18777  IFS=$as_save_IFS
18778  test -z "$as_dir" && as_dir=.
18779    for ac_exec_ext in '' $ac_executable_extensions; do
18780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18781    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18783    break 2
18784  fi
18785done
18786  done
18787IFS=$as_save_IFS
18788
18789  ;;
18790esac
18791fi
18792TIME=$ac_cv_path_TIME
18793if test -n "$TIME"; then
18794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18795$as_echo "$TIME" >&6; }
18796else
18797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18798$as_echo "no" >&6; }
18799fi
18800
18801
18802  test -n "$TIME" && break
18803done
18804
18805    else
18806      # If it succeeded, then it was overridden by the user. We will use it
18807      # for the tool.
18808
18809      # First remove it from the list of overridden variables, so we can test
18810      # for unknown variables in the end.
18811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18812
18813      # Check if the provided tool contains a complete path.
18814      tool_specified="$TIME"
18815      tool_basename="${tool_specified##*/}"
18816      if test "x$tool_basename" = "x$tool_specified"; then
18817        # A command without a complete path is provided, search $PATH.
18818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18819$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18820        # Extract the first word of "$tool_basename", so it can be a program name with args.
18821set dummy $tool_basename; ac_word=$2
18822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18823$as_echo_n "checking for $ac_word... " >&6; }
18824if ${ac_cv_path_TIME+:} false; then :
18825  $as_echo_n "(cached) " >&6
18826else
18827  case $TIME in
18828  [\\/]* | ?:[\\/]*)
18829  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18830  ;;
18831  *)
18832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18833for as_dir in $PATH
18834do
18835  IFS=$as_save_IFS
18836  test -z "$as_dir" && as_dir=.
18837    for ac_exec_ext in '' $ac_executable_extensions; do
18838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18839    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18841    break 2
18842  fi
18843done
18844  done
18845IFS=$as_save_IFS
18846
18847  ;;
18848esac
18849fi
18850TIME=$ac_cv_path_TIME
18851if test -n "$TIME"; then
18852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18853$as_echo "$TIME" >&6; }
18854else
18855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18856$as_echo "no" >&6; }
18857fi
18858
18859
18860        if test "x$TIME" = x; then
18861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18862        fi
18863      else
18864        # Otherwise we believe it is a complete path. Use it as it is.
18865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18866$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18868$as_echo_n "checking for TIME... " >&6; }
18869        if test ! -x "$tool_specified"; then
18870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18871$as_echo "not found" >&6; }
18872          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18873        fi
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18875$as_echo "$tool_specified" >&6; }
18876      fi
18877    fi
18878  fi
18879
18880
18881
18882
18883  # Publish this variable in the help.
18884
18885
18886  if test "x$PATCH" = x; then
18887    # The variable is not set by user, try to locate tool using the code snippet
18888    for ac_prog in gpatch patch
18889do
18890  # Extract the first word of "$ac_prog", so it can be a program name with args.
18891set dummy $ac_prog; ac_word=$2
18892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18893$as_echo_n "checking for $ac_word... " >&6; }
18894if ${ac_cv_path_PATCH+:} false; then :
18895  $as_echo_n "(cached) " >&6
18896else
18897  case $PATCH in
18898  [\\/]* | ?:[\\/]*)
18899  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18900  ;;
18901  *)
18902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18903for as_dir in $PATH
18904do
18905  IFS=$as_save_IFS
18906  test -z "$as_dir" && as_dir=.
18907    for ac_exec_ext in '' $ac_executable_extensions; do
18908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18909    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18911    break 2
18912  fi
18913done
18914  done
18915IFS=$as_save_IFS
18916
18917  ;;
18918esac
18919fi
18920PATCH=$ac_cv_path_PATCH
18921if test -n "$PATCH"; then
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18923$as_echo "$PATCH" >&6; }
18924else
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926$as_echo "no" >&6; }
18927fi
18928
18929
18930  test -n "$PATCH" && break
18931done
18932
18933  else
18934    # The variable is set, but is it from the command line or the environment?
18935
18936    # Try to remove the string !PATCH! from our list.
18937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
18938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18939      # If it failed, the variable was not from the command line. Ignore it,
18940      # but warn the user (except for BASH, which is always set by the calling BASH).
18941      if test "xPATCH" != xBASH; then
18942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
18943$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
18944      fi
18945      # Try to locate tool using the code snippet
18946      for ac_prog in gpatch patch
18947do
18948  # Extract the first word of "$ac_prog", so it can be a program name with args.
18949set dummy $ac_prog; ac_word=$2
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18951$as_echo_n "checking for $ac_word... " >&6; }
18952if ${ac_cv_path_PATCH+:} false; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  case $PATCH in
18956  [\\/]* | ?:[\\/]*)
18957  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18958  ;;
18959  *)
18960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18961for as_dir in $PATH
18962do
18963  IFS=$as_save_IFS
18964  test -z "$as_dir" && as_dir=.
18965    for ac_exec_ext in '' $ac_executable_extensions; do
18966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18967    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18969    break 2
18970  fi
18971done
18972  done
18973IFS=$as_save_IFS
18974
18975  ;;
18976esac
18977fi
18978PATCH=$ac_cv_path_PATCH
18979if test -n "$PATCH"; then
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18981$as_echo "$PATCH" >&6; }
18982else
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984$as_echo "no" >&6; }
18985fi
18986
18987
18988  test -n "$PATCH" && break
18989done
18990
18991    else
18992      # If it succeeded, then it was overridden by the user. We will use it
18993      # for the tool.
18994
18995      # First remove it from the list of overridden variables, so we can test
18996      # for unknown variables in the end.
18997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18998
18999      # Check if the provided tool contains a complete path.
19000      tool_specified="$PATCH"
19001      tool_basename="${tool_specified##*/}"
19002      if test "x$tool_basename" = "x$tool_specified"; then
19003        # A command without a complete path is provided, search $PATH.
19004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19005$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19006        # Extract the first word of "$tool_basename", so it can be a program name with args.
19007set dummy $tool_basename; ac_word=$2
19008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19009$as_echo_n "checking for $ac_word... " >&6; }
19010if ${ac_cv_path_PATCH+:} false; then :
19011  $as_echo_n "(cached) " >&6
19012else
19013  case $PATCH in
19014  [\\/]* | ?:[\\/]*)
19015  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19016  ;;
19017  *)
19018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19019for as_dir in $PATH
19020do
19021  IFS=$as_save_IFS
19022  test -z "$as_dir" && as_dir=.
19023    for ac_exec_ext in '' $ac_executable_extensions; do
19024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19025    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19027    break 2
19028  fi
19029done
19030  done
19031IFS=$as_save_IFS
19032
19033  ;;
19034esac
19035fi
19036PATCH=$ac_cv_path_PATCH
19037if test -n "$PATCH"; then
19038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19039$as_echo "$PATCH" >&6; }
19040else
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19042$as_echo "no" >&6; }
19043fi
19044
19045
19046        if test "x$PATCH" = x; then
19047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19048        fi
19049      else
19050        # Otherwise we believe it is a complete path. Use it as it is.
19051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19052$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19054$as_echo_n "checking for PATCH... " >&6; }
19055        if test ! -x "$tool_specified"; then
19056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19057$as_echo "not found" >&6; }
19058          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19059        fi
19060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19061$as_echo "$tool_specified" >&6; }
19062      fi
19063    fi
19064  fi
19065
19066
19067  # Check if it's GNU time
19068  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19069  if test "x$IS_GNU_TIME" != x; then
19070    IS_GNU_TIME=yes
19071  else
19072    IS_GNU_TIME=no
19073  fi
19074
19075
19076  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19077
19078
19079
19080  # Publish this variable in the help.
19081
19082
19083  if test "x$DSYMUTIL" = x; then
19084    # The variable is not set by user, try to locate tool using the code snippet
19085    for ac_prog in dsymutil
19086do
19087  # Extract the first word of "$ac_prog", so it can be a program name with args.
19088set dummy $ac_prog; ac_word=$2
19089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19090$as_echo_n "checking for $ac_word... " >&6; }
19091if ${ac_cv_path_DSYMUTIL+:} false; then :
19092  $as_echo_n "(cached) " >&6
19093else
19094  case $DSYMUTIL in
19095  [\\/]* | ?:[\\/]*)
19096  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19097  ;;
19098  *)
19099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19100for as_dir in $PATH
19101do
19102  IFS=$as_save_IFS
19103  test -z "$as_dir" && as_dir=.
19104    for ac_exec_ext in '' $ac_executable_extensions; do
19105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19106    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19108    break 2
19109  fi
19110done
19111  done
19112IFS=$as_save_IFS
19113
19114  ;;
19115esac
19116fi
19117DSYMUTIL=$ac_cv_path_DSYMUTIL
19118if test -n "$DSYMUTIL"; then
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19120$as_echo "$DSYMUTIL" >&6; }
19121else
19122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19123$as_echo "no" >&6; }
19124fi
19125
19126
19127  test -n "$DSYMUTIL" && break
19128done
19129
19130  else
19131    # The variable is set, but is it from the command line or the environment?
19132
19133    # Try to remove the string !DSYMUTIL! from our list.
19134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19136      # If it failed, the variable was not from the command line. Ignore it,
19137      # but warn the user (except for BASH, which is always set by the calling BASH).
19138      if test "xDSYMUTIL" != xBASH; then
19139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19140$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19141      fi
19142      # Try to locate tool using the code snippet
19143      for ac_prog in dsymutil
19144do
19145  # Extract the first word of "$ac_prog", so it can be a program name with args.
19146set dummy $ac_prog; ac_word=$2
19147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19148$as_echo_n "checking for $ac_word... " >&6; }
19149if ${ac_cv_path_DSYMUTIL+:} false; then :
19150  $as_echo_n "(cached) " >&6
19151else
19152  case $DSYMUTIL in
19153  [\\/]* | ?:[\\/]*)
19154  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19155  ;;
19156  *)
19157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19158for as_dir in $PATH
19159do
19160  IFS=$as_save_IFS
19161  test -z "$as_dir" && as_dir=.
19162    for ac_exec_ext in '' $ac_executable_extensions; do
19163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19164    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19166    break 2
19167  fi
19168done
19169  done
19170IFS=$as_save_IFS
19171
19172  ;;
19173esac
19174fi
19175DSYMUTIL=$ac_cv_path_DSYMUTIL
19176if test -n "$DSYMUTIL"; then
19177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19178$as_echo "$DSYMUTIL" >&6; }
19179else
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19181$as_echo "no" >&6; }
19182fi
19183
19184
19185  test -n "$DSYMUTIL" && break
19186done
19187
19188    else
19189      # If it succeeded, then it was overridden by the user. We will use it
19190      # for the tool.
19191
19192      # First remove it from the list of overridden variables, so we can test
19193      # for unknown variables in the end.
19194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19195
19196      # Check if the provided tool contains a complete path.
19197      tool_specified="$DSYMUTIL"
19198      tool_basename="${tool_specified##*/}"
19199      if test "x$tool_basename" = "x$tool_specified"; then
19200        # A command without a complete path is provided, search $PATH.
19201        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19202$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19203        # Extract the first word of "$tool_basename", so it can be a program name with args.
19204set dummy $tool_basename; ac_word=$2
19205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19206$as_echo_n "checking for $ac_word... " >&6; }
19207if ${ac_cv_path_DSYMUTIL+:} false; then :
19208  $as_echo_n "(cached) " >&6
19209else
19210  case $DSYMUTIL in
19211  [\\/]* | ?:[\\/]*)
19212  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19213  ;;
19214  *)
19215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19216for as_dir in $PATH
19217do
19218  IFS=$as_save_IFS
19219  test -z "$as_dir" && as_dir=.
19220    for ac_exec_ext in '' $ac_executable_extensions; do
19221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19222    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19224    break 2
19225  fi
19226done
19227  done
19228IFS=$as_save_IFS
19229
19230  ;;
19231esac
19232fi
19233DSYMUTIL=$ac_cv_path_DSYMUTIL
19234if test -n "$DSYMUTIL"; then
19235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19236$as_echo "$DSYMUTIL" >&6; }
19237else
19238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19239$as_echo "no" >&6; }
19240fi
19241
19242
19243        if test "x$DSYMUTIL" = x; then
19244          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19245        fi
19246      else
19247        # Otherwise we believe it is a complete path. Use it as it is.
19248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19249$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19251$as_echo_n "checking for DSYMUTIL... " >&6; }
19252        if test ! -x "$tool_specified"; then
19253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19254$as_echo "not found" >&6; }
19255          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19256        fi
19257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19258$as_echo "$tool_specified" >&6; }
19259      fi
19260    fi
19261  fi
19262
19263
19264
19265  if test "x$DSYMUTIL" = x; then
19266    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19267  fi
19268
19269
19270
19271
19272
19273  # Publish this variable in the help.
19274
19275
19276  if test "x$XATTR" = x; then
19277    # The variable is not set by user, try to locate tool using the code snippet
19278    for ac_prog in xattr
19279do
19280  # Extract the first word of "$ac_prog", so it can be a program name with args.
19281set dummy $ac_prog; ac_word=$2
19282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19283$as_echo_n "checking for $ac_word... " >&6; }
19284if ${ac_cv_path_XATTR+:} false; then :
19285  $as_echo_n "(cached) " >&6
19286else
19287  case $XATTR in
19288  [\\/]* | ?:[\\/]*)
19289  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19290  ;;
19291  *)
19292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19293for as_dir in $PATH
19294do
19295  IFS=$as_save_IFS
19296  test -z "$as_dir" && as_dir=.
19297    for ac_exec_ext in '' $ac_executable_extensions; do
19298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19299    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19301    break 2
19302  fi
19303done
19304  done
19305IFS=$as_save_IFS
19306
19307  ;;
19308esac
19309fi
19310XATTR=$ac_cv_path_XATTR
19311if test -n "$XATTR"; then
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19313$as_echo "$XATTR" >&6; }
19314else
19315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19316$as_echo "no" >&6; }
19317fi
19318
19319
19320  test -n "$XATTR" && break
19321done
19322
19323  else
19324    # The variable is set, but is it from the command line or the environment?
19325
19326    # Try to remove the string !XATTR! from our list.
19327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19329      # If it failed, the variable was not from the command line. Ignore it,
19330      # but warn the user (except for BASH, which is always set by the calling BASH).
19331      if test "xXATTR" != xBASH; then
19332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19333$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19334      fi
19335      # Try to locate tool using the code snippet
19336      for ac_prog in xattr
19337do
19338  # Extract the first word of "$ac_prog", so it can be a program name with args.
19339set dummy $ac_prog; ac_word=$2
19340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19341$as_echo_n "checking for $ac_word... " >&6; }
19342if ${ac_cv_path_XATTR+:} false; then :
19343  $as_echo_n "(cached) " >&6
19344else
19345  case $XATTR in
19346  [\\/]* | ?:[\\/]*)
19347  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19348  ;;
19349  *)
19350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19351for as_dir in $PATH
19352do
19353  IFS=$as_save_IFS
19354  test -z "$as_dir" && as_dir=.
19355    for ac_exec_ext in '' $ac_executable_extensions; do
19356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19357    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19359    break 2
19360  fi
19361done
19362  done
19363IFS=$as_save_IFS
19364
19365  ;;
19366esac
19367fi
19368XATTR=$ac_cv_path_XATTR
19369if test -n "$XATTR"; then
19370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19371$as_echo "$XATTR" >&6; }
19372else
19373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19374$as_echo "no" >&6; }
19375fi
19376
19377
19378  test -n "$XATTR" && break
19379done
19380
19381    else
19382      # If it succeeded, then it was overridden by the user. We will use it
19383      # for the tool.
19384
19385      # First remove it from the list of overridden variables, so we can test
19386      # for unknown variables in the end.
19387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19388
19389      # Check if the provided tool contains a complete path.
19390      tool_specified="$XATTR"
19391      tool_basename="${tool_specified##*/}"
19392      if test "x$tool_basename" = "x$tool_specified"; then
19393        # A command without a complete path is provided, search $PATH.
19394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19395$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19396        # Extract the first word of "$tool_basename", so it can be a program name with args.
19397set dummy $tool_basename; ac_word=$2
19398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19399$as_echo_n "checking for $ac_word... " >&6; }
19400if ${ac_cv_path_XATTR+:} false; then :
19401  $as_echo_n "(cached) " >&6
19402else
19403  case $XATTR in
19404  [\\/]* | ?:[\\/]*)
19405  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19406  ;;
19407  *)
19408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19409for as_dir in $PATH
19410do
19411  IFS=$as_save_IFS
19412  test -z "$as_dir" && as_dir=.
19413    for ac_exec_ext in '' $ac_executable_extensions; do
19414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19415    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19417    break 2
19418  fi
19419done
19420  done
19421IFS=$as_save_IFS
19422
19423  ;;
19424esac
19425fi
19426XATTR=$ac_cv_path_XATTR
19427if test -n "$XATTR"; then
19428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19429$as_echo "$XATTR" >&6; }
19430else
19431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19432$as_echo "no" >&6; }
19433fi
19434
19435
19436        if test "x$XATTR" = x; then
19437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19438        fi
19439      else
19440        # Otherwise we believe it is a complete path. Use it as it is.
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19442$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19444$as_echo_n "checking for XATTR... " >&6; }
19445        if test ! -x "$tool_specified"; then
19446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19447$as_echo "not found" >&6; }
19448          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19449        fi
19450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19451$as_echo "$tool_specified" >&6; }
19452      fi
19453    fi
19454  fi
19455
19456
19457
19458  if test "x$XATTR" = x; then
19459    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19460  fi
19461
19462
19463
19464
19465  # Publish this variable in the help.
19466
19467
19468  if test "x$CODESIGN" = x; then
19469    # The variable is not set by user, try to locate tool using the code snippet
19470    for ac_prog in codesign
19471do
19472  # Extract the first word of "$ac_prog", so it can be a program name with args.
19473set dummy $ac_prog; ac_word=$2
19474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19475$as_echo_n "checking for $ac_word... " >&6; }
19476if ${ac_cv_path_CODESIGN+:} false; then :
19477  $as_echo_n "(cached) " >&6
19478else
19479  case $CODESIGN in
19480  [\\/]* | ?:[\\/]*)
19481  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19482  ;;
19483  *)
19484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19485for as_dir in $PATH
19486do
19487  IFS=$as_save_IFS
19488  test -z "$as_dir" && as_dir=.
19489    for ac_exec_ext in '' $ac_executable_extensions; do
19490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19491    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19493    break 2
19494  fi
19495done
19496  done
19497IFS=$as_save_IFS
19498
19499  ;;
19500esac
19501fi
19502CODESIGN=$ac_cv_path_CODESIGN
19503if test -n "$CODESIGN"; then
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19505$as_echo "$CODESIGN" >&6; }
19506else
19507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19508$as_echo "no" >&6; }
19509fi
19510
19511
19512  test -n "$CODESIGN" && break
19513done
19514
19515  else
19516    # The variable is set, but is it from the command line or the environment?
19517
19518    # Try to remove the string !CODESIGN! from our list.
19519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19521      # If it failed, the variable was not from the command line. Ignore it,
19522      # but warn the user (except for BASH, which is always set by the calling BASH).
19523      if test "xCODESIGN" != xBASH; then
19524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19525$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19526      fi
19527      # Try to locate tool using the code snippet
19528      for ac_prog in codesign
19529do
19530  # Extract the first word of "$ac_prog", so it can be a program name with args.
19531set dummy $ac_prog; ac_word=$2
19532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19533$as_echo_n "checking for $ac_word... " >&6; }
19534if ${ac_cv_path_CODESIGN+:} false; then :
19535  $as_echo_n "(cached) " >&6
19536else
19537  case $CODESIGN in
19538  [\\/]* | ?:[\\/]*)
19539  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19540  ;;
19541  *)
19542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19543for as_dir in $PATH
19544do
19545  IFS=$as_save_IFS
19546  test -z "$as_dir" && as_dir=.
19547    for ac_exec_ext in '' $ac_executable_extensions; do
19548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19549    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19551    break 2
19552  fi
19553done
19554  done
19555IFS=$as_save_IFS
19556
19557  ;;
19558esac
19559fi
19560CODESIGN=$ac_cv_path_CODESIGN
19561if test -n "$CODESIGN"; then
19562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19563$as_echo "$CODESIGN" >&6; }
19564else
19565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19566$as_echo "no" >&6; }
19567fi
19568
19569
19570  test -n "$CODESIGN" && break
19571done
19572
19573    else
19574      # If it succeeded, then it was overridden by the user. We will use it
19575      # for the tool.
19576
19577      # First remove it from the list of overridden variables, so we can test
19578      # for unknown variables in the end.
19579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19580
19581      # Check if the provided tool contains a complete path.
19582      tool_specified="$CODESIGN"
19583      tool_basename="${tool_specified##*/}"
19584      if test "x$tool_basename" = "x$tool_specified"; then
19585        # A command without a complete path is provided, search $PATH.
19586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19587$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19588        # Extract the first word of "$tool_basename", so it can be a program name with args.
19589set dummy $tool_basename; ac_word=$2
19590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19591$as_echo_n "checking for $ac_word... " >&6; }
19592if ${ac_cv_path_CODESIGN+:} false; then :
19593  $as_echo_n "(cached) " >&6
19594else
19595  case $CODESIGN in
19596  [\\/]* | ?:[\\/]*)
19597  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19598  ;;
19599  *)
19600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19601for as_dir in $PATH
19602do
19603  IFS=$as_save_IFS
19604  test -z "$as_dir" && as_dir=.
19605    for ac_exec_ext in '' $ac_executable_extensions; do
19606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19607    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19609    break 2
19610  fi
19611done
19612  done
19613IFS=$as_save_IFS
19614
19615  ;;
19616esac
19617fi
19618CODESIGN=$ac_cv_path_CODESIGN
19619if test -n "$CODESIGN"; then
19620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19621$as_echo "$CODESIGN" >&6; }
19622else
19623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19624$as_echo "no" >&6; }
19625fi
19626
19627
19628        if test "x$CODESIGN" = x; then
19629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19630        fi
19631      else
19632        # Otherwise we believe it is a complete path. Use it as it is.
19633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19634$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19636$as_echo_n "checking for CODESIGN... " >&6; }
19637        if test ! -x "$tool_specified"; then
19638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19639$as_echo "not found" >&6; }
19640          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19641        fi
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19643$as_echo "$tool_specified" >&6; }
19644      fi
19645    fi
19646  fi
19647
19648
19649    if test "x$CODESIGN" != "x"; then
19650      # Verify that the openjdk_codesign certificate is present
19651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19652$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19653      rm -f codesign-testfile
19654      touch codesign-testfile
19655      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19656      rm -f codesign-testfile
19657      if test "x$CODESIGN" = x; then
19658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19659$as_echo "no" >&6; }
19660      else
19661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19662$as_echo "yes" >&6; }
19663      fi
19664    fi
19665
19666
19667
19668  # Publish this variable in the help.
19669
19670
19671  if test "x$SETFILE" = x; then
19672    # The variable is not set by user, try to locate tool using the code snippet
19673    for ac_prog in SetFile
19674do
19675  # Extract the first word of "$ac_prog", so it can be a program name with args.
19676set dummy $ac_prog; ac_word=$2
19677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19678$as_echo_n "checking for $ac_word... " >&6; }
19679if ${ac_cv_path_SETFILE+:} false; then :
19680  $as_echo_n "(cached) " >&6
19681else
19682  case $SETFILE in
19683  [\\/]* | ?:[\\/]*)
19684  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19685  ;;
19686  *)
19687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19688for as_dir in $PATH
19689do
19690  IFS=$as_save_IFS
19691  test -z "$as_dir" && as_dir=.
19692    for ac_exec_ext in '' $ac_executable_extensions; do
19693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19694    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19696    break 2
19697  fi
19698done
19699  done
19700IFS=$as_save_IFS
19701
19702  ;;
19703esac
19704fi
19705SETFILE=$ac_cv_path_SETFILE
19706if test -n "$SETFILE"; then
19707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19708$as_echo "$SETFILE" >&6; }
19709else
19710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19711$as_echo "no" >&6; }
19712fi
19713
19714
19715  test -n "$SETFILE" && break
19716done
19717
19718  else
19719    # The variable is set, but is it from the command line or the environment?
19720
19721    # Try to remove the string !SETFILE! from our list.
19722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19724      # If it failed, the variable was not from the command line. Ignore it,
19725      # but warn the user (except for BASH, which is always set by the calling BASH).
19726      if test "xSETFILE" != xBASH; then
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19728$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19729      fi
19730      # Try to locate tool using the code snippet
19731      for ac_prog in SetFile
19732do
19733  # Extract the first word of "$ac_prog", so it can be a program name with args.
19734set dummy $ac_prog; ac_word=$2
19735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19736$as_echo_n "checking for $ac_word... " >&6; }
19737if ${ac_cv_path_SETFILE+:} false; then :
19738  $as_echo_n "(cached) " >&6
19739else
19740  case $SETFILE in
19741  [\\/]* | ?:[\\/]*)
19742  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19743  ;;
19744  *)
19745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19746for as_dir in $PATH
19747do
19748  IFS=$as_save_IFS
19749  test -z "$as_dir" && as_dir=.
19750    for ac_exec_ext in '' $ac_executable_extensions; do
19751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19752    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19754    break 2
19755  fi
19756done
19757  done
19758IFS=$as_save_IFS
19759
19760  ;;
19761esac
19762fi
19763SETFILE=$ac_cv_path_SETFILE
19764if test -n "$SETFILE"; then
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19766$as_echo "$SETFILE" >&6; }
19767else
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19769$as_echo "no" >&6; }
19770fi
19771
19772
19773  test -n "$SETFILE" && break
19774done
19775
19776    else
19777      # If it succeeded, then it was overridden by the user. We will use it
19778      # for the tool.
19779
19780      # First remove it from the list of overridden variables, so we can test
19781      # for unknown variables in the end.
19782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19783
19784      # Check if the provided tool contains a complete path.
19785      tool_specified="$SETFILE"
19786      tool_basename="${tool_specified##*/}"
19787      if test "x$tool_basename" = "x$tool_specified"; then
19788        # A command without a complete path is provided, search $PATH.
19789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19790$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19791        # Extract the first word of "$tool_basename", so it can be a program name with args.
19792set dummy $tool_basename; ac_word=$2
19793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19794$as_echo_n "checking for $ac_word... " >&6; }
19795if ${ac_cv_path_SETFILE+:} false; then :
19796  $as_echo_n "(cached) " >&6
19797else
19798  case $SETFILE in
19799  [\\/]* | ?:[\\/]*)
19800  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19801  ;;
19802  *)
19803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19804for as_dir in $PATH
19805do
19806  IFS=$as_save_IFS
19807  test -z "$as_dir" && as_dir=.
19808    for ac_exec_ext in '' $ac_executable_extensions; do
19809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19810    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19812    break 2
19813  fi
19814done
19815  done
19816IFS=$as_save_IFS
19817
19818  ;;
19819esac
19820fi
19821SETFILE=$ac_cv_path_SETFILE
19822if test -n "$SETFILE"; then
19823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19824$as_echo "$SETFILE" >&6; }
19825else
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827$as_echo "no" >&6; }
19828fi
19829
19830
19831        if test "x$SETFILE" = x; then
19832          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19833        fi
19834      else
19835        # Otherwise we believe it is a complete path. Use it as it is.
19836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19837$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19839$as_echo_n "checking for SETFILE... " >&6; }
19840        if test ! -x "$tool_specified"; then
19841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19842$as_echo "not found" >&6; }
19843          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19844        fi
19845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19846$as_echo "$tool_specified" >&6; }
19847      fi
19848    fi
19849  fi
19850
19851
19852
19853  if test "x$SETFILE" = x; then
19854    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19855  fi
19856
19857
19858  fi
19859
19860
19861  # Test if bash supports pipefail.
19862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19863$as_echo_n "checking if bash supports pipefail... " >&6; }
19864  if ${BASH} -c 'set -o pipefail'; then
19865    BASH_ARGS="$BASH_ARGS -o pipefail"
19866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19867$as_echo "yes" >&6; }
19868  else
19869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870$as_echo "no" >&6; }
19871  fi
19872
19873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19874$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19875  if ${BASH} -e -c 'true'; then
19876    BASH_ARGS="$BASH_ARGS -e"
19877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19878$as_echo "yes" >&6; }
19879  else
19880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19881$as_echo "no" >&6; }
19882  fi
19883
19884
19885
19886
19887# Check if pkg-config is available.
19888
19889
19890if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19891	if test -n "$ac_tool_prefix"; then
19892  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19893set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19895$as_echo_n "checking for $ac_word... " >&6; }
19896if ${ac_cv_path_PKG_CONFIG+:} false; then :
19897  $as_echo_n "(cached) " >&6
19898else
19899  case $PKG_CONFIG in
19900  [\\/]* | ?:[\\/]*)
19901  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19902  ;;
19903  *)
19904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19905for as_dir in $PATH
19906do
19907  IFS=$as_save_IFS
19908  test -z "$as_dir" && as_dir=.
19909    for ac_exec_ext in '' $ac_executable_extensions; do
19910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19911    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19913    break 2
19914  fi
19915done
19916  done
19917IFS=$as_save_IFS
19918
19919  ;;
19920esac
19921fi
19922PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19923if test -n "$PKG_CONFIG"; then
19924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19925$as_echo "$PKG_CONFIG" >&6; }
19926else
19927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19928$as_echo "no" >&6; }
19929fi
19930
19931
19932fi
19933if test -z "$ac_cv_path_PKG_CONFIG"; then
19934  ac_pt_PKG_CONFIG=$PKG_CONFIG
19935  # Extract the first word of "pkg-config", so it can be a program name with args.
19936set dummy pkg-config; ac_word=$2
19937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19938$as_echo_n "checking for $ac_word... " >&6; }
19939if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19940  $as_echo_n "(cached) " >&6
19941else
19942  case $ac_pt_PKG_CONFIG in
19943  [\\/]* | ?:[\\/]*)
19944  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19945  ;;
19946  *)
19947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19948for as_dir in $PATH
19949do
19950  IFS=$as_save_IFS
19951  test -z "$as_dir" && as_dir=.
19952    for ac_exec_ext in '' $ac_executable_extensions; do
19953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19954    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19956    break 2
19957  fi
19958done
19959  done
19960IFS=$as_save_IFS
19961
19962  ;;
19963esac
19964fi
19965ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19966if test -n "$ac_pt_PKG_CONFIG"; then
19967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19968$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19969else
19970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19971$as_echo "no" >&6; }
19972fi
19973
19974  if test "x$ac_pt_PKG_CONFIG" = x; then
19975    PKG_CONFIG=""
19976  else
19977    case $cross_compiling:$ac_tool_warned in
19978yes:)
19979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19981ac_tool_warned=yes ;;
19982esac
19983    PKG_CONFIG=$ac_pt_PKG_CONFIG
19984  fi
19985else
19986  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19987fi
19988
19989fi
19990if test -n "$PKG_CONFIG"; then
19991	_pkg_min_version=0.9.0
19992	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19993$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19994	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19995		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19996$as_echo "yes" >&6; }
19997	else
19998		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19999$as_echo "no" >&6; }
20000		PKG_CONFIG=""
20001	fi
20002
20003fi
20004
20005# After basic tools have been setup, we can check build os specific details.
20006
20007  ###############################################################################
20008
20009  # Note that this is the build platform OS version!
20010
20011  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20012  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20013  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20014  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20015
20016
20017
20018
20019
20020# Setup builddeps, for automatic downloading of tools we need.
20021# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20022# boot-jdk setup, but we need to have basic tools setup first.
20023
20024
20025# Check whether --with-builddeps-conf was given.
20026if test "${with_builddeps_conf+set}" = set; then :
20027  withval=$with_builddeps_conf;
20028fi
20029
20030
20031
20032# Check whether --with-builddeps-server was given.
20033if test "${with_builddeps_server+set}" = set; then :
20034  withval=$with_builddeps_server;
20035fi
20036
20037
20038
20039# Check whether --with-builddeps-dir was given.
20040if test "${with_builddeps_dir+set}" = set; then :
20041  withval=$with_builddeps_dir;
20042else
20043  with_builddeps_dir=/localhome/builddeps
20044fi
20045
20046
20047
20048# Check whether --with-builddeps-group was given.
20049if test "${with_builddeps_group+set}" = set; then :
20050  withval=$with_builddeps_group;
20051fi
20052
20053
20054
20055
20056  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20057    if test "x$with_builddeps_conf" != x; then
20058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20059$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20060      builddepsfile=$with_builddeps_conf
20061      if test -s $builddepsfile; then
20062        . $builddepsfile
20063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20064$as_echo "loaded!" >&6; }
20065      else
20066        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20067      fi
20068    else
20069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20070$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20071      builddepsfile=`mktemp`
20072      touch $builddepsfile
20073      # Put all found confs into a single file.
20074      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20075      # Source the file to acquire the variables
20076      if test -s $builddepsfile; then
20077        . $builddepsfile
20078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20079$as_echo "found at least one!" >&6; }
20080      else
20081        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20082      fi
20083    fi
20084    # Create build and target names that use _ instead of "-" and ".".
20085    # This is necessary to use them in variable names.
20086    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20087    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20088    # Extract rewrite information for build and target
20089    eval rewritten_build=\${REWRITE_${build_var}}
20090    if test "x$rewritten_build" = x; then
20091      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20092      echo Build stays the same $rewritten_build
20093    else
20094      echo Rewriting build for builddeps into $rewritten_build
20095    fi
20096    eval rewritten_target=\${REWRITE_${target_var}}
20097    if test "x$rewritten_target" = x; then
20098      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20099      echo Target stays the same $rewritten_target
20100    else
20101      echo Rewriting target for builddeps into $rewritten_target
20102    fi
20103    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20104    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20105  fi
20106  for ac_prog in 7z unzip
20107do
20108  # Extract the first word of "$ac_prog", so it can be a program name with args.
20109set dummy $ac_prog; ac_word=$2
20110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20111$as_echo_n "checking for $ac_word... " >&6; }
20112if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20113  $as_echo_n "(cached) " >&6
20114else
20115  if test -n "$BDEPS_UNZIP"; then
20116  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20117else
20118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20119for as_dir in $PATH
20120do
20121  IFS=$as_save_IFS
20122  test -z "$as_dir" && as_dir=.
20123    for ac_exec_ext in '' $ac_executable_extensions; do
20124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20125    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20127    break 2
20128  fi
20129done
20130  done
20131IFS=$as_save_IFS
20132
20133fi
20134fi
20135BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20136if test -n "$BDEPS_UNZIP"; then
20137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20138$as_echo "$BDEPS_UNZIP" >&6; }
20139else
20140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20141$as_echo "no" >&6; }
20142fi
20143
20144
20145  test -n "$BDEPS_UNZIP" && break
20146done
20147
20148  if test "x$BDEPS_UNZIP" = x7z; then
20149    BDEPS_UNZIP="7z x"
20150  fi
20151
20152  for ac_prog in wget lftp ftp
20153do
20154  # Extract the first word of "$ac_prog", so it can be a program name with args.
20155set dummy $ac_prog; ac_word=$2
20156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20157$as_echo_n "checking for $ac_word... " >&6; }
20158if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20159  $as_echo_n "(cached) " >&6
20160else
20161  if test -n "$BDEPS_FTP"; then
20162  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20163else
20164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20165for as_dir in $PATH
20166do
20167  IFS=$as_save_IFS
20168  test -z "$as_dir" && as_dir=.
20169    for ac_exec_ext in '' $ac_executable_extensions; do
20170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20171    ac_cv_prog_BDEPS_FTP="$ac_prog"
20172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20173    break 2
20174  fi
20175done
20176  done
20177IFS=$as_save_IFS
20178
20179fi
20180fi
20181BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20182if test -n "$BDEPS_FTP"; then
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20184$as_echo "$BDEPS_FTP" >&6; }
20185else
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20187$as_echo "no" >&6; }
20188fi
20189
20190
20191  test -n "$BDEPS_FTP" && break
20192done
20193
20194
20195
20196###############################################################################
20197#
20198# Determine OpenJDK variants, options and version numbers.
20199#
20200###############################################################################
20201
20202# We need build & target for this.
20203
20204
20205  ###############################################################################
20206  #
20207  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20208  # We always build headless support.
20209  #
20210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20211$as_echo_n "checking headful support... " >&6; }
20212  # Check whether --enable-headful was given.
20213if test "${enable_headful+set}" = set; then :
20214  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20215else
20216  SUPPORT_HEADFUL=yes
20217fi
20218
20219
20220  SUPPORT_HEADLESS=yes
20221  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20222
20223  if test "x$SUPPORT_HEADFUL" = xyes; then
20224    # We are building both headful and headless.
20225    headful_msg="include support for both headful and headless"
20226  fi
20227
20228  if test "x$SUPPORT_HEADFUL" = xno; then
20229    # Thus we are building headless only.
20230    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20231    headful_msg="headless only"
20232  fi
20233
20234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20235$as_echo "$headful_msg" >&6; }
20236
20237
20238
20239
20240
20241  # Control wether Hotspot runs Queens test after build.
20242  # Check whether --enable-hotspot-test-in-build was given.
20243if test "${enable_hotspot_test_in_build+set}" = set; then :
20244  enableval=$enable_hotspot_test_in_build;
20245else
20246  enable_hotspot_test_in_build=no
20247fi
20248
20249  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20250    TEST_IN_BUILD=true
20251  else
20252    TEST_IN_BUILD=false
20253  fi
20254
20255
20256  ###############################################################################
20257  #
20258  # Choose cacerts source file
20259  #
20260
20261# Check whether --with-cacerts-file was given.
20262if test "${with_cacerts_file+set}" = set; then :
20263  withval=$with_cacerts_file;
20264fi
20265
20266  if test "x$with_cacerts_file" != x; then
20267    CACERTS_FILE=$with_cacerts_file
20268  fi
20269
20270
20271  ###############################################################################
20272  #
20273  # Enable or disable unlimited crypto
20274  #
20275  # Check whether --enable-unlimited-crypto was given.
20276if test "${enable_unlimited_crypto+set}" = set; then :
20277  enableval=$enable_unlimited_crypto;
20278else
20279  enable_unlimited_crypto=no
20280fi
20281
20282  if test "x$enable_unlimited_crypto" = "xyes"; then
20283    UNLIMITED_CRYPTO=true
20284  else
20285    UNLIMITED_CRYPTO=false
20286  fi
20287
20288
20289  ###############################################################################
20290  #
20291  # Enable or disable the elliptic curve crypto implementation
20292  #
20293
20294
20295  ###############################################################################
20296  #
20297  # Compress jars
20298  #
20299  COMPRESS_JARS=false
20300
20301
20302
20303
20304  # Source the version numbers
20305  . $AUTOCONF_DIR/version-numbers
20306
20307  # Get the settings from parameters
20308
20309# Check whether --with-milestone was given.
20310if test "${with_milestone+set}" = set; then :
20311  withval=$with_milestone;
20312fi
20313
20314  if test "x$with_milestone" = xyes; then
20315    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20316  elif test "x$with_milestone" != x; then
20317    MILESTONE="$with_milestone"
20318  fi
20319  if test "x$MILESTONE" = x; then
20320    MILESTONE=internal
20321  fi
20322
20323
20324# Check whether --with-update-version was given.
20325if test "${with_update_version+set}" = set; then :
20326  withval=$with_update_version;
20327fi
20328
20329  if test "x$with_update_version" = xyes; then
20330    as_fn_error $? "Update version must have a value" "$LINENO" 5
20331  elif test "x$with_update_version" != x; then
20332    JDK_UPDATE_VERSION="$with_update_version"
20333    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20334    # to a bug in expr (which reduces it to just X). To work around this, we
20335    # always add a 0 to one digit update versions.
20336    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20337      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20338    fi
20339  fi
20340
20341
20342# Check whether --with-user-release-suffix was given.
20343if test "${with_user_release_suffix+set}" = set; then :
20344  withval=$with_user_release_suffix;
20345fi
20346
20347  if test "x$with_user_release_suffix" = xyes; then
20348    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20349  elif test "x$with_user_release_suffix" != x; then
20350    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20351  fi
20352
20353
20354# Check whether --with-build-number was given.
20355if test "${with_build_number+set}" = set; then :
20356  withval=$with_build_number;
20357fi
20358
20359  if test "x$with_build_number" = xyes; then
20360    as_fn_error $? "Build number must have a value" "$LINENO" 5
20361  elif test "x$with_build_number" != x; then
20362    JDK_BUILD_NUMBER="$with_build_number"
20363  fi
20364  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20365  if test "x$JDK_BUILD_NUMBER" = x; then
20366    JDK_BUILD_NUMBER=b00
20367    if test "x$USER_RELEASE_SUFFIX" = x; then
20368      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20369      # Avoid [:alnum:] since it depends on the locale.
20370      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20371      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20372    fi
20373  fi
20374
20375  # Now set the JDK version, milestone, build number etc.
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392# Check whether --with-copyright-year was given.
20393if test "${with_copyright_year+set}" = set; then :
20394  withval=$with_copyright_year;
20395fi
20396
20397  if test "x$with_copyright_year" = xyes; then
20398    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20399  elif test "x$with_copyright_year" != x; then
20400    COPYRIGHT_YEAR="$with_copyright_year"
20401  else
20402    COPYRIGHT_YEAR=`date +'%Y'`
20403  fi
20404
20405
20406  if test "x$JDK_UPDATE_VERSION" != x; then
20407    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20408  else
20409    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20410  fi
20411
20412
20413  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20414
20415
20416
20417###############################################################################
20418#
20419# Setup BootJDK, used to bootstrap the build.
20420#
20421###############################################################################
20422
20423
20424  BOOT_JDK_FOUND=no
20425
20426# Check whether --with-boot-jdk was given.
20427if test "${with_boot_jdk+set}" = set; then :
20428  withval=$with_boot_jdk;
20429fi
20430
20431
20432  # We look for the Boot JDK through various means, going from more certain to
20433  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20434  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20435  # must check if this is indeed valid; otherwise we'll continue looking.
20436
20437  # Test: Is bootjdk explicitely set by command line arguments?
20438
20439  if test "x$BOOT_JDK_FOUND" = xno; then
20440    # Now execute the test
20441
20442  if test "x$with_boot_jdk" != x; then
20443    BOOT_JDK=$with_boot_jdk
20444    BOOT_JDK_FOUND=maybe
20445    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20446$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20447  fi
20448
20449
20450    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20451    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20452      # Do we have a bin/java?
20453      if test ! -x "$BOOT_JDK/bin/java"; then
20454        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20456        BOOT_JDK_FOUND=no
20457      else
20458        # Do we have a bin/javac?
20459        if test ! -x "$BOOT_JDK/bin/javac"; then
20460          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20462          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20463$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20464          BOOT_JDK_FOUND=no
20465        else
20466          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20467          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20468
20469          # Extra M4 quote needed to protect [] in grep expression.
20470          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20471          if test "x$FOUND_CORRECT_VERSION" = x; then
20472            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20474            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20475$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20476            BOOT_JDK_FOUND=no
20477          else
20478            # We're done! :-)
20479            BOOT_JDK_FOUND=yes
20480
20481  # Only process if variable expands to non-empty
20482
20483  if test "x$BOOT_JDK" != x; then
20484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20485
20486  # Input might be given as Windows format, start by converting to
20487  # unix format.
20488  path="$BOOT_JDK"
20489  new_path=`$CYGPATH -u "$path"`
20490
20491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20494  # "foo.exe" is OK but "foo" is an error.
20495  #
20496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20497  # It is also a way to make sure we got the proper file name for the real test later on.
20498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20499  if test "x$test_shortpath" = x; then
20500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20502    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20503  fi
20504
20505  # Call helper function which possibly converts this using DOS-style short mode.
20506  # If so, the updated path is stored in $new_path.
20507
20508  input_path="$new_path"
20509  # Check if we need to convert this using DOS-style short mode. If the path
20510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20511  # take no chances and rewrite it.
20512  # Note: m4 eats our [], so we need to use [ and ] instead.
20513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20514  if test "x$has_forbidden_chars" != x; then
20515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20519      # Going to short mode and back again did indeed matter. Since short mode is
20520      # case insensitive, let's make it lowercase to improve readability.
20521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20522      # Now convert it back to Unix-style (cygpath)
20523      input_path=`$CYGPATH -u "$shortmode_path"`
20524      new_path="$input_path"
20525    fi
20526  fi
20527
20528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20529  if test "x$test_cygdrive_prefix" = x; then
20530    # As a simple fix, exclude /usr/bin since it's not a real path.
20531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20533      # a path prefixed by /cygdrive for fixpath to work.
20534      new_path="$CYGWIN_ROOT_PATH$input_path"
20535    fi
20536  fi
20537
20538
20539  if test "x$path" != "x$new_path"; then
20540    BOOT_JDK="$new_path"
20541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20543  fi
20544
20545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20546
20547  path="$BOOT_JDK"
20548  has_colon=`$ECHO $path | $GREP ^.:`
20549  new_path="$path"
20550  if test "x$has_colon" = x; then
20551    # Not in mixed or Windows style, start by that.
20552    new_path=`cmd //c echo $path`
20553  fi
20554
20555
20556  input_path="$new_path"
20557  # Check if we need to convert this using DOS-style short mode. If the path
20558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20559  # take no chances and rewrite it.
20560  # Note: m4 eats our [], so we need to use [ and ] instead.
20561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20562  if test "x$has_forbidden_chars" != x; then
20563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20565  fi
20566
20567
20568  windows_path="$new_path"
20569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20570    unix_path=`$CYGPATH -u "$windows_path"`
20571    new_path="$unix_path"
20572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20574    new_path="$unix_path"
20575  fi
20576
20577  if test "x$path" != "x$new_path"; then
20578    BOOT_JDK="$new_path"
20579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20581  fi
20582
20583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20585
20586    else
20587      # We're on a unix platform. Hooray! :)
20588      path="$BOOT_JDK"
20589      has_space=`$ECHO "$path" | $GREP " "`
20590      if test "x$has_space" != x; then
20591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20594      fi
20595
20596      # Use eval to expand a potential ~
20597      eval path="$path"
20598      if test ! -f "$path" && test ! -d "$path"; then
20599        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20600      fi
20601
20602      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20603    fi
20604  fi
20605
20606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20607$as_echo_n "checking for Boot JDK... " >&6; }
20608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20609$as_echo "$BOOT_JDK" >&6; }
20610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20611$as_echo_n "checking Boot JDK version... " >&6; }
20612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20614$as_echo "$BOOT_JDK_VERSION" >&6; }
20615          fi # end check jdk version
20616        fi # end check javac
20617      fi # end check java
20618    fi # end check boot jdk found
20619  fi
20620
20621  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20622    # Having specified an argument which is incorrect will produce an instant failure;
20623    # we should not go on looking
20624    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20625  fi
20626
20627  # Test: Is bootjdk available from builddeps?
20628
20629  if test "x$BOOT_JDK_FOUND" = xno; then
20630    # Now execute the test
20631
20632
20633
20634  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20635    # Source the builddeps file again, to make sure it uses the latest variables!
20636    . $builddepsfile
20637    # Look for a target and build machine specific resource!
20638    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20639    if test "x$resource" = x; then
20640      # Ok, lets instead look for a target specific resource
20641      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20642    fi
20643    if test "x$resource" = x; then
20644      # Ok, lets instead look for a build specific resource
20645      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20646    fi
20647    if test "x$resource" = x; then
20648      # Ok, lets instead look for a generic resource
20649      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20650      resource=${builddep_bootjdk}
20651    fi
20652    if test "x$resource" != x; then
20653      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20654$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20655      # If the resource in the builddeps.conf file is an existing directory,
20656      # for example /java/linux/cups
20657      if test -d ${resource}; then
20658        depdir=${resource}
20659      else
20660
20661  # bootjdk is for example mymodule
20662  # $resource is for example libs/general/libmymod_1_2_3.zip
20663  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20664  # $with_builddeps_dir is for example /localhome/builddeps
20665  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20666  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20667  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20668  filename=`basename $resource`
20669  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20670  filebase=${filename%%.*}
20671  extension=${filename#*.}
20672  installdir=$with_builddeps_dir/$filebase
20673  if test ! -f $installdir/$filename.unpacked; then
20674    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20675$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20676    if test ! -d $installdir; then
20677      mkdir -p $installdir
20678    fi
20679    if test ! -d $installdir; then
20680      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20681    fi
20682    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20683    touch $tmpfile
20684    if test ! -f $tmpfile; then
20685      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20686    fi
20687
20688  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20689  # $tmpfile is the local file name for the downloaded file.
20690  VALID_TOOL=no
20691  if test "x$BDEPS_FTP" = xwget; then
20692    VALID_TOOL=yes
20693    wget -O $tmpfile $with_builddeps_server/$resource
20694  fi
20695  if test "x$BDEPS_FTP" = xlftp; then
20696    VALID_TOOL=yes
20697    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20698  fi
20699  if test "x$BDEPS_FTP" = xftp; then
20700    VALID_TOOL=yes
20701    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20702    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20703    FTPUSERPWD=${FTPSERVER%%@*}
20704    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20705      FTPUSER=${userpwd%%:*}
20706      FTPPWD=${userpwd#*@}
20707      FTPSERVER=${FTPSERVER#*@}
20708    else
20709      FTPUSER=ftp
20710      FTPPWD=ftp
20711    fi
20712    # the "pass" command does not work on some
20713    # ftp clients (read ftp.exe) but if it works,
20714    # passive mode is better!
20715    ( \
20716        echo "user $FTPUSER $FTPPWD"        ; \
20717        echo "pass"                         ; \
20718        echo "bin"                          ; \
20719        echo "get $FTPPATH $tmpfile"              ; \
20720    ) | ftp -in $FTPSERVER
20721  fi
20722  if test "x$VALID_TOOL" != xyes; then
20723    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20724  fi
20725
20726    mv $tmpfile $installdir/$filename
20727    if test ! -s $installdir/$filename; then
20728      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20729    fi
20730    case "$extension" in
20731      zip)  echo "Unzipping $installdir/$filename..."
20732        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20733        ;;
20734      tar.gz) echo "Untaring $installdir/$filename..."
20735        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20736        ;;
20737      tgz) echo "Untaring $installdir/$filename..."
20738        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20739        ;;
20740      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20741        ;;
20742    esac
20743  fi
20744  if test -f $installdir/$filename.unpacked; then
20745    depdir=$installdir
20746  fi
20747
20748      fi
20749      # Source the builddeps file again, because in the previous command, the depdir
20750      # was updated to point at the current build dependency install directory.
20751      . $builddepsfile
20752      # Now extract variables from the builddeps.conf files.
20753      theroot=${builddep_bootjdk_ROOT}
20754      thecflags=${builddep_bootjdk_CFLAGS}
20755      thelibs=${builddep_bootjdk_LIBS}
20756      if test "x$depdir" = x; then
20757        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20758      fi
20759      BOOT_JDK=$depdir
20760      if test "x$theroot" != x; then
20761        BOOT_JDK="$theroot"
20762      fi
20763      if test "x$thecflags" != x; then
20764        BOOT_JDK_CFLAGS="$thecflags"
20765      fi
20766      if test "x$thelibs" != x; then
20767        BOOT_JDK_LIBS="$thelibs"
20768      fi
20769      BOOT_JDK_FOUND=maybe
20770      else BOOT_JDK_FOUND=no
20771
20772    fi
20773    else BOOT_JDK_FOUND=no
20774
20775  fi
20776
20777
20778
20779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20781      # Do we have a bin/java?
20782      if test ! -x "$BOOT_JDK/bin/java"; then
20783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20785        BOOT_JDK_FOUND=no
20786      else
20787        # Do we have a bin/javac?
20788        if test ! -x "$BOOT_JDK/bin/javac"; then
20789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20793          BOOT_JDK_FOUND=no
20794        else
20795          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20796          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20797
20798          # Extra M4 quote needed to protect [] in grep expression.
20799          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20800          if test "x$FOUND_CORRECT_VERSION" = x; then
20801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20803            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20804$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20805            BOOT_JDK_FOUND=no
20806          else
20807            # We're done! :-)
20808            BOOT_JDK_FOUND=yes
20809
20810  # Only process if variable expands to non-empty
20811
20812  if test "x$BOOT_JDK" != x; then
20813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20814
20815  # Input might be given as Windows format, start by converting to
20816  # unix format.
20817  path="$BOOT_JDK"
20818  new_path=`$CYGPATH -u "$path"`
20819
20820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20823  # "foo.exe" is OK but "foo" is an error.
20824  #
20825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20826  # It is also a way to make sure we got the proper file name for the real test later on.
20827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20828  if test "x$test_shortpath" = x; then
20829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20832  fi
20833
20834  # Call helper function which possibly converts this using DOS-style short mode.
20835  # If so, the updated path is stored in $new_path.
20836
20837  input_path="$new_path"
20838  # Check if we need to convert this using DOS-style short mode. If the path
20839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20840  # take no chances and rewrite it.
20841  # Note: m4 eats our [], so we need to use [ and ] instead.
20842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20843  if test "x$has_forbidden_chars" != x; then
20844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20848      # Going to short mode and back again did indeed matter. Since short mode is
20849      # case insensitive, let's make it lowercase to improve readability.
20850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20851      # Now convert it back to Unix-style (cygpath)
20852      input_path=`$CYGPATH -u "$shortmode_path"`
20853      new_path="$input_path"
20854    fi
20855  fi
20856
20857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20858  if test "x$test_cygdrive_prefix" = x; then
20859    # As a simple fix, exclude /usr/bin since it's not a real path.
20860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20862      # a path prefixed by /cygdrive for fixpath to work.
20863      new_path="$CYGWIN_ROOT_PATH$input_path"
20864    fi
20865  fi
20866
20867
20868  if test "x$path" != "x$new_path"; then
20869    BOOT_JDK="$new_path"
20870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20872  fi
20873
20874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875
20876  path="$BOOT_JDK"
20877  has_colon=`$ECHO $path | $GREP ^.:`
20878  new_path="$path"
20879  if test "x$has_colon" = x; then
20880    # Not in mixed or Windows style, start by that.
20881    new_path=`cmd //c echo $path`
20882  fi
20883
20884
20885  input_path="$new_path"
20886  # Check if we need to convert this using DOS-style short mode. If the path
20887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20888  # take no chances and rewrite it.
20889  # Note: m4 eats our [], so we need to use [ and ] instead.
20890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20891  if test "x$has_forbidden_chars" != x; then
20892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20894  fi
20895
20896
20897  windows_path="$new_path"
20898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20899    unix_path=`$CYGPATH -u "$windows_path"`
20900    new_path="$unix_path"
20901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20903    new_path="$unix_path"
20904  fi
20905
20906  if test "x$path" != "x$new_path"; then
20907    BOOT_JDK="$new_path"
20908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20910  fi
20911
20912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20914
20915    else
20916      # We're on a unix platform. Hooray! :)
20917      path="$BOOT_JDK"
20918      has_space=`$ECHO "$path" | $GREP " "`
20919      if test "x$has_space" != x; then
20920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20923      fi
20924
20925      # Use eval to expand a potential ~
20926      eval path="$path"
20927      if test ! -f "$path" && test ! -d "$path"; then
20928        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20929      fi
20930
20931      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20932    fi
20933  fi
20934
20935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20936$as_echo_n "checking for Boot JDK... " >&6; }
20937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20938$as_echo "$BOOT_JDK" >&6; }
20939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20940$as_echo_n "checking Boot JDK version... " >&6; }
20941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20943$as_echo "$BOOT_JDK_VERSION" >&6; }
20944          fi # end check jdk version
20945        fi # end check javac
20946      fi # end check java
20947    fi # end check boot jdk found
20948  fi
20949
20950
20951  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20952
20953  if test "x$BOOT_JDK_FOUND" = xno; then
20954    # Now execute the test
20955
20956  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20957    # First check at user selected default
20958
20959  if test "x$BOOT_JDK_FOUND" = xno; then
20960    # Now execute the test
20961
20962  if test -x /usr/libexec/java_home; then
20963    BOOT_JDK=`/usr/libexec/java_home `
20964    BOOT_JDK_FOUND=maybe
20965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20966$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20967  fi
20968
20969
20970    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20971    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20972      # Do we have a bin/java?
20973      if test ! -x "$BOOT_JDK/bin/java"; then
20974        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20976        BOOT_JDK_FOUND=no
20977      else
20978        # Do we have a bin/javac?
20979        if test ! -x "$BOOT_JDK/bin/javac"; then
20980          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20982          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20983$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20984          BOOT_JDK_FOUND=no
20985        else
20986          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20987          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20988
20989          # Extra M4 quote needed to protect [] in grep expression.
20990          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20991          if test "x$FOUND_CORRECT_VERSION" = x; then
20992            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20994            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20995$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20996            BOOT_JDK_FOUND=no
20997          else
20998            # We're done! :-)
20999            BOOT_JDK_FOUND=yes
21000
21001  # Only process if variable expands to non-empty
21002
21003  if test "x$BOOT_JDK" != x; then
21004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21005
21006  # Input might be given as Windows format, start by converting to
21007  # unix format.
21008  path="$BOOT_JDK"
21009  new_path=`$CYGPATH -u "$path"`
21010
21011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21014  # "foo.exe" is OK but "foo" is an error.
21015  #
21016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21017  # It is also a way to make sure we got the proper file name for the real test later on.
21018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21019  if test "x$test_shortpath" = x; then
21020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21022    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21023  fi
21024
21025  # Call helper function which possibly converts this using DOS-style short mode.
21026  # If so, the updated path is stored in $new_path.
21027
21028  input_path="$new_path"
21029  # Check if we need to convert this using DOS-style short mode. If the path
21030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21031  # take no chances and rewrite it.
21032  # Note: m4 eats our [], so we need to use [ and ] instead.
21033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21034  if test "x$has_forbidden_chars" != x; then
21035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21039      # Going to short mode and back again did indeed matter. Since short mode is
21040      # case insensitive, let's make it lowercase to improve readability.
21041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21042      # Now convert it back to Unix-style (cygpath)
21043      input_path=`$CYGPATH -u "$shortmode_path"`
21044      new_path="$input_path"
21045    fi
21046  fi
21047
21048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21049  if test "x$test_cygdrive_prefix" = x; then
21050    # As a simple fix, exclude /usr/bin since it's not a real path.
21051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21053      # a path prefixed by /cygdrive for fixpath to work.
21054      new_path="$CYGWIN_ROOT_PATH$input_path"
21055    fi
21056  fi
21057
21058
21059  if test "x$path" != "x$new_path"; then
21060    BOOT_JDK="$new_path"
21061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21063  fi
21064
21065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21066
21067  path="$BOOT_JDK"
21068  has_colon=`$ECHO $path | $GREP ^.:`
21069  new_path="$path"
21070  if test "x$has_colon" = x; then
21071    # Not in mixed or Windows style, start by that.
21072    new_path=`cmd //c echo $path`
21073  fi
21074
21075
21076  input_path="$new_path"
21077  # Check if we need to convert this using DOS-style short mode. If the path
21078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21079  # take no chances and rewrite it.
21080  # Note: m4 eats our [], so we need to use [ and ] instead.
21081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21082  if test "x$has_forbidden_chars" != x; then
21083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21085  fi
21086
21087
21088  windows_path="$new_path"
21089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21090    unix_path=`$CYGPATH -u "$windows_path"`
21091    new_path="$unix_path"
21092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21094    new_path="$unix_path"
21095  fi
21096
21097  if test "x$path" != "x$new_path"; then
21098    BOOT_JDK="$new_path"
21099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21101  fi
21102
21103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21105
21106    else
21107      # We're on a unix platform. Hooray! :)
21108      path="$BOOT_JDK"
21109      has_space=`$ECHO "$path" | $GREP " "`
21110      if test "x$has_space" != x; then
21111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21114      fi
21115
21116      # Use eval to expand a potential ~
21117      eval path="$path"
21118      if test ! -f "$path" && test ! -d "$path"; then
21119        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21120      fi
21121
21122      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21123    fi
21124  fi
21125
21126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21127$as_echo_n "checking for Boot JDK... " >&6; }
21128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21129$as_echo "$BOOT_JDK" >&6; }
21130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21131$as_echo_n "checking Boot JDK version... " >&6; }
21132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21134$as_echo "$BOOT_JDK_VERSION" >&6; }
21135          fi # end check jdk version
21136        fi # end check javac
21137      fi # end check java
21138    fi # end check boot jdk found
21139  fi
21140
21141    # If that did not work out (e.g. too old), try explicit versions instead
21142
21143  if test "x$BOOT_JDK_FOUND" = xno; then
21144    # Now execute the test
21145
21146  if test -x /usr/libexec/java_home; then
21147    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21148    BOOT_JDK_FOUND=maybe
21149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21150$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21151  fi
21152
21153
21154    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21155    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21156      # Do we have a bin/java?
21157      if test ! -x "$BOOT_JDK/bin/java"; then
21158        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21160        BOOT_JDK_FOUND=no
21161      else
21162        # Do we have a bin/javac?
21163        if test ! -x "$BOOT_JDK/bin/javac"; then
21164          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21166          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21167$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21168          BOOT_JDK_FOUND=no
21169        else
21170          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21171          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21172
21173          # Extra M4 quote needed to protect [] in grep expression.
21174          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21175          if test "x$FOUND_CORRECT_VERSION" = x; then
21176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21178            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21179$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21180            BOOT_JDK_FOUND=no
21181          else
21182            # We're done! :-)
21183            BOOT_JDK_FOUND=yes
21184
21185  # Only process if variable expands to non-empty
21186
21187  if test "x$BOOT_JDK" != x; then
21188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21189
21190  # Input might be given as Windows format, start by converting to
21191  # unix format.
21192  path="$BOOT_JDK"
21193  new_path=`$CYGPATH -u "$path"`
21194
21195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21198  # "foo.exe" is OK but "foo" is an error.
21199  #
21200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21201  # It is also a way to make sure we got the proper file name for the real test later on.
21202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21203  if test "x$test_shortpath" = x; then
21204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21207  fi
21208
21209  # Call helper function which possibly converts this using DOS-style short mode.
21210  # If so, the updated path is stored in $new_path.
21211
21212  input_path="$new_path"
21213  # Check if we need to convert this using DOS-style short mode. If the path
21214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21215  # take no chances and rewrite it.
21216  # Note: m4 eats our [], so we need to use [ and ] instead.
21217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21218  if test "x$has_forbidden_chars" != x; then
21219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21223      # Going to short mode and back again did indeed matter. Since short mode is
21224      # case insensitive, let's make it lowercase to improve readability.
21225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21226      # Now convert it back to Unix-style (cygpath)
21227      input_path=`$CYGPATH -u "$shortmode_path"`
21228      new_path="$input_path"
21229    fi
21230  fi
21231
21232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21233  if test "x$test_cygdrive_prefix" = x; then
21234    # As a simple fix, exclude /usr/bin since it's not a real path.
21235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21237      # a path prefixed by /cygdrive for fixpath to work.
21238      new_path="$CYGWIN_ROOT_PATH$input_path"
21239    fi
21240  fi
21241
21242
21243  if test "x$path" != "x$new_path"; then
21244    BOOT_JDK="$new_path"
21245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21247  fi
21248
21249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21250
21251  path="$BOOT_JDK"
21252  has_colon=`$ECHO $path | $GREP ^.:`
21253  new_path="$path"
21254  if test "x$has_colon" = x; then
21255    # Not in mixed or Windows style, start by that.
21256    new_path=`cmd //c echo $path`
21257  fi
21258
21259
21260  input_path="$new_path"
21261  # Check if we need to convert this using DOS-style short mode. If the path
21262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21263  # take no chances and rewrite it.
21264  # Note: m4 eats our [], so we need to use [ and ] instead.
21265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21266  if test "x$has_forbidden_chars" != x; then
21267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21269  fi
21270
21271
21272  windows_path="$new_path"
21273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274    unix_path=`$CYGPATH -u "$windows_path"`
21275    new_path="$unix_path"
21276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21278    new_path="$unix_path"
21279  fi
21280
21281  if test "x$path" != "x$new_path"; then
21282    BOOT_JDK="$new_path"
21283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21285  fi
21286
21287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21289
21290    else
21291      # We're on a unix platform. Hooray! :)
21292      path="$BOOT_JDK"
21293      has_space=`$ECHO "$path" | $GREP " "`
21294      if test "x$has_space" != x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21298      fi
21299
21300      # Use eval to expand a potential ~
21301      eval path="$path"
21302      if test ! -f "$path" && test ! -d "$path"; then
21303        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21304      fi
21305
21306      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21307    fi
21308  fi
21309
21310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21311$as_echo_n "checking for Boot JDK... " >&6; }
21312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21313$as_echo "$BOOT_JDK" >&6; }
21314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21315$as_echo_n "checking Boot JDK version... " >&6; }
21316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21318$as_echo "$BOOT_JDK_VERSION" >&6; }
21319          fi # end check jdk version
21320        fi # end check javac
21321      fi # end check java
21322    fi # end check boot jdk found
21323  fi
21324
21325
21326  if test "x$BOOT_JDK_FOUND" = xno; then
21327    # Now execute the test
21328
21329  if test -x /usr/libexec/java_home; then
21330    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21331    BOOT_JDK_FOUND=maybe
21332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21333$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21334  fi
21335
21336
21337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21339      # Do we have a bin/java?
21340      if test ! -x "$BOOT_JDK/bin/java"; then
21341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21343        BOOT_JDK_FOUND=no
21344      else
21345        # Do we have a bin/javac?
21346        if test ! -x "$BOOT_JDK/bin/javac"; then
21347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21351          BOOT_JDK_FOUND=no
21352        else
21353          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21354          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21355
21356          # Extra M4 quote needed to protect [] in grep expression.
21357          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21358          if test "x$FOUND_CORRECT_VERSION" = x; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21361            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21362$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21363            BOOT_JDK_FOUND=no
21364          else
21365            # We're done! :-)
21366            BOOT_JDK_FOUND=yes
21367
21368  # Only process if variable expands to non-empty
21369
21370  if test "x$BOOT_JDK" != x; then
21371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21372
21373  # Input might be given as Windows format, start by converting to
21374  # unix format.
21375  path="$BOOT_JDK"
21376  new_path=`$CYGPATH -u "$path"`
21377
21378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21381  # "foo.exe" is OK but "foo" is an error.
21382  #
21383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21384  # It is also a way to make sure we got the proper file name for the real test later on.
21385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21386  if test "x$test_shortpath" = x; then
21387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21389    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21390  fi
21391
21392  # Call helper function which possibly converts this using DOS-style short mode.
21393  # If so, the updated path is stored in $new_path.
21394
21395  input_path="$new_path"
21396  # Check if we need to convert this using DOS-style short mode. If the path
21397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21398  # take no chances and rewrite it.
21399  # Note: m4 eats our [], so we need to use [ and ] instead.
21400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21401  if test "x$has_forbidden_chars" != x; then
21402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21406      # Going to short mode and back again did indeed matter. Since short mode is
21407      # case insensitive, let's make it lowercase to improve readability.
21408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21409      # Now convert it back to Unix-style (cygpath)
21410      input_path=`$CYGPATH -u "$shortmode_path"`
21411      new_path="$input_path"
21412    fi
21413  fi
21414
21415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21416  if test "x$test_cygdrive_prefix" = x; then
21417    # As a simple fix, exclude /usr/bin since it's not a real path.
21418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21420      # a path prefixed by /cygdrive for fixpath to work.
21421      new_path="$CYGWIN_ROOT_PATH$input_path"
21422    fi
21423  fi
21424
21425
21426  if test "x$path" != "x$new_path"; then
21427    BOOT_JDK="$new_path"
21428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21429$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21430  fi
21431
21432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21433
21434  path="$BOOT_JDK"
21435  has_colon=`$ECHO $path | $GREP ^.:`
21436  new_path="$path"
21437  if test "x$has_colon" = x; then
21438    # Not in mixed or Windows style, start by that.
21439    new_path=`cmd //c echo $path`
21440  fi
21441
21442
21443  input_path="$new_path"
21444  # Check if we need to convert this using DOS-style short mode. If the path
21445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21446  # take no chances and rewrite it.
21447  # Note: m4 eats our [], so we need to use [ and ] instead.
21448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21449  if test "x$has_forbidden_chars" != x; then
21450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21452  fi
21453
21454
21455  windows_path="$new_path"
21456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21457    unix_path=`$CYGPATH -u "$windows_path"`
21458    new_path="$unix_path"
21459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21461    new_path="$unix_path"
21462  fi
21463
21464  if test "x$path" != "x$new_path"; then
21465    BOOT_JDK="$new_path"
21466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21468  fi
21469
21470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21472
21473    else
21474      # We're on a unix platform. Hooray! :)
21475      path="$BOOT_JDK"
21476      has_space=`$ECHO "$path" | $GREP " "`
21477      if test "x$has_space" != x; then
21478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21479$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21481      fi
21482
21483      # Use eval to expand a potential ~
21484      eval path="$path"
21485      if test ! -f "$path" && test ! -d "$path"; then
21486        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21487      fi
21488
21489      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21490    fi
21491  fi
21492
21493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21494$as_echo_n "checking for Boot JDK... " >&6; }
21495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21496$as_echo "$BOOT_JDK" >&6; }
21497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21498$as_echo_n "checking Boot JDK version... " >&6; }
21499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21501$as_echo "$BOOT_JDK_VERSION" >&6; }
21502          fi # end check jdk version
21503        fi # end check javac
21504      fi # end check java
21505    fi # end check boot jdk found
21506  fi
21507
21508
21509  if test "x$BOOT_JDK_FOUND" = xno; then
21510    # Now execute the test
21511
21512  if test -x /usr/libexec/java_home; then
21513    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21514    BOOT_JDK_FOUND=maybe
21515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21516$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21517  fi
21518
21519
21520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21522      # Do we have a bin/java?
21523      if test ! -x "$BOOT_JDK/bin/java"; then
21524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21526        BOOT_JDK_FOUND=no
21527      else
21528        # Do we have a bin/javac?
21529        if test ! -x "$BOOT_JDK/bin/javac"; then
21530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21534          BOOT_JDK_FOUND=no
21535        else
21536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21538
21539          # Extra M4 quote needed to protect [] in grep expression.
21540          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21541          if test "x$FOUND_CORRECT_VERSION" = x; then
21542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21546            BOOT_JDK_FOUND=no
21547          else
21548            # We're done! :-)
21549            BOOT_JDK_FOUND=yes
21550
21551  # Only process if variable expands to non-empty
21552
21553  if test "x$BOOT_JDK" != x; then
21554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21555
21556  # Input might be given as Windows format, start by converting to
21557  # unix format.
21558  path="$BOOT_JDK"
21559  new_path=`$CYGPATH -u "$path"`
21560
21561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21564  # "foo.exe" is OK but "foo" is an error.
21565  #
21566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21567  # It is also a way to make sure we got the proper file name for the real test later on.
21568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21569  if test "x$test_shortpath" = x; then
21570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21573  fi
21574
21575  # Call helper function which possibly converts this using DOS-style short mode.
21576  # If so, the updated path is stored in $new_path.
21577
21578  input_path="$new_path"
21579  # Check if we need to convert this using DOS-style short mode. If the path
21580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21581  # take no chances and rewrite it.
21582  # Note: m4 eats our [], so we need to use [ and ] instead.
21583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21584  if test "x$has_forbidden_chars" != x; then
21585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21589      # Going to short mode and back again did indeed matter. Since short mode is
21590      # case insensitive, let's make it lowercase to improve readability.
21591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21592      # Now convert it back to Unix-style (cygpath)
21593      input_path=`$CYGPATH -u "$shortmode_path"`
21594      new_path="$input_path"
21595    fi
21596  fi
21597
21598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21599  if test "x$test_cygdrive_prefix" = x; then
21600    # As a simple fix, exclude /usr/bin since it's not a real path.
21601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21603      # a path prefixed by /cygdrive for fixpath to work.
21604      new_path="$CYGWIN_ROOT_PATH$input_path"
21605    fi
21606  fi
21607
21608
21609  if test "x$path" != "x$new_path"; then
21610    BOOT_JDK="$new_path"
21611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21613  fi
21614
21615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21616
21617  path="$BOOT_JDK"
21618  has_colon=`$ECHO $path | $GREP ^.:`
21619  new_path="$path"
21620  if test "x$has_colon" = x; then
21621    # Not in mixed or Windows style, start by that.
21622    new_path=`cmd //c echo $path`
21623  fi
21624
21625
21626  input_path="$new_path"
21627  # Check if we need to convert this using DOS-style short mode. If the path
21628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21629  # take no chances and rewrite it.
21630  # Note: m4 eats our [], so we need to use [ and ] instead.
21631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21632  if test "x$has_forbidden_chars" != x; then
21633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21635  fi
21636
21637
21638  windows_path="$new_path"
21639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21640    unix_path=`$CYGPATH -u "$windows_path"`
21641    new_path="$unix_path"
21642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21644    new_path="$unix_path"
21645  fi
21646
21647  if test "x$path" != "x$new_path"; then
21648    BOOT_JDK="$new_path"
21649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21651  fi
21652
21653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21655
21656    else
21657      # We're on a unix platform. Hooray! :)
21658      path="$BOOT_JDK"
21659      has_space=`$ECHO "$path" | $GREP " "`
21660      if test "x$has_space" != x; then
21661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21664      fi
21665
21666      # Use eval to expand a potential ~
21667      eval path="$path"
21668      if test ! -f "$path" && test ! -d "$path"; then
21669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21670      fi
21671
21672      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21673    fi
21674  fi
21675
21676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21677$as_echo_n "checking for Boot JDK... " >&6; }
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21679$as_echo "$BOOT_JDK" >&6; }
21680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21681$as_echo_n "checking Boot JDK version... " >&6; }
21682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21684$as_echo "$BOOT_JDK_VERSION" >&6; }
21685          fi # end check jdk version
21686        fi # end check javac
21687      fi # end check java
21688    fi # end check boot jdk found
21689  fi
21690
21691  fi
21692
21693
21694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21696      # Do we have a bin/java?
21697      if test ! -x "$BOOT_JDK/bin/java"; then
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21700        BOOT_JDK_FOUND=no
21701      else
21702        # Do we have a bin/javac?
21703        if test ! -x "$BOOT_JDK/bin/javac"; then
21704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21708          BOOT_JDK_FOUND=no
21709        else
21710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21712
21713          # Extra M4 quote needed to protect [] in grep expression.
21714          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21715          if test "x$FOUND_CORRECT_VERSION" = x; then
21716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21720            BOOT_JDK_FOUND=no
21721          else
21722            # We're done! :-)
21723            BOOT_JDK_FOUND=yes
21724
21725  # Only process if variable expands to non-empty
21726
21727  if test "x$BOOT_JDK" != x; then
21728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21729
21730  # Input might be given as Windows format, start by converting to
21731  # unix format.
21732  path="$BOOT_JDK"
21733  new_path=`$CYGPATH -u "$path"`
21734
21735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21738  # "foo.exe" is OK but "foo" is an error.
21739  #
21740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21741  # It is also a way to make sure we got the proper file name for the real test later on.
21742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21743  if test "x$test_shortpath" = x; then
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21747  fi
21748
21749  # Call helper function which possibly converts this using DOS-style short mode.
21750  # If so, the updated path is stored in $new_path.
21751
21752  input_path="$new_path"
21753  # Check if we need to convert this using DOS-style short mode. If the path
21754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21755  # take no chances and rewrite it.
21756  # Note: m4 eats our [], so we need to use [ and ] instead.
21757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21758  if test "x$has_forbidden_chars" != x; then
21759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21763      # Going to short mode and back again did indeed matter. Since short mode is
21764      # case insensitive, let's make it lowercase to improve readability.
21765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21766      # Now convert it back to Unix-style (cygpath)
21767      input_path=`$CYGPATH -u "$shortmode_path"`
21768      new_path="$input_path"
21769    fi
21770  fi
21771
21772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21773  if test "x$test_cygdrive_prefix" = x; then
21774    # As a simple fix, exclude /usr/bin since it's not a real path.
21775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21777      # a path prefixed by /cygdrive for fixpath to work.
21778      new_path="$CYGWIN_ROOT_PATH$input_path"
21779    fi
21780  fi
21781
21782
21783  if test "x$path" != "x$new_path"; then
21784    BOOT_JDK="$new_path"
21785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21787  fi
21788
21789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21790
21791  path="$BOOT_JDK"
21792  has_colon=`$ECHO $path | $GREP ^.:`
21793  new_path="$path"
21794  if test "x$has_colon" = x; then
21795    # Not in mixed or Windows style, start by that.
21796    new_path=`cmd //c echo $path`
21797  fi
21798
21799
21800  input_path="$new_path"
21801  # Check if we need to convert this using DOS-style short mode. If the path
21802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21803  # take no chances and rewrite it.
21804  # Note: m4 eats our [], so we need to use [ and ] instead.
21805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21806  if test "x$has_forbidden_chars" != x; then
21807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21809  fi
21810
21811
21812  windows_path="$new_path"
21813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21814    unix_path=`$CYGPATH -u "$windows_path"`
21815    new_path="$unix_path"
21816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21818    new_path="$unix_path"
21819  fi
21820
21821  if test "x$path" != "x$new_path"; then
21822    BOOT_JDK="$new_path"
21823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21825  fi
21826
21827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21829
21830    else
21831      # We're on a unix platform. Hooray! :)
21832      path="$BOOT_JDK"
21833      has_space=`$ECHO "$path" | $GREP " "`
21834      if test "x$has_space" != x; then
21835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21838      fi
21839
21840      # Use eval to expand a potential ~
21841      eval path="$path"
21842      if test ! -f "$path" && test ! -d "$path"; then
21843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21844      fi
21845
21846      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21847    fi
21848  fi
21849
21850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21851$as_echo_n "checking for Boot JDK... " >&6; }
21852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21853$as_echo "$BOOT_JDK" >&6; }
21854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21855$as_echo_n "checking Boot JDK version... " >&6; }
21856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21858$as_echo "$BOOT_JDK_VERSION" >&6; }
21859          fi # end check jdk version
21860        fi # end check javac
21861      fi # end check java
21862    fi # end check boot jdk found
21863  fi
21864
21865
21866  # Test: Is $JAVA_HOME set?
21867
21868  if test "x$BOOT_JDK_FOUND" = xno; then
21869    # Now execute the test
21870
21871  if test "x$JAVA_HOME" != x; then
21872    JAVA_HOME_PROCESSED="$JAVA_HOME"
21873
21874  # Only process if variable expands to non-empty
21875
21876  if test "x$JAVA_HOME_PROCESSED" != x; then
21877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21878
21879  # Input might be given as Windows format, start by converting to
21880  # unix format.
21881  path="$JAVA_HOME_PROCESSED"
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21887  # "foo.exe" is OK but "foo" is an error.
21888  #
21889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21890  # It is also a way to make sure we got the proper file name for the real test later on.
21891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21892  if test "x$test_shortpath" = x; then
21893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21894$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21895    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21896  fi
21897
21898  # Call helper function which possibly converts this using DOS-style short mode.
21899  # If so, the updated path is stored in $new_path.
21900
21901  input_path="$new_path"
21902  # Check if we need to convert this using DOS-style short mode. If the path
21903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21904  # take no chances and rewrite it.
21905  # Note: m4 eats our [], so we need to use [ and ] instead.
21906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21907  if test "x$has_forbidden_chars" != x; then
21908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21912      # Going to short mode and back again did indeed matter. Since short mode is
21913      # case insensitive, let's make it lowercase to improve readability.
21914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21915      # Now convert it back to Unix-style (cygpath)
21916      input_path=`$CYGPATH -u "$shortmode_path"`
21917      new_path="$input_path"
21918    fi
21919  fi
21920
21921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21922  if test "x$test_cygdrive_prefix" = x; then
21923    # As a simple fix, exclude /usr/bin since it's not a real path.
21924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21926      # a path prefixed by /cygdrive for fixpath to work.
21927      new_path="$CYGWIN_ROOT_PATH$input_path"
21928    fi
21929  fi
21930
21931
21932  if test "x$path" != "x$new_path"; then
21933    JAVA_HOME_PROCESSED="$new_path"
21934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21935$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21936  fi
21937
21938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21939
21940  path="$JAVA_HOME_PROCESSED"
21941  has_colon=`$ECHO $path | $GREP ^.:`
21942  new_path="$path"
21943  if test "x$has_colon" = x; then
21944    # Not in mixed or Windows style, start by that.
21945    new_path=`cmd //c echo $path`
21946  fi
21947
21948
21949  input_path="$new_path"
21950  # Check if we need to convert this using DOS-style short mode. If the path
21951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21952  # take no chances and rewrite it.
21953  # Note: m4 eats our [], so we need to use [ and ] instead.
21954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21955  if test "x$has_forbidden_chars" != x; then
21956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21958  fi
21959
21960
21961  windows_path="$new_path"
21962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21963    unix_path=`$CYGPATH -u "$windows_path"`
21964    new_path="$unix_path"
21965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21967    new_path="$unix_path"
21968  fi
21969
21970  if test "x$path" != "x$new_path"; then
21971    JAVA_HOME_PROCESSED="$new_path"
21972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21973$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21974  fi
21975
21976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21978
21979    else
21980      # We're on a unix platform. Hooray! :)
21981      path="$JAVA_HOME_PROCESSED"
21982      has_space=`$ECHO "$path" | $GREP " "`
21983      if test "x$has_space" != x; then
21984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21985$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21987      fi
21988
21989      # Use eval to expand a potential ~
21990      eval path="$path"
21991      if test ! -f "$path" && test ! -d "$path"; then
21992        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21993      fi
21994
21995      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21996    fi
21997  fi
21998
21999    if test ! -d "$JAVA_HOME_PROCESSED"; then
22000      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22001$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22002    else
22003      # Aha, the user has set a JAVA_HOME
22004      # let us use that as the Boot JDK.
22005      BOOT_JDK="$JAVA_HOME_PROCESSED"
22006      BOOT_JDK_FOUND=maybe
22007      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22008$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22009    fi
22010  fi
22011
22012
22013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22015      # Do we have a bin/java?
22016      if test ! -x "$BOOT_JDK/bin/java"; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22019        BOOT_JDK_FOUND=no
22020      else
22021        # Do we have a bin/javac?
22022        if test ! -x "$BOOT_JDK/bin/javac"; then
22023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22027          BOOT_JDK_FOUND=no
22028        else
22029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22031
22032          # Extra M4 quote needed to protect [] in grep expression.
22033          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22034          if test "x$FOUND_CORRECT_VERSION" = x; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22039            BOOT_JDK_FOUND=no
22040          else
22041            # We're done! :-)
22042            BOOT_JDK_FOUND=yes
22043
22044  # Only process if variable expands to non-empty
22045
22046  if test "x$BOOT_JDK" != x; then
22047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22048
22049  # Input might be given as Windows format, start by converting to
22050  # unix format.
22051  path="$BOOT_JDK"
22052  new_path=`$CYGPATH -u "$path"`
22053
22054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22057  # "foo.exe" is OK but "foo" is an error.
22058  #
22059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22060  # It is also a way to make sure we got the proper file name for the real test later on.
22061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22062  if test "x$test_shortpath" = x; then
22063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22066  fi
22067
22068  # Call helper function which possibly converts this using DOS-style short mode.
22069  # If so, the updated path is stored in $new_path.
22070
22071  input_path="$new_path"
22072  # Check if we need to convert this using DOS-style short mode. If the path
22073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22074  # take no chances and rewrite it.
22075  # Note: m4 eats our [], so we need to use [ and ] instead.
22076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22077  if test "x$has_forbidden_chars" != x; then
22078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22082      # Going to short mode and back again did indeed matter. Since short mode is
22083      # case insensitive, let's make it lowercase to improve readability.
22084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22085      # Now convert it back to Unix-style (cygpath)
22086      input_path=`$CYGPATH -u "$shortmode_path"`
22087      new_path="$input_path"
22088    fi
22089  fi
22090
22091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22092  if test "x$test_cygdrive_prefix" = x; then
22093    # As a simple fix, exclude /usr/bin since it's not a real path.
22094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22096      # a path prefixed by /cygdrive for fixpath to work.
22097      new_path="$CYGWIN_ROOT_PATH$input_path"
22098    fi
22099  fi
22100
22101
22102  if test "x$path" != "x$new_path"; then
22103    BOOT_JDK="$new_path"
22104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22106  fi
22107
22108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22109
22110  path="$BOOT_JDK"
22111  has_colon=`$ECHO $path | $GREP ^.:`
22112  new_path="$path"
22113  if test "x$has_colon" = x; then
22114    # Not in mixed or Windows style, start by that.
22115    new_path=`cmd //c echo $path`
22116  fi
22117
22118
22119  input_path="$new_path"
22120  # Check if we need to convert this using DOS-style short mode. If the path
22121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22122  # take no chances and rewrite it.
22123  # Note: m4 eats our [], so we need to use [ and ] instead.
22124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22125  if test "x$has_forbidden_chars" != x; then
22126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22128  fi
22129
22130
22131  windows_path="$new_path"
22132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22133    unix_path=`$CYGPATH -u "$windows_path"`
22134    new_path="$unix_path"
22135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22137    new_path="$unix_path"
22138  fi
22139
22140  if test "x$path" != "x$new_path"; then
22141    BOOT_JDK="$new_path"
22142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22144  fi
22145
22146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22148
22149    else
22150      # We're on a unix platform. Hooray! :)
22151      path="$BOOT_JDK"
22152      has_space=`$ECHO "$path" | $GREP " "`
22153      if test "x$has_space" != x; then
22154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22157      fi
22158
22159      # Use eval to expand a potential ~
22160      eval path="$path"
22161      if test ! -f "$path" && test ! -d "$path"; then
22162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22163      fi
22164
22165      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22166    fi
22167  fi
22168
22169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22170$as_echo_n "checking for Boot JDK... " >&6; }
22171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22172$as_echo "$BOOT_JDK" >&6; }
22173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22174$as_echo_n "checking Boot JDK version... " >&6; }
22175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22177$as_echo "$BOOT_JDK_VERSION" >&6; }
22178          fi # end check jdk version
22179        fi # end check javac
22180      fi # end check java
22181    fi # end check boot jdk found
22182  fi
22183
22184
22185  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22186
22187  if test "x$BOOT_JDK_FOUND" = xno; then
22188    # Now execute the test
22189
22190  # Extract the first word of "javac", so it can be a program name with args.
22191set dummy javac; ac_word=$2
22192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22193$as_echo_n "checking for $ac_word... " >&6; }
22194if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22195  $as_echo_n "(cached) " >&6
22196else
22197  case $JAVAC_CHECK in
22198  [\\/]* | ?:[\\/]*)
22199  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22200  ;;
22201  *)
22202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22203for as_dir in $PATH
22204do
22205  IFS=$as_save_IFS
22206  test -z "$as_dir" && as_dir=.
22207    for ac_exec_ext in '' $ac_executable_extensions; do
22208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22209    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22211    break 2
22212  fi
22213done
22214  done
22215IFS=$as_save_IFS
22216
22217  ;;
22218esac
22219fi
22220JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22221if test -n "$JAVAC_CHECK"; then
22222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22223$as_echo "$JAVAC_CHECK" >&6; }
22224else
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22226$as_echo "no" >&6; }
22227fi
22228
22229
22230  # Extract the first word of "java", so it can be a program name with args.
22231set dummy java; ac_word=$2
22232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22233$as_echo_n "checking for $ac_word... " >&6; }
22234if ${ac_cv_path_JAVA_CHECK+:} false; then :
22235  $as_echo_n "(cached) " >&6
22236else
22237  case $JAVA_CHECK in
22238  [\\/]* | ?:[\\/]*)
22239  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22240  ;;
22241  *)
22242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22243for as_dir in $PATH
22244do
22245  IFS=$as_save_IFS
22246  test -z "$as_dir" && as_dir=.
22247    for ac_exec_ext in '' $ac_executable_extensions; do
22248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22249    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22251    break 2
22252  fi
22253done
22254  done
22255IFS=$as_save_IFS
22256
22257  ;;
22258esac
22259fi
22260JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22261if test -n "$JAVA_CHECK"; then
22262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22263$as_echo "$JAVA_CHECK" >&6; }
22264else
22265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22266$as_echo "no" >&6; }
22267fi
22268
22269
22270  BINARY="$JAVAC_CHECK"
22271  if test "x$JAVAC_CHECK" = x; then
22272    BINARY="$JAVA_CHECK"
22273  fi
22274  if test "x$BINARY" != x; then
22275    # So there is a java(c) binary, it might be part of a JDK.
22276    # Lets find the JDK/JRE directory by following symbolic links.
22277    # Linux/GNU systems often have links from /usr/bin/java to
22278    # /etc/alternatives/java to the real JDK binary.
22279
22280  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22281    # Follow a chain of symbolic links. Use readlink
22282    # where it exists, else fall back to horribly
22283    # complicated shell code.
22284    if test "x$READLINK_TESTED" != yes; then
22285      # On MacOSX there is a readlink tool with a different
22286      # purpose than the GNU readlink tool. Check the found readlink.
22287      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22288      if test "x$ISGNU" = x; then
22289        # A readlink that we do not know how to use.
22290        # Are there other non-GNU readlinks out there?
22291        READLINK_TESTED=yes
22292        READLINK=
22293      fi
22294    fi
22295
22296    if test "x$READLINK" != x; then
22297      BINARY=`$READLINK -f $BINARY`
22298    else
22299      # Save the current directory for restoring afterwards
22300      STARTDIR=$PWD
22301      COUNTER=0
22302      sym_link_dir=`$DIRNAME $BINARY`
22303      sym_link_file=`$BASENAME $BINARY`
22304      cd $sym_link_dir
22305      # Use -P flag to resolve symlinks in directories.
22306      cd `$THEPWDCMD -P`
22307      sym_link_dir=`$THEPWDCMD -P`
22308      # Resolve file symlinks
22309      while test $COUNTER -lt 20; do
22310        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22311        if test "x$ISLINK" == x; then
22312          # This is not a symbolic link! We are done!
22313          break
22314        fi
22315        # Again resolve directory symlinks since the target of the just found
22316        # link could be in a different directory
22317        cd `$DIRNAME $ISLINK`
22318        sym_link_dir=`$THEPWDCMD -P`
22319        sym_link_file=`$BASENAME $ISLINK`
22320        let COUNTER=COUNTER+1
22321      done
22322      cd $STARTDIR
22323      BINARY=$sym_link_dir/$sym_link_file
22324    fi
22325  fi
22326
22327    BOOT_JDK=`dirname "$BINARY"`
22328    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22329    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22330      # Looks like we found ourselves an JDK
22331      BOOT_JDK_FOUND=maybe
22332      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22333$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22334    fi
22335  fi
22336
22337
22338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22340      # Do we have a bin/java?
22341      if test ! -x "$BOOT_JDK/bin/java"; then
22342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22344        BOOT_JDK_FOUND=no
22345      else
22346        # Do we have a bin/javac?
22347        if test ! -x "$BOOT_JDK/bin/javac"; then
22348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22352          BOOT_JDK_FOUND=no
22353        else
22354          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22355          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22356
22357          # Extra M4 quote needed to protect [] in grep expression.
22358          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22359          if test "x$FOUND_CORRECT_VERSION" = x; then
22360            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22362            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22363$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22364            BOOT_JDK_FOUND=no
22365          else
22366            # We're done! :-)
22367            BOOT_JDK_FOUND=yes
22368
22369  # Only process if variable expands to non-empty
22370
22371  if test "x$BOOT_JDK" != x; then
22372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22373
22374  # Input might be given as Windows format, start by converting to
22375  # unix format.
22376  path="$BOOT_JDK"
22377  new_path=`$CYGPATH -u "$path"`
22378
22379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22382  # "foo.exe" is OK but "foo" is an error.
22383  #
22384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22385  # It is also a way to make sure we got the proper file name for the real test later on.
22386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22387  if test "x$test_shortpath" = x; then
22388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22390    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22391  fi
22392
22393  # Call helper function which possibly converts this using DOS-style short mode.
22394  # If so, the updated path is stored in $new_path.
22395
22396  input_path="$new_path"
22397  # Check if we need to convert this using DOS-style short mode. If the path
22398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22399  # take no chances and rewrite it.
22400  # Note: m4 eats our [], so we need to use [ and ] instead.
22401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22402  if test "x$has_forbidden_chars" != x; then
22403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22407      # Going to short mode and back again did indeed matter. Since short mode is
22408      # case insensitive, let's make it lowercase to improve readability.
22409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22410      # Now convert it back to Unix-style (cygpath)
22411      input_path=`$CYGPATH -u "$shortmode_path"`
22412      new_path="$input_path"
22413    fi
22414  fi
22415
22416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22417  if test "x$test_cygdrive_prefix" = x; then
22418    # As a simple fix, exclude /usr/bin since it's not a real path.
22419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22421      # a path prefixed by /cygdrive for fixpath to work.
22422      new_path="$CYGWIN_ROOT_PATH$input_path"
22423    fi
22424  fi
22425
22426
22427  if test "x$path" != "x$new_path"; then
22428    BOOT_JDK="$new_path"
22429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22431  fi
22432
22433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22434
22435  path="$BOOT_JDK"
22436  has_colon=`$ECHO $path | $GREP ^.:`
22437  new_path="$path"
22438  if test "x$has_colon" = x; then
22439    # Not in mixed or Windows style, start by that.
22440    new_path=`cmd //c echo $path`
22441  fi
22442
22443
22444  input_path="$new_path"
22445  # Check if we need to convert this using DOS-style short mode. If the path
22446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22447  # take no chances and rewrite it.
22448  # Note: m4 eats our [], so we need to use [ and ] instead.
22449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22450  if test "x$has_forbidden_chars" != x; then
22451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22453  fi
22454
22455
22456  windows_path="$new_path"
22457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22458    unix_path=`$CYGPATH -u "$windows_path"`
22459    new_path="$unix_path"
22460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22462    new_path="$unix_path"
22463  fi
22464
22465  if test "x$path" != "x$new_path"; then
22466    BOOT_JDK="$new_path"
22467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22469  fi
22470
22471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22473
22474    else
22475      # We're on a unix platform. Hooray! :)
22476      path="$BOOT_JDK"
22477      has_space=`$ECHO "$path" | $GREP " "`
22478      if test "x$has_space" != x; then
22479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22482      fi
22483
22484      # Use eval to expand a potential ~
22485      eval path="$path"
22486      if test ! -f "$path" && test ! -d "$path"; then
22487        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22488      fi
22489
22490      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22491    fi
22492  fi
22493
22494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22495$as_echo_n "checking for Boot JDK... " >&6; }
22496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22497$as_echo "$BOOT_JDK" >&6; }
22498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22499$as_echo_n "checking Boot JDK version... " >&6; }
22500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22502$as_echo "$BOOT_JDK_VERSION" >&6; }
22503          fi # end check jdk version
22504        fi # end check javac
22505      fi # end check java
22506    fi # end check boot jdk found
22507  fi
22508
22509
22510  # Test: Is there a JDK installed in default, well-known locations?
22511
22512  if test "x$BOOT_JDK_FOUND" = xno; then
22513    # Now execute the test
22514
22515  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22516
22517  if test "x$BOOT_JDK_FOUND" = xno; then
22518    # Now execute the test
22519
22520  if test "x$ProgramW6432" != x; then
22521    VIRTUAL_DIR="$ProgramW6432/Java"
22522
22523  windows_path="$VIRTUAL_DIR"
22524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22525    unix_path=`$CYGPATH -u "$windows_path"`
22526    VIRTUAL_DIR="$unix_path"
22527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22529    VIRTUAL_DIR="$unix_path"
22530  fi
22531
22532
22533  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22534  BOOT_JDK_SUFFIX=""
22535  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22536  if test "x$ALL_JDKS_FOUND" != x; then
22537    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22538
22539  if test "x$BOOT_JDK_FOUND" = xno; then
22540    # Now execute the test
22541
22542        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22543        if test -d "$BOOT_JDK"; then
22544          BOOT_JDK_FOUND=maybe
22545          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22546$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22547        fi
22548
22549
22550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22552      # Do we have a bin/java?
22553      if test ! -x "$BOOT_JDK/bin/java"; then
22554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22556        BOOT_JDK_FOUND=no
22557      else
22558        # Do we have a bin/javac?
22559        if test ! -x "$BOOT_JDK/bin/javac"; then
22560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22564          BOOT_JDK_FOUND=no
22565        else
22566          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22567          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22568
22569          # Extra M4 quote needed to protect [] in grep expression.
22570          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22571          if test "x$FOUND_CORRECT_VERSION" = x; then
22572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22574            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22575$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22576            BOOT_JDK_FOUND=no
22577          else
22578            # We're done! :-)
22579            BOOT_JDK_FOUND=yes
22580
22581  # Only process if variable expands to non-empty
22582
22583  if test "x$BOOT_JDK" != x; then
22584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22585
22586  # Input might be given as Windows format, start by converting to
22587  # unix format.
22588  path="$BOOT_JDK"
22589  new_path=`$CYGPATH -u "$path"`
22590
22591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22594  # "foo.exe" is OK but "foo" is an error.
22595  #
22596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22597  # It is also a way to make sure we got the proper file name for the real test later on.
22598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22599  if test "x$test_shortpath" = x; then
22600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22603  fi
22604
22605  # Call helper function which possibly converts this using DOS-style short mode.
22606  # If so, the updated path is stored in $new_path.
22607
22608  input_path="$new_path"
22609  # Check if we need to convert this using DOS-style short mode. If the path
22610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22611  # take no chances and rewrite it.
22612  # Note: m4 eats our [], so we need to use [ and ] instead.
22613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22614  if test "x$has_forbidden_chars" != x; then
22615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22619      # Going to short mode and back again did indeed matter. Since short mode is
22620      # case insensitive, let's make it lowercase to improve readability.
22621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22622      # Now convert it back to Unix-style (cygpath)
22623      input_path=`$CYGPATH -u "$shortmode_path"`
22624      new_path="$input_path"
22625    fi
22626  fi
22627
22628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22629  if test "x$test_cygdrive_prefix" = x; then
22630    # As a simple fix, exclude /usr/bin since it's not a real path.
22631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22633      # a path prefixed by /cygdrive for fixpath to work.
22634      new_path="$CYGWIN_ROOT_PATH$input_path"
22635    fi
22636  fi
22637
22638
22639  if test "x$path" != "x$new_path"; then
22640    BOOT_JDK="$new_path"
22641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22643  fi
22644
22645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22646
22647  path="$BOOT_JDK"
22648  has_colon=`$ECHO $path | $GREP ^.:`
22649  new_path="$path"
22650  if test "x$has_colon" = x; then
22651    # Not in mixed or Windows style, start by that.
22652    new_path=`cmd //c echo $path`
22653  fi
22654
22655
22656  input_path="$new_path"
22657  # Check if we need to convert this using DOS-style short mode. If the path
22658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22659  # take no chances and rewrite it.
22660  # Note: m4 eats our [], so we need to use [ and ] instead.
22661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22662  if test "x$has_forbidden_chars" != x; then
22663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22665  fi
22666
22667
22668  windows_path="$new_path"
22669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22670    unix_path=`$CYGPATH -u "$windows_path"`
22671    new_path="$unix_path"
22672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22674    new_path="$unix_path"
22675  fi
22676
22677  if test "x$path" != "x$new_path"; then
22678    BOOT_JDK="$new_path"
22679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22681  fi
22682
22683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22685
22686    else
22687      # We're on a unix platform. Hooray! :)
22688      path="$BOOT_JDK"
22689      has_space=`$ECHO "$path" | $GREP " "`
22690      if test "x$has_space" != x; then
22691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22694      fi
22695
22696      # Use eval to expand a potential ~
22697      eval path="$path"
22698      if test ! -f "$path" && test ! -d "$path"; then
22699        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22700      fi
22701
22702      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22703    fi
22704  fi
22705
22706            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22707$as_echo_n "checking for Boot JDK... " >&6; }
22708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22709$as_echo "$BOOT_JDK" >&6; }
22710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22711$as_echo_n "checking Boot JDK version... " >&6; }
22712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22714$as_echo "$BOOT_JDK_VERSION" >&6; }
22715          fi # end check jdk version
22716        fi # end check javac
22717      fi # end check java
22718    fi # end check boot jdk found
22719  fi
22720
22721    done
22722  fi
22723
22724  fi
22725
22726
22727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22729      # Do we have a bin/java?
22730      if test ! -x "$BOOT_JDK/bin/java"; then
22731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22733        BOOT_JDK_FOUND=no
22734      else
22735        # Do we have a bin/javac?
22736        if test ! -x "$BOOT_JDK/bin/javac"; then
22737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22741          BOOT_JDK_FOUND=no
22742        else
22743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22745
22746          # Extra M4 quote needed to protect [] in grep expression.
22747          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22748          if test "x$FOUND_CORRECT_VERSION" = x; then
22749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22753            BOOT_JDK_FOUND=no
22754          else
22755            # We're done! :-)
22756            BOOT_JDK_FOUND=yes
22757
22758  # Only process if variable expands to non-empty
22759
22760  if test "x$BOOT_JDK" != x; then
22761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22762
22763  # Input might be given as Windows format, start by converting to
22764  # unix format.
22765  path="$BOOT_JDK"
22766  new_path=`$CYGPATH -u "$path"`
22767
22768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22771  # "foo.exe" is OK but "foo" is an error.
22772  #
22773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22774  # It is also a way to make sure we got the proper file name for the real test later on.
22775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22776  if test "x$test_shortpath" = x; then
22777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22780  fi
22781
22782  # Call helper function which possibly converts this using DOS-style short mode.
22783  # If so, the updated path is stored in $new_path.
22784
22785  input_path="$new_path"
22786  # Check if we need to convert this using DOS-style short mode. If the path
22787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22788  # take no chances and rewrite it.
22789  # Note: m4 eats our [], so we need to use [ and ] instead.
22790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22791  if test "x$has_forbidden_chars" != x; then
22792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22796      # Going to short mode and back again did indeed matter. Since short mode is
22797      # case insensitive, let's make it lowercase to improve readability.
22798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22799      # Now convert it back to Unix-style (cygpath)
22800      input_path=`$CYGPATH -u "$shortmode_path"`
22801      new_path="$input_path"
22802    fi
22803  fi
22804
22805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22806  if test "x$test_cygdrive_prefix" = x; then
22807    # As a simple fix, exclude /usr/bin since it's not a real path.
22808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22810      # a path prefixed by /cygdrive for fixpath to work.
22811      new_path="$CYGWIN_ROOT_PATH$input_path"
22812    fi
22813  fi
22814
22815
22816  if test "x$path" != "x$new_path"; then
22817    BOOT_JDK="$new_path"
22818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22820  fi
22821
22822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22823
22824  path="$BOOT_JDK"
22825  has_colon=`$ECHO $path | $GREP ^.:`
22826  new_path="$path"
22827  if test "x$has_colon" = x; then
22828    # Not in mixed or Windows style, start by that.
22829    new_path=`cmd //c echo $path`
22830  fi
22831
22832
22833  input_path="$new_path"
22834  # Check if we need to convert this using DOS-style short mode. If the path
22835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22836  # take no chances and rewrite it.
22837  # Note: m4 eats our [], so we need to use [ and ] instead.
22838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22839  if test "x$has_forbidden_chars" != x; then
22840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22842  fi
22843
22844
22845  windows_path="$new_path"
22846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22847    unix_path=`$CYGPATH -u "$windows_path"`
22848    new_path="$unix_path"
22849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22851    new_path="$unix_path"
22852  fi
22853
22854  if test "x$path" != "x$new_path"; then
22855    BOOT_JDK="$new_path"
22856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22858  fi
22859
22860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22862
22863    else
22864      # We're on a unix platform. Hooray! :)
22865      path="$BOOT_JDK"
22866      has_space=`$ECHO "$path" | $GREP " "`
22867      if test "x$has_space" != x; then
22868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22871      fi
22872
22873      # Use eval to expand a potential ~
22874      eval path="$path"
22875      if test ! -f "$path" && test ! -d "$path"; then
22876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22877      fi
22878
22879      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22880    fi
22881  fi
22882
22883            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22884$as_echo_n "checking for Boot JDK... " >&6; }
22885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22886$as_echo "$BOOT_JDK" >&6; }
22887            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22888$as_echo_n "checking Boot JDK version... " >&6; }
22889            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22891$as_echo "$BOOT_JDK_VERSION" >&6; }
22892          fi # end check jdk version
22893        fi # end check javac
22894      fi # end check java
22895    fi # end check boot jdk found
22896  fi
22897
22898
22899  if test "x$BOOT_JDK_FOUND" = xno; then
22900    # Now execute the test
22901
22902  if test "x$PROGRAMW6432" != x; then
22903    VIRTUAL_DIR="$PROGRAMW6432/Java"
22904
22905  windows_path="$VIRTUAL_DIR"
22906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907    unix_path=`$CYGPATH -u "$windows_path"`
22908    VIRTUAL_DIR="$unix_path"
22909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22911    VIRTUAL_DIR="$unix_path"
22912  fi
22913
22914
22915  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22916  BOOT_JDK_SUFFIX=""
22917  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22918  if test "x$ALL_JDKS_FOUND" != x; then
22919    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22920
22921  if test "x$BOOT_JDK_FOUND" = xno; then
22922    # Now execute the test
22923
22924        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22925        if test -d "$BOOT_JDK"; then
22926          BOOT_JDK_FOUND=maybe
22927          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22928$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22929        fi
22930
22931
22932    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22933    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22934      # Do we have a bin/java?
22935      if test ! -x "$BOOT_JDK/bin/java"; then
22936        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22938        BOOT_JDK_FOUND=no
22939      else
22940        # Do we have a bin/javac?
22941        if test ! -x "$BOOT_JDK/bin/javac"; then
22942          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22944          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22945$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22946          BOOT_JDK_FOUND=no
22947        else
22948          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22949          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22950
22951          # Extra M4 quote needed to protect [] in grep expression.
22952          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22953          if test "x$FOUND_CORRECT_VERSION" = x; then
22954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22956            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22957$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22958            BOOT_JDK_FOUND=no
22959          else
22960            # We're done! :-)
22961            BOOT_JDK_FOUND=yes
22962
22963  # Only process if variable expands to non-empty
22964
22965  if test "x$BOOT_JDK" != x; then
22966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22967
22968  # Input might be given as Windows format, start by converting to
22969  # unix format.
22970  path="$BOOT_JDK"
22971  new_path=`$CYGPATH -u "$path"`
22972
22973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22976  # "foo.exe" is OK but "foo" is an error.
22977  #
22978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22979  # It is also a way to make sure we got the proper file name for the real test later on.
22980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22981  if test "x$test_shortpath" = x; then
22982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22985  fi
22986
22987  # Call helper function which possibly converts this using DOS-style short mode.
22988  # If so, the updated path is stored in $new_path.
22989
22990  input_path="$new_path"
22991  # Check if we need to convert this using DOS-style short mode. If the path
22992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22993  # take no chances and rewrite it.
22994  # Note: m4 eats our [], so we need to use [ and ] instead.
22995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22996  if test "x$has_forbidden_chars" != x; then
22997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23001      # Going to short mode and back again did indeed matter. Since short mode is
23002      # case insensitive, let's make it lowercase to improve readability.
23003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23004      # Now convert it back to Unix-style (cygpath)
23005      input_path=`$CYGPATH -u "$shortmode_path"`
23006      new_path="$input_path"
23007    fi
23008  fi
23009
23010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23011  if test "x$test_cygdrive_prefix" = x; then
23012    # As a simple fix, exclude /usr/bin since it's not a real path.
23013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23015      # a path prefixed by /cygdrive for fixpath to work.
23016      new_path="$CYGWIN_ROOT_PATH$input_path"
23017    fi
23018  fi
23019
23020
23021  if test "x$path" != "x$new_path"; then
23022    BOOT_JDK="$new_path"
23023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23025  fi
23026
23027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23028
23029  path="$BOOT_JDK"
23030  has_colon=`$ECHO $path | $GREP ^.:`
23031  new_path="$path"
23032  if test "x$has_colon" = x; then
23033    # Not in mixed or Windows style, start by that.
23034    new_path=`cmd //c echo $path`
23035  fi
23036
23037
23038  input_path="$new_path"
23039  # Check if we need to convert this using DOS-style short mode. If the path
23040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23041  # take no chances and rewrite it.
23042  # Note: m4 eats our [], so we need to use [ and ] instead.
23043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23044  if test "x$has_forbidden_chars" != x; then
23045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23047  fi
23048
23049
23050  windows_path="$new_path"
23051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23052    unix_path=`$CYGPATH -u "$windows_path"`
23053    new_path="$unix_path"
23054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23056    new_path="$unix_path"
23057  fi
23058
23059  if test "x$path" != "x$new_path"; then
23060    BOOT_JDK="$new_path"
23061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23063  fi
23064
23065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23067
23068    else
23069      # We're on a unix platform. Hooray! :)
23070      path="$BOOT_JDK"
23071      has_space=`$ECHO "$path" | $GREP " "`
23072      if test "x$has_space" != x; then
23073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23076      fi
23077
23078      # Use eval to expand a potential ~
23079      eval path="$path"
23080      if test ! -f "$path" && test ! -d "$path"; then
23081        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23082      fi
23083
23084      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23085    fi
23086  fi
23087
23088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23089$as_echo_n "checking for Boot JDK... " >&6; }
23090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23091$as_echo "$BOOT_JDK" >&6; }
23092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23093$as_echo_n "checking Boot JDK version... " >&6; }
23094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23096$as_echo "$BOOT_JDK_VERSION" >&6; }
23097          fi # end check jdk version
23098        fi # end check javac
23099      fi # end check java
23100    fi # end check boot jdk found
23101  fi
23102
23103    done
23104  fi
23105
23106  fi
23107
23108
23109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23111      # Do we have a bin/java?
23112      if test ! -x "$BOOT_JDK/bin/java"; then
23113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23115        BOOT_JDK_FOUND=no
23116      else
23117        # Do we have a bin/javac?
23118        if test ! -x "$BOOT_JDK/bin/javac"; then
23119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23123          BOOT_JDK_FOUND=no
23124        else
23125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23127
23128          # Extra M4 quote needed to protect [] in grep expression.
23129          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23130          if test "x$FOUND_CORRECT_VERSION" = x; then
23131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23135            BOOT_JDK_FOUND=no
23136          else
23137            # We're done! :-)
23138            BOOT_JDK_FOUND=yes
23139
23140  # Only process if variable expands to non-empty
23141
23142  if test "x$BOOT_JDK" != x; then
23143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23144
23145  # Input might be given as Windows format, start by converting to
23146  # unix format.
23147  path="$BOOT_JDK"
23148  new_path=`$CYGPATH -u "$path"`
23149
23150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23153  # "foo.exe" is OK but "foo" is an error.
23154  #
23155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23156  # It is also a way to make sure we got the proper file name for the real test later on.
23157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23158  if test "x$test_shortpath" = x; then
23159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23162  fi
23163
23164  # Call helper function which possibly converts this using DOS-style short mode.
23165  # If so, the updated path is stored in $new_path.
23166
23167  input_path="$new_path"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23178      # Going to short mode and back again did indeed matter. Since short mode is
23179      # case insensitive, let's make it lowercase to improve readability.
23180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181      # Now convert it back to Unix-style (cygpath)
23182      input_path=`$CYGPATH -u "$shortmode_path"`
23183      new_path="$input_path"
23184    fi
23185  fi
23186
23187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23188  if test "x$test_cygdrive_prefix" = x; then
23189    # As a simple fix, exclude /usr/bin since it's not a real path.
23190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23192      # a path prefixed by /cygdrive for fixpath to work.
23193      new_path="$CYGWIN_ROOT_PATH$input_path"
23194    fi
23195  fi
23196
23197
23198  if test "x$path" != "x$new_path"; then
23199    BOOT_JDK="$new_path"
23200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23202  fi
23203
23204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23205
23206  path="$BOOT_JDK"
23207  has_colon=`$ECHO $path | $GREP ^.:`
23208  new_path="$path"
23209  if test "x$has_colon" = x; then
23210    # Not in mixed or Windows style, start by that.
23211    new_path=`cmd //c echo $path`
23212  fi
23213
23214
23215  input_path="$new_path"
23216  # Check if we need to convert this using DOS-style short mode. If the path
23217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23218  # take no chances and rewrite it.
23219  # Note: m4 eats our [], so we need to use [ and ] instead.
23220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23221  if test "x$has_forbidden_chars" != x; then
23222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23224  fi
23225
23226
23227  windows_path="$new_path"
23228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229    unix_path=`$CYGPATH -u "$windows_path"`
23230    new_path="$unix_path"
23231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23233    new_path="$unix_path"
23234  fi
23235
23236  if test "x$path" != "x$new_path"; then
23237    BOOT_JDK="$new_path"
23238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23240  fi
23241
23242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23244
23245    else
23246      # We're on a unix platform. Hooray! :)
23247      path="$BOOT_JDK"
23248      has_space=`$ECHO "$path" | $GREP " "`
23249      if test "x$has_space" != x; then
23250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23253      fi
23254
23255      # Use eval to expand a potential ~
23256      eval path="$path"
23257      if test ! -f "$path" && test ! -d "$path"; then
23258        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23259      fi
23260
23261      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23262    fi
23263  fi
23264
23265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23266$as_echo_n "checking for Boot JDK... " >&6; }
23267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23268$as_echo "$BOOT_JDK" >&6; }
23269            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23270$as_echo_n "checking Boot JDK version... " >&6; }
23271            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23273$as_echo "$BOOT_JDK_VERSION" >&6; }
23274          fi # end check jdk version
23275        fi # end check javac
23276      fi # end check java
23277    fi # end check boot jdk found
23278  fi
23279
23280
23281  if test "x$BOOT_JDK_FOUND" = xno; then
23282    # Now execute the test
23283
23284  if test "x$PROGRAMFILES" != x; then
23285    VIRTUAL_DIR="$PROGRAMFILES/Java"
23286
23287  windows_path="$VIRTUAL_DIR"
23288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289    unix_path=`$CYGPATH -u "$windows_path"`
23290    VIRTUAL_DIR="$unix_path"
23291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23293    VIRTUAL_DIR="$unix_path"
23294  fi
23295
23296
23297  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23298  BOOT_JDK_SUFFIX=""
23299  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23300  if test "x$ALL_JDKS_FOUND" != x; then
23301    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23302
23303  if test "x$BOOT_JDK_FOUND" = xno; then
23304    # Now execute the test
23305
23306        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23307        if test -d "$BOOT_JDK"; then
23308          BOOT_JDK_FOUND=maybe
23309          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23310$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23311        fi
23312
23313
23314    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23315    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23316      # Do we have a bin/java?
23317      if test ! -x "$BOOT_JDK/bin/java"; then
23318        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23320        BOOT_JDK_FOUND=no
23321      else
23322        # Do we have a bin/javac?
23323        if test ! -x "$BOOT_JDK/bin/javac"; then
23324          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23326          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23327$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23328          BOOT_JDK_FOUND=no
23329        else
23330          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23331          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23332
23333          # Extra M4 quote needed to protect [] in grep expression.
23334          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23335          if test "x$FOUND_CORRECT_VERSION" = x; then
23336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23338            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23339$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23340            BOOT_JDK_FOUND=no
23341          else
23342            # We're done! :-)
23343            BOOT_JDK_FOUND=yes
23344
23345  # Only process if variable expands to non-empty
23346
23347  if test "x$BOOT_JDK" != x; then
23348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349
23350  # Input might be given as Windows format, start by converting to
23351  # unix format.
23352  path="$BOOT_JDK"
23353  new_path=`$CYGPATH -u "$path"`
23354
23355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23358  # "foo.exe" is OK but "foo" is an error.
23359  #
23360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23361  # It is also a way to make sure we got the proper file name for the real test later on.
23362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23363  if test "x$test_shortpath" = x; then
23364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23367  fi
23368
23369  # Call helper function which possibly converts this using DOS-style short mode.
23370  # If so, the updated path is stored in $new_path.
23371
23372  input_path="$new_path"
23373  # Check if we need to convert this using DOS-style short mode. If the path
23374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23375  # take no chances and rewrite it.
23376  # Note: m4 eats our [], so we need to use [ and ] instead.
23377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23378  if test "x$has_forbidden_chars" != x; then
23379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23383      # Going to short mode and back again did indeed matter. Since short mode is
23384      # case insensitive, let's make it lowercase to improve readability.
23385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23386      # Now convert it back to Unix-style (cygpath)
23387      input_path=`$CYGPATH -u "$shortmode_path"`
23388      new_path="$input_path"
23389    fi
23390  fi
23391
23392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23393  if test "x$test_cygdrive_prefix" = x; then
23394    # As a simple fix, exclude /usr/bin since it's not a real path.
23395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23397      # a path prefixed by /cygdrive for fixpath to work.
23398      new_path="$CYGWIN_ROOT_PATH$input_path"
23399    fi
23400  fi
23401
23402
23403  if test "x$path" != "x$new_path"; then
23404    BOOT_JDK="$new_path"
23405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23407  fi
23408
23409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410
23411  path="$BOOT_JDK"
23412  has_colon=`$ECHO $path | $GREP ^.:`
23413  new_path="$path"
23414  if test "x$has_colon" = x; then
23415    # Not in mixed or Windows style, start by that.
23416    new_path=`cmd //c echo $path`
23417  fi
23418
23419
23420  input_path="$new_path"
23421  # Check if we need to convert this using DOS-style short mode. If the path
23422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23423  # take no chances and rewrite it.
23424  # Note: m4 eats our [], so we need to use [ and ] instead.
23425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23426  if test "x$has_forbidden_chars" != x; then
23427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23429  fi
23430
23431
23432  windows_path="$new_path"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    unix_path=`$CYGPATH -u "$windows_path"`
23435    new_path="$unix_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23438    new_path="$unix_path"
23439  fi
23440
23441  if test "x$path" != "x$new_path"; then
23442    BOOT_JDK="$new_path"
23443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23445  fi
23446
23447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23449
23450    else
23451      # We're on a unix platform. Hooray! :)
23452      path="$BOOT_JDK"
23453      has_space=`$ECHO "$path" | $GREP " "`
23454      if test "x$has_space" != x; then
23455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23458      fi
23459
23460      # Use eval to expand a potential ~
23461      eval path="$path"
23462      if test ! -f "$path" && test ! -d "$path"; then
23463        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23464      fi
23465
23466      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23467    fi
23468  fi
23469
23470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23471$as_echo_n "checking for Boot JDK... " >&6; }
23472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23473$as_echo "$BOOT_JDK" >&6; }
23474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23475$as_echo_n "checking Boot JDK version... " >&6; }
23476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23478$as_echo "$BOOT_JDK_VERSION" >&6; }
23479          fi # end check jdk version
23480        fi # end check javac
23481      fi # end check java
23482    fi # end check boot jdk found
23483  fi
23484
23485    done
23486  fi
23487
23488  fi
23489
23490
23491    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23492    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23493      # Do we have a bin/java?
23494      if test ! -x "$BOOT_JDK/bin/java"; then
23495        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23497        BOOT_JDK_FOUND=no
23498      else
23499        # Do we have a bin/javac?
23500        if test ! -x "$BOOT_JDK/bin/javac"; then
23501          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23503          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23504$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23505          BOOT_JDK_FOUND=no
23506        else
23507          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23508          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23509
23510          # Extra M4 quote needed to protect [] in grep expression.
23511          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23512          if test "x$FOUND_CORRECT_VERSION" = x; then
23513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23515            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23516$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23517            BOOT_JDK_FOUND=no
23518          else
23519            # We're done! :-)
23520            BOOT_JDK_FOUND=yes
23521
23522  # Only process if variable expands to non-empty
23523
23524  if test "x$BOOT_JDK" != x; then
23525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23526
23527  # Input might be given as Windows format, start by converting to
23528  # unix format.
23529  path="$BOOT_JDK"
23530  new_path=`$CYGPATH -u "$path"`
23531
23532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23535  # "foo.exe" is OK but "foo" is an error.
23536  #
23537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23538  # It is also a way to make sure we got the proper file name for the real test later on.
23539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23540  if test "x$test_shortpath" = x; then
23541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23543    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23544  fi
23545
23546  # Call helper function which possibly converts this using DOS-style short mode.
23547  # If so, the updated path is stored in $new_path.
23548
23549  input_path="$new_path"
23550  # Check if we need to convert this using DOS-style short mode. If the path
23551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23552  # take no chances and rewrite it.
23553  # Note: m4 eats our [], so we need to use [ and ] instead.
23554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23555  if test "x$has_forbidden_chars" != x; then
23556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23560      # Going to short mode and back again did indeed matter. Since short mode is
23561      # case insensitive, let's make it lowercase to improve readability.
23562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23563      # Now convert it back to Unix-style (cygpath)
23564      input_path=`$CYGPATH -u "$shortmode_path"`
23565      new_path="$input_path"
23566    fi
23567  fi
23568
23569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23570  if test "x$test_cygdrive_prefix" = x; then
23571    # As a simple fix, exclude /usr/bin since it's not a real path.
23572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23574      # a path prefixed by /cygdrive for fixpath to work.
23575      new_path="$CYGWIN_ROOT_PATH$input_path"
23576    fi
23577  fi
23578
23579
23580  if test "x$path" != "x$new_path"; then
23581    BOOT_JDK="$new_path"
23582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23584  fi
23585
23586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23587
23588  path="$BOOT_JDK"
23589  has_colon=`$ECHO $path | $GREP ^.:`
23590  new_path="$path"
23591  if test "x$has_colon" = x; then
23592    # Not in mixed or Windows style, start by that.
23593    new_path=`cmd //c echo $path`
23594  fi
23595
23596
23597  input_path="$new_path"
23598  # Check if we need to convert this using DOS-style short mode. If the path
23599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23600  # take no chances and rewrite it.
23601  # Note: m4 eats our [], so we need to use [ and ] instead.
23602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23603  if test "x$has_forbidden_chars" != x; then
23604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23606  fi
23607
23608
23609  windows_path="$new_path"
23610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23611    unix_path=`$CYGPATH -u "$windows_path"`
23612    new_path="$unix_path"
23613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23615    new_path="$unix_path"
23616  fi
23617
23618  if test "x$path" != "x$new_path"; then
23619    BOOT_JDK="$new_path"
23620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23622  fi
23623
23624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23626
23627    else
23628      # We're on a unix platform. Hooray! :)
23629      path="$BOOT_JDK"
23630      has_space=`$ECHO "$path" | $GREP " "`
23631      if test "x$has_space" != x; then
23632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23635      fi
23636
23637      # Use eval to expand a potential ~
23638      eval path="$path"
23639      if test ! -f "$path" && test ! -d "$path"; then
23640        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23641      fi
23642
23643      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23644    fi
23645  fi
23646
23647            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23648$as_echo_n "checking for Boot JDK... " >&6; }
23649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23650$as_echo "$BOOT_JDK" >&6; }
23651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23652$as_echo_n "checking Boot JDK version... " >&6; }
23653            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23655$as_echo "$BOOT_JDK_VERSION" >&6; }
23656          fi # end check jdk version
23657        fi # end check javac
23658      fi # end check java
23659    fi # end check boot jdk found
23660  fi
23661
23662
23663  if test "x$BOOT_JDK_FOUND" = xno; then
23664    # Now execute the test
23665
23666  if test "x$ProgramFiles" != x; then
23667    VIRTUAL_DIR="$ProgramFiles/Java"
23668
23669  windows_path="$VIRTUAL_DIR"
23670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23671    unix_path=`$CYGPATH -u "$windows_path"`
23672    VIRTUAL_DIR="$unix_path"
23673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23675    VIRTUAL_DIR="$unix_path"
23676  fi
23677
23678
23679  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23680  BOOT_JDK_SUFFIX=""
23681  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23682  if test "x$ALL_JDKS_FOUND" != x; then
23683    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23684
23685  if test "x$BOOT_JDK_FOUND" = xno; then
23686    # Now execute the test
23687
23688        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23689        if test -d "$BOOT_JDK"; then
23690          BOOT_JDK_FOUND=maybe
23691          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23692$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23693        fi
23694
23695
23696    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23697    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23698      # Do we have a bin/java?
23699      if test ! -x "$BOOT_JDK/bin/java"; then
23700        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23702        BOOT_JDK_FOUND=no
23703      else
23704        # Do we have a bin/javac?
23705        if test ! -x "$BOOT_JDK/bin/javac"; then
23706          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23708          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23709$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23710          BOOT_JDK_FOUND=no
23711        else
23712          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23713          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23714
23715          # Extra M4 quote needed to protect [] in grep expression.
23716          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23717          if test "x$FOUND_CORRECT_VERSION" = x; then
23718            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23720            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23721$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23722            BOOT_JDK_FOUND=no
23723          else
23724            # We're done! :-)
23725            BOOT_JDK_FOUND=yes
23726
23727  # Only process if variable expands to non-empty
23728
23729  if test "x$BOOT_JDK" != x; then
23730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23731
23732  # Input might be given as Windows format, start by converting to
23733  # unix format.
23734  path="$BOOT_JDK"
23735  new_path=`$CYGPATH -u "$path"`
23736
23737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23740  # "foo.exe" is OK but "foo" is an error.
23741  #
23742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23743  # It is also a way to make sure we got the proper file name for the real test later on.
23744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23745  if test "x$test_shortpath" = x; then
23746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23749  fi
23750
23751  # Call helper function which possibly converts this using DOS-style short mode.
23752  # If so, the updated path is stored in $new_path.
23753
23754  input_path="$new_path"
23755  # Check if we need to convert this using DOS-style short mode. If the path
23756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23757  # take no chances and rewrite it.
23758  # Note: m4 eats our [], so we need to use [ and ] instead.
23759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23760  if test "x$has_forbidden_chars" != x; then
23761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23765      # Going to short mode and back again did indeed matter. Since short mode is
23766      # case insensitive, let's make it lowercase to improve readability.
23767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23768      # Now convert it back to Unix-style (cygpath)
23769      input_path=`$CYGPATH -u "$shortmode_path"`
23770      new_path="$input_path"
23771    fi
23772  fi
23773
23774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23775  if test "x$test_cygdrive_prefix" = x; then
23776    # As a simple fix, exclude /usr/bin since it's not a real path.
23777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23779      # a path prefixed by /cygdrive for fixpath to work.
23780      new_path="$CYGWIN_ROOT_PATH$input_path"
23781    fi
23782  fi
23783
23784
23785  if test "x$path" != "x$new_path"; then
23786    BOOT_JDK="$new_path"
23787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23789  fi
23790
23791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792
23793  path="$BOOT_JDK"
23794  has_colon=`$ECHO $path | $GREP ^.:`
23795  new_path="$path"
23796  if test "x$has_colon" = x; then
23797    # Not in mixed or Windows style, start by that.
23798    new_path=`cmd //c echo $path`
23799  fi
23800
23801
23802  input_path="$new_path"
23803  # Check if we need to convert this using DOS-style short mode. If the path
23804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23805  # take no chances and rewrite it.
23806  # Note: m4 eats our [], so we need to use [ and ] instead.
23807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23808  if test "x$has_forbidden_chars" != x; then
23809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23811  fi
23812
23813
23814  windows_path="$new_path"
23815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23816    unix_path=`$CYGPATH -u "$windows_path"`
23817    new_path="$unix_path"
23818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23820    new_path="$unix_path"
23821  fi
23822
23823  if test "x$path" != "x$new_path"; then
23824    BOOT_JDK="$new_path"
23825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23827  fi
23828
23829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23831
23832    else
23833      # We're on a unix platform. Hooray! :)
23834      path="$BOOT_JDK"
23835      has_space=`$ECHO "$path" | $GREP " "`
23836      if test "x$has_space" != x; then
23837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23839        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23840      fi
23841
23842      # Use eval to expand a potential ~
23843      eval path="$path"
23844      if test ! -f "$path" && test ! -d "$path"; then
23845        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23846      fi
23847
23848      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23849    fi
23850  fi
23851
23852            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23853$as_echo_n "checking for Boot JDK... " >&6; }
23854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23855$as_echo "$BOOT_JDK" >&6; }
23856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23857$as_echo_n "checking Boot JDK version... " >&6; }
23858            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23860$as_echo "$BOOT_JDK_VERSION" >&6; }
23861          fi # end check jdk version
23862        fi # end check javac
23863      fi # end check java
23864    fi # end check boot jdk found
23865  fi
23866
23867    done
23868  fi
23869
23870  fi
23871
23872
23873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23875      # Do we have a bin/java?
23876      if test ! -x "$BOOT_JDK/bin/java"; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23879        BOOT_JDK_FOUND=no
23880      else
23881        # Do we have a bin/javac?
23882        if test ! -x "$BOOT_JDK/bin/javac"; then
23883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23887          BOOT_JDK_FOUND=no
23888        else
23889          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23890          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23891
23892          # Extra M4 quote needed to protect [] in grep expression.
23893          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23894          if test "x$FOUND_CORRECT_VERSION" = x; then
23895            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23897            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23898$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23899            BOOT_JDK_FOUND=no
23900          else
23901            # We're done! :-)
23902            BOOT_JDK_FOUND=yes
23903
23904  # Only process if variable expands to non-empty
23905
23906  if test "x$BOOT_JDK" != x; then
23907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23908
23909  # Input might be given as Windows format, start by converting to
23910  # unix format.
23911  path="$BOOT_JDK"
23912  new_path=`$CYGPATH -u "$path"`
23913
23914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23917  # "foo.exe" is OK but "foo" is an error.
23918  #
23919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23920  # It is also a way to make sure we got the proper file name for the real test later on.
23921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23922  if test "x$test_shortpath" = x; then
23923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23926  fi
23927
23928  # Call helper function which possibly converts this using DOS-style short mode.
23929  # If so, the updated path is stored in $new_path.
23930
23931  input_path="$new_path"
23932  # Check if we need to convert this using DOS-style short mode. If the path
23933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23934  # take no chances and rewrite it.
23935  # Note: m4 eats our [], so we need to use [ and ] instead.
23936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23937  if test "x$has_forbidden_chars" != x; then
23938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23942      # Going to short mode and back again did indeed matter. Since short mode is
23943      # case insensitive, let's make it lowercase to improve readability.
23944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23945      # Now convert it back to Unix-style (cygpath)
23946      input_path=`$CYGPATH -u "$shortmode_path"`
23947      new_path="$input_path"
23948    fi
23949  fi
23950
23951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23952  if test "x$test_cygdrive_prefix" = x; then
23953    # As a simple fix, exclude /usr/bin since it's not a real path.
23954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23956      # a path prefixed by /cygdrive for fixpath to work.
23957      new_path="$CYGWIN_ROOT_PATH$input_path"
23958    fi
23959  fi
23960
23961
23962  if test "x$path" != "x$new_path"; then
23963    BOOT_JDK="$new_path"
23964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23966  fi
23967
23968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23969
23970  path="$BOOT_JDK"
23971  has_colon=`$ECHO $path | $GREP ^.:`
23972  new_path="$path"
23973  if test "x$has_colon" = x; then
23974    # Not in mixed or Windows style, start by that.
23975    new_path=`cmd //c echo $path`
23976  fi
23977
23978
23979  input_path="$new_path"
23980  # Check if we need to convert this using DOS-style short mode. If the path
23981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23982  # take no chances and rewrite it.
23983  # Note: m4 eats our [], so we need to use [ and ] instead.
23984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23985  if test "x$has_forbidden_chars" != x; then
23986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23988  fi
23989
23990
23991  windows_path="$new_path"
23992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23993    unix_path=`$CYGPATH -u "$windows_path"`
23994    new_path="$unix_path"
23995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23997    new_path="$unix_path"
23998  fi
23999
24000  if test "x$path" != "x$new_path"; then
24001    BOOT_JDK="$new_path"
24002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24004  fi
24005
24006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24008
24009    else
24010      # We're on a unix platform. Hooray! :)
24011      path="$BOOT_JDK"
24012      has_space=`$ECHO "$path" | $GREP " "`
24013      if test "x$has_space" != x; then
24014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24017      fi
24018
24019      # Use eval to expand a potential ~
24020      eval path="$path"
24021      if test ! -f "$path" && test ! -d "$path"; then
24022        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24023      fi
24024
24025      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24026    fi
24027  fi
24028
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24030$as_echo_n "checking for Boot JDK... " >&6; }
24031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24032$as_echo "$BOOT_JDK" >&6; }
24033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24034$as_echo_n "checking Boot JDK version... " >&6; }
24035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24037$as_echo "$BOOT_JDK_VERSION" >&6; }
24038          fi # end check jdk version
24039        fi # end check javac
24040      fi # end check java
24041    fi # end check boot jdk found
24042  fi
24043
24044
24045  if test "x$BOOT_JDK_FOUND" = xno; then
24046    # Now execute the test
24047
24048  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24049  BOOT_JDK_SUFFIX=""
24050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24051  if test "x$ALL_JDKS_FOUND" != x; then
24052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24053
24054  if test "x$BOOT_JDK_FOUND" = xno; then
24055    # Now execute the test
24056
24057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24058        if test -d "$BOOT_JDK"; then
24059          BOOT_JDK_FOUND=maybe
24060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24062        fi
24063
24064
24065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24067      # Do we have a bin/java?
24068      if test ! -x "$BOOT_JDK/bin/java"; then
24069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24071        BOOT_JDK_FOUND=no
24072      else
24073        # Do we have a bin/javac?
24074        if test ! -x "$BOOT_JDK/bin/javac"; then
24075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24079          BOOT_JDK_FOUND=no
24080        else
24081          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24082          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24083
24084          # Extra M4 quote needed to protect [] in grep expression.
24085          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24086          if test "x$FOUND_CORRECT_VERSION" = x; then
24087            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24089            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24090$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24091            BOOT_JDK_FOUND=no
24092          else
24093            # We're done! :-)
24094            BOOT_JDK_FOUND=yes
24095
24096  # Only process if variable expands to non-empty
24097
24098  if test "x$BOOT_JDK" != x; then
24099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24100
24101  # Input might be given as Windows format, start by converting to
24102  # unix format.
24103  path="$BOOT_JDK"
24104  new_path=`$CYGPATH -u "$path"`
24105
24106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24109  # "foo.exe" is OK but "foo" is an error.
24110  #
24111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24112  # It is also a way to make sure we got the proper file name for the real test later on.
24113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24114  if test "x$test_shortpath" = x; then
24115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24117    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24118  fi
24119
24120  # Call helper function which possibly converts this using DOS-style short mode.
24121  # If so, the updated path is stored in $new_path.
24122
24123  input_path="$new_path"
24124  # Check if we need to convert this using DOS-style short mode. If the path
24125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24126  # take no chances and rewrite it.
24127  # Note: m4 eats our [], so we need to use [ and ] instead.
24128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24129  if test "x$has_forbidden_chars" != x; then
24130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24134      # Going to short mode and back again did indeed matter. Since short mode is
24135      # case insensitive, let's make it lowercase to improve readability.
24136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24137      # Now convert it back to Unix-style (cygpath)
24138      input_path=`$CYGPATH -u "$shortmode_path"`
24139      new_path="$input_path"
24140    fi
24141  fi
24142
24143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24144  if test "x$test_cygdrive_prefix" = x; then
24145    # As a simple fix, exclude /usr/bin since it's not a real path.
24146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24148      # a path prefixed by /cygdrive for fixpath to work.
24149      new_path="$CYGWIN_ROOT_PATH$input_path"
24150    fi
24151  fi
24152
24153
24154  if test "x$path" != "x$new_path"; then
24155    BOOT_JDK="$new_path"
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24158  fi
24159
24160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24161
24162  path="$BOOT_JDK"
24163  has_colon=`$ECHO $path | $GREP ^.:`
24164  new_path="$path"
24165  if test "x$has_colon" = x; then
24166    # Not in mixed or Windows style, start by that.
24167    new_path=`cmd //c echo $path`
24168  fi
24169
24170
24171  input_path="$new_path"
24172  # Check if we need to convert this using DOS-style short mode. If the path
24173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24174  # take no chances and rewrite it.
24175  # Note: m4 eats our [], so we need to use [ and ] instead.
24176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24177  if test "x$has_forbidden_chars" != x; then
24178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24180  fi
24181
24182
24183  windows_path="$new_path"
24184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24185    unix_path=`$CYGPATH -u "$windows_path"`
24186    new_path="$unix_path"
24187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24189    new_path="$unix_path"
24190  fi
24191
24192  if test "x$path" != "x$new_path"; then
24193    BOOT_JDK="$new_path"
24194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24196  fi
24197
24198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24200
24201    else
24202      # We're on a unix platform. Hooray! :)
24203      path="$BOOT_JDK"
24204      has_space=`$ECHO "$path" | $GREP " "`
24205      if test "x$has_space" != x; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24209      fi
24210
24211      # Use eval to expand a potential ~
24212      eval path="$path"
24213      if test ! -f "$path" && test ! -d "$path"; then
24214        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24215      fi
24216
24217      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24218    fi
24219  fi
24220
24221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24222$as_echo_n "checking for Boot JDK... " >&6; }
24223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24224$as_echo "$BOOT_JDK" >&6; }
24225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24226$as_echo_n "checking Boot JDK version... " >&6; }
24227            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24229$as_echo "$BOOT_JDK_VERSION" >&6; }
24230          fi # end check jdk version
24231        fi # end check javac
24232      fi # end check java
24233    fi # end check boot jdk found
24234  fi
24235
24236    done
24237  fi
24238
24239
24240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24242      # Do we have a bin/java?
24243      if test ! -x "$BOOT_JDK/bin/java"; then
24244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24246        BOOT_JDK_FOUND=no
24247      else
24248        # Do we have a bin/javac?
24249        if test ! -x "$BOOT_JDK/bin/javac"; then
24250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24254          BOOT_JDK_FOUND=no
24255        else
24256          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24257          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24258
24259          # Extra M4 quote needed to protect [] in grep expression.
24260          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24261          if test "x$FOUND_CORRECT_VERSION" = x; then
24262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24264            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24265$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24266            BOOT_JDK_FOUND=no
24267          else
24268            # We're done! :-)
24269            BOOT_JDK_FOUND=yes
24270
24271  # Only process if variable expands to non-empty
24272
24273  if test "x$BOOT_JDK" != x; then
24274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24275
24276  # Input might be given as Windows format, start by converting to
24277  # unix format.
24278  path="$BOOT_JDK"
24279  new_path=`$CYGPATH -u "$path"`
24280
24281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24284  # "foo.exe" is OK but "foo" is an error.
24285  #
24286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24287  # It is also a way to make sure we got the proper file name for the real test later on.
24288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24289  if test "x$test_shortpath" = x; then
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24292    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24293  fi
24294
24295  # Call helper function which possibly converts this using DOS-style short mode.
24296  # If so, the updated path is stored in $new_path.
24297
24298  input_path="$new_path"
24299  # Check if we need to convert this using DOS-style short mode. If the path
24300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24301  # take no chances and rewrite it.
24302  # Note: m4 eats our [], so we need to use [ and ] instead.
24303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24304  if test "x$has_forbidden_chars" != x; then
24305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24309      # Going to short mode and back again did indeed matter. Since short mode is
24310      # case insensitive, let's make it lowercase to improve readability.
24311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24312      # Now convert it back to Unix-style (cygpath)
24313      input_path=`$CYGPATH -u "$shortmode_path"`
24314      new_path="$input_path"
24315    fi
24316  fi
24317
24318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24319  if test "x$test_cygdrive_prefix" = x; then
24320    # As a simple fix, exclude /usr/bin since it's not a real path.
24321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24323      # a path prefixed by /cygdrive for fixpath to work.
24324      new_path="$CYGWIN_ROOT_PATH$input_path"
24325    fi
24326  fi
24327
24328
24329  if test "x$path" != "x$new_path"; then
24330    BOOT_JDK="$new_path"
24331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24333  fi
24334
24335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24336
24337  path="$BOOT_JDK"
24338  has_colon=`$ECHO $path | $GREP ^.:`
24339  new_path="$path"
24340  if test "x$has_colon" = x; then
24341    # Not in mixed or Windows style, start by that.
24342    new_path=`cmd //c echo $path`
24343  fi
24344
24345
24346  input_path="$new_path"
24347  # Check if we need to convert this using DOS-style short mode. If the path
24348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24349  # take no chances and rewrite it.
24350  # Note: m4 eats our [], so we need to use [ and ] instead.
24351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24352  if test "x$has_forbidden_chars" != x; then
24353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24355  fi
24356
24357
24358  windows_path="$new_path"
24359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24360    unix_path=`$CYGPATH -u "$windows_path"`
24361    new_path="$unix_path"
24362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24364    new_path="$unix_path"
24365  fi
24366
24367  if test "x$path" != "x$new_path"; then
24368    BOOT_JDK="$new_path"
24369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24371  fi
24372
24373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24375
24376    else
24377      # We're on a unix platform. Hooray! :)
24378      path="$BOOT_JDK"
24379      has_space=`$ECHO "$path" | $GREP " "`
24380      if test "x$has_space" != x; then
24381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24384      fi
24385
24386      # Use eval to expand a potential ~
24387      eval path="$path"
24388      if test ! -f "$path" && test ! -d "$path"; then
24389        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24390      fi
24391
24392      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24393    fi
24394  fi
24395
24396            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24397$as_echo_n "checking for Boot JDK... " >&6; }
24398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24399$as_echo "$BOOT_JDK" >&6; }
24400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24401$as_echo_n "checking Boot JDK version... " >&6; }
24402            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24404$as_echo "$BOOT_JDK_VERSION" >&6; }
24405          fi # end check jdk version
24406        fi # end check javac
24407      fi # end check java
24408    fi # end check boot jdk found
24409  fi
24410
24411  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24412
24413  if test "x$BOOT_JDK_FOUND" = xno; then
24414    # Now execute the test
24415
24416  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24417  BOOT_JDK_SUFFIX="/Contents/Home"
24418  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24419  if test "x$ALL_JDKS_FOUND" != x; then
24420    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24421
24422  if test "x$BOOT_JDK_FOUND" = xno; then
24423    # Now execute the test
24424
24425        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24426        if test -d "$BOOT_JDK"; then
24427          BOOT_JDK_FOUND=maybe
24428          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24429$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24430        fi
24431
24432
24433    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24434    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24435      # Do we have a bin/java?
24436      if test ! -x "$BOOT_JDK/bin/java"; then
24437        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24439        BOOT_JDK_FOUND=no
24440      else
24441        # Do we have a bin/javac?
24442        if test ! -x "$BOOT_JDK/bin/javac"; then
24443          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24445          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24446$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24447          BOOT_JDK_FOUND=no
24448        else
24449          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24450          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24451
24452          # Extra M4 quote needed to protect [] in grep expression.
24453          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24454          if test "x$FOUND_CORRECT_VERSION" = x; then
24455            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24457            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24458$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24459            BOOT_JDK_FOUND=no
24460          else
24461            # We're done! :-)
24462            BOOT_JDK_FOUND=yes
24463
24464  # Only process if variable expands to non-empty
24465
24466  if test "x$BOOT_JDK" != x; then
24467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24468
24469  # Input might be given as Windows format, start by converting to
24470  # unix format.
24471  path="$BOOT_JDK"
24472  new_path=`$CYGPATH -u "$path"`
24473
24474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24477  # "foo.exe" is OK but "foo" is an error.
24478  #
24479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24480  # It is also a way to make sure we got the proper file name for the real test later on.
24481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24482  if test "x$test_shortpath" = x; then
24483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24485    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24486  fi
24487
24488  # Call helper function which possibly converts this using DOS-style short mode.
24489  # If so, the updated path is stored in $new_path.
24490
24491  input_path="$new_path"
24492  # Check if we need to convert this using DOS-style short mode. If the path
24493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24494  # take no chances and rewrite it.
24495  # Note: m4 eats our [], so we need to use [ and ] instead.
24496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24497  if test "x$has_forbidden_chars" != x; then
24498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24502      # Going to short mode and back again did indeed matter. Since short mode is
24503      # case insensitive, let's make it lowercase to improve readability.
24504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24505      # Now convert it back to Unix-style (cygpath)
24506      input_path=`$CYGPATH -u "$shortmode_path"`
24507      new_path="$input_path"
24508    fi
24509  fi
24510
24511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24512  if test "x$test_cygdrive_prefix" = x; then
24513    # As a simple fix, exclude /usr/bin since it's not a real path.
24514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24516      # a path prefixed by /cygdrive for fixpath to work.
24517      new_path="$CYGWIN_ROOT_PATH$input_path"
24518    fi
24519  fi
24520
24521
24522  if test "x$path" != "x$new_path"; then
24523    BOOT_JDK="$new_path"
24524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24526  fi
24527
24528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24529
24530  path="$BOOT_JDK"
24531  has_colon=`$ECHO $path | $GREP ^.:`
24532  new_path="$path"
24533  if test "x$has_colon" = x; then
24534    # Not in mixed or Windows style, start by that.
24535    new_path=`cmd //c echo $path`
24536  fi
24537
24538
24539  input_path="$new_path"
24540  # Check if we need to convert this using DOS-style short mode. If the path
24541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24542  # take no chances and rewrite it.
24543  # Note: m4 eats our [], so we need to use [ and ] instead.
24544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24545  if test "x$has_forbidden_chars" != x; then
24546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24548  fi
24549
24550
24551  windows_path="$new_path"
24552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24553    unix_path=`$CYGPATH -u "$windows_path"`
24554    new_path="$unix_path"
24555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24557    new_path="$unix_path"
24558  fi
24559
24560  if test "x$path" != "x$new_path"; then
24561    BOOT_JDK="$new_path"
24562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24564  fi
24565
24566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24568
24569    else
24570      # We're on a unix platform. Hooray! :)
24571      path="$BOOT_JDK"
24572      has_space=`$ECHO "$path" | $GREP " "`
24573      if test "x$has_space" != x; then
24574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24577      fi
24578
24579      # Use eval to expand a potential ~
24580      eval path="$path"
24581      if test ! -f "$path" && test ! -d "$path"; then
24582        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24583      fi
24584
24585      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24586    fi
24587  fi
24588
24589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24590$as_echo_n "checking for Boot JDK... " >&6; }
24591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24592$as_echo "$BOOT_JDK" >&6; }
24593            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24594$as_echo_n "checking Boot JDK version... " >&6; }
24595            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24597$as_echo "$BOOT_JDK_VERSION" >&6; }
24598          fi # end check jdk version
24599        fi # end check javac
24600      fi # end check java
24601    fi # end check boot jdk found
24602  fi
24603
24604    done
24605  fi
24606
24607
24608    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24609    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24610      # Do we have a bin/java?
24611      if test ! -x "$BOOT_JDK/bin/java"; then
24612        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24614        BOOT_JDK_FOUND=no
24615      else
24616        # Do we have a bin/javac?
24617        if test ! -x "$BOOT_JDK/bin/javac"; then
24618          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24620          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24621$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24622          BOOT_JDK_FOUND=no
24623        else
24624          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24625          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24626
24627          # Extra M4 quote needed to protect [] in grep expression.
24628          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24629          if test "x$FOUND_CORRECT_VERSION" = x; then
24630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24632            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24633$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24634            BOOT_JDK_FOUND=no
24635          else
24636            # We're done! :-)
24637            BOOT_JDK_FOUND=yes
24638
24639  # Only process if variable expands to non-empty
24640
24641  if test "x$BOOT_JDK" != x; then
24642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24643
24644  # Input might be given as Windows format, start by converting to
24645  # unix format.
24646  path="$BOOT_JDK"
24647  new_path=`$CYGPATH -u "$path"`
24648
24649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24652  # "foo.exe" is OK but "foo" is an error.
24653  #
24654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24655  # It is also a way to make sure we got the proper file name for the real test later on.
24656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24657  if test "x$test_shortpath" = x; then
24658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24660    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24661  fi
24662
24663  # Call helper function which possibly converts this using DOS-style short mode.
24664  # If so, the updated path is stored in $new_path.
24665
24666  input_path="$new_path"
24667  # Check if we need to convert this using DOS-style short mode. If the path
24668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24669  # take no chances and rewrite it.
24670  # Note: m4 eats our [], so we need to use [ and ] instead.
24671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24672  if test "x$has_forbidden_chars" != x; then
24673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24677      # Going to short mode and back again did indeed matter. Since short mode is
24678      # case insensitive, let's make it lowercase to improve readability.
24679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24680      # Now convert it back to Unix-style (cygpath)
24681      input_path=`$CYGPATH -u "$shortmode_path"`
24682      new_path="$input_path"
24683    fi
24684  fi
24685
24686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24687  if test "x$test_cygdrive_prefix" = x; then
24688    # As a simple fix, exclude /usr/bin since it's not a real path.
24689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24691      # a path prefixed by /cygdrive for fixpath to work.
24692      new_path="$CYGWIN_ROOT_PATH$input_path"
24693    fi
24694  fi
24695
24696
24697  if test "x$path" != "x$new_path"; then
24698    BOOT_JDK="$new_path"
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24701  fi
24702
24703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24704
24705  path="$BOOT_JDK"
24706  has_colon=`$ECHO $path | $GREP ^.:`
24707  new_path="$path"
24708  if test "x$has_colon" = x; then
24709    # Not in mixed or Windows style, start by that.
24710    new_path=`cmd //c echo $path`
24711  fi
24712
24713
24714  input_path="$new_path"
24715  # Check if we need to convert this using DOS-style short mode. If the path
24716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24717  # take no chances and rewrite it.
24718  # Note: m4 eats our [], so we need to use [ and ] instead.
24719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24720  if test "x$has_forbidden_chars" != x; then
24721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24723  fi
24724
24725
24726  windows_path="$new_path"
24727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24728    unix_path=`$CYGPATH -u "$windows_path"`
24729    new_path="$unix_path"
24730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24732    new_path="$unix_path"
24733  fi
24734
24735  if test "x$path" != "x$new_path"; then
24736    BOOT_JDK="$new_path"
24737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24739  fi
24740
24741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24743
24744    else
24745      # We're on a unix platform. Hooray! :)
24746      path="$BOOT_JDK"
24747      has_space=`$ECHO "$path" | $GREP " "`
24748      if test "x$has_space" != x; then
24749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24752      fi
24753
24754      # Use eval to expand a potential ~
24755      eval path="$path"
24756      if test ! -f "$path" && test ! -d "$path"; then
24757        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24758      fi
24759
24760      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24761    fi
24762  fi
24763
24764            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24765$as_echo_n "checking for Boot JDK... " >&6; }
24766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24767$as_echo "$BOOT_JDK" >&6; }
24768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24769$as_echo_n "checking Boot JDK version... " >&6; }
24770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24772$as_echo "$BOOT_JDK_VERSION" >&6; }
24773          fi # end check jdk version
24774        fi # end check javac
24775      fi # end check java
24776    fi # end check boot jdk found
24777  fi
24778
24779
24780  if test "x$BOOT_JDK_FOUND" = xno; then
24781    # Now execute the test
24782
24783  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24784  BOOT_JDK_SUFFIX="/Contents/Home"
24785  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24786  if test "x$ALL_JDKS_FOUND" != x; then
24787    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24788
24789  if test "x$BOOT_JDK_FOUND" = xno; then
24790    # Now execute the test
24791
24792        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24793        if test -d "$BOOT_JDK"; then
24794          BOOT_JDK_FOUND=maybe
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24796$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24797        fi
24798
24799
24800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24802      # Do we have a bin/java?
24803      if test ! -x "$BOOT_JDK/bin/java"; then
24804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24806        BOOT_JDK_FOUND=no
24807      else
24808        # Do we have a bin/javac?
24809        if test ! -x "$BOOT_JDK/bin/javac"; then
24810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24814          BOOT_JDK_FOUND=no
24815        else
24816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24818
24819          # Extra M4 quote needed to protect [] in grep expression.
24820          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24821          if test "x$FOUND_CORRECT_VERSION" = x; then
24822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24826            BOOT_JDK_FOUND=no
24827          else
24828            # We're done! :-)
24829            BOOT_JDK_FOUND=yes
24830
24831  # Only process if variable expands to non-empty
24832
24833  if test "x$BOOT_JDK" != x; then
24834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24835
24836  # Input might be given as Windows format, start by converting to
24837  # unix format.
24838  path="$BOOT_JDK"
24839  new_path=`$CYGPATH -u "$path"`
24840
24841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24844  # "foo.exe" is OK but "foo" is an error.
24845  #
24846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24847  # It is also a way to make sure we got the proper file name for the real test later on.
24848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24849  if test "x$test_shortpath" = x; then
24850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24853  fi
24854
24855  # Call helper function which possibly converts this using DOS-style short mode.
24856  # If so, the updated path is stored in $new_path.
24857
24858  input_path="$new_path"
24859  # Check if we need to convert this using DOS-style short mode. If the path
24860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24861  # take no chances and rewrite it.
24862  # Note: m4 eats our [], so we need to use [ and ] instead.
24863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24864  if test "x$has_forbidden_chars" != x; then
24865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24869      # Going to short mode and back again did indeed matter. Since short mode is
24870      # case insensitive, let's make it lowercase to improve readability.
24871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24872      # Now convert it back to Unix-style (cygpath)
24873      input_path=`$CYGPATH -u "$shortmode_path"`
24874      new_path="$input_path"
24875    fi
24876  fi
24877
24878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24879  if test "x$test_cygdrive_prefix" = x; then
24880    # As a simple fix, exclude /usr/bin since it's not a real path.
24881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24883      # a path prefixed by /cygdrive for fixpath to work.
24884      new_path="$CYGWIN_ROOT_PATH$input_path"
24885    fi
24886  fi
24887
24888
24889  if test "x$path" != "x$new_path"; then
24890    BOOT_JDK="$new_path"
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24893  fi
24894
24895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896
24897  path="$BOOT_JDK"
24898  has_colon=`$ECHO $path | $GREP ^.:`
24899  new_path="$path"
24900  if test "x$has_colon" = x; then
24901    # Not in mixed or Windows style, start by that.
24902    new_path=`cmd //c echo $path`
24903  fi
24904
24905
24906  input_path="$new_path"
24907  # Check if we need to convert this using DOS-style short mode. If the path
24908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24909  # take no chances and rewrite it.
24910  # Note: m4 eats our [], so we need to use [ and ] instead.
24911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24912  if test "x$has_forbidden_chars" != x; then
24913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915  fi
24916
24917
24918  windows_path="$new_path"
24919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24920    unix_path=`$CYGPATH -u "$windows_path"`
24921    new_path="$unix_path"
24922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24924    new_path="$unix_path"
24925  fi
24926
24927  if test "x$path" != "x$new_path"; then
24928    BOOT_JDK="$new_path"
24929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24931  fi
24932
24933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24935
24936    else
24937      # We're on a unix platform. Hooray! :)
24938      path="$BOOT_JDK"
24939      has_space=`$ECHO "$path" | $GREP " "`
24940      if test "x$has_space" != x; then
24941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24944      fi
24945
24946      # Use eval to expand a potential ~
24947      eval path="$path"
24948      if test ! -f "$path" && test ! -d "$path"; then
24949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24950      fi
24951
24952      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24953    fi
24954  fi
24955
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24957$as_echo_n "checking for Boot JDK... " >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24959$as_echo "$BOOT_JDK" >&6; }
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24961$as_echo_n "checking Boot JDK version... " >&6; }
24962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24964$as_echo "$BOOT_JDK_VERSION" >&6; }
24965          fi # end check jdk version
24966        fi # end check javac
24967      fi # end check java
24968    fi # end check boot jdk found
24969  fi
24970
24971    done
24972  fi
24973
24974
24975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24977      # Do we have a bin/java?
24978      if test ! -x "$BOOT_JDK/bin/java"; then
24979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24981        BOOT_JDK_FOUND=no
24982      else
24983        # Do we have a bin/javac?
24984        if test ! -x "$BOOT_JDK/bin/javac"; then
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24989          BOOT_JDK_FOUND=no
24990        else
24991          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24992          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24993
24994          # Extra M4 quote needed to protect [] in grep expression.
24995          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24996          if test "x$FOUND_CORRECT_VERSION" = x; then
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25000$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25001            BOOT_JDK_FOUND=no
25002          else
25003            # We're done! :-)
25004            BOOT_JDK_FOUND=yes
25005
25006  # Only process if variable expands to non-empty
25007
25008  if test "x$BOOT_JDK" != x; then
25009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25010
25011  # Input might be given as Windows format, start by converting to
25012  # unix format.
25013  path="$BOOT_JDK"
25014  new_path=`$CYGPATH -u "$path"`
25015
25016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25019  # "foo.exe" is OK but "foo" is an error.
25020  #
25021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25022  # It is also a way to make sure we got the proper file name for the real test later on.
25023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25024  if test "x$test_shortpath" = x; then
25025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25028  fi
25029
25030  # Call helper function which possibly converts this using DOS-style short mode.
25031  # If so, the updated path is stored in $new_path.
25032
25033  input_path="$new_path"
25034  # Check if we need to convert this using DOS-style short mode. If the path
25035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25036  # take no chances and rewrite it.
25037  # Note: m4 eats our [], so we need to use [ and ] instead.
25038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25039  if test "x$has_forbidden_chars" != x; then
25040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25044      # Going to short mode and back again did indeed matter. Since short mode is
25045      # case insensitive, let's make it lowercase to improve readability.
25046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25047      # Now convert it back to Unix-style (cygpath)
25048      input_path=`$CYGPATH -u "$shortmode_path"`
25049      new_path="$input_path"
25050    fi
25051  fi
25052
25053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25054  if test "x$test_cygdrive_prefix" = x; then
25055    # As a simple fix, exclude /usr/bin since it's not a real path.
25056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25058      # a path prefixed by /cygdrive for fixpath to work.
25059      new_path="$CYGWIN_ROOT_PATH$input_path"
25060    fi
25061  fi
25062
25063
25064  if test "x$path" != "x$new_path"; then
25065    BOOT_JDK="$new_path"
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25068  fi
25069
25070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071
25072  path="$BOOT_JDK"
25073  has_colon=`$ECHO $path | $GREP ^.:`
25074  new_path="$path"
25075  if test "x$has_colon" = x; then
25076    # Not in mixed or Windows style, start by that.
25077    new_path=`cmd //c echo $path`
25078  fi
25079
25080
25081  input_path="$new_path"
25082  # Check if we need to convert this using DOS-style short mode. If the path
25083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084  # take no chances and rewrite it.
25085  # Note: m4 eats our [], so we need to use [ and ] instead.
25086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25087  if test "x$has_forbidden_chars" != x; then
25088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090  fi
25091
25092
25093  windows_path="$new_path"
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095    unix_path=`$CYGPATH -u "$windows_path"`
25096    new_path="$unix_path"
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25099    new_path="$unix_path"
25100  fi
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25110
25111    else
25112      # We're on a unix platform. Hooray! :)
25113      path="$BOOT_JDK"
25114      has_space=`$ECHO "$path" | $GREP " "`
25115      if test "x$has_space" != x; then
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25119      fi
25120
25121      # Use eval to expand a potential ~
25122      eval path="$path"
25123      if test ! -f "$path" && test ! -d "$path"; then
25124        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25125      fi
25126
25127      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25128    fi
25129  fi
25130
25131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25132$as_echo_n "checking for Boot JDK... " >&6; }
25133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25134$as_echo "$BOOT_JDK" >&6; }
25135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25136$as_echo_n "checking Boot JDK version... " >&6; }
25137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25139$as_echo "$BOOT_JDK_VERSION" >&6; }
25140          fi # end check jdk version
25141        fi # end check javac
25142      fi # end check java
25143    fi # end check boot jdk found
25144  fi
25145
25146  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25147
25148  if test "x$BOOT_JDK_FOUND" = xno; then
25149    # Now execute the test
25150
25151  BOOT_JDK_PREFIX="/usr/lib/jvm"
25152  BOOT_JDK_SUFFIX=""
25153  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25154  if test "x$ALL_JDKS_FOUND" != x; then
25155    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25156
25157  if test "x$BOOT_JDK_FOUND" = xno; then
25158    # Now execute the test
25159
25160        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25161        if test -d "$BOOT_JDK"; then
25162          BOOT_JDK_FOUND=maybe
25163          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25164$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25165        fi
25166
25167
25168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25170      # Do we have a bin/java?
25171      if test ! -x "$BOOT_JDK/bin/java"; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25174        BOOT_JDK_FOUND=no
25175      else
25176        # Do we have a bin/javac?
25177        if test ! -x "$BOOT_JDK/bin/javac"; then
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25182          BOOT_JDK_FOUND=no
25183        else
25184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25186
25187          # Extra M4 quote needed to protect [] in grep expression.
25188          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25189          if test "x$FOUND_CORRECT_VERSION" = x; then
25190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25194            BOOT_JDK_FOUND=no
25195          else
25196            # We're done! :-)
25197            BOOT_JDK_FOUND=yes
25198
25199  # Only process if variable expands to non-empty
25200
25201  if test "x$BOOT_JDK" != x; then
25202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203
25204  # Input might be given as Windows format, start by converting to
25205  # unix format.
25206  path="$BOOT_JDK"
25207  new_path=`$CYGPATH -u "$path"`
25208
25209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25212  # "foo.exe" is OK but "foo" is an error.
25213  #
25214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25215  # It is also a way to make sure we got the proper file name for the real test later on.
25216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25217  if test "x$test_shortpath" = x; then
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25221  fi
25222
25223  # Call helper function which possibly converts this using DOS-style short mode.
25224  # If so, the updated path is stored in $new_path.
25225
25226  input_path="$new_path"
25227  # Check if we need to convert this using DOS-style short mode. If the path
25228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25229  # take no chances and rewrite it.
25230  # Note: m4 eats our [], so we need to use [ and ] instead.
25231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25232  if test "x$has_forbidden_chars" != x; then
25233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25237      # Going to short mode and back again did indeed matter. Since short mode is
25238      # case insensitive, let's make it lowercase to improve readability.
25239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25240      # Now convert it back to Unix-style (cygpath)
25241      input_path=`$CYGPATH -u "$shortmode_path"`
25242      new_path="$input_path"
25243    fi
25244  fi
25245
25246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25247  if test "x$test_cygdrive_prefix" = x; then
25248    # As a simple fix, exclude /usr/bin since it's not a real path.
25249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25251      # a path prefixed by /cygdrive for fixpath to work.
25252      new_path="$CYGWIN_ROOT_PATH$input_path"
25253    fi
25254  fi
25255
25256
25257  if test "x$path" != "x$new_path"; then
25258    BOOT_JDK="$new_path"
25259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25261  fi
25262
25263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264
25265  path="$BOOT_JDK"
25266  has_colon=`$ECHO $path | $GREP ^.:`
25267  new_path="$path"
25268  if test "x$has_colon" = x; then
25269    # Not in mixed or Windows style, start by that.
25270    new_path=`cmd //c echo $path`
25271  fi
25272
25273
25274  input_path="$new_path"
25275  # Check if we need to convert this using DOS-style short mode. If the path
25276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277  # take no chances and rewrite it.
25278  # Note: m4 eats our [], so we need to use [ and ] instead.
25279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25280  if test "x$has_forbidden_chars" != x; then
25281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25283  fi
25284
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295  if test "x$path" != "x$new_path"; then
25296    BOOT_JDK="$new_path"
25297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25299  fi
25300
25301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25303
25304    else
25305      # We're on a unix platform. Hooray! :)
25306      path="$BOOT_JDK"
25307      has_space=`$ECHO "$path" | $GREP " "`
25308      if test "x$has_space" != x; then
25309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25312      fi
25313
25314      # Use eval to expand a potential ~
25315      eval path="$path"
25316      if test ! -f "$path" && test ! -d "$path"; then
25317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25318      fi
25319
25320      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25321    fi
25322  fi
25323
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25325$as_echo_n "checking for Boot JDK... " >&6; }
25326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25327$as_echo "$BOOT_JDK" >&6; }
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25329$as_echo_n "checking Boot JDK version... " >&6; }
25330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25332$as_echo "$BOOT_JDK_VERSION" >&6; }
25333          fi # end check jdk version
25334        fi # end check javac
25335      fi # end check java
25336    fi # end check boot jdk found
25337  fi
25338
25339    done
25340  fi
25341
25342
25343    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25344    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25345      # Do we have a bin/java?
25346      if test ! -x "$BOOT_JDK/bin/java"; then
25347        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25349        BOOT_JDK_FOUND=no
25350      else
25351        # Do we have a bin/javac?
25352        if test ! -x "$BOOT_JDK/bin/javac"; then
25353          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25355          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25356$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25357          BOOT_JDK_FOUND=no
25358        else
25359          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25360          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25361
25362          # Extra M4 quote needed to protect [] in grep expression.
25363          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25364          if test "x$FOUND_CORRECT_VERSION" = x; then
25365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25369            BOOT_JDK_FOUND=no
25370          else
25371            # We're done! :-)
25372            BOOT_JDK_FOUND=yes
25373
25374  # Only process if variable expands to non-empty
25375
25376  if test "x$BOOT_JDK" != x; then
25377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378
25379  # Input might be given as Windows format, start by converting to
25380  # unix format.
25381  path="$BOOT_JDK"
25382  new_path=`$CYGPATH -u "$path"`
25383
25384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25387  # "foo.exe" is OK but "foo" is an error.
25388  #
25389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25390  # It is also a way to make sure we got the proper file name for the real test later on.
25391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25392  if test "x$test_shortpath" = x; then
25393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25396  fi
25397
25398  # Call helper function which possibly converts this using DOS-style short mode.
25399  # If so, the updated path is stored in $new_path.
25400
25401  input_path="$new_path"
25402  # Check if we need to convert this using DOS-style short mode. If the path
25403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25404  # take no chances and rewrite it.
25405  # Note: m4 eats our [], so we need to use [ and ] instead.
25406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25407  if test "x$has_forbidden_chars" != x; then
25408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25412      # Going to short mode and back again did indeed matter. Since short mode is
25413      # case insensitive, let's make it lowercase to improve readability.
25414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25415      # Now convert it back to Unix-style (cygpath)
25416      input_path=`$CYGPATH -u "$shortmode_path"`
25417      new_path="$input_path"
25418    fi
25419  fi
25420
25421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25422  if test "x$test_cygdrive_prefix" = x; then
25423    # As a simple fix, exclude /usr/bin since it's not a real path.
25424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25426      # a path prefixed by /cygdrive for fixpath to work.
25427      new_path="$CYGWIN_ROOT_PATH$input_path"
25428    fi
25429  fi
25430
25431
25432  if test "x$path" != "x$new_path"; then
25433    BOOT_JDK="$new_path"
25434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25436  fi
25437
25438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25439
25440  path="$BOOT_JDK"
25441  has_colon=`$ECHO $path | $GREP ^.:`
25442  new_path="$path"
25443  if test "x$has_colon" = x; then
25444    # Not in mixed or Windows style, start by that.
25445    new_path=`cmd //c echo $path`
25446  fi
25447
25448
25449  input_path="$new_path"
25450  # Check if we need to convert this using DOS-style short mode. If the path
25451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25452  # take no chances and rewrite it.
25453  # Note: m4 eats our [], so we need to use [ and ] instead.
25454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25455  if test "x$has_forbidden_chars" != x; then
25456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25458  fi
25459
25460
25461  windows_path="$new_path"
25462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25463    unix_path=`$CYGPATH -u "$windows_path"`
25464    new_path="$unix_path"
25465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25467    new_path="$unix_path"
25468  fi
25469
25470  if test "x$path" != "x$new_path"; then
25471    BOOT_JDK="$new_path"
25472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25474  fi
25475
25476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25478
25479    else
25480      # We're on a unix platform. Hooray! :)
25481      path="$BOOT_JDK"
25482      has_space=`$ECHO "$path" | $GREP " "`
25483      if test "x$has_space" != x; then
25484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25487      fi
25488
25489      # Use eval to expand a potential ~
25490      eval path="$path"
25491      if test ! -f "$path" && test ! -d "$path"; then
25492        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25493      fi
25494
25495      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25496    fi
25497  fi
25498
25499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25500$as_echo_n "checking for Boot JDK... " >&6; }
25501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25502$as_echo "$BOOT_JDK" >&6; }
25503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25504$as_echo_n "checking Boot JDK version... " >&6; }
25505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25507$as_echo "$BOOT_JDK_VERSION" >&6; }
25508          fi # end check jdk version
25509        fi # end check javac
25510      fi # end check java
25511    fi # end check boot jdk found
25512  fi
25513
25514  fi
25515
25516
25517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25519      # Do we have a bin/java?
25520      if test ! -x "$BOOT_JDK/bin/java"; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25523        BOOT_JDK_FOUND=no
25524      else
25525        # Do we have a bin/javac?
25526        if test ! -x "$BOOT_JDK/bin/javac"; then
25527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25531          BOOT_JDK_FOUND=no
25532        else
25533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25535
25536          # Extra M4 quote needed to protect [] in grep expression.
25537          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25538          if test "x$FOUND_CORRECT_VERSION" = x; then
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25543            BOOT_JDK_FOUND=no
25544          else
25545            # We're done! :-)
25546            BOOT_JDK_FOUND=yes
25547
25548  # Only process if variable expands to non-empty
25549
25550  if test "x$BOOT_JDK" != x; then
25551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25552
25553  # Input might be given as Windows format, start by converting to
25554  # unix format.
25555  path="$BOOT_JDK"
25556  new_path=`$CYGPATH -u "$path"`
25557
25558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25561  # "foo.exe" is OK but "foo" is an error.
25562  #
25563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25564  # It is also a way to make sure we got the proper file name for the real test later on.
25565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25566  if test "x$test_shortpath" = x; then
25567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25570  fi
25571
25572  # Call helper function which possibly converts this using DOS-style short mode.
25573  # If so, the updated path is stored in $new_path.
25574
25575  input_path="$new_path"
25576  # Check if we need to convert this using DOS-style short mode. If the path
25577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25578  # take no chances and rewrite it.
25579  # Note: m4 eats our [], so we need to use [ and ] instead.
25580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25581  if test "x$has_forbidden_chars" != x; then
25582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25586      # Going to short mode and back again did indeed matter. Since short mode is
25587      # case insensitive, let's make it lowercase to improve readability.
25588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25589      # Now convert it back to Unix-style (cygpath)
25590      input_path=`$CYGPATH -u "$shortmode_path"`
25591      new_path="$input_path"
25592    fi
25593  fi
25594
25595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25596  if test "x$test_cygdrive_prefix" = x; then
25597    # As a simple fix, exclude /usr/bin since it's not a real path.
25598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25600      # a path prefixed by /cygdrive for fixpath to work.
25601      new_path="$CYGWIN_ROOT_PATH$input_path"
25602    fi
25603  fi
25604
25605
25606  if test "x$path" != "x$new_path"; then
25607    BOOT_JDK="$new_path"
25608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25610  fi
25611
25612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25613
25614  path="$BOOT_JDK"
25615  has_colon=`$ECHO $path | $GREP ^.:`
25616  new_path="$path"
25617  if test "x$has_colon" = x; then
25618    # Not in mixed or Windows style, start by that.
25619    new_path=`cmd //c echo $path`
25620  fi
25621
25622
25623  input_path="$new_path"
25624  # Check if we need to convert this using DOS-style short mode. If the path
25625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25626  # take no chances and rewrite it.
25627  # Note: m4 eats our [], so we need to use [ and ] instead.
25628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25629  if test "x$has_forbidden_chars" != x; then
25630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25632  fi
25633
25634
25635  windows_path="$new_path"
25636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25637    unix_path=`$CYGPATH -u "$windows_path"`
25638    new_path="$unix_path"
25639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25641    new_path="$unix_path"
25642  fi
25643
25644  if test "x$path" != "x$new_path"; then
25645    BOOT_JDK="$new_path"
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25648  fi
25649
25650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25652
25653    else
25654      # We're on a unix platform. Hooray! :)
25655      path="$BOOT_JDK"
25656      has_space=`$ECHO "$path" | $GREP " "`
25657      if test "x$has_space" != x; then
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25661      fi
25662
25663      # Use eval to expand a potential ~
25664      eval path="$path"
25665      if test ! -f "$path" && test ! -d "$path"; then
25666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25667      fi
25668
25669      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25670    fi
25671  fi
25672
25673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25674$as_echo_n "checking for Boot JDK... " >&6; }
25675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25676$as_echo "$BOOT_JDK" >&6; }
25677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25678$as_echo_n "checking Boot JDK version... " >&6; }
25679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25681$as_echo "$BOOT_JDK_VERSION" >&6; }
25682          fi # end check jdk version
25683        fi # end check javac
25684      fi # end check java
25685    fi # end check boot jdk found
25686  fi
25687
25688
25689  # If we haven't found anything yet, we've truly lost. Give up.
25690  if test "x$BOOT_JDK_FOUND" = xno; then
25691
25692  # Print a helpful message on how to acquire the necessary build dependency.
25693  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25694  MISSING_DEPENDENCY=openjdk
25695
25696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697    cygwin_help $MISSING_DEPENDENCY
25698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25699    msys_help $MISSING_DEPENDENCY
25700  else
25701    PKGHANDLER_COMMAND=
25702
25703    case $PKGHANDLER in
25704      apt-get)
25705        apt_help     $MISSING_DEPENDENCY ;;
25706      yum)
25707        yum_help     $MISSING_DEPENDENCY ;;
25708      port)
25709        port_help    $MISSING_DEPENDENCY ;;
25710      pkgutil)
25711        pkgutil_help $MISSING_DEPENDENCY ;;
25712      pkgadd)
25713        pkgadd_help  $MISSING_DEPENDENCY ;;
25714    esac
25715
25716    if test "x$PKGHANDLER_COMMAND" != x; then
25717      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25718    fi
25719  fi
25720
25721    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25722$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25723    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725    as_fn_error $? "Cannot continue" "$LINENO" 5
25726  fi
25727
25728
25729
25730  # Setup tools from the Boot JDK.
25731
25732  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25733
25734  # Publish this variable in the help.
25735
25736
25737  if test "x$JAVA" = x; then
25738    # The variable is not set by user, try to locate tool using the code snippet
25739
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25741$as_echo_n "checking for java in Boot JDK... " >&6; }
25742      JAVA=$BOOT_JDK/bin/java
25743      if test ! -x $JAVA; then
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25745$as_echo "not found" >&6; }
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25747$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25748        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25749      fi
25750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25751$as_echo "ok" >&6; }
25752
25753
25754  else
25755    # The variable is set, but is it from the command line or the environment?
25756
25757    # Try to remove the string !JAVA! from our list.
25758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25760      # If it failed, the variable was not from the command line. Ignore it,
25761      # but warn the user (except for BASH, which is always set by the calling BASH).
25762      if test "xJAVA" != xBASH; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25764$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25765      fi
25766      # Try to locate tool using the code snippet
25767
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25769$as_echo_n "checking for java in Boot JDK... " >&6; }
25770      JAVA=$BOOT_JDK/bin/java
25771      if test ! -x $JAVA; then
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25773$as_echo "not found" >&6; }
25774        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25776        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25777      fi
25778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25779$as_echo "ok" >&6; }
25780
25781
25782    else
25783      # If it succeeded, then it was overridden by the user. We will use it
25784      # for the tool.
25785
25786      # First remove it from the list of overridden variables, so we can test
25787      # for unknown variables in the end.
25788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25789
25790      # Check if the provided tool contains a complete path.
25791      tool_specified="$JAVA"
25792      tool_basename="${tool_specified##*/}"
25793      if test "x$tool_basename" = "x$tool_specified"; then
25794        # A command without a complete path is provided, search $PATH.
25795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25796$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25797        # Extract the first word of "$tool_basename", so it can be a program name with args.
25798set dummy $tool_basename; ac_word=$2
25799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25800$as_echo_n "checking for $ac_word... " >&6; }
25801if ${ac_cv_path_JAVA+:} false; then :
25802  $as_echo_n "(cached) " >&6
25803else
25804  case $JAVA in
25805  [\\/]* | ?:[\\/]*)
25806  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25807  ;;
25808  *)
25809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25810for as_dir in $PATH
25811do
25812  IFS=$as_save_IFS
25813  test -z "$as_dir" && as_dir=.
25814    for ac_exec_ext in '' $ac_executable_extensions; do
25815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25816    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25818    break 2
25819  fi
25820done
25821  done
25822IFS=$as_save_IFS
25823
25824  ;;
25825esac
25826fi
25827JAVA=$ac_cv_path_JAVA
25828if test -n "$JAVA"; then
25829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25830$as_echo "$JAVA" >&6; }
25831else
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25833$as_echo "no" >&6; }
25834fi
25835
25836
25837        if test "x$JAVA" = x; then
25838          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25839        fi
25840      else
25841        # Otherwise we believe it is a complete path. Use it as it is.
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25843$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25845$as_echo_n "checking for JAVA... " >&6; }
25846        if test ! -x "$tool_specified"; then
25847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25848$as_echo "not found" >&6; }
25849          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25850        fi
25851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25852$as_echo "$tool_specified" >&6; }
25853      fi
25854    fi
25855  fi
25856
25857
25858
25859  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25860
25861  # Publish this variable in the help.
25862
25863
25864  if test "x$JAVAC" = x; then
25865    # The variable is not set by user, try to locate tool using the code snippet
25866
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25868$as_echo_n "checking for javac in Boot JDK... " >&6; }
25869      JAVAC=$BOOT_JDK/bin/javac
25870      if test ! -x $JAVAC; then
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25872$as_echo "not found" >&6; }
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25874$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25875        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25876      fi
25877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25878$as_echo "ok" >&6; }
25879
25880
25881  else
25882    # The variable is set, but is it from the command line or the environment?
25883
25884    # Try to remove the string !JAVAC! from our list.
25885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25887      # If it failed, the variable was not from the command line. Ignore it,
25888      # but warn the user (except for BASH, which is always set by the calling BASH).
25889      if test "xJAVAC" != xBASH; then
25890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25891$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25892      fi
25893      # Try to locate tool using the code snippet
25894
25895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25896$as_echo_n "checking for javac in Boot JDK... " >&6; }
25897      JAVAC=$BOOT_JDK/bin/javac
25898      if test ! -x $JAVAC; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25900$as_echo "not found" >&6; }
25901        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25903        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25904      fi
25905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25906$as_echo "ok" >&6; }
25907
25908
25909    else
25910      # If it succeeded, then it was overridden by the user. We will use it
25911      # for the tool.
25912
25913      # First remove it from the list of overridden variables, so we can test
25914      # for unknown variables in the end.
25915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25916
25917      # Check if the provided tool contains a complete path.
25918      tool_specified="$JAVAC"
25919      tool_basename="${tool_specified##*/}"
25920      if test "x$tool_basename" = "x$tool_specified"; then
25921        # A command without a complete path is provided, search $PATH.
25922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25923$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25924        # Extract the first word of "$tool_basename", so it can be a program name with args.
25925set dummy $tool_basename; ac_word=$2
25926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25927$as_echo_n "checking for $ac_word... " >&6; }
25928if ${ac_cv_path_JAVAC+:} false; then :
25929  $as_echo_n "(cached) " >&6
25930else
25931  case $JAVAC in
25932  [\\/]* | ?:[\\/]*)
25933  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25934  ;;
25935  *)
25936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25937for as_dir in $PATH
25938do
25939  IFS=$as_save_IFS
25940  test -z "$as_dir" && as_dir=.
25941    for ac_exec_ext in '' $ac_executable_extensions; do
25942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25943    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25945    break 2
25946  fi
25947done
25948  done
25949IFS=$as_save_IFS
25950
25951  ;;
25952esac
25953fi
25954JAVAC=$ac_cv_path_JAVAC
25955if test -n "$JAVAC"; then
25956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25957$as_echo "$JAVAC" >&6; }
25958else
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25960$as_echo "no" >&6; }
25961fi
25962
25963
25964        if test "x$JAVAC" = x; then
25965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25966        fi
25967      else
25968        # Otherwise we believe it is a complete path. Use it as it is.
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25970$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25972$as_echo_n "checking for JAVAC... " >&6; }
25973        if test ! -x "$tool_specified"; then
25974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25975$as_echo "not found" >&6; }
25976          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25977        fi
25978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25979$as_echo "$tool_specified" >&6; }
25980      fi
25981    fi
25982  fi
25983
25984
25985
25986  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25987
25988  # Publish this variable in the help.
25989
25990
25991  if test "x$JAVAH" = x; then
25992    # The variable is not set by user, try to locate tool using the code snippet
25993
25994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25995$as_echo_n "checking for javah in Boot JDK... " >&6; }
25996      JAVAH=$BOOT_JDK/bin/javah
25997      if test ! -x $JAVAH; then
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25999$as_echo "not found" >&6; }
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26002        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26003      fi
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26005$as_echo "ok" >&6; }
26006
26007
26008  else
26009    # The variable is set, but is it from the command line or the environment?
26010
26011    # Try to remove the string !JAVAH! from our list.
26012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26014      # If it failed, the variable was not from the command line. Ignore it,
26015      # but warn the user (except for BASH, which is always set by the calling BASH).
26016      if test "xJAVAH" != xBASH; then
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26018$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26019      fi
26020      # Try to locate tool using the code snippet
26021
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26023$as_echo_n "checking for javah in Boot JDK... " >&6; }
26024      JAVAH=$BOOT_JDK/bin/javah
26025      if test ! -x $JAVAH; then
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26027$as_echo "not found" >&6; }
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26029$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26030        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26031      fi
26032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26033$as_echo "ok" >&6; }
26034
26035
26036    else
26037      # If it succeeded, then it was overridden by the user. We will use it
26038      # for the tool.
26039
26040      # First remove it from the list of overridden variables, so we can test
26041      # for unknown variables in the end.
26042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26043
26044      # Check if the provided tool contains a complete path.
26045      tool_specified="$JAVAH"
26046      tool_basename="${tool_specified##*/}"
26047      if test "x$tool_basename" = "x$tool_specified"; then
26048        # A command without a complete path is provided, search $PATH.
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26050$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26051        # Extract the first word of "$tool_basename", so it can be a program name with args.
26052set dummy $tool_basename; ac_word=$2
26053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26054$as_echo_n "checking for $ac_word... " >&6; }
26055if ${ac_cv_path_JAVAH+:} false; then :
26056  $as_echo_n "(cached) " >&6
26057else
26058  case $JAVAH in
26059  [\\/]* | ?:[\\/]*)
26060  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26061  ;;
26062  *)
26063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26064for as_dir in $PATH
26065do
26066  IFS=$as_save_IFS
26067  test -z "$as_dir" && as_dir=.
26068    for ac_exec_ext in '' $ac_executable_extensions; do
26069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26070    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26072    break 2
26073  fi
26074done
26075  done
26076IFS=$as_save_IFS
26077
26078  ;;
26079esac
26080fi
26081JAVAH=$ac_cv_path_JAVAH
26082if test -n "$JAVAH"; then
26083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26084$as_echo "$JAVAH" >&6; }
26085else
26086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26087$as_echo "no" >&6; }
26088fi
26089
26090
26091        if test "x$JAVAH" = x; then
26092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26093        fi
26094      else
26095        # Otherwise we believe it is a complete path. Use it as it is.
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26097$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26099$as_echo_n "checking for JAVAH... " >&6; }
26100        if test ! -x "$tool_specified"; then
26101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26102$as_echo "not found" >&6; }
26103          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26104        fi
26105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26106$as_echo "$tool_specified" >&6; }
26107      fi
26108    fi
26109  fi
26110
26111
26112
26113  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26114
26115  # Publish this variable in the help.
26116
26117
26118  if test "x$JAR" = x; then
26119    # The variable is not set by user, try to locate tool using the code snippet
26120
26121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26122$as_echo_n "checking for jar in Boot JDK... " >&6; }
26123      JAR=$BOOT_JDK/bin/jar
26124      if test ! -x $JAR; then
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26126$as_echo "not found" >&6; }
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26128$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26129        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26130      fi
26131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26132$as_echo "ok" >&6; }
26133
26134
26135  else
26136    # The variable is set, but is it from the command line or the environment?
26137
26138    # Try to remove the string !JAR! from our list.
26139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26141      # If it failed, the variable was not from the command line. Ignore it,
26142      # but warn the user (except for BASH, which is always set by the calling BASH).
26143      if test "xJAR" != xBASH; then
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26145$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26146      fi
26147      # Try to locate tool using the code snippet
26148
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26150$as_echo_n "checking for jar in Boot JDK... " >&6; }
26151      JAR=$BOOT_JDK/bin/jar
26152      if test ! -x $JAR; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26154$as_echo "not found" >&6; }
26155        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26156$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26157        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26158      fi
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26160$as_echo "ok" >&6; }
26161
26162
26163    else
26164      # If it succeeded, then it was overridden by the user. We will use it
26165      # for the tool.
26166
26167      # First remove it from the list of overridden variables, so we can test
26168      # for unknown variables in the end.
26169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26170
26171      # Check if the provided tool contains a complete path.
26172      tool_specified="$JAR"
26173      tool_basename="${tool_specified##*/}"
26174      if test "x$tool_basename" = "x$tool_specified"; then
26175        # A command without a complete path is provided, search $PATH.
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26177$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26178        # Extract the first word of "$tool_basename", so it can be a program name with args.
26179set dummy $tool_basename; ac_word=$2
26180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26181$as_echo_n "checking for $ac_word... " >&6; }
26182if ${ac_cv_path_JAR+:} false; then :
26183  $as_echo_n "(cached) " >&6
26184else
26185  case $JAR in
26186  [\\/]* | ?:[\\/]*)
26187  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26188  ;;
26189  *)
26190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26191for as_dir in $PATH
26192do
26193  IFS=$as_save_IFS
26194  test -z "$as_dir" && as_dir=.
26195    for ac_exec_ext in '' $ac_executable_extensions; do
26196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26197    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26199    break 2
26200  fi
26201done
26202  done
26203IFS=$as_save_IFS
26204
26205  ;;
26206esac
26207fi
26208JAR=$ac_cv_path_JAR
26209if test -n "$JAR"; then
26210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26211$as_echo "$JAR" >&6; }
26212else
26213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26214$as_echo "no" >&6; }
26215fi
26216
26217
26218        if test "x$JAR" = x; then
26219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26220        fi
26221      else
26222        # Otherwise we believe it is a complete path. Use it as it is.
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26224$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26226$as_echo_n "checking for JAR... " >&6; }
26227        if test ! -x "$tool_specified"; then
26228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26229$as_echo "not found" >&6; }
26230          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26231        fi
26232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26233$as_echo "$tool_specified" >&6; }
26234      fi
26235    fi
26236  fi
26237
26238
26239
26240  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26241
26242  # Publish this variable in the help.
26243
26244
26245  if test "x$JARSIGNER" = x; then
26246    # The variable is not set by user, try to locate tool using the code snippet
26247
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26249$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26250      JARSIGNER=$BOOT_JDK/bin/jarsigner
26251      if test ! -x $JARSIGNER; then
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26253$as_echo "not found" >&6; }
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26256        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26257      fi
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26259$as_echo "ok" >&6; }
26260
26261
26262  else
26263    # The variable is set, but is it from the command line or the environment?
26264
26265    # Try to remove the string !JARSIGNER! from our list.
26266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26268      # If it failed, the variable was not from the command line. Ignore it,
26269      # but warn the user (except for BASH, which is always set by the calling BASH).
26270      if test "xJARSIGNER" != xBASH; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26272$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26273      fi
26274      # Try to locate tool using the code snippet
26275
26276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26277$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26278      JARSIGNER=$BOOT_JDK/bin/jarsigner
26279      if test ! -x $JARSIGNER; then
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26281$as_echo "not found" >&6; }
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26283$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26284        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26285      fi
26286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26287$as_echo "ok" >&6; }
26288
26289
26290    else
26291      # If it succeeded, then it was overridden by the user. We will use it
26292      # for the tool.
26293
26294      # First remove it from the list of overridden variables, so we can test
26295      # for unknown variables in the end.
26296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26297
26298      # Check if the provided tool contains a complete path.
26299      tool_specified="$JARSIGNER"
26300      tool_basename="${tool_specified##*/}"
26301      if test "x$tool_basename" = "x$tool_specified"; then
26302        # A command without a complete path is provided, search $PATH.
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26304$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26305        # Extract the first word of "$tool_basename", so it can be a program name with args.
26306set dummy $tool_basename; ac_word=$2
26307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26308$as_echo_n "checking for $ac_word... " >&6; }
26309if ${ac_cv_path_JARSIGNER+:} false; then :
26310  $as_echo_n "(cached) " >&6
26311else
26312  case $JARSIGNER in
26313  [\\/]* | ?:[\\/]*)
26314  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26315  ;;
26316  *)
26317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26318for as_dir in $PATH
26319do
26320  IFS=$as_save_IFS
26321  test -z "$as_dir" && as_dir=.
26322    for ac_exec_ext in '' $ac_executable_extensions; do
26323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26324    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26326    break 2
26327  fi
26328done
26329  done
26330IFS=$as_save_IFS
26331
26332  ;;
26333esac
26334fi
26335JARSIGNER=$ac_cv_path_JARSIGNER
26336if test -n "$JARSIGNER"; then
26337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26338$as_echo "$JARSIGNER" >&6; }
26339else
26340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26341$as_echo "no" >&6; }
26342fi
26343
26344
26345        if test "x$JARSIGNER" = x; then
26346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26347        fi
26348      else
26349        # Otherwise we believe it is a complete path. Use it as it is.
26350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26351$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26353$as_echo_n "checking for JARSIGNER... " >&6; }
26354        if test ! -x "$tool_specified"; then
26355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26356$as_echo "not found" >&6; }
26357          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26358        fi
26359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26360$as_echo "$tool_specified" >&6; }
26361      fi
26362    fi
26363  fi
26364
26365
26366
26367  # Finally, set some other options...
26368
26369  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26370  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26371
26372
26373
26374
26375###############################################################################
26376#
26377# Configure the sources to use. We can add or override individual directories.
26378#
26379###############################################################################
26380
26381
26382  # Where are the sources. Any of these can be overridden
26383  # using --with-override-corba and the likes.
26384  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26385  CORBA_TOPDIR="$SRC_ROOT/corba"
26386  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26387  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26388  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26389  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26390  JDK_TOPDIR="$SRC_ROOT/jdk"
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401  ###############################################################################
26402  #
26403  # Pickup additional source for a component from outside of the source root
26404  # or override source for a component.
26405  #
26406
26407# Check whether --with-add-source-root was given.
26408if test "${with_add_source_root+set}" = set; then :
26409  withval=$with_add_source_root;
26410fi
26411
26412
26413
26414# Check whether --with-override-source-root was given.
26415if test "${with_override_source_root+set}" = set; then :
26416  withval=$with_override_source_root;
26417fi
26418
26419
26420
26421# Check whether --with-adds-and-overrides was given.
26422if test "${with_adds_and_overrides+set}" = set; then :
26423  withval=$with_adds_and_overrides;
26424fi
26425
26426
26427  if test "x$with_adds_and_overrides" != x; then
26428    with_add_source_root="$with_adds_and_overrides/adds"
26429    with_override_source_root="$with_adds_and_overrides/overrides"
26430  fi
26431
26432  if test "x$with_add_source_root" != x; then
26433    if ! test -d $with_add_source_root; then
26434      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26435    fi
26436    CURDIR="$PWD"
26437    cd "$with_add_source_root"
26438    ADD_SRC_ROOT="`pwd`"
26439    cd "$CURDIR"
26440    # Verify that the addon source root does not have any root makefiles.
26441    # If it does, then it is usually an error, prevent this.
26442    if test -f $with_add_source_root/langtools/make/Makefile; then
26443      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26444    fi
26445    if test -f $with_add_source_root/corba/make/Makefile; then
26446      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26447    fi
26448    if test -f $with_add_source_root/jaxp/make/Makefile; then
26449      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26450    fi
26451    if test -f $with_add_source_root/jaxws/make/Makefile; then
26452      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26453    fi
26454    if test -f $with_add_source_root/hotspot/make/Makefile; then
26455      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26456    fi
26457    if test -f $with_add_source_root/nashorn/make/Makefile; then
26458      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26459    fi
26460    if test -f $with_add_source_root/jdk/make/Makefile; then
26461      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26462    fi
26463  fi
26464
26465
26466  if test "x$with_override_source_root" != x; then
26467    if ! test -d $with_override_source_root; then
26468      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26469    fi
26470    CURDIR="$PWD"
26471    cd "$with_override_source_root"
26472    OVERRIDE_SRC_ROOT="`pwd`"
26473    cd "$CURDIR"
26474    if test -f $with_override_source_root/langtools/make/Makefile; then
26475      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26476    fi
26477    if test -f $with_override_source_root/corba/make/Makefile; then
26478      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26479    fi
26480    if test -f $with_override_source_root/jaxp/make/Makefile; then
26481      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26482    fi
26483    if test -f $with_override_source_root/jaxws/make/Makefile; then
26484      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26485    fi
26486    if test -f $with_override_source_root/hotspot/make/Makefile; then
26487      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26488    fi
26489    if test -f $with_override_source_root/nashorn/make/Makefile; then
26490      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26491    fi
26492    if test -f $with_override_source_root/jdk/make/Makefile; then
26493      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26494    fi
26495  fi
26496
26497
26498  ###############################################################################
26499  #
26500  # Override a repo completely, this is used for example when you have 3 small
26501  # development sandboxes of the langtools sources and want to avoid having 3 full
26502  # OpenJDK sources checked out on disk.
26503  #
26504  # Assuming that the 3 langtools sandboxes are located here:
26505  # /home/fredrik/sandbox1/langtools
26506  # /home/fredrik/sandbox2/langtools
26507  # /home/fredrik/sandbox3/langtools
26508  #
26509  # From the source root you create build subdirs manually:
26510  #     mkdir -p build1 build2 build3
26511  # in each build directory run:
26512  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26513  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26514  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26515  #
26516
26517
26518# Check whether --with-override-langtools was given.
26519if test "${with_override_langtools+set}" = set; then :
26520  withval=$with_override_langtools;
26521fi
26522
26523
26524
26525# Check whether --with-override-corba was given.
26526if test "${with_override_corba+set}" = set; then :
26527  withval=$with_override_corba;
26528fi
26529
26530
26531
26532# Check whether --with-override-jaxp was given.
26533if test "${with_override_jaxp+set}" = set; then :
26534  withval=$with_override_jaxp;
26535fi
26536
26537
26538
26539# Check whether --with-override-jaxws was given.
26540if test "${with_override_jaxws+set}" = set; then :
26541  withval=$with_override_jaxws;
26542fi
26543
26544
26545
26546# Check whether --with-override-hotspot was given.
26547if test "${with_override_hotspot+set}" = set; then :
26548  withval=$with_override_hotspot;
26549fi
26550
26551
26552
26553# Check whether --with-override-nashorn was given.
26554if test "${with_override_nashorn+set}" = set; then :
26555  withval=$with_override_nashorn;
26556fi
26557
26558
26559
26560# Check whether --with-override-jdk was given.
26561if test "${with_override_jdk+set}" = set; then :
26562  withval=$with_override_jdk;
26563fi
26564
26565
26566  if test "x$with_override_langtools" != x; then
26567    CURDIR="$PWD"
26568    cd "$with_override_langtools"
26569    LANGTOOLS_TOPDIR="`pwd`"
26570    cd "$CURDIR"
26571    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26572      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26573    fi
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26575$as_echo_n "checking if langtools should be overridden... " >&6; }
26576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26577$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26578  fi
26579  if test "x$with_override_corba" != x; then
26580    CURDIR="$PWD"
26581    cd "$with_override_corba"
26582    CORBA_TOPDIR="`pwd`"
26583    cd "$CURDIR"
26584    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26585      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26586    fi
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26588$as_echo_n "checking if corba should be overridden... " >&6; }
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26590$as_echo "yes with $CORBA_TOPDIR" >&6; }
26591  fi
26592  if test "x$with_override_jaxp" != x; then
26593    CURDIR="$PWD"
26594    cd "$with_override_jaxp"
26595    JAXP_TOPDIR="`pwd`"
26596    cd "$CURDIR"
26597    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26598      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26599    fi
26600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26601$as_echo_n "checking if jaxp should be overridden... " >&6; }
26602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26603$as_echo "yes with $JAXP_TOPDIR" >&6; }
26604  fi
26605  if test "x$with_override_jaxws" != x; then
26606    CURDIR="$PWD"
26607    cd "$with_override_jaxws"
26608    JAXWS_TOPDIR="`pwd`"
26609    cd "$CURDIR"
26610    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26611      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26612    fi
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26614$as_echo_n "checking if jaxws should be overridden... " >&6; }
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26616$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26617  fi
26618  if test "x$with_override_hotspot" != x; then
26619    CURDIR="$PWD"
26620    cd "$with_override_hotspot"
26621    HOTSPOT_TOPDIR="`pwd`"
26622    cd "$CURDIR"
26623    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26624      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26625    fi
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26627$as_echo_n "checking if hotspot should be overridden... " >&6; }
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26629$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26630  fi
26631  if test "x$with_override_nashorn" != x; then
26632    CURDIR="$PWD"
26633    cd "$with_override_nashorn"
26634    NASHORN_TOPDIR="`pwd`"
26635    cd "$CURDIR"
26636    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26637      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26638    fi
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26640$as_echo_n "checking if nashorn should be overridden... " >&6; }
26641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26642$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26643  fi
26644  if test "x$with_override_jdk" != x; then
26645    CURDIR="$PWD"
26646    cd "$with_override_jdk"
26647    JDK_TOPDIR="`pwd`"
26648    cd "$CURDIR"
26649    if ! test -f $JDK_TOPDIR/make/Makefile; then
26650      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26651    fi
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26653$as_echo_n "checking if JDK should be overridden... " >&6; }
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26655$as_echo "yes with $JDK_TOPDIR" >&6; }
26656  fi
26657
26658
26659  BUILD_OUTPUT="$OUTPUT_ROOT"
26660
26661
26662  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26663  BUILD_HOTSPOT=true
26664
26665
26666
26667# Check whether --with-import-hotspot was given.
26668if test "${with_import_hotspot+set}" = set; then :
26669  withval=$with_import_hotspot;
26670fi
26671
26672  if test "x$with_import_hotspot" != x; then
26673    CURDIR="$PWD"
26674    cd "$with_import_hotspot"
26675    HOTSPOT_DIST="`pwd`"
26676    cd "$CURDIR"
26677    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26678      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26679    fi
26680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26681$as_echo_n "checking if hotspot should be imported... " >&6; }
26682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26683$as_echo "yes from $HOTSPOT_DIST" >&6; }
26684    BUILD_HOTSPOT=false
26685  fi
26686
26687  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26688
26689
26690###############################################################################
26691#
26692# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26693# native code.
26694#
26695###############################################################################
26696
26697# First determine the toolchain type (compiler family)
26698
26699
26700# Check whether --with-toolchain-type was given.
26701if test "${with_toolchain_type+set}" = set; then :
26702  withval=$with_toolchain_type;
26703fi
26704
26705
26706  # Use indirect variable referencing
26707  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26708  VALID_TOOLCHAINS=${!toolchain_var_name}
26709
26710  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26711    if test -n "$XCODEBUILD"; then
26712      # On Mac OS X, default toolchain to clang after Xcode 5
26713      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26714      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26715      if test $? -ne 0; then
26716        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26717      fi
26718      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26719          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26720          $CUT -f 1 -d .`
26721      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26722$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26723      if test $XCODE_MAJOR_VERSION -ge 5; then
26724          DEFAULT_TOOLCHAIN="clang"
26725      else
26726          DEFAULT_TOOLCHAIN="gcc"
26727      fi
26728    else
26729      # If Xcode is not installed, but the command line tools are
26730      # then we can't run xcodebuild. On these systems we should
26731      # default to clang
26732      DEFAULT_TOOLCHAIN="clang"
26733    fi
26734  else
26735    # First toolchain type in the list is the default
26736    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26737  fi
26738
26739  if test "x$with_toolchain_type" = xlist; then
26740    # List all toolchains
26741    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26742$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26743    for toolchain in $VALID_TOOLCHAINS; do
26744      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26745      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26746      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26747    done
26748
26749    exit 0
26750  elif test "x$with_toolchain_type" != x; then
26751    # User override; check that it is valid
26752    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26753      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26754$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26755      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26756$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26757      as_fn_error $? "Cannot continue." "$LINENO" 5
26758    fi
26759    TOOLCHAIN_TYPE=$with_toolchain_type
26760  else
26761    # No flag given, use default
26762    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26763  fi
26764
26765
26766  TOOLCHAIN_CC_BINARY_clang="clang"
26767  TOOLCHAIN_CC_BINARY_gcc="gcc"
26768  TOOLCHAIN_CC_BINARY_microsoft="cl"
26769  TOOLCHAIN_CC_BINARY_solstudio="cc"
26770  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26771
26772  TOOLCHAIN_CXX_BINARY_clang="clang++"
26773  TOOLCHAIN_CXX_BINARY_gcc="g++"
26774  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26775  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26776  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26777
26778  # Use indirect variable referencing
26779  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26780  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26781  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26782  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26783  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26784  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26785
26786
26787  # Define filename patterns
26788  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26789    LIBRARY_PREFIX=
26790    SHARED_LIBRARY_SUFFIX='.dll'
26791    STATIC_LIBRARY_SUFFIX='.lib'
26792    SHARED_LIBRARY='$1.dll'
26793    STATIC_LIBRARY='$1.lib'
26794    OBJ_SUFFIX='.obj'
26795    EXE_SUFFIX='.exe'
26796  else
26797    LIBRARY_PREFIX=lib
26798    SHARED_LIBRARY_SUFFIX='.so'
26799    STATIC_LIBRARY_SUFFIX='.a'
26800    SHARED_LIBRARY='lib$1.so'
26801    STATIC_LIBRARY='lib$1.a'
26802    OBJ_SUFFIX='.o'
26803    EXE_SUFFIX=''
26804    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26805      SHARED_LIBRARY='lib$1.dylib'
26806      SHARED_LIBRARY_SUFFIX='.dylib'
26807    fi
26808  fi
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26820    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26821$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26822  else
26823    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26824$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26825  fi
26826
26827
26828# Then detect the actual binaries needed
26829
26830  # FIXME: Is this needed?
26831  ac_ext=cpp
26832ac_cpp='$CXXCPP $CPPFLAGS'
26833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26836
26837
26838  # Store the CFLAGS etc passed to the configure script.
26839  ORG_CFLAGS="$CFLAGS"
26840  ORG_CXXFLAGS="$CXXFLAGS"
26841
26842  # autoconf magic only relies on PATH, so update it if tools dir is specified
26843  OLD_PATH="$PATH"
26844
26845  # On Windows, we need to detect the visual studio installation first.
26846  # This will change the PATH, but we need to keep that new PATH even
26847  # after toolchain detection is done, since the compiler (on x86) uses
26848  # it for DLL resolution in runtime.
26849  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26850      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26851
26852  # Store path to cygwin link.exe to help excluding it when searching for
26853  # VS linker. This must be done before changing the PATH when looking for VS.
26854  # Extract the first word of "link", so it can be a program name with args.
26855set dummy link; ac_word=$2
26856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26857$as_echo_n "checking for $ac_word... " >&6; }
26858if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26859  $as_echo_n "(cached) " >&6
26860else
26861  case $CYGWIN_LINK in
26862  [\\/]* | ?:[\\/]*)
26863  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26864  ;;
26865  *)
26866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26867for as_dir in $PATH
26868do
26869  IFS=$as_save_IFS
26870  test -z "$as_dir" && as_dir=.
26871    for ac_exec_ext in '' $ac_executable_extensions; do
26872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26873    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26875    break 2
26876  fi
26877done
26878  done
26879IFS=$as_save_IFS
26880
26881  ;;
26882esac
26883fi
26884CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26885if test -n "$CYGWIN_LINK"; then
26886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26887$as_echo "$CYGWIN_LINK" >&6; }
26888else
26889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26890$as_echo "no" >&6; }
26891fi
26892
26893
26894  if test "x$CYGWIN_LINK" != x; then
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26896$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26897    "$CYGWIN_LINK" --version > /dev/null
26898    if test $? -eq 0 ; then
26899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26900$as_echo "yes" >&6; }
26901    else
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26903$as_echo "no" >&6; }
26904      # This might be the VS linker. Don't exclude it later on.
26905      CYGWIN_LINK=""
26906    fi
26907  fi
26908
26909  # First-hand choice is to locate and run the vsvars bat file.
26910
26911
26912# Check whether --with-toolchain-version was given.
26913if test "${with_toolchain_version+set}" = set; then :
26914  withval=$with_toolchain_version;
26915fi
26916
26917
26918  if test "x$with_toolchain_version" = xlist; then
26919    # List all toolchains
26920    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26921$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26922    for version in $VALID_VS_VERSIONS; do
26923      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26924      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26925    done
26926
26927    exit 0
26928  elif test "x$DEVKIT_VS_VERSION" != x; then
26929    VS_VERSION=$DEVKIT_VS_VERSION
26930    TOOLCHAIN_VERSION=$VS_VERSION
26931    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26932    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26933    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26934    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26935    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26936    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26937
26938    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26939    # can still be exported as INCLUDE for compiler invocations without
26940    # SYSROOT_CFLAGS
26941    OLDIFS="$IFS"
26942    IFS=";"
26943    for i in $DEVKIT_VS_INCLUDE; do
26944      ipath=$i
26945
26946  unix_path="$ipath"
26947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26948    windows_path=`$CYGPATH -m "$unix_path"`
26949    ipath="$windows_path"
26950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26951    windows_path=`cmd //c echo $unix_path`
26952    ipath="$windows_path"
26953  fi
26954
26955      VS_INCLUDE="$VS_INCLUDE;$ipath"
26956    done
26957    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26958    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26959    for i in $DEVKIT_VS_LIB; do
26960      libpath=$i
26961
26962  unix_path="$libpath"
26963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964    windows_path=`$CYGPATH -m "$unix_path"`
26965    libpath="$windows_path"
26966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967    windows_path=`cmd //c echo $unix_path`
26968    libpath="$windows_path"
26969  fi
26970
26971      VS_LIB="$VS_LIB;$libpath"
26972    done
26973    IFS="$OLDIFS"
26974
26975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26976$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26977
26978  elif test "x$with_toolchain_version" != x; then
26979    # User override; check that it is valid
26980    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26981      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26982$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26983      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26984$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26985      as_fn_error $? "Cannot continue." "$LINENO" 5
26986    fi
26987    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26988  else
26989    # No flag given, use default
26990    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26991  fi
26992
26993  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26994
26995  VS_VERSION="$VS_VERSION"
26996  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26997  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26998  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26999  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27000
27001  # When using --with-tools-dir, assume it points to the correct and default
27002  # version of Visual Studio or that --with-toolchain-version was also set.
27003  if test "x$with_tools_dir" != x; then
27004
27005  if test "x$VS_ENV_CMD" = x; then
27006    VS_VERSION="${VS_VERSION}"
27007    VS_BASE="$with_tools_dir/../.."
27008    METHOD="--with-tools-dir"
27009
27010    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27011      VCVARSFILE="vc/bin/vcvars32.bat"
27012    else
27013      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27014    fi
27015
27016
27017  windows_path="$VS_BASE"
27018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27019    unix_path=`$CYGPATH -u "$windows_path"`
27020    VS_BASE="$unix_path"
27021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27023    VS_BASE="$unix_path"
27024  fi
27025
27026    if test -d "$VS_BASE"; then
27027      if test -f "$VS_BASE/$VCVARSFILE"; then
27028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27029$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27030        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27031        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27032        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27033        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27034      else
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27036$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27038$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27039      fi
27040    fi
27041  fi
27042
27043
27044  if test "x$VS_ENV_CMD" = x; then
27045    VS_VERSION="${VS_VERSION}"
27046    VS_BASE="$with_tools_dir/../../.."
27047    METHOD="--with-tools-dir"
27048
27049    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27050      VCVARSFILE="vc/bin/vcvars32.bat"
27051    else
27052      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27053    fi
27054
27055
27056  windows_path="$VS_BASE"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    VS_BASE="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    VS_BASE="$unix_path"
27063  fi
27064
27065    if test -d "$VS_BASE"; then
27066      if test -f "$VS_BASE/$VCVARSFILE"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27069        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27070        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27071        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27072        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27073      else
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27075$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27077$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27078      fi
27079    fi
27080  fi
27081
27082    if test "x$VS_ENV_CMD" = x; then
27083      # Having specified an argument which is incorrect will produce an instant failure;
27084      # we should not go on looking
27085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27086$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27087      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27088$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27089      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27090$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27091      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27092    fi
27093  fi
27094
27095  VS_ENV_CMD=""
27096  VS_ENV_ARGS=""
27097
27098  if test "x$VS_COMNTOOLS" != x; then
27099
27100  if test "x$VS_ENV_CMD" = x; then
27101    VS_VERSION="${VS_VERSION}"
27102    VS_BASE="$VS_COMNTOOLS/../.."
27103    METHOD="$VS_COMNTOOLS_VAR variable"
27104
27105    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27106      VCVARSFILE="vc/bin/vcvars32.bat"
27107    else
27108      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27109    fi
27110
27111
27112  windows_path="$VS_BASE"
27113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114    unix_path=`$CYGPATH -u "$windows_path"`
27115    VS_BASE="$unix_path"
27116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27118    VS_BASE="$unix_path"
27119  fi
27120
27121    if test -d "$VS_BASE"; then
27122      if test -f "$VS_BASE/$VCVARSFILE"; then
27123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27124$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27125        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27126        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27127        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27128        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27129      else
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27131$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27132        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27133$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27134      fi
27135    fi
27136  fi
27137
27138  fi
27139  if test "x$PROGRAMFILES" != x; then
27140
27141  if test "x$VS_ENV_CMD" = x; then
27142    VS_VERSION="${VS_VERSION}"
27143    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27144    METHOD="well-known name"
27145
27146    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27147      VCVARSFILE="vc/bin/vcvars32.bat"
27148    else
27149      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27150    fi
27151
27152
27153  windows_path="$VS_BASE"
27154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155    unix_path=`$CYGPATH -u "$windows_path"`
27156    VS_BASE="$unix_path"
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27159    VS_BASE="$unix_path"
27160  fi
27161
27162    if test -d "$VS_BASE"; then
27163      if test -f "$VS_BASE/$VCVARSFILE"; then
27164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27165$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27166        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27167        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27168        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27169        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27170      else
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27172$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27174$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27175      fi
27176    fi
27177  fi
27178
27179  fi
27180  # Work around the insanely named ProgramFiles(x86) env variable
27181  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27182  if test "x$PROGRAMFILES_X86" != x; then
27183
27184  if test "x$VS_ENV_CMD" = x; then
27185    VS_VERSION="${VS_VERSION}"
27186    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27187    METHOD="well-known name"
27188
27189    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27190      VCVARSFILE="vc/bin/vcvars32.bat"
27191    else
27192      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27193    fi
27194
27195
27196  windows_path="$VS_BASE"
27197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27198    unix_path=`$CYGPATH -u "$windows_path"`
27199    VS_BASE="$unix_path"
27200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27202    VS_BASE="$unix_path"
27203  fi
27204
27205    if test -d "$VS_BASE"; then
27206      if test -f "$VS_BASE/$VCVARSFILE"; then
27207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27208$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27209        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27210        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27211        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27212        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27213      else
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27215$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27217$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27218      fi
27219    fi
27220  fi
27221
27222  fi
27223
27224  if test "x$VS_ENV_CMD" = x; then
27225    VS_VERSION="${VS_VERSION}"
27226    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27227    METHOD="well-known name"
27228
27229    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27230      VCVARSFILE="vc/bin/vcvars32.bat"
27231    else
27232      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27233    fi
27234
27235
27236  windows_path="$VS_BASE"
27237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238    unix_path=`$CYGPATH -u "$windows_path"`
27239    VS_BASE="$unix_path"
27240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27242    VS_BASE="$unix_path"
27243  fi
27244
27245    if test -d "$VS_BASE"; then
27246      if test -f "$VS_BASE/$VCVARSFILE"; then
27247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27248$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27249        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27250        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27251        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27252        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27253      else
27254        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27255$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27257$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27258      fi
27259    fi
27260  fi
27261
27262
27263  if test "x$VS_ENV_CMD" = x; then
27264    VS_VERSION="${VS_VERSION}"
27265    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27266    METHOD="well-known name"
27267
27268    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27269      VCVARSFILE="vc/bin/vcvars32.bat"
27270    else
27271      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27272    fi
27273
27274
27275  windows_path="$VS_BASE"
27276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277    unix_path=`$CYGPATH -u "$windows_path"`
27278    VS_BASE="$unix_path"
27279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281    VS_BASE="$unix_path"
27282  fi
27283
27284    if test -d "$VS_BASE"; then
27285      if test -f "$VS_BASE/$VCVARSFILE"; then
27286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27287$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27288        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27289        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27290        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27291        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27292      else
27293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27294$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27295        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27296$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27297      fi
27298    fi
27299  fi
27300
27301
27302  if test "x$SDK_INSTALL_DIR" != x; then
27303    if test "x$ProgramW6432" != x; then
27304
27305  if test "x$VS_ENV_CMD" = x; then
27306    VS_VERSION="${VS_VERSION}"
27307    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27308    METHOD="well-known name"
27309
27310  windows_path="$WIN_SDK_BASE"
27311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27312    unix_path=`$CYGPATH -u "$windows_path"`
27313    WIN_SDK_BASE="$unix_path"
27314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27316    WIN_SDK_BASE="$unix_path"
27317  fi
27318
27319    if test -d "$WIN_SDK_BASE"; then
27320      # There have been cases of partial or broken SDK installations. A missing
27321      # lib dir is not going to work.
27322      if test ! -d "$WIN_SDK_BASE/lib"; then
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27324$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27325        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27326$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27327      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27329$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27330        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27331        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27332          VS_ENV_ARGS="/x86"
27333        else
27334          VS_ENV_ARGS="/x64"
27335        fi
27336        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27337        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27338        # TODO: improve detection for other versions of SDK
27339        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27340      else
27341        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27342$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27344$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27345      fi
27346    fi
27347  fi
27348
27349    fi
27350    if test "x$PROGRAMW6432" != x; then
27351
27352  if test "x$VS_ENV_CMD" = x; then
27353    VS_VERSION="${VS_VERSION}"
27354    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27355    METHOD="well-known name"
27356
27357  windows_path="$WIN_SDK_BASE"
27358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27359    unix_path=`$CYGPATH -u "$windows_path"`
27360    WIN_SDK_BASE="$unix_path"
27361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27363    WIN_SDK_BASE="$unix_path"
27364  fi
27365
27366    if test -d "$WIN_SDK_BASE"; then
27367      # There have been cases of partial or broken SDK installations. A missing
27368      # lib dir is not going to work.
27369      if test ! -d "$WIN_SDK_BASE/lib"; then
27370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27371$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27372        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27373$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27374      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27376$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27377        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27378        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27379          VS_ENV_ARGS="/x86"
27380        else
27381          VS_ENV_ARGS="/x64"
27382        fi
27383        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27384        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27385        # TODO: improve detection for other versions of SDK
27386        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27387      else
27388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27389$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27391$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27392      fi
27393    fi
27394  fi
27395
27396    fi
27397    if test "x$PROGRAMFILES" != x; then
27398
27399  if test "x$VS_ENV_CMD" = x; then
27400    VS_VERSION="${VS_VERSION}"
27401    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27402    METHOD="well-known name"
27403
27404  windows_path="$WIN_SDK_BASE"
27405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27406    unix_path=`$CYGPATH -u "$windows_path"`
27407    WIN_SDK_BASE="$unix_path"
27408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27410    WIN_SDK_BASE="$unix_path"
27411  fi
27412
27413    if test -d "$WIN_SDK_BASE"; then
27414      # There have been cases of partial or broken SDK installations. A missing
27415      # lib dir is not going to work.
27416      if test ! -d "$WIN_SDK_BASE/lib"; then
27417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27418$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27420$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27421      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27422        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27423$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27424        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27425        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27426          VS_ENV_ARGS="/x86"
27427        else
27428          VS_ENV_ARGS="/x64"
27429        fi
27430        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27431        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27432        # TODO: improve detection for other versions of SDK
27433        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27434      else
27435        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27436$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27437        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27438$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27439      fi
27440    fi
27441  fi
27442
27443    fi
27444
27445  if test "x$VS_ENV_CMD" = x; then
27446    VS_VERSION="${VS_VERSION}"
27447    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27448    METHOD="well-known name"
27449
27450  windows_path="$WIN_SDK_BASE"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    WIN_SDK_BASE="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    WIN_SDK_BASE="$unix_path"
27457  fi
27458
27459    if test -d "$WIN_SDK_BASE"; then
27460      # There have been cases of partial or broken SDK installations. A missing
27461      # lib dir is not going to work.
27462      if test ! -d "$WIN_SDK_BASE/lib"; then
27463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27464$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27465        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27466$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27467      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27468        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27469$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27470        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27471        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27472          VS_ENV_ARGS="/x86"
27473        else
27474          VS_ENV_ARGS="/x64"
27475        fi
27476        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27477        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27478        # TODO: improve detection for other versions of SDK
27479        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27480      else
27481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27482$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27483        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27484$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27485      fi
27486    fi
27487  fi
27488
27489
27490  if test "x$VS_ENV_CMD" = x; then
27491    VS_VERSION="${VS_VERSION}"
27492    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27493    METHOD="well-known name"
27494
27495  windows_path="$WIN_SDK_BASE"
27496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497    unix_path=`$CYGPATH -u "$windows_path"`
27498    WIN_SDK_BASE="$unix_path"
27499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27501    WIN_SDK_BASE="$unix_path"
27502  fi
27503
27504    if test -d "$WIN_SDK_BASE"; then
27505      # There have been cases of partial or broken SDK installations. A missing
27506      # lib dir is not going to work.
27507      if test ! -d "$WIN_SDK_BASE/lib"; then
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27509$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27510        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27511$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27512      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27514$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27515        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27516        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27517          VS_ENV_ARGS="/x86"
27518        else
27519          VS_ENV_ARGS="/x64"
27520        fi
27521        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27522        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27523        # TODO: improve detection for other versions of SDK
27524        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27525      else
27526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27529$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27530      fi
27531    fi
27532  fi
27533
27534  fi
27535
27536    if test "x$VS_ENV_CMD" != x; then
27537      TOOLCHAIN_VERSION=$VS_VERSION
27538      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27539      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27540      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27541      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27542      # The rest of the variables are already evaled while probing
27543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27544$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27545      break
27546    fi
27547  done
27548
27549
27550  # If we have a devkit, skip all of the below.
27551  if test "x$DEVKIT_VS_VERSION" = x; then
27552    if test "x$VS_ENV_CMD" != x; then
27553      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27554
27555  # Only process if variable expands to non-empty
27556
27557  if test "x$VS_ENV_CMD" != x; then
27558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27559
27560  # First separate the path from the arguments. This will split at the first
27561  # space.
27562  complete="$VS_ENV_CMD"
27563  path="${complete%% *}"
27564  tmp="$complete EOL"
27565  arguments="${tmp#* }"
27566
27567  # Input might be given as Windows format, start by converting to
27568  # unix format.
27569  new_path=`$CYGPATH -u "$path"`
27570
27571  # Now try to locate executable using which
27572  new_path=`$WHICH "$new_path" 2> /dev/null`
27573  # bat and cmd files are not always considered executable in cygwin causing which
27574  # to not find them
27575  if test "x$new_path" = x \
27576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27578    new_path=`$CYGPATH -u "$path"`
27579  fi
27580  if test "x$new_path" = x; then
27581    # Oops. Which didn't find the executable.
27582    # The splitting of arguments from the executable at a space might have been incorrect,
27583    # since paths with space are more likely in Windows. Give it another try with the whole
27584    # argument.
27585    path="$complete"
27586    arguments="EOL"
27587    new_path=`$CYGPATH -u "$path"`
27588    new_path=`$WHICH "$new_path" 2> /dev/null`
27589    # bat and cmd files are not always considered executable in cygwin causing which
27590    # to not find them
27591    if test "x$new_path" = x \
27592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27594      new_path=`$CYGPATH -u "$path"`
27595    fi
27596    if test "x$new_path" = x; then
27597      # It's still not found. Now this is an unrecoverable error.
27598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27599$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27600      has_space=`$ECHO "$complete" | $GREP " "`
27601      if test "x$has_space" != x; then
27602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27604      fi
27605      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27606    fi
27607  fi
27608
27609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27612  # "foo.exe" is OK but "foo" is an error.
27613  #
27614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27615  # It is also a way to make sure we got the proper file name for the real test later on.
27616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27617  if test "x$test_shortpath" = x; then
27618    # Short path failed, file does not exist as specified.
27619    # Try adding .exe or .cmd
27620    if test -f "${new_path}.exe"; then
27621      input_to_shortpath="${new_path}.exe"
27622    elif test -f "${new_path}.cmd"; then
27623      input_to_shortpath="${new_path}.cmd"
27624    else
27625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27626$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27629      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27630    fi
27631  else
27632    input_to_shortpath="$new_path"
27633  fi
27634
27635  # Call helper function which possibly converts this using DOS-style short mode.
27636  # If so, the updated path is stored in $new_path.
27637  new_path="$input_to_shortpath"
27638
27639  input_path="$input_to_shortpath"
27640  # Check if we need to convert this using DOS-style short mode. If the path
27641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27642  # take no chances and rewrite it.
27643  # Note: m4 eats our [], so we need to use [ and ] instead.
27644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27645  if test "x$has_forbidden_chars" != x; then
27646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27650      # Going to short mode and back again did indeed matter. Since short mode is
27651      # case insensitive, let's make it lowercase to improve readability.
27652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27653      # Now convert it back to Unix-style (cygpath)
27654      input_path=`$CYGPATH -u "$shortmode_path"`
27655      new_path="$input_path"
27656    fi
27657  fi
27658
27659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27660  if test "x$test_cygdrive_prefix" = x; then
27661    # As a simple fix, exclude /usr/bin since it's not a real path.
27662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27664      # a path prefixed by /cygdrive for fixpath to work.
27665      new_path="$CYGWIN_ROOT_PATH$input_path"
27666    fi
27667  fi
27668
27669  # remove trailing .exe if any
27670  new_path="${new_path/%.exe/}"
27671
27672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673
27674  # First separate the path from the arguments. This will split at the first
27675  # space.
27676  complete="$VS_ENV_CMD"
27677  path="${complete%% *}"
27678  tmp="$complete EOL"
27679  arguments="${tmp#* }"
27680
27681  # Input might be given as Windows format, start by converting to
27682  # unix format.
27683  new_path="$path"
27684
27685  windows_path="$new_path"
27686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27687    unix_path=`$CYGPATH -u "$windows_path"`
27688    new_path="$unix_path"
27689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27691    new_path="$unix_path"
27692  fi
27693
27694
27695  # Now try to locate executable using which
27696  new_path=`$WHICH "$new_path" 2> /dev/null`
27697
27698  if test "x$new_path" = x; then
27699    # Oops. Which didn't find the executable.
27700    # The splitting of arguments from the executable at a space might have been incorrect,
27701    # since paths with space are more likely in Windows. Give it another try with the whole
27702    # argument.
27703    path="$complete"
27704    arguments="EOL"
27705    new_path="$path"
27706
27707  windows_path="$new_path"
27708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27709    unix_path=`$CYGPATH -u "$windows_path"`
27710    new_path="$unix_path"
27711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27713    new_path="$unix_path"
27714  fi
27715
27716
27717    new_path=`$WHICH "$new_path" 2> /dev/null`
27718    # bat and cmd files are not always considered executable in MSYS causing which
27719    # to not find them
27720    if test "x$new_path" = x \
27721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27723      new_path="$path"
27724
27725  windows_path="$new_path"
27726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727    unix_path=`$CYGPATH -u "$windows_path"`
27728    new_path="$unix_path"
27729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27731    new_path="$unix_path"
27732  fi
27733
27734    fi
27735
27736    if test "x$new_path" = x; then
27737      # It's still not found. Now this is an unrecoverable error.
27738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27739$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27740      has_space=`$ECHO "$complete" | $GREP " "`
27741      if test "x$has_space" != x; then
27742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27744      fi
27745      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27746    fi
27747  fi
27748
27749  # Now new_path has a complete unix path to the binary
27750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27751    # Keep paths in /bin as-is, but remove trailing .exe if any
27752    new_path="${new_path/%.exe/}"
27753    # Do not save /bin paths to all_fixpath_prefixes!
27754  else
27755    # Not in mixed or Windows style, start by that.
27756    new_path=`cmd //c echo $new_path`
27757
27758  input_path="$new_path"
27759  # Check if we need to convert this using DOS-style short mode. If the path
27760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27761  # take no chances and rewrite it.
27762  # Note: m4 eats our [], so we need to use [ and ] instead.
27763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27764  if test "x$has_forbidden_chars" != x; then
27765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27767  fi
27768
27769    # Output is in $new_path
27770
27771  windows_path="$new_path"
27772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773    unix_path=`$CYGPATH -u "$windows_path"`
27774    new_path="$unix_path"
27775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777    new_path="$unix_path"
27778  fi
27779
27780    # remove trailing .exe if any
27781    new_path="${new_path/%.exe/}"
27782
27783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27785  fi
27786
27787    else
27788      # We're on a unix platform. Hooray! :)
27789      # First separate the path from the arguments. This will split at the first
27790      # space.
27791      complete="$VS_ENV_CMD"
27792      path="${complete%% *}"
27793      tmp="$complete EOL"
27794      arguments="${tmp#* }"
27795
27796      # Cannot rely on the command "which" here since it doesn't always work.
27797      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27798      if test -z "$is_absolute_path"; then
27799        # Path to executable is not absolute. Find it.
27800        IFS_save="$IFS"
27801        IFS=:
27802        for p in $PATH; do
27803          if test -f "$p/$path" && test -x "$p/$path"; then
27804            new_path="$p/$path"
27805            break
27806          fi
27807        done
27808        IFS="$IFS_save"
27809      else
27810        # This is an absolute path, we can use it without further modifications.
27811        new_path="$path"
27812      fi
27813
27814      if test "x$new_path" = x; then
27815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27816$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27817        has_space=`$ECHO "$complete" | $GREP " "`
27818        if test "x$has_space" != x; then
27819          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27821        fi
27822        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27823      fi
27824    fi
27825
27826    # Now join together the path and the arguments once again
27827    if test "x$arguments" != xEOL; then
27828      new_complete="$new_path ${arguments% *}"
27829    else
27830      new_complete="$new_path"
27831    fi
27832
27833    if test "x$complete" != "x$new_complete"; then
27834      VS_ENV_CMD="$new_complete"
27835      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27836$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27837    fi
27838  fi
27839
27840
27841      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27842      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27843$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27844
27845      # We need to create a couple of temporary files.
27846      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27847      $MKDIR -p $VS_ENV_TMP_DIR
27848
27849      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27850      # Instead create a shell script which will set the relevant variables when run.
27851      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27852
27853  unix_path="$WINPATH_VS_ENV_CMD"
27854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855    windows_path=`$CYGPATH -m "$unix_path"`
27856    WINPATH_VS_ENV_CMD="$windows_path"
27857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858    windows_path=`cmd //c echo $unix_path`
27859    WINPATH_VS_ENV_CMD="$windows_path"
27860  fi
27861
27862      WINPATH_BASH="$BASH"
27863
27864  unix_path="$WINPATH_BASH"
27865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27866    windows_path=`$CYGPATH -m "$unix_path"`
27867    WINPATH_BASH="$windows_path"
27868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27869    windows_path=`cmd //c echo $unix_path`
27870    WINPATH_BASH="$windows_path"
27871  fi
27872
27873
27874      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27875      # script (executable by bash) that will setup the important variables.
27876      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27877      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27878      # This will end up something like:
27879      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27880      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27881      # These will end up something like:
27882      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27883      # The trailing space for everyone except PATH is no typo, but is needed due
27884      # to trailing \ in the Windows paths. These will be stripped later.
27885      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27886          >> $EXTRACT_VC_ENV_BAT_FILE
27887      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27888          >> $EXTRACT_VC_ENV_BAT_FILE
27889      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27890          >> $EXTRACT_VC_ENV_BAT_FILE
27891      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27892          >> $EXTRACT_VC_ENV_BAT_FILE
27893      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27894          >> $EXTRACT_VC_ENV_BAT_FILE
27895      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27896          >> $EXTRACT_VC_ENV_BAT_FILE
27897
27898      # Now execute the newly created bat file.
27899      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27900      # Change directory so we don't need to mess with Windows paths in redirects.
27901      cd $VS_ENV_TMP_DIR
27902      cmd /c extract-vs-env.bat | $CAT
27903      cd $CURDIR
27904
27905      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27907$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27908        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27909$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27911$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27912        as_fn_error $? "Cannot continue" "$LINENO" 5
27913      fi
27914
27915      # Now set all paths and other env variables. This will allow the rest of
27916      # the configure script to find and run the compiler in the proper way.
27917      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27918$as_echo "$as_me: Setting extracted environment variables" >&6;}
27919      . $VS_ENV_TMP_DIR/set-vs-env.sh
27920      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27921      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27922    else
27923      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27924      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27925$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27926    fi
27927  fi
27928
27929  # At this point, we should have correct variables in the environment, or we can't continue.
27930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27931$as_echo_n "checking for Visual Studio variables... " >&6; }
27932
27933  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27934      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27935    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27937$as_echo "present but broken" >&6; }
27938      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27939    else
27940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27941$as_echo "ok" >&6; }
27942      # Remove any trailing "\" ";" and " " from the variables.
27943      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27944      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27945      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27946      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27947      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27948      # Remove any paths containing # (typically F#) as that messes up make. This
27949      # is needed if visual studio was installed with F# support.
27950      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27951
27952
27953
27954
27955
27956      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27957      OLDIFS="$IFS"
27958      IFS=";"
27959      for i in $VS_INCLUDE; do
27960        ipath=$i
27961        # Only process non-empty elements
27962        if test "x$ipath" != x; then
27963          IFS="$OLDIFS"
27964          # Check that directory exists before calling fixup_path
27965          testpath=$ipath
27966
27967  windows_path="$testpath"
27968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969    unix_path=`$CYGPATH -u "$windows_path"`
27970    testpath="$unix_path"
27971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27973    testpath="$unix_path"
27974  fi
27975
27976          if test -d "$testpath"; then
27977
27978  # Only process if variable expands to non-empty
27979
27980  if test "x$ipath" != x; then
27981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27982
27983  # Input might be given as Windows format, start by converting to
27984  # unix format.
27985  path="$ipath"
27986  new_path=`$CYGPATH -u "$path"`
27987
27988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27991  # "foo.exe" is OK but "foo" is an error.
27992  #
27993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27994  # It is also a way to make sure we got the proper file name for the real test later on.
27995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27996  if test "x$test_shortpath" = x; then
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27998$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27999    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28000  fi
28001
28002  # Call helper function which possibly converts this using DOS-style short mode.
28003  # If so, the updated path is stored in $new_path.
28004
28005  input_path="$new_path"
28006  # Check if we need to convert this using DOS-style short mode. If the path
28007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28008  # take no chances and rewrite it.
28009  # Note: m4 eats our [], so we need to use [ and ] instead.
28010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28011  if test "x$has_forbidden_chars" != x; then
28012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28016      # Going to short mode and back again did indeed matter. Since short mode is
28017      # case insensitive, let's make it lowercase to improve readability.
28018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28019      # Now convert it back to Unix-style (cygpath)
28020      input_path=`$CYGPATH -u "$shortmode_path"`
28021      new_path="$input_path"
28022    fi
28023  fi
28024
28025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28026  if test "x$test_cygdrive_prefix" = x; then
28027    # As a simple fix, exclude /usr/bin since it's not a real path.
28028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28030      # a path prefixed by /cygdrive for fixpath to work.
28031      new_path="$CYGWIN_ROOT_PATH$input_path"
28032    fi
28033  fi
28034
28035
28036  if test "x$path" != "x$new_path"; then
28037    ipath="$new_path"
28038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28039$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28040  fi
28041
28042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28043
28044  path="$ipath"
28045  has_colon=`$ECHO $path | $GREP ^.:`
28046  new_path="$path"
28047  if test "x$has_colon" = x; then
28048    # Not in mixed or Windows style, start by that.
28049    new_path=`cmd //c echo $path`
28050  fi
28051
28052
28053  input_path="$new_path"
28054  # Check if we need to convert this using DOS-style short mode. If the path
28055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28056  # take no chances and rewrite it.
28057  # Note: m4 eats our [], so we need to use [ and ] instead.
28058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28059  if test "x$has_forbidden_chars" != x; then
28060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28062  fi
28063
28064
28065  windows_path="$new_path"
28066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28067    unix_path=`$CYGPATH -u "$windows_path"`
28068    new_path="$unix_path"
28069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28071    new_path="$unix_path"
28072  fi
28073
28074  if test "x$path" != "x$new_path"; then
28075    ipath="$new_path"
28076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28077$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28078  fi
28079
28080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28082
28083    else
28084      # We're on a unix platform. Hooray! :)
28085      path="$ipath"
28086      has_space=`$ECHO "$path" | $GREP " "`
28087      if test "x$has_space" != x; then
28088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28089$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28091      fi
28092
28093      # Use eval to expand a potential ~
28094      eval path="$path"
28095      if test ! -f "$path" && test ! -d "$path"; then
28096        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28097      fi
28098
28099      ipath="`cd "$path"; $THEPWDCMD -L`"
28100    fi
28101  fi
28102
28103            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28104          fi
28105          IFS=";"
28106        fi
28107      done
28108      # Convert VS_LIB into SYSROOT_LDFLAGS
28109      for i in $VS_LIB; do
28110        libpath=$i
28111        # Only process non-empty elements
28112        if test "x$libpath" != x; then
28113          IFS="$OLDIFS"
28114          # Check that directory exists before calling fixup_path
28115          testpath=$libpath
28116
28117  windows_path="$testpath"
28118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28119    unix_path=`$CYGPATH -u "$windows_path"`
28120    testpath="$unix_path"
28121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28123    testpath="$unix_path"
28124  fi
28125
28126          if test -d "$testpath"; then
28127
28128  # Only process if variable expands to non-empty
28129
28130  if test "x$libpath" != x; then
28131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132
28133  # Input might be given as Windows format, start by converting to
28134  # unix format.
28135  path="$libpath"
28136  new_path=`$CYGPATH -u "$path"`
28137
28138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28141  # "foo.exe" is OK but "foo" is an error.
28142  #
28143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28144  # It is also a way to make sure we got the proper file name for the real test later on.
28145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28146  if test "x$test_shortpath" = x; then
28147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28148$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28149    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28150  fi
28151
28152  # Call helper function which possibly converts this using DOS-style short mode.
28153  # If so, the updated path is stored in $new_path.
28154
28155  input_path="$new_path"
28156  # Check if we need to convert this using DOS-style short mode. If the path
28157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28158  # take no chances and rewrite it.
28159  # Note: m4 eats our [], so we need to use [ and ] instead.
28160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28161  if test "x$has_forbidden_chars" != x; then
28162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28166      # Going to short mode and back again did indeed matter. Since short mode is
28167      # case insensitive, let's make it lowercase to improve readability.
28168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28169      # Now convert it back to Unix-style (cygpath)
28170      input_path=`$CYGPATH -u "$shortmode_path"`
28171      new_path="$input_path"
28172    fi
28173  fi
28174
28175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28176  if test "x$test_cygdrive_prefix" = x; then
28177    # As a simple fix, exclude /usr/bin since it's not a real path.
28178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28180      # a path prefixed by /cygdrive for fixpath to work.
28181      new_path="$CYGWIN_ROOT_PATH$input_path"
28182    fi
28183  fi
28184
28185
28186  if test "x$path" != "x$new_path"; then
28187    libpath="$new_path"
28188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28189$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28190  fi
28191
28192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  path="$libpath"
28195  has_colon=`$ECHO $path | $GREP ^.:`
28196  new_path="$path"
28197  if test "x$has_colon" = x; then
28198    # Not in mixed or Windows style, start by that.
28199    new_path=`cmd //c echo $path`
28200  fi
28201
28202
28203  input_path="$new_path"
28204  # Check if we need to convert this using DOS-style short mode. If the path
28205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28206  # take no chances and rewrite it.
28207  # Note: m4 eats our [], so we need to use [ and ] instead.
28208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28209  if test "x$has_forbidden_chars" != x; then
28210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28212  fi
28213
28214
28215  windows_path="$new_path"
28216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217    unix_path=`$CYGPATH -u "$windows_path"`
28218    new_path="$unix_path"
28219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28221    new_path="$unix_path"
28222  fi
28223
28224  if test "x$path" != "x$new_path"; then
28225    libpath="$new_path"
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28227$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28228  fi
28229
28230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232
28233    else
28234      # We're on a unix platform. Hooray! :)
28235      path="$libpath"
28236      has_space=`$ECHO "$path" | $GREP " "`
28237      if test "x$has_space" != x; then
28238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28239$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28241      fi
28242
28243      # Use eval to expand a potential ~
28244      eval path="$path"
28245      if test ! -f "$path" && test ! -d "$path"; then
28246        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28247      fi
28248
28249      libpath="`cd "$path"; $THEPWDCMD -L`"
28250    fi
28251  fi
28252
28253            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28254          fi
28255          IFS=";"
28256        fi
28257      done
28258      IFS="$OLDIFS"
28259    fi
28260  else
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28262$as_echo "not found" >&6; }
28263
28264    if test "x$VS_ENV_CMD" = x; then
28265      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28266$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28267      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28268$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28269    else
28270      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28271$as_echo "$as_me: Running the extraction script failed." >&6;}
28272    fi
28273    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28274$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28275    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28276$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28277    as_fn_error $? "Cannot continue" "$LINENO" 5
28278  fi
28279
28280    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28281    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28282    PATH="$VS_PATH"
28283    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28284    export INCLUDE="$VS_INCLUDE"
28285    export LIB="$VS_LIB"
28286  fi
28287
28288  # For solaris we really need solaris tools, and not the GNU equivalent.
28289  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28290  # so add that to path before starting to probe.
28291  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28292  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28293    PATH="/usr/ccs/bin:$PATH"
28294  fi
28295
28296  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28297  # override all other locations.
28298  if test "x$TOOLCHAIN_PATH" != x; then
28299    PATH=$TOOLCHAIN_PATH:$PATH
28300  fi
28301
28302
28303  #
28304  # Setup the compilers (CC and CXX)
28305  #
28306
28307  COMPILER_NAME=C
28308  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28309
28310  if test "x$CC" != x; then
28311    # User has supplied compiler name already, always let that override.
28312    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28313$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28314    if test "x`basename $CC`" = "x$CC"; then
28315      # A command without a complete path is provided, search $PATH.
28316
28317      for ac_prog in $CC
28318do
28319  # Extract the first word of "$ac_prog", so it can be a program name with args.
28320set dummy $ac_prog; ac_word=$2
28321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28322$as_echo_n "checking for $ac_word... " >&6; }
28323if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28324  $as_echo_n "(cached) " >&6
28325else
28326  case $POTENTIAL_CC in
28327  [\\/]* | ?:[\\/]*)
28328  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28329  ;;
28330  *)
28331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28332for as_dir in $PATH
28333do
28334  IFS=$as_save_IFS
28335  test -z "$as_dir" && as_dir=.
28336    for ac_exec_ext in '' $ac_executable_extensions; do
28337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28338    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28340    break 2
28341  fi
28342done
28343  done
28344IFS=$as_save_IFS
28345
28346  ;;
28347esac
28348fi
28349POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28350if test -n "$POTENTIAL_CC"; then
28351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28352$as_echo "$POTENTIAL_CC" >&6; }
28353else
28354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28355$as_echo "no" >&6; }
28356fi
28357
28358
28359  test -n "$POTENTIAL_CC" && break
28360done
28361
28362      if test "x$POTENTIAL_CC" != x; then
28363        CC=$POTENTIAL_CC
28364      else
28365        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28366      fi
28367    else
28368      # Otherwise it might already be a complete path
28369      if test ! -x "$CC"; then
28370        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28371      fi
28372    fi
28373  else
28374    # No user supplied value. Locate compiler ourselves.
28375
28376    # If we are cross compiling, assume cross compilation tools follows the
28377    # cross compilation standard where they are prefixed with the autoconf
28378    # standard name for the target. For example the binary
28379    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28380    # If we are not cross compiling, then the default compiler name will be
28381    # used.
28382
28383    CC=
28384    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28385    # before checking the rest of the PATH.
28386    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28387    # step, this should not be necessary.
28388    if test -n "$TOOLCHAIN_PATH"; then
28389      PATH_save="$PATH"
28390      PATH="$TOOLCHAIN_PATH"
28391      for ac_prog in $SEARCH_LIST
28392do
28393  # Extract the first word of "$ac_prog", so it can be a program name with args.
28394set dummy $ac_prog; ac_word=$2
28395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28396$as_echo_n "checking for $ac_word... " >&6; }
28397if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28398  $as_echo_n "(cached) " >&6
28399else
28400  case $TOOLCHAIN_PATH_CC in
28401  [\\/]* | ?:[\\/]*)
28402  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28403  ;;
28404  *)
28405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28406for as_dir in $PATH
28407do
28408  IFS=$as_save_IFS
28409  test -z "$as_dir" && as_dir=.
28410    for ac_exec_ext in '' $ac_executable_extensions; do
28411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28412    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28414    break 2
28415  fi
28416done
28417  done
28418IFS=$as_save_IFS
28419
28420  ;;
28421esac
28422fi
28423TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28424if test -n "$TOOLCHAIN_PATH_CC"; then
28425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28426$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28427else
28428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28429$as_echo "no" >&6; }
28430fi
28431
28432
28433  test -n "$TOOLCHAIN_PATH_CC" && break
28434done
28435
28436      CC=$TOOLCHAIN_PATH_CC
28437      PATH="$PATH_save"
28438    fi
28439
28440    # AC_PATH_PROGS can't be run multiple times with the same variable,
28441    # so create a new name for this run.
28442    if test "x$CC" = x; then
28443      for ac_prog in $SEARCH_LIST
28444do
28445  # Extract the first word of "$ac_prog", so it can be a program name with args.
28446set dummy $ac_prog; ac_word=$2
28447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28448$as_echo_n "checking for $ac_word... " >&6; }
28449if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28450  $as_echo_n "(cached) " >&6
28451else
28452  case $POTENTIAL_CC in
28453  [\\/]* | ?:[\\/]*)
28454  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28455  ;;
28456  *)
28457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28458for as_dir in $PATH
28459do
28460  IFS=$as_save_IFS
28461  test -z "$as_dir" && as_dir=.
28462    for ac_exec_ext in '' $ac_executable_extensions; do
28463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28464    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28466    break 2
28467  fi
28468done
28469  done
28470IFS=$as_save_IFS
28471
28472  ;;
28473esac
28474fi
28475POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28476if test -n "$POTENTIAL_CC"; then
28477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28478$as_echo "$POTENTIAL_CC" >&6; }
28479else
28480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28481$as_echo "no" >&6; }
28482fi
28483
28484
28485  test -n "$POTENTIAL_CC" && break
28486done
28487
28488      CC=$POTENTIAL_CC
28489    fi
28490
28491    if test "x$CC" = x; then
28492
28493  # Print a helpful message on how to acquire the necessary build dependency.
28494  # devkit is the help tag: freetype, cups, pulse, alsa etc
28495  MISSING_DEPENDENCY=devkit
28496
28497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28498    cygwin_help $MISSING_DEPENDENCY
28499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28500    msys_help $MISSING_DEPENDENCY
28501  else
28502    PKGHANDLER_COMMAND=
28503
28504    case $PKGHANDLER in
28505      apt-get)
28506        apt_help     $MISSING_DEPENDENCY ;;
28507      yum)
28508        yum_help     $MISSING_DEPENDENCY ;;
28509      port)
28510        port_help    $MISSING_DEPENDENCY ;;
28511      pkgutil)
28512        pkgutil_help $MISSING_DEPENDENCY ;;
28513      pkgadd)
28514        pkgadd_help  $MISSING_DEPENDENCY ;;
28515    esac
28516
28517    if test "x$PKGHANDLER_COMMAND" != x; then
28518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28519    fi
28520  fi
28521
28522      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28523    fi
28524  fi
28525
28526  # Now we have a compiler binary in CC. Make sure it's okay.
28527
28528  # Only process if variable expands to non-empty
28529
28530  if test "x$CC" != x; then
28531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28532
28533  # First separate the path from the arguments. This will split at the first
28534  # space.
28535  complete="$CC"
28536  path="${complete%% *}"
28537  tmp="$complete EOL"
28538  arguments="${tmp#* }"
28539
28540  # Input might be given as Windows format, start by converting to
28541  # unix format.
28542  new_path=`$CYGPATH -u "$path"`
28543
28544  # Now try to locate executable using which
28545  new_path=`$WHICH "$new_path" 2> /dev/null`
28546  # bat and cmd files are not always considered executable in cygwin causing which
28547  # to not find them
28548  if test "x$new_path" = x \
28549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28551    new_path=`$CYGPATH -u "$path"`
28552  fi
28553  if test "x$new_path" = x; then
28554    # Oops. Which didn't find the executable.
28555    # The splitting of arguments from the executable at a space might have been incorrect,
28556    # since paths with space are more likely in Windows. Give it another try with the whole
28557    # argument.
28558    path="$complete"
28559    arguments="EOL"
28560    new_path=`$CYGPATH -u "$path"`
28561    new_path=`$WHICH "$new_path" 2> /dev/null`
28562    # bat and cmd files are not always considered executable in cygwin causing which
28563    # to not find them
28564    if test "x$new_path" = x \
28565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28567      new_path=`$CYGPATH -u "$path"`
28568    fi
28569    if test "x$new_path" = x; then
28570      # It's still not found. Now this is an unrecoverable error.
28571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28572$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28573      has_space=`$ECHO "$complete" | $GREP " "`
28574      if test "x$has_space" != x; then
28575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28577      fi
28578      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28579    fi
28580  fi
28581
28582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28585  # "foo.exe" is OK but "foo" is an error.
28586  #
28587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28588  # It is also a way to make sure we got the proper file name for the real test later on.
28589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28590  if test "x$test_shortpath" = x; then
28591    # Short path failed, file does not exist as specified.
28592    # Try adding .exe or .cmd
28593    if test -f "${new_path}.exe"; then
28594      input_to_shortpath="${new_path}.exe"
28595    elif test -f "${new_path}.cmd"; then
28596      input_to_shortpath="${new_path}.cmd"
28597    else
28598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28599$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28602      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28603    fi
28604  else
28605    input_to_shortpath="$new_path"
28606  fi
28607
28608  # Call helper function which possibly converts this using DOS-style short mode.
28609  # If so, the updated path is stored in $new_path.
28610  new_path="$input_to_shortpath"
28611
28612  input_path="$input_to_shortpath"
28613  # Check if we need to convert this using DOS-style short mode. If the path
28614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28615  # take no chances and rewrite it.
28616  # Note: m4 eats our [], so we need to use [ and ] instead.
28617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28618  if test "x$has_forbidden_chars" != x; then
28619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28623      # Going to short mode and back again did indeed matter. Since short mode is
28624      # case insensitive, let's make it lowercase to improve readability.
28625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28626      # Now convert it back to Unix-style (cygpath)
28627      input_path=`$CYGPATH -u "$shortmode_path"`
28628      new_path="$input_path"
28629    fi
28630  fi
28631
28632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28633  if test "x$test_cygdrive_prefix" = x; then
28634    # As a simple fix, exclude /usr/bin since it's not a real path.
28635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28637      # a path prefixed by /cygdrive for fixpath to work.
28638      new_path="$CYGWIN_ROOT_PATH$input_path"
28639    fi
28640  fi
28641
28642  # remove trailing .exe if any
28643  new_path="${new_path/%.exe/}"
28644
28645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28646
28647  # First separate the path from the arguments. This will split at the first
28648  # space.
28649  complete="$CC"
28650  path="${complete%% *}"
28651  tmp="$complete EOL"
28652  arguments="${tmp#* }"
28653
28654  # Input might be given as Windows format, start by converting to
28655  # unix format.
28656  new_path="$path"
28657
28658  windows_path="$new_path"
28659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28660    unix_path=`$CYGPATH -u "$windows_path"`
28661    new_path="$unix_path"
28662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28664    new_path="$unix_path"
28665  fi
28666
28667
28668  # Now try to locate executable using which
28669  new_path=`$WHICH "$new_path" 2> /dev/null`
28670
28671  if test "x$new_path" = x; then
28672    # Oops. Which didn't find the executable.
28673    # The splitting of arguments from the executable at a space might have been incorrect,
28674    # since paths with space are more likely in Windows. Give it another try with the whole
28675    # argument.
28676    path="$complete"
28677    arguments="EOL"
28678    new_path="$path"
28679
28680  windows_path="$new_path"
28681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682    unix_path=`$CYGPATH -u "$windows_path"`
28683    new_path="$unix_path"
28684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28686    new_path="$unix_path"
28687  fi
28688
28689
28690    new_path=`$WHICH "$new_path" 2> /dev/null`
28691    # bat and cmd files are not always considered executable in MSYS causing which
28692    # to not find them
28693    if test "x$new_path" = x \
28694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28696      new_path="$path"
28697
28698  windows_path="$new_path"
28699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28700    unix_path=`$CYGPATH -u "$windows_path"`
28701    new_path="$unix_path"
28702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28704    new_path="$unix_path"
28705  fi
28706
28707    fi
28708
28709    if test "x$new_path" = x; then
28710      # It's still not found. Now this is an unrecoverable error.
28711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28712$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28713      has_space=`$ECHO "$complete" | $GREP " "`
28714      if test "x$has_space" != x; then
28715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28717      fi
28718      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28719    fi
28720  fi
28721
28722  # Now new_path has a complete unix path to the binary
28723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28724    # Keep paths in /bin as-is, but remove trailing .exe if any
28725    new_path="${new_path/%.exe/}"
28726    # Do not save /bin paths to all_fixpath_prefixes!
28727  else
28728    # Not in mixed or Windows style, start by that.
28729    new_path=`cmd //c echo $new_path`
28730
28731  input_path="$new_path"
28732  # Check if we need to convert this using DOS-style short mode. If the path
28733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28734  # take no chances and rewrite it.
28735  # Note: m4 eats our [], so we need to use [ and ] instead.
28736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28737  if test "x$has_forbidden_chars" != x; then
28738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28740  fi
28741
28742    # Output is in $new_path
28743
28744  windows_path="$new_path"
28745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28746    unix_path=`$CYGPATH -u "$windows_path"`
28747    new_path="$unix_path"
28748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28750    new_path="$unix_path"
28751  fi
28752
28753    # remove trailing .exe if any
28754    new_path="${new_path/%.exe/}"
28755
28756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28758  fi
28759
28760    else
28761      # We're on a unix platform. Hooray! :)
28762      # First separate the path from the arguments. This will split at the first
28763      # space.
28764      complete="$CC"
28765      path="${complete%% *}"
28766      tmp="$complete EOL"
28767      arguments="${tmp#* }"
28768
28769      # Cannot rely on the command "which" here since it doesn't always work.
28770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28771      if test -z "$is_absolute_path"; then
28772        # Path to executable is not absolute. Find it.
28773        IFS_save="$IFS"
28774        IFS=:
28775        for p in $PATH; do
28776          if test -f "$p/$path" && test -x "$p/$path"; then
28777            new_path="$p/$path"
28778            break
28779          fi
28780        done
28781        IFS="$IFS_save"
28782      else
28783        # This is an absolute path, we can use it without further modifications.
28784        new_path="$path"
28785      fi
28786
28787      if test "x$new_path" = x; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28789$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28790        has_space=`$ECHO "$complete" | $GREP " "`
28791        if test "x$has_space" != x; then
28792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28794        fi
28795        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28796      fi
28797    fi
28798
28799    # Now join together the path and the arguments once again
28800    if test "x$arguments" != xEOL; then
28801      new_complete="$new_path ${arguments% *}"
28802    else
28803      new_complete="$new_path"
28804    fi
28805
28806    if test "x$complete" != "x$new_complete"; then
28807      CC="$new_complete"
28808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28809$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28810    fi
28811  fi
28812
28813  TEST_COMPILER="$CC"
28814  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28815  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28816  if test "x$OPENJDK_BUILD_OS" != xaix; then
28817    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28819$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28820
28821  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28822    # Follow a chain of symbolic links. Use readlink
28823    # where it exists, else fall back to horribly
28824    # complicated shell code.
28825    if test "x$READLINK_TESTED" != yes; then
28826      # On MacOSX there is a readlink tool with a different
28827      # purpose than the GNU readlink tool. Check the found readlink.
28828      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28829      if test "x$ISGNU" = x; then
28830        # A readlink that we do not know how to use.
28831        # Are there other non-GNU readlinks out there?
28832        READLINK_TESTED=yes
28833        READLINK=
28834      fi
28835    fi
28836
28837    if test "x$READLINK" != x; then
28838      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28839    else
28840      # Save the current directory for restoring afterwards
28841      STARTDIR=$PWD
28842      COUNTER=0
28843      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28844      sym_link_file=`$BASENAME $TEST_COMPILER`
28845      cd $sym_link_dir
28846      # Use -P flag to resolve symlinks in directories.
28847      cd `$THEPWDCMD -P`
28848      sym_link_dir=`$THEPWDCMD -P`
28849      # Resolve file symlinks
28850      while test $COUNTER -lt 20; do
28851        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28852        if test "x$ISLINK" == x; then
28853          # This is not a symbolic link! We are done!
28854          break
28855        fi
28856        # Again resolve directory symlinks since the target of the just found
28857        # link could be in a different directory
28858        cd `$DIRNAME $ISLINK`
28859        sym_link_dir=`$THEPWDCMD -P`
28860        sym_link_file=`$BASENAME $ISLINK`
28861        let COUNTER=COUNTER+1
28862      done
28863      cd $STARTDIR
28864      TEST_COMPILER=$sym_link_dir/$sym_link_file
28865    fi
28866  fi
28867
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28869$as_echo "$TEST_COMPILER" >&6; }
28870  fi
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28872$as_echo_n "checking if CC is disguised ccache... " >&6; }
28873
28874  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28875  if test "x$COMPILER_BASENAME" = "xccache"; then
28876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28877$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28878    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28879    # We want to control ccache invocation ourselves, so ignore this cc and try
28880    # searching again.
28881
28882    # Remove the path to the fake ccache cc from the PATH
28883    RETRY_COMPILER_SAVED_PATH="$PATH"
28884    COMPILER_DIRNAME=`$DIRNAME $CC`
28885    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28886
28887    # Try again looking for our compiler
28888    if test -n "$ac_tool_prefix"; then
28889  for ac_prog in $TOOLCHAIN_CC_BINARY
28890  do
28891    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28894$as_echo_n "checking for $ac_word... " >&6; }
28895if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28896  $as_echo_n "(cached) " >&6
28897else
28898  if test -n "$PROPER_COMPILER_CC"; then
28899  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28900else
28901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28902for as_dir in $PATH
28903do
28904  IFS=$as_save_IFS
28905  test -z "$as_dir" && as_dir=.
28906    for ac_exec_ext in '' $ac_executable_extensions; do
28907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28908    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28910    break 2
28911  fi
28912done
28913  done
28914IFS=$as_save_IFS
28915
28916fi
28917fi
28918PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28919if test -n "$PROPER_COMPILER_CC"; then
28920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28921$as_echo "$PROPER_COMPILER_CC" >&6; }
28922else
28923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28924$as_echo "no" >&6; }
28925fi
28926
28927
28928    test -n "$PROPER_COMPILER_CC" && break
28929  done
28930fi
28931if test -z "$PROPER_COMPILER_CC"; then
28932  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28933  for ac_prog in $TOOLCHAIN_CC_BINARY
28934do
28935  # Extract the first word of "$ac_prog", so it can be a program name with args.
28936set dummy $ac_prog; ac_word=$2
28937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28938$as_echo_n "checking for $ac_word... " >&6; }
28939if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28940  $as_echo_n "(cached) " >&6
28941else
28942  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28943  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28944else
28945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28946for as_dir in $PATH
28947do
28948  IFS=$as_save_IFS
28949  test -z "$as_dir" && as_dir=.
28950    for ac_exec_ext in '' $ac_executable_extensions; do
28951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28952    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28954    break 2
28955  fi
28956done
28957  done
28958IFS=$as_save_IFS
28959
28960fi
28961fi
28962ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28963if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28965$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28966else
28967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28968$as_echo "no" >&6; }
28969fi
28970
28971
28972  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28973done
28974
28975  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28976    PROPER_COMPILER_CC=""
28977  else
28978    case $cross_compiling:$ac_tool_warned in
28979yes:)
28980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28982ac_tool_warned=yes ;;
28983esac
28984    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28985  fi
28986fi
28987
28988
28989  # Only process if variable expands to non-empty
28990
28991  if test "x$PROPER_COMPILER_CC" != x; then
28992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28993
28994  # First separate the path from the arguments. This will split at the first
28995  # space.
28996  complete="$PROPER_COMPILER_CC"
28997  path="${complete%% *}"
28998  tmp="$complete EOL"
28999  arguments="${tmp#* }"
29000
29001  # Input might be given as Windows format, start by converting to
29002  # unix format.
29003  new_path=`$CYGPATH -u "$path"`
29004
29005  # Now try to locate executable using which
29006  new_path=`$WHICH "$new_path" 2> /dev/null`
29007  # bat and cmd files are not always considered executable in cygwin causing which
29008  # to not find them
29009  if test "x$new_path" = x \
29010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29012    new_path=`$CYGPATH -u "$path"`
29013  fi
29014  if test "x$new_path" = x; then
29015    # Oops. Which didn't find the executable.
29016    # The splitting of arguments from the executable at a space might have been incorrect,
29017    # since paths with space are more likely in Windows. Give it another try with the whole
29018    # argument.
29019    path="$complete"
29020    arguments="EOL"
29021    new_path=`$CYGPATH -u "$path"`
29022    new_path=`$WHICH "$new_path" 2> /dev/null`
29023    # bat and cmd files are not always considered executable in cygwin causing which
29024    # to not find them
29025    if test "x$new_path" = x \
29026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29028      new_path=`$CYGPATH -u "$path"`
29029    fi
29030    if test "x$new_path" = x; then
29031      # It's still not found. Now this is an unrecoverable error.
29032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29033$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29034      has_space=`$ECHO "$complete" | $GREP " "`
29035      if test "x$has_space" != x; then
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29038      fi
29039      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29040    fi
29041  fi
29042
29043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29046  # "foo.exe" is OK but "foo" is an error.
29047  #
29048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29049  # It is also a way to make sure we got the proper file name for the real test later on.
29050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29051  if test "x$test_shortpath" = x; then
29052    # Short path failed, file does not exist as specified.
29053    # Try adding .exe or .cmd
29054    if test -f "${new_path}.exe"; then
29055      input_to_shortpath="${new_path}.exe"
29056    elif test -f "${new_path}.cmd"; then
29057      input_to_shortpath="${new_path}.cmd"
29058    else
29059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29060$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29063      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29064    fi
29065  else
29066    input_to_shortpath="$new_path"
29067  fi
29068
29069  # Call helper function which possibly converts this using DOS-style short mode.
29070  # If so, the updated path is stored in $new_path.
29071  new_path="$input_to_shortpath"
29072
29073  input_path="$input_to_shortpath"
29074  # Check if we need to convert this using DOS-style short mode. If the path
29075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29076  # take no chances and rewrite it.
29077  # Note: m4 eats our [], so we need to use [ and ] instead.
29078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29079  if test "x$has_forbidden_chars" != x; then
29080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29084      # Going to short mode and back again did indeed matter. Since short mode is
29085      # case insensitive, let's make it lowercase to improve readability.
29086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29087      # Now convert it back to Unix-style (cygpath)
29088      input_path=`$CYGPATH -u "$shortmode_path"`
29089      new_path="$input_path"
29090    fi
29091  fi
29092
29093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29094  if test "x$test_cygdrive_prefix" = x; then
29095    # As a simple fix, exclude /usr/bin since it's not a real path.
29096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29098      # a path prefixed by /cygdrive for fixpath to work.
29099      new_path="$CYGWIN_ROOT_PATH$input_path"
29100    fi
29101  fi
29102
29103  # remove trailing .exe if any
29104  new_path="${new_path/%.exe/}"
29105
29106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29107
29108  # First separate the path from the arguments. This will split at the first
29109  # space.
29110  complete="$PROPER_COMPILER_CC"
29111  path="${complete%% *}"
29112  tmp="$complete EOL"
29113  arguments="${tmp#* }"
29114
29115  # Input might be given as Windows format, start by converting to
29116  # unix format.
29117  new_path="$path"
29118
29119  windows_path="$new_path"
29120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29121    unix_path=`$CYGPATH -u "$windows_path"`
29122    new_path="$unix_path"
29123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29125    new_path="$unix_path"
29126  fi
29127
29128
29129  # Now try to locate executable using which
29130  new_path=`$WHICH "$new_path" 2> /dev/null`
29131
29132  if test "x$new_path" = x; then
29133    # Oops. Which didn't find the executable.
29134    # The splitting of arguments from the executable at a space might have been incorrect,
29135    # since paths with space are more likely in Windows. Give it another try with the whole
29136    # argument.
29137    path="$complete"
29138    arguments="EOL"
29139    new_path="$path"
29140
29141  windows_path="$new_path"
29142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29143    unix_path=`$CYGPATH -u "$windows_path"`
29144    new_path="$unix_path"
29145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29147    new_path="$unix_path"
29148  fi
29149
29150
29151    new_path=`$WHICH "$new_path" 2> /dev/null`
29152    # bat and cmd files are not always considered executable in MSYS causing which
29153    # to not find them
29154    if test "x$new_path" = x \
29155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29157      new_path="$path"
29158
29159  windows_path="$new_path"
29160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29161    unix_path=`$CYGPATH -u "$windows_path"`
29162    new_path="$unix_path"
29163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29165    new_path="$unix_path"
29166  fi
29167
29168    fi
29169
29170    if test "x$new_path" = x; then
29171      # It's still not found. Now this is an unrecoverable error.
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29173$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29174      has_space=`$ECHO "$complete" | $GREP " "`
29175      if test "x$has_space" != x; then
29176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29178      fi
29179      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29180    fi
29181  fi
29182
29183  # Now new_path has a complete unix path to the binary
29184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29185    # Keep paths in /bin as-is, but remove trailing .exe if any
29186    new_path="${new_path/%.exe/}"
29187    # Do not save /bin paths to all_fixpath_prefixes!
29188  else
29189    # Not in mixed or Windows style, start by that.
29190    new_path=`cmd //c echo $new_path`
29191
29192  input_path="$new_path"
29193  # Check if we need to convert this using DOS-style short mode. If the path
29194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29195  # take no chances and rewrite it.
29196  # Note: m4 eats our [], so we need to use [ and ] instead.
29197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29198  if test "x$has_forbidden_chars" != x; then
29199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29201  fi
29202
29203    # Output is in $new_path
29204
29205  windows_path="$new_path"
29206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29207    unix_path=`$CYGPATH -u "$windows_path"`
29208    new_path="$unix_path"
29209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29211    new_path="$unix_path"
29212  fi
29213
29214    # remove trailing .exe if any
29215    new_path="${new_path/%.exe/}"
29216
29217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29219  fi
29220
29221    else
29222      # We're on a unix platform. Hooray! :)
29223      # First separate the path from the arguments. This will split at the first
29224      # space.
29225      complete="$PROPER_COMPILER_CC"
29226      path="${complete%% *}"
29227      tmp="$complete EOL"
29228      arguments="${tmp#* }"
29229
29230      # Cannot rely on the command "which" here since it doesn't always work.
29231      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29232      if test -z "$is_absolute_path"; then
29233        # Path to executable is not absolute. Find it.
29234        IFS_save="$IFS"
29235        IFS=:
29236        for p in $PATH; do
29237          if test -f "$p/$path" && test -x "$p/$path"; then
29238            new_path="$p/$path"
29239            break
29240          fi
29241        done
29242        IFS="$IFS_save"
29243      else
29244        # This is an absolute path, we can use it without further modifications.
29245        new_path="$path"
29246      fi
29247
29248      if test "x$new_path" = x; then
29249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29250$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29251        has_space=`$ECHO "$complete" | $GREP " "`
29252        if test "x$has_space" != x; then
29253          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29255        fi
29256        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29257      fi
29258    fi
29259
29260    # Now join together the path and the arguments once again
29261    if test "x$arguments" != xEOL; then
29262      new_complete="$new_path ${arguments% *}"
29263    else
29264      new_complete="$new_path"
29265    fi
29266
29267    if test "x$complete" != "x$new_complete"; then
29268      PROPER_COMPILER_CC="$new_complete"
29269      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29270$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29271    fi
29272  fi
29273
29274    PATH="$RETRY_COMPILER_SAVED_PATH"
29275
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29277$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29278
29279  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29280    # Follow a chain of symbolic links. Use readlink
29281    # where it exists, else fall back to horribly
29282    # complicated shell code.
29283    if test "x$READLINK_TESTED" != yes; then
29284      # On MacOSX there is a readlink tool with a different
29285      # purpose than the GNU readlink tool. Check the found readlink.
29286      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29287      if test "x$ISGNU" = x; then
29288        # A readlink that we do not know how to use.
29289        # Are there other non-GNU readlinks out there?
29290        READLINK_TESTED=yes
29291        READLINK=
29292      fi
29293    fi
29294
29295    if test "x$READLINK" != x; then
29296      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29297    else
29298      # Save the current directory for restoring afterwards
29299      STARTDIR=$PWD
29300      COUNTER=0
29301      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29302      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29303      cd $sym_link_dir
29304      # Use -P flag to resolve symlinks in directories.
29305      cd `$THEPWDCMD -P`
29306      sym_link_dir=`$THEPWDCMD -P`
29307      # Resolve file symlinks
29308      while test $COUNTER -lt 20; do
29309        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29310        if test "x$ISLINK" == x; then
29311          # This is not a symbolic link! We are done!
29312          break
29313        fi
29314        # Again resolve directory symlinks since the target of the just found
29315        # link could be in a different directory
29316        cd `$DIRNAME $ISLINK`
29317        sym_link_dir=`$THEPWDCMD -P`
29318        sym_link_file=`$BASENAME $ISLINK`
29319        let COUNTER=COUNTER+1
29320      done
29321      cd $STARTDIR
29322      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29323    fi
29324  fi
29325
29326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29327$as_echo "$PROPER_COMPILER_CC" >&6; }
29328    CC="$PROPER_COMPILER_CC"
29329  else
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29331$as_echo "no, keeping CC" >&6; }
29332  fi
29333
29334
29335  COMPILER=$CC
29336  COMPILER_NAME=$COMPILER_NAME
29337
29338  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29339    # cc -V output typically looks like
29340    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29341    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29342    # Check that this is likely to be the Solaris Studio cc.
29343    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29344    if test $? -ne 0; then
29345      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29346      { $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
29347$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29348      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29349$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29351$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29352      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29353    fi
29354    # Remove usage instructions (if present), and
29355    # collapse compiler output into a single line
29356    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29357        $SED -e 's/ *[Uu]sage:.*//'`
29358    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29359        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29360  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29361    # xlc -qversion output typically looks like
29362    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29363    #     Version: 11.01.0000.0015
29364    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29365    # Check that this is likely to be the IBM XL C compiler.
29366    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29367    if test $? -ne 0; then
29368      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29369      { $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
29370$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29371      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29372$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29373      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29374$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29375      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29376    fi
29377    # Collapse compiler output into a single line
29378    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29379    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29380        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29381  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29382    # There is no specific version flag, but all output starts with a version string.
29383    # First line typically looks something like:
29384    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29385    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29386    # Check that this is likely to be Microsoft CL.EXE.
29387    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29388    if test $? -ne 0; then
29389      { $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
29390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29392$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29393      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29394    fi
29395    # Collapse compiler output into a single line
29396    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29397    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29398        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29399  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29400    # gcc --version output typically looks like
29401    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29402    #     Copyright (C) 2013 Free Software Foundation, Inc.
29403    #     This is free software; see the source for copying conditions.  There is NO
29404    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29405    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29406    # Check that this is likely to be GCC.
29407    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29408    if test $? -ne 0; then
29409      { $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
29410$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29411      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29412$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29413      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29414    fi
29415    # Remove Copyright and legalese from version string, and
29416    # collapse into a single line
29417    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29418        $SED -e 's/ *Copyright .*//'`
29419    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29420        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29421  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29422    # clang --version output typically looks like
29423    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29424    #    clang version 3.3 (tags/RELEASE_33/final)
29425    # or
29426    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29427    #    Target: x86_64-pc-linux-gnu
29428    #    Thread model: posix
29429    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29430    # Check that this is likely to be clang
29431    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29432    if test $? -ne 0; then
29433      { $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
29434$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29435      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29436$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29437      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29438    fi
29439    # Collapse compiler output into a single line
29440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29441    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29442        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29443  else
29444      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29445  fi
29446  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29447  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29448  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29449  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29450
29451  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29452$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29453
29454
29455  # Now that we have resolved CC ourself, let autoconf have its go at it
29456  ac_ext=c
29457ac_cpp='$CPP $CPPFLAGS'
29458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29460ac_compiler_gnu=$ac_cv_c_compiler_gnu
29461if test -n "$ac_tool_prefix"; then
29462  for ac_prog in $CC
29463  do
29464    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29465set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29467$as_echo_n "checking for $ac_word... " >&6; }
29468if ${ac_cv_prog_CC+:} false; then :
29469  $as_echo_n "(cached) " >&6
29470else
29471  if test -n "$CC"; then
29472  ac_cv_prog_CC="$CC" # Let the user override the test.
29473else
29474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29475for as_dir in $PATH
29476do
29477  IFS=$as_save_IFS
29478  test -z "$as_dir" && as_dir=.
29479    for ac_exec_ext in '' $ac_executable_extensions; do
29480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29481    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29483    break 2
29484  fi
29485done
29486  done
29487IFS=$as_save_IFS
29488
29489fi
29490fi
29491CC=$ac_cv_prog_CC
29492if test -n "$CC"; then
29493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29494$as_echo "$CC" >&6; }
29495else
29496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29497$as_echo "no" >&6; }
29498fi
29499
29500
29501    test -n "$CC" && break
29502  done
29503fi
29504if test -z "$CC"; then
29505  ac_ct_CC=$CC
29506  for ac_prog in $CC
29507do
29508  # Extract the first word of "$ac_prog", so it can be a program name with args.
29509set dummy $ac_prog; ac_word=$2
29510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29511$as_echo_n "checking for $ac_word... " >&6; }
29512if ${ac_cv_prog_ac_ct_CC+:} false; then :
29513  $as_echo_n "(cached) " >&6
29514else
29515  if test -n "$ac_ct_CC"; then
29516  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29517else
29518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29519for as_dir in $PATH
29520do
29521  IFS=$as_save_IFS
29522  test -z "$as_dir" && as_dir=.
29523    for ac_exec_ext in '' $ac_executable_extensions; do
29524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29525    ac_cv_prog_ac_ct_CC="$ac_prog"
29526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29527    break 2
29528  fi
29529done
29530  done
29531IFS=$as_save_IFS
29532
29533fi
29534fi
29535ac_ct_CC=$ac_cv_prog_ac_ct_CC
29536if test -n "$ac_ct_CC"; then
29537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29538$as_echo "$ac_ct_CC" >&6; }
29539else
29540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29541$as_echo "no" >&6; }
29542fi
29543
29544
29545  test -n "$ac_ct_CC" && break
29546done
29547
29548  if test "x$ac_ct_CC" = x; then
29549    CC=""
29550  else
29551    case $cross_compiling:$ac_tool_warned in
29552yes:)
29553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29555ac_tool_warned=yes ;;
29556esac
29557    CC=$ac_ct_CC
29558  fi
29559fi
29560
29561
29562test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29564as_fn_error $? "no acceptable C compiler found in \$PATH
29565See \`config.log' for more details" "$LINENO" 5; }
29566
29567# Provide some information about the compiler.
29568$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29569set X $ac_compile
29570ac_compiler=$2
29571for ac_option in --version -v -V -qversion; do
29572  { { ac_try="$ac_compiler $ac_option >&5"
29573case "(($ac_try" in
29574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29575  *) ac_try_echo=$ac_try;;
29576esac
29577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29578$as_echo "$ac_try_echo"; } >&5
29579  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29580  ac_status=$?
29581  if test -s conftest.err; then
29582    sed '10a\
29583... rest of stderr output deleted ...
29584         10q' conftest.err >conftest.er1
29585    cat conftest.er1 >&5
29586  fi
29587  rm -f conftest.er1 conftest.err
29588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29589  test $ac_status = 0; }
29590done
29591
29592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29593/* end confdefs.h.  */
29594
29595int
29596main ()
29597{
29598
29599  ;
29600  return 0;
29601}
29602_ACEOF
29603ac_clean_files_save=$ac_clean_files
29604ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29605# Try to create an executable without -o first, disregard a.out.
29606# It will help us diagnose broken compilers, and finding out an intuition
29607# of exeext.
29608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29609$as_echo_n "checking whether the C compiler works... " >&6; }
29610ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29611
29612# The possible output files:
29613ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29614
29615ac_rmfiles=
29616for ac_file in $ac_files
29617do
29618  case $ac_file in
29619    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29620    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29621  esac
29622done
29623rm -f $ac_rmfiles
29624
29625if { { ac_try="$ac_link_default"
29626case "(($ac_try" in
29627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29628  *) ac_try_echo=$ac_try;;
29629esac
29630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29631$as_echo "$ac_try_echo"; } >&5
29632  (eval "$ac_link_default") 2>&5
29633  ac_status=$?
29634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29635  test $ac_status = 0; }; then :
29636  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29637# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29638# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29639# so that the user can short-circuit this test for compilers unknown to
29640# Autoconf.
29641for ac_file in $ac_files ''
29642do
29643  test -f "$ac_file" || continue
29644  case $ac_file in
29645    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29646	;;
29647    [ab].out )
29648	# We found the default executable, but exeext='' is most
29649	# certainly right.
29650	break;;
29651    *.* )
29652	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29653	then :; else
29654	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29655	fi
29656	# We set ac_cv_exeext here because the later test for it is not
29657	# safe: cross compilers may not add the suffix if given an `-o'
29658	# argument, so we may need to know it at that point already.
29659	# Even if this section looks crufty: it has the advantage of
29660	# actually working.
29661	break;;
29662    * )
29663	break;;
29664  esac
29665done
29666test "$ac_cv_exeext" = no && ac_cv_exeext=
29667
29668else
29669  ac_file=''
29670fi
29671if test -z "$ac_file"; then :
29672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29673$as_echo "no" >&6; }
29674$as_echo "$as_me: failed program was:" >&5
29675sed 's/^/| /' conftest.$ac_ext >&5
29676
29677{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29679as_fn_error 77 "C compiler cannot create executables
29680See \`config.log' for more details" "$LINENO" 5; }
29681else
29682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29683$as_echo "yes" >&6; }
29684fi
29685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29686$as_echo_n "checking for C compiler default output file name... " >&6; }
29687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29688$as_echo "$ac_file" >&6; }
29689ac_exeext=$ac_cv_exeext
29690
29691rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29692ac_clean_files=$ac_clean_files_save
29693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29694$as_echo_n "checking for suffix of executables... " >&6; }
29695if { { ac_try="$ac_link"
29696case "(($ac_try" in
29697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29698  *) ac_try_echo=$ac_try;;
29699esac
29700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29701$as_echo "$ac_try_echo"; } >&5
29702  (eval "$ac_link") 2>&5
29703  ac_status=$?
29704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29705  test $ac_status = 0; }; then :
29706  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29707# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29708# work properly (i.e., refer to `conftest.exe'), while it won't with
29709# `rm'.
29710for ac_file in conftest.exe conftest conftest.*; do
29711  test -f "$ac_file" || continue
29712  case $ac_file in
29713    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29714    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29715	  break;;
29716    * ) break;;
29717  esac
29718done
29719else
29720  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29722as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29723See \`config.log' for more details" "$LINENO" 5; }
29724fi
29725rm -f conftest conftest$ac_cv_exeext
29726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29727$as_echo "$ac_cv_exeext" >&6; }
29728
29729rm -f conftest.$ac_ext
29730EXEEXT=$ac_cv_exeext
29731ac_exeext=$EXEEXT
29732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29733/* end confdefs.h.  */
29734#include <stdio.h>
29735int
29736main ()
29737{
29738FILE *f = fopen ("conftest.out", "w");
29739 return ferror (f) || fclose (f) != 0;
29740
29741  ;
29742  return 0;
29743}
29744_ACEOF
29745ac_clean_files="$ac_clean_files conftest.out"
29746# Check that the compiler produces executables we can run.  If not, either
29747# the compiler is broken, or we cross compile.
29748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29749$as_echo_n "checking whether we are cross compiling... " >&6; }
29750if test "$cross_compiling" != yes; then
29751  { { ac_try="$ac_link"
29752case "(($ac_try" in
29753  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29754  *) ac_try_echo=$ac_try;;
29755esac
29756eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29757$as_echo "$ac_try_echo"; } >&5
29758  (eval "$ac_link") 2>&5
29759  ac_status=$?
29760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29761  test $ac_status = 0; }
29762  if { ac_try='./conftest$ac_cv_exeext'
29763  { { case "(($ac_try" in
29764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29765  *) ac_try_echo=$ac_try;;
29766esac
29767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29768$as_echo "$ac_try_echo"; } >&5
29769  (eval "$ac_try") 2>&5
29770  ac_status=$?
29771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29772  test $ac_status = 0; }; }; then
29773    cross_compiling=no
29774  else
29775    if test "$cross_compiling" = maybe; then
29776	cross_compiling=yes
29777    else
29778	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29780as_fn_error $? "cannot run C compiled programs.
29781If you meant to cross compile, use \`--host'.
29782See \`config.log' for more details" "$LINENO" 5; }
29783    fi
29784  fi
29785fi
29786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29787$as_echo "$cross_compiling" >&6; }
29788
29789rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29790ac_clean_files=$ac_clean_files_save
29791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29792$as_echo_n "checking for suffix of object files... " >&6; }
29793if ${ac_cv_objext+:} false; then :
29794  $as_echo_n "(cached) " >&6
29795else
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798
29799int
29800main ()
29801{
29802
29803  ;
29804  return 0;
29805}
29806_ACEOF
29807rm -f conftest.o conftest.obj
29808if { { ac_try="$ac_compile"
29809case "(($ac_try" in
29810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29811  *) ac_try_echo=$ac_try;;
29812esac
29813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29814$as_echo "$ac_try_echo"; } >&5
29815  (eval "$ac_compile") 2>&5
29816  ac_status=$?
29817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29818  test $ac_status = 0; }; then :
29819  for ac_file in conftest.o conftest.obj conftest.*; do
29820  test -f "$ac_file" || continue;
29821  case $ac_file in
29822    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29823    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29824       break;;
29825  esac
29826done
29827else
29828  $as_echo "$as_me: failed program was:" >&5
29829sed 's/^/| /' conftest.$ac_ext >&5
29830
29831{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29833as_fn_error $? "cannot compute suffix of object files: cannot compile
29834See \`config.log' for more details" "$LINENO" 5; }
29835fi
29836rm -f conftest.$ac_cv_objext conftest.$ac_ext
29837fi
29838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29839$as_echo "$ac_cv_objext" >&6; }
29840OBJEXT=$ac_cv_objext
29841ac_objext=$OBJEXT
29842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29843$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29844if ${ac_cv_c_compiler_gnu+:} false; then :
29845  $as_echo_n "(cached) " >&6
29846else
29847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29848/* end confdefs.h.  */
29849
29850int
29851main ()
29852{
29853#ifndef __GNUC__
29854       choke me
29855#endif
29856
29857  ;
29858  return 0;
29859}
29860_ACEOF
29861if ac_fn_c_try_compile "$LINENO"; then :
29862  ac_compiler_gnu=yes
29863else
29864  ac_compiler_gnu=no
29865fi
29866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29867ac_cv_c_compiler_gnu=$ac_compiler_gnu
29868
29869fi
29870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29871$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29872if test $ac_compiler_gnu = yes; then
29873  GCC=yes
29874else
29875  GCC=
29876fi
29877ac_test_CFLAGS=${CFLAGS+set}
29878ac_save_CFLAGS=$CFLAGS
29879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29880$as_echo_n "checking whether $CC accepts -g... " >&6; }
29881if ${ac_cv_prog_cc_g+:} false; then :
29882  $as_echo_n "(cached) " >&6
29883else
29884  ac_save_c_werror_flag=$ac_c_werror_flag
29885   ac_c_werror_flag=yes
29886   ac_cv_prog_cc_g=no
29887   CFLAGS="-g"
29888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29889/* end confdefs.h.  */
29890
29891int
29892main ()
29893{
29894
29895  ;
29896  return 0;
29897}
29898_ACEOF
29899if ac_fn_c_try_compile "$LINENO"; then :
29900  ac_cv_prog_cc_g=yes
29901else
29902  CFLAGS=""
29903      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29904/* end confdefs.h.  */
29905
29906int
29907main ()
29908{
29909
29910  ;
29911  return 0;
29912}
29913_ACEOF
29914if ac_fn_c_try_compile "$LINENO"; then :
29915
29916else
29917  ac_c_werror_flag=$ac_save_c_werror_flag
29918	 CFLAGS="-g"
29919	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29920/* end confdefs.h.  */
29921
29922int
29923main ()
29924{
29925
29926  ;
29927  return 0;
29928}
29929_ACEOF
29930if ac_fn_c_try_compile "$LINENO"; then :
29931  ac_cv_prog_cc_g=yes
29932fi
29933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29934fi
29935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29936fi
29937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29938   ac_c_werror_flag=$ac_save_c_werror_flag
29939fi
29940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29941$as_echo "$ac_cv_prog_cc_g" >&6; }
29942if test "$ac_test_CFLAGS" = set; then
29943  CFLAGS=$ac_save_CFLAGS
29944elif test $ac_cv_prog_cc_g = yes; then
29945  if test "$GCC" = yes; then
29946    CFLAGS="-g -O2"
29947  else
29948    CFLAGS="-g"
29949  fi
29950else
29951  if test "$GCC" = yes; then
29952    CFLAGS="-O2"
29953  else
29954    CFLAGS=
29955  fi
29956fi
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29958$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29959if ${ac_cv_prog_cc_c89+:} false; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  ac_cv_prog_cc_c89=no
29963ac_save_CC=$CC
29964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29965/* end confdefs.h.  */
29966#include <stdarg.h>
29967#include <stdio.h>
29968struct stat;
29969/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29970struct buf { int x; };
29971FILE * (*rcsopen) (struct buf *, struct stat *, int);
29972static char *e (p, i)
29973     char **p;
29974     int i;
29975{
29976  return p[i];
29977}
29978static char *f (char * (*g) (char **, int), char **p, ...)
29979{
29980  char *s;
29981  va_list v;
29982  va_start (v,p);
29983  s = g (p, va_arg (v,int));
29984  va_end (v);
29985  return s;
29986}
29987
29988/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29989   function prototypes and stuff, but not '\xHH' hex character constants.
29990   These don't provoke an error unfortunately, instead are silently treated
29991   as 'x'.  The following induces an error, until -std is added to get
29992   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29993   array size at least.  It's necessary to write '\x00'==0 to get something
29994   that's true only with -std.  */
29995int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29996
29997/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29998   inside strings and character constants.  */
29999#define FOO(x) 'x'
30000int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30001
30002int test (int i, double x);
30003struct s1 {int (*f) (int a);};
30004struct s2 {int (*f) (double a);};
30005int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30006int argc;
30007char **argv;
30008int
30009main ()
30010{
30011return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30012  ;
30013  return 0;
30014}
30015_ACEOF
30016for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30017	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30018do
30019  CC="$ac_save_CC $ac_arg"
30020  if ac_fn_c_try_compile "$LINENO"; then :
30021  ac_cv_prog_cc_c89=$ac_arg
30022fi
30023rm -f core conftest.err conftest.$ac_objext
30024  test "x$ac_cv_prog_cc_c89" != "xno" && break
30025done
30026rm -f conftest.$ac_ext
30027CC=$ac_save_CC
30028
30029fi
30030# AC_CACHE_VAL
30031case "x$ac_cv_prog_cc_c89" in
30032  x)
30033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30034$as_echo "none needed" >&6; } ;;
30035  xno)
30036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30037$as_echo "unsupported" >&6; } ;;
30038  *)
30039    CC="$CC $ac_cv_prog_cc_c89"
30040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30041$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30042esac
30043if test "x$ac_cv_prog_cc_c89" != xno; then :
30044
30045fi
30046
30047ac_ext=cpp
30048ac_cpp='$CXXCPP $CPPFLAGS'
30049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30052
30053
30054
30055  COMPILER_NAME=C++
30056  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30057
30058  if test "x$CXX" != x; then
30059    # User has supplied compiler name already, always let that override.
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30061$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30062    if test "x`basename $CXX`" = "x$CXX"; then
30063      # A command without a complete path is provided, search $PATH.
30064
30065      for ac_prog in $CXX
30066do
30067  # Extract the first word of "$ac_prog", so it can be a program name with args.
30068set dummy $ac_prog; ac_word=$2
30069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30070$as_echo_n "checking for $ac_word... " >&6; }
30071if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30072  $as_echo_n "(cached) " >&6
30073else
30074  case $POTENTIAL_CXX in
30075  [\\/]* | ?:[\\/]*)
30076  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30077  ;;
30078  *)
30079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30080for as_dir in $PATH
30081do
30082  IFS=$as_save_IFS
30083  test -z "$as_dir" && as_dir=.
30084    for ac_exec_ext in '' $ac_executable_extensions; do
30085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30086    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30088    break 2
30089  fi
30090done
30091  done
30092IFS=$as_save_IFS
30093
30094  ;;
30095esac
30096fi
30097POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30098if test -n "$POTENTIAL_CXX"; then
30099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30100$as_echo "$POTENTIAL_CXX" >&6; }
30101else
30102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30103$as_echo "no" >&6; }
30104fi
30105
30106
30107  test -n "$POTENTIAL_CXX" && break
30108done
30109
30110      if test "x$POTENTIAL_CXX" != x; then
30111        CXX=$POTENTIAL_CXX
30112      else
30113        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30114      fi
30115    else
30116      # Otherwise it might already be a complete path
30117      if test ! -x "$CXX"; then
30118        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30119      fi
30120    fi
30121  else
30122    # No user supplied value. Locate compiler ourselves.
30123
30124    # If we are cross compiling, assume cross compilation tools follows the
30125    # cross compilation standard where they are prefixed with the autoconf
30126    # standard name for the target. For example the binary
30127    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30128    # If we are not cross compiling, then the default compiler name will be
30129    # used.
30130
30131    CXX=
30132    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30133    # before checking the rest of the PATH.
30134    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30135    # step, this should not be necessary.
30136    if test -n "$TOOLCHAIN_PATH"; then
30137      PATH_save="$PATH"
30138      PATH="$TOOLCHAIN_PATH"
30139      for ac_prog in $SEARCH_LIST
30140do
30141  # Extract the first word of "$ac_prog", so it can be a program name with args.
30142set dummy $ac_prog; ac_word=$2
30143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30144$as_echo_n "checking for $ac_word... " >&6; }
30145if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30146  $as_echo_n "(cached) " >&6
30147else
30148  case $TOOLCHAIN_PATH_CXX in
30149  [\\/]* | ?:[\\/]*)
30150  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30151  ;;
30152  *)
30153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30154for as_dir in $PATH
30155do
30156  IFS=$as_save_IFS
30157  test -z "$as_dir" && as_dir=.
30158    for ac_exec_ext in '' $ac_executable_extensions; do
30159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30160    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30162    break 2
30163  fi
30164done
30165  done
30166IFS=$as_save_IFS
30167
30168  ;;
30169esac
30170fi
30171TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30172if test -n "$TOOLCHAIN_PATH_CXX"; then
30173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30174$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30175else
30176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30177$as_echo "no" >&6; }
30178fi
30179
30180
30181  test -n "$TOOLCHAIN_PATH_CXX" && break
30182done
30183
30184      CXX=$TOOLCHAIN_PATH_CXX
30185      PATH="$PATH_save"
30186    fi
30187
30188    # AC_PATH_PROGS can't be run multiple times with the same variable,
30189    # so create a new name for this run.
30190    if test "x$CXX" = x; then
30191      for ac_prog in $SEARCH_LIST
30192do
30193  # Extract the first word of "$ac_prog", so it can be a program name with args.
30194set dummy $ac_prog; ac_word=$2
30195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30196$as_echo_n "checking for $ac_word... " >&6; }
30197if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30198  $as_echo_n "(cached) " >&6
30199else
30200  case $POTENTIAL_CXX in
30201  [\\/]* | ?:[\\/]*)
30202  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30203  ;;
30204  *)
30205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30206for as_dir in $PATH
30207do
30208  IFS=$as_save_IFS
30209  test -z "$as_dir" && as_dir=.
30210    for ac_exec_ext in '' $ac_executable_extensions; do
30211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30212    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30214    break 2
30215  fi
30216done
30217  done
30218IFS=$as_save_IFS
30219
30220  ;;
30221esac
30222fi
30223POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30224if test -n "$POTENTIAL_CXX"; then
30225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30226$as_echo "$POTENTIAL_CXX" >&6; }
30227else
30228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30229$as_echo "no" >&6; }
30230fi
30231
30232
30233  test -n "$POTENTIAL_CXX" && break
30234done
30235
30236      CXX=$POTENTIAL_CXX
30237    fi
30238
30239    if test "x$CXX" = x; then
30240
30241  # Print a helpful message on how to acquire the necessary build dependency.
30242  # devkit is the help tag: freetype, cups, pulse, alsa etc
30243  MISSING_DEPENDENCY=devkit
30244
30245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30246    cygwin_help $MISSING_DEPENDENCY
30247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30248    msys_help $MISSING_DEPENDENCY
30249  else
30250    PKGHANDLER_COMMAND=
30251
30252    case $PKGHANDLER in
30253      apt-get)
30254        apt_help     $MISSING_DEPENDENCY ;;
30255      yum)
30256        yum_help     $MISSING_DEPENDENCY ;;
30257      port)
30258        port_help    $MISSING_DEPENDENCY ;;
30259      pkgutil)
30260        pkgutil_help $MISSING_DEPENDENCY ;;
30261      pkgadd)
30262        pkgadd_help  $MISSING_DEPENDENCY ;;
30263    esac
30264
30265    if test "x$PKGHANDLER_COMMAND" != x; then
30266      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30267    fi
30268  fi
30269
30270      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30271    fi
30272  fi
30273
30274  # Now we have a compiler binary in CXX. Make sure it's okay.
30275
30276  # Only process if variable expands to non-empty
30277
30278  if test "x$CXX" != x; then
30279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30280
30281  # First separate the path from the arguments. This will split at the first
30282  # space.
30283  complete="$CXX"
30284  path="${complete%% *}"
30285  tmp="$complete EOL"
30286  arguments="${tmp#* }"
30287
30288  # Input might be given as Windows format, start by converting to
30289  # unix format.
30290  new_path=`$CYGPATH -u "$path"`
30291
30292  # Now try to locate executable using which
30293  new_path=`$WHICH "$new_path" 2> /dev/null`
30294  # bat and cmd files are not always considered executable in cygwin causing which
30295  # to not find them
30296  if test "x$new_path" = x \
30297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30299    new_path=`$CYGPATH -u "$path"`
30300  fi
30301  if test "x$new_path" = x; then
30302    # Oops. Which didn't find the executable.
30303    # The splitting of arguments from the executable at a space might have been incorrect,
30304    # since paths with space are more likely in Windows. Give it another try with the whole
30305    # argument.
30306    path="$complete"
30307    arguments="EOL"
30308    new_path=`$CYGPATH -u "$path"`
30309    new_path=`$WHICH "$new_path" 2> /dev/null`
30310    # bat and cmd files are not always considered executable in cygwin causing which
30311    # to not find them
30312    if test "x$new_path" = x \
30313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30315      new_path=`$CYGPATH -u "$path"`
30316    fi
30317    if test "x$new_path" = x; then
30318      # It's still not found. Now this is an unrecoverable error.
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30320$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30321      has_space=`$ECHO "$complete" | $GREP " "`
30322      if test "x$has_space" != x; then
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30325      fi
30326      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30327    fi
30328  fi
30329
30330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30333  # "foo.exe" is OK but "foo" is an error.
30334  #
30335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30336  # It is also a way to make sure we got the proper file name for the real test later on.
30337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30338  if test "x$test_shortpath" = x; then
30339    # Short path failed, file does not exist as specified.
30340    # Try adding .exe or .cmd
30341    if test -f "${new_path}.exe"; then
30342      input_to_shortpath="${new_path}.exe"
30343    elif test -f "${new_path}.cmd"; then
30344      input_to_shortpath="${new_path}.cmd"
30345    else
30346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30347$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30350      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30351    fi
30352  else
30353    input_to_shortpath="$new_path"
30354  fi
30355
30356  # Call helper function which possibly converts this using DOS-style short mode.
30357  # If so, the updated path is stored in $new_path.
30358  new_path="$input_to_shortpath"
30359
30360  input_path="$input_to_shortpath"
30361  # Check if we need to convert this using DOS-style short mode. If the path
30362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30363  # take no chances and rewrite it.
30364  # Note: m4 eats our [], so we need to use [ and ] instead.
30365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30366  if test "x$has_forbidden_chars" != x; then
30367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30371      # Going to short mode and back again did indeed matter. Since short mode is
30372      # case insensitive, let's make it lowercase to improve readability.
30373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30374      # Now convert it back to Unix-style (cygpath)
30375      input_path=`$CYGPATH -u "$shortmode_path"`
30376      new_path="$input_path"
30377    fi
30378  fi
30379
30380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30381  if test "x$test_cygdrive_prefix" = x; then
30382    # As a simple fix, exclude /usr/bin since it's not a real path.
30383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30385      # a path prefixed by /cygdrive for fixpath to work.
30386      new_path="$CYGWIN_ROOT_PATH$input_path"
30387    fi
30388  fi
30389
30390  # remove trailing .exe if any
30391  new_path="${new_path/%.exe/}"
30392
30393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30394
30395  # First separate the path from the arguments. This will split at the first
30396  # space.
30397  complete="$CXX"
30398  path="${complete%% *}"
30399  tmp="$complete EOL"
30400  arguments="${tmp#* }"
30401
30402  # Input might be given as Windows format, start by converting to
30403  # unix format.
30404  new_path="$path"
30405
30406  windows_path="$new_path"
30407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30408    unix_path=`$CYGPATH -u "$windows_path"`
30409    new_path="$unix_path"
30410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30412    new_path="$unix_path"
30413  fi
30414
30415
30416  # Now try to locate executable using which
30417  new_path=`$WHICH "$new_path" 2> /dev/null`
30418
30419  if test "x$new_path" = x; then
30420    # Oops. Which didn't find the executable.
30421    # The splitting of arguments from the executable at a space might have been incorrect,
30422    # since paths with space are more likely in Windows. Give it another try with the whole
30423    # argument.
30424    path="$complete"
30425    arguments="EOL"
30426    new_path="$path"
30427
30428  windows_path="$new_path"
30429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30430    unix_path=`$CYGPATH -u "$windows_path"`
30431    new_path="$unix_path"
30432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30434    new_path="$unix_path"
30435  fi
30436
30437
30438    new_path=`$WHICH "$new_path" 2> /dev/null`
30439    # bat and cmd files are not always considered executable in MSYS causing which
30440    # to not find them
30441    if test "x$new_path" = x \
30442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30444      new_path="$path"
30445
30446  windows_path="$new_path"
30447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30448    unix_path=`$CYGPATH -u "$windows_path"`
30449    new_path="$unix_path"
30450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30452    new_path="$unix_path"
30453  fi
30454
30455    fi
30456
30457    if test "x$new_path" = x; then
30458      # It's still not found. Now this is an unrecoverable error.
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30460$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30461      has_space=`$ECHO "$complete" | $GREP " "`
30462      if test "x$has_space" != x; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30465      fi
30466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30467    fi
30468  fi
30469
30470  # Now new_path has a complete unix path to the binary
30471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30472    # Keep paths in /bin as-is, but remove trailing .exe if any
30473    new_path="${new_path/%.exe/}"
30474    # Do not save /bin paths to all_fixpath_prefixes!
30475  else
30476    # Not in mixed or Windows style, start by that.
30477    new_path=`cmd //c echo $new_path`
30478
30479  input_path="$new_path"
30480  # Check if we need to convert this using DOS-style short mode. If the path
30481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30482  # take no chances and rewrite it.
30483  # Note: m4 eats our [], so we need to use [ and ] instead.
30484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30485  if test "x$has_forbidden_chars" != x; then
30486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30488  fi
30489
30490    # Output is in $new_path
30491
30492  windows_path="$new_path"
30493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30494    unix_path=`$CYGPATH -u "$windows_path"`
30495    new_path="$unix_path"
30496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30498    new_path="$unix_path"
30499  fi
30500
30501    # remove trailing .exe if any
30502    new_path="${new_path/%.exe/}"
30503
30504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30506  fi
30507
30508    else
30509      # We're on a unix platform. Hooray! :)
30510      # First separate the path from the arguments. This will split at the first
30511      # space.
30512      complete="$CXX"
30513      path="${complete%% *}"
30514      tmp="$complete EOL"
30515      arguments="${tmp#* }"
30516
30517      # Cannot rely on the command "which" here since it doesn't always work.
30518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30519      if test -z "$is_absolute_path"; then
30520        # Path to executable is not absolute. Find it.
30521        IFS_save="$IFS"
30522        IFS=:
30523        for p in $PATH; do
30524          if test -f "$p/$path" && test -x "$p/$path"; then
30525            new_path="$p/$path"
30526            break
30527          fi
30528        done
30529        IFS="$IFS_save"
30530      else
30531        # This is an absolute path, we can use it without further modifications.
30532        new_path="$path"
30533      fi
30534
30535      if test "x$new_path" = x; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30537$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30538        has_space=`$ECHO "$complete" | $GREP " "`
30539        if test "x$has_space" != x; then
30540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30542        fi
30543        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30544      fi
30545    fi
30546
30547    # Now join together the path and the arguments once again
30548    if test "x$arguments" != xEOL; then
30549      new_complete="$new_path ${arguments% *}"
30550    else
30551      new_complete="$new_path"
30552    fi
30553
30554    if test "x$complete" != "x$new_complete"; then
30555      CXX="$new_complete"
30556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30557$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30558    fi
30559  fi
30560
30561  TEST_COMPILER="$CXX"
30562  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30563  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30564  if test "x$OPENJDK_BUILD_OS" != xaix; then
30565    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30567$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30568
30569  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30570    # Follow a chain of symbolic links. Use readlink
30571    # where it exists, else fall back to horribly
30572    # complicated shell code.
30573    if test "x$READLINK_TESTED" != yes; then
30574      # On MacOSX there is a readlink tool with a different
30575      # purpose than the GNU readlink tool. Check the found readlink.
30576      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30577      if test "x$ISGNU" = x; then
30578        # A readlink that we do not know how to use.
30579        # Are there other non-GNU readlinks out there?
30580        READLINK_TESTED=yes
30581        READLINK=
30582      fi
30583    fi
30584
30585    if test "x$READLINK" != x; then
30586      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30587    else
30588      # Save the current directory for restoring afterwards
30589      STARTDIR=$PWD
30590      COUNTER=0
30591      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30592      sym_link_file=`$BASENAME $TEST_COMPILER`
30593      cd $sym_link_dir
30594      # Use -P flag to resolve symlinks in directories.
30595      cd `$THEPWDCMD -P`
30596      sym_link_dir=`$THEPWDCMD -P`
30597      # Resolve file symlinks
30598      while test $COUNTER -lt 20; do
30599        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30600        if test "x$ISLINK" == x; then
30601          # This is not a symbolic link! We are done!
30602          break
30603        fi
30604        # Again resolve directory symlinks since the target of the just found
30605        # link could be in a different directory
30606        cd `$DIRNAME $ISLINK`
30607        sym_link_dir=`$THEPWDCMD -P`
30608        sym_link_file=`$BASENAME $ISLINK`
30609        let COUNTER=COUNTER+1
30610      done
30611      cd $STARTDIR
30612      TEST_COMPILER=$sym_link_dir/$sym_link_file
30613    fi
30614  fi
30615
30616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30617$as_echo "$TEST_COMPILER" >&6; }
30618  fi
30619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30620$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30621
30622  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30623  if test "x$COMPILER_BASENAME" = "xccache"; then
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30625$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30626    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30627    # We want to control ccache invocation ourselves, so ignore this cc and try
30628    # searching again.
30629
30630    # Remove the path to the fake ccache cc from the PATH
30631    RETRY_COMPILER_SAVED_PATH="$PATH"
30632    COMPILER_DIRNAME=`$DIRNAME $CXX`
30633    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30634
30635    # Try again looking for our compiler
30636    if test -n "$ac_tool_prefix"; then
30637  for ac_prog in $TOOLCHAIN_CXX_BINARY
30638  do
30639    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30642$as_echo_n "checking for $ac_word... " >&6; }
30643if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30644  $as_echo_n "(cached) " >&6
30645else
30646  if test -n "$PROPER_COMPILER_CXX"; then
30647  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30648else
30649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30650for as_dir in $PATH
30651do
30652  IFS=$as_save_IFS
30653  test -z "$as_dir" && as_dir=.
30654    for ac_exec_ext in '' $ac_executable_extensions; do
30655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30656    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30658    break 2
30659  fi
30660done
30661  done
30662IFS=$as_save_IFS
30663
30664fi
30665fi
30666PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30667if test -n "$PROPER_COMPILER_CXX"; then
30668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30669$as_echo "$PROPER_COMPILER_CXX" >&6; }
30670else
30671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30672$as_echo "no" >&6; }
30673fi
30674
30675
30676    test -n "$PROPER_COMPILER_CXX" && break
30677  done
30678fi
30679if test -z "$PROPER_COMPILER_CXX"; then
30680  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30681  for ac_prog in $TOOLCHAIN_CXX_BINARY
30682do
30683  # Extract the first word of "$ac_prog", so it can be a program name with args.
30684set dummy $ac_prog; ac_word=$2
30685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30686$as_echo_n "checking for $ac_word... " >&6; }
30687if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30688  $as_echo_n "(cached) " >&6
30689else
30690  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30691  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30692else
30693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30694for as_dir in $PATH
30695do
30696  IFS=$as_save_IFS
30697  test -z "$as_dir" && as_dir=.
30698    for ac_exec_ext in '' $ac_executable_extensions; do
30699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30700    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30702    break 2
30703  fi
30704done
30705  done
30706IFS=$as_save_IFS
30707
30708fi
30709fi
30710ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30711if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30713$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30714else
30715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30716$as_echo "no" >&6; }
30717fi
30718
30719
30720  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30721done
30722
30723  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30724    PROPER_COMPILER_CXX=""
30725  else
30726    case $cross_compiling:$ac_tool_warned in
30727yes:)
30728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30730ac_tool_warned=yes ;;
30731esac
30732    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30733  fi
30734fi
30735
30736
30737  # Only process if variable expands to non-empty
30738
30739  if test "x$PROPER_COMPILER_CXX" != x; then
30740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30741
30742  # First separate the path from the arguments. This will split at the first
30743  # space.
30744  complete="$PROPER_COMPILER_CXX"
30745  path="${complete%% *}"
30746  tmp="$complete EOL"
30747  arguments="${tmp#* }"
30748
30749  # Input might be given as Windows format, start by converting to
30750  # unix format.
30751  new_path=`$CYGPATH -u "$path"`
30752
30753  # Now try to locate executable using which
30754  new_path=`$WHICH "$new_path" 2> /dev/null`
30755  # bat and cmd files are not always considered executable in cygwin causing which
30756  # to not find them
30757  if test "x$new_path" = x \
30758      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30759      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30760    new_path=`$CYGPATH -u "$path"`
30761  fi
30762  if test "x$new_path" = x; then
30763    # Oops. Which didn't find the executable.
30764    # The splitting of arguments from the executable at a space might have been incorrect,
30765    # since paths with space are more likely in Windows. Give it another try with the whole
30766    # argument.
30767    path="$complete"
30768    arguments="EOL"
30769    new_path=`$CYGPATH -u "$path"`
30770    new_path=`$WHICH "$new_path" 2> /dev/null`
30771    # bat and cmd files are not always considered executable in cygwin causing which
30772    # to not find them
30773    if test "x$new_path" = x \
30774        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30775        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30776      new_path=`$CYGPATH -u "$path"`
30777    fi
30778    if test "x$new_path" = x; then
30779      # It's still not found. Now this is an unrecoverable error.
30780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30781$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30782      has_space=`$ECHO "$complete" | $GREP " "`
30783      if test "x$has_space" != x; then
30784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30786      fi
30787      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30788    fi
30789  fi
30790
30791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30794  # "foo.exe" is OK but "foo" is an error.
30795  #
30796  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30797  # It is also a way to make sure we got the proper file name for the real test later on.
30798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30799  if test "x$test_shortpath" = x; then
30800    # Short path failed, file does not exist as specified.
30801    # Try adding .exe or .cmd
30802    if test -f "${new_path}.exe"; then
30803      input_to_shortpath="${new_path}.exe"
30804    elif test -f "${new_path}.cmd"; then
30805      input_to_shortpath="${new_path}.cmd"
30806    else
30807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30808$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30809      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30810$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30811      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30812    fi
30813  else
30814    input_to_shortpath="$new_path"
30815  fi
30816
30817  # Call helper function which possibly converts this using DOS-style short mode.
30818  # If so, the updated path is stored in $new_path.
30819  new_path="$input_to_shortpath"
30820
30821  input_path="$input_to_shortpath"
30822  # Check if we need to convert this using DOS-style short mode. If the path
30823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30824  # take no chances and rewrite it.
30825  # Note: m4 eats our [], so we need to use [ and ] instead.
30826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30827  if test "x$has_forbidden_chars" != x; then
30828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30832      # Going to short mode and back again did indeed matter. Since short mode is
30833      # case insensitive, let's make it lowercase to improve readability.
30834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30835      # Now convert it back to Unix-style (cygpath)
30836      input_path=`$CYGPATH -u "$shortmode_path"`
30837      new_path="$input_path"
30838    fi
30839  fi
30840
30841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30842  if test "x$test_cygdrive_prefix" = x; then
30843    # As a simple fix, exclude /usr/bin since it's not a real path.
30844    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30846      # a path prefixed by /cygdrive for fixpath to work.
30847      new_path="$CYGWIN_ROOT_PATH$input_path"
30848    fi
30849  fi
30850
30851  # remove trailing .exe if any
30852  new_path="${new_path/%.exe/}"
30853
30854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30855
30856  # First separate the path from the arguments. This will split at the first
30857  # space.
30858  complete="$PROPER_COMPILER_CXX"
30859  path="${complete%% *}"
30860  tmp="$complete EOL"
30861  arguments="${tmp#* }"
30862
30863  # Input might be given as Windows format, start by converting to
30864  # unix format.
30865  new_path="$path"
30866
30867  windows_path="$new_path"
30868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30869    unix_path=`$CYGPATH -u "$windows_path"`
30870    new_path="$unix_path"
30871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30873    new_path="$unix_path"
30874  fi
30875
30876
30877  # Now try to locate executable using which
30878  new_path=`$WHICH "$new_path" 2> /dev/null`
30879
30880  if test "x$new_path" = x; then
30881    # Oops. Which didn't find the executable.
30882    # The splitting of arguments from the executable at a space might have been incorrect,
30883    # since paths with space are more likely in Windows. Give it another try with the whole
30884    # argument.
30885    path="$complete"
30886    arguments="EOL"
30887    new_path="$path"
30888
30889  windows_path="$new_path"
30890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30891    unix_path=`$CYGPATH -u "$windows_path"`
30892    new_path="$unix_path"
30893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30895    new_path="$unix_path"
30896  fi
30897
30898
30899    new_path=`$WHICH "$new_path" 2> /dev/null`
30900    # bat and cmd files are not always considered executable in MSYS causing which
30901    # to not find them
30902    if test "x$new_path" = x \
30903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30905      new_path="$path"
30906
30907  windows_path="$new_path"
30908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30909    unix_path=`$CYGPATH -u "$windows_path"`
30910    new_path="$unix_path"
30911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30913    new_path="$unix_path"
30914  fi
30915
30916    fi
30917
30918    if test "x$new_path" = x; then
30919      # It's still not found. Now this is an unrecoverable error.
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30921$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30922      has_space=`$ECHO "$complete" | $GREP " "`
30923      if test "x$has_space" != x; then
30924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30926      fi
30927      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30928    fi
30929  fi
30930
30931  # Now new_path has a complete unix path to the binary
30932  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30933    # Keep paths in /bin as-is, but remove trailing .exe if any
30934    new_path="${new_path/%.exe/}"
30935    # Do not save /bin paths to all_fixpath_prefixes!
30936  else
30937    # Not in mixed or Windows style, start by that.
30938    new_path=`cmd //c echo $new_path`
30939
30940  input_path="$new_path"
30941  # Check if we need to convert this using DOS-style short mode. If the path
30942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30943  # take no chances and rewrite it.
30944  # Note: m4 eats our [], so we need to use [ and ] instead.
30945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30946  if test "x$has_forbidden_chars" != x; then
30947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30949  fi
30950
30951    # Output is in $new_path
30952
30953  windows_path="$new_path"
30954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955    unix_path=`$CYGPATH -u "$windows_path"`
30956    new_path="$unix_path"
30957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30959    new_path="$unix_path"
30960  fi
30961
30962    # remove trailing .exe if any
30963    new_path="${new_path/%.exe/}"
30964
30965    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30966    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30967  fi
30968
30969    else
30970      # We're on a unix platform. Hooray! :)
30971      # First separate the path from the arguments. This will split at the first
30972      # space.
30973      complete="$PROPER_COMPILER_CXX"
30974      path="${complete%% *}"
30975      tmp="$complete EOL"
30976      arguments="${tmp#* }"
30977
30978      # Cannot rely on the command "which" here since it doesn't always work.
30979      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30980      if test -z "$is_absolute_path"; then
30981        # Path to executable is not absolute. Find it.
30982        IFS_save="$IFS"
30983        IFS=:
30984        for p in $PATH; do
30985          if test -f "$p/$path" && test -x "$p/$path"; then
30986            new_path="$p/$path"
30987            break
30988          fi
30989        done
30990        IFS="$IFS_save"
30991      else
30992        # This is an absolute path, we can use it without further modifications.
30993        new_path="$path"
30994      fi
30995
30996      if test "x$new_path" = x; then
30997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30998$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30999        has_space=`$ECHO "$complete" | $GREP " "`
31000        if test "x$has_space" != x; then
31001          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31002$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31003        fi
31004        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31005      fi
31006    fi
31007
31008    # Now join together the path and the arguments once again
31009    if test "x$arguments" != xEOL; then
31010      new_complete="$new_path ${arguments% *}"
31011    else
31012      new_complete="$new_path"
31013    fi
31014
31015    if test "x$complete" != "x$new_complete"; then
31016      PROPER_COMPILER_CXX="$new_complete"
31017      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31018$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31019    fi
31020  fi
31021
31022    PATH="$RETRY_COMPILER_SAVED_PATH"
31023
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31025$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31026
31027  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31028    # Follow a chain of symbolic links. Use readlink
31029    # where it exists, else fall back to horribly
31030    # complicated shell code.
31031    if test "x$READLINK_TESTED" != yes; then
31032      # On MacOSX there is a readlink tool with a different
31033      # purpose than the GNU readlink tool. Check the found readlink.
31034      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31035      if test "x$ISGNU" = x; then
31036        # A readlink that we do not know how to use.
31037        # Are there other non-GNU readlinks out there?
31038        READLINK_TESTED=yes
31039        READLINK=
31040      fi
31041    fi
31042
31043    if test "x$READLINK" != x; then
31044      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31045    else
31046      # Save the current directory for restoring afterwards
31047      STARTDIR=$PWD
31048      COUNTER=0
31049      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31050      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31051      cd $sym_link_dir
31052      # Use -P flag to resolve symlinks in directories.
31053      cd `$THEPWDCMD -P`
31054      sym_link_dir=`$THEPWDCMD -P`
31055      # Resolve file symlinks
31056      while test $COUNTER -lt 20; do
31057        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31058        if test "x$ISLINK" == x; then
31059          # This is not a symbolic link! We are done!
31060          break
31061        fi
31062        # Again resolve directory symlinks since the target of the just found
31063        # link could be in a different directory
31064        cd `$DIRNAME $ISLINK`
31065        sym_link_dir=`$THEPWDCMD -P`
31066        sym_link_file=`$BASENAME $ISLINK`
31067        let COUNTER=COUNTER+1
31068      done
31069      cd $STARTDIR
31070      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31071    fi
31072  fi
31073
31074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31075$as_echo "$PROPER_COMPILER_CXX" >&6; }
31076    CXX="$PROPER_COMPILER_CXX"
31077  else
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31079$as_echo "no, keeping CXX" >&6; }
31080  fi
31081
31082
31083  COMPILER=$CXX
31084  COMPILER_NAME=$COMPILER_NAME
31085
31086  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31087    # cc -V output typically looks like
31088    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31089    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31090    # Check that this is likely to be the Solaris Studio cc.
31091    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31092    if test $? -ne 0; then
31093      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31094      { $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
31095$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31097$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31099$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31100      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31101    fi
31102    # Remove usage instructions (if present), and
31103    # collapse compiler output into a single line
31104    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31105        $SED -e 's/ *[Uu]sage:.*//'`
31106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31107        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31108  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31109    # xlc -qversion output typically looks like
31110    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31111    #     Version: 11.01.0000.0015
31112    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31113    # Check that this is likely to be the IBM XL C compiler.
31114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31115    if test $? -ne 0; then
31116      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31117      { $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
31118$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31120$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31122$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31124    fi
31125    # Collapse compiler output into a single line
31126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31128        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31129  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31130    # There is no specific version flag, but all output starts with a version string.
31131    # First line typically looks something like:
31132    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31133    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31134    # Check that this is likely to be Microsoft CL.EXE.
31135    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31136    if test $? -ne 0; then
31137      { $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
31138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31140$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31141      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31142    fi
31143    # Collapse compiler output into a single line
31144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31146        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31147  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31148    # gcc --version output typically looks like
31149    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31150    #     Copyright (C) 2013 Free Software Foundation, Inc.
31151    #     This is free software; see the source for copying conditions.  There is NO
31152    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31153    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31154    # Check that this is likely to be GCC.
31155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31156    if test $? -ne 0; then
31157      { $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
31158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31160$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31162    fi
31163    # Remove Copyright and legalese from version string, and
31164    # collapse into a single line
31165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31166        $SED -e 's/ *Copyright .*//'`
31167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31168        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31169  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31170    # clang --version output typically looks like
31171    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31172    #    clang version 3.3 (tags/RELEASE_33/final)
31173    # or
31174    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31175    #    Target: x86_64-pc-linux-gnu
31176    #    Thread model: posix
31177    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31178    # Check that this is likely to be clang
31179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31180    if test $? -ne 0; then
31181      { $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
31182$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31184$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31185      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31186    fi
31187    # Collapse compiler output into a single line
31188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31190        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31191  else
31192      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31193  fi
31194  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31195  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31196  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31197  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31198
31199  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31200$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31201
31202
31203  # Now that we have resolved CXX ourself, let autoconf have its go at it
31204  ac_ext=cpp
31205ac_cpp='$CXXCPP $CPPFLAGS'
31206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31209if test -z "$CXX"; then
31210  if test -n "$CCC"; then
31211    CXX=$CCC
31212  else
31213    if test -n "$ac_tool_prefix"; then
31214  for ac_prog in $CXX
31215  do
31216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31219$as_echo_n "checking for $ac_word... " >&6; }
31220if ${ac_cv_prog_CXX+:} false; then :
31221  $as_echo_n "(cached) " >&6
31222else
31223  if test -n "$CXX"; then
31224  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31225else
31226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31227for as_dir in $PATH
31228do
31229  IFS=$as_save_IFS
31230  test -z "$as_dir" && as_dir=.
31231    for ac_exec_ext in '' $ac_executable_extensions; do
31232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31233    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31235    break 2
31236  fi
31237done
31238  done
31239IFS=$as_save_IFS
31240
31241fi
31242fi
31243CXX=$ac_cv_prog_CXX
31244if test -n "$CXX"; then
31245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31246$as_echo "$CXX" >&6; }
31247else
31248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31249$as_echo "no" >&6; }
31250fi
31251
31252
31253    test -n "$CXX" && break
31254  done
31255fi
31256if test -z "$CXX"; then
31257  ac_ct_CXX=$CXX
31258  for ac_prog in $CXX
31259do
31260  # Extract the first word of "$ac_prog", so it can be a program name with args.
31261set dummy $ac_prog; ac_word=$2
31262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31263$as_echo_n "checking for $ac_word... " >&6; }
31264if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31265  $as_echo_n "(cached) " >&6
31266else
31267  if test -n "$ac_ct_CXX"; then
31268  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31269else
31270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31271for as_dir in $PATH
31272do
31273  IFS=$as_save_IFS
31274  test -z "$as_dir" && as_dir=.
31275    for ac_exec_ext in '' $ac_executable_extensions; do
31276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31277    ac_cv_prog_ac_ct_CXX="$ac_prog"
31278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31279    break 2
31280  fi
31281done
31282  done
31283IFS=$as_save_IFS
31284
31285fi
31286fi
31287ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31288if test -n "$ac_ct_CXX"; then
31289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31290$as_echo "$ac_ct_CXX" >&6; }
31291else
31292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31293$as_echo "no" >&6; }
31294fi
31295
31296
31297  test -n "$ac_ct_CXX" && break
31298done
31299
31300  if test "x$ac_ct_CXX" = x; then
31301    CXX="g++"
31302  else
31303    case $cross_compiling:$ac_tool_warned in
31304yes:)
31305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31307ac_tool_warned=yes ;;
31308esac
31309    CXX=$ac_ct_CXX
31310  fi
31311fi
31312
31313  fi
31314fi
31315# Provide some information about the compiler.
31316$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31317set X $ac_compile
31318ac_compiler=$2
31319for ac_option in --version -v -V -qversion; do
31320  { { ac_try="$ac_compiler $ac_option >&5"
31321case "(($ac_try" in
31322  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31323  *) ac_try_echo=$ac_try;;
31324esac
31325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31326$as_echo "$ac_try_echo"; } >&5
31327  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31328  ac_status=$?
31329  if test -s conftest.err; then
31330    sed '10a\
31331... rest of stderr output deleted ...
31332         10q' conftest.err >conftest.er1
31333    cat conftest.er1 >&5
31334  fi
31335  rm -f conftest.er1 conftest.err
31336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31337  test $ac_status = 0; }
31338done
31339
31340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31341$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31342if ${ac_cv_cxx_compiler_gnu+:} false; then :
31343  $as_echo_n "(cached) " >&6
31344else
31345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31346/* end confdefs.h.  */
31347
31348int
31349main ()
31350{
31351#ifndef __GNUC__
31352       choke me
31353#endif
31354
31355  ;
31356  return 0;
31357}
31358_ACEOF
31359if ac_fn_cxx_try_compile "$LINENO"; then :
31360  ac_compiler_gnu=yes
31361else
31362  ac_compiler_gnu=no
31363fi
31364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31365ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31366
31367fi
31368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31369$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31370if test $ac_compiler_gnu = yes; then
31371  GXX=yes
31372else
31373  GXX=
31374fi
31375ac_test_CXXFLAGS=${CXXFLAGS+set}
31376ac_save_CXXFLAGS=$CXXFLAGS
31377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31378$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31379if ${ac_cv_prog_cxx_g+:} false; then :
31380  $as_echo_n "(cached) " >&6
31381else
31382  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31383   ac_cxx_werror_flag=yes
31384   ac_cv_prog_cxx_g=no
31385   CXXFLAGS="-g"
31386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31387/* end confdefs.h.  */
31388
31389int
31390main ()
31391{
31392
31393  ;
31394  return 0;
31395}
31396_ACEOF
31397if ac_fn_cxx_try_compile "$LINENO"; then :
31398  ac_cv_prog_cxx_g=yes
31399else
31400  CXXFLAGS=""
31401      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31402/* end confdefs.h.  */
31403
31404int
31405main ()
31406{
31407
31408  ;
31409  return 0;
31410}
31411_ACEOF
31412if ac_fn_cxx_try_compile "$LINENO"; then :
31413
31414else
31415  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31416	 CXXFLAGS="-g"
31417	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31418/* end confdefs.h.  */
31419
31420int
31421main ()
31422{
31423
31424  ;
31425  return 0;
31426}
31427_ACEOF
31428if ac_fn_cxx_try_compile "$LINENO"; then :
31429  ac_cv_prog_cxx_g=yes
31430fi
31431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31432fi
31433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31434fi
31435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31436   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31437fi
31438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31439$as_echo "$ac_cv_prog_cxx_g" >&6; }
31440if test "$ac_test_CXXFLAGS" = set; then
31441  CXXFLAGS=$ac_save_CXXFLAGS
31442elif test $ac_cv_prog_cxx_g = yes; then
31443  if test "$GXX" = yes; then
31444    CXXFLAGS="-g -O2"
31445  else
31446    CXXFLAGS="-g"
31447  fi
31448else
31449  if test "$GXX" = yes; then
31450    CXXFLAGS="-O2"
31451  else
31452    CXXFLAGS=
31453  fi
31454fi
31455ac_ext=cpp
31456ac_cpp='$CXXCPP $CPPFLAGS'
31457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31460
31461
31462  #
31463  # Setup the preprocessor (CPP and CXXCPP)
31464  #
31465  ac_ext=c
31466ac_cpp='$CPP $CPPFLAGS'
31467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31469ac_compiler_gnu=$ac_cv_c_compiler_gnu
31470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31471$as_echo_n "checking how to run the C preprocessor... " >&6; }
31472# On Suns, sometimes $CPP names a directory.
31473if test -n "$CPP" && test -d "$CPP"; then
31474  CPP=
31475fi
31476if test -z "$CPP"; then
31477  if ${ac_cv_prog_CPP+:} false; then :
31478  $as_echo_n "(cached) " >&6
31479else
31480      # Double quotes because CPP needs to be expanded
31481    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31482    do
31483      ac_preproc_ok=false
31484for ac_c_preproc_warn_flag in '' yes
31485do
31486  # Use a header file that comes with gcc, so configuring glibc
31487  # with a fresh cross-compiler works.
31488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31489  # <limits.h> exists even on freestanding compilers.
31490  # On the NeXT, cc -E runs the code through the compiler's parser,
31491  # not just through cpp. "Syntax error" is here to catch this case.
31492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31493/* end confdefs.h.  */
31494#ifdef __STDC__
31495# include <limits.h>
31496#else
31497# include <assert.h>
31498#endif
31499		     Syntax error
31500_ACEOF
31501if ac_fn_c_try_cpp "$LINENO"; then :
31502
31503else
31504  # Broken: fails on valid input.
31505continue
31506fi
31507rm -f conftest.err conftest.i conftest.$ac_ext
31508
31509  # OK, works on sane cases.  Now check whether nonexistent headers
31510  # can be detected and how.
31511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31512/* end confdefs.h.  */
31513#include <ac_nonexistent.h>
31514_ACEOF
31515if ac_fn_c_try_cpp "$LINENO"; then :
31516  # Broken: success on invalid input.
31517continue
31518else
31519  # Passes both tests.
31520ac_preproc_ok=:
31521break
31522fi
31523rm -f conftest.err conftest.i conftest.$ac_ext
31524
31525done
31526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31527rm -f conftest.i conftest.err conftest.$ac_ext
31528if $ac_preproc_ok; then :
31529  break
31530fi
31531
31532    done
31533    ac_cv_prog_CPP=$CPP
31534
31535fi
31536  CPP=$ac_cv_prog_CPP
31537else
31538  ac_cv_prog_CPP=$CPP
31539fi
31540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31541$as_echo "$CPP" >&6; }
31542ac_preproc_ok=false
31543for ac_c_preproc_warn_flag in '' yes
31544do
31545  # Use a header file that comes with gcc, so configuring glibc
31546  # with a fresh cross-compiler works.
31547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31548  # <limits.h> exists even on freestanding compilers.
31549  # On the NeXT, cc -E runs the code through the compiler's parser,
31550  # not just through cpp. "Syntax error" is here to catch this case.
31551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31552/* end confdefs.h.  */
31553#ifdef __STDC__
31554# include <limits.h>
31555#else
31556# include <assert.h>
31557#endif
31558		     Syntax error
31559_ACEOF
31560if ac_fn_c_try_cpp "$LINENO"; then :
31561
31562else
31563  # Broken: fails on valid input.
31564continue
31565fi
31566rm -f conftest.err conftest.i conftest.$ac_ext
31567
31568  # OK, works on sane cases.  Now check whether nonexistent headers
31569  # can be detected and how.
31570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31571/* end confdefs.h.  */
31572#include <ac_nonexistent.h>
31573_ACEOF
31574if ac_fn_c_try_cpp "$LINENO"; then :
31575  # Broken: success on invalid input.
31576continue
31577else
31578  # Passes both tests.
31579ac_preproc_ok=:
31580break
31581fi
31582rm -f conftest.err conftest.i conftest.$ac_ext
31583
31584done
31585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31586rm -f conftest.i conftest.err conftest.$ac_ext
31587if $ac_preproc_ok; then :
31588
31589else
31590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31592as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31593See \`config.log' for more details" "$LINENO" 5; }
31594fi
31595
31596ac_ext=cpp
31597ac_cpp='$CXXCPP $CPPFLAGS'
31598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31601
31602
31603  # Only process if variable expands to non-empty
31604
31605  if test "x$CPP" != x; then
31606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31607
31608  # First separate the path from the arguments. This will split at the first
31609  # space.
31610  complete="$CPP"
31611  path="${complete%% *}"
31612  tmp="$complete EOL"
31613  arguments="${tmp#* }"
31614
31615  # Input might be given as Windows format, start by converting to
31616  # unix format.
31617  new_path=`$CYGPATH -u "$path"`
31618
31619  # Now try to locate executable using which
31620  new_path=`$WHICH "$new_path" 2> /dev/null`
31621  # bat and cmd files are not always considered executable in cygwin causing which
31622  # to not find them
31623  if test "x$new_path" = x \
31624      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31625      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31626    new_path=`$CYGPATH -u "$path"`
31627  fi
31628  if test "x$new_path" = x; then
31629    # Oops. Which didn't find the executable.
31630    # The splitting of arguments from the executable at a space might have been incorrect,
31631    # since paths with space are more likely in Windows. Give it another try with the whole
31632    # argument.
31633    path="$complete"
31634    arguments="EOL"
31635    new_path=`$CYGPATH -u "$path"`
31636    new_path=`$WHICH "$new_path" 2> /dev/null`
31637    # bat and cmd files are not always considered executable in cygwin causing which
31638    # to not find them
31639    if test "x$new_path" = x \
31640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31642      new_path=`$CYGPATH -u "$path"`
31643    fi
31644    if test "x$new_path" = x; then
31645      # It's still not found. Now this is an unrecoverable error.
31646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31647$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31648      has_space=`$ECHO "$complete" | $GREP " "`
31649      if test "x$has_space" != x; then
31650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31652      fi
31653      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31654    fi
31655  fi
31656
31657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31660  # "foo.exe" is OK but "foo" is an error.
31661  #
31662  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31663  # It is also a way to make sure we got the proper file name for the real test later on.
31664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31665  if test "x$test_shortpath" = x; then
31666    # Short path failed, file does not exist as specified.
31667    # Try adding .exe or .cmd
31668    if test -f "${new_path}.exe"; then
31669      input_to_shortpath="${new_path}.exe"
31670    elif test -f "${new_path}.cmd"; then
31671      input_to_shortpath="${new_path}.cmd"
31672    else
31673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31674$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31677      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31678    fi
31679  else
31680    input_to_shortpath="$new_path"
31681  fi
31682
31683  # Call helper function which possibly converts this using DOS-style short mode.
31684  # If so, the updated path is stored in $new_path.
31685  new_path="$input_to_shortpath"
31686
31687  input_path="$input_to_shortpath"
31688  # Check if we need to convert this using DOS-style short mode. If the path
31689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31690  # take no chances and rewrite it.
31691  # Note: m4 eats our [], so we need to use [ and ] instead.
31692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31693  if test "x$has_forbidden_chars" != x; then
31694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31698      # Going to short mode and back again did indeed matter. Since short mode is
31699      # case insensitive, let's make it lowercase to improve readability.
31700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31701      # Now convert it back to Unix-style (cygpath)
31702      input_path=`$CYGPATH -u "$shortmode_path"`
31703      new_path="$input_path"
31704    fi
31705  fi
31706
31707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31708  if test "x$test_cygdrive_prefix" = x; then
31709    # As a simple fix, exclude /usr/bin since it's not a real path.
31710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31712      # a path prefixed by /cygdrive for fixpath to work.
31713      new_path="$CYGWIN_ROOT_PATH$input_path"
31714    fi
31715  fi
31716
31717  # remove trailing .exe if any
31718  new_path="${new_path/%.exe/}"
31719
31720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31721
31722  # First separate the path from the arguments. This will split at the first
31723  # space.
31724  complete="$CPP"
31725  path="${complete%% *}"
31726  tmp="$complete EOL"
31727  arguments="${tmp#* }"
31728
31729  # Input might be given as Windows format, start by converting to
31730  # unix format.
31731  new_path="$path"
31732
31733  windows_path="$new_path"
31734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735    unix_path=`$CYGPATH -u "$windows_path"`
31736    new_path="$unix_path"
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31739    new_path="$unix_path"
31740  fi
31741
31742
31743  # Now try to locate executable using which
31744  new_path=`$WHICH "$new_path" 2> /dev/null`
31745
31746  if test "x$new_path" = x; then
31747    # Oops. Which didn't find the executable.
31748    # The splitting of arguments from the executable at a space might have been incorrect,
31749    # since paths with space are more likely in Windows. Give it another try with the whole
31750    # argument.
31751    path="$complete"
31752    arguments="EOL"
31753    new_path="$path"
31754
31755  windows_path="$new_path"
31756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757    unix_path=`$CYGPATH -u "$windows_path"`
31758    new_path="$unix_path"
31759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31761    new_path="$unix_path"
31762  fi
31763
31764
31765    new_path=`$WHICH "$new_path" 2> /dev/null`
31766    # bat and cmd files are not always considered executable in MSYS causing which
31767    # to not find them
31768    if test "x$new_path" = x \
31769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31771      new_path="$path"
31772
31773  windows_path="$new_path"
31774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775    unix_path=`$CYGPATH -u "$windows_path"`
31776    new_path="$unix_path"
31777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31779    new_path="$unix_path"
31780  fi
31781
31782    fi
31783
31784    if test "x$new_path" = x; then
31785      # It's still not found. Now this is an unrecoverable error.
31786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31787$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31788      has_space=`$ECHO "$complete" | $GREP " "`
31789      if test "x$has_space" != x; then
31790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31792      fi
31793      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31794    fi
31795  fi
31796
31797  # Now new_path has a complete unix path to the binary
31798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31799    # Keep paths in /bin as-is, but remove trailing .exe if any
31800    new_path="${new_path/%.exe/}"
31801    # Do not save /bin paths to all_fixpath_prefixes!
31802  else
31803    # Not in mixed or Windows style, start by that.
31804    new_path=`cmd //c echo $new_path`
31805
31806  input_path="$new_path"
31807  # Check if we need to convert this using DOS-style short mode. If the path
31808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31809  # take no chances and rewrite it.
31810  # Note: m4 eats our [], so we need to use [ and ] instead.
31811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31812  if test "x$has_forbidden_chars" != x; then
31813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31815  fi
31816
31817    # Output is in $new_path
31818
31819  windows_path="$new_path"
31820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31821    unix_path=`$CYGPATH -u "$windows_path"`
31822    new_path="$unix_path"
31823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31825    new_path="$unix_path"
31826  fi
31827
31828    # remove trailing .exe if any
31829    new_path="${new_path/%.exe/}"
31830
31831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31833  fi
31834
31835    else
31836      # We're on a unix platform. Hooray! :)
31837      # First separate the path from the arguments. This will split at the first
31838      # space.
31839      complete="$CPP"
31840      path="${complete%% *}"
31841      tmp="$complete EOL"
31842      arguments="${tmp#* }"
31843
31844      # Cannot rely on the command "which" here since it doesn't always work.
31845      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31846      if test -z "$is_absolute_path"; then
31847        # Path to executable is not absolute. Find it.
31848        IFS_save="$IFS"
31849        IFS=:
31850        for p in $PATH; do
31851          if test -f "$p/$path" && test -x "$p/$path"; then
31852            new_path="$p/$path"
31853            break
31854          fi
31855        done
31856        IFS="$IFS_save"
31857      else
31858        # This is an absolute path, we can use it without further modifications.
31859        new_path="$path"
31860      fi
31861
31862      if test "x$new_path" = x; then
31863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31864$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31865        has_space=`$ECHO "$complete" | $GREP " "`
31866        if test "x$has_space" != x; then
31867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31869        fi
31870        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31871      fi
31872    fi
31873
31874    # Now join together the path and the arguments once again
31875    if test "x$arguments" != xEOL; then
31876      new_complete="$new_path ${arguments% *}"
31877    else
31878      new_complete="$new_path"
31879    fi
31880
31881    if test "x$complete" != "x$new_complete"; then
31882      CPP="$new_complete"
31883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31884$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31885    fi
31886  fi
31887
31888  ac_ext=cpp
31889ac_cpp='$CXXCPP $CPPFLAGS'
31890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31894$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31895if test -z "$CXXCPP"; then
31896  if ${ac_cv_prog_CXXCPP+:} false; then :
31897  $as_echo_n "(cached) " >&6
31898else
31899      # Double quotes because CXXCPP needs to be expanded
31900    for CXXCPP in "$CXX -E" "/lib/cpp"
31901    do
31902      ac_preproc_ok=false
31903for ac_cxx_preproc_warn_flag in '' yes
31904do
31905  # Use a header file that comes with gcc, so configuring glibc
31906  # with a fresh cross-compiler works.
31907  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31908  # <limits.h> exists even on freestanding compilers.
31909  # On the NeXT, cc -E runs the code through the compiler's parser,
31910  # not just through cpp. "Syntax error" is here to catch this case.
31911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31912/* end confdefs.h.  */
31913#ifdef __STDC__
31914# include <limits.h>
31915#else
31916# include <assert.h>
31917#endif
31918		     Syntax error
31919_ACEOF
31920if ac_fn_cxx_try_cpp "$LINENO"; then :
31921
31922else
31923  # Broken: fails on valid input.
31924continue
31925fi
31926rm -f conftest.err conftest.i conftest.$ac_ext
31927
31928  # OK, works on sane cases.  Now check whether nonexistent headers
31929  # can be detected and how.
31930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31931/* end confdefs.h.  */
31932#include <ac_nonexistent.h>
31933_ACEOF
31934if ac_fn_cxx_try_cpp "$LINENO"; then :
31935  # Broken: success on invalid input.
31936continue
31937else
31938  # Passes both tests.
31939ac_preproc_ok=:
31940break
31941fi
31942rm -f conftest.err conftest.i conftest.$ac_ext
31943
31944done
31945# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31946rm -f conftest.i conftest.err conftest.$ac_ext
31947if $ac_preproc_ok; then :
31948  break
31949fi
31950
31951    done
31952    ac_cv_prog_CXXCPP=$CXXCPP
31953
31954fi
31955  CXXCPP=$ac_cv_prog_CXXCPP
31956else
31957  ac_cv_prog_CXXCPP=$CXXCPP
31958fi
31959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31960$as_echo "$CXXCPP" >&6; }
31961ac_preproc_ok=false
31962for ac_cxx_preproc_warn_flag in '' yes
31963do
31964  # Use a header file that comes with gcc, so configuring glibc
31965  # with a fresh cross-compiler works.
31966  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31967  # <limits.h> exists even on freestanding compilers.
31968  # On the NeXT, cc -E runs the code through the compiler's parser,
31969  # not just through cpp. "Syntax error" is here to catch this case.
31970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31971/* end confdefs.h.  */
31972#ifdef __STDC__
31973# include <limits.h>
31974#else
31975# include <assert.h>
31976#endif
31977		     Syntax error
31978_ACEOF
31979if ac_fn_cxx_try_cpp "$LINENO"; then :
31980
31981else
31982  # Broken: fails on valid input.
31983continue
31984fi
31985rm -f conftest.err conftest.i conftest.$ac_ext
31986
31987  # OK, works on sane cases.  Now check whether nonexistent headers
31988  # can be detected and how.
31989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31990/* end confdefs.h.  */
31991#include <ac_nonexistent.h>
31992_ACEOF
31993if ac_fn_cxx_try_cpp "$LINENO"; then :
31994  # Broken: success on invalid input.
31995continue
31996else
31997  # Passes both tests.
31998ac_preproc_ok=:
31999break
32000fi
32001rm -f conftest.err conftest.i conftest.$ac_ext
32002
32003done
32004# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32005rm -f conftest.i conftest.err conftest.$ac_ext
32006if $ac_preproc_ok; then :
32007
32008else
32009  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32011as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32012See \`config.log' for more details" "$LINENO" 5; }
32013fi
32014
32015ac_ext=cpp
32016ac_cpp='$CXXCPP $CPPFLAGS'
32017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32020
32021
32022  # Only process if variable expands to non-empty
32023
32024  if test "x$CXXCPP" != x; then
32025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026
32027  # First separate the path from the arguments. This will split at the first
32028  # space.
32029  complete="$CXXCPP"
32030  path="${complete%% *}"
32031  tmp="$complete EOL"
32032  arguments="${tmp#* }"
32033
32034  # Input might be given as Windows format, start by converting to
32035  # unix format.
32036  new_path=`$CYGPATH -u "$path"`
32037
32038  # Now try to locate executable using which
32039  new_path=`$WHICH "$new_path" 2> /dev/null`
32040  # bat and cmd files are not always considered executable in cygwin causing which
32041  # to not find them
32042  if test "x$new_path" = x \
32043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32045    new_path=`$CYGPATH -u "$path"`
32046  fi
32047  if test "x$new_path" = x; then
32048    # Oops. Which didn't find the executable.
32049    # The splitting of arguments from the executable at a space might have been incorrect,
32050    # since paths with space are more likely in Windows. Give it another try with the whole
32051    # argument.
32052    path="$complete"
32053    arguments="EOL"
32054    new_path=`$CYGPATH -u "$path"`
32055    new_path=`$WHICH "$new_path" 2> /dev/null`
32056    # bat and cmd files are not always considered executable in cygwin causing which
32057    # to not find them
32058    if test "x$new_path" = x \
32059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32061      new_path=`$CYGPATH -u "$path"`
32062    fi
32063    if test "x$new_path" = x; then
32064      # It's still not found. Now this is an unrecoverable error.
32065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32066$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32067      has_space=`$ECHO "$complete" | $GREP " "`
32068      if test "x$has_space" != x; then
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32071      fi
32072      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32073    fi
32074  fi
32075
32076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32079  # "foo.exe" is OK but "foo" is an error.
32080  #
32081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32082  # It is also a way to make sure we got the proper file name for the real test later on.
32083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32084  if test "x$test_shortpath" = x; then
32085    # Short path failed, file does not exist as specified.
32086    # Try adding .exe or .cmd
32087    if test -f "${new_path}.exe"; then
32088      input_to_shortpath="${new_path}.exe"
32089    elif test -f "${new_path}.cmd"; then
32090      input_to_shortpath="${new_path}.cmd"
32091    else
32092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32093$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32096      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32097    fi
32098  else
32099    input_to_shortpath="$new_path"
32100  fi
32101
32102  # Call helper function which possibly converts this using DOS-style short mode.
32103  # If so, the updated path is stored in $new_path.
32104  new_path="$input_to_shortpath"
32105
32106  input_path="$input_to_shortpath"
32107  # Check if we need to convert this using DOS-style short mode. If the path
32108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32109  # take no chances and rewrite it.
32110  # Note: m4 eats our [], so we need to use [ and ] instead.
32111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32112  if test "x$has_forbidden_chars" != x; then
32113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32117      # Going to short mode and back again did indeed matter. Since short mode is
32118      # case insensitive, let's make it lowercase to improve readability.
32119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32120      # Now convert it back to Unix-style (cygpath)
32121      input_path=`$CYGPATH -u "$shortmode_path"`
32122      new_path="$input_path"
32123    fi
32124  fi
32125
32126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32127  if test "x$test_cygdrive_prefix" = x; then
32128    # As a simple fix, exclude /usr/bin since it's not a real path.
32129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32131      # a path prefixed by /cygdrive for fixpath to work.
32132      new_path="$CYGWIN_ROOT_PATH$input_path"
32133    fi
32134  fi
32135
32136  # remove trailing .exe if any
32137  new_path="${new_path/%.exe/}"
32138
32139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32140
32141  # First separate the path from the arguments. This will split at the first
32142  # space.
32143  complete="$CXXCPP"
32144  path="${complete%% *}"
32145  tmp="$complete EOL"
32146  arguments="${tmp#* }"
32147
32148  # Input might be given as Windows format, start by converting to
32149  # unix format.
32150  new_path="$path"
32151
32152  windows_path="$new_path"
32153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32154    unix_path=`$CYGPATH -u "$windows_path"`
32155    new_path="$unix_path"
32156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32158    new_path="$unix_path"
32159  fi
32160
32161
32162  # Now try to locate executable using which
32163  new_path=`$WHICH "$new_path" 2> /dev/null`
32164
32165  if test "x$new_path" = x; then
32166    # Oops. Which didn't find the executable.
32167    # The splitting of arguments from the executable at a space might have been incorrect,
32168    # since paths with space are more likely in Windows. Give it another try with the whole
32169    # argument.
32170    path="$complete"
32171    arguments="EOL"
32172    new_path="$path"
32173
32174  windows_path="$new_path"
32175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32176    unix_path=`$CYGPATH -u "$windows_path"`
32177    new_path="$unix_path"
32178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32180    new_path="$unix_path"
32181  fi
32182
32183
32184    new_path=`$WHICH "$new_path" 2> /dev/null`
32185    # bat and cmd files are not always considered executable in MSYS causing which
32186    # to not find them
32187    if test "x$new_path" = x \
32188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32190      new_path="$path"
32191
32192  windows_path="$new_path"
32193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194    unix_path=`$CYGPATH -u "$windows_path"`
32195    new_path="$unix_path"
32196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32198    new_path="$unix_path"
32199  fi
32200
32201    fi
32202
32203    if test "x$new_path" = x; then
32204      # It's still not found. Now this is an unrecoverable error.
32205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32206$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32207      has_space=`$ECHO "$complete" | $GREP " "`
32208      if test "x$has_space" != x; then
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32211      fi
32212      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32213    fi
32214  fi
32215
32216  # Now new_path has a complete unix path to the binary
32217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32218    # Keep paths in /bin as-is, but remove trailing .exe if any
32219    new_path="${new_path/%.exe/}"
32220    # Do not save /bin paths to all_fixpath_prefixes!
32221  else
32222    # Not in mixed or Windows style, start by that.
32223    new_path=`cmd //c echo $new_path`
32224
32225  input_path="$new_path"
32226  # Check if we need to convert this using DOS-style short mode. If the path
32227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32228  # take no chances and rewrite it.
32229  # Note: m4 eats our [], so we need to use [ and ] instead.
32230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32231  if test "x$has_forbidden_chars" != x; then
32232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32234  fi
32235
32236    # Output is in $new_path
32237
32238  windows_path="$new_path"
32239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240    unix_path=`$CYGPATH -u "$windows_path"`
32241    new_path="$unix_path"
32242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32244    new_path="$unix_path"
32245  fi
32246
32247    # remove trailing .exe if any
32248    new_path="${new_path/%.exe/}"
32249
32250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32252  fi
32253
32254    else
32255      # We're on a unix platform. Hooray! :)
32256      # First separate the path from the arguments. This will split at the first
32257      # space.
32258      complete="$CXXCPP"
32259      path="${complete%% *}"
32260      tmp="$complete EOL"
32261      arguments="${tmp#* }"
32262
32263      # Cannot rely on the command "which" here since it doesn't always work.
32264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32265      if test -z "$is_absolute_path"; then
32266        # Path to executable is not absolute. Find it.
32267        IFS_save="$IFS"
32268        IFS=:
32269        for p in $PATH; do
32270          if test -f "$p/$path" && test -x "$p/$path"; then
32271            new_path="$p/$path"
32272            break
32273          fi
32274        done
32275        IFS="$IFS_save"
32276      else
32277        # This is an absolute path, we can use it without further modifications.
32278        new_path="$path"
32279      fi
32280
32281      if test "x$new_path" = x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32283$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32284        has_space=`$ECHO "$complete" | $GREP " "`
32285        if test "x$has_space" != x; then
32286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32288        fi
32289        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32290      fi
32291    fi
32292
32293    # Now join together the path and the arguments once again
32294    if test "x$arguments" != xEOL; then
32295      new_complete="$new_path ${arguments% *}"
32296    else
32297      new_complete="$new_path"
32298    fi
32299
32300    if test "x$complete" != "x$new_complete"; then
32301      CXXCPP="$new_complete"
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32303$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32304    fi
32305  fi
32306
32307
32308  #
32309  # Setup the linker (LD)
32310  #
32311  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32312    # In the Microsoft toolchain we have a separate LD command "link".
32313    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32314    # a cygwin program for something completely different.
32315    # Extract the first word of "link", so it can be a program name with args.
32316set dummy link; ac_word=$2
32317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32318$as_echo_n "checking for $ac_word... " >&6; }
32319if ${ac_cv_prog_LD+:} false; then :
32320  $as_echo_n "(cached) " >&6
32321else
32322  if test -n "$LD"; then
32323  ac_cv_prog_LD="$LD" # Let the user override the test.
32324else
32325  ac_prog_rejected=no
32326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32327for as_dir in $PATH
32328do
32329  IFS=$as_save_IFS
32330  test -z "$as_dir" && as_dir=.
32331    for ac_exec_ext in '' $ac_executable_extensions; do
32332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32333    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32334       ac_prog_rejected=yes
32335       continue
32336     fi
32337    ac_cv_prog_LD="link"
32338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32339    break 2
32340  fi
32341done
32342  done
32343IFS=$as_save_IFS
32344
32345if test $ac_prog_rejected = yes; then
32346  # We found a bogon in the path, so make sure we never use it.
32347  set dummy $ac_cv_prog_LD
32348  shift
32349  if test $# != 0; then
32350    # We chose a different compiler from the bogus one.
32351    # However, it has the same basename, so the bogon will be chosen
32352    # first if we set LD to just the basename; use the full file name.
32353    shift
32354    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32355  fi
32356fi
32357fi
32358fi
32359LD=$ac_cv_prog_LD
32360if test -n "$LD"; then
32361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32362$as_echo "$LD" >&6; }
32363else
32364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32365$as_echo "no" >&6; }
32366fi
32367
32368
32369
32370  # Only process if variable expands to non-empty
32371
32372  if test "x$LD" != x; then
32373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32374
32375  # First separate the path from the arguments. This will split at the first
32376  # space.
32377  complete="$LD"
32378  path="${complete%% *}"
32379  tmp="$complete EOL"
32380  arguments="${tmp#* }"
32381
32382  # Input might be given as Windows format, start by converting to
32383  # unix format.
32384  new_path=`$CYGPATH -u "$path"`
32385
32386  # Now try to locate executable using which
32387  new_path=`$WHICH "$new_path" 2> /dev/null`
32388  # bat and cmd files are not always considered executable in cygwin causing which
32389  # to not find them
32390  if test "x$new_path" = x \
32391      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32392      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32393    new_path=`$CYGPATH -u "$path"`
32394  fi
32395  if test "x$new_path" = x; then
32396    # Oops. Which didn't find the executable.
32397    # The splitting of arguments from the executable at a space might have been incorrect,
32398    # since paths with space are more likely in Windows. Give it another try with the whole
32399    # argument.
32400    path="$complete"
32401    arguments="EOL"
32402    new_path=`$CYGPATH -u "$path"`
32403    new_path=`$WHICH "$new_path" 2> /dev/null`
32404    # bat and cmd files are not always considered executable in cygwin causing which
32405    # to not find them
32406    if test "x$new_path" = x \
32407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32409      new_path=`$CYGPATH -u "$path"`
32410    fi
32411    if test "x$new_path" = x; then
32412      # It's still not found. Now this is an unrecoverable error.
32413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32414$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32415      has_space=`$ECHO "$complete" | $GREP " "`
32416      if test "x$has_space" != x; then
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32419      fi
32420      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32421    fi
32422  fi
32423
32424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32427  # "foo.exe" is OK but "foo" is an error.
32428  #
32429  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32430  # It is also a way to make sure we got the proper file name for the real test later on.
32431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32432  if test "x$test_shortpath" = x; then
32433    # Short path failed, file does not exist as specified.
32434    # Try adding .exe or .cmd
32435    if test -f "${new_path}.exe"; then
32436      input_to_shortpath="${new_path}.exe"
32437    elif test -f "${new_path}.cmd"; then
32438      input_to_shortpath="${new_path}.cmd"
32439    else
32440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32441$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32442      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32443$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32444      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32445    fi
32446  else
32447    input_to_shortpath="$new_path"
32448  fi
32449
32450  # Call helper function which possibly converts this using DOS-style short mode.
32451  # If so, the updated path is stored in $new_path.
32452  new_path="$input_to_shortpath"
32453
32454  input_path="$input_to_shortpath"
32455  # Check if we need to convert this using DOS-style short mode. If the path
32456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32457  # take no chances and rewrite it.
32458  # Note: m4 eats our [], so we need to use [ and ] instead.
32459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32460  if test "x$has_forbidden_chars" != x; then
32461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32465      # Going to short mode and back again did indeed matter. Since short mode is
32466      # case insensitive, let's make it lowercase to improve readability.
32467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32468      # Now convert it back to Unix-style (cygpath)
32469      input_path=`$CYGPATH -u "$shortmode_path"`
32470      new_path="$input_path"
32471    fi
32472  fi
32473
32474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32475  if test "x$test_cygdrive_prefix" = x; then
32476    # As a simple fix, exclude /usr/bin since it's not a real path.
32477    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32479      # a path prefixed by /cygdrive for fixpath to work.
32480      new_path="$CYGWIN_ROOT_PATH$input_path"
32481    fi
32482  fi
32483
32484  # remove trailing .exe if any
32485  new_path="${new_path/%.exe/}"
32486
32487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32488
32489  # First separate the path from the arguments. This will split at the first
32490  # space.
32491  complete="$LD"
32492  path="${complete%% *}"
32493  tmp="$complete EOL"
32494  arguments="${tmp#* }"
32495
32496  # Input might be given as Windows format, start by converting to
32497  # unix format.
32498  new_path="$path"
32499
32500  windows_path="$new_path"
32501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32502    unix_path=`$CYGPATH -u "$windows_path"`
32503    new_path="$unix_path"
32504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32506    new_path="$unix_path"
32507  fi
32508
32509
32510  # Now try to locate executable using which
32511  new_path=`$WHICH "$new_path" 2> /dev/null`
32512
32513  if test "x$new_path" = x; then
32514    # Oops. Which didn't find the executable.
32515    # The splitting of arguments from the executable at a space might have been incorrect,
32516    # since paths with space are more likely in Windows. Give it another try with the whole
32517    # argument.
32518    path="$complete"
32519    arguments="EOL"
32520    new_path="$path"
32521
32522  windows_path="$new_path"
32523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32524    unix_path=`$CYGPATH -u "$windows_path"`
32525    new_path="$unix_path"
32526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32528    new_path="$unix_path"
32529  fi
32530
32531
32532    new_path=`$WHICH "$new_path" 2> /dev/null`
32533    # bat and cmd files are not always considered executable in MSYS causing which
32534    # to not find them
32535    if test "x$new_path" = x \
32536        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32537        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32538      new_path="$path"
32539
32540  windows_path="$new_path"
32541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32542    unix_path=`$CYGPATH -u "$windows_path"`
32543    new_path="$unix_path"
32544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32546    new_path="$unix_path"
32547  fi
32548
32549    fi
32550
32551    if test "x$new_path" = x; then
32552      # It's still not found. Now this is an unrecoverable error.
32553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32554$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32555      has_space=`$ECHO "$complete" | $GREP " "`
32556      if test "x$has_space" != x; then
32557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32559      fi
32560      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32561    fi
32562  fi
32563
32564  # Now new_path has a complete unix path to the binary
32565  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32566    # Keep paths in /bin as-is, but remove trailing .exe if any
32567    new_path="${new_path/%.exe/}"
32568    # Do not save /bin paths to all_fixpath_prefixes!
32569  else
32570    # Not in mixed or Windows style, start by that.
32571    new_path=`cmd //c echo $new_path`
32572
32573  input_path="$new_path"
32574  # Check if we need to convert this using DOS-style short mode. If the path
32575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32576  # take no chances and rewrite it.
32577  # Note: m4 eats our [], so we need to use [ and ] instead.
32578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32579  if test "x$has_forbidden_chars" != x; then
32580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32582  fi
32583
32584    # Output is in $new_path
32585
32586  windows_path="$new_path"
32587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32588    unix_path=`$CYGPATH -u "$windows_path"`
32589    new_path="$unix_path"
32590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32592    new_path="$unix_path"
32593  fi
32594
32595    # remove trailing .exe if any
32596    new_path="${new_path/%.exe/}"
32597
32598    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32599    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32600  fi
32601
32602    else
32603      # We're on a unix platform. Hooray! :)
32604      # First separate the path from the arguments. This will split at the first
32605      # space.
32606      complete="$LD"
32607      path="${complete%% *}"
32608      tmp="$complete EOL"
32609      arguments="${tmp#* }"
32610
32611      # Cannot rely on the command "which" here since it doesn't always work.
32612      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32613      if test -z "$is_absolute_path"; then
32614        # Path to executable is not absolute. Find it.
32615        IFS_save="$IFS"
32616        IFS=:
32617        for p in $PATH; do
32618          if test -f "$p/$path" && test -x "$p/$path"; then
32619            new_path="$p/$path"
32620            break
32621          fi
32622        done
32623        IFS="$IFS_save"
32624      else
32625        # This is an absolute path, we can use it without further modifications.
32626        new_path="$path"
32627      fi
32628
32629      if test "x$new_path" = x; then
32630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32631$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32632        has_space=`$ECHO "$complete" | $GREP " "`
32633        if test "x$has_space" != x; then
32634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32636        fi
32637        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32638      fi
32639    fi
32640
32641    # Now join together the path and the arguments once again
32642    if test "x$arguments" != xEOL; then
32643      new_complete="$new_path ${arguments% *}"
32644    else
32645      new_complete="$new_path"
32646    fi
32647
32648    if test "x$complete" != "x$new_complete"; then
32649      LD="$new_complete"
32650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32651$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32652    fi
32653  fi
32654
32655    # Verify that we indeed succeeded with this trick.
32656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32657$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32658    "$LD" --version > /dev/null
32659    if test $? -eq 0 ; then
32660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32661$as_echo "no" >&6; }
32662      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32663    else
32664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32665$as_echo "yes" >&6; }
32666    fi
32667    LDCXX="$LD"
32668  else
32669    # All other toolchains use the compiler to link.
32670    LD="$CC"
32671    LDCXX="$CXX"
32672  fi
32673
32674  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32675
32676
32677  #
32678  # Setup the assembler (AS)
32679  #
32680  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32681    # FIXME: should this really be solaris, or solstudio?
32682
32683
32684  # Publish this variable in the help.
32685
32686
32687  if test "x$AS" = x; then
32688    # The variable is not set by user, try to locate tool using the code snippet
32689    for ac_prog in as
32690do
32691  # Extract the first word of "$ac_prog", so it can be a program name with args.
32692set dummy $ac_prog; ac_word=$2
32693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32694$as_echo_n "checking for $ac_word... " >&6; }
32695if ${ac_cv_path_AS+:} false; then :
32696  $as_echo_n "(cached) " >&6
32697else
32698  case $AS in
32699  [\\/]* | ?:[\\/]*)
32700  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32701  ;;
32702  *)
32703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32704for as_dir in $PATH
32705do
32706  IFS=$as_save_IFS
32707  test -z "$as_dir" && as_dir=.
32708    for ac_exec_ext in '' $ac_executable_extensions; do
32709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32710    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32712    break 2
32713  fi
32714done
32715  done
32716IFS=$as_save_IFS
32717
32718  ;;
32719esac
32720fi
32721AS=$ac_cv_path_AS
32722if test -n "$AS"; then
32723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32724$as_echo "$AS" >&6; }
32725else
32726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32727$as_echo "no" >&6; }
32728fi
32729
32730
32731  test -n "$AS" && break
32732done
32733
32734  else
32735    # The variable is set, but is it from the command line or the environment?
32736
32737    # Try to remove the string !AS! from our list.
32738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32740      # If it failed, the variable was not from the command line. Ignore it,
32741      # but warn the user (except for BASH, which is always set by the calling BASH).
32742      if test "xAS" != xBASH; then
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32744$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32745      fi
32746      # Try to locate tool using the code snippet
32747      for ac_prog in as
32748do
32749  # Extract the first word of "$ac_prog", so it can be a program name with args.
32750set dummy $ac_prog; ac_word=$2
32751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32752$as_echo_n "checking for $ac_word... " >&6; }
32753if ${ac_cv_path_AS+:} false; then :
32754  $as_echo_n "(cached) " >&6
32755else
32756  case $AS in
32757  [\\/]* | ?:[\\/]*)
32758  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32759  ;;
32760  *)
32761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32762for as_dir in $PATH
32763do
32764  IFS=$as_save_IFS
32765  test -z "$as_dir" && as_dir=.
32766    for ac_exec_ext in '' $ac_executable_extensions; do
32767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32768    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32770    break 2
32771  fi
32772done
32773  done
32774IFS=$as_save_IFS
32775
32776  ;;
32777esac
32778fi
32779AS=$ac_cv_path_AS
32780if test -n "$AS"; then
32781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32782$as_echo "$AS" >&6; }
32783else
32784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32785$as_echo "no" >&6; }
32786fi
32787
32788
32789  test -n "$AS" && break
32790done
32791
32792    else
32793      # If it succeeded, then it was overridden by the user. We will use it
32794      # for the tool.
32795
32796      # First remove it from the list of overridden variables, so we can test
32797      # for unknown variables in the end.
32798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32799
32800      # Check if the provided tool contains a complete path.
32801      tool_specified="$AS"
32802      tool_basename="${tool_specified##*/}"
32803      if test "x$tool_basename" = "x$tool_specified"; then
32804        # A command without a complete path is provided, search $PATH.
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32806$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32807        # Extract the first word of "$tool_basename", so it can be a program name with args.
32808set dummy $tool_basename; ac_word=$2
32809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32810$as_echo_n "checking for $ac_word... " >&6; }
32811if ${ac_cv_path_AS+:} false; then :
32812  $as_echo_n "(cached) " >&6
32813else
32814  case $AS in
32815  [\\/]* | ?:[\\/]*)
32816  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32817  ;;
32818  *)
32819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32820for as_dir in $PATH
32821do
32822  IFS=$as_save_IFS
32823  test -z "$as_dir" && as_dir=.
32824    for ac_exec_ext in '' $ac_executable_extensions; do
32825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32826    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32828    break 2
32829  fi
32830done
32831  done
32832IFS=$as_save_IFS
32833
32834  ;;
32835esac
32836fi
32837AS=$ac_cv_path_AS
32838if test -n "$AS"; then
32839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32840$as_echo "$AS" >&6; }
32841else
32842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32843$as_echo "no" >&6; }
32844fi
32845
32846
32847        if test "x$AS" = x; then
32848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32849        fi
32850      else
32851        # Otherwise we believe it is a complete path. Use it as it is.
32852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32853$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32855$as_echo_n "checking for AS... " >&6; }
32856        if test ! -x "$tool_specified"; then
32857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32858$as_echo "not found" >&6; }
32859          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32860        fi
32861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32862$as_echo "$tool_specified" >&6; }
32863      fi
32864    fi
32865  fi
32866
32867
32868
32869  # Only process if variable expands to non-empty
32870
32871  if test "x$AS" != x; then
32872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32873
32874  # First separate the path from the arguments. This will split at the first
32875  # space.
32876  complete="$AS"
32877  path="${complete%% *}"
32878  tmp="$complete EOL"
32879  arguments="${tmp#* }"
32880
32881  # Input might be given as Windows format, start by converting to
32882  # unix format.
32883  new_path=`$CYGPATH -u "$path"`
32884
32885  # Now try to locate executable using which
32886  new_path=`$WHICH "$new_path" 2> /dev/null`
32887  # bat and cmd files are not always considered executable in cygwin causing which
32888  # to not find them
32889  if test "x$new_path" = x \
32890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32892    new_path=`$CYGPATH -u "$path"`
32893  fi
32894  if test "x$new_path" = x; then
32895    # Oops. Which didn't find the executable.
32896    # The splitting of arguments from the executable at a space might have been incorrect,
32897    # since paths with space are more likely in Windows. Give it another try with the whole
32898    # argument.
32899    path="$complete"
32900    arguments="EOL"
32901    new_path=`$CYGPATH -u "$path"`
32902    new_path=`$WHICH "$new_path" 2> /dev/null`
32903    # bat and cmd files are not always considered executable in cygwin causing which
32904    # to not find them
32905    if test "x$new_path" = x \
32906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32908      new_path=`$CYGPATH -u "$path"`
32909    fi
32910    if test "x$new_path" = x; then
32911      # It's still not found. Now this is an unrecoverable error.
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32913$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32914      has_space=`$ECHO "$complete" | $GREP " "`
32915      if test "x$has_space" != x; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32918      fi
32919      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32920    fi
32921  fi
32922
32923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32926  # "foo.exe" is OK but "foo" is an error.
32927  #
32928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32929  # It is also a way to make sure we got the proper file name for the real test later on.
32930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32931  if test "x$test_shortpath" = x; then
32932    # Short path failed, file does not exist as specified.
32933    # Try adding .exe or .cmd
32934    if test -f "${new_path}.exe"; then
32935      input_to_shortpath="${new_path}.exe"
32936    elif test -f "${new_path}.cmd"; then
32937      input_to_shortpath="${new_path}.cmd"
32938    else
32939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32940$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32943      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32944    fi
32945  else
32946    input_to_shortpath="$new_path"
32947  fi
32948
32949  # Call helper function which possibly converts this using DOS-style short mode.
32950  # If so, the updated path is stored in $new_path.
32951  new_path="$input_to_shortpath"
32952
32953  input_path="$input_to_shortpath"
32954  # Check if we need to convert this using DOS-style short mode. If the path
32955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32956  # take no chances and rewrite it.
32957  # Note: m4 eats our [], so we need to use [ and ] instead.
32958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32959  if test "x$has_forbidden_chars" != x; then
32960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32964      # Going to short mode and back again did indeed matter. Since short mode is
32965      # case insensitive, let's make it lowercase to improve readability.
32966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32967      # Now convert it back to Unix-style (cygpath)
32968      input_path=`$CYGPATH -u "$shortmode_path"`
32969      new_path="$input_path"
32970    fi
32971  fi
32972
32973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32974  if test "x$test_cygdrive_prefix" = x; then
32975    # As a simple fix, exclude /usr/bin since it's not a real path.
32976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32978      # a path prefixed by /cygdrive for fixpath to work.
32979      new_path="$CYGWIN_ROOT_PATH$input_path"
32980    fi
32981  fi
32982
32983  # remove trailing .exe if any
32984  new_path="${new_path/%.exe/}"
32985
32986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32987
32988  # First separate the path from the arguments. This will split at the first
32989  # space.
32990  complete="$AS"
32991  path="${complete%% *}"
32992  tmp="$complete EOL"
32993  arguments="${tmp#* }"
32994
32995  # Input might be given as Windows format, start by converting to
32996  # unix format.
32997  new_path="$path"
32998
32999  windows_path="$new_path"
33000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33001    unix_path=`$CYGPATH -u "$windows_path"`
33002    new_path="$unix_path"
33003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33005    new_path="$unix_path"
33006  fi
33007
33008
33009  # Now try to locate executable using which
33010  new_path=`$WHICH "$new_path" 2> /dev/null`
33011
33012  if test "x$new_path" = x; then
33013    # Oops. Which didn't find the executable.
33014    # The splitting of arguments from the executable at a space might have been incorrect,
33015    # since paths with space are more likely in Windows. Give it another try with the whole
33016    # argument.
33017    path="$complete"
33018    arguments="EOL"
33019    new_path="$path"
33020
33021  windows_path="$new_path"
33022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33023    unix_path=`$CYGPATH -u "$windows_path"`
33024    new_path="$unix_path"
33025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33027    new_path="$unix_path"
33028  fi
33029
33030
33031    new_path=`$WHICH "$new_path" 2> /dev/null`
33032    # bat and cmd files are not always considered executable in MSYS causing which
33033    # to not find them
33034    if test "x$new_path" = x \
33035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33037      new_path="$path"
33038
33039  windows_path="$new_path"
33040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33041    unix_path=`$CYGPATH -u "$windows_path"`
33042    new_path="$unix_path"
33043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33045    new_path="$unix_path"
33046  fi
33047
33048    fi
33049
33050    if test "x$new_path" = x; then
33051      # It's still not found. Now this is an unrecoverable error.
33052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33053$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33054      has_space=`$ECHO "$complete" | $GREP " "`
33055      if test "x$has_space" != x; then
33056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33058      fi
33059      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33060    fi
33061  fi
33062
33063  # Now new_path has a complete unix path to the binary
33064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33065    # Keep paths in /bin as-is, but remove trailing .exe if any
33066    new_path="${new_path/%.exe/}"
33067    # Do not save /bin paths to all_fixpath_prefixes!
33068  else
33069    # Not in mixed or Windows style, start by that.
33070    new_path=`cmd //c echo $new_path`
33071
33072  input_path="$new_path"
33073  # Check if we need to convert this using DOS-style short mode. If the path
33074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33075  # take no chances and rewrite it.
33076  # Note: m4 eats our [], so we need to use [ and ] instead.
33077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33078  if test "x$has_forbidden_chars" != x; then
33079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33081  fi
33082
33083    # Output is in $new_path
33084
33085  windows_path="$new_path"
33086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33087    unix_path=`$CYGPATH -u "$windows_path"`
33088    new_path="$unix_path"
33089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33091    new_path="$unix_path"
33092  fi
33093
33094    # remove trailing .exe if any
33095    new_path="${new_path/%.exe/}"
33096
33097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33099  fi
33100
33101    else
33102      # We're on a unix platform. Hooray! :)
33103      # First separate the path from the arguments. This will split at the first
33104      # space.
33105      complete="$AS"
33106      path="${complete%% *}"
33107      tmp="$complete EOL"
33108      arguments="${tmp#* }"
33109
33110      # Cannot rely on the command "which" here since it doesn't always work.
33111      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33112      if test -z "$is_absolute_path"; then
33113        # Path to executable is not absolute. Find it.
33114        IFS_save="$IFS"
33115        IFS=:
33116        for p in $PATH; do
33117          if test -f "$p/$path" && test -x "$p/$path"; then
33118            new_path="$p/$path"
33119            break
33120          fi
33121        done
33122        IFS="$IFS_save"
33123      else
33124        # This is an absolute path, we can use it without further modifications.
33125        new_path="$path"
33126      fi
33127
33128      if test "x$new_path" = x; then
33129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33130$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33131        has_space=`$ECHO "$complete" | $GREP " "`
33132        if test "x$has_space" != x; then
33133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33135        fi
33136        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33137      fi
33138    fi
33139
33140    # Now join together the path and the arguments once again
33141    if test "x$arguments" != xEOL; then
33142      new_complete="$new_path ${arguments% *}"
33143    else
33144      new_complete="$new_path"
33145    fi
33146
33147    if test "x$complete" != "x$new_complete"; then
33148      AS="$new_complete"
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33150$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33151    fi
33152  fi
33153
33154  else
33155    # FIXME: is this correct for microsoft?
33156    AS="$CC -c"
33157  fi
33158
33159
33160  #
33161  # Setup the archiver (AR)
33162  #
33163  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33164    # The corresponding ar tool is lib.exe (used to create static libraries)
33165    # Extract the first word of "lib", so it can be a program name with args.
33166set dummy lib; ac_word=$2
33167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33168$as_echo_n "checking for $ac_word... " >&6; }
33169if ${ac_cv_prog_AR+:} false; then :
33170  $as_echo_n "(cached) " >&6
33171else
33172  if test -n "$AR"; then
33173  ac_cv_prog_AR="$AR" # Let the user override the test.
33174else
33175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33176for as_dir in $PATH
33177do
33178  IFS=$as_save_IFS
33179  test -z "$as_dir" && as_dir=.
33180    for ac_exec_ext in '' $ac_executable_extensions; do
33181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33182    ac_cv_prog_AR="lib"
33183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33184    break 2
33185  fi
33186done
33187  done
33188IFS=$as_save_IFS
33189
33190fi
33191fi
33192AR=$ac_cv_prog_AR
33193if test -n "$AR"; then
33194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33195$as_echo "$AR" >&6; }
33196else
33197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33198$as_echo "no" >&6; }
33199fi
33200
33201
33202  else
33203
33204
33205  # Publish this variable in the help.
33206
33207
33208  if test "x$AR" = x; then
33209    # The variable is not set by user, try to locate tool using the code snippet
33210    if test -n "$ac_tool_prefix"; then
33211  for ac_prog in ar
33212  do
33213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33216$as_echo_n "checking for $ac_word... " >&6; }
33217if ${ac_cv_prog_AR+:} false; then :
33218  $as_echo_n "(cached) " >&6
33219else
33220  if test -n "$AR"; then
33221  ac_cv_prog_AR="$AR" # Let the user override the test.
33222else
33223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33224for as_dir in $PATH
33225do
33226  IFS=$as_save_IFS
33227  test -z "$as_dir" && as_dir=.
33228    for ac_exec_ext in '' $ac_executable_extensions; do
33229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33230    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33232    break 2
33233  fi
33234done
33235  done
33236IFS=$as_save_IFS
33237
33238fi
33239fi
33240AR=$ac_cv_prog_AR
33241if test -n "$AR"; then
33242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33243$as_echo "$AR" >&6; }
33244else
33245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33246$as_echo "no" >&6; }
33247fi
33248
33249
33250    test -n "$AR" && break
33251  done
33252fi
33253if test -z "$AR"; then
33254  ac_ct_AR=$AR
33255  for ac_prog in ar
33256do
33257  # Extract the first word of "$ac_prog", so it can be a program name with args.
33258set dummy $ac_prog; ac_word=$2
33259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33260$as_echo_n "checking for $ac_word... " >&6; }
33261if ${ac_cv_prog_ac_ct_AR+:} false; then :
33262  $as_echo_n "(cached) " >&6
33263else
33264  if test -n "$ac_ct_AR"; then
33265  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33266else
33267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33268for as_dir in $PATH
33269do
33270  IFS=$as_save_IFS
33271  test -z "$as_dir" && as_dir=.
33272    for ac_exec_ext in '' $ac_executable_extensions; do
33273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33274    ac_cv_prog_ac_ct_AR="$ac_prog"
33275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33276    break 2
33277  fi
33278done
33279  done
33280IFS=$as_save_IFS
33281
33282fi
33283fi
33284ac_ct_AR=$ac_cv_prog_ac_ct_AR
33285if test -n "$ac_ct_AR"; then
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33287$as_echo "$ac_ct_AR" >&6; }
33288else
33289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33290$as_echo "no" >&6; }
33291fi
33292
33293
33294  test -n "$ac_ct_AR" && break
33295done
33296
33297  if test "x$ac_ct_AR" = x; then
33298    AR=""
33299  else
33300    case $cross_compiling:$ac_tool_warned in
33301yes:)
33302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33304ac_tool_warned=yes ;;
33305esac
33306    AR=$ac_ct_AR
33307  fi
33308fi
33309
33310  else
33311    # The variable is set, but is it from the command line or the environment?
33312
33313    # Try to remove the string !AR! from our list.
33314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33316      # If it failed, the variable was not from the command line. Ignore it,
33317      # but warn the user (except for BASH, which is always set by the calling BASH).
33318      if test "xAR" != xBASH; then
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33320$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33321      fi
33322      # Try to locate tool using the code snippet
33323      if test -n "$ac_tool_prefix"; then
33324  for ac_prog in ar
33325  do
33326    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33327set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33329$as_echo_n "checking for $ac_word... " >&6; }
33330if ${ac_cv_prog_AR+:} false; then :
33331  $as_echo_n "(cached) " >&6
33332else
33333  if test -n "$AR"; then
33334  ac_cv_prog_AR="$AR" # Let the user override the test.
33335else
33336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33337for as_dir in $PATH
33338do
33339  IFS=$as_save_IFS
33340  test -z "$as_dir" && as_dir=.
33341    for ac_exec_ext in '' $ac_executable_extensions; do
33342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33343    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33345    break 2
33346  fi
33347done
33348  done
33349IFS=$as_save_IFS
33350
33351fi
33352fi
33353AR=$ac_cv_prog_AR
33354if test -n "$AR"; then
33355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33356$as_echo "$AR" >&6; }
33357else
33358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33359$as_echo "no" >&6; }
33360fi
33361
33362
33363    test -n "$AR" && break
33364  done
33365fi
33366if test -z "$AR"; then
33367  ac_ct_AR=$AR
33368  for ac_prog in ar
33369do
33370  # Extract the first word of "$ac_prog", so it can be a program name with args.
33371set dummy $ac_prog; ac_word=$2
33372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33373$as_echo_n "checking for $ac_word... " >&6; }
33374if ${ac_cv_prog_ac_ct_AR+:} false; then :
33375  $as_echo_n "(cached) " >&6
33376else
33377  if test -n "$ac_ct_AR"; then
33378  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33379else
33380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33381for as_dir in $PATH
33382do
33383  IFS=$as_save_IFS
33384  test -z "$as_dir" && as_dir=.
33385    for ac_exec_ext in '' $ac_executable_extensions; do
33386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33387    ac_cv_prog_ac_ct_AR="$ac_prog"
33388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33389    break 2
33390  fi
33391done
33392  done
33393IFS=$as_save_IFS
33394
33395fi
33396fi
33397ac_ct_AR=$ac_cv_prog_ac_ct_AR
33398if test -n "$ac_ct_AR"; then
33399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33400$as_echo "$ac_ct_AR" >&6; }
33401else
33402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33403$as_echo "no" >&6; }
33404fi
33405
33406
33407  test -n "$ac_ct_AR" && break
33408done
33409
33410  if test "x$ac_ct_AR" = x; then
33411    AR=""
33412  else
33413    case $cross_compiling:$ac_tool_warned in
33414yes:)
33415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33417ac_tool_warned=yes ;;
33418esac
33419    AR=$ac_ct_AR
33420  fi
33421fi
33422
33423    else
33424      # If it succeeded, then it was overridden by the user. We will use it
33425      # for the tool.
33426
33427      # First remove it from the list of overridden variables, so we can test
33428      # for unknown variables in the end.
33429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33430
33431      # Check if the provided tool contains a complete path.
33432      tool_specified="$AR"
33433      tool_basename="${tool_specified##*/}"
33434      if test "x$tool_basename" = "x$tool_specified"; then
33435        # A command without a complete path is provided, search $PATH.
33436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33437$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33438        # Extract the first word of "$tool_basename", so it can be a program name with args.
33439set dummy $tool_basename; ac_word=$2
33440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33441$as_echo_n "checking for $ac_word... " >&6; }
33442if ${ac_cv_path_AR+:} false; then :
33443  $as_echo_n "(cached) " >&6
33444else
33445  case $AR in
33446  [\\/]* | ?:[\\/]*)
33447  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33448  ;;
33449  *)
33450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33451for as_dir in $PATH
33452do
33453  IFS=$as_save_IFS
33454  test -z "$as_dir" && as_dir=.
33455    for ac_exec_ext in '' $ac_executable_extensions; do
33456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33457    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33459    break 2
33460  fi
33461done
33462  done
33463IFS=$as_save_IFS
33464
33465  ;;
33466esac
33467fi
33468AR=$ac_cv_path_AR
33469if test -n "$AR"; then
33470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33471$as_echo "$AR" >&6; }
33472else
33473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33474$as_echo "no" >&6; }
33475fi
33476
33477
33478        if test "x$AR" = x; then
33479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33480        fi
33481      else
33482        # Otherwise we believe it is a complete path. Use it as it is.
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33484$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33486$as_echo_n "checking for AR... " >&6; }
33487        if test ! -x "$tool_specified"; then
33488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33489$as_echo "not found" >&6; }
33490          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33491        fi
33492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33493$as_echo "$tool_specified" >&6; }
33494      fi
33495    fi
33496  fi
33497
33498
33499  fi
33500
33501  # Only process if variable expands to non-empty
33502
33503  if test "x$AR" != x; then
33504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33505
33506  # First separate the path from the arguments. This will split at the first
33507  # space.
33508  complete="$AR"
33509  path="${complete%% *}"
33510  tmp="$complete EOL"
33511  arguments="${tmp#* }"
33512
33513  # Input might be given as Windows format, start by converting to
33514  # unix format.
33515  new_path=`$CYGPATH -u "$path"`
33516
33517  # Now try to locate executable using which
33518  new_path=`$WHICH "$new_path" 2> /dev/null`
33519  # bat and cmd files are not always considered executable in cygwin causing which
33520  # to not find them
33521  if test "x$new_path" = x \
33522      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33523      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33524    new_path=`$CYGPATH -u "$path"`
33525  fi
33526  if test "x$new_path" = x; then
33527    # Oops. Which didn't find the executable.
33528    # The splitting of arguments from the executable at a space might have been incorrect,
33529    # since paths with space are more likely in Windows. Give it another try with the whole
33530    # argument.
33531    path="$complete"
33532    arguments="EOL"
33533    new_path=`$CYGPATH -u "$path"`
33534    new_path=`$WHICH "$new_path" 2> /dev/null`
33535    # bat and cmd files are not always considered executable in cygwin causing which
33536    # to not find them
33537    if test "x$new_path" = x \
33538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33540      new_path=`$CYGPATH -u "$path"`
33541    fi
33542    if test "x$new_path" = x; then
33543      # It's still not found. Now this is an unrecoverable error.
33544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33545$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33546      has_space=`$ECHO "$complete" | $GREP " "`
33547      if test "x$has_space" != x; then
33548        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33549$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33550      fi
33551      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33552    fi
33553  fi
33554
33555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33558  # "foo.exe" is OK but "foo" is an error.
33559  #
33560  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33561  # It is also a way to make sure we got the proper file name for the real test later on.
33562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33563  if test "x$test_shortpath" = x; then
33564    # Short path failed, file does not exist as specified.
33565    # Try adding .exe or .cmd
33566    if test -f "${new_path}.exe"; then
33567      input_to_shortpath="${new_path}.exe"
33568    elif test -f "${new_path}.cmd"; then
33569      input_to_shortpath="${new_path}.cmd"
33570    else
33571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33572$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33573      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33574$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33575      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33576    fi
33577  else
33578    input_to_shortpath="$new_path"
33579  fi
33580
33581  # Call helper function which possibly converts this using DOS-style short mode.
33582  # If so, the updated path is stored in $new_path.
33583  new_path="$input_to_shortpath"
33584
33585  input_path="$input_to_shortpath"
33586  # Check if we need to convert this using DOS-style short mode. If the path
33587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33588  # take no chances and rewrite it.
33589  # Note: m4 eats our [], so we need to use [ and ] instead.
33590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33591  if test "x$has_forbidden_chars" != x; then
33592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33596      # Going to short mode and back again did indeed matter. Since short mode is
33597      # case insensitive, let's make it lowercase to improve readability.
33598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33599      # Now convert it back to Unix-style (cygpath)
33600      input_path=`$CYGPATH -u "$shortmode_path"`
33601      new_path="$input_path"
33602    fi
33603  fi
33604
33605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33606  if test "x$test_cygdrive_prefix" = x; then
33607    # As a simple fix, exclude /usr/bin since it's not a real path.
33608    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33610      # a path prefixed by /cygdrive for fixpath to work.
33611      new_path="$CYGWIN_ROOT_PATH$input_path"
33612    fi
33613  fi
33614
33615  # remove trailing .exe if any
33616  new_path="${new_path/%.exe/}"
33617
33618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33619
33620  # First separate the path from the arguments. This will split at the first
33621  # space.
33622  complete="$AR"
33623  path="${complete%% *}"
33624  tmp="$complete EOL"
33625  arguments="${tmp#* }"
33626
33627  # Input might be given as Windows format, start by converting to
33628  # unix format.
33629  new_path="$path"
33630
33631  windows_path="$new_path"
33632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33633    unix_path=`$CYGPATH -u "$windows_path"`
33634    new_path="$unix_path"
33635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33637    new_path="$unix_path"
33638  fi
33639
33640
33641  # Now try to locate executable using which
33642  new_path=`$WHICH "$new_path" 2> /dev/null`
33643
33644  if test "x$new_path" = x; then
33645    # Oops. Which didn't find the executable.
33646    # The splitting of arguments from the executable at a space might have been incorrect,
33647    # since paths with space are more likely in Windows. Give it another try with the whole
33648    # argument.
33649    path="$complete"
33650    arguments="EOL"
33651    new_path="$path"
33652
33653  windows_path="$new_path"
33654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655    unix_path=`$CYGPATH -u "$windows_path"`
33656    new_path="$unix_path"
33657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33659    new_path="$unix_path"
33660  fi
33661
33662
33663    new_path=`$WHICH "$new_path" 2> /dev/null`
33664    # bat and cmd files are not always considered executable in MSYS causing which
33665    # to not find them
33666    if test "x$new_path" = x \
33667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33669      new_path="$path"
33670
33671  windows_path="$new_path"
33672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33673    unix_path=`$CYGPATH -u "$windows_path"`
33674    new_path="$unix_path"
33675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33677    new_path="$unix_path"
33678  fi
33679
33680    fi
33681
33682    if test "x$new_path" = x; then
33683      # It's still not found. Now this is an unrecoverable error.
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33685$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33686      has_space=`$ECHO "$complete" | $GREP " "`
33687      if test "x$has_space" != x; then
33688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33690      fi
33691      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33692    fi
33693  fi
33694
33695  # Now new_path has a complete unix path to the binary
33696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33697    # Keep paths in /bin as-is, but remove trailing .exe if any
33698    new_path="${new_path/%.exe/}"
33699    # Do not save /bin paths to all_fixpath_prefixes!
33700  else
33701    # Not in mixed or Windows style, start by that.
33702    new_path=`cmd //c echo $new_path`
33703
33704  input_path="$new_path"
33705  # Check if we need to convert this using DOS-style short mode. If the path
33706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33707  # take no chances and rewrite it.
33708  # Note: m4 eats our [], so we need to use [ and ] instead.
33709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33710  if test "x$has_forbidden_chars" != x; then
33711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33713  fi
33714
33715    # Output is in $new_path
33716
33717  windows_path="$new_path"
33718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33719    unix_path=`$CYGPATH -u "$windows_path"`
33720    new_path="$unix_path"
33721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33723    new_path="$unix_path"
33724  fi
33725
33726    # remove trailing .exe if any
33727    new_path="${new_path/%.exe/}"
33728
33729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33731  fi
33732
33733    else
33734      # We're on a unix platform. Hooray! :)
33735      # First separate the path from the arguments. This will split at the first
33736      # space.
33737      complete="$AR"
33738      path="${complete%% *}"
33739      tmp="$complete EOL"
33740      arguments="${tmp#* }"
33741
33742      # Cannot rely on the command "which" here since it doesn't always work.
33743      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33744      if test -z "$is_absolute_path"; then
33745        # Path to executable is not absolute. Find it.
33746        IFS_save="$IFS"
33747        IFS=:
33748        for p in $PATH; do
33749          if test -f "$p/$path" && test -x "$p/$path"; then
33750            new_path="$p/$path"
33751            break
33752          fi
33753        done
33754        IFS="$IFS_save"
33755      else
33756        # This is an absolute path, we can use it without further modifications.
33757        new_path="$path"
33758      fi
33759
33760      if test "x$new_path" = x; then
33761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33762$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33763        has_space=`$ECHO "$complete" | $GREP " "`
33764        if test "x$has_space" != x; then
33765          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33767        fi
33768        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33769      fi
33770    fi
33771
33772    # Now join together the path and the arguments once again
33773    if test "x$arguments" != xEOL; then
33774      new_complete="$new_path ${arguments% *}"
33775    else
33776      new_complete="$new_path"
33777    fi
33778
33779    if test "x$complete" != "x$new_complete"; then
33780      AR="$new_complete"
33781      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33782$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33783    fi
33784  fi
33785
33786
33787
33788  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33789
33790
33791  # Publish this variable in the help.
33792
33793
33794  if test "x$LIPO" = x; then
33795    # The variable is not set by user, try to locate tool using the code snippet
33796    for ac_prog in lipo
33797do
33798  # Extract the first word of "$ac_prog", so it can be a program name with args.
33799set dummy $ac_prog; ac_word=$2
33800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33801$as_echo_n "checking for $ac_word... " >&6; }
33802if ${ac_cv_path_LIPO+:} false; then :
33803  $as_echo_n "(cached) " >&6
33804else
33805  case $LIPO in
33806  [\\/]* | ?:[\\/]*)
33807  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33808  ;;
33809  *)
33810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33811for as_dir in $PATH
33812do
33813  IFS=$as_save_IFS
33814  test -z "$as_dir" && as_dir=.
33815    for ac_exec_ext in '' $ac_executable_extensions; do
33816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33817    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33819    break 2
33820  fi
33821done
33822  done
33823IFS=$as_save_IFS
33824
33825  ;;
33826esac
33827fi
33828LIPO=$ac_cv_path_LIPO
33829if test -n "$LIPO"; then
33830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33831$as_echo "$LIPO" >&6; }
33832else
33833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33834$as_echo "no" >&6; }
33835fi
33836
33837
33838  test -n "$LIPO" && break
33839done
33840
33841  else
33842    # The variable is set, but is it from the command line or the environment?
33843
33844    # Try to remove the string !LIPO! from our list.
33845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33847      # If it failed, the variable was not from the command line. Ignore it,
33848      # but warn the user (except for BASH, which is always set by the calling BASH).
33849      if test "xLIPO" != xBASH; then
33850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33851$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33852      fi
33853      # Try to locate tool using the code snippet
33854      for ac_prog in lipo
33855do
33856  # Extract the first word of "$ac_prog", so it can be a program name with args.
33857set dummy $ac_prog; ac_word=$2
33858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33859$as_echo_n "checking for $ac_word... " >&6; }
33860if ${ac_cv_path_LIPO+:} false; then :
33861  $as_echo_n "(cached) " >&6
33862else
33863  case $LIPO in
33864  [\\/]* | ?:[\\/]*)
33865  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33866  ;;
33867  *)
33868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33869for as_dir in $PATH
33870do
33871  IFS=$as_save_IFS
33872  test -z "$as_dir" && as_dir=.
33873    for ac_exec_ext in '' $ac_executable_extensions; do
33874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33875    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33877    break 2
33878  fi
33879done
33880  done
33881IFS=$as_save_IFS
33882
33883  ;;
33884esac
33885fi
33886LIPO=$ac_cv_path_LIPO
33887if test -n "$LIPO"; then
33888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33889$as_echo "$LIPO" >&6; }
33890else
33891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33892$as_echo "no" >&6; }
33893fi
33894
33895
33896  test -n "$LIPO" && break
33897done
33898
33899    else
33900      # If it succeeded, then it was overridden by the user. We will use it
33901      # for the tool.
33902
33903      # First remove it from the list of overridden variables, so we can test
33904      # for unknown variables in the end.
33905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33906
33907      # Check if the provided tool contains a complete path.
33908      tool_specified="$LIPO"
33909      tool_basename="${tool_specified##*/}"
33910      if test "x$tool_basename" = "x$tool_specified"; then
33911        # A command without a complete path is provided, search $PATH.
33912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33913$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33914        # Extract the first word of "$tool_basename", so it can be a program name with args.
33915set dummy $tool_basename; ac_word=$2
33916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33917$as_echo_n "checking for $ac_word... " >&6; }
33918if ${ac_cv_path_LIPO+:} false; then :
33919  $as_echo_n "(cached) " >&6
33920else
33921  case $LIPO in
33922  [\\/]* | ?:[\\/]*)
33923  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33924  ;;
33925  *)
33926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33927for as_dir in $PATH
33928do
33929  IFS=$as_save_IFS
33930  test -z "$as_dir" && as_dir=.
33931    for ac_exec_ext in '' $ac_executable_extensions; do
33932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33933    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33935    break 2
33936  fi
33937done
33938  done
33939IFS=$as_save_IFS
33940
33941  ;;
33942esac
33943fi
33944LIPO=$ac_cv_path_LIPO
33945if test -n "$LIPO"; then
33946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33947$as_echo "$LIPO" >&6; }
33948else
33949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33950$as_echo "no" >&6; }
33951fi
33952
33953
33954        if test "x$LIPO" = x; then
33955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33956        fi
33957      else
33958        # Otherwise we believe it is a complete path. Use it as it is.
33959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33960$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33962$as_echo_n "checking for LIPO... " >&6; }
33963        if test ! -x "$tool_specified"; then
33964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33965$as_echo "not found" >&6; }
33966          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33967        fi
33968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33969$as_echo "$tool_specified" >&6; }
33970      fi
33971    fi
33972  fi
33973
33974
33975
33976  # Only process if variable expands to non-empty
33977
33978  if test "x$LIPO" != x; then
33979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33980
33981  # First separate the path from the arguments. This will split at the first
33982  # space.
33983  complete="$LIPO"
33984  path="${complete%% *}"
33985  tmp="$complete EOL"
33986  arguments="${tmp#* }"
33987
33988  # Input might be given as Windows format, start by converting to
33989  # unix format.
33990  new_path=`$CYGPATH -u "$path"`
33991
33992  # Now try to locate executable using which
33993  new_path=`$WHICH "$new_path" 2> /dev/null`
33994  # bat and cmd files are not always considered executable in cygwin causing which
33995  # to not find them
33996  if test "x$new_path" = x \
33997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33999    new_path=`$CYGPATH -u "$path"`
34000  fi
34001  if test "x$new_path" = x; then
34002    # Oops. Which didn't find the executable.
34003    # The splitting of arguments from the executable at a space might have been incorrect,
34004    # since paths with space are more likely in Windows. Give it another try with the whole
34005    # argument.
34006    path="$complete"
34007    arguments="EOL"
34008    new_path=`$CYGPATH -u "$path"`
34009    new_path=`$WHICH "$new_path" 2> /dev/null`
34010    # bat and cmd files are not always considered executable in cygwin causing which
34011    # to not find them
34012    if test "x$new_path" = x \
34013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34015      new_path=`$CYGPATH -u "$path"`
34016    fi
34017    if test "x$new_path" = x; then
34018      # It's still not found. Now this is an unrecoverable error.
34019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34020$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34021      has_space=`$ECHO "$complete" | $GREP " "`
34022      if test "x$has_space" != x; then
34023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34025      fi
34026      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34027    fi
34028  fi
34029
34030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34033  # "foo.exe" is OK but "foo" is an error.
34034  #
34035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34036  # It is also a way to make sure we got the proper file name for the real test later on.
34037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34038  if test "x$test_shortpath" = x; then
34039    # Short path failed, file does not exist as specified.
34040    # Try adding .exe or .cmd
34041    if test -f "${new_path}.exe"; then
34042      input_to_shortpath="${new_path}.exe"
34043    elif test -f "${new_path}.cmd"; then
34044      input_to_shortpath="${new_path}.cmd"
34045    else
34046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34047$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34050      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34051    fi
34052  else
34053    input_to_shortpath="$new_path"
34054  fi
34055
34056  # Call helper function which possibly converts this using DOS-style short mode.
34057  # If so, the updated path is stored in $new_path.
34058  new_path="$input_to_shortpath"
34059
34060  input_path="$input_to_shortpath"
34061  # Check if we need to convert this using DOS-style short mode. If the path
34062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34063  # take no chances and rewrite it.
34064  # Note: m4 eats our [], so we need to use [ and ] instead.
34065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34066  if test "x$has_forbidden_chars" != x; then
34067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34071      # Going to short mode and back again did indeed matter. Since short mode is
34072      # case insensitive, let's make it lowercase to improve readability.
34073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34074      # Now convert it back to Unix-style (cygpath)
34075      input_path=`$CYGPATH -u "$shortmode_path"`
34076      new_path="$input_path"
34077    fi
34078  fi
34079
34080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34081  if test "x$test_cygdrive_prefix" = x; then
34082    # As a simple fix, exclude /usr/bin since it's not a real path.
34083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34085      # a path prefixed by /cygdrive for fixpath to work.
34086      new_path="$CYGWIN_ROOT_PATH$input_path"
34087    fi
34088  fi
34089
34090  # remove trailing .exe if any
34091  new_path="${new_path/%.exe/}"
34092
34093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34094
34095  # First separate the path from the arguments. This will split at the first
34096  # space.
34097  complete="$LIPO"
34098  path="${complete%% *}"
34099  tmp="$complete EOL"
34100  arguments="${tmp#* }"
34101
34102  # Input might be given as Windows format, start by converting to
34103  # unix format.
34104  new_path="$path"
34105
34106  windows_path="$new_path"
34107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34108    unix_path=`$CYGPATH -u "$windows_path"`
34109    new_path="$unix_path"
34110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34112    new_path="$unix_path"
34113  fi
34114
34115
34116  # Now try to locate executable using which
34117  new_path=`$WHICH "$new_path" 2> /dev/null`
34118
34119  if test "x$new_path" = x; then
34120    # Oops. Which didn't find the executable.
34121    # The splitting of arguments from the executable at a space might have been incorrect,
34122    # since paths with space are more likely in Windows. Give it another try with the whole
34123    # argument.
34124    path="$complete"
34125    arguments="EOL"
34126    new_path="$path"
34127
34128  windows_path="$new_path"
34129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34130    unix_path=`$CYGPATH -u "$windows_path"`
34131    new_path="$unix_path"
34132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34134    new_path="$unix_path"
34135  fi
34136
34137
34138    new_path=`$WHICH "$new_path" 2> /dev/null`
34139    # bat and cmd files are not always considered executable in MSYS causing which
34140    # to not find them
34141    if test "x$new_path" = x \
34142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34144      new_path="$path"
34145
34146  windows_path="$new_path"
34147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34148    unix_path=`$CYGPATH -u "$windows_path"`
34149    new_path="$unix_path"
34150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34152    new_path="$unix_path"
34153  fi
34154
34155    fi
34156
34157    if test "x$new_path" = x; then
34158      # It's still not found. Now this is an unrecoverable error.
34159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34160$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34161      has_space=`$ECHO "$complete" | $GREP " "`
34162      if test "x$has_space" != x; then
34163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34165      fi
34166      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34167    fi
34168  fi
34169
34170  # Now new_path has a complete unix path to the binary
34171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34172    # Keep paths in /bin as-is, but remove trailing .exe if any
34173    new_path="${new_path/%.exe/}"
34174    # Do not save /bin paths to all_fixpath_prefixes!
34175  else
34176    # Not in mixed or Windows style, start by that.
34177    new_path=`cmd //c echo $new_path`
34178
34179  input_path="$new_path"
34180  # Check if we need to convert this using DOS-style short mode. If the path
34181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34182  # take no chances and rewrite it.
34183  # Note: m4 eats our [], so we need to use [ and ] instead.
34184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34185  if test "x$has_forbidden_chars" != x; then
34186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34188  fi
34189
34190    # Output is in $new_path
34191
34192  windows_path="$new_path"
34193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34194    unix_path=`$CYGPATH -u "$windows_path"`
34195    new_path="$unix_path"
34196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34198    new_path="$unix_path"
34199  fi
34200
34201    # remove trailing .exe if any
34202    new_path="${new_path/%.exe/}"
34203
34204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34206  fi
34207
34208    else
34209      # We're on a unix platform. Hooray! :)
34210      # First separate the path from the arguments. This will split at the first
34211      # space.
34212      complete="$LIPO"
34213      path="${complete%% *}"
34214      tmp="$complete EOL"
34215      arguments="${tmp#* }"
34216
34217      # Cannot rely on the command "which" here since it doesn't always work.
34218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34219      if test -z "$is_absolute_path"; then
34220        # Path to executable is not absolute. Find it.
34221        IFS_save="$IFS"
34222        IFS=:
34223        for p in $PATH; do
34224          if test -f "$p/$path" && test -x "$p/$path"; then
34225            new_path="$p/$path"
34226            break
34227          fi
34228        done
34229        IFS="$IFS_save"
34230      else
34231        # This is an absolute path, we can use it without further modifications.
34232        new_path="$path"
34233      fi
34234
34235      if test "x$new_path" = x; then
34236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34237$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34238        has_space=`$ECHO "$complete" | $GREP " "`
34239        if test "x$has_space" != x; then
34240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34242        fi
34243        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34244      fi
34245    fi
34246
34247    # Now join together the path and the arguments once again
34248    if test "x$arguments" != xEOL; then
34249      new_complete="$new_path ${arguments% *}"
34250    else
34251      new_complete="$new_path"
34252    fi
34253
34254    if test "x$complete" != "x$new_complete"; then
34255      LIPO="$new_complete"
34256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34257$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34258    fi
34259  fi
34260
34261  fi
34262
34263  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34264    # Extract the first word of "mt", so it can be a program name with args.
34265set dummy mt; ac_word=$2
34266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34267$as_echo_n "checking for $ac_word... " >&6; }
34268if ${ac_cv_prog_MT+:} false; then :
34269  $as_echo_n "(cached) " >&6
34270else
34271  if test -n "$MT"; then
34272  ac_cv_prog_MT="$MT" # Let the user override the test.
34273else
34274  ac_prog_rejected=no
34275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34276for as_dir in $PATH
34277do
34278  IFS=$as_save_IFS
34279  test -z "$as_dir" && as_dir=.
34280    for ac_exec_ext in '' $ac_executable_extensions; do
34281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34282    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34283       ac_prog_rejected=yes
34284       continue
34285     fi
34286    ac_cv_prog_MT="mt"
34287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34288    break 2
34289  fi
34290done
34291  done
34292IFS=$as_save_IFS
34293
34294if test $ac_prog_rejected = yes; then
34295  # We found a bogon in the path, so make sure we never use it.
34296  set dummy $ac_cv_prog_MT
34297  shift
34298  if test $# != 0; then
34299    # We chose a different compiler from the bogus one.
34300    # However, it has the same basename, so the bogon will be chosen
34301    # first if we set MT to just the basename; use the full file name.
34302    shift
34303    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34304  fi
34305fi
34306fi
34307fi
34308MT=$ac_cv_prog_MT
34309if test -n "$MT"; then
34310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34311$as_echo "$MT" >&6; }
34312else
34313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34314$as_echo "no" >&6; }
34315fi
34316
34317
34318
34319  # Only process if variable expands to non-empty
34320
34321  if test "x$MT" != x; then
34322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34323
34324  # First separate the path from the arguments. This will split at the first
34325  # space.
34326  complete="$MT"
34327  path="${complete%% *}"
34328  tmp="$complete EOL"
34329  arguments="${tmp#* }"
34330
34331  # Input might be given as Windows format, start by converting to
34332  # unix format.
34333  new_path=`$CYGPATH -u "$path"`
34334
34335  # Now try to locate executable using which
34336  new_path=`$WHICH "$new_path" 2> /dev/null`
34337  # bat and cmd files are not always considered executable in cygwin causing which
34338  # to not find them
34339  if test "x$new_path" = x \
34340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34342    new_path=`$CYGPATH -u "$path"`
34343  fi
34344  if test "x$new_path" = x; then
34345    # Oops. Which didn't find the executable.
34346    # The splitting of arguments from the executable at a space might have been incorrect,
34347    # since paths with space are more likely in Windows. Give it another try with the whole
34348    # argument.
34349    path="$complete"
34350    arguments="EOL"
34351    new_path=`$CYGPATH -u "$path"`
34352    new_path=`$WHICH "$new_path" 2> /dev/null`
34353    # bat and cmd files are not always considered executable in cygwin causing which
34354    # to not find them
34355    if test "x$new_path" = x \
34356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34358      new_path=`$CYGPATH -u "$path"`
34359    fi
34360    if test "x$new_path" = x; then
34361      # It's still not found. Now this is an unrecoverable error.
34362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34363$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34364      has_space=`$ECHO "$complete" | $GREP " "`
34365      if test "x$has_space" != x; then
34366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34368      fi
34369      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34370    fi
34371  fi
34372
34373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34376  # "foo.exe" is OK but "foo" is an error.
34377  #
34378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34379  # It is also a way to make sure we got the proper file name for the real test later on.
34380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34381  if test "x$test_shortpath" = x; then
34382    # Short path failed, file does not exist as specified.
34383    # Try adding .exe or .cmd
34384    if test -f "${new_path}.exe"; then
34385      input_to_shortpath="${new_path}.exe"
34386    elif test -f "${new_path}.cmd"; then
34387      input_to_shortpath="${new_path}.cmd"
34388    else
34389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34390$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34393      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34394    fi
34395  else
34396    input_to_shortpath="$new_path"
34397  fi
34398
34399  # Call helper function which possibly converts this using DOS-style short mode.
34400  # If so, the updated path is stored in $new_path.
34401  new_path="$input_to_shortpath"
34402
34403  input_path="$input_to_shortpath"
34404  # Check if we need to convert this using DOS-style short mode. If the path
34405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34406  # take no chances and rewrite it.
34407  # Note: m4 eats our [], so we need to use [ and ] instead.
34408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34409  if test "x$has_forbidden_chars" != x; then
34410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34414      # Going to short mode and back again did indeed matter. Since short mode is
34415      # case insensitive, let's make it lowercase to improve readability.
34416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34417      # Now convert it back to Unix-style (cygpath)
34418      input_path=`$CYGPATH -u "$shortmode_path"`
34419      new_path="$input_path"
34420    fi
34421  fi
34422
34423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34424  if test "x$test_cygdrive_prefix" = x; then
34425    # As a simple fix, exclude /usr/bin since it's not a real path.
34426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34428      # a path prefixed by /cygdrive for fixpath to work.
34429      new_path="$CYGWIN_ROOT_PATH$input_path"
34430    fi
34431  fi
34432
34433  # remove trailing .exe if any
34434  new_path="${new_path/%.exe/}"
34435
34436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34437
34438  # First separate the path from the arguments. This will split at the first
34439  # space.
34440  complete="$MT"
34441  path="${complete%% *}"
34442  tmp="$complete EOL"
34443  arguments="${tmp#* }"
34444
34445  # Input might be given as Windows format, start by converting to
34446  # unix format.
34447  new_path="$path"
34448
34449  windows_path="$new_path"
34450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34451    unix_path=`$CYGPATH -u "$windows_path"`
34452    new_path="$unix_path"
34453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34455    new_path="$unix_path"
34456  fi
34457
34458
34459  # Now try to locate executable using which
34460  new_path=`$WHICH "$new_path" 2> /dev/null`
34461
34462  if test "x$new_path" = x; then
34463    # Oops. Which didn't find the executable.
34464    # The splitting of arguments from the executable at a space might have been incorrect,
34465    # since paths with space are more likely in Windows. Give it another try with the whole
34466    # argument.
34467    path="$complete"
34468    arguments="EOL"
34469    new_path="$path"
34470
34471  windows_path="$new_path"
34472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34473    unix_path=`$CYGPATH -u "$windows_path"`
34474    new_path="$unix_path"
34475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34477    new_path="$unix_path"
34478  fi
34479
34480
34481    new_path=`$WHICH "$new_path" 2> /dev/null`
34482    # bat and cmd files are not always considered executable in MSYS causing which
34483    # to not find them
34484    if test "x$new_path" = x \
34485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34487      new_path="$path"
34488
34489  windows_path="$new_path"
34490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34491    unix_path=`$CYGPATH -u "$windows_path"`
34492    new_path="$unix_path"
34493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34495    new_path="$unix_path"
34496  fi
34497
34498    fi
34499
34500    if test "x$new_path" = x; then
34501      # It's still not found. Now this is an unrecoverable error.
34502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34503$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34504      has_space=`$ECHO "$complete" | $GREP " "`
34505      if test "x$has_space" != x; then
34506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34508      fi
34509      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34510    fi
34511  fi
34512
34513  # Now new_path has a complete unix path to the binary
34514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34515    # Keep paths in /bin as-is, but remove trailing .exe if any
34516    new_path="${new_path/%.exe/}"
34517    # Do not save /bin paths to all_fixpath_prefixes!
34518  else
34519    # Not in mixed or Windows style, start by that.
34520    new_path=`cmd //c echo $new_path`
34521
34522  input_path="$new_path"
34523  # Check if we need to convert this using DOS-style short mode. If the path
34524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34525  # take no chances and rewrite it.
34526  # Note: m4 eats our [], so we need to use [ and ] instead.
34527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34528  if test "x$has_forbidden_chars" != x; then
34529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34531  fi
34532
34533    # Output is in $new_path
34534
34535  windows_path="$new_path"
34536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34537    unix_path=`$CYGPATH -u "$windows_path"`
34538    new_path="$unix_path"
34539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34541    new_path="$unix_path"
34542  fi
34543
34544    # remove trailing .exe if any
34545    new_path="${new_path/%.exe/}"
34546
34547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34549  fi
34550
34551    else
34552      # We're on a unix platform. Hooray! :)
34553      # First separate the path from the arguments. This will split at the first
34554      # space.
34555      complete="$MT"
34556      path="${complete%% *}"
34557      tmp="$complete EOL"
34558      arguments="${tmp#* }"
34559
34560      # Cannot rely on the command "which" here since it doesn't always work.
34561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34562      if test -z "$is_absolute_path"; then
34563        # Path to executable is not absolute. Find it.
34564        IFS_save="$IFS"
34565        IFS=:
34566        for p in $PATH; do
34567          if test -f "$p/$path" && test -x "$p/$path"; then
34568            new_path="$p/$path"
34569            break
34570          fi
34571        done
34572        IFS="$IFS_save"
34573      else
34574        # This is an absolute path, we can use it without further modifications.
34575        new_path="$path"
34576      fi
34577
34578      if test "x$new_path" = x; then
34579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34580$as_echo "$as_me: The path of MT, 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}: This might be caused by spaces in the path, which is not allowed." >&5
34584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34585        fi
34586        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34587      fi
34588    fi
34589
34590    # Now join together the path and the arguments once again
34591    if test "x$arguments" != xEOL; then
34592      new_complete="$new_path ${arguments% *}"
34593    else
34594      new_complete="$new_path"
34595    fi
34596
34597    if test "x$complete" != "x$new_complete"; then
34598      MT="$new_complete"
34599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34600$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34601    fi
34602  fi
34603
34604    # Setup the resource compiler (RC)
34605    # Extract the first word of "rc", so it can be a program name with args.
34606set dummy rc; ac_word=$2
34607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34608$as_echo_n "checking for $ac_word... " >&6; }
34609if ${ac_cv_prog_RC+:} false; then :
34610  $as_echo_n "(cached) " >&6
34611else
34612  if test -n "$RC"; then
34613  ac_cv_prog_RC="$RC" # Let the user override the test.
34614else
34615  ac_prog_rejected=no
34616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34617for as_dir in $PATH
34618do
34619  IFS=$as_save_IFS
34620  test -z "$as_dir" && as_dir=.
34621    for ac_exec_ext in '' $ac_executable_extensions; do
34622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34623    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34624       ac_prog_rejected=yes
34625       continue
34626     fi
34627    ac_cv_prog_RC="rc"
34628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34629    break 2
34630  fi
34631done
34632  done
34633IFS=$as_save_IFS
34634
34635if test $ac_prog_rejected = yes; then
34636  # We found a bogon in the path, so make sure we never use it.
34637  set dummy $ac_cv_prog_RC
34638  shift
34639  if test $# != 0; then
34640    # We chose a different compiler from the bogus one.
34641    # However, it has the same basename, so the bogon will be chosen
34642    # first if we set RC to just the basename; use the full file name.
34643    shift
34644    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34645  fi
34646fi
34647fi
34648fi
34649RC=$ac_cv_prog_RC
34650if test -n "$RC"; then
34651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34652$as_echo "$RC" >&6; }
34653else
34654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34655$as_echo "no" >&6; }
34656fi
34657
34658
34659
34660  # Only process if variable expands to non-empty
34661
34662  if test "x$RC" != x; then
34663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34664
34665  # First separate the path from the arguments. This will split at the first
34666  # space.
34667  complete="$RC"
34668  path="${complete%% *}"
34669  tmp="$complete EOL"
34670  arguments="${tmp#* }"
34671
34672  # Input might be given as Windows format, start by converting to
34673  # unix format.
34674  new_path=`$CYGPATH -u "$path"`
34675
34676  # Now try to locate executable using which
34677  new_path=`$WHICH "$new_path" 2> /dev/null`
34678  # bat and cmd files are not always considered executable in cygwin causing which
34679  # to not find them
34680  if test "x$new_path" = x \
34681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34683    new_path=`$CYGPATH -u "$path"`
34684  fi
34685  if test "x$new_path" = x; then
34686    # Oops. Which didn't find the executable.
34687    # The splitting of arguments from the executable at a space might have been incorrect,
34688    # since paths with space are more likely in Windows. Give it another try with the whole
34689    # argument.
34690    path="$complete"
34691    arguments="EOL"
34692    new_path=`$CYGPATH -u "$path"`
34693    new_path=`$WHICH "$new_path" 2> /dev/null`
34694    # bat and cmd files are not always considered executable in cygwin causing which
34695    # to not find them
34696    if test "x$new_path" = x \
34697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34699      new_path=`$CYGPATH -u "$path"`
34700    fi
34701    if test "x$new_path" = x; then
34702      # It's still not found. Now this is an unrecoverable error.
34703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34704$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34705      has_space=`$ECHO "$complete" | $GREP " "`
34706      if test "x$has_space" != x; then
34707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34709      fi
34710      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34711    fi
34712  fi
34713
34714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34717  # "foo.exe" is OK but "foo" is an error.
34718  #
34719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34720  # It is also a way to make sure we got the proper file name for the real test later on.
34721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34722  if test "x$test_shortpath" = x; then
34723    # Short path failed, file does not exist as specified.
34724    # Try adding .exe or .cmd
34725    if test -f "${new_path}.exe"; then
34726      input_to_shortpath="${new_path}.exe"
34727    elif test -f "${new_path}.cmd"; then
34728      input_to_shortpath="${new_path}.cmd"
34729    else
34730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34731$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34734      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34735    fi
34736  else
34737    input_to_shortpath="$new_path"
34738  fi
34739
34740  # Call helper function which possibly converts this using DOS-style short mode.
34741  # If so, the updated path is stored in $new_path.
34742  new_path="$input_to_shortpath"
34743
34744  input_path="$input_to_shortpath"
34745  # Check if we need to convert this using DOS-style short mode. If the path
34746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34747  # take no chances and rewrite it.
34748  # Note: m4 eats our [], so we need to use [ and ] instead.
34749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34750  if test "x$has_forbidden_chars" != x; then
34751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34755      # Going to short mode and back again did indeed matter. Since short mode is
34756      # case insensitive, let's make it lowercase to improve readability.
34757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34758      # Now convert it back to Unix-style (cygpath)
34759      input_path=`$CYGPATH -u "$shortmode_path"`
34760      new_path="$input_path"
34761    fi
34762  fi
34763
34764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34765  if test "x$test_cygdrive_prefix" = x; then
34766    # As a simple fix, exclude /usr/bin since it's not a real path.
34767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34769      # a path prefixed by /cygdrive for fixpath to work.
34770      new_path="$CYGWIN_ROOT_PATH$input_path"
34771    fi
34772  fi
34773
34774  # remove trailing .exe if any
34775  new_path="${new_path/%.exe/}"
34776
34777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34778
34779  # First separate the path from the arguments. This will split at the first
34780  # space.
34781  complete="$RC"
34782  path="${complete%% *}"
34783  tmp="$complete EOL"
34784  arguments="${tmp#* }"
34785
34786  # Input might be given as Windows format, start by converting to
34787  # unix format.
34788  new_path="$path"
34789
34790  windows_path="$new_path"
34791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34792    unix_path=`$CYGPATH -u "$windows_path"`
34793    new_path="$unix_path"
34794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34796    new_path="$unix_path"
34797  fi
34798
34799
34800  # Now try to locate executable using which
34801  new_path=`$WHICH "$new_path" 2> /dev/null`
34802
34803  if test "x$new_path" = x; then
34804    # Oops. Which didn't find the executable.
34805    # The splitting of arguments from the executable at a space might have been incorrect,
34806    # since paths with space are more likely in Windows. Give it another try with the whole
34807    # argument.
34808    path="$complete"
34809    arguments="EOL"
34810    new_path="$path"
34811
34812  windows_path="$new_path"
34813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34814    unix_path=`$CYGPATH -u "$windows_path"`
34815    new_path="$unix_path"
34816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34818    new_path="$unix_path"
34819  fi
34820
34821
34822    new_path=`$WHICH "$new_path" 2> /dev/null`
34823    # bat and cmd files are not always considered executable in MSYS causing which
34824    # to not find them
34825    if test "x$new_path" = x \
34826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34828      new_path="$path"
34829
34830  windows_path="$new_path"
34831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34832    unix_path=`$CYGPATH -u "$windows_path"`
34833    new_path="$unix_path"
34834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34836    new_path="$unix_path"
34837  fi
34838
34839    fi
34840
34841    if test "x$new_path" = x; then
34842      # It's still not found. Now this is an unrecoverable error.
34843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34844$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34845      has_space=`$ECHO "$complete" | $GREP " "`
34846      if test "x$has_space" != x; then
34847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34849      fi
34850      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34851    fi
34852  fi
34853
34854  # Now new_path has a complete unix path to the binary
34855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34856    # Keep paths in /bin as-is, but remove trailing .exe if any
34857    new_path="${new_path/%.exe/}"
34858    # Do not save /bin paths to all_fixpath_prefixes!
34859  else
34860    # Not in mixed or Windows style, start by that.
34861    new_path=`cmd //c echo $new_path`
34862
34863  input_path="$new_path"
34864  # Check if we need to convert this using DOS-style short mode. If the path
34865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34866  # take no chances and rewrite it.
34867  # Note: m4 eats our [], so we need to use [ and ] instead.
34868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34869  if test "x$has_forbidden_chars" != x; then
34870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34872  fi
34873
34874    # Output is in $new_path
34875
34876  windows_path="$new_path"
34877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34878    unix_path=`$CYGPATH -u "$windows_path"`
34879    new_path="$unix_path"
34880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34882    new_path="$unix_path"
34883  fi
34884
34885    # remove trailing .exe if any
34886    new_path="${new_path/%.exe/}"
34887
34888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34890  fi
34891
34892    else
34893      # We're on a unix platform. Hooray! :)
34894      # First separate the path from the arguments. This will split at the first
34895      # space.
34896      complete="$RC"
34897      path="${complete%% *}"
34898      tmp="$complete EOL"
34899      arguments="${tmp#* }"
34900
34901      # Cannot rely on the command "which" here since it doesn't always work.
34902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34903      if test -z "$is_absolute_path"; then
34904        # Path to executable is not absolute. Find it.
34905        IFS_save="$IFS"
34906        IFS=:
34907        for p in $PATH; do
34908          if test -f "$p/$path" && test -x "$p/$path"; then
34909            new_path="$p/$path"
34910            break
34911          fi
34912        done
34913        IFS="$IFS_save"
34914      else
34915        # This is an absolute path, we can use it without further modifications.
34916        new_path="$path"
34917      fi
34918
34919      if test "x$new_path" = x; then
34920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34921$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34922        has_space=`$ECHO "$complete" | $GREP " "`
34923        if test "x$has_space" != x; then
34924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34926        fi
34927        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34928      fi
34929    fi
34930
34931    # Now join together the path and the arguments once again
34932    if test "x$arguments" != xEOL; then
34933      new_complete="$new_path ${arguments% *}"
34934    else
34935      new_complete="$new_path"
34936    fi
34937
34938    if test "x$complete" != "x$new_complete"; then
34939      RC="$new_complete"
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34941$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34942    fi
34943  fi
34944
34945    # Extract the first word of "dumpbin", so it can be a program name with args.
34946set dummy dumpbin; ac_word=$2
34947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34948$as_echo_n "checking for $ac_word... " >&6; }
34949if ${ac_cv_prog_DUMPBIN+:} false; then :
34950  $as_echo_n "(cached) " >&6
34951else
34952  if test -n "$DUMPBIN"; then
34953  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34954else
34955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34956for as_dir in $PATH
34957do
34958  IFS=$as_save_IFS
34959  test -z "$as_dir" && as_dir=.
34960    for ac_exec_ext in '' $ac_executable_extensions; do
34961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34962    ac_cv_prog_DUMPBIN="dumpbin"
34963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34964    break 2
34965  fi
34966done
34967  done
34968IFS=$as_save_IFS
34969
34970fi
34971fi
34972DUMPBIN=$ac_cv_prog_DUMPBIN
34973if test -n "$DUMPBIN"; then
34974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34975$as_echo "$DUMPBIN" >&6; }
34976else
34977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34978$as_echo "no" >&6; }
34979fi
34980
34981
34982
34983  # Only process if variable expands to non-empty
34984
34985  if test "x$DUMPBIN" != x; then
34986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34987
34988  # First separate the path from the arguments. This will split at the first
34989  # space.
34990  complete="$DUMPBIN"
34991  path="${complete%% *}"
34992  tmp="$complete EOL"
34993  arguments="${tmp#* }"
34994
34995  # Input might be given as Windows format, start by converting to
34996  # unix format.
34997  new_path=`$CYGPATH -u "$path"`
34998
34999  # Now try to locate executable using which
35000  new_path=`$WHICH "$new_path" 2> /dev/null`
35001  # bat and cmd files are not always considered executable in cygwin causing which
35002  # to not find them
35003  if test "x$new_path" = x \
35004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35006    new_path=`$CYGPATH -u "$path"`
35007  fi
35008  if test "x$new_path" = x; then
35009    # Oops. Which didn't find the executable.
35010    # The splitting of arguments from the executable at a space might have been incorrect,
35011    # since paths with space are more likely in Windows. Give it another try with the whole
35012    # argument.
35013    path="$complete"
35014    arguments="EOL"
35015    new_path=`$CYGPATH -u "$path"`
35016    new_path=`$WHICH "$new_path" 2> /dev/null`
35017    # bat and cmd files are not always considered executable in cygwin causing which
35018    # to not find them
35019    if test "x$new_path" = x \
35020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35022      new_path=`$CYGPATH -u "$path"`
35023    fi
35024    if test "x$new_path" = x; then
35025      # It's still not found. Now this is an unrecoverable error.
35026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35027$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35028      has_space=`$ECHO "$complete" | $GREP " "`
35029      if test "x$has_space" != x; then
35030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35032      fi
35033      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35034    fi
35035  fi
35036
35037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35040  # "foo.exe" is OK but "foo" is an error.
35041  #
35042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35043  # It is also a way to make sure we got the proper file name for the real test later on.
35044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35045  if test "x$test_shortpath" = x; then
35046    # Short path failed, file does not exist as specified.
35047    # Try adding .exe or .cmd
35048    if test -f "${new_path}.exe"; then
35049      input_to_shortpath="${new_path}.exe"
35050    elif test -f "${new_path}.cmd"; then
35051      input_to_shortpath="${new_path}.cmd"
35052    else
35053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35054$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35057      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35058    fi
35059  else
35060    input_to_shortpath="$new_path"
35061  fi
35062
35063  # Call helper function which possibly converts this using DOS-style short mode.
35064  # If so, the updated path is stored in $new_path.
35065  new_path="$input_to_shortpath"
35066
35067  input_path="$input_to_shortpath"
35068  # Check if we need to convert this using DOS-style short mode. If the path
35069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35070  # take no chances and rewrite it.
35071  # Note: m4 eats our [], so we need to use [ and ] instead.
35072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35073  if test "x$has_forbidden_chars" != x; then
35074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35078      # Going to short mode and back again did indeed matter. Since short mode is
35079      # case insensitive, let's make it lowercase to improve readability.
35080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35081      # Now convert it back to Unix-style (cygpath)
35082      input_path=`$CYGPATH -u "$shortmode_path"`
35083      new_path="$input_path"
35084    fi
35085  fi
35086
35087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35088  if test "x$test_cygdrive_prefix" = x; then
35089    # As a simple fix, exclude /usr/bin since it's not a real path.
35090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35092      # a path prefixed by /cygdrive for fixpath to work.
35093      new_path="$CYGWIN_ROOT_PATH$input_path"
35094    fi
35095  fi
35096
35097  # remove trailing .exe if any
35098  new_path="${new_path/%.exe/}"
35099
35100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35101
35102  # First separate the path from the arguments. This will split at the first
35103  # space.
35104  complete="$DUMPBIN"
35105  path="${complete%% *}"
35106  tmp="$complete EOL"
35107  arguments="${tmp#* }"
35108
35109  # Input might be given as Windows format, start by converting to
35110  # unix format.
35111  new_path="$path"
35112
35113  windows_path="$new_path"
35114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35115    unix_path=`$CYGPATH -u "$windows_path"`
35116    new_path="$unix_path"
35117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35119    new_path="$unix_path"
35120  fi
35121
35122
35123  # Now try to locate executable using which
35124  new_path=`$WHICH "$new_path" 2> /dev/null`
35125
35126  if test "x$new_path" = x; then
35127    # Oops. Which didn't find the executable.
35128    # The splitting of arguments from the executable at a space might have been incorrect,
35129    # since paths with space are more likely in Windows. Give it another try with the whole
35130    # argument.
35131    path="$complete"
35132    arguments="EOL"
35133    new_path="$path"
35134
35135  windows_path="$new_path"
35136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35137    unix_path=`$CYGPATH -u "$windows_path"`
35138    new_path="$unix_path"
35139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35141    new_path="$unix_path"
35142  fi
35143
35144
35145    new_path=`$WHICH "$new_path" 2> /dev/null`
35146    # bat and cmd files are not always considered executable in MSYS causing which
35147    # to not find them
35148    if test "x$new_path" = x \
35149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35151      new_path="$path"
35152
35153  windows_path="$new_path"
35154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35155    unix_path=`$CYGPATH -u "$windows_path"`
35156    new_path="$unix_path"
35157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35159    new_path="$unix_path"
35160  fi
35161
35162    fi
35163
35164    if test "x$new_path" = x; then
35165      # It's still not found. Now this is an unrecoverable error.
35166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35167$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35168      has_space=`$ECHO "$complete" | $GREP " "`
35169      if test "x$has_space" != x; then
35170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35172      fi
35173      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35174    fi
35175  fi
35176
35177  # Now new_path has a complete unix path to the binary
35178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35179    # Keep paths in /bin as-is, but remove trailing .exe if any
35180    new_path="${new_path/%.exe/}"
35181    # Do not save /bin paths to all_fixpath_prefixes!
35182  else
35183    # Not in mixed or Windows style, start by that.
35184    new_path=`cmd //c echo $new_path`
35185
35186  input_path="$new_path"
35187  # Check if we need to convert this using DOS-style short mode. If the path
35188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35189  # take no chances and rewrite it.
35190  # Note: m4 eats our [], so we need to use [ and ] instead.
35191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35192  if test "x$has_forbidden_chars" != x; then
35193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35195  fi
35196
35197    # Output is in $new_path
35198
35199  windows_path="$new_path"
35200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35201    unix_path=`$CYGPATH -u "$windows_path"`
35202    new_path="$unix_path"
35203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35205    new_path="$unix_path"
35206  fi
35207
35208    # remove trailing .exe if any
35209    new_path="${new_path/%.exe/}"
35210
35211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35213  fi
35214
35215    else
35216      # We're on a unix platform. Hooray! :)
35217      # First separate the path from the arguments. This will split at the first
35218      # space.
35219      complete="$DUMPBIN"
35220      path="${complete%% *}"
35221      tmp="$complete EOL"
35222      arguments="${tmp#* }"
35223
35224      # Cannot rely on the command "which" here since it doesn't always work.
35225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35226      if test -z "$is_absolute_path"; then
35227        # Path to executable is not absolute. Find it.
35228        IFS_save="$IFS"
35229        IFS=:
35230        for p in $PATH; do
35231          if test -f "$p/$path" && test -x "$p/$path"; then
35232            new_path="$p/$path"
35233            break
35234          fi
35235        done
35236        IFS="$IFS_save"
35237      else
35238        # This is an absolute path, we can use it without further modifications.
35239        new_path="$path"
35240      fi
35241
35242      if test "x$new_path" = x; then
35243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35244$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35245        has_space=`$ECHO "$complete" | $GREP " "`
35246        if test "x$has_space" != x; then
35247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35249        fi
35250        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35251      fi
35252    fi
35253
35254    # Now join together the path and the arguments once again
35255    if test "x$arguments" != xEOL; then
35256      new_complete="$new_path ${arguments% *}"
35257    else
35258      new_complete="$new_path"
35259    fi
35260
35261    if test "x$complete" != "x$new_complete"; then
35262      DUMPBIN="$new_complete"
35263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35264$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35265    fi
35266  fi
35267
35268    # We need to check for 'msbuild.exe' because at the place where we expect to
35269    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35270    # won't find the 'msbuild.exe' executable in that case (and the
35271    # 'ac_executable_extensions' is unusable due to performance reasons).
35272    # Notice that we intentionally don't fix up the path to MSBUILD because we
35273    # will call it in a DOS shell during freetype detection on Windows (see
35274    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35275    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35276set dummy msbuild.exe; ac_word=$2
35277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35278$as_echo_n "checking for $ac_word... " >&6; }
35279if ${ac_cv_prog_MSBUILD+:} false; then :
35280  $as_echo_n "(cached) " >&6
35281else
35282  if test -n "$MSBUILD"; then
35283  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35284else
35285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35286for as_dir in $PATH
35287do
35288  IFS=$as_save_IFS
35289  test -z "$as_dir" && as_dir=.
35290    for ac_exec_ext in '' $ac_executable_extensions; do
35291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35292    ac_cv_prog_MSBUILD="msbuild.exe"
35293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35294    break 2
35295  fi
35296done
35297  done
35298IFS=$as_save_IFS
35299
35300fi
35301fi
35302MSBUILD=$ac_cv_prog_MSBUILD
35303if test -n "$MSBUILD"; then
35304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35305$as_echo "$MSBUILD" >&6; }
35306else
35307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35308$as_echo "no" >&6; }
35309fi
35310
35311
35312  fi
35313
35314  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35315
35316
35317  # Publish this variable in the help.
35318
35319
35320  if test "x$STRIP" = x; then
35321    # The variable is not set by user, try to locate tool using the code snippet
35322    for ac_prog in strip
35323do
35324  # Extract the first word of "$ac_prog", so it can be a program name with args.
35325set dummy $ac_prog; ac_word=$2
35326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35327$as_echo_n "checking for $ac_word... " >&6; }
35328if ${ac_cv_path_STRIP+:} false; then :
35329  $as_echo_n "(cached) " >&6
35330else
35331  case $STRIP in
35332  [\\/]* | ?:[\\/]*)
35333  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35334  ;;
35335  *)
35336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35337for as_dir in $PATH
35338do
35339  IFS=$as_save_IFS
35340  test -z "$as_dir" && as_dir=.
35341    for ac_exec_ext in '' $ac_executable_extensions; do
35342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35343    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35345    break 2
35346  fi
35347done
35348  done
35349IFS=$as_save_IFS
35350
35351  ;;
35352esac
35353fi
35354STRIP=$ac_cv_path_STRIP
35355if test -n "$STRIP"; then
35356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35357$as_echo "$STRIP" >&6; }
35358else
35359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35360$as_echo "no" >&6; }
35361fi
35362
35363
35364  test -n "$STRIP" && break
35365done
35366
35367  else
35368    # The variable is set, but is it from the command line or the environment?
35369
35370    # Try to remove the string !STRIP! from our list.
35371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35373      # If it failed, the variable was not from the command line. Ignore it,
35374      # but warn the user (except for BASH, which is always set by the calling BASH).
35375      if test "xSTRIP" != xBASH; then
35376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35377$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35378      fi
35379      # Try to locate tool using the code snippet
35380      for ac_prog in strip
35381do
35382  # Extract the first word of "$ac_prog", so it can be a program name with args.
35383set dummy $ac_prog; ac_word=$2
35384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35385$as_echo_n "checking for $ac_word... " >&6; }
35386if ${ac_cv_path_STRIP+:} false; then :
35387  $as_echo_n "(cached) " >&6
35388else
35389  case $STRIP in
35390  [\\/]* | ?:[\\/]*)
35391  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35392  ;;
35393  *)
35394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35395for as_dir in $PATH
35396do
35397  IFS=$as_save_IFS
35398  test -z "$as_dir" && as_dir=.
35399    for ac_exec_ext in '' $ac_executable_extensions; do
35400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35401    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35403    break 2
35404  fi
35405done
35406  done
35407IFS=$as_save_IFS
35408
35409  ;;
35410esac
35411fi
35412STRIP=$ac_cv_path_STRIP
35413if test -n "$STRIP"; then
35414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35415$as_echo "$STRIP" >&6; }
35416else
35417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35418$as_echo "no" >&6; }
35419fi
35420
35421
35422  test -n "$STRIP" && break
35423done
35424
35425    else
35426      # If it succeeded, then it was overridden by the user. We will use it
35427      # for the tool.
35428
35429      # First remove it from the list of overridden variables, so we can test
35430      # for unknown variables in the end.
35431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35432
35433      # Check if the provided tool contains a complete path.
35434      tool_specified="$STRIP"
35435      tool_basename="${tool_specified##*/}"
35436      if test "x$tool_basename" = "x$tool_specified"; then
35437        # A command without a complete path is provided, search $PATH.
35438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35439$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35440        # Extract the first word of "$tool_basename", so it can be a program name with args.
35441set dummy $tool_basename; ac_word=$2
35442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35443$as_echo_n "checking for $ac_word... " >&6; }
35444if ${ac_cv_path_STRIP+:} false; then :
35445  $as_echo_n "(cached) " >&6
35446else
35447  case $STRIP in
35448  [\\/]* | ?:[\\/]*)
35449  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35450  ;;
35451  *)
35452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35453for as_dir in $PATH
35454do
35455  IFS=$as_save_IFS
35456  test -z "$as_dir" && as_dir=.
35457    for ac_exec_ext in '' $ac_executable_extensions; do
35458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35459    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35461    break 2
35462  fi
35463done
35464  done
35465IFS=$as_save_IFS
35466
35467  ;;
35468esac
35469fi
35470STRIP=$ac_cv_path_STRIP
35471if test -n "$STRIP"; then
35472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35473$as_echo "$STRIP" >&6; }
35474else
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35476$as_echo "no" >&6; }
35477fi
35478
35479
35480        if test "x$STRIP" = x; then
35481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35482        fi
35483      else
35484        # Otherwise we believe it is a complete path. Use it as it is.
35485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35486$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35488$as_echo_n "checking for STRIP... " >&6; }
35489        if test ! -x "$tool_specified"; then
35490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35491$as_echo "not found" >&6; }
35492          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35493        fi
35494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35495$as_echo "$tool_specified" >&6; }
35496      fi
35497    fi
35498  fi
35499
35500
35501
35502  # Only process if variable expands to non-empty
35503
35504  if test "x$STRIP" != x; then
35505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35506
35507  # First separate the path from the arguments. This will split at the first
35508  # space.
35509  complete="$STRIP"
35510  path="${complete%% *}"
35511  tmp="$complete EOL"
35512  arguments="${tmp#* }"
35513
35514  # Input might be given as Windows format, start by converting to
35515  # unix format.
35516  new_path=`$CYGPATH -u "$path"`
35517
35518  # Now try to locate executable using which
35519  new_path=`$WHICH "$new_path" 2> /dev/null`
35520  # bat and cmd files are not always considered executable in cygwin causing which
35521  # to not find them
35522  if test "x$new_path" = x \
35523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35525    new_path=`$CYGPATH -u "$path"`
35526  fi
35527  if test "x$new_path" = x; then
35528    # Oops. Which didn't find the executable.
35529    # The splitting of arguments from the executable at a space might have been incorrect,
35530    # since paths with space are more likely in Windows. Give it another try with the whole
35531    # argument.
35532    path="$complete"
35533    arguments="EOL"
35534    new_path=`$CYGPATH -u "$path"`
35535    new_path=`$WHICH "$new_path" 2> /dev/null`
35536    # bat and cmd files are not always considered executable in cygwin causing which
35537    # to not find them
35538    if test "x$new_path" = x \
35539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35541      new_path=`$CYGPATH -u "$path"`
35542    fi
35543    if test "x$new_path" = x; then
35544      # It's still not found. Now this is an unrecoverable error.
35545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35546$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35547      has_space=`$ECHO "$complete" | $GREP " "`
35548      if test "x$has_space" != x; then
35549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35551      fi
35552      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35553    fi
35554  fi
35555
35556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35559  # "foo.exe" is OK but "foo" is an error.
35560  #
35561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35562  # It is also a way to make sure we got the proper file name for the real test later on.
35563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35564  if test "x$test_shortpath" = x; then
35565    # Short path failed, file does not exist as specified.
35566    # Try adding .exe or .cmd
35567    if test -f "${new_path}.exe"; then
35568      input_to_shortpath="${new_path}.exe"
35569    elif test -f "${new_path}.cmd"; then
35570      input_to_shortpath="${new_path}.cmd"
35571    else
35572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35573$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35576      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35577    fi
35578  else
35579    input_to_shortpath="$new_path"
35580  fi
35581
35582  # Call helper function which possibly converts this using DOS-style short mode.
35583  # If so, the updated path is stored in $new_path.
35584  new_path="$input_to_shortpath"
35585
35586  input_path="$input_to_shortpath"
35587  # Check if we need to convert this using DOS-style short mode. If the path
35588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35589  # take no chances and rewrite it.
35590  # Note: m4 eats our [], so we need to use [ and ] instead.
35591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35592  if test "x$has_forbidden_chars" != x; then
35593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35597      # Going to short mode and back again did indeed matter. Since short mode is
35598      # case insensitive, let's make it lowercase to improve readability.
35599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35600      # Now convert it back to Unix-style (cygpath)
35601      input_path=`$CYGPATH -u "$shortmode_path"`
35602      new_path="$input_path"
35603    fi
35604  fi
35605
35606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35607  if test "x$test_cygdrive_prefix" = x; then
35608    # As a simple fix, exclude /usr/bin since it's not a real path.
35609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35611      # a path prefixed by /cygdrive for fixpath to work.
35612      new_path="$CYGWIN_ROOT_PATH$input_path"
35613    fi
35614  fi
35615
35616  # remove trailing .exe if any
35617  new_path="${new_path/%.exe/}"
35618
35619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35620
35621  # First separate the path from the arguments. This will split at the first
35622  # space.
35623  complete="$STRIP"
35624  path="${complete%% *}"
35625  tmp="$complete EOL"
35626  arguments="${tmp#* }"
35627
35628  # Input might be given as Windows format, start by converting to
35629  # unix format.
35630  new_path="$path"
35631
35632  windows_path="$new_path"
35633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35634    unix_path=`$CYGPATH -u "$windows_path"`
35635    new_path="$unix_path"
35636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35638    new_path="$unix_path"
35639  fi
35640
35641
35642  # Now try to locate executable using which
35643  new_path=`$WHICH "$new_path" 2> /dev/null`
35644
35645  if test "x$new_path" = x; then
35646    # Oops. Which didn't find the executable.
35647    # The splitting of arguments from the executable at a space might have been incorrect,
35648    # since paths with space are more likely in Windows. Give it another try with the whole
35649    # argument.
35650    path="$complete"
35651    arguments="EOL"
35652    new_path="$path"
35653
35654  windows_path="$new_path"
35655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35656    unix_path=`$CYGPATH -u "$windows_path"`
35657    new_path="$unix_path"
35658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35660    new_path="$unix_path"
35661  fi
35662
35663
35664    new_path=`$WHICH "$new_path" 2> /dev/null`
35665    # bat and cmd files are not always considered executable in MSYS causing which
35666    # to not find them
35667    if test "x$new_path" = x \
35668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35670      new_path="$path"
35671
35672  windows_path="$new_path"
35673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35674    unix_path=`$CYGPATH -u "$windows_path"`
35675    new_path="$unix_path"
35676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35678    new_path="$unix_path"
35679  fi
35680
35681    fi
35682
35683    if test "x$new_path" = x; then
35684      # It's still not found. Now this is an unrecoverable error.
35685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35686$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35687      has_space=`$ECHO "$complete" | $GREP " "`
35688      if test "x$has_space" != x; then
35689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35691      fi
35692      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35693    fi
35694  fi
35695
35696  # Now new_path has a complete unix path to the binary
35697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35698    # Keep paths in /bin as-is, but remove trailing .exe if any
35699    new_path="${new_path/%.exe/}"
35700    # Do not save /bin paths to all_fixpath_prefixes!
35701  else
35702    # Not in mixed or Windows style, start by that.
35703    new_path=`cmd //c echo $new_path`
35704
35705  input_path="$new_path"
35706  # Check if we need to convert this using DOS-style short mode. If the path
35707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35708  # take no chances and rewrite it.
35709  # Note: m4 eats our [], so we need to use [ and ] instead.
35710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35711  if test "x$has_forbidden_chars" != x; then
35712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35714  fi
35715
35716    # Output is in $new_path
35717
35718  windows_path="$new_path"
35719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35720    unix_path=`$CYGPATH -u "$windows_path"`
35721    new_path="$unix_path"
35722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35724    new_path="$unix_path"
35725  fi
35726
35727    # remove trailing .exe if any
35728    new_path="${new_path/%.exe/}"
35729
35730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35732  fi
35733
35734    else
35735      # We're on a unix platform. Hooray! :)
35736      # First separate the path from the arguments. This will split at the first
35737      # space.
35738      complete="$STRIP"
35739      path="${complete%% *}"
35740      tmp="$complete EOL"
35741      arguments="${tmp#* }"
35742
35743      # Cannot rely on the command "which" here since it doesn't always work.
35744      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35745      if test -z "$is_absolute_path"; then
35746        # Path to executable is not absolute. Find it.
35747        IFS_save="$IFS"
35748        IFS=:
35749        for p in $PATH; do
35750          if test -f "$p/$path" && test -x "$p/$path"; then
35751            new_path="$p/$path"
35752            break
35753          fi
35754        done
35755        IFS="$IFS_save"
35756      else
35757        # This is an absolute path, we can use it without further modifications.
35758        new_path="$path"
35759      fi
35760
35761      if test "x$new_path" = x; then
35762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35763$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35764        has_space=`$ECHO "$complete" | $GREP " "`
35765        if test "x$has_space" != x; then
35766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35768        fi
35769        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35770      fi
35771    fi
35772
35773    # Now join together the path and the arguments once again
35774    if test "x$arguments" != xEOL; then
35775      new_complete="$new_path ${arguments% *}"
35776    else
35777      new_complete="$new_path"
35778    fi
35779
35780    if test "x$complete" != "x$new_complete"; then
35781      STRIP="$new_complete"
35782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35783$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35784    fi
35785  fi
35786
35787
35788
35789  # Publish this variable in the help.
35790
35791
35792  if test "x$NM" = x; then
35793    # The variable is not set by user, try to locate tool using the code snippet
35794    for ac_prog in nm
35795do
35796  # Extract the first word of "$ac_prog", so it can be a program name with args.
35797set dummy $ac_prog; ac_word=$2
35798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35799$as_echo_n "checking for $ac_word... " >&6; }
35800if ${ac_cv_path_NM+:} false; then :
35801  $as_echo_n "(cached) " >&6
35802else
35803  case $NM in
35804  [\\/]* | ?:[\\/]*)
35805  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35806  ;;
35807  *)
35808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35809for as_dir in $PATH
35810do
35811  IFS=$as_save_IFS
35812  test -z "$as_dir" && as_dir=.
35813    for ac_exec_ext in '' $ac_executable_extensions; do
35814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35815    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35817    break 2
35818  fi
35819done
35820  done
35821IFS=$as_save_IFS
35822
35823  ;;
35824esac
35825fi
35826NM=$ac_cv_path_NM
35827if test -n "$NM"; then
35828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35829$as_echo "$NM" >&6; }
35830else
35831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35832$as_echo "no" >&6; }
35833fi
35834
35835
35836  test -n "$NM" && break
35837done
35838
35839  else
35840    # The variable is set, but is it from the command line or the environment?
35841
35842    # Try to remove the string !NM! from our list.
35843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35845      # If it failed, the variable was not from the command line. Ignore it,
35846      # but warn the user (except for BASH, which is always set by the calling BASH).
35847      if test "xNM" != xBASH; then
35848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35849$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35850      fi
35851      # Try to locate tool using the code snippet
35852      for ac_prog in nm
35853do
35854  # Extract the first word of "$ac_prog", so it can be a program name with args.
35855set dummy $ac_prog; ac_word=$2
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857$as_echo_n "checking for $ac_word... " >&6; }
35858if ${ac_cv_path_NM+:} false; then :
35859  $as_echo_n "(cached) " >&6
35860else
35861  case $NM in
35862  [\\/]* | ?:[\\/]*)
35863  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35864  ;;
35865  *)
35866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35867for as_dir in $PATH
35868do
35869  IFS=$as_save_IFS
35870  test -z "$as_dir" && as_dir=.
35871    for ac_exec_ext in '' $ac_executable_extensions; do
35872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35873    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35875    break 2
35876  fi
35877done
35878  done
35879IFS=$as_save_IFS
35880
35881  ;;
35882esac
35883fi
35884NM=$ac_cv_path_NM
35885if test -n "$NM"; then
35886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35887$as_echo "$NM" >&6; }
35888else
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35890$as_echo "no" >&6; }
35891fi
35892
35893
35894  test -n "$NM" && break
35895done
35896
35897    else
35898      # If it succeeded, then it was overridden by the user. We will use it
35899      # for the tool.
35900
35901      # First remove it from the list of overridden variables, so we can test
35902      # for unknown variables in the end.
35903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35904
35905      # Check if the provided tool contains a complete path.
35906      tool_specified="$NM"
35907      tool_basename="${tool_specified##*/}"
35908      if test "x$tool_basename" = "x$tool_specified"; then
35909        # A command without a complete path is provided, search $PATH.
35910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35911$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35912        # Extract the first word of "$tool_basename", so it can be a program name with args.
35913set dummy $tool_basename; ac_word=$2
35914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35915$as_echo_n "checking for $ac_word... " >&6; }
35916if ${ac_cv_path_NM+:} false; then :
35917  $as_echo_n "(cached) " >&6
35918else
35919  case $NM in
35920  [\\/]* | ?:[\\/]*)
35921  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35922  ;;
35923  *)
35924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35925for as_dir in $PATH
35926do
35927  IFS=$as_save_IFS
35928  test -z "$as_dir" && as_dir=.
35929    for ac_exec_ext in '' $ac_executable_extensions; do
35930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35931    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35933    break 2
35934  fi
35935done
35936  done
35937IFS=$as_save_IFS
35938
35939  ;;
35940esac
35941fi
35942NM=$ac_cv_path_NM
35943if test -n "$NM"; then
35944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35945$as_echo "$NM" >&6; }
35946else
35947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948$as_echo "no" >&6; }
35949fi
35950
35951
35952        if test "x$NM" = x; then
35953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35954        fi
35955      else
35956        # Otherwise we believe it is a complete path. Use it as it is.
35957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35958$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35960$as_echo_n "checking for NM... " >&6; }
35961        if test ! -x "$tool_specified"; then
35962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35963$as_echo "not found" >&6; }
35964          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35965        fi
35966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35967$as_echo "$tool_specified" >&6; }
35968      fi
35969    fi
35970  fi
35971
35972
35973
35974  # Only process if variable expands to non-empty
35975
35976  if test "x$NM" != x; then
35977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35978
35979  # First separate the path from the arguments. This will split at the first
35980  # space.
35981  complete="$NM"
35982  path="${complete%% *}"
35983  tmp="$complete EOL"
35984  arguments="${tmp#* }"
35985
35986  # Input might be given as Windows format, start by converting to
35987  # unix format.
35988  new_path=`$CYGPATH -u "$path"`
35989
35990  # Now try to locate executable using which
35991  new_path=`$WHICH "$new_path" 2> /dev/null`
35992  # bat and cmd files are not always considered executable in cygwin causing which
35993  # to not find them
35994  if test "x$new_path" = x \
35995      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35996      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35997    new_path=`$CYGPATH -u "$path"`
35998  fi
35999  if test "x$new_path" = x; then
36000    # Oops. Which didn't find the executable.
36001    # The splitting of arguments from the executable at a space might have been incorrect,
36002    # since paths with space are more likely in Windows. Give it another try with the whole
36003    # argument.
36004    path="$complete"
36005    arguments="EOL"
36006    new_path=`$CYGPATH -u "$path"`
36007    new_path=`$WHICH "$new_path" 2> /dev/null`
36008    # bat and cmd files are not always considered executable in cygwin causing which
36009    # to not find them
36010    if test "x$new_path" = x \
36011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36013      new_path=`$CYGPATH -u "$path"`
36014    fi
36015    if test "x$new_path" = x; then
36016      # It's still not found. Now this is an unrecoverable error.
36017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36018$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36019      has_space=`$ECHO "$complete" | $GREP " "`
36020      if test "x$has_space" != x; then
36021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36023      fi
36024      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36025    fi
36026  fi
36027
36028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36031  # "foo.exe" is OK but "foo" is an error.
36032  #
36033  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36034  # It is also a way to make sure we got the proper file name for the real test later on.
36035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36036  if test "x$test_shortpath" = x; then
36037    # Short path failed, file does not exist as specified.
36038    # Try adding .exe or .cmd
36039    if test -f "${new_path}.exe"; then
36040      input_to_shortpath="${new_path}.exe"
36041    elif test -f "${new_path}.cmd"; then
36042      input_to_shortpath="${new_path}.cmd"
36043    else
36044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36045$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36048      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36049    fi
36050  else
36051    input_to_shortpath="$new_path"
36052  fi
36053
36054  # Call helper function which possibly converts this using DOS-style short mode.
36055  # If so, the updated path is stored in $new_path.
36056  new_path="$input_to_shortpath"
36057
36058  input_path="$input_to_shortpath"
36059  # Check if we need to convert this using DOS-style short mode. If the path
36060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36061  # take no chances and rewrite it.
36062  # Note: m4 eats our [], so we need to use [ and ] instead.
36063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36064  if test "x$has_forbidden_chars" != x; then
36065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36069      # Going to short mode and back again did indeed matter. Since short mode is
36070      # case insensitive, let's make it lowercase to improve readability.
36071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36072      # Now convert it back to Unix-style (cygpath)
36073      input_path=`$CYGPATH -u "$shortmode_path"`
36074      new_path="$input_path"
36075    fi
36076  fi
36077
36078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36079  if test "x$test_cygdrive_prefix" = x; then
36080    # As a simple fix, exclude /usr/bin since it's not a real path.
36081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36083      # a path prefixed by /cygdrive for fixpath to work.
36084      new_path="$CYGWIN_ROOT_PATH$input_path"
36085    fi
36086  fi
36087
36088  # remove trailing .exe if any
36089  new_path="${new_path/%.exe/}"
36090
36091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36092
36093  # First separate the path from the arguments. This will split at the first
36094  # space.
36095  complete="$NM"
36096  path="${complete%% *}"
36097  tmp="$complete EOL"
36098  arguments="${tmp#* }"
36099
36100  # Input might be given as Windows format, start by converting to
36101  # unix format.
36102  new_path="$path"
36103
36104  windows_path="$new_path"
36105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36106    unix_path=`$CYGPATH -u "$windows_path"`
36107    new_path="$unix_path"
36108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36110    new_path="$unix_path"
36111  fi
36112
36113
36114  # Now try to locate executable using which
36115  new_path=`$WHICH "$new_path" 2> /dev/null`
36116
36117  if test "x$new_path" = x; then
36118    # Oops. Which didn't find the executable.
36119    # The splitting of arguments from the executable at a space might have been incorrect,
36120    # since paths with space are more likely in Windows. Give it another try with the whole
36121    # argument.
36122    path="$complete"
36123    arguments="EOL"
36124    new_path="$path"
36125
36126  windows_path="$new_path"
36127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36128    unix_path=`$CYGPATH -u "$windows_path"`
36129    new_path="$unix_path"
36130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36132    new_path="$unix_path"
36133  fi
36134
36135
36136    new_path=`$WHICH "$new_path" 2> /dev/null`
36137    # bat and cmd files are not always considered executable in MSYS causing which
36138    # to not find them
36139    if test "x$new_path" = x \
36140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36142      new_path="$path"
36143
36144  windows_path="$new_path"
36145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36146    unix_path=`$CYGPATH -u "$windows_path"`
36147    new_path="$unix_path"
36148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36150    new_path="$unix_path"
36151  fi
36152
36153    fi
36154
36155    if test "x$new_path" = x; then
36156      # It's still not found. Now this is an unrecoverable error.
36157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36158$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36159      has_space=`$ECHO "$complete" | $GREP " "`
36160      if test "x$has_space" != x; then
36161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36163      fi
36164      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36165    fi
36166  fi
36167
36168  # Now new_path has a complete unix path to the binary
36169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36170    # Keep paths in /bin as-is, but remove trailing .exe if any
36171    new_path="${new_path/%.exe/}"
36172    # Do not save /bin paths to all_fixpath_prefixes!
36173  else
36174    # Not in mixed or Windows style, start by that.
36175    new_path=`cmd //c echo $new_path`
36176
36177  input_path="$new_path"
36178  # Check if we need to convert this using DOS-style short mode. If the path
36179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36180  # take no chances and rewrite it.
36181  # Note: m4 eats our [], so we need to use [ and ] instead.
36182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36183  if test "x$has_forbidden_chars" != x; then
36184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36186  fi
36187
36188    # Output is in $new_path
36189
36190  windows_path="$new_path"
36191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36192    unix_path=`$CYGPATH -u "$windows_path"`
36193    new_path="$unix_path"
36194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36196    new_path="$unix_path"
36197  fi
36198
36199    # remove trailing .exe if any
36200    new_path="${new_path/%.exe/}"
36201
36202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36204  fi
36205
36206    else
36207      # We're on a unix platform. Hooray! :)
36208      # First separate the path from the arguments. This will split at the first
36209      # space.
36210      complete="$NM"
36211      path="${complete%% *}"
36212      tmp="$complete EOL"
36213      arguments="${tmp#* }"
36214
36215      # Cannot rely on the command "which" here since it doesn't always work.
36216      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36217      if test -z "$is_absolute_path"; then
36218        # Path to executable is not absolute. Find it.
36219        IFS_save="$IFS"
36220        IFS=:
36221        for p in $PATH; do
36222          if test -f "$p/$path" && test -x "$p/$path"; then
36223            new_path="$p/$path"
36224            break
36225          fi
36226        done
36227        IFS="$IFS_save"
36228      else
36229        # This is an absolute path, we can use it without further modifications.
36230        new_path="$path"
36231      fi
36232
36233      if test "x$new_path" = x; then
36234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36235$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36236        has_space=`$ECHO "$complete" | $GREP " "`
36237        if test "x$has_space" != x; then
36238          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36239$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36240        fi
36241        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36242      fi
36243    fi
36244
36245    # Now join together the path and the arguments once again
36246    if test "x$arguments" != xEOL; then
36247      new_complete="$new_path ${arguments% *}"
36248    else
36249      new_complete="$new_path"
36250    fi
36251
36252    if test "x$complete" != "x$new_complete"; then
36253      NM="$new_complete"
36254      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36255$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36256    fi
36257  fi
36258
36259
36260
36261  # Publish this variable in the help.
36262
36263
36264  if test "x$GNM" = x; then
36265    # The variable is not set by user, try to locate tool using the code snippet
36266    for ac_prog in gnm
36267do
36268  # Extract the first word of "$ac_prog", so it can be a program name with args.
36269set dummy $ac_prog; ac_word=$2
36270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36271$as_echo_n "checking for $ac_word... " >&6; }
36272if ${ac_cv_path_GNM+:} false; then :
36273  $as_echo_n "(cached) " >&6
36274else
36275  case $GNM in
36276  [\\/]* | ?:[\\/]*)
36277  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36278  ;;
36279  *)
36280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36281for as_dir in $PATH
36282do
36283  IFS=$as_save_IFS
36284  test -z "$as_dir" && as_dir=.
36285    for ac_exec_ext in '' $ac_executable_extensions; do
36286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36287    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289    break 2
36290  fi
36291done
36292  done
36293IFS=$as_save_IFS
36294
36295  ;;
36296esac
36297fi
36298GNM=$ac_cv_path_GNM
36299if test -n "$GNM"; then
36300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36301$as_echo "$GNM" >&6; }
36302else
36303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36304$as_echo "no" >&6; }
36305fi
36306
36307
36308  test -n "$GNM" && break
36309done
36310
36311  else
36312    # The variable is set, but is it from the command line or the environment?
36313
36314    # Try to remove the string !GNM! from our list.
36315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36317      # If it failed, the variable was not from the command line. Ignore it,
36318      # but warn the user (except for BASH, which is always set by the calling BASH).
36319      if test "xGNM" != xBASH; then
36320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36321$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36322      fi
36323      # Try to locate tool using the code snippet
36324      for ac_prog in gnm
36325do
36326  # Extract the first word of "$ac_prog", so it can be a program name with args.
36327set dummy $ac_prog; ac_word=$2
36328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36329$as_echo_n "checking for $ac_word... " >&6; }
36330if ${ac_cv_path_GNM+:} false; then :
36331  $as_echo_n "(cached) " >&6
36332else
36333  case $GNM in
36334  [\\/]* | ?:[\\/]*)
36335  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36336  ;;
36337  *)
36338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36339for as_dir in $PATH
36340do
36341  IFS=$as_save_IFS
36342  test -z "$as_dir" && as_dir=.
36343    for ac_exec_ext in '' $ac_executable_extensions; do
36344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36345    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36347    break 2
36348  fi
36349done
36350  done
36351IFS=$as_save_IFS
36352
36353  ;;
36354esac
36355fi
36356GNM=$ac_cv_path_GNM
36357if test -n "$GNM"; then
36358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36359$as_echo "$GNM" >&6; }
36360else
36361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36362$as_echo "no" >&6; }
36363fi
36364
36365
36366  test -n "$GNM" && break
36367done
36368
36369    else
36370      # If it succeeded, then it was overridden by the user. We will use it
36371      # for the tool.
36372
36373      # First remove it from the list of overridden variables, so we can test
36374      # for unknown variables in the end.
36375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36376
36377      # Check if the provided tool contains a complete path.
36378      tool_specified="$GNM"
36379      tool_basename="${tool_specified##*/}"
36380      if test "x$tool_basename" = "x$tool_specified"; then
36381        # A command without a complete path is provided, search $PATH.
36382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36383$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36384        # Extract the first word of "$tool_basename", so it can be a program name with args.
36385set dummy $tool_basename; ac_word=$2
36386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36387$as_echo_n "checking for $ac_word... " >&6; }
36388if ${ac_cv_path_GNM+:} false; then :
36389  $as_echo_n "(cached) " >&6
36390else
36391  case $GNM in
36392  [\\/]* | ?:[\\/]*)
36393  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36394  ;;
36395  *)
36396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36397for as_dir in $PATH
36398do
36399  IFS=$as_save_IFS
36400  test -z "$as_dir" && as_dir=.
36401    for ac_exec_ext in '' $ac_executable_extensions; do
36402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36403    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36405    break 2
36406  fi
36407done
36408  done
36409IFS=$as_save_IFS
36410
36411  ;;
36412esac
36413fi
36414GNM=$ac_cv_path_GNM
36415if test -n "$GNM"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36417$as_echo "$GNM" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424        if test "x$GNM" = x; then
36425          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36426        fi
36427      else
36428        # Otherwise we believe it is a complete path. Use it as it is.
36429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36430$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36432$as_echo_n "checking for GNM... " >&6; }
36433        if test ! -x "$tool_specified"; then
36434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36435$as_echo "not found" >&6; }
36436          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36437        fi
36438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36439$as_echo "$tool_specified" >&6; }
36440      fi
36441    fi
36442  fi
36443
36444
36445
36446  # Only process if variable expands to non-empty
36447
36448  if test "x$GNM" != x; then
36449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36450
36451  # First separate the path from the arguments. This will split at the first
36452  # space.
36453  complete="$GNM"
36454  path="${complete%% *}"
36455  tmp="$complete EOL"
36456  arguments="${tmp#* }"
36457
36458  # Input might be given as Windows format, start by converting to
36459  # unix format.
36460  new_path=`$CYGPATH -u "$path"`
36461
36462  # Now try to locate executable using which
36463  new_path=`$WHICH "$new_path" 2> /dev/null`
36464  # bat and cmd files are not always considered executable in cygwin causing which
36465  # to not find them
36466  if test "x$new_path" = x \
36467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36469    new_path=`$CYGPATH -u "$path"`
36470  fi
36471  if test "x$new_path" = x; then
36472    # Oops. Which didn't find the executable.
36473    # The splitting of arguments from the executable at a space might have been incorrect,
36474    # since paths with space are more likely in Windows. Give it another try with the whole
36475    # argument.
36476    path="$complete"
36477    arguments="EOL"
36478    new_path=`$CYGPATH -u "$path"`
36479    new_path=`$WHICH "$new_path" 2> /dev/null`
36480    # bat and cmd files are not always considered executable in cygwin causing which
36481    # to not find them
36482    if test "x$new_path" = x \
36483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36485      new_path=`$CYGPATH -u "$path"`
36486    fi
36487    if test "x$new_path" = x; then
36488      # It's still not found. Now this is an unrecoverable error.
36489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36490$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36491      has_space=`$ECHO "$complete" | $GREP " "`
36492      if test "x$has_space" != x; then
36493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36495      fi
36496      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36497    fi
36498  fi
36499
36500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36503  # "foo.exe" is OK but "foo" is an error.
36504  #
36505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36506  # It is also a way to make sure we got the proper file name for the real test later on.
36507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36508  if test "x$test_shortpath" = x; then
36509    # Short path failed, file does not exist as specified.
36510    # Try adding .exe or .cmd
36511    if test -f "${new_path}.exe"; then
36512      input_to_shortpath="${new_path}.exe"
36513    elif test -f "${new_path}.cmd"; then
36514      input_to_shortpath="${new_path}.cmd"
36515    else
36516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36517$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36520      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36521    fi
36522  else
36523    input_to_shortpath="$new_path"
36524  fi
36525
36526  # Call helper function which possibly converts this using DOS-style short mode.
36527  # If so, the updated path is stored in $new_path.
36528  new_path="$input_to_shortpath"
36529
36530  input_path="$input_to_shortpath"
36531  # Check if we need to convert this using DOS-style short mode. If the path
36532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36533  # take no chances and rewrite it.
36534  # Note: m4 eats our [], so we need to use [ and ] instead.
36535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36536  if test "x$has_forbidden_chars" != x; then
36537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36541      # Going to short mode and back again did indeed matter. Since short mode is
36542      # case insensitive, let's make it lowercase to improve readability.
36543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36544      # Now convert it back to Unix-style (cygpath)
36545      input_path=`$CYGPATH -u "$shortmode_path"`
36546      new_path="$input_path"
36547    fi
36548  fi
36549
36550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36551  if test "x$test_cygdrive_prefix" = x; then
36552    # As a simple fix, exclude /usr/bin since it's not a real path.
36553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36555      # a path prefixed by /cygdrive for fixpath to work.
36556      new_path="$CYGWIN_ROOT_PATH$input_path"
36557    fi
36558  fi
36559
36560  # remove trailing .exe if any
36561  new_path="${new_path/%.exe/}"
36562
36563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36564
36565  # First separate the path from the arguments. This will split at the first
36566  # space.
36567  complete="$GNM"
36568  path="${complete%% *}"
36569  tmp="$complete EOL"
36570  arguments="${tmp#* }"
36571
36572  # Input might be given as Windows format, start by converting to
36573  # unix format.
36574  new_path="$path"
36575
36576  windows_path="$new_path"
36577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578    unix_path=`$CYGPATH -u "$windows_path"`
36579    new_path="$unix_path"
36580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36582    new_path="$unix_path"
36583  fi
36584
36585
36586  # Now try to locate executable using which
36587  new_path=`$WHICH "$new_path" 2> /dev/null`
36588
36589  if test "x$new_path" = x; then
36590    # Oops. Which didn't find the executable.
36591    # The splitting of arguments from the executable at a space might have been incorrect,
36592    # since paths with space are more likely in Windows. Give it another try with the whole
36593    # argument.
36594    path="$complete"
36595    arguments="EOL"
36596    new_path="$path"
36597
36598  windows_path="$new_path"
36599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36600    unix_path=`$CYGPATH -u "$windows_path"`
36601    new_path="$unix_path"
36602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36604    new_path="$unix_path"
36605  fi
36606
36607
36608    new_path=`$WHICH "$new_path" 2> /dev/null`
36609    # bat and cmd files are not always considered executable in MSYS causing which
36610    # to not find them
36611    if test "x$new_path" = x \
36612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36614      new_path="$path"
36615
36616  windows_path="$new_path"
36617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36618    unix_path=`$CYGPATH -u "$windows_path"`
36619    new_path="$unix_path"
36620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36622    new_path="$unix_path"
36623  fi
36624
36625    fi
36626
36627    if test "x$new_path" = x; then
36628      # It's still not found. Now this is an unrecoverable error.
36629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36630$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36631      has_space=`$ECHO "$complete" | $GREP " "`
36632      if test "x$has_space" != x; then
36633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36635      fi
36636      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36637    fi
36638  fi
36639
36640  # Now new_path has a complete unix path to the binary
36641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36642    # Keep paths in /bin as-is, but remove trailing .exe if any
36643    new_path="${new_path/%.exe/}"
36644    # Do not save /bin paths to all_fixpath_prefixes!
36645  else
36646    # Not in mixed or Windows style, start by that.
36647    new_path=`cmd //c echo $new_path`
36648
36649  input_path="$new_path"
36650  # Check if we need to convert this using DOS-style short mode. If the path
36651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36652  # take no chances and rewrite it.
36653  # Note: m4 eats our [], so we need to use [ and ] instead.
36654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36655  if test "x$has_forbidden_chars" != x; then
36656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36658  fi
36659
36660    # Output is in $new_path
36661
36662  windows_path="$new_path"
36663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36664    unix_path=`$CYGPATH -u "$windows_path"`
36665    new_path="$unix_path"
36666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36668    new_path="$unix_path"
36669  fi
36670
36671    # remove trailing .exe if any
36672    new_path="${new_path/%.exe/}"
36673
36674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36676  fi
36677
36678    else
36679      # We're on a unix platform. Hooray! :)
36680      # First separate the path from the arguments. This will split at the first
36681      # space.
36682      complete="$GNM"
36683      path="${complete%% *}"
36684      tmp="$complete EOL"
36685      arguments="${tmp#* }"
36686
36687      # Cannot rely on the command "which" here since it doesn't always work.
36688      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36689      if test -z "$is_absolute_path"; then
36690        # Path to executable is not absolute. Find it.
36691        IFS_save="$IFS"
36692        IFS=:
36693        for p in $PATH; do
36694          if test -f "$p/$path" && test -x "$p/$path"; then
36695            new_path="$p/$path"
36696            break
36697          fi
36698        done
36699        IFS="$IFS_save"
36700      else
36701        # This is an absolute path, we can use it without further modifications.
36702        new_path="$path"
36703      fi
36704
36705      if test "x$new_path" = x; then
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36707$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36708        has_space=`$ECHO "$complete" | $GREP " "`
36709        if test "x$has_space" != x; then
36710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36712        fi
36713        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36714      fi
36715    fi
36716
36717    # Now join together the path and the arguments once again
36718    if test "x$arguments" != xEOL; then
36719      new_complete="$new_path ${arguments% *}"
36720    else
36721      new_complete="$new_path"
36722    fi
36723
36724    if test "x$complete" != "x$new_complete"; then
36725      GNM="$new_complete"
36726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36727$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36728    fi
36729  fi
36730
36731  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36732    # FIXME: we should unify this with the solaris case above.
36733
36734
36735  # Publish this variable in the help.
36736
36737
36738  if test "x$STRIP" = x; then
36739    # The variable is not set by user, try to locate tool using the code snippet
36740    if test -n "$ac_tool_prefix"; then
36741  for ac_prog in strip
36742  do
36743    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36744set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36746$as_echo_n "checking for $ac_word... " >&6; }
36747if ${ac_cv_prog_STRIP+:} false; then :
36748  $as_echo_n "(cached) " >&6
36749else
36750  if test -n "$STRIP"; then
36751  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36752else
36753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36754for as_dir in $PATH
36755do
36756  IFS=$as_save_IFS
36757  test -z "$as_dir" && as_dir=.
36758    for ac_exec_ext in '' $ac_executable_extensions; do
36759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36760    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36762    break 2
36763  fi
36764done
36765  done
36766IFS=$as_save_IFS
36767
36768fi
36769fi
36770STRIP=$ac_cv_prog_STRIP
36771if test -n "$STRIP"; then
36772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36773$as_echo "$STRIP" >&6; }
36774else
36775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36776$as_echo "no" >&6; }
36777fi
36778
36779
36780    test -n "$STRIP" && break
36781  done
36782fi
36783if test -z "$STRIP"; then
36784  ac_ct_STRIP=$STRIP
36785  for ac_prog in strip
36786do
36787  # Extract the first word of "$ac_prog", so it can be a program name with args.
36788set dummy $ac_prog; ac_word=$2
36789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36790$as_echo_n "checking for $ac_word... " >&6; }
36791if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36792  $as_echo_n "(cached) " >&6
36793else
36794  if test -n "$ac_ct_STRIP"; then
36795  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36796else
36797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36798for as_dir in $PATH
36799do
36800  IFS=$as_save_IFS
36801  test -z "$as_dir" && as_dir=.
36802    for ac_exec_ext in '' $ac_executable_extensions; do
36803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36804    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36806    break 2
36807  fi
36808done
36809  done
36810IFS=$as_save_IFS
36811
36812fi
36813fi
36814ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36815if test -n "$ac_ct_STRIP"; then
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36817$as_echo "$ac_ct_STRIP" >&6; }
36818else
36819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36820$as_echo "no" >&6; }
36821fi
36822
36823
36824  test -n "$ac_ct_STRIP" && break
36825done
36826
36827  if test "x$ac_ct_STRIP" = x; then
36828    STRIP=""
36829  else
36830    case $cross_compiling:$ac_tool_warned in
36831yes:)
36832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36834ac_tool_warned=yes ;;
36835esac
36836    STRIP=$ac_ct_STRIP
36837  fi
36838fi
36839
36840  else
36841    # The variable is set, but is it from the command line or the environment?
36842
36843    # Try to remove the string !STRIP! from our list.
36844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36846      # If it failed, the variable was not from the command line. Ignore it,
36847      # but warn the user (except for BASH, which is always set by the calling BASH).
36848      if test "xSTRIP" != xBASH; then
36849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36850$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36851      fi
36852      # Try to locate tool using the code snippet
36853      if test -n "$ac_tool_prefix"; then
36854  for ac_prog in strip
36855  do
36856    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36859$as_echo_n "checking for $ac_word... " >&6; }
36860if ${ac_cv_prog_STRIP+:} false; then :
36861  $as_echo_n "(cached) " >&6
36862else
36863  if test -n "$STRIP"; then
36864  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36865else
36866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36867for as_dir in $PATH
36868do
36869  IFS=$as_save_IFS
36870  test -z "$as_dir" && as_dir=.
36871    for ac_exec_ext in '' $ac_executable_extensions; do
36872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36873    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36875    break 2
36876  fi
36877done
36878  done
36879IFS=$as_save_IFS
36880
36881fi
36882fi
36883STRIP=$ac_cv_prog_STRIP
36884if test -n "$STRIP"; then
36885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36886$as_echo "$STRIP" >&6; }
36887else
36888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36889$as_echo "no" >&6; }
36890fi
36891
36892
36893    test -n "$STRIP" && break
36894  done
36895fi
36896if test -z "$STRIP"; then
36897  ac_ct_STRIP=$STRIP
36898  for ac_prog in strip
36899do
36900  # Extract the first word of "$ac_prog", so it can be a program name with args.
36901set dummy $ac_prog; ac_word=$2
36902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36903$as_echo_n "checking for $ac_word... " >&6; }
36904if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36905  $as_echo_n "(cached) " >&6
36906else
36907  if test -n "$ac_ct_STRIP"; then
36908  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36909else
36910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36911for as_dir in $PATH
36912do
36913  IFS=$as_save_IFS
36914  test -z "$as_dir" && as_dir=.
36915    for ac_exec_ext in '' $ac_executable_extensions; do
36916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36917    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36919    break 2
36920  fi
36921done
36922  done
36923IFS=$as_save_IFS
36924
36925fi
36926fi
36927ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36928if test -n "$ac_ct_STRIP"; then
36929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36930$as_echo "$ac_ct_STRIP" >&6; }
36931else
36932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933$as_echo "no" >&6; }
36934fi
36935
36936
36937  test -n "$ac_ct_STRIP" && break
36938done
36939
36940  if test "x$ac_ct_STRIP" = x; then
36941    STRIP=""
36942  else
36943    case $cross_compiling:$ac_tool_warned in
36944yes:)
36945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36947ac_tool_warned=yes ;;
36948esac
36949    STRIP=$ac_ct_STRIP
36950  fi
36951fi
36952
36953    else
36954      # If it succeeded, then it was overridden by the user. We will use it
36955      # for the tool.
36956
36957      # First remove it from the list of overridden variables, so we can test
36958      # for unknown variables in the end.
36959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36960
36961      # Check if the provided tool contains a complete path.
36962      tool_specified="$STRIP"
36963      tool_basename="${tool_specified##*/}"
36964      if test "x$tool_basename" = "x$tool_specified"; then
36965        # A command without a complete path is provided, search $PATH.
36966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36967$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36968        # Extract the first word of "$tool_basename", so it can be a program name with args.
36969set dummy $tool_basename; ac_word=$2
36970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36971$as_echo_n "checking for $ac_word... " >&6; }
36972if ${ac_cv_path_STRIP+:} false; then :
36973  $as_echo_n "(cached) " >&6
36974else
36975  case $STRIP in
36976  [\\/]* | ?:[\\/]*)
36977  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36978  ;;
36979  *)
36980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36981for as_dir in $PATH
36982do
36983  IFS=$as_save_IFS
36984  test -z "$as_dir" && as_dir=.
36985    for ac_exec_ext in '' $ac_executable_extensions; do
36986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36987    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36989    break 2
36990  fi
36991done
36992  done
36993IFS=$as_save_IFS
36994
36995  ;;
36996esac
36997fi
36998STRIP=$ac_cv_path_STRIP
36999if test -n "$STRIP"; then
37000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37001$as_echo "$STRIP" >&6; }
37002else
37003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37004$as_echo "no" >&6; }
37005fi
37006
37007
37008        if test "x$STRIP" = x; then
37009          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37010        fi
37011      else
37012        # Otherwise we believe it is a complete path. Use it as it is.
37013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37014$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37016$as_echo_n "checking for STRIP... " >&6; }
37017        if test ! -x "$tool_specified"; then
37018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37019$as_echo "not found" >&6; }
37020          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37021        fi
37022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37023$as_echo "$tool_specified" >&6; }
37024      fi
37025    fi
37026  fi
37027
37028
37029
37030  # Only process if variable expands to non-empty
37031
37032  if test "x$STRIP" != x; then
37033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37034
37035  # First separate the path from the arguments. This will split at the first
37036  # space.
37037  complete="$STRIP"
37038  path="${complete%% *}"
37039  tmp="$complete EOL"
37040  arguments="${tmp#* }"
37041
37042  # Input might be given as Windows format, start by converting to
37043  # unix format.
37044  new_path=`$CYGPATH -u "$path"`
37045
37046  # Now try to locate executable using which
37047  new_path=`$WHICH "$new_path" 2> /dev/null`
37048  # bat and cmd files are not always considered executable in cygwin causing which
37049  # to not find them
37050  if test "x$new_path" = x \
37051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37053    new_path=`$CYGPATH -u "$path"`
37054  fi
37055  if test "x$new_path" = x; then
37056    # Oops. Which didn't find the executable.
37057    # The splitting of arguments from the executable at a space might have been incorrect,
37058    # since paths with space are more likely in Windows. Give it another try with the whole
37059    # argument.
37060    path="$complete"
37061    arguments="EOL"
37062    new_path=`$CYGPATH -u "$path"`
37063    new_path=`$WHICH "$new_path" 2> /dev/null`
37064    # bat and cmd files are not always considered executable in cygwin causing which
37065    # to not find them
37066    if test "x$new_path" = x \
37067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37069      new_path=`$CYGPATH -u "$path"`
37070    fi
37071    if test "x$new_path" = x; then
37072      # It's still not found. Now this is an unrecoverable error.
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37074$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37075      has_space=`$ECHO "$complete" | $GREP " "`
37076      if test "x$has_space" != x; then
37077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37079      fi
37080      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37081    fi
37082  fi
37083
37084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37087  # "foo.exe" is OK but "foo" is an error.
37088  #
37089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37090  # It is also a way to make sure we got the proper file name for the real test later on.
37091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37092  if test "x$test_shortpath" = x; then
37093    # Short path failed, file does not exist as specified.
37094    # Try adding .exe or .cmd
37095    if test -f "${new_path}.exe"; then
37096      input_to_shortpath="${new_path}.exe"
37097    elif test -f "${new_path}.cmd"; then
37098      input_to_shortpath="${new_path}.cmd"
37099    else
37100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37101$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37104      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37105    fi
37106  else
37107    input_to_shortpath="$new_path"
37108  fi
37109
37110  # Call helper function which possibly converts this using DOS-style short mode.
37111  # If so, the updated path is stored in $new_path.
37112  new_path="$input_to_shortpath"
37113
37114  input_path="$input_to_shortpath"
37115  # Check if we need to convert this using DOS-style short mode. If the path
37116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37117  # take no chances and rewrite it.
37118  # Note: m4 eats our [], so we need to use [ and ] instead.
37119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37120  if test "x$has_forbidden_chars" != x; then
37121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37125      # Going to short mode and back again did indeed matter. Since short mode is
37126      # case insensitive, let's make it lowercase to improve readability.
37127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37128      # Now convert it back to Unix-style (cygpath)
37129      input_path=`$CYGPATH -u "$shortmode_path"`
37130      new_path="$input_path"
37131    fi
37132  fi
37133
37134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37135  if test "x$test_cygdrive_prefix" = x; then
37136    # As a simple fix, exclude /usr/bin since it's not a real path.
37137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37139      # a path prefixed by /cygdrive for fixpath to work.
37140      new_path="$CYGWIN_ROOT_PATH$input_path"
37141    fi
37142  fi
37143
37144  # remove trailing .exe if any
37145  new_path="${new_path/%.exe/}"
37146
37147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37148
37149  # First separate the path from the arguments. This will split at the first
37150  # space.
37151  complete="$STRIP"
37152  path="${complete%% *}"
37153  tmp="$complete EOL"
37154  arguments="${tmp#* }"
37155
37156  # Input might be given as Windows format, start by converting to
37157  # unix format.
37158  new_path="$path"
37159
37160  windows_path="$new_path"
37161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37162    unix_path=`$CYGPATH -u "$windows_path"`
37163    new_path="$unix_path"
37164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37166    new_path="$unix_path"
37167  fi
37168
37169
37170  # Now try to locate executable using which
37171  new_path=`$WHICH "$new_path" 2> /dev/null`
37172
37173  if test "x$new_path" = x; then
37174    # Oops. Which didn't find the executable.
37175    # The splitting of arguments from the executable at a space might have been incorrect,
37176    # since paths with space are more likely in Windows. Give it another try with the whole
37177    # argument.
37178    path="$complete"
37179    arguments="EOL"
37180    new_path="$path"
37181
37182  windows_path="$new_path"
37183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37184    unix_path=`$CYGPATH -u "$windows_path"`
37185    new_path="$unix_path"
37186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37188    new_path="$unix_path"
37189  fi
37190
37191
37192    new_path=`$WHICH "$new_path" 2> /dev/null`
37193    # bat and cmd files are not always considered executable in MSYS causing which
37194    # to not find them
37195    if test "x$new_path" = x \
37196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37198      new_path="$path"
37199
37200  windows_path="$new_path"
37201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37202    unix_path=`$CYGPATH -u "$windows_path"`
37203    new_path="$unix_path"
37204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37206    new_path="$unix_path"
37207  fi
37208
37209    fi
37210
37211    if test "x$new_path" = x; then
37212      # It's still not found. Now this is an unrecoverable error.
37213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37214$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37215      has_space=`$ECHO "$complete" | $GREP " "`
37216      if test "x$has_space" != x; then
37217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37219      fi
37220      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37221    fi
37222  fi
37223
37224  # Now new_path has a complete unix path to the binary
37225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37226    # Keep paths in /bin as-is, but remove trailing .exe if any
37227    new_path="${new_path/%.exe/}"
37228    # Do not save /bin paths to all_fixpath_prefixes!
37229  else
37230    # Not in mixed or Windows style, start by that.
37231    new_path=`cmd //c echo $new_path`
37232
37233  input_path="$new_path"
37234  # Check if we need to convert this using DOS-style short mode. If the path
37235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37236  # take no chances and rewrite it.
37237  # Note: m4 eats our [], so we need to use [ and ] instead.
37238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37239  if test "x$has_forbidden_chars" != x; then
37240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37242  fi
37243
37244    # Output is in $new_path
37245
37246  windows_path="$new_path"
37247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37248    unix_path=`$CYGPATH -u "$windows_path"`
37249    new_path="$unix_path"
37250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37252    new_path="$unix_path"
37253  fi
37254
37255    # remove trailing .exe if any
37256    new_path="${new_path/%.exe/}"
37257
37258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37260  fi
37261
37262    else
37263      # We're on a unix platform. Hooray! :)
37264      # First separate the path from the arguments. This will split at the first
37265      # space.
37266      complete="$STRIP"
37267      path="${complete%% *}"
37268      tmp="$complete EOL"
37269      arguments="${tmp#* }"
37270
37271      # Cannot rely on the command "which" here since it doesn't always work.
37272      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37273      if test -z "$is_absolute_path"; then
37274        # Path to executable is not absolute. Find it.
37275        IFS_save="$IFS"
37276        IFS=:
37277        for p in $PATH; do
37278          if test -f "$p/$path" && test -x "$p/$path"; then
37279            new_path="$p/$path"
37280            break
37281          fi
37282        done
37283        IFS="$IFS_save"
37284      else
37285        # This is an absolute path, we can use it without further modifications.
37286        new_path="$path"
37287      fi
37288
37289      if test "x$new_path" = x; then
37290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37291$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37292        has_space=`$ECHO "$complete" | $GREP " "`
37293        if test "x$has_space" != x; then
37294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37296        fi
37297        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37298      fi
37299    fi
37300
37301    # Now join together the path and the arguments once again
37302    if test "x$arguments" != xEOL; then
37303      new_complete="$new_path ${arguments% *}"
37304    else
37305      new_complete="$new_path"
37306    fi
37307
37308    if test "x$complete" != "x$new_complete"; then
37309      STRIP="$new_complete"
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37311$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37312    fi
37313  fi
37314
37315
37316
37317  # Publish this variable in the help.
37318
37319
37320  if test "x$NM" = x; then
37321    # The variable is not set by user, try to locate tool using the code snippet
37322    if test -n "$ac_tool_prefix"; then
37323  for ac_prog in nm
37324  do
37325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37328$as_echo_n "checking for $ac_word... " >&6; }
37329if ${ac_cv_prog_NM+:} false; then :
37330  $as_echo_n "(cached) " >&6
37331else
37332  if test -n "$NM"; then
37333  ac_cv_prog_NM="$NM" # Let the user override the test.
37334else
37335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37336for as_dir in $PATH
37337do
37338  IFS=$as_save_IFS
37339  test -z "$as_dir" && as_dir=.
37340    for ac_exec_ext in '' $ac_executable_extensions; do
37341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37342    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37344    break 2
37345  fi
37346done
37347  done
37348IFS=$as_save_IFS
37349
37350fi
37351fi
37352NM=$ac_cv_prog_NM
37353if test -n "$NM"; then
37354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37355$as_echo "$NM" >&6; }
37356else
37357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358$as_echo "no" >&6; }
37359fi
37360
37361
37362    test -n "$NM" && break
37363  done
37364fi
37365if test -z "$NM"; then
37366  ac_ct_NM=$NM
37367  for ac_prog in nm
37368do
37369  # Extract the first word of "$ac_prog", so it can be a program name with args.
37370set dummy $ac_prog; ac_word=$2
37371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37372$as_echo_n "checking for $ac_word... " >&6; }
37373if ${ac_cv_prog_ac_ct_NM+:} false; then :
37374  $as_echo_n "(cached) " >&6
37375else
37376  if test -n "$ac_ct_NM"; then
37377  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37378else
37379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37380for as_dir in $PATH
37381do
37382  IFS=$as_save_IFS
37383  test -z "$as_dir" && as_dir=.
37384    for ac_exec_ext in '' $ac_executable_extensions; do
37385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37386    ac_cv_prog_ac_ct_NM="$ac_prog"
37387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37388    break 2
37389  fi
37390done
37391  done
37392IFS=$as_save_IFS
37393
37394fi
37395fi
37396ac_ct_NM=$ac_cv_prog_ac_ct_NM
37397if test -n "$ac_ct_NM"; then
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37399$as_echo "$ac_ct_NM" >&6; }
37400else
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37402$as_echo "no" >&6; }
37403fi
37404
37405
37406  test -n "$ac_ct_NM" && break
37407done
37408
37409  if test "x$ac_ct_NM" = x; then
37410    NM=""
37411  else
37412    case $cross_compiling:$ac_tool_warned in
37413yes:)
37414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37416ac_tool_warned=yes ;;
37417esac
37418    NM=$ac_ct_NM
37419  fi
37420fi
37421
37422  else
37423    # The variable is set, but is it from the command line or the environment?
37424
37425    # Try to remove the string !NM! from our list.
37426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37428      # If it failed, the variable was not from the command line. Ignore it,
37429      # but warn the user (except for BASH, which is always set by the calling BASH).
37430      if test "xNM" != xBASH; then
37431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37432$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37433      fi
37434      # Try to locate tool using the code snippet
37435      if test -n "$ac_tool_prefix"; then
37436  for ac_prog in nm
37437  do
37438    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37441$as_echo_n "checking for $ac_word... " >&6; }
37442if ${ac_cv_prog_NM+:} false; then :
37443  $as_echo_n "(cached) " >&6
37444else
37445  if test -n "$NM"; then
37446  ac_cv_prog_NM="$NM" # Let the user override the test.
37447else
37448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37449for as_dir in $PATH
37450do
37451  IFS=$as_save_IFS
37452  test -z "$as_dir" && as_dir=.
37453    for ac_exec_ext in '' $ac_executable_extensions; do
37454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37455    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37457    break 2
37458  fi
37459done
37460  done
37461IFS=$as_save_IFS
37462
37463fi
37464fi
37465NM=$ac_cv_prog_NM
37466if test -n "$NM"; then
37467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37468$as_echo "$NM" >&6; }
37469else
37470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37471$as_echo "no" >&6; }
37472fi
37473
37474
37475    test -n "$NM" && break
37476  done
37477fi
37478if test -z "$NM"; then
37479  ac_ct_NM=$NM
37480  for ac_prog in nm
37481do
37482  # Extract the first word of "$ac_prog", so it can be a program name with args.
37483set dummy $ac_prog; ac_word=$2
37484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37485$as_echo_n "checking for $ac_word... " >&6; }
37486if ${ac_cv_prog_ac_ct_NM+:} false; then :
37487  $as_echo_n "(cached) " >&6
37488else
37489  if test -n "$ac_ct_NM"; then
37490  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37491else
37492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37493for as_dir in $PATH
37494do
37495  IFS=$as_save_IFS
37496  test -z "$as_dir" && as_dir=.
37497    for ac_exec_ext in '' $ac_executable_extensions; do
37498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37499    ac_cv_prog_ac_ct_NM="$ac_prog"
37500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37501    break 2
37502  fi
37503done
37504  done
37505IFS=$as_save_IFS
37506
37507fi
37508fi
37509ac_ct_NM=$ac_cv_prog_ac_ct_NM
37510if test -n "$ac_ct_NM"; then
37511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37512$as_echo "$ac_ct_NM" >&6; }
37513else
37514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37515$as_echo "no" >&6; }
37516fi
37517
37518
37519  test -n "$ac_ct_NM" && break
37520done
37521
37522  if test "x$ac_ct_NM" = x; then
37523    NM=""
37524  else
37525    case $cross_compiling:$ac_tool_warned in
37526yes:)
37527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37529ac_tool_warned=yes ;;
37530esac
37531    NM=$ac_ct_NM
37532  fi
37533fi
37534
37535    else
37536      # If it succeeded, then it was overridden by the user. We will use it
37537      # for the tool.
37538
37539      # First remove it from the list of overridden variables, so we can test
37540      # for unknown variables in the end.
37541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37542
37543      # Check if the provided tool contains a complete path.
37544      tool_specified="$NM"
37545      tool_basename="${tool_specified##*/}"
37546      if test "x$tool_basename" = "x$tool_specified"; then
37547        # A command without a complete path is provided, search $PATH.
37548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37549$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37550        # Extract the first word of "$tool_basename", so it can be a program name with args.
37551set dummy $tool_basename; ac_word=$2
37552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37553$as_echo_n "checking for $ac_word... " >&6; }
37554if ${ac_cv_path_NM+:} false; then :
37555  $as_echo_n "(cached) " >&6
37556else
37557  case $NM in
37558  [\\/]* | ?:[\\/]*)
37559  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37560  ;;
37561  *)
37562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37563for as_dir in $PATH
37564do
37565  IFS=$as_save_IFS
37566  test -z "$as_dir" && as_dir=.
37567    for ac_exec_ext in '' $ac_executable_extensions; do
37568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37569    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37571    break 2
37572  fi
37573done
37574  done
37575IFS=$as_save_IFS
37576
37577  ;;
37578esac
37579fi
37580NM=$ac_cv_path_NM
37581if test -n "$NM"; then
37582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37583$as_echo "$NM" >&6; }
37584else
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586$as_echo "no" >&6; }
37587fi
37588
37589
37590        if test "x$NM" = x; then
37591          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37592        fi
37593      else
37594        # Otherwise we believe it is a complete path. Use it as it is.
37595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37596$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37598$as_echo_n "checking for NM... " >&6; }
37599        if test ! -x "$tool_specified"; then
37600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37601$as_echo "not found" >&6; }
37602          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37603        fi
37604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37605$as_echo "$tool_specified" >&6; }
37606      fi
37607    fi
37608  fi
37609
37610
37611
37612  # Only process if variable expands to non-empty
37613
37614  if test "x$NM" != x; then
37615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37616
37617  # First separate the path from the arguments. This will split at the first
37618  # space.
37619  complete="$NM"
37620  path="${complete%% *}"
37621  tmp="$complete EOL"
37622  arguments="${tmp#* }"
37623
37624  # Input might be given as Windows format, start by converting to
37625  # unix format.
37626  new_path=`$CYGPATH -u "$path"`
37627
37628  # Now try to locate executable using which
37629  new_path=`$WHICH "$new_path" 2> /dev/null`
37630  # bat and cmd files are not always considered executable in cygwin causing which
37631  # to not find them
37632  if test "x$new_path" = x \
37633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37635    new_path=`$CYGPATH -u "$path"`
37636  fi
37637  if test "x$new_path" = x; then
37638    # Oops. Which didn't find the executable.
37639    # The splitting of arguments from the executable at a space might have been incorrect,
37640    # since paths with space are more likely in Windows. Give it another try with the whole
37641    # argument.
37642    path="$complete"
37643    arguments="EOL"
37644    new_path=`$CYGPATH -u "$path"`
37645    new_path=`$WHICH "$new_path" 2> /dev/null`
37646    # bat and cmd files are not always considered executable in cygwin causing which
37647    # to not find them
37648    if test "x$new_path" = x \
37649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37651      new_path=`$CYGPATH -u "$path"`
37652    fi
37653    if test "x$new_path" = x; then
37654      # It's still not found. Now this is an unrecoverable error.
37655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37656$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37657      has_space=`$ECHO "$complete" | $GREP " "`
37658      if test "x$has_space" != x; then
37659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37661      fi
37662      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37663    fi
37664  fi
37665
37666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37669  # "foo.exe" is OK but "foo" is an error.
37670  #
37671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37672  # It is also a way to make sure we got the proper file name for the real test later on.
37673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37674  if test "x$test_shortpath" = x; then
37675    # Short path failed, file does not exist as specified.
37676    # Try adding .exe or .cmd
37677    if test -f "${new_path}.exe"; then
37678      input_to_shortpath="${new_path}.exe"
37679    elif test -f "${new_path}.cmd"; then
37680      input_to_shortpath="${new_path}.cmd"
37681    else
37682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37683$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37686      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37687    fi
37688  else
37689    input_to_shortpath="$new_path"
37690  fi
37691
37692  # Call helper function which possibly converts this using DOS-style short mode.
37693  # If so, the updated path is stored in $new_path.
37694  new_path="$input_to_shortpath"
37695
37696  input_path="$input_to_shortpath"
37697  # Check if we need to convert this using DOS-style short mode. If the path
37698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37699  # take no chances and rewrite it.
37700  # Note: m4 eats our [], so we need to use [ and ] instead.
37701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37702  if test "x$has_forbidden_chars" != x; then
37703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37707      # Going to short mode and back again did indeed matter. Since short mode is
37708      # case insensitive, let's make it lowercase to improve readability.
37709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37710      # Now convert it back to Unix-style (cygpath)
37711      input_path=`$CYGPATH -u "$shortmode_path"`
37712      new_path="$input_path"
37713    fi
37714  fi
37715
37716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37717  if test "x$test_cygdrive_prefix" = x; then
37718    # As a simple fix, exclude /usr/bin since it's not a real path.
37719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37721      # a path prefixed by /cygdrive for fixpath to work.
37722      new_path="$CYGWIN_ROOT_PATH$input_path"
37723    fi
37724  fi
37725
37726  # remove trailing .exe if any
37727  new_path="${new_path/%.exe/}"
37728
37729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37730
37731  # First separate the path from the arguments. This will split at the first
37732  # space.
37733  complete="$NM"
37734  path="${complete%% *}"
37735  tmp="$complete EOL"
37736  arguments="${tmp#* }"
37737
37738  # Input might be given as Windows format, start by converting to
37739  # unix format.
37740  new_path="$path"
37741
37742  windows_path="$new_path"
37743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37744    unix_path=`$CYGPATH -u "$windows_path"`
37745    new_path="$unix_path"
37746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37748    new_path="$unix_path"
37749  fi
37750
37751
37752  # Now try to locate executable using which
37753  new_path=`$WHICH "$new_path" 2> /dev/null`
37754
37755  if test "x$new_path" = x; then
37756    # Oops. Which didn't find the executable.
37757    # The splitting of arguments from the executable at a space might have been incorrect,
37758    # since paths with space are more likely in Windows. Give it another try with the whole
37759    # argument.
37760    path="$complete"
37761    arguments="EOL"
37762    new_path="$path"
37763
37764  windows_path="$new_path"
37765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37766    unix_path=`$CYGPATH -u "$windows_path"`
37767    new_path="$unix_path"
37768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37770    new_path="$unix_path"
37771  fi
37772
37773
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in MSYS causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path="$path"
37781
37782  windows_path="$new_path"
37783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37784    unix_path=`$CYGPATH -u "$windows_path"`
37785    new_path="$unix_path"
37786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37788    new_path="$unix_path"
37789  fi
37790
37791    fi
37792
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Now new_path has a complete unix path to the binary
37807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37808    # Keep paths in /bin as-is, but remove trailing .exe if any
37809    new_path="${new_path/%.exe/}"
37810    # Do not save /bin paths to all_fixpath_prefixes!
37811  else
37812    # Not in mixed or Windows style, start by that.
37813    new_path=`cmd //c echo $new_path`
37814
37815  input_path="$new_path"
37816  # Check if we need to convert this using DOS-style short mode. If the path
37817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37818  # take no chances and rewrite it.
37819  # Note: m4 eats our [], so we need to use [ and ] instead.
37820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37821  if test "x$has_forbidden_chars" != x; then
37822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37824  fi
37825
37826    # Output is in $new_path
37827
37828  windows_path="$new_path"
37829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37830    unix_path=`$CYGPATH -u "$windows_path"`
37831    new_path="$unix_path"
37832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37834    new_path="$unix_path"
37835  fi
37836
37837    # remove trailing .exe if any
37838    new_path="${new_path/%.exe/}"
37839
37840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37842  fi
37843
37844    else
37845      # We're on a unix platform. Hooray! :)
37846      # First separate the path from the arguments. This will split at the first
37847      # space.
37848      complete="$NM"
37849      path="${complete%% *}"
37850      tmp="$complete EOL"
37851      arguments="${tmp#* }"
37852
37853      # Cannot rely on the command "which" here since it doesn't always work.
37854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37855      if test -z "$is_absolute_path"; then
37856        # Path to executable is not absolute. Find it.
37857        IFS_save="$IFS"
37858        IFS=:
37859        for p in $PATH; do
37860          if test -f "$p/$path" && test -x "$p/$path"; then
37861            new_path="$p/$path"
37862            break
37863          fi
37864        done
37865        IFS="$IFS_save"
37866      else
37867        # This is an absolute path, we can use it without further modifications.
37868        new_path="$path"
37869      fi
37870
37871      if test "x$new_path" = x; then
37872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37874        has_space=`$ECHO "$complete" | $GREP " "`
37875        if test "x$has_space" != x; then
37876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37878        fi
37879        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37880      fi
37881    fi
37882
37883    # Now join together the path and the arguments once again
37884    if test "x$arguments" != xEOL; then
37885      new_complete="$new_path ${arguments% *}"
37886    else
37887      new_complete="$new_path"
37888    fi
37889
37890    if test "x$complete" != "x$new_complete"; then
37891      NM="$new_complete"
37892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37893$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37894    fi
37895  fi
37896
37897    GNM="$NM"
37898
37899  fi
37900
37901  # objcopy is used for moving debug symbols to separate files when
37902  # full debug symbols are enabled.
37903  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37904
37905
37906  # Publish this variable in the help.
37907
37908
37909  if test "x$OBJCOPY" = x; then
37910    # The variable is not set by user, try to locate tool using the code snippet
37911    if test -n "$ac_tool_prefix"; then
37912  for ac_prog in gobjcopy objcopy
37913  do
37914    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37915set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37917$as_echo_n "checking for $ac_word... " >&6; }
37918if ${ac_cv_prog_OBJCOPY+:} false; then :
37919  $as_echo_n "(cached) " >&6
37920else
37921  if test -n "$OBJCOPY"; then
37922  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37923else
37924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37925for as_dir in $PATH
37926do
37927  IFS=$as_save_IFS
37928  test -z "$as_dir" && as_dir=.
37929    for ac_exec_ext in '' $ac_executable_extensions; do
37930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37931    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37933    break 2
37934  fi
37935done
37936  done
37937IFS=$as_save_IFS
37938
37939fi
37940fi
37941OBJCOPY=$ac_cv_prog_OBJCOPY
37942if test -n "$OBJCOPY"; then
37943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37944$as_echo "$OBJCOPY" >&6; }
37945else
37946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37947$as_echo "no" >&6; }
37948fi
37949
37950
37951    test -n "$OBJCOPY" && break
37952  done
37953fi
37954if test -z "$OBJCOPY"; then
37955  ac_ct_OBJCOPY=$OBJCOPY
37956  for ac_prog in gobjcopy objcopy
37957do
37958  # Extract the first word of "$ac_prog", so it can be a program name with args.
37959set dummy $ac_prog; ac_word=$2
37960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37961$as_echo_n "checking for $ac_word... " >&6; }
37962if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37963  $as_echo_n "(cached) " >&6
37964else
37965  if test -n "$ac_ct_OBJCOPY"; then
37966  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37967else
37968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37969for as_dir in $PATH
37970do
37971  IFS=$as_save_IFS
37972  test -z "$as_dir" && as_dir=.
37973    for ac_exec_ext in '' $ac_executable_extensions; do
37974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37975    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37977    break 2
37978  fi
37979done
37980  done
37981IFS=$as_save_IFS
37982
37983fi
37984fi
37985ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37986if test -n "$ac_ct_OBJCOPY"; then
37987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37988$as_echo "$ac_ct_OBJCOPY" >&6; }
37989else
37990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37991$as_echo "no" >&6; }
37992fi
37993
37994
37995  test -n "$ac_ct_OBJCOPY" && break
37996done
37997
37998  if test "x$ac_ct_OBJCOPY" = x; then
37999    OBJCOPY=""
38000  else
38001    case $cross_compiling:$ac_tool_warned in
38002yes:)
38003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38005ac_tool_warned=yes ;;
38006esac
38007    OBJCOPY=$ac_ct_OBJCOPY
38008  fi
38009fi
38010
38011  else
38012    # The variable is set, but is it from the command line or the environment?
38013
38014    # Try to remove the string !OBJCOPY! from our list.
38015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38017      # If it failed, the variable was not from the command line. Ignore it,
38018      # but warn the user (except for BASH, which is always set by the calling BASH).
38019      if test "xOBJCOPY" != xBASH; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38021$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38022      fi
38023      # Try to locate tool using the code snippet
38024      if test -n "$ac_tool_prefix"; then
38025  for ac_prog in gobjcopy objcopy
38026  do
38027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38030$as_echo_n "checking for $ac_word... " >&6; }
38031if ${ac_cv_prog_OBJCOPY+:} false; then :
38032  $as_echo_n "(cached) " >&6
38033else
38034  if test -n "$OBJCOPY"; then
38035  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38036else
38037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38038for as_dir in $PATH
38039do
38040  IFS=$as_save_IFS
38041  test -z "$as_dir" && as_dir=.
38042    for ac_exec_ext in '' $ac_executable_extensions; do
38043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38044    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38046    break 2
38047  fi
38048done
38049  done
38050IFS=$as_save_IFS
38051
38052fi
38053fi
38054OBJCOPY=$ac_cv_prog_OBJCOPY
38055if test -n "$OBJCOPY"; then
38056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38057$as_echo "$OBJCOPY" >&6; }
38058else
38059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38060$as_echo "no" >&6; }
38061fi
38062
38063
38064    test -n "$OBJCOPY" && break
38065  done
38066fi
38067if test -z "$OBJCOPY"; then
38068  ac_ct_OBJCOPY=$OBJCOPY
38069  for ac_prog in gobjcopy objcopy
38070do
38071  # Extract the first word of "$ac_prog", so it can be a program name with args.
38072set dummy $ac_prog; ac_word=$2
38073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38074$as_echo_n "checking for $ac_word... " >&6; }
38075if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38076  $as_echo_n "(cached) " >&6
38077else
38078  if test -n "$ac_ct_OBJCOPY"; then
38079  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38080else
38081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38082for as_dir in $PATH
38083do
38084  IFS=$as_save_IFS
38085  test -z "$as_dir" && as_dir=.
38086    for ac_exec_ext in '' $ac_executable_extensions; do
38087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38088    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38090    break 2
38091  fi
38092done
38093  done
38094IFS=$as_save_IFS
38095
38096fi
38097fi
38098ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38099if test -n "$ac_ct_OBJCOPY"; then
38100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38101$as_echo "$ac_ct_OBJCOPY" >&6; }
38102else
38103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38104$as_echo "no" >&6; }
38105fi
38106
38107
38108  test -n "$ac_ct_OBJCOPY" && break
38109done
38110
38111  if test "x$ac_ct_OBJCOPY" = x; then
38112    OBJCOPY=""
38113  else
38114    case $cross_compiling:$ac_tool_warned in
38115yes:)
38116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38118ac_tool_warned=yes ;;
38119esac
38120    OBJCOPY=$ac_ct_OBJCOPY
38121  fi
38122fi
38123
38124    else
38125      # If it succeeded, then it was overridden by the user. We will use it
38126      # for the tool.
38127
38128      # First remove it from the list of overridden variables, so we can test
38129      # for unknown variables in the end.
38130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38131
38132      # Check if the provided tool contains a complete path.
38133      tool_specified="$OBJCOPY"
38134      tool_basename="${tool_specified##*/}"
38135      if test "x$tool_basename" = "x$tool_specified"; then
38136        # A command without a complete path is provided, search $PATH.
38137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38138$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38139        # Extract the first word of "$tool_basename", so it can be a program name with args.
38140set dummy $tool_basename; ac_word=$2
38141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38142$as_echo_n "checking for $ac_word... " >&6; }
38143if ${ac_cv_path_OBJCOPY+:} false; then :
38144  $as_echo_n "(cached) " >&6
38145else
38146  case $OBJCOPY in
38147  [\\/]* | ?:[\\/]*)
38148  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38149  ;;
38150  *)
38151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38152for as_dir in $PATH
38153do
38154  IFS=$as_save_IFS
38155  test -z "$as_dir" && as_dir=.
38156    for ac_exec_ext in '' $ac_executable_extensions; do
38157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38158    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38160    break 2
38161  fi
38162done
38163  done
38164IFS=$as_save_IFS
38165
38166  ;;
38167esac
38168fi
38169OBJCOPY=$ac_cv_path_OBJCOPY
38170if test -n "$OBJCOPY"; then
38171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38172$as_echo "$OBJCOPY" >&6; }
38173else
38174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38175$as_echo "no" >&6; }
38176fi
38177
38178
38179        if test "x$OBJCOPY" = x; then
38180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38181        fi
38182      else
38183        # Otherwise we believe it is a complete path. Use it as it is.
38184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38185$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38187$as_echo_n "checking for OBJCOPY... " >&6; }
38188        if test ! -x "$tool_specified"; then
38189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38190$as_echo "not found" >&6; }
38191          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38192        fi
38193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38194$as_echo "$tool_specified" >&6; }
38195      fi
38196    fi
38197  fi
38198
38199
38200    # Only call fixup if objcopy was found.
38201    if test -n "$OBJCOPY"; then
38202
38203  # Only process if variable expands to non-empty
38204
38205  if test "x$OBJCOPY" != x; then
38206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38207
38208  # First separate the path from the arguments. This will split at the first
38209  # space.
38210  complete="$OBJCOPY"
38211  path="${complete%% *}"
38212  tmp="$complete EOL"
38213  arguments="${tmp#* }"
38214
38215  # Input might be given as Windows format, start by converting to
38216  # unix format.
38217  new_path=`$CYGPATH -u "$path"`
38218
38219  # Now try to locate executable using which
38220  new_path=`$WHICH "$new_path" 2> /dev/null`
38221  # bat and cmd files are not always considered executable in cygwin causing which
38222  # to not find them
38223  if test "x$new_path" = x \
38224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38226    new_path=`$CYGPATH -u "$path"`
38227  fi
38228  if test "x$new_path" = x; then
38229    # Oops. Which didn't find the executable.
38230    # The splitting of arguments from the executable at a space might have been incorrect,
38231    # since paths with space are more likely in Windows. Give it another try with the whole
38232    # argument.
38233    path="$complete"
38234    arguments="EOL"
38235    new_path=`$CYGPATH -u "$path"`
38236    new_path=`$WHICH "$new_path" 2> /dev/null`
38237    # bat and cmd files are not always considered executable in cygwin causing which
38238    # to not find them
38239    if test "x$new_path" = x \
38240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38242      new_path=`$CYGPATH -u "$path"`
38243    fi
38244    if test "x$new_path" = x; then
38245      # It's still not found. Now this is an unrecoverable error.
38246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38247$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38248      has_space=`$ECHO "$complete" | $GREP " "`
38249      if test "x$has_space" != x; then
38250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38252      fi
38253      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38254    fi
38255  fi
38256
38257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38260  # "foo.exe" is OK but "foo" is an error.
38261  #
38262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38263  # It is also a way to make sure we got the proper file name for the real test later on.
38264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38265  if test "x$test_shortpath" = x; then
38266    # Short path failed, file does not exist as specified.
38267    # Try adding .exe or .cmd
38268    if test -f "${new_path}.exe"; then
38269      input_to_shortpath="${new_path}.exe"
38270    elif test -f "${new_path}.cmd"; then
38271      input_to_shortpath="${new_path}.cmd"
38272    else
38273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38274$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38277      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38278    fi
38279  else
38280    input_to_shortpath="$new_path"
38281  fi
38282
38283  # Call helper function which possibly converts this using DOS-style short mode.
38284  # If so, the updated path is stored in $new_path.
38285  new_path="$input_to_shortpath"
38286
38287  input_path="$input_to_shortpath"
38288  # Check if we need to convert this using DOS-style short mode. If the path
38289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38290  # take no chances and rewrite it.
38291  # Note: m4 eats our [], so we need to use [ and ] instead.
38292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38293  if test "x$has_forbidden_chars" != x; then
38294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38298      # Going to short mode and back again did indeed matter. Since short mode is
38299      # case insensitive, let's make it lowercase to improve readability.
38300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38301      # Now convert it back to Unix-style (cygpath)
38302      input_path=`$CYGPATH -u "$shortmode_path"`
38303      new_path="$input_path"
38304    fi
38305  fi
38306
38307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38308  if test "x$test_cygdrive_prefix" = x; then
38309    # As a simple fix, exclude /usr/bin since it's not a real path.
38310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38312      # a path prefixed by /cygdrive for fixpath to work.
38313      new_path="$CYGWIN_ROOT_PATH$input_path"
38314    fi
38315  fi
38316
38317  # remove trailing .exe if any
38318  new_path="${new_path/%.exe/}"
38319
38320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321
38322  # First separate the path from the arguments. This will split at the first
38323  # space.
38324  complete="$OBJCOPY"
38325  path="${complete%% *}"
38326  tmp="$complete EOL"
38327  arguments="${tmp#* }"
38328
38329  # Input might be given as Windows format, start by converting to
38330  # unix format.
38331  new_path="$path"
38332
38333  windows_path="$new_path"
38334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38335    unix_path=`$CYGPATH -u "$windows_path"`
38336    new_path="$unix_path"
38337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38339    new_path="$unix_path"
38340  fi
38341
38342
38343  # Now try to locate executable using which
38344  new_path=`$WHICH "$new_path" 2> /dev/null`
38345
38346  if test "x$new_path" = x; then
38347    # Oops. Which didn't find the executable.
38348    # The splitting of arguments from the executable at a space might have been incorrect,
38349    # since paths with space are more likely in Windows. Give it another try with the whole
38350    # argument.
38351    path="$complete"
38352    arguments="EOL"
38353    new_path="$path"
38354
38355  windows_path="$new_path"
38356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38357    unix_path=`$CYGPATH -u "$windows_path"`
38358    new_path="$unix_path"
38359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38361    new_path="$unix_path"
38362  fi
38363
38364
38365    new_path=`$WHICH "$new_path" 2> /dev/null`
38366    # bat and cmd files are not always considered executable in MSYS causing which
38367    # to not find them
38368    if test "x$new_path" = x \
38369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38371      new_path="$path"
38372
38373  windows_path="$new_path"
38374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38375    unix_path=`$CYGPATH -u "$windows_path"`
38376    new_path="$unix_path"
38377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38379    new_path="$unix_path"
38380  fi
38381
38382    fi
38383
38384    if test "x$new_path" = x; then
38385      # It's still not found. Now this is an unrecoverable error.
38386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38387$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38388      has_space=`$ECHO "$complete" | $GREP " "`
38389      if test "x$has_space" != x; then
38390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38392      fi
38393      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38394    fi
38395  fi
38396
38397  # Now new_path has a complete unix path to the binary
38398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38399    # Keep paths in /bin as-is, but remove trailing .exe if any
38400    new_path="${new_path/%.exe/}"
38401    # Do not save /bin paths to all_fixpath_prefixes!
38402  else
38403    # Not in mixed or Windows style, start by that.
38404    new_path=`cmd //c echo $new_path`
38405
38406  input_path="$new_path"
38407  # Check if we need to convert this using DOS-style short mode. If the path
38408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38409  # take no chances and rewrite it.
38410  # Note: m4 eats our [], so we need to use [ and ] instead.
38411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38412  if test "x$has_forbidden_chars" != x; then
38413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38415  fi
38416
38417    # Output is in $new_path
38418
38419  windows_path="$new_path"
38420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38421    unix_path=`$CYGPATH -u "$windows_path"`
38422    new_path="$unix_path"
38423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38425    new_path="$unix_path"
38426  fi
38427
38428    # remove trailing .exe if any
38429    new_path="${new_path/%.exe/}"
38430
38431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38433  fi
38434
38435    else
38436      # We're on a unix platform. Hooray! :)
38437      # First separate the path from the arguments. This will split at the first
38438      # space.
38439      complete="$OBJCOPY"
38440      path="${complete%% *}"
38441      tmp="$complete EOL"
38442      arguments="${tmp#* }"
38443
38444      # Cannot rely on the command "which" here since it doesn't always work.
38445      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38446      if test -z "$is_absolute_path"; then
38447        # Path to executable is not absolute. Find it.
38448        IFS_save="$IFS"
38449        IFS=:
38450        for p in $PATH; do
38451          if test -f "$p/$path" && test -x "$p/$path"; then
38452            new_path="$p/$path"
38453            break
38454          fi
38455        done
38456        IFS="$IFS_save"
38457      else
38458        # This is an absolute path, we can use it without further modifications.
38459        new_path="$path"
38460      fi
38461
38462      if test "x$new_path" = x; then
38463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38464$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38465        has_space=`$ECHO "$complete" | $GREP " "`
38466        if test "x$has_space" != x; then
38467          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38469        fi
38470        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38471      fi
38472    fi
38473
38474    # Now join together the path and the arguments once again
38475    if test "x$arguments" != xEOL; then
38476      new_complete="$new_path ${arguments% *}"
38477    else
38478      new_complete="$new_path"
38479    fi
38480
38481    if test "x$complete" != "x$new_complete"; then
38482      OBJCOPY="$new_complete"
38483      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38484$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38485    fi
38486  fi
38487
38488      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38489        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38490        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38491        # - version number is last blank separate word on first line
38492        # - version number formats that have been seen:
38493        #   - <major>.<minor>
38494        #   - <major>.<minor>.<micro>
38495        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38496        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38497         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38498              -e 's/.* //' \
38499              -e '/^[01]\./b bad' \
38500              -e '/^2\./{' \
38501              -e '  s/^2\.//' \
38502              -e '  /^[0-9]$/b bad' \
38503              -e '  /^[0-9]\./b bad' \
38504              -e '  /^1[0-9]$/b bad' \
38505              -e '  /^1[0-9]\./b bad' \
38506              -e '  /^20\./b bad' \
38507              -e '  /^21\.0$/b bad' \
38508              -e '  /^21\.0\./b bad' \
38509              -e '}' \
38510              -e ':good' \
38511              -e 's/.*/VALID_VERSION/p' \
38512              -e 'q' \
38513              -e ':bad' \
38514              -e 's/.*/BAD_VERSION/p' \
38515              -e 'q'`
38516        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38517          OBJCOPY=
38518          { $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
38519$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38520          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38521$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38522          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38523$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38524          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38525$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38526          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38527$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38528        fi
38529      fi
38530    fi
38531  fi
38532
38533
38534
38535  # Publish this variable in the help.
38536
38537
38538  if test "x$OBJDUMP" = x; then
38539    # The variable is not set by user, try to locate tool using the code snippet
38540    if test -n "$ac_tool_prefix"; then
38541  for ac_prog in gobjdump objdump
38542  do
38543    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38544set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38546$as_echo_n "checking for $ac_word... " >&6; }
38547if ${ac_cv_prog_OBJDUMP+:} false; then :
38548  $as_echo_n "(cached) " >&6
38549else
38550  if test -n "$OBJDUMP"; then
38551  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38552else
38553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38554for as_dir in $PATH
38555do
38556  IFS=$as_save_IFS
38557  test -z "$as_dir" && as_dir=.
38558    for ac_exec_ext in '' $ac_executable_extensions; do
38559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38560    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38562    break 2
38563  fi
38564done
38565  done
38566IFS=$as_save_IFS
38567
38568fi
38569fi
38570OBJDUMP=$ac_cv_prog_OBJDUMP
38571if test -n "$OBJDUMP"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38573$as_echo "$OBJDUMP" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580    test -n "$OBJDUMP" && break
38581  done
38582fi
38583if test -z "$OBJDUMP"; then
38584  ac_ct_OBJDUMP=$OBJDUMP
38585  for ac_prog in gobjdump objdump
38586do
38587  # Extract the first word of "$ac_prog", so it can be a program name with args.
38588set dummy $ac_prog; ac_word=$2
38589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38590$as_echo_n "checking for $ac_word... " >&6; }
38591if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38592  $as_echo_n "(cached) " >&6
38593else
38594  if test -n "$ac_ct_OBJDUMP"; then
38595  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38596else
38597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38598for as_dir in $PATH
38599do
38600  IFS=$as_save_IFS
38601  test -z "$as_dir" && as_dir=.
38602    for ac_exec_ext in '' $ac_executable_extensions; do
38603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38604    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38606    break 2
38607  fi
38608done
38609  done
38610IFS=$as_save_IFS
38611
38612fi
38613fi
38614ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38615if test -n "$ac_ct_OBJDUMP"; then
38616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38617$as_echo "$ac_ct_OBJDUMP" >&6; }
38618else
38619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38620$as_echo "no" >&6; }
38621fi
38622
38623
38624  test -n "$ac_ct_OBJDUMP" && break
38625done
38626
38627  if test "x$ac_ct_OBJDUMP" = x; then
38628    OBJDUMP=""
38629  else
38630    case $cross_compiling:$ac_tool_warned in
38631yes:)
38632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38634ac_tool_warned=yes ;;
38635esac
38636    OBJDUMP=$ac_ct_OBJDUMP
38637  fi
38638fi
38639
38640  else
38641    # The variable is set, but is it from the command line or the environment?
38642
38643    # Try to remove the string !OBJDUMP! from our list.
38644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38646      # If it failed, the variable was not from the command line. Ignore it,
38647      # but warn the user (except for BASH, which is always set by the calling BASH).
38648      if test "xOBJDUMP" != xBASH; then
38649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38650$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38651      fi
38652      # Try to locate tool using the code snippet
38653      if test -n "$ac_tool_prefix"; then
38654  for ac_prog in gobjdump objdump
38655  do
38656    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38657set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38659$as_echo_n "checking for $ac_word... " >&6; }
38660if ${ac_cv_prog_OBJDUMP+:} false; then :
38661  $as_echo_n "(cached) " >&6
38662else
38663  if test -n "$OBJDUMP"; then
38664  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38665else
38666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38667for as_dir in $PATH
38668do
38669  IFS=$as_save_IFS
38670  test -z "$as_dir" && as_dir=.
38671    for ac_exec_ext in '' $ac_executable_extensions; do
38672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38673    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38675    break 2
38676  fi
38677done
38678  done
38679IFS=$as_save_IFS
38680
38681fi
38682fi
38683OBJDUMP=$ac_cv_prog_OBJDUMP
38684if test -n "$OBJDUMP"; then
38685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38686$as_echo "$OBJDUMP" >&6; }
38687else
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38689$as_echo "no" >&6; }
38690fi
38691
38692
38693    test -n "$OBJDUMP" && break
38694  done
38695fi
38696if test -z "$OBJDUMP"; then
38697  ac_ct_OBJDUMP=$OBJDUMP
38698  for ac_prog in gobjdump objdump
38699do
38700  # Extract the first word of "$ac_prog", so it can be a program name with args.
38701set dummy $ac_prog; ac_word=$2
38702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38703$as_echo_n "checking for $ac_word... " >&6; }
38704if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38705  $as_echo_n "(cached) " >&6
38706else
38707  if test -n "$ac_ct_OBJDUMP"; then
38708  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38709else
38710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38711for as_dir in $PATH
38712do
38713  IFS=$as_save_IFS
38714  test -z "$as_dir" && as_dir=.
38715    for ac_exec_ext in '' $ac_executable_extensions; do
38716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38717    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38719    break 2
38720  fi
38721done
38722  done
38723IFS=$as_save_IFS
38724
38725fi
38726fi
38727ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38728if test -n "$ac_ct_OBJDUMP"; then
38729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38730$as_echo "$ac_ct_OBJDUMP" >&6; }
38731else
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38733$as_echo "no" >&6; }
38734fi
38735
38736
38737  test -n "$ac_ct_OBJDUMP" && break
38738done
38739
38740  if test "x$ac_ct_OBJDUMP" = x; then
38741    OBJDUMP=""
38742  else
38743    case $cross_compiling:$ac_tool_warned in
38744yes:)
38745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38747ac_tool_warned=yes ;;
38748esac
38749    OBJDUMP=$ac_ct_OBJDUMP
38750  fi
38751fi
38752
38753    else
38754      # If it succeeded, then it was overridden by the user. We will use it
38755      # for the tool.
38756
38757      # First remove it from the list of overridden variables, so we can test
38758      # for unknown variables in the end.
38759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38760
38761      # Check if the provided tool contains a complete path.
38762      tool_specified="$OBJDUMP"
38763      tool_basename="${tool_specified##*/}"
38764      if test "x$tool_basename" = "x$tool_specified"; then
38765        # A command without a complete path is provided, search $PATH.
38766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38767$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38768        # Extract the first word of "$tool_basename", so it can be a program name with args.
38769set dummy $tool_basename; ac_word=$2
38770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38771$as_echo_n "checking for $ac_word... " >&6; }
38772if ${ac_cv_path_OBJDUMP+:} false; then :
38773  $as_echo_n "(cached) " >&6
38774else
38775  case $OBJDUMP in
38776  [\\/]* | ?:[\\/]*)
38777  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38778  ;;
38779  *)
38780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38781for as_dir in $PATH
38782do
38783  IFS=$as_save_IFS
38784  test -z "$as_dir" && as_dir=.
38785    for ac_exec_ext in '' $ac_executable_extensions; do
38786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38787    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38789    break 2
38790  fi
38791done
38792  done
38793IFS=$as_save_IFS
38794
38795  ;;
38796esac
38797fi
38798OBJDUMP=$ac_cv_path_OBJDUMP
38799if test -n "$OBJDUMP"; then
38800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38801$as_echo "$OBJDUMP" >&6; }
38802else
38803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38804$as_echo "no" >&6; }
38805fi
38806
38807
38808        if test "x$OBJDUMP" = x; then
38809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38810        fi
38811      else
38812        # Otherwise we believe it is a complete path. Use it as it is.
38813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38814$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38816$as_echo_n "checking for OBJDUMP... " >&6; }
38817        if test ! -x "$tool_specified"; then
38818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38819$as_echo "not found" >&6; }
38820          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38821        fi
38822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38823$as_echo "$tool_specified" >&6; }
38824      fi
38825    fi
38826  fi
38827
38828
38829  if test "x$OBJDUMP" != x; then
38830    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38831    # bails if argument is missing.
38832
38833  # Only process if variable expands to non-empty
38834
38835  if test "x$OBJDUMP" != x; then
38836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38837
38838  # First separate the path from the arguments. This will split at the first
38839  # space.
38840  complete="$OBJDUMP"
38841  path="${complete%% *}"
38842  tmp="$complete EOL"
38843  arguments="${tmp#* }"
38844
38845  # Input might be given as Windows format, start by converting to
38846  # unix format.
38847  new_path=`$CYGPATH -u "$path"`
38848
38849  # Now try to locate executable using which
38850  new_path=`$WHICH "$new_path" 2> /dev/null`
38851  # bat and cmd files are not always considered executable in cygwin causing which
38852  # to not find them
38853  if test "x$new_path" = x \
38854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38856    new_path=`$CYGPATH -u "$path"`
38857  fi
38858  if test "x$new_path" = x; then
38859    # Oops. Which didn't find the executable.
38860    # The splitting of arguments from the executable at a space might have been incorrect,
38861    # since paths with space are more likely in Windows. Give it another try with the whole
38862    # argument.
38863    path="$complete"
38864    arguments="EOL"
38865    new_path=`$CYGPATH -u "$path"`
38866    new_path=`$WHICH "$new_path" 2> /dev/null`
38867    # bat and cmd files are not always considered executable in cygwin causing which
38868    # to not find them
38869    if test "x$new_path" = x \
38870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38872      new_path=`$CYGPATH -u "$path"`
38873    fi
38874    if test "x$new_path" = x; then
38875      # It's still not found. Now this is an unrecoverable error.
38876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38877$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38878      has_space=`$ECHO "$complete" | $GREP " "`
38879      if test "x$has_space" != x; then
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38882      fi
38883      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38884    fi
38885  fi
38886
38887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38890  # "foo.exe" is OK but "foo" is an error.
38891  #
38892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38893  # It is also a way to make sure we got the proper file name for the real test later on.
38894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38895  if test "x$test_shortpath" = x; then
38896    # Short path failed, file does not exist as specified.
38897    # Try adding .exe or .cmd
38898    if test -f "${new_path}.exe"; then
38899      input_to_shortpath="${new_path}.exe"
38900    elif test -f "${new_path}.cmd"; then
38901      input_to_shortpath="${new_path}.cmd"
38902    else
38903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38904$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38907      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38908    fi
38909  else
38910    input_to_shortpath="$new_path"
38911  fi
38912
38913  # Call helper function which possibly converts this using DOS-style short mode.
38914  # If so, the updated path is stored in $new_path.
38915  new_path="$input_to_shortpath"
38916
38917  input_path="$input_to_shortpath"
38918  # Check if we need to convert this using DOS-style short mode. If the path
38919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38920  # take no chances and rewrite it.
38921  # Note: m4 eats our [], so we need to use [ and ] instead.
38922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38923  if test "x$has_forbidden_chars" != x; then
38924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38928      # Going to short mode and back again did indeed matter. Since short mode is
38929      # case insensitive, let's make it lowercase to improve readability.
38930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38931      # Now convert it back to Unix-style (cygpath)
38932      input_path=`$CYGPATH -u "$shortmode_path"`
38933      new_path="$input_path"
38934    fi
38935  fi
38936
38937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38938  if test "x$test_cygdrive_prefix" = x; then
38939    # As a simple fix, exclude /usr/bin since it's not a real path.
38940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38942      # a path prefixed by /cygdrive for fixpath to work.
38943      new_path="$CYGWIN_ROOT_PATH$input_path"
38944    fi
38945  fi
38946
38947  # remove trailing .exe if any
38948  new_path="${new_path/%.exe/}"
38949
38950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38951
38952  # First separate the path from the arguments. This will split at the first
38953  # space.
38954  complete="$OBJDUMP"
38955  path="${complete%% *}"
38956  tmp="$complete EOL"
38957  arguments="${tmp#* }"
38958
38959  # Input might be given as Windows format, start by converting to
38960  # unix format.
38961  new_path="$path"
38962
38963  windows_path="$new_path"
38964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38965    unix_path=`$CYGPATH -u "$windows_path"`
38966    new_path="$unix_path"
38967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38969    new_path="$unix_path"
38970  fi
38971
38972
38973  # Now try to locate executable using which
38974  new_path=`$WHICH "$new_path" 2> /dev/null`
38975
38976  if test "x$new_path" = x; then
38977    # Oops. Which didn't find the executable.
38978    # The splitting of arguments from the executable at a space might have been incorrect,
38979    # since paths with space are more likely in Windows. Give it another try with the whole
38980    # argument.
38981    path="$complete"
38982    arguments="EOL"
38983    new_path="$path"
38984
38985  windows_path="$new_path"
38986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38987    unix_path=`$CYGPATH -u "$windows_path"`
38988    new_path="$unix_path"
38989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38991    new_path="$unix_path"
38992  fi
38993
38994
38995    new_path=`$WHICH "$new_path" 2> /dev/null`
38996    # bat and cmd files are not always considered executable in MSYS causing which
38997    # to not find them
38998    if test "x$new_path" = x \
38999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
39013
39014    if test "x$new_path" = x; then
39015      # It's still not found. Now this is an unrecoverable error.
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39017$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39018      has_space=`$ECHO "$complete" | $GREP " "`
39019      if test "x$has_space" != x; then
39020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39022      fi
39023      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39024    fi
39025  fi
39026
39027  # Now new_path has a complete unix path to the binary
39028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39029    # Keep paths in /bin as-is, but remove trailing .exe if any
39030    new_path="${new_path/%.exe/}"
39031    # Do not save /bin paths to all_fixpath_prefixes!
39032  else
39033    # Not in mixed or Windows style, start by that.
39034    new_path=`cmd //c echo $new_path`
39035
39036  input_path="$new_path"
39037  # Check if we need to convert this using DOS-style short mode. If the path
39038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39039  # take no chances and rewrite it.
39040  # Note: m4 eats our [], so we need to use [ and ] instead.
39041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39042  if test "x$has_forbidden_chars" != x; then
39043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39045  fi
39046
39047    # Output is in $new_path
39048
39049  windows_path="$new_path"
39050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39051    unix_path=`$CYGPATH -u "$windows_path"`
39052    new_path="$unix_path"
39053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39055    new_path="$unix_path"
39056  fi
39057
39058    # remove trailing .exe if any
39059    new_path="${new_path/%.exe/}"
39060
39061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39063  fi
39064
39065    else
39066      # We're on a unix platform. Hooray! :)
39067      # First separate the path from the arguments. This will split at the first
39068      # space.
39069      complete="$OBJDUMP"
39070      path="${complete%% *}"
39071      tmp="$complete EOL"
39072      arguments="${tmp#* }"
39073
39074      # Cannot rely on the command "which" here since it doesn't always work.
39075      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39076      if test -z "$is_absolute_path"; then
39077        # Path to executable is not absolute. Find it.
39078        IFS_save="$IFS"
39079        IFS=:
39080        for p in $PATH; do
39081          if test -f "$p/$path" && test -x "$p/$path"; then
39082            new_path="$p/$path"
39083            break
39084          fi
39085        done
39086        IFS="$IFS_save"
39087      else
39088        # This is an absolute path, we can use it without further modifications.
39089        new_path="$path"
39090      fi
39091
39092      if test "x$new_path" = x; then
39093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39094$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39095        has_space=`$ECHO "$complete" | $GREP " "`
39096        if test "x$has_space" != x; then
39097          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39099        fi
39100        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39101      fi
39102    fi
39103
39104    # Now join together the path and the arguments once again
39105    if test "x$arguments" != xEOL; then
39106      new_complete="$new_path ${arguments% *}"
39107    else
39108      new_complete="$new_path"
39109    fi
39110
39111    if test "x$complete" != "x$new_complete"; then
39112      OBJDUMP="$new_complete"
39113      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39114$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39115    fi
39116  fi
39117
39118  fi
39119
39120
39121  # Restore old path.
39122  PATH="$OLD_PATH"
39123
39124  # Restore the flags to the user specified values.
39125  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39126  CFLAGS="$ORG_CFLAGS"
39127  CXXFLAGS="$ORG_CXXFLAGS"
39128
39129
39130# Finally do some processing after the detection phase
39131
39132  if test "x$COMPILE_TYPE" = "xcross"; then
39133    # Now we need to find a C/C++ compiler that can build executables for the
39134    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39135    # used once. Also, we need to do this without adding a tools dir to the
39136    # path, otherwise we might pick up cross-compilers which don't use standard
39137    # naming.
39138
39139    # FIXME: we should list the discovered compilers as an exclude pattern!
39140    # If we do that, we can do this detection before POST_DETECTION, and still
39141    # find the build compilers in the tools dir, if needed.
39142
39143
39144  # Publish this variable in the help.
39145
39146
39147  if test "x$BUILD_CC" = x; then
39148    # The variable is not set by user, try to locate tool using the code snippet
39149    for ac_prog in cl cc gcc
39150do
39151  # Extract the first word of "$ac_prog", so it can be a program name with args.
39152set dummy $ac_prog; ac_word=$2
39153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39154$as_echo_n "checking for $ac_word... " >&6; }
39155if ${ac_cv_path_BUILD_CC+:} false; then :
39156  $as_echo_n "(cached) " >&6
39157else
39158  case $BUILD_CC in
39159  [\\/]* | ?:[\\/]*)
39160  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39161  ;;
39162  *)
39163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39164for as_dir in $PATH
39165do
39166  IFS=$as_save_IFS
39167  test -z "$as_dir" && as_dir=.
39168    for ac_exec_ext in '' $ac_executable_extensions; do
39169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39170    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39172    break 2
39173  fi
39174done
39175  done
39176IFS=$as_save_IFS
39177
39178  ;;
39179esac
39180fi
39181BUILD_CC=$ac_cv_path_BUILD_CC
39182if test -n "$BUILD_CC"; then
39183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39184$as_echo "$BUILD_CC" >&6; }
39185else
39186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39187$as_echo "no" >&6; }
39188fi
39189
39190
39191  test -n "$BUILD_CC" && break
39192done
39193
39194  else
39195    # The variable is set, but is it from the command line or the environment?
39196
39197    # Try to remove the string !BUILD_CC! from our list.
39198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39200      # If it failed, the variable was not from the command line. Ignore it,
39201      # but warn the user (except for BASH, which is always set by the calling BASH).
39202      if test "xBUILD_CC" != xBASH; then
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39204$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39205      fi
39206      # Try to locate tool using the code snippet
39207      for ac_prog in cl cc gcc
39208do
39209  # Extract the first word of "$ac_prog", so it can be a program name with args.
39210set dummy $ac_prog; ac_word=$2
39211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39212$as_echo_n "checking for $ac_word... " >&6; }
39213if ${ac_cv_path_BUILD_CC+:} false; then :
39214  $as_echo_n "(cached) " >&6
39215else
39216  case $BUILD_CC in
39217  [\\/]* | ?:[\\/]*)
39218  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39219  ;;
39220  *)
39221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39222for as_dir in $PATH
39223do
39224  IFS=$as_save_IFS
39225  test -z "$as_dir" && as_dir=.
39226    for ac_exec_ext in '' $ac_executable_extensions; do
39227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39228    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39230    break 2
39231  fi
39232done
39233  done
39234IFS=$as_save_IFS
39235
39236  ;;
39237esac
39238fi
39239BUILD_CC=$ac_cv_path_BUILD_CC
39240if test -n "$BUILD_CC"; then
39241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39242$as_echo "$BUILD_CC" >&6; }
39243else
39244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39245$as_echo "no" >&6; }
39246fi
39247
39248
39249  test -n "$BUILD_CC" && break
39250done
39251
39252    else
39253      # If it succeeded, then it was overridden by the user. We will use it
39254      # for the tool.
39255
39256      # First remove it from the list of overridden variables, so we can test
39257      # for unknown variables in the end.
39258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39259
39260      # Check if the provided tool contains a complete path.
39261      tool_specified="$BUILD_CC"
39262      tool_basename="${tool_specified##*/}"
39263      if test "x$tool_basename" = "x$tool_specified"; then
39264        # A command without a complete path is provided, search $PATH.
39265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39266$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39267        # Extract the first word of "$tool_basename", so it can be a program name with args.
39268set dummy $tool_basename; ac_word=$2
39269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39270$as_echo_n "checking for $ac_word... " >&6; }
39271if ${ac_cv_path_BUILD_CC+:} false; then :
39272  $as_echo_n "(cached) " >&6
39273else
39274  case $BUILD_CC in
39275  [\\/]* | ?:[\\/]*)
39276  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39277  ;;
39278  *)
39279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39280for as_dir in $PATH
39281do
39282  IFS=$as_save_IFS
39283  test -z "$as_dir" && as_dir=.
39284    for ac_exec_ext in '' $ac_executable_extensions; do
39285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39286    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39288    break 2
39289  fi
39290done
39291  done
39292IFS=$as_save_IFS
39293
39294  ;;
39295esac
39296fi
39297BUILD_CC=$ac_cv_path_BUILD_CC
39298if test -n "$BUILD_CC"; then
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39300$as_echo "$BUILD_CC" >&6; }
39301else
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39303$as_echo "no" >&6; }
39304fi
39305
39306
39307        if test "x$BUILD_CC" = x; then
39308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39309        fi
39310      else
39311        # Otherwise we believe it is a complete path. Use it as it is.
39312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39313$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39315$as_echo_n "checking for BUILD_CC... " >&6; }
39316        if test ! -x "$tool_specified"; then
39317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39318$as_echo "not found" >&6; }
39319          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39320        fi
39321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39322$as_echo "$tool_specified" >&6; }
39323      fi
39324    fi
39325  fi
39326
39327
39328
39329  # Only process if variable expands to non-empty
39330
39331  if test "x$BUILD_CC" != x; then
39332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39333
39334  # First separate the path from the arguments. This will split at the first
39335  # space.
39336  complete="$BUILD_CC"
39337  path="${complete%% *}"
39338  tmp="$complete EOL"
39339  arguments="${tmp#* }"
39340
39341  # Input might be given as Windows format, start by converting to
39342  # unix format.
39343  new_path=`$CYGPATH -u "$path"`
39344
39345  # Now try to locate executable using which
39346  new_path=`$WHICH "$new_path" 2> /dev/null`
39347  # bat and cmd files are not always considered executable in cygwin causing which
39348  # to not find them
39349  if test "x$new_path" = x \
39350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39352    new_path=`$CYGPATH -u "$path"`
39353  fi
39354  if test "x$new_path" = x; then
39355    # Oops. Which didn't find the executable.
39356    # The splitting of arguments from the executable at a space might have been incorrect,
39357    # since paths with space are more likely in Windows. Give it another try with the whole
39358    # argument.
39359    path="$complete"
39360    arguments="EOL"
39361    new_path=`$CYGPATH -u "$path"`
39362    new_path=`$WHICH "$new_path" 2> /dev/null`
39363    # bat and cmd files are not always considered executable in cygwin causing which
39364    # to not find them
39365    if test "x$new_path" = x \
39366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39368      new_path=`$CYGPATH -u "$path"`
39369    fi
39370    if test "x$new_path" = x; then
39371      # It's still not found. Now this is an unrecoverable error.
39372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39373$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39374      has_space=`$ECHO "$complete" | $GREP " "`
39375      if test "x$has_space" != x; then
39376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39378      fi
39379      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39380    fi
39381  fi
39382
39383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39386  # "foo.exe" is OK but "foo" is an error.
39387  #
39388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39389  # It is also a way to make sure we got the proper file name for the real test later on.
39390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39391  if test "x$test_shortpath" = x; then
39392    # Short path failed, file does not exist as specified.
39393    # Try adding .exe or .cmd
39394    if test -f "${new_path}.exe"; then
39395      input_to_shortpath="${new_path}.exe"
39396    elif test -f "${new_path}.cmd"; then
39397      input_to_shortpath="${new_path}.cmd"
39398    else
39399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39400$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39403      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39404    fi
39405  else
39406    input_to_shortpath="$new_path"
39407  fi
39408
39409  # Call helper function which possibly converts this using DOS-style short mode.
39410  # If so, the updated path is stored in $new_path.
39411  new_path="$input_to_shortpath"
39412
39413  input_path="$input_to_shortpath"
39414  # Check if we need to convert this using DOS-style short mode. If the path
39415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39416  # take no chances and rewrite it.
39417  # Note: m4 eats our [], so we need to use [ and ] instead.
39418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39419  if test "x$has_forbidden_chars" != x; then
39420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39424      # Going to short mode and back again did indeed matter. Since short mode is
39425      # case insensitive, let's make it lowercase to improve readability.
39426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39427      # Now convert it back to Unix-style (cygpath)
39428      input_path=`$CYGPATH -u "$shortmode_path"`
39429      new_path="$input_path"
39430    fi
39431  fi
39432
39433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39434  if test "x$test_cygdrive_prefix" = x; then
39435    # As a simple fix, exclude /usr/bin since it's not a real path.
39436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39438      # a path prefixed by /cygdrive for fixpath to work.
39439      new_path="$CYGWIN_ROOT_PATH$input_path"
39440    fi
39441  fi
39442
39443  # remove trailing .exe if any
39444  new_path="${new_path/%.exe/}"
39445
39446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39447
39448  # First separate the path from the arguments. This will split at the first
39449  # space.
39450  complete="$BUILD_CC"
39451  path="${complete%% *}"
39452  tmp="$complete EOL"
39453  arguments="${tmp#* }"
39454
39455  # Input might be given as Windows format, start by converting to
39456  # unix format.
39457  new_path="$path"
39458
39459  windows_path="$new_path"
39460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39461    unix_path=`$CYGPATH -u "$windows_path"`
39462    new_path="$unix_path"
39463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39465    new_path="$unix_path"
39466  fi
39467
39468
39469  # Now try to locate executable using which
39470  new_path=`$WHICH "$new_path" 2> /dev/null`
39471
39472  if test "x$new_path" = x; then
39473    # Oops. Which didn't find the executable.
39474    # The splitting of arguments from the executable at a space might have been incorrect,
39475    # since paths with space are more likely in Windows. Give it another try with the whole
39476    # argument.
39477    path="$complete"
39478    arguments="EOL"
39479    new_path="$path"
39480
39481  windows_path="$new_path"
39482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39483    unix_path=`$CYGPATH -u "$windows_path"`
39484    new_path="$unix_path"
39485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39487    new_path="$unix_path"
39488  fi
39489
39490
39491    new_path=`$WHICH "$new_path" 2> /dev/null`
39492    # bat and cmd files are not always considered executable in MSYS causing which
39493    # to not find them
39494    if test "x$new_path" = x \
39495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39497      new_path="$path"
39498
39499  windows_path="$new_path"
39500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39501    unix_path=`$CYGPATH -u "$windows_path"`
39502    new_path="$unix_path"
39503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39505    new_path="$unix_path"
39506  fi
39507
39508    fi
39509
39510    if test "x$new_path" = x; then
39511      # It's still not found. Now this is an unrecoverable error.
39512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39513$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39514      has_space=`$ECHO "$complete" | $GREP " "`
39515      if test "x$has_space" != x; then
39516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39518      fi
39519      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39520    fi
39521  fi
39522
39523  # Now new_path has a complete unix path to the binary
39524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39525    # Keep paths in /bin as-is, but remove trailing .exe if any
39526    new_path="${new_path/%.exe/}"
39527    # Do not save /bin paths to all_fixpath_prefixes!
39528  else
39529    # Not in mixed or Windows style, start by that.
39530    new_path=`cmd //c echo $new_path`
39531
39532  input_path="$new_path"
39533  # Check if we need to convert this using DOS-style short mode. If the path
39534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39535  # take no chances and rewrite it.
39536  # Note: m4 eats our [], so we need to use [ and ] instead.
39537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39538  if test "x$has_forbidden_chars" != x; then
39539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39541  fi
39542
39543    # Output is in $new_path
39544
39545  windows_path="$new_path"
39546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39547    unix_path=`$CYGPATH -u "$windows_path"`
39548    new_path="$unix_path"
39549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39551    new_path="$unix_path"
39552  fi
39553
39554    # remove trailing .exe if any
39555    new_path="${new_path/%.exe/}"
39556
39557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39559  fi
39560
39561    else
39562      # We're on a unix platform. Hooray! :)
39563      # First separate the path from the arguments. This will split at the first
39564      # space.
39565      complete="$BUILD_CC"
39566      path="${complete%% *}"
39567      tmp="$complete EOL"
39568      arguments="${tmp#* }"
39569
39570      # Cannot rely on the command "which" here since it doesn't always work.
39571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39572      if test -z "$is_absolute_path"; then
39573        # Path to executable is not absolute. Find it.
39574        IFS_save="$IFS"
39575        IFS=:
39576        for p in $PATH; do
39577          if test -f "$p/$path" && test -x "$p/$path"; then
39578            new_path="$p/$path"
39579            break
39580          fi
39581        done
39582        IFS="$IFS_save"
39583      else
39584        # This is an absolute path, we can use it without further modifications.
39585        new_path="$path"
39586      fi
39587
39588      if test "x$new_path" = x; then
39589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39590$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39591        has_space=`$ECHO "$complete" | $GREP " "`
39592        if test "x$has_space" != x; then
39593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39595        fi
39596        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39597      fi
39598    fi
39599
39600    # Now join together the path and the arguments once again
39601    if test "x$arguments" != xEOL; then
39602      new_complete="$new_path ${arguments% *}"
39603    else
39604      new_complete="$new_path"
39605    fi
39606
39607    if test "x$complete" != "x$new_complete"; then
39608      BUILD_CC="$new_complete"
39609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39610$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39611    fi
39612  fi
39613
39614
39615
39616  # Publish this variable in the help.
39617
39618
39619  if test "x$BUILD_CXX" = x; then
39620    # The variable is not set by user, try to locate tool using the code snippet
39621    for ac_prog in cl CC g++
39622do
39623  # Extract the first word of "$ac_prog", so it can be a program name with args.
39624set dummy $ac_prog; ac_word=$2
39625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39626$as_echo_n "checking for $ac_word... " >&6; }
39627if ${ac_cv_path_BUILD_CXX+:} false; then :
39628  $as_echo_n "(cached) " >&6
39629else
39630  case $BUILD_CXX in
39631  [\\/]* | ?:[\\/]*)
39632  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39633  ;;
39634  *)
39635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39636for as_dir in $PATH
39637do
39638  IFS=$as_save_IFS
39639  test -z "$as_dir" && as_dir=.
39640    for ac_exec_ext in '' $ac_executable_extensions; do
39641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39642    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39644    break 2
39645  fi
39646done
39647  done
39648IFS=$as_save_IFS
39649
39650  ;;
39651esac
39652fi
39653BUILD_CXX=$ac_cv_path_BUILD_CXX
39654if test -n "$BUILD_CXX"; then
39655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39656$as_echo "$BUILD_CXX" >&6; }
39657else
39658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39659$as_echo "no" >&6; }
39660fi
39661
39662
39663  test -n "$BUILD_CXX" && break
39664done
39665
39666  else
39667    # The variable is set, but is it from the command line or the environment?
39668
39669    # Try to remove the string !BUILD_CXX! from our list.
39670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39672      # If it failed, the variable was not from the command line. Ignore it,
39673      # but warn the user (except for BASH, which is always set by the calling BASH).
39674      if test "xBUILD_CXX" != xBASH; then
39675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39676$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39677      fi
39678      # Try to locate tool using the code snippet
39679      for ac_prog in cl CC g++
39680do
39681  # Extract the first word of "$ac_prog", so it can be a program name with args.
39682set dummy $ac_prog; ac_word=$2
39683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39684$as_echo_n "checking for $ac_word... " >&6; }
39685if ${ac_cv_path_BUILD_CXX+:} false; then :
39686  $as_echo_n "(cached) " >&6
39687else
39688  case $BUILD_CXX in
39689  [\\/]* | ?:[\\/]*)
39690  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39691  ;;
39692  *)
39693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39694for as_dir in $PATH
39695do
39696  IFS=$as_save_IFS
39697  test -z "$as_dir" && as_dir=.
39698    for ac_exec_ext in '' $ac_executable_extensions; do
39699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39700    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39702    break 2
39703  fi
39704done
39705  done
39706IFS=$as_save_IFS
39707
39708  ;;
39709esac
39710fi
39711BUILD_CXX=$ac_cv_path_BUILD_CXX
39712if test -n "$BUILD_CXX"; then
39713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39714$as_echo "$BUILD_CXX" >&6; }
39715else
39716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39717$as_echo "no" >&6; }
39718fi
39719
39720
39721  test -n "$BUILD_CXX" && break
39722done
39723
39724    else
39725      # If it succeeded, then it was overridden by the user. We will use it
39726      # for the tool.
39727
39728      # First remove it from the list of overridden variables, so we can test
39729      # for unknown variables in the end.
39730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39731
39732      # Check if the provided tool contains a complete path.
39733      tool_specified="$BUILD_CXX"
39734      tool_basename="${tool_specified##*/}"
39735      if test "x$tool_basename" = "x$tool_specified"; then
39736        # A command without a complete path is provided, search $PATH.
39737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39738$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39739        # Extract the first word of "$tool_basename", so it can be a program name with args.
39740set dummy $tool_basename; ac_word=$2
39741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39742$as_echo_n "checking for $ac_word... " >&6; }
39743if ${ac_cv_path_BUILD_CXX+:} false; then :
39744  $as_echo_n "(cached) " >&6
39745else
39746  case $BUILD_CXX in
39747  [\\/]* | ?:[\\/]*)
39748  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39749  ;;
39750  *)
39751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39752for as_dir in $PATH
39753do
39754  IFS=$as_save_IFS
39755  test -z "$as_dir" && as_dir=.
39756    for ac_exec_ext in '' $ac_executable_extensions; do
39757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39758    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39760    break 2
39761  fi
39762done
39763  done
39764IFS=$as_save_IFS
39765
39766  ;;
39767esac
39768fi
39769BUILD_CXX=$ac_cv_path_BUILD_CXX
39770if test -n "$BUILD_CXX"; then
39771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39772$as_echo "$BUILD_CXX" >&6; }
39773else
39774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39775$as_echo "no" >&6; }
39776fi
39777
39778
39779        if test "x$BUILD_CXX" = x; then
39780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39781        fi
39782      else
39783        # Otherwise we believe it is a complete path. Use it as it is.
39784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39785$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39787$as_echo_n "checking for BUILD_CXX... " >&6; }
39788        if test ! -x "$tool_specified"; then
39789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39790$as_echo "not found" >&6; }
39791          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39792        fi
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39794$as_echo "$tool_specified" >&6; }
39795      fi
39796    fi
39797  fi
39798
39799
39800
39801  # Only process if variable expands to non-empty
39802
39803  if test "x$BUILD_CXX" != x; then
39804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39805
39806  # First separate the path from the arguments. This will split at the first
39807  # space.
39808  complete="$BUILD_CXX"
39809  path="${complete%% *}"
39810  tmp="$complete EOL"
39811  arguments="${tmp#* }"
39812
39813  # Input might be given as Windows format, start by converting to
39814  # unix format.
39815  new_path=`$CYGPATH -u "$path"`
39816
39817  # Now try to locate executable using which
39818  new_path=`$WHICH "$new_path" 2> /dev/null`
39819  # bat and cmd files are not always considered executable in cygwin causing which
39820  # to not find them
39821  if test "x$new_path" = x \
39822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39824    new_path=`$CYGPATH -u "$path"`
39825  fi
39826  if test "x$new_path" = x; then
39827    # Oops. Which didn't find the executable.
39828    # The splitting of arguments from the executable at a space might have been incorrect,
39829    # since paths with space are more likely in Windows. Give it another try with the whole
39830    # argument.
39831    path="$complete"
39832    arguments="EOL"
39833    new_path=`$CYGPATH -u "$path"`
39834    new_path=`$WHICH "$new_path" 2> /dev/null`
39835    # bat and cmd files are not always considered executable in cygwin causing which
39836    # to not find them
39837    if test "x$new_path" = x \
39838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39840      new_path=`$CYGPATH -u "$path"`
39841    fi
39842    if test "x$new_path" = x; then
39843      # It's still not found. Now this is an unrecoverable error.
39844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39845$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39846      has_space=`$ECHO "$complete" | $GREP " "`
39847      if test "x$has_space" != x; then
39848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39850      fi
39851      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39852    fi
39853  fi
39854
39855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39858  # "foo.exe" is OK but "foo" is an error.
39859  #
39860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39861  # It is also a way to make sure we got the proper file name for the real test later on.
39862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39863  if test "x$test_shortpath" = x; then
39864    # Short path failed, file does not exist as specified.
39865    # Try adding .exe or .cmd
39866    if test -f "${new_path}.exe"; then
39867      input_to_shortpath="${new_path}.exe"
39868    elif test -f "${new_path}.cmd"; then
39869      input_to_shortpath="${new_path}.cmd"
39870    else
39871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39872$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39875      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39876    fi
39877  else
39878    input_to_shortpath="$new_path"
39879  fi
39880
39881  # Call helper function which possibly converts this using DOS-style short mode.
39882  # If so, the updated path is stored in $new_path.
39883  new_path="$input_to_shortpath"
39884
39885  input_path="$input_to_shortpath"
39886  # Check if we need to convert this using DOS-style short mode. If the path
39887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39888  # take no chances and rewrite it.
39889  # Note: m4 eats our [], so we need to use [ and ] instead.
39890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39891  if test "x$has_forbidden_chars" != x; then
39892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39896      # Going to short mode and back again did indeed matter. Since short mode is
39897      # case insensitive, let's make it lowercase to improve readability.
39898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39899      # Now convert it back to Unix-style (cygpath)
39900      input_path=`$CYGPATH -u "$shortmode_path"`
39901      new_path="$input_path"
39902    fi
39903  fi
39904
39905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39906  if test "x$test_cygdrive_prefix" = x; then
39907    # As a simple fix, exclude /usr/bin since it's not a real path.
39908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39910      # a path prefixed by /cygdrive for fixpath to work.
39911      new_path="$CYGWIN_ROOT_PATH$input_path"
39912    fi
39913  fi
39914
39915  # remove trailing .exe if any
39916  new_path="${new_path/%.exe/}"
39917
39918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919
39920  # First separate the path from the arguments. This will split at the first
39921  # space.
39922  complete="$BUILD_CXX"
39923  path="${complete%% *}"
39924  tmp="$complete EOL"
39925  arguments="${tmp#* }"
39926
39927  # Input might be given as Windows format, start by converting to
39928  # unix format.
39929  new_path="$path"
39930
39931  windows_path="$new_path"
39932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933    unix_path=`$CYGPATH -u "$windows_path"`
39934    new_path="$unix_path"
39935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39937    new_path="$unix_path"
39938  fi
39939
39940
39941  # Now try to locate executable using which
39942  new_path=`$WHICH "$new_path" 2> /dev/null`
39943
39944  if test "x$new_path" = x; then
39945    # Oops. Which didn't find the executable.
39946    # The splitting of arguments from the executable at a space might have been incorrect,
39947    # since paths with space are more likely in Windows. Give it another try with the whole
39948    # argument.
39949    path="$complete"
39950    arguments="EOL"
39951    new_path="$path"
39952
39953  windows_path="$new_path"
39954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39955    unix_path=`$CYGPATH -u "$windows_path"`
39956    new_path="$unix_path"
39957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39959    new_path="$unix_path"
39960  fi
39961
39962
39963    new_path=`$WHICH "$new_path" 2> /dev/null`
39964    # bat and cmd files are not always considered executable in MSYS causing which
39965    # to not find them
39966    if test "x$new_path" = x \
39967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39969      new_path="$path"
39970
39971  windows_path="$new_path"
39972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39973    unix_path=`$CYGPATH -u "$windows_path"`
39974    new_path="$unix_path"
39975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39977    new_path="$unix_path"
39978  fi
39979
39980    fi
39981
39982    if test "x$new_path" = x; then
39983      # It's still not found. Now this is an unrecoverable error.
39984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39985$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39986      has_space=`$ECHO "$complete" | $GREP " "`
39987      if test "x$has_space" != x; then
39988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39990      fi
39991      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39992    fi
39993  fi
39994
39995  # Now new_path has a complete unix path to the binary
39996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39997    # Keep paths in /bin as-is, but remove trailing .exe if any
39998    new_path="${new_path/%.exe/}"
39999    # Do not save /bin paths to all_fixpath_prefixes!
40000  else
40001    # Not in mixed or Windows style, start by that.
40002    new_path=`cmd //c echo $new_path`
40003
40004  input_path="$new_path"
40005  # Check if we need to convert this using DOS-style short mode. If the path
40006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40007  # take no chances and rewrite it.
40008  # Note: m4 eats our [], so we need to use [ and ] instead.
40009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40010  if test "x$has_forbidden_chars" != x; then
40011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40013  fi
40014
40015    # Output is in $new_path
40016
40017  windows_path="$new_path"
40018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019    unix_path=`$CYGPATH -u "$windows_path"`
40020    new_path="$unix_path"
40021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40023    new_path="$unix_path"
40024  fi
40025
40026    # remove trailing .exe if any
40027    new_path="${new_path/%.exe/}"
40028
40029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40031  fi
40032
40033    else
40034      # We're on a unix platform. Hooray! :)
40035      # First separate the path from the arguments. This will split at the first
40036      # space.
40037      complete="$BUILD_CXX"
40038      path="${complete%% *}"
40039      tmp="$complete EOL"
40040      arguments="${tmp#* }"
40041
40042      # Cannot rely on the command "which" here since it doesn't always work.
40043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40044      if test -z "$is_absolute_path"; then
40045        # Path to executable is not absolute. Find it.
40046        IFS_save="$IFS"
40047        IFS=:
40048        for p in $PATH; do
40049          if test -f "$p/$path" && test -x "$p/$path"; then
40050            new_path="$p/$path"
40051            break
40052          fi
40053        done
40054        IFS="$IFS_save"
40055      else
40056        # This is an absolute path, we can use it without further modifications.
40057        new_path="$path"
40058      fi
40059
40060      if test "x$new_path" = x; then
40061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40062$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40063        has_space=`$ECHO "$complete" | $GREP " "`
40064        if test "x$has_space" != x; then
40065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40067        fi
40068        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40069      fi
40070    fi
40071
40072    # Now join together the path and the arguments once again
40073    if test "x$arguments" != xEOL; then
40074      new_complete="$new_path ${arguments% *}"
40075    else
40076      new_complete="$new_path"
40077    fi
40078
40079    if test "x$complete" != "x$new_complete"; then
40080      BUILD_CXX="$new_complete"
40081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40082$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40083    fi
40084  fi
40085
40086
40087
40088  # Publish this variable in the help.
40089
40090
40091  if test "x$BUILD_LD" = x; then
40092    # The variable is not set by user, try to locate tool using the code snippet
40093    for ac_prog in ld
40094do
40095  # Extract the first word of "$ac_prog", so it can be a program name with args.
40096set dummy $ac_prog; ac_word=$2
40097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40098$as_echo_n "checking for $ac_word... " >&6; }
40099if ${ac_cv_path_BUILD_LD+:} false; then :
40100  $as_echo_n "(cached) " >&6
40101else
40102  case $BUILD_LD in
40103  [\\/]* | ?:[\\/]*)
40104  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40105  ;;
40106  *)
40107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40108for as_dir in $PATH
40109do
40110  IFS=$as_save_IFS
40111  test -z "$as_dir" && as_dir=.
40112    for ac_exec_ext in '' $ac_executable_extensions; do
40113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40114    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40116    break 2
40117  fi
40118done
40119  done
40120IFS=$as_save_IFS
40121
40122  ;;
40123esac
40124fi
40125BUILD_LD=$ac_cv_path_BUILD_LD
40126if test -n "$BUILD_LD"; then
40127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40128$as_echo "$BUILD_LD" >&6; }
40129else
40130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40131$as_echo "no" >&6; }
40132fi
40133
40134
40135  test -n "$BUILD_LD" && break
40136done
40137
40138  else
40139    # The variable is set, but is it from the command line or the environment?
40140
40141    # Try to remove the string !BUILD_LD! from our list.
40142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40144      # If it failed, the variable was not from the command line. Ignore it,
40145      # but warn the user (except for BASH, which is always set by the calling BASH).
40146      if test "xBUILD_LD" != xBASH; then
40147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40148$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40149      fi
40150      # Try to locate tool using the code snippet
40151      for ac_prog in ld
40152do
40153  # Extract the first word of "$ac_prog", so it can be a program name with args.
40154set dummy $ac_prog; ac_word=$2
40155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40156$as_echo_n "checking for $ac_word... " >&6; }
40157if ${ac_cv_path_BUILD_LD+:} false; then :
40158  $as_echo_n "(cached) " >&6
40159else
40160  case $BUILD_LD in
40161  [\\/]* | ?:[\\/]*)
40162  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40163  ;;
40164  *)
40165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40166for as_dir in $PATH
40167do
40168  IFS=$as_save_IFS
40169  test -z "$as_dir" && as_dir=.
40170    for ac_exec_ext in '' $ac_executable_extensions; do
40171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40172    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40174    break 2
40175  fi
40176done
40177  done
40178IFS=$as_save_IFS
40179
40180  ;;
40181esac
40182fi
40183BUILD_LD=$ac_cv_path_BUILD_LD
40184if test -n "$BUILD_LD"; then
40185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40186$as_echo "$BUILD_LD" >&6; }
40187else
40188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40189$as_echo "no" >&6; }
40190fi
40191
40192
40193  test -n "$BUILD_LD" && break
40194done
40195
40196    else
40197      # If it succeeded, then it was overridden by the user. We will use it
40198      # for the tool.
40199
40200      # First remove it from the list of overridden variables, so we can test
40201      # for unknown variables in the end.
40202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40203
40204      # Check if the provided tool contains a complete path.
40205      tool_specified="$BUILD_LD"
40206      tool_basename="${tool_specified##*/}"
40207      if test "x$tool_basename" = "x$tool_specified"; then
40208        # A command without a complete path is provided, search $PATH.
40209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40210$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40211        # Extract the first word of "$tool_basename", so it can be a program name with args.
40212set dummy $tool_basename; ac_word=$2
40213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40214$as_echo_n "checking for $ac_word... " >&6; }
40215if ${ac_cv_path_BUILD_LD+:} false; then :
40216  $as_echo_n "(cached) " >&6
40217else
40218  case $BUILD_LD in
40219  [\\/]* | ?:[\\/]*)
40220  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40221  ;;
40222  *)
40223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40224for as_dir in $PATH
40225do
40226  IFS=$as_save_IFS
40227  test -z "$as_dir" && as_dir=.
40228    for ac_exec_ext in '' $ac_executable_extensions; do
40229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40230    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40232    break 2
40233  fi
40234done
40235  done
40236IFS=$as_save_IFS
40237
40238  ;;
40239esac
40240fi
40241BUILD_LD=$ac_cv_path_BUILD_LD
40242if test -n "$BUILD_LD"; then
40243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40244$as_echo "$BUILD_LD" >&6; }
40245else
40246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40247$as_echo "no" >&6; }
40248fi
40249
40250
40251        if test "x$BUILD_LD" = x; then
40252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40253        fi
40254      else
40255        # Otherwise we believe it is a complete path. Use it as it is.
40256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40257$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40259$as_echo_n "checking for BUILD_LD... " >&6; }
40260        if test ! -x "$tool_specified"; then
40261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40262$as_echo "not found" >&6; }
40263          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40264        fi
40265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40266$as_echo "$tool_specified" >&6; }
40267      fi
40268    fi
40269  fi
40270
40271
40272
40273  # Only process if variable expands to non-empty
40274
40275  if test "x$BUILD_LD" != x; then
40276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40277
40278  # First separate the path from the arguments. This will split at the first
40279  # space.
40280  complete="$BUILD_LD"
40281  path="${complete%% *}"
40282  tmp="$complete EOL"
40283  arguments="${tmp#* }"
40284
40285  # Input might be given as Windows format, start by converting to
40286  # unix format.
40287  new_path=`$CYGPATH -u "$path"`
40288
40289  # Now try to locate executable using which
40290  new_path=`$WHICH "$new_path" 2> /dev/null`
40291  # bat and cmd files are not always considered executable in cygwin causing which
40292  # to not find them
40293  if test "x$new_path" = x \
40294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40296    new_path=`$CYGPATH -u "$path"`
40297  fi
40298  if test "x$new_path" = x; then
40299    # Oops. Which didn't find the executable.
40300    # The splitting of arguments from the executable at a space might have been incorrect,
40301    # since paths with space are more likely in Windows. Give it another try with the whole
40302    # argument.
40303    path="$complete"
40304    arguments="EOL"
40305    new_path=`$CYGPATH -u "$path"`
40306    new_path=`$WHICH "$new_path" 2> /dev/null`
40307    # bat and cmd files are not always considered executable in cygwin causing which
40308    # to not find them
40309    if test "x$new_path" = x \
40310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40312      new_path=`$CYGPATH -u "$path"`
40313    fi
40314    if test "x$new_path" = x; then
40315      # It's still not found. Now this is an unrecoverable error.
40316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40317$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40318      has_space=`$ECHO "$complete" | $GREP " "`
40319      if test "x$has_space" != x; then
40320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40322      fi
40323      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40324    fi
40325  fi
40326
40327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40330  # "foo.exe" is OK but "foo" is an error.
40331  #
40332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40333  # It is also a way to make sure we got the proper file name for the real test later on.
40334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40335  if test "x$test_shortpath" = x; then
40336    # Short path failed, file does not exist as specified.
40337    # Try adding .exe or .cmd
40338    if test -f "${new_path}.exe"; then
40339      input_to_shortpath="${new_path}.exe"
40340    elif test -f "${new_path}.cmd"; then
40341      input_to_shortpath="${new_path}.cmd"
40342    else
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40344$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40347      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40348    fi
40349  else
40350    input_to_shortpath="$new_path"
40351  fi
40352
40353  # Call helper function which possibly converts this using DOS-style short mode.
40354  # If so, the updated path is stored in $new_path.
40355  new_path="$input_to_shortpath"
40356
40357  input_path="$input_to_shortpath"
40358  # Check if we need to convert this using DOS-style short mode. If the path
40359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40360  # take no chances and rewrite it.
40361  # Note: m4 eats our [], so we need to use [ and ] instead.
40362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40363  if test "x$has_forbidden_chars" != x; then
40364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40368      # Going to short mode and back again did indeed matter. Since short mode is
40369      # case insensitive, let's make it lowercase to improve readability.
40370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40371      # Now convert it back to Unix-style (cygpath)
40372      input_path=`$CYGPATH -u "$shortmode_path"`
40373      new_path="$input_path"
40374    fi
40375  fi
40376
40377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40378  if test "x$test_cygdrive_prefix" = x; then
40379    # As a simple fix, exclude /usr/bin since it's not a real path.
40380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40382      # a path prefixed by /cygdrive for fixpath to work.
40383      new_path="$CYGWIN_ROOT_PATH$input_path"
40384    fi
40385  fi
40386
40387  # remove trailing .exe if any
40388  new_path="${new_path/%.exe/}"
40389
40390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40391
40392  # First separate the path from the arguments. This will split at the first
40393  # space.
40394  complete="$BUILD_LD"
40395  path="${complete%% *}"
40396  tmp="$complete EOL"
40397  arguments="${tmp#* }"
40398
40399  # Input might be given as Windows format, start by converting to
40400  # unix format.
40401  new_path="$path"
40402
40403  windows_path="$new_path"
40404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40405    unix_path=`$CYGPATH -u "$windows_path"`
40406    new_path="$unix_path"
40407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40409    new_path="$unix_path"
40410  fi
40411
40412
40413  # Now try to locate executable using which
40414  new_path=`$WHICH "$new_path" 2> /dev/null`
40415
40416  if test "x$new_path" = x; then
40417    # Oops. Which didn't find the executable.
40418    # The splitting of arguments from the executable at a space might have been incorrect,
40419    # since paths with space are more likely in Windows. Give it another try with the whole
40420    # argument.
40421    path="$complete"
40422    arguments="EOL"
40423    new_path="$path"
40424
40425  windows_path="$new_path"
40426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40427    unix_path=`$CYGPATH -u "$windows_path"`
40428    new_path="$unix_path"
40429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40431    new_path="$unix_path"
40432  fi
40433
40434
40435    new_path=`$WHICH "$new_path" 2> /dev/null`
40436    # bat and cmd files are not always considered executable in MSYS causing which
40437    # to not find them
40438    if test "x$new_path" = x \
40439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40441      new_path="$path"
40442
40443  windows_path="$new_path"
40444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40445    unix_path=`$CYGPATH -u "$windows_path"`
40446    new_path="$unix_path"
40447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40449    new_path="$unix_path"
40450  fi
40451
40452    fi
40453
40454    if test "x$new_path" = x; then
40455      # It's still not found. Now this is an unrecoverable error.
40456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40457$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40458      has_space=`$ECHO "$complete" | $GREP " "`
40459      if test "x$has_space" != x; then
40460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40462      fi
40463      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40464    fi
40465  fi
40466
40467  # Now new_path has a complete unix path to the binary
40468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40469    # Keep paths in /bin as-is, but remove trailing .exe if any
40470    new_path="${new_path/%.exe/}"
40471    # Do not save /bin paths to all_fixpath_prefixes!
40472  else
40473    # Not in mixed or Windows style, start by that.
40474    new_path=`cmd //c echo $new_path`
40475
40476  input_path="$new_path"
40477  # Check if we need to convert this using DOS-style short mode. If the path
40478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40479  # take no chances and rewrite it.
40480  # Note: m4 eats our [], so we need to use [ and ] instead.
40481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40482  if test "x$has_forbidden_chars" != x; then
40483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40485  fi
40486
40487    # Output is in $new_path
40488
40489  windows_path="$new_path"
40490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40491    unix_path=`$CYGPATH -u "$windows_path"`
40492    new_path="$unix_path"
40493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40495    new_path="$unix_path"
40496  fi
40497
40498    # remove trailing .exe if any
40499    new_path="${new_path/%.exe/}"
40500
40501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40503  fi
40504
40505    else
40506      # We're on a unix platform. Hooray! :)
40507      # First separate the path from the arguments. This will split at the first
40508      # space.
40509      complete="$BUILD_LD"
40510      path="${complete%% *}"
40511      tmp="$complete EOL"
40512      arguments="${tmp#* }"
40513
40514      # Cannot rely on the command "which" here since it doesn't always work.
40515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40516      if test -z "$is_absolute_path"; then
40517        # Path to executable is not absolute. Find it.
40518        IFS_save="$IFS"
40519        IFS=:
40520        for p in $PATH; do
40521          if test -f "$p/$path" && test -x "$p/$path"; then
40522            new_path="$p/$path"
40523            break
40524          fi
40525        done
40526        IFS="$IFS_save"
40527      else
40528        # This is an absolute path, we can use it without further modifications.
40529        new_path="$path"
40530      fi
40531
40532      if test "x$new_path" = x; then
40533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40534$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40535        has_space=`$ECHO "$complete" | $GREP " "`
40536        if test "x$has_space" != x; then
40537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40539        fi
40540        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40541      fi
40542    fi
40543
40544    # Now join together the path and the arguments once again
40545    if test "x$arguments" != xEOL; then
40546      new_complete="$new_path ${arguments% *}"
40547    else
40548      new_complete="$new_path"
40549    fi
40550
40551    if test "x$complete" != "x$new_complete"; then
40552      BUILD_LD="$new_complete"
40553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40554$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40555    fi
40556  fi
40557
40558  else
40559    # If we are not cross compiling, use the normal target compilers for
40560    # building the build platform executables.
40561    BUILD_CC="$CC"
40562    BUILD_CXX="$CXX"
40563    BUILD_LD="$LD"
40564  fi
40565
40566
40567
40568
40569
40570
40571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40572    # For hotspot, we need these in Windows mixed path,
40573    # so rewrite them all. Need added .exe suffix.
40574    HOTSPOT_CXX="$CXX.exe"
40575    HOTSPOT_LD="$LD.exe"
40576    HOTSPOT_MT="$MT.exe"
40577    HOTSPOT_RC="$RC.exe"
40578
40579  unix_path="$HOTSPOT_CXX"
40580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40581    windows_path=`$CYGPATH -m "$unix_path"`
40582    HOTSPOT_CXX="$windows_path"
40583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40584    windows_path=`cmd //c echo $unix_path`
40585    HOTSPOT_CXX="$windows_path"
40586  fi
40587
40588
40589  unix_path="$HOTSPOT_LD"
40590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40591    windows_path=`$CYGPATH -m "$unix_path"`
40592    HOTSPOT_LD="$windows_path"
40593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40594    windows_path=`cmd //c echo $unix_path`
40595    HOTSPOT_LD="$windows_path"
40596  fi
40597
40598
40599  unix_path="$HOTSPOT_MT"
40600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40601    windows_path=`$CYGPATH -m "$unix_path"`
40602    HOTSPOT_MT="$windows_path"
40603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40604    windows_path=`cmd //c echo $unix_path`
40605    HOTSPOT_MT="$windows_path"
40606  fi
40607
40608
40609  unix_path="$HOTSPOT_RC"
40610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40611    windows_path=`$CYGPATH -m "$unix_path"`
40612    HOTSPOT_RC="$windows_path"
40613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40614    windows_path=`cmd //c echo $unix_path`
40615    HOTSPOT_RC="$windows_path"
40616  fi
40617
40618
40619
40620  else
40621    HOTSPOT_CXX="$CXX"
40622    HOTSPOT_LD="$LD"
40623  fi
40624
40625
40626
40627  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40628    USE_CLANG=true
40629  fi
40630
40631
40632
40633
40634
40635  # The package path is used only on macosx?
40636  # FIXME: clean this up, and/or move it elsewhere.
40637  PACKAGE_PATH=/opt/local
40638
40639
40640  # Check for extra potential brokenness.
40641  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40642    # On Windows, double-check that we got the right compiler.
40643    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40644    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40645    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40646      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40647        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
40648      fi
40649    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40650      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40651        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40652      fi
40653    fi
40654  fi
40655
40656  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40657    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40658    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40659    # This is later checked when setting flags.
40660
40661    # "-Og" suppported for GCC 4.8 and later
40662    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40663
40664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40665$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40666  supports=yes
40667
40668  saved_cflags="$CFLAGS"
40669  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40670  ac_ext=c
40671ac_cpp='$CPP $CPPFLAGS'
40672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40674ac_compiler_gnu=$ac_cv_c_compiler_gnu
40675
40676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40677/* end confdefs.h.  */
40678int i;
40679_ACEOF
40680if ac_fn_c_try_compile "$LINENO"; then :
40681
40682else
40683  supports=no
40684fi
40685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40686  ac_ext=cpp
40687ac_cpp='$CXXCPP $CPPFLAGS'
40688ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40689ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40690ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40691
40692  CFLAGS="$saved_cflags"
40693
40694  saved_cxxflags="$CXXFLAGS"
40695  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40696  ac_ext=cpp
40697ac_cpp='$CXXCPP $CPPFLAGS'
40698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40701
40702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40703/* end confdefs.h.  */
40704int i;
40705_ACEOF
40706if ac_fn_cxx_try_compile "$LINENO"; then :
40707
40708else
40709  supports=no
40710fi
40711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40712  ac_ext=cpp
40713ac_cpp='$CXXCPP $CPPFLAGS'
40714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40717
40718  CXXFLAGS="$saved_cxxflags"
40719
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40721$as_echo "$supports" >&6; }
40722  if test "x$supports" = "xyes" ; then
40723    HAS_CFLAG_OPTIMIZE_DEBUG=true
40724  else
40725    HAS_CFLAG_OPTIMIZE_DEBUG=false
40726  fi
40727
40728
40729    # "-z relro" supported in GNU binutils 2.17 and later
40730    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40731
40732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40733$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40734  supports=yes
40735
40736  saved_ldflags="$LDFLAGS"
40737  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40738  ac_ext=c
40739ac_cpp='$CPP $CPPFLAGS'
40740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40742ac_compiler_gnu=$ac_cv_c_compiler_gnu
40743
40744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40745/* end confdefs.h.  */
40746
40747int
40748main ()
40749{
40750
40751  ;
40752  return 0;
40753}
40754_ACEOF
40755if ac_fn_c_try_link "$LINENO"; then :
40756
40757else
40758  supports=no
40759fi
40760rm -f core conftest.err conftest.$ac_objext \
40761    conftest$ac_exeext conftest.$ac_ext
40762  ac_ext=cpp
40763ac_cpp='$CXXCPP $CPPFLAGS'
40764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40767
40768  LDFLAGS="$saved_ldflags"
40769
40770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40771$as_echo "$supports" >&6; }
40772  if test "x$supports" = "xyes" ; then
40773    HAS_LINKER_RELRO=true
40774  else
40775    HAS_LINKER_RELRO=false
40776  fi
40777
40778
40779    # "-z now" supported in GNU binutils 2.11 and later
40780    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40781
40782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40783$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40784  supports=yes
40785
40786  saved_ldflags="$LDFLAGS"
40787  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40788  ac_ext=c
40789ac_cpp='$CPP $CPPFLAGS'
40790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40792ac_compiler_gnu=$ac_cv_c_compiler_gnu
40793
40794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40795/* end confdefs.h.  */
40796
40797int
40798main ()
40799{
40800
40801  ;
40802  return 0;
40803}
40804_ACEOF
40805if ac_fn_c_try_link "$LINENO"; then :
40806
40807else
40808  supports=no
40809fi
40810rm -f core conftest.err conftest.$ac_objext \
40811    conftest$ac_exeext conftest.$ac_ext
40812  ac_ext=cpp
40813ac_cpp='$CXXCPP $CPPFLAGS'
40814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40817
40818  LDFLAGS="$saved_ldflags"
40819
40820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40821$as_echo "$supports" >&6; }
40822  if test "x$supports" = "xyes" ; then
40823    HAS_LINKER_NOW=true
40824  else
40825    HAS_LINKER_NOW=false
40826  fi
40827
40828  fi
40829
40830  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40831  # in executable.'
40832  USING_BROKEN_SUSE_LD=no
40833  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40835$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40836    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40837    $ECHO "int main() { }" > main.c
40838    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40840$as_echo "no" >&6; }
40841      USING_BROKEN_SUSE_LD=no
40842    else
40843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40844$as_echo "yes" >&6; }
40845      USING_BROKEN_SUSE_LD=yes
40846    fi
40847    rm -rf version-script.map main.c a.out
40848  fi
40849
40850
40851
40852# Setup the JTReg Regression Test Harness.
40853
40854
40855# Check whether --with-jtreg was given.
40856if test "${with_jtreg+set}" = set; then :
40857  withval=$with_jtreg;
40858else
40859  with_jtreg=no
40860fi
40861
40862
40863  if test "x$with_jtreg" = xno; then
40864    # jtreg disabled
40865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40866$as_echo_n "checking for jtreg... " >&6; }
40867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40868$as_echo "no" >&6; }
40869  else
40870    if test "x$with_jtreg" != xyes; then
40871      # with path specified.
40872      JT_HOME="$with_jtreg"
40873    fi
40874
40875    if test "x$JT_HOME" != x; then
40876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40877$as_echo_n "checking for jtreg... " >&6; }
40878
40879      # use JT_HOME enviroment var.
40880
40881  # Only process if variable expands to non-empty
40882
40883  if test "x$JT_HOME" != x; then
40884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885
40886  # Input might be given as Windows format, start by converting to
40887  # unix format.
40888  path="$JT_HOME"
40889  new_path=`$CYGPATH -u "$path"`
40890
40891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40894  # "foo.exe" is OK but "foo" is an error.
40895  #
40896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40897  # It is also a way to make sure we got the proper file name for the real test later on.
40898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40899  if test "x$test_shortpath" = x; then
40900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40901$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40902    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40903  fi
40904
40905  # Call helper function which possibly converts this using DOS-style short mode.
40906  # If so, the updated path is stored in $new_path.
40907
40908  input_path="$new_path"
40909  # Check if we need to convert this using DOS-style short mode. If the path
40910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40911  # take no chances and rewrite it.
40912  # Note: m4 eats our [], so we need to use [ and ] instead.
40913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40914  if test "x$has_forbidden_chars" != x; then
40915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40919      # Going to short mode and back again did indeed matter. Since short mode is
40920      # case insensitive, let's make it lowercase to improve readability.
40921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40922      # Now convert it back to Unix-style (cygpath)
40923      input_path=`$CYGPATH -u "$shortmode_path"`
40924      new_path="$input_path"
40925    fi
40926  fi
40927
40928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40929  if test "x$test_cygdrive_prefix" = x; then
40930    # As a simple fix, exclude /usr/bin since it's not a real path.
40931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40933      # a path prefixed by /cygdrive for fixpath to work.
40934      new_path="$CYGWIN_ROOT_PATH$input_path"
40935    fi
40936  fi
40937
40938
40939  if test "x$path" != "x$new_path"; then
40940    JT_HOME="$new_path"
40941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40942$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40943  fi
40944
40945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40946
40947  path="$JT_HOME"
40948  has_colon=`$ECHO $path | $GREP ^.:`
40949  new_path="$path"
40950  if test "x$has_colon" = x; then
40951    # Not in mixed or Windows style, start by that.
40952    new_path=`cmd //c echo $path`
40953  fi
40954
40955
40956  input_path="$new_path"
40957  # Check if we need to convert this using DOS-style short mode. If the path
40958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40959  # take no chances and rewrite it.
40960  # Note: m4 eats our [], so we need to use [ and ] instead.
40961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40962  if test "x$has_forbidden_chars" != x; then
40963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40965  fi
40966
40967
40968  windows_path="$new_path"
40969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40970    unix_path=`$CYGPATH -u "$windows_path"`
40971    new_path="$unix_path"
40972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40974    new_path="$unix_path"
40975  fi
40976
40977  if test "x$path" != "x$new_path"; then
40978    JT_HOME="$new_path"
40979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40980$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40981  fi
40982
40983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40985
40986    else
40987      # We're on a unix platform. Hooray! :)
40988      path="$JT_HOME"
40989      has_space=`$ECHO "$path" | $GREP " "`
40990      if test "x$has_space" != x; then
40991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40992$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40994      fi
40995
40996      # Use eval to expand a potential ~
40997      eval path="$path"
40998      if test ! -f "$path" && test ! -d "$path"; then
40999        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41000      fi
41001
41002      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41003    fi
41004  fi
41005
41006
41007      # jtreg win32 script works for everybody
41008      JTREGEXE="$JT_HOME/bin/jtreg"
41009
41010      if test ! -f "$JTREGEXE"; then
41011        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41012      fi
41013
41014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41015$as_echo "$JTREGEXE" >&6; }
41016    else
41017      # try to find jtreg on path
41018
41019
41020
41021  # Publish this variable in the help.
41022
41023
41024  if test "x$JTREGEXE" = x; then
41025    # The variable is not set by user, try to locate tool using the code snippet
41026    for ac_prog in jtreg
41027do
41028  # Extract the first word of "$ac_prog", so it can be a program name with args.
41029set dummy $ac_prog; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_path_JTREGEXE+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  case $JTREGEXE in
41036  [\\/]* | ?:[\\/]*)
41037  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41038  ;;
41039  *)
41040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41041for as_dir in $PATH
41042do
41043  IFS=$as_save_IFS
41044  test -z "$as_dir" && as_dir=.
41045    for ac_exec_ext in '' $ac_executable_extensions; do
41046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41047    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41049    break 2
41050  fi
41051done
41052  done
41053IFS=$as_save_IFS
41054
41055  ;;
41056esac
41057fi
41058JTREGEXE=$ac_cv_path_JTREGEXE
41059if test -n "$JTREGEXE"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41061$as_echo "$JTREGEXE" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068  test -n "$JTREGEXE" && break
41069done
41070
41071  else
41072    # The variable is set, but is it from the command line or the environment?
41073
41074    # Try to remove the string !JTREGEXE! from our list.
41075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41077      # If it failed, the variable was not from the command line. Ignore it,
41078      # but warn the user (except for BASH, which is always set by the calling BASH).
41079      if test "xJTREGEXE" != xBASH; then
41080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41081$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41082      fi
41083      # Try to locate tool using the code snippet
41084      for ac_prog in jtreg
41085do
41086  # Extract the first word of "$ac_prog", so it can be a program name with args.
41087set dummy $ac_prog; ac_word=$2
41088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41089$as_echo_n "checking for $ac_word... " >&6; }
41090if ${ac_cv_path_JTREGEXE+:} false; then :
41091  $as_echo_n "(cached) " >&6
41092else
41093  case $JTREGEXE in
41094  [\\/]* | ?:[\\/]*)
41095  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41096  ;;
41097  *)
41098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41099for as_dir in $PATH
41100do
41101  IFS=$as_save_IFS
41102  test -z "$as_dir" && as_dir=.
41103    for ac_exec_ext in '' $ac_executable_extensions; do
41104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41105    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41107    break 2
41108  fi
41109done
41110  done
41111IFS=$as_save_IFS
41112
41113  ;;
41114esac
41115fi
41116JTREGEXE=$ac_cv_path_JTREGEXE
41117if test -n "$JTREGEXE"; then
41118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41119$as_echo "$JTREGEXE" >&6; }
41120else
41121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41122$as_echo "no" >&6; }
41123fi
41124
41125
41126  test -n "$JTREGEXE" && break
41127done
41128
41129    else
41130      # If it succeeded, then it was overridden by the user. We will use it
41131      # for the tool.
41132
41133      # First remove it from the list of overridden variables, so we can test
41134      # for unknown variables in the end.
41135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41136
41137      # Check if the provided tool contains a complete path.
41138      tool_specified="$JTREGEXE"
41139      tool_basename="${tool_specified##*/}"
41140      if test "x$tool_basename" = "x$tool_specified"; then
41141        # A command without a complete path is provided, search $PATH.
41142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41143$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41144        # Extract the first word of "$tool_basename", so it can be a program name with args.
41145set dummy $tool_basename; ac_word=$2
41146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41147$as_echo_n "checking for $ac_word... " >&6; }
41148if ${ac_cv_path_JTREGEXE+:} false; then :
41149  $as_echo_n "(cached) " >&6
41150else
41151  case $JTREGEXE in
41152  [\\/]* | ?:[\\/]*)
41153  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41154  ;;
41155  *)
41156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41157for as_dir in $PATH
41158do
41159  IFS=$as_save_IFS
41160  test -z "$as_dir" && as_dir=.
41161    for ac_exec_ext in '' $ac_executable_extensions; do
41162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41163    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41165    break 2
41166  fi
41167done
41168  done
41169IFS=$as_save_IFS
41170
41171  ;;
41172esac
41173fi
41174JTREGEXE=$ac_cv_path_JTREGEXE
41175if test -n "$JTREGEXE"; then
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41177$as_echo "$JTREGEXE" >&6; }
41178else
41179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41180$as_echo "no" >&6; }
41181fi
41182
41183
41184        if test "x$JTREGEXE" = x; then
41185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41186        fi
41187      else
41188        # Otherwise we believe it is a complete path. Use it as it is.
41189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41190$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41192$as_echo_n "checking for JTREGEXE... " >&6; }
41193        if test ! -x "$tool_specified"; then
41194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41195$as_echo "not found" >&6; }
41196          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41197        fi
41198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41199$as_echo "$tool_specified" >&6; }
41200      fi
41201    fi
41202  fi
41203
41204
41205
41206  if test "x$JTREGEXE" = x; then
41207    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41208  fi
41209
41210
41211      JT_HOME="`$DIRNAME $JTREGEXE`"
41212    fi
41213  fi
41214
41215
41216
41217
41218
41219
41220  # Option used to tell the compiler whether to create 32- or 64-bit executables
41221  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41222    COMPILER_TARGET_BITS_FLAG="-q"
41223  else
41224    COMPILER_TARGET_BITS_FLAG="-m"
41225  fi
41226
41227
41228  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41229  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41230    ARFLAGS="-r"
41231  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41232    ARFLAGS="-X64"
41233  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41234    # lib.exe is used as AR to create static libraries.
41235    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41236  else
41237    ARFLAGS=""
41238  fi
41239
41240
41241  ## Setup strip.
41242  # FIXME: should this really be per platform, or should it be per toolchain type?
41243  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41244  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41245  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41246    STRIPFLAGS="-g"
41247  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41248    STRIPFLAGS="-x"
41249  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41250    STRIPFLAGS="-S"
41251  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41252    STRIPFLAGS="-X32_64"
41253  fi
41254
41255
41256
41257  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41258    CC_OUT_OPTION=-Fo
41259    EXE_OUT_OPTION=-out:
41260    LD_OUT_OPTION=-out:
41261    AR_OUT_OPTION=-out:
41262  else
41263    # The option used to specify the target .o,.a or .so file.
41264    # When compiling, how to specify the to be created object file.
41265    CC_OUT_OPTION='-o$(SPACE)'
41266    # When linking, how to specify the to be created executable.
41267    EXE_OUT_OPTION='-o$(SPACE)'
41268    # When linking, how to specify the to be created dynamically linkable library.
41269    LD_OUT_OPTION='-o$(SPACE)'
41270    # When archiving, how to specify the to be create static archive for object files.
41271    AR_OUT_OPTION='rcs$(SPACE)'
41272  fi
41273
41274
41275
41276
41277
41278  # On Windows, we need to set RC flags.
41279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41280    RC_FLAGS="-nologo -l0x409"
41281    if test "x$VARIANT" = xOPT; then
41282      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41283    fi
41284
41285    # The version variables used to create RC_FLAGS may be overridden
41286    # in a custom configure script, or possibly the command line.
41287    # Let those variables be expanded at make time in spec.gmk.
41288    # The \$ are escaped to the shell, and the $(...) variables
41289    # are evaluated by make.
41290    RC_FLAGS="$RC_FLAGS \
41291        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41292        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41293        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41294        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41295        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41296        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41297        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41298  fi
41299
41300
41301  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41302    # silence copyright notice and other headers.
41303    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41304  fi
41305
41306  if test "x$SYSROOT" != "x"; then
41307    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41308      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41309        # Solaris Studio does not have a concept of sysroot. Instead we must
41310        # make sure the default include and lib dirs are appended to each
41311        # compile and link command line.
41312        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41313        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41314            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41315            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41316      fi
41317    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41318      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41319      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41320      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41321    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41322      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41323      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41324    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41325      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41326      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41327    fi
41328    # Propagate the sysroot args to hotspot
41329    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41330    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41331    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41332  fi
41333
41334  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41335  # set this here so it doesn't have to be peppered throughout the forest
41336  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41337    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41338    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41339  fi
41340
41341
41342
41343
41344
41345# FIXME: Currently we must test this after toolchain but before flags. Fix!
41346
41347# Now we can test some aspects on the target using configure macros.
41348
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41350$as_echo_n "checking for ANSI C header files... " >&6; }
41351if ${ac_cv_header_stdc+:} false; then :
41352  $as_echo_n "(cached) " >&6
41353else
41354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41355/* end confdefs.h.  */
41356#include <stdlib.h>
41357#include <stdarg.h>
41358#include <string.h>
41359#include <float.h>
41360
41361int
41362main ()
41363{
41364
41365  ;
41366  return 0;
41367}
41368_ACEOF
41369if ac_fn_cxx_try_compile "$LINENO"; then :
41370  ac_cv_header_stdc=yes
41371else
41372  ac_cv_header_stdc=no
41373fi
41374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41375
41376if test $ac_cv_header_stdc = yes; then
41377  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41379/* end confdefs.h.  */
41380#include <string.h>
41381
41382_ACEOF
41383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41384  $EGREP "memchr" >/dev/null 2>&1; then :
41385
41386else
41387  ac_cv_header_stdc=no
41388fi
41389rm -f conftest*
41390
41391fi
41392
41393if test $ac_cv_header_stdc = yes; then
41394  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41396/* end confdefs.h.  */
41397#include <stdlib.h>
41398
41399_ACEOF
41400if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41401  $EGREP "free" >/dev/null 2>&1; then :
41402
41403else
41404  ac_cv_header_stdc=no
41405fi
41406rm -f conftest*
41407
41408fi
41409
41410if test $ac_cv_header_stdc = yes; then
41411  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41412  if test "$cross_compiling" = yes; then :
41413  :
41414else
41415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41416/* end confdefs.h.  */
41417#include <ctype.h>
41418#include <stdlib.h>
41419#if ((' ' & 0x0FF) == 0x020)
41420# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41421# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41422#else
41423# define ISLOWER(c) \
41424		   (('a' <= (c) && (c) <= 'i') \
41425		     || ('j' <= (c) && (c) <= 'r') \
41426		     || ('s' <= (c) && (c) <= 'z'))
41427# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41428#endif
41429
41430#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41431int
41432main ()
41433{
41434  int i;
41435  for (i = 0; i < 256; i++)
41436    if (XOR (islower (i), ISLOWER (i))
41437	|| toupper (i) != TOUPPER (i))
41438      return 2;
41439  return 0;
41440}
41441_ACEOF
41442if ac_fn_cxx_try_run "$LINENO"; then :
41443
41444else
41445  ac_cv_header_stdc=no
41446fi
41447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41448  conftest.$ac_objext conftest.beam conftest.$ac_ext
41449fi
41450
41451fi
41452fi
41453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41454$as_echo "$ac_cv_header_stdc" >&6; }
41455if test $ac_cv_header_stdc = yes; then
41456
41457$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41458
41459fi
41460
41461# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41462for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41463		  inttypes.h stdint.h unistd.h
41464do :
41465  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41466ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41467"
41468if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41469  cat >>confdefs.h <<_ACEOF
41470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41471_ACEOF
41472
41473fi
41474
41475done
41476
41477
41478
41479  ###############################################################################
41480  #
41481  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41482  # (The JVM can use 32 or 64 bit Java pointers but that decision
41483  # is made at runtime.)
41484  #
41485
41486  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41487    # Always specify -m flag on Solaris
41488    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41489
41490  # When we add flags to the "official" CFLAGS etc, we need to
41491  # keep track of these additions in ADDED_CFLAGS etc. These
41492  # will later be checked to make sure only controlled additions
41493  # have been made to CFLAGS etc.
41494  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41495  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41496  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41497
41498  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41499  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41500  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41501
41502  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41503  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41504  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41505
41506  elif test "x$COMPILE_TYPE" = xreduced; then
41507    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41508      # Specify -m if running reduced on unix platforms
41509
41510  # When we add flags to the "official" CFLAGS etc, we need to
41511  # keep track of these additions in ADDED_CFLAGS etc. These
41512  # will later be checked to make sure only controlled additions
41513  # have been made to CFLAGS etc.
41514  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41515  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41516  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41517
41518  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41519  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41520  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41521
41522  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41523  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41524  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41525
41526    fi
41527  fi
41528
41529  # Make compilation sanity check
41530  for ac_header in stdio.h
41531do :
41532  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41533if test "x$ac_cv_header_stdio_h" = xyes; then :
41534  cat >>confdefs.h <<_ACEOF
41535#define HAVE_STDIO_H 1
41536_ACEOF
41537
41538else
41539
41540    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41541$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41542    if test "x$COMPILE_TYPE" = xreduced; then
41543      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41544$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41545    elif test "x$COMPILE_TYPE" = xcross; then
41546      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41547$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41548    fi
41549    as_fn_error $? "Cannot continue." "$LINENO" 5
41550
41551fi
41552
41553done
41554
41555
41556  # The cast to long int works around a bug in the HP C Compiler
41557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41559# This bug is HP SR number 8606223364.
41560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41561$as_echo_n "checking size of int *... " >&6; }
41562if ${ac_cv_sizeof_int_p+:} false; then :
41563  $as_echo_n "(cached) " >&6
41564else
41565  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41566
41567else
41568  if test "$ac_cv_type_int_p" = yes; then
41569     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41571as_fn_error 77 "cannot compute sizeof (int *)
41572See \`config.log' for more details" "$LINENO" 5; }
41573   else
41574     ac_cv_sizeof_int_p=0
41575   fi
41576fi
41577
41578fi
41579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41580$as_echo "$ac_cv_sizeof_int_p" >&6; }
41581
41582
41583
41584cat >>confdefs.h <<_ACEOF
41585#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41586_ACEOF
41587
41588
41589
41590  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41591  if test "x$ac_cv_sizeof_int_p" = x; then
41592    # The test failed, lets stick to the assumed value.
41593    { $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
41594$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41595  else
41596    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41597
41598    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41599      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41600      # Let's try to implicitely set the compilers target architecture and retry the test
41601      { $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
41602$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;}
41603      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41604$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41605
41606  # When we add flags to the "official" CFLAGS etc, we need to
41607  # keep track of these additions in ADDED_CFLAGS etc. These
41608  # will later be checked to make sure only controlled additions
41609  # have been made to CFLAGS etc.
41610  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41611  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41612  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41613
41614  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41615  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41616  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41617
41618  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41619  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41620  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41621
41622
41623      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41624      unset ac_cv_sizeof_int_p
41625      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41626      cat >>confdefs.h <<_ACEOF
41627#undef SIZEOF_INT_P
41628_ACEOF
41629
41630      # The cast to long int works around a bug in the HP C Compiler
41631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41633# This bug is HP SR number 8606223364.
41634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41635$as_echo_n "checking size of int *... " >&6; }
41636if ${ac_cv_sizeof_int_p+:} false; then :
41637  $as_echo_n "(cached) " >&6
41638else
41639  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41640
41641else
41642  if test "$ac_cv_type_int_p" = yes; then
41643     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41645as_fn_error 77 "cannot compute sizeof (int *)
41646See \`config.log' for more details" "$LINENO" 5; }
41647   else
41648     ac_cv_sizeof_int_p=0
41649   fi
41650fi
41651
41652fi
41653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41654$as_echo "$ac_cv_sizeof_int_p" >&6; }
41655
41656
41657
41658cat >>confdefs.h <<_ACEOF
41659#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41660_ACEOF
41661
41662
41663
41664      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41665
41666      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41667        as_fn_error $? "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)" "$LINENO" 5
41668      fi
41669    fi
41670  fi
41671
41672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41673$as_echo_n "checking for target address size... " >&6; }
41674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41675$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41676
41677
41678  ###############################################################################
41679  #
41680  # Is the target little of big endian?
41681  #
41682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41683$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41684if ${ac_cv_c_bigendian+:} false; then :
41685  $as_echo_n "(cached) " >&6
41686else
41687  ac_cv_c_bigendian=unknown
41688    # See if we're dealing with a universal compiler.
41689    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41690/* end confdefs.h.  */
41691#ifndef __APPLE_CC__
41692	       not a universal capable compiler
41693	     #endif
41694	     typedef int dummy;
41695
41696_ACEOF
41697if ac_fn_cxx_try_compile "$LINENO"; then :
41698
41699	# Check for potential -arch flags.  It is not universal unless
41700	# there are at least two -arch flags with different values.
41701	ac_arch=
41702	ac_prev=
41703	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41704	 if test -n "$ac_prev"; then
41705	   case $ac_word in
41706	     i?86 | x86_64 | ppc | ppc64)
41707	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41708		 ac_arch=$ac_word
41709	       else
41710		 ac_cv_c_bigendian=universal
41711		 break
41712	       fi
41713	       ;;
41714	   esac
41715	   ac_prev=
41716	 elif test "x$ac_word" = "x-arch"; then
41717	   ac_prev=arch
41718	 fi
41719       done
41720fi
41721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41722    if test $ac_cv_c_bigendian = unknown; then
41723      # See if sys/param.h defines the BYTE_ORDER macro.
41724      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41725/* end confdefs.h.  */
41726#include <sys/types.h>
41727	     #include <sys/param.h>
41728
41729int
41730main ()
41731{
41732#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41733		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41734		     && LITTLE_ENDIAN)
41735	      bogus endian macros
41736	     #endif
41737
41738  ;
41739  return 0;
41740}
41741_ACEOF
41742if ac_fn_cxx_try_compile "$LINENO"; then :
41743  # It does; now see whether it defined to BIG_ENDIAN or not.
41744	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41745/* end confdefs.h.  */
41746#include <sys/types.h>
41747		#include <sys/param.h>
41748
41749int
41750main ()
41751{
41752#if BYTE_ORDER != BIG_ENDIAN
41753		 not big endian
41754		#endif
41755
41756  ;
41757  return 0;
41758}
41759_ACEOF
41760if ac_fn_cxx_try_compile "$LINENO"; then :
41761  ac_cv_c_bigendian=yes
41762else
41763  ac_cv_c_bigendian=no
41764fi
41765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41766fi
41767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41768    fi
41769    if test $ac_cv_c_bigendian = unknown; then
41770      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41771      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41772/* end confdefs.h.  */
41773#include <limits.h>
41774
41775int
41776main ()
41777{
41778#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41779	      bogus endian macros
41780	     #endif
41781
41782  ;
41783  return 0;
41784}
41785_ACEOF
41786if ac_fn_cxx_try_compile "$LINENO"; then :
41787  # It does; now see whether it defined to _BIG_ENDIAN or not.
41788	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41789/* end confdefs.h.  */
41790#include <limits.h>
41791
41792int
41793main ()
41794{
41795#ifndef _BIG_ENDIAN
41796		 not big endian
41797		#endif
41798
41799  ;
41800  return 0;
41801}
41802_ACEOF
41803if ac_fn_cxx_try_compile "$LINENO"; then :
41804  ac_cv_c_bigendian=yes
41805else
41806  ac_cv_c_bigendian=no
41807fi
41808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41809fi
41810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41811    fi
41812    if test $ac_cv_c_bigendian = unknown; then
41813      # Compile a test program.
41814      if test "$cross_compiling" = yes; then :
41815  # Try to guess by grepping values from an object file.
41816	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41817/* end confdefs.h.  */
41818short int ascii_mm[] =
41819		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41820		short int ascii_ii[] =
41821		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41822		int use_ascii (int i) {
41823		  return ascii_mm[i] + ascii_ii[i];
41824		}
41825		short int ebcdic_ii[] =
41826		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41827		short int ebcdic_mm[] =
41828		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41829		int use_ebcdic (int i) {
41830		  return ebcdic_mm[i] + ebcdic_ii[i];
41831		}
41832		extern int foo;
41833
41834int
41835main ()
41836{
41837return use_ascii (foo) == use_ebcdic (foo);
41838  ;
41839  return 0;
41840}
41841_ACEOF
41842if ac_fn_cxx_try_compile "$LINENO"; then :
41843  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41844	      ac_cv_c_bigendian=yes
41845	    fi
41846	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41847	      if test "$ac_cv_c_bigendian" = unknown; then
41848		ac_cv_c_bigendian=no
41849	      else
41850		# finding both strings is unlikely to happen, but who knows?
41851		ac_cv_c_bigendian=unknown
41852	      fi
41853	    fi
41854fi
41855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41856else
41857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41858/* end confdefs.h.  */
41859$ac_includes_default
41860int
41861main ()
41862{
41863
41864	     /* Are we little or big endian?  From Harbison&Steele.  */
41865	     union
41866	     {
41867	       long int l;
41868	       char c[sizeof (long int)];
41869	     } u;
41870	     u.l = 1;
41871	     return u.c[sizeof (long int) - 1] == 1;
41872
41873  ;
41874  return 0;
41875}
41876_ACEOF
41877if ac_fn_cxx_try_run "$LINENO"; then :
41878  ac_cv_c_bigendian=no
41879else
41880  ac_cv_c_bigendian=yes
41881fi
41882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41883  conftest.$ac_objext conftest.beam conftest.$ac_ext
41884fi
41885
41886    fi
41887fi
41888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41889$as_echo "$ac_cv_c_bigendian" >&6; }
41890 case $ac_cv_c_bigendian in #(
41891   yes)
41892     ENDIAN="big";; #(
41893   no)
41894     ENDIAN="little" ;; #(
41895   universal)
41896     ENDIAN="universal_endianness"
41897     ;; #(
41898   *)
41899     ENDIAN="unknown" ;;
41900 esac
41901
41902
41903  if test "x$ENDIAN" = xuniversal_endianness; then
41904    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41905  fi
41906  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41907    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
41908  fi
41909
41910
41911# Configure flags for the tools
41912
41913  ###############################################################################
41914  #
41915  # How to compile shared libraries.
41916  #
41917
41918  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41919    PICFLAG="-fPIC"
41920    C_FLAG_REORDER=''
41921    CXX_FLAG_REORDER=''
41922
41923    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41924      # Linking is different on MacOSX
41925      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41926      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41927      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41928      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41929      SET_SHARED_LIBRARY_MAPFILE=''
41930    else
41931      # Default works for linux, might work on other platforms as well.
41932      SHARED_LIBRARY_FLAGS='-shared'
41933      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41934      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41935      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41936      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41937    fi
41938  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41939    PICFLAG=''
41940    C_FLAG_REORDER=''
41941    CXX_FLAG_REORDER=''
41942
41943    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41944      # Linking is different on MacOSX
41945      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41946      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41947      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41948      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41949      SET_SHARED_LIBRARY_MAPFILE=''
41950    else
41951      # Default works for linux, might work on other platforms as well.
41952      SHARED_LIBRARY_FLAGS='-shared'
41953      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41954      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41955      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41956      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41957    fi
41958  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41959    PICFLAG="-KPIC"
41960    C_FLAG_REORDER='-xF'
41961    CXX_FLAG_REORDER='-xF'
41962    SHARED_LIBRARY_FLAGS="-G"
41963    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41964    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41965    SET_SHARED_LIBRARY_NAME=''
41966    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41967  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41968    PICFLAG="-qpic=large"
41969    C_FLAG_REORDER=''
41970    CXX_FLAG_REORDER=''
41971    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41972    SET_EXECUTABLE_ORIGIN=""
41973    SET_SHARED_LIBRARY_ORIGIN=''
41974    SET_SHARED_LIBRARY_NAME=''
41975    SET_SHARED_LIBRARY_MAPFILE=''
41976  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41977    PICFLAG=""
41978    C_FLAG_REORDER=''
41979    CXX_FLAG_REORDER=''
41980    SHARED_LIBRARY_FLAGS="-LD"
41981    SET_EXECUTABLE_ORIGIN=''
41982    SET_SHARED_LIBRARY_ORIGIN=''
41983    SET_SHARED_LIBRARY_NAME=''
41984    SET_SHARED_LIBRARY_MAPFILE=''
41985  fi
41986
41987
41988
41989
41990
41991
41992
41993
41994  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41995    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41996    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41997    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41998  fi
41999  # The (cross) compiler is now configured, we can now test capabilities
42000  # of the target platform.
42001
42002
42003
42004  ###############################################################################
42005  #
42006  # Setup the opt flags for different compilers
42007  # and different operating systems.
42008  #
42009
42010  # FIXME: this was indirectly the old default, but just inherited.
42011  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42012  #   C_FLAG_DEPS="-MMD -MF"
42013  # fi
42014
42015  # Generate make dependency files
42016  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42017    C_FLAG_DEPS="-MMD -MF"
42018  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42019    C_FLAG_DEPS="-MMD -MF"
42020  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42021    C_FLAG_DEPS="-xMMD -xMF"
42022  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42023    C_FLAG_DEPS="-qmakedep=gcc -MF"
42024  fi
42025  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42026
42027
42028
42029  # Debug symbols
42030  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42031    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42032      # reduce from default "-g2" option to save space
42033      CFLAGS_DEBUG_SYMBOLS="-g1"
42034      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42035    else
42036      CFLAGS_DEBUG_SYMBOLS="-g"
42037      CXXFLAGS_DEBUG_SYMBOLS="-g"
42038    fi
42039  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42040    CFLAGS_DEBUG_SYMBOLS="-g"
42041    CXXFLAGS_DEBUG_SYMBOLS="-g"
42042  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42043    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42044    # FIXME: likely a bug, this disables debug symbols rather than enables them
42045    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42046  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42047    CFLAGS_DEBUG_SYMBOLS="-g"
42048    CXXFLAGS_DEBUG_SYMBOLS="-g"
42049  fi
42050
42051
42052
42053  # bounds, memory and behavior checking options
42054  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42055    case $DEBUG_LEVEL in
42056    release )
42057      # no adjustment
42058      ;;
42059    fastdebug )
42060      # no adjustment
42061      ;;
42062    slowdebug )
42063      # Add runtime stack smashing and undefined behavior checks.
42064      # Not all versions of gcc support -fstack-protector
42065      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42066
42067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42068$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42069  supports=yes
42070
42071  saved_cflags="$CFLAGS"
42072  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42073  ac_ext=c
42074ac_cpp='$CPP $CPPFLAGS'
42075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42077ac_compiler_gnu=$ac_cv_c_compiler_gnu
42078
42079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42080/* end confdefs.h.  */
42081int i;
42082_ACEOF
42083if ac_fn_c_try_compile "$LINENO"; then :
42084
42085else
42086  supports=no
42087fi
42088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42089  ac_ext=cpp
42090ac_cpp='$CXXCPP $CPPFLAGS'
42091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42094
42095  CFLAGS="$saved_cflags"
42096
42097  saved_cxxflags="$CXXFLAGS"
42098  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42099  ac_ext=cpp
42100ac_cpp='$CXXCPP $CPPFLAGS'
42101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42104
42105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42106/* end confdefs.h.  */
42107int i;
42108_ACEOF
42109if ac_fn_cxx_try_compile "$LINENO"; then :
42110
42111else
42112  supports=no
42113fi
42114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42115  ac_ext=cpp
42116ac_cpp='$CXXCPP $CPPFLAGS'
42117ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42118ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42119ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42120
42121  CXXFLAGS="$saved_cxxflags"
42122
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42124$as_echo "$supports" >&6; }
42125  if test "x$supports" = "xyes" ; then
42126    :
42127  else
42128    STACK_PROTECTOR_CFLAG=""
42129  fi
42130
42131
42132      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42133      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42134      ;;
42135    esac
42136  fi
42137
42138  # Optimization levels
42139  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42140    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42141
42142    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42143      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42144      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42145      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42146      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42147      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42148      C_O_FLAG_NONE="-xregs=no%frameptr"
42149      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42150      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42151      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42152      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42153      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42154      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42155        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42156        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42157      fi
42158    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42159      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42160      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42161      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42162      C_O_FLAG_DEBUG=""
42163      C_O_FLAG_NONE=""
42164      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42165      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42166      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42167      C_O_FLAG_DEBUG=""
42168      CXX_O_FLAG_NONE=""
42169    fi
42170  else
42171    # The remaining toolchains share opt flags between CC and CXX;
42172    # setup for C and duplicate afterwards.
42173    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42174      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42175        # On MacOSX we optimize for size, something
42176        # we should do for all platforms?
42177        C_O_FLAG_HIGHEST="-Os"
42178        C_O_FLAG_HI="-Os"
42179        C_O_FLAG_NORM="-Os"
42180      else
42181        C_O_FLAG_HIGHEST="-O3"
42182        C_O_FLAG_HI="-O3"
42183        C_O_FLAG_NORM="-O2"
42184      fi
42185      C_O_FLAG_DEBUG="-O0"
42186      C_O_FLAG_NONE="-O0"
42187    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42188      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42189        # On MacOSX we optimize for size, something
42190        # we should do for all platforms?
42191        C_O_FLAG_HIGHEST="-Os"
42192        C_O_FLAG_HI="-Os"
42193        C_O_FLAG_NORM="-Os"
42194      else
42195        C_O_FLAG_HIGHEST="-O3"
42196        C_O_FLAG_HI="-O3"
42197        C_O_FLAG_NORM="-O2"
42198      fi
42199      C_O_FLAG_DEBUG="-O0"
42200      C_O_FLAG_NONE="-O0"
42201    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42202      C_O_FLAG_HIGHEST="-O3"
42203      C_O_FLAG_HI="-O3 -qstrict"
42204      C_O_FLAG_NORM="-O2"
42205      C_O_FLAG_DEBUG="-qnoopt"
42206      C_O_FLAG_NONE="-qnoop"
42207    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42208      C_O_FLAG_HIGHEST="-O2"
42209      C_O_FLAG_HI="-O1"
42210      C_O_FLAG_NORM="-O1"
42211      C_O_FLAG_DEBUG="-Od"
42212      C_O_FLAG_NONE="-Od"
42213    fi
42214    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42215    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42216    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42217    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42218    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42219  fi
42220
42221  # Adjust optimization flags according to debug level.
42222  case $DEBUG_LEVEL in
42223    release )
42224      # no adjustment
42225      ;;
42226    fastdebug )
42227      # Not quite so much optimization
42228      C_O_FLAG_HI="$C_O_FLAG_NORM"
42229      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42230      ;;
42231    slowdebug )
42232      # Disable optimization
42233      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42234      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42235      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42236      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42237      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42238      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42239      ;;
42240  esac
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254  # Special extras...
42255  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42256    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42257      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42258      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42259    fi
42260    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42261    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42262  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42263    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42264    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42265  fi
42266
42267  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42269$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42270  fi
42271
42272  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42274$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42275  fi
42276
42277  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42278    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42279$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42280  fi
42281
42282
42283# Check whether --with-extra-cflags was given.
42284if test "${with_extra_cflags+set}" = set; then :
42285  withval=$with_extra_cflags;
42286fi
42287
42288
42289
42290# Check whether --with-extra-cxxflags was given.
42291if test "${with_extra_cxxflags+set}" = set; then :
42292  withval=$with_extra_cxxflags;
42293fi
42294
42295
42296
42297# Check whether --with-extra-ldflags was given.
42298if test "${with_extra_ldflags+set}" = set; then :
42299  withval=$with_extra_ldflags;
42300fi
42301
42302
42303  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42304  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42305  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42306
42307  # Hotspot needs these set in their legacy form
42308  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42309  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42310  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42311
42312
42313
42314
42315
42316  ###############################################################################
42317  #
42318  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42319  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42320  #
42321
42322  # Setup compiler/platform specific flags into
42323  #    CFLAGS_JDK    - C Compiler flags
42324  #    CXXFLAGS_JDK  - C++ Compiler flags
42325  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42326  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42327    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42328      # Force compatibility with i586 on 32 bit intel platforms.
42329      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42330    fi
42331    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42332        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42333    case $OPENJDK_TARGET_CPU_ARCH in
42334      arm )
42335        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42336        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42337        ;;
42338      ppc )
42339        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42340        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42341        ;;
42342      * )
42343        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42344        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42345        ;;
42346    esac
42347  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42348    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42349    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42350      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42351    fi
42352
42353    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42354    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42355  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42356    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42357    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42358  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42359    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42360        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42361        -DWIN32_LEAN_AND_MEAN \
42362        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42363        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42364        -DWIN32 -DIAL"
42365    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42366      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42367    else
42368      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42369    fi
42370    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42371    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42372    # studio.
42373    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42374      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42375          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42376    fi
42377  fi
42378
42379  ###############################################################################
42380
42381  # Adjust flags according to debug level.
42382  case $DEBUG_LEVEL in
42383    fastdebug | slowdebug )
42384      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42385      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42386      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42387      ;;
42388    release )
42389      ;;
42390    * )
42391      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42392      ;;
42393  esac
42394
42395  # Setup LP64
42396  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42397
42398  # Set some common defines. These works for all compilers, but assume
42399  # -D is universally accepted.
42400
42401  # Setup endianness
42402  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42403    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42404    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42405    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42406    #   Note: -Dmacro         is the same as    #define macro 1
42407    #         -Dmacro=        is the same as    #define macro
42408    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42409      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42410    else
42411      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42412    fi
42413  else
42414    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42415    # are defined in the system?
42416    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42417      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42418    else
42419      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42420    fi
42421  fi
42422
42423  # Setup target OS define. Use OS target name but in upper case.
42424  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42425  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42426
42427  # Setup target CPU
42428  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42429
42430  # Setup debug/release defines
42431  if test "x$DEBUG_LEVEL" = xrelease; then
42432    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42433    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42434      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42435    fi
42436  else
42437    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42438  fi
42439
42440  # Setup release name
42441  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42442
42443
42444  # Set some additional per-OS defines.
42445  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42446    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42447  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42448    # FIXME: PPC64 should not be here.
42449    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42450  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42451    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42452  fi
42453
42454  # Additional macosx handling
42455  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42456    # Setting these parameters makes it an error to link to macosx APIs that are
42457    # newer than the given OS version and makes the linked binaries compatible
42458    # even if built on a newer version of the OS.
42459    # The expected format is X.Y.Z
42460    MACOSX_VERSION_MIN=10.7.0
42461
42462
42463    # The macro takes the version with no dots, ex: 1070
42464    # Let the flags variables get resolved in make for easier override on make
42465    # command line.
42466    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42467    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42468  fi
42469
42470  # Setup some hard coded includes
42471  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42472      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42473      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42474      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42475
42476  # The shared libraries are compiled using the picflag.
42477  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42478  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42479
42480  # Executable flags
42481  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42482  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42483
42484
42485
42486
42487
42488
42489  # Flags for compiling test libraries
42490  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42491  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42492
42493  # Flags for compiling test executables
42494  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42495  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42496
42497
42498
42499
42500
42501
42502  # Setup LDFLAGS et al.
42503  #
42504
42505  # Now this is odd. The JDK native libraries have to link against libjvm.so
42506  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42507  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42508  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42509  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42510  # libraries will link to whatever is in memory. Yuck.
42511  #
42512  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42513  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42514    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42515    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42516      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42517    fi
42518    # TODO: make -debug optional "--disable-full-debug-symbols"
42519    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42520  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42521    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42522    # We have previously set HAS_GNU_HASH if this is the case
42523    if test -n "$HAS_GNU_HASH"; then
42524      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42525    fi
42526    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42527      # And since we now know that the linker is gnu, then add -z defs, to forbid
42528      # undefined symbols in object files.
42529      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42530      case $DEBUG_LEVEL in
42531        release )
42532          # tell linker to optimize libraries.
42533          # Should this be supplied to the OSS linker as well?
42534          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42535          ;;
42536        slowdebug )
42537          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42538            # do relocations at load
42539            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42540            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42541          fi
42542          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42543            # mark relocations read only
42544            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42545            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42546          fi
42547          ;;
42548        fastdebug )
42549          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42550            # mark relocations read only
42551            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42552            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42553          fi
42554          ;;
42555        * )
42556          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42557          ;;
42558        esac
42559    fi
42560  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42561    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42562    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42563  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42564    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42565  fi
42566
42567  # Customize LDFLAGS for executables
42568
42569  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42570
42571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42572    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42573      LDFLAGS_STACK_SIZE=1048576
42574    else
42575      LDFLAGS_STACK_SIZE=327680
42576    fi
42577    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42578  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42579    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42580  fi
42581
42582  # Customize LDFLAGS for libs
42583  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42584
42585  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42586    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42587    LDFLAGS_JDKLIB_SUFFIX=""
42588  else
42589    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42590        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42591
42592    # On some platforms (mac) the linker warns about non existing -L dirs.
42593    # Add server first if available. Linking aginst client does not always produce the same results.
42594    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42595    # Default to server for other variants.
42596    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42597      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42598    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42599      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42600    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42601      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42602    else
42603      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42604    fi
42605
42606    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42607    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42608      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42609    fi
42610  fi
42611
42612
42613
42614
42615
42616
42617
42618  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42619  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42620  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42621  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42622
42623
42624
42625
42626
42627
42628
42629  # Some Zero and Shark settings.
42630  # ZERO_ARCHFLAG tells the compiler which mode to build for
42631  case "${OPENJDK_TARGET_CPU}" in
42632    s390)
42633      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42634      ;;
42635    *)
42636      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42637  esac
42638
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42640$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42641  supports=yes
42642
42643  saved_cflags="$CFLAGS"
42644  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42645  ac_ext=c
42646ac_cpp='$CPP $CPPFLAGS'
42647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42649ac_compiler_gnu=$ac_cv_c_compiler_gnu
42650
42651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42652/* end confdefs.h.  */
42653int i;
42654_ACEOF
42655if ac_fn_c_try_compile "$LINENO"; then :
42656
42657else
42658  supports=no
42659fi
42660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42661  ac_ext=cpp
42662ac_cpp='$CXXCPP $CPPFLAGS'
42663ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42664ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42665ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42666
42667  CFLAGS="$saved_cflags"
42668
42669  saved_cxxflags="$CXXFLAGS"
42670  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42671  ac_ext=cpp
42672ac_cpp='$CXXCPP $CPPFLAGS'
42673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42676
42677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42678/* end confdefs.h.  */
42679int i;
42680_ACEOF
42681if ac_fn_cxx_try_compile "$LINENO"; then :
42682
42683else
42684  supports=no
42685fi
42686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42687  ac_ext=cpp
42688ac_cpp='$CXXCPP $CPPFLAGS'
42689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42692
42693  CXXFLAGS="$saved_cxxflags"
42694
42695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42696$as_echo "$supports" >&6; }
42697  if test "x$supports" = "xyes" ; then
42698    :
42699  else
42700    ZERO_ARCHFLAG=""
42701  fi
42702
42703
42704
42705  # Check that the compiler supports -mX (or -qX on AIX) flags
42706  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42707
42708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42709$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42710  supports=yes
42711
42712  saved_cflags="$CFLAGS"
42713  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42714  ac_ext=c
42715ac_cpp='$CPP $CPPFLAGS'
42716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42718ac_compiler_gnu=$ac_cv_c_compiler_gnu
42719
42720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42721/* end confdefs.h.  */
42722int i;
42723_ACEOF
42724if ac_fn_c_try_compile "$LINENO"; then :
42725
42726else
42727  supports=no
42728fi
42729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42730  ac_ext=cpp
42731ac_cpp='$CXXCPP $CPPFLAGS'
42732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42735
42736  CFLAGS="$saved_cflags"
42737
42738  saved_cxxflags="$CXXFLAGS"
42739  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42740  ac_ext=cpp
42741ac_cpp='$CXXCPP $CPPFLAGS'
42742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42745
42746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42747/* end confdefs.h.  */
42748int i;
42749_ACEOF
42750if ac_fn_cxx_try_compile "$LINENO"; then :
42751
42752else
42753  supports=no
42754fi
42755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42756  ac_ext=cpp
42757ac_cpp='$CXXCPP $CPPFLAGS'
42758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42761
42762  CXXFLAGS="$saved_cxxflags"
42763
42764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42765$as_echo "$supports" >&6; }
42766  if test "x$supports" = "xyes" ; then
42767    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42768  else
42769    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42770  fi
42771
42772
42773
42774  # Check whether --enable-warnings-as-errors was given.
42775if test "${enable_warnings_as_errors+set}" = set; then :
42776  enableval=$enable_warnings_as_errors;
42777fi
42778
42779
42780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42781$as_echo_n "checking if native warnings are errors... " >&6; }
42782  if test "x$enable_warnings_as_errors" = "xyes"; then
42783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42784$as_echo "yes (explicitely set)" >&6; }
42785    WARNINGS_AS_ERRORS=true
42786  elif test "x$enable_warnings_as_errors" = "xno"; then
42787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42788$as_echo "no" >&6; }
42789    WARNINGS_AS_ERRORS=false
42790  elif test "x$enable_warnings_as_errors" = "x"; then
42791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42792$as_echo "yes (default)" >&6; }
42793    WARNINGS_AS_ERRORS=true
42794  else
42795    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42796  fi
42797
42798
42799  case "${TOOLCHAIN_TYPE}" in
42800    microsoft)
42801      DISABLE_WARNING_PREFIX="-wd"
42802      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42803      ;;
42804    solstudio)
42805      DISABLE_WARNING_PREFIX="-erroff="
42806      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42807      ;;
42808    gcc)
42809      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42810
42811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42812$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42813  supports=yes
42814
42815  saved_cflags="$CFLAGS"
42816  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42817  ac_ext=c
42818ac_cpp='$CPP $CPPFLAGS'
42819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42821ac_compiler_gnu=$ac_cv_c_compiler_gnu
42822
42823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42824/* end confdefs.h.  */
42825int i;
42826_ACEOF
42827if ac_fn_c_try_compile "$LINENO"; then :
42828
42829else
42830  supports=no
42831fi
42832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42833  ac_ext=cpp
42834ac_cpp='$CXXCPP $CPPFLAGS'
42835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42838
42839  CFLAGS="$saved_cflags"
42840
42841  saved_cxxflags="$CXXFLAGS"
42842  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42843  ac_ext=cpp
42844ac_cpp='$CXXCPP $CPPFLAGS'
42845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42848
42849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42850/* end confdefs.h.  */
42851int i;
42852_ACEOF
42853if ac_fn_cxx_try_compile "$LINENO"; then :
42854
42855else
42856  supports=no
42857fi
42858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42859  ac_ext=cpp
42860ac_cpp='$CXXCPP $CPPFLAGS'
42861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42864
42865  CXXFLAGS="$saved_cxxflags"
42866
42867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42868$as_echo "$supports" >&6; }
42869  if test "x$supports" = "xyes" ; then
42870    GCC_CAN_DISABLE_WARNINGS=true
42871  else
42872    GCC_CAN_DISABLE_WARNINGS=false
42873
42874  fi
42875
42876      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42877        DISABLE_WARNING_PREFIX="-Wno-"
42878      else
42879        DISABLE_WARNING_PREFIX=
42880      fi
42881      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42882      ;;
42883    clang)
42884      DISABLE_WARNING_PREFIX="-Wno-"
42885      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42886      ;;
42887  esac
42888
42889
42890
42891
42892# Setup debug symbols (need objcopy from the toolchain for that)
42893
42894  #
42895  # ENABLE_DEBUG_SYMBOLS
42896  # This must be done after the toolchain is setup, since we're looking at objcopy.
42897  #
42898  # Check whether --enable-debug-symbols was given.
42899if test "${enable_debug_symbols+set}" = set; then :
42900  enableval=$enable_debug_symbols;
42901fi
42902
42903
42904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42905$as_echo_n "checking if we should generate debug symbols... " >&6; }
42906
42907  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42908    # explicit enabling of enable-debug-symbols and can't find objcopy
42909    #   this is an error
42910    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42911  fi
42912
42913  if test "x$enable_debug_symbols" = "xyes"; then
42914    ENABLE_DEBUG_SYMBOLS=true
42915  elif test "x$enable_debug_symbols" = "xno"; then
42916    ENABLE_DEBUG_SYMBOLS=false
42917  else
42918    # Default is on if objcopy is found
42919    if test "x$OBJCOPY" != x; then
42920      ENABLE_DEBUG_SYMBOLS=true
42921    # MacOS X and Windows don't use objcopy but default is on for those OSes
42922    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42923      ENABLE_DEBUG_SYMBOLS=true
42924    else
42925      ENABLE_DEBUG_SYMBOLS=false
42926    fi
42927  fi
42928
42929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42930$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42931
42932  #
42933  # ZIP_DEBUGINFO_FILES
42934  #
42935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42936$as_echo_n "checking if we should zip debug-info files... " >&6; }
42937  # Check whether --enable-zip-debug-info was given.
42938if test "${enable_zip_debug_info+set}" = set; then :
42939  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42940else
42941  enable_zip_debug_info="yes"
42942fi
42943
42944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42945$as_echo "${enable_zip_debug_info}" >&6; }
42946
42947  if test "x${enable_zip_debug_info}" = "xno"; then
42948    ZIP_DEBUGINFO_FILES=false
42949  else
42950    ZIP_DEBUGINFO_FILES=true
42951  fi
42952
42953
42954
42955
42956
42957  # Check whether --enable-native-coverage was given.
42958if test "${enable_native_coverage+set}" = set; then :
42959  enableval=$enable_native_coverage;
42960fi
42961
42962  GCOV_ENABLED="false"
42963  if test "x$enable_native_coverage" = "xyes"; then
42964    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42966$as_echo_n "checking if native coverage is enabled... " >&6; }
42967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42968$as_echo "yes" >&6; }
42969      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42970      GCOV_LDFLAGS="-fprofile-arcs"
42971      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42972      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42973      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42974      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42975      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42976      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42977      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42978      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42979      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42980      GCOV_ENABLED="true"
42981    else
42982      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42983    fi
42984  elif test "x$enable_native_coverage" = "xno"; then
42985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42986$as_echo_n "checking if native coverage is enabled... " >&6; }
42987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42988$as_echo "no" >&6; }
42989  elif test "x$enable_native_coverage" != "x"; then
42990    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42991  fi
42992
42993
42994
42995
42996###############################################################################
42997#
42998# Check dependencies for external and internal libraries.
42999#
43000###############################################################################
43001
43002# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43003
43004  # When using cygwin or msys, we need a wrapper binary that renames
43005  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43006  # @files and rewrites these too! This wrapper binary is
43007  # called fixpath.
43008  FIXPATH=
43009  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43011$as_echo_n "checking if fixpath can be created... " >&6; }
43012    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43013    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43014    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43015    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43016      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43017      FIXPATH="$FIXPATH_BIN -c"
43018    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43019      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43020      # @ was chosen as separator to minimize risk of other tools messing around with it
43021      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43022          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43023      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43024      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43025    fi
43026    FIXPATH_SRC_W="$FIXPATH_SRC"
43027    FIXPATH_BIN_W="$FIXPATH_BIN"
43028
43029  unix_path="$FIXPATH_SRC_W"
43030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43031    windows_path=`$CYGPATH -m "$unix_path"`
43032    FIXPATH_SRC_W="$windows_path"
43033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43034    windows_path=`cmd //c echo $unix_path`
43035    FIXPATH_SRC_W="$windows_path"
43036  fi
43037
43038
43039  unix_path="$FIXPATH_BIN_W"
43040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43041    windows_path=`$CYGPATH -m "$unix_path"`
43042    FIXPATH_BIN_W="$windows_path"
43043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43044    windows_path=`cmd //c echo $unix_path`
43045    FIXPATH_BIN_W="$windows_path"
43046  fi
43047
43048    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43049    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43050    cd $FIXPATH_DIR
43051    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43052    cd $CURDIR
43053
43054    if test ! -x $FIXPATH_BIN; then
43055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43056$as_echo "no" >&6; }
43057      cat $FIXPATH_DIR/fixpath1.log
43058      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43059    fi
43060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43061$as_echo "yes" >&6; }
43062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43063$as_echo_n "checking if fixpath.exe works... " >&6; }
43064    cd $FIXPATH_DIR
43065    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43066        > $FIXPATH_DIR/fixpath2.log 2>&1
43067    cd $CURDIR
43068    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43070$as_echo "no" >&6; }
43071      cat $FIXPATH_DIR/fixpath2.log
43072      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43073    fi
43074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43075$as_echo "yes" >&6; }
43076  fi
43077
43078
43079
43080
43081
43082
43083  ###############################################################################
43084  #
43085  # OS specific settings that we never will need to probe.
43086  #
43087  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43089$as_echo_n "checking what is not needed on Linux?... " >&6; }
43090    PULSE_NOT_NEEDED=yes
43091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43092$as_echo "pulse" >&6; }
43093  fi
43094
43095  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43097$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43098    ALSA_NOT_NEEDED=yes
43099    PULSE_NOT_NEEDED=yes
43100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43101$as_echo "alsa pulse" >&6; }
43102  fi
43103
43104  if test "x$OPENJDK_TARGET_OS" = xaix; then
43105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43106$as_echo_n "checking what is not needed on AIX?... " >&6; }
43107    ALSA_NOT_NEEDED=yes
43108    PULSE_NOT_NEEDED=yes
43109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43110$as_echo "alsa pulse" >&6; }
43111  fi
43112
43113
43114  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43116$as_echo_n "checking what is not needed on Windows?... " >&6; }
43117    CUPS_NOT_NEEDED=yes
43118    ALSA_NOT_NEEDED=yes
43119    PULSE_NOT_NEEDED=yes
43120    X11_NOT_NEEDED=yes
43121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43122$as_echo "alsa cups pulse x11" >&6; }
43123  fi
43124
43125  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43127$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43128    ALSA_NOT_NEEDED=yes
43129    PULSE_NOT_NEEDED=yes
43130    X11_NOT_NEEDED=yes
43131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43132$as_echo "alsa pulse x11" >&6; }
43133  fi
43134
43135  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43137$as_echo_n "checking what is not needed on bsd?... " >&6; }
43138    ALSA_NOT_NEEDED=yes
43139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43140$as_echo "alsa" >&6; }
43141  fi
43142
43143  if test "x$OPENJDK" = "xfalse"; then
43144    FREETYPE_NOT_NEEDED=yes
43145  fi
43146
43147  if test "x$SUPPORT_HEADFUL" = xno; then
43148    X11_NOT_NEEDED=yes
43149  fi
43150
43151
43152
43153  ###############################################################################
43154  #
43155  # Check for X Windows
43156  #
43157
43158  if test "x$X11_NOT_NEEDED" = xyes; then
43159    if test "x${with_x}" != x; then
43160      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43161$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43162    fi
43163    X_CFLAGS=
43164    X_LIBS=
43165  else
43166    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43167    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43168    # --x-libraries for the sysroot, if that seems to be correct.
43169    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43170      if test "x$SYSROOT" != "x"; then
43171        if test "x$x_includes" = xNONE; then
43172          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43173            x_includes="$SYSROOT/usr/X11R6/include"
43174          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43175            x_includes="$SYSROOT/usr/include"
43176          fi
43177        fi
43178        if test "x$x_libraries" = xNONE; then
43179          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43180            x_libraries="$SYSROOT/usr/X11R6/lib"
43181          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43182            x_libraries="$SYSROOT/usr/lib64"
43183          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43184            x_libraries="$SYSROOT/usr/lib"
43185          fi
43186        fi
43187      fi
43188    fi
43189
43190    # Now let autoconf do it's magic
43191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43192$as_echo_n "checking for X... " >&6; }
43193
43194
43195# Check whether --with-x was given.
43196if test "${with_x+set}" = set; then :
43197  withval=$with_x;
43198fi
43199
43200# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43201if test "x$with_x" = xno; then
43202  # The user explicitly disabled X.
43203  have_x=disabled
43204else
43205  case $x_includes,$x_libraries in #(
43206    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43207    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43208  $as_echo_n "(cached) " >&6
43209else
43210  # One or both of the vars are not set, and there is no cached value.
43211ac_x_includes=no ac_x_libraries=no
43212rm -f -r conftest.dir
43213if mkdir conftest.dir; then
43214  cd conftest.dir
43215  cat >Imakefile <<'_ACEOF'
43216incroot:
43217	@echo incroot='${INCROOT}'
43218usrlibdir:
43219	@echo usrlibdir='${USRLIBDIR}'
43220libdir:
43221	@echo libdir='${LIBDIR}'
43222_ACEOF
43223  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43224    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43225    for ac_var in incroot usrlibdir libdir; do
43226      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43227    done
43228    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43229    for ac_extension in a so sl dylib la dll; do
43230      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43231	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43232	ac_im_usrlibdir=$ac_im_libdir; break
43233      fi
43234    done
43235    # Screen out bogus values from the imake configuration.  They are
43236    # bogus both because they are the default anyway, and because
43237    # using them would break gcc on systems where it needs fixed includes.
43238    case $ac_im_incroot in
43239	/usr/include) ac_x_includes= ;;
43240	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43241    esac
43242    case $ac_im_usrlibdir in
43243	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43244	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43245    esac
43246  fi
43247  cd ..
43248  rm -f -r conftest.dir
43249fi
43250
43251# Standard set of common directories for X headers.
43252# Check X11 before X11Rn because it is often a symlink to the current release.
43253ac_x_header_dirs='
43254/usr/X11/include
43255/usr/X11R7/include
43256/usr/X11R6/include
43257/usr/X11R5/include
43258/usr/X11R4/include
43259
43260/usr/include/X11
43261/usr/include/X11R7
43262/usr/include/X11R6
43263/usr/include/X11R5
43264/usr/include/X11R4
43265
43266/usr/local/X11/include
43267/usr/local/X11R7/include
43268/usr/local/X11R6/include
43269/usr/local/X11R5/include
43270/usr/local/X11R4/include
43271
43272/usr/local/include/X11
43273/usr/local/include/X11R7
43274/usr/local/include/X11R6
43275/usr/local/include/X11R5
43276/usr/local/include/X11R4
43277
43278/usr/X386/include
43279/usr/x386/include
43280/usr/XFree86/include/X11
43281
43282/usr/include
43283/usr/local/include
43284/usr/unsupported/include
43285/usr/athena/include
43286/usr/local/x11r5/include
43287/usr/lpp/Xamples/include
43288
43289/usr/openwin/include
43290/usr/openwin/share/include'
43291
43292if test "$ac_x_includes" = no; then
43293  # Guess where to find include files, by looking for Xlib.h.
43294  # First, try using that file with no special directory specified.
43295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43296/* end confdefs.h.  */
43297#include <X11/Xlib.h>
43298_ACEOF
43299if ac_fn_cxx_try_cpp "$LINENO"; then :
43300  # We can compile using X headers with no special include directory.
43301ac_x_includes=
43302else
43303  for ac_dir in $ac_x_header_dirs; do
43304  if test -r "$ac_dir/X11/Xlib.h"; then
43305    ac_x_includes=$ac_dir
43306    break
43307  fi
43308done
43309fi
43310rm -f conftest.err conftest.i conftest.$ac_ext
43311fi # $ac_x_includes = no
43312
43313if test "$ac_x_libraries" = no; then
43314  # Check for the libraries.
43315  # See if we find them without any special options.
43316  # Don't add to $LIBS permanently.
43317  ac_save_LIBS=$LIBS
43318  LIBS="-lX11 $LIBS"
43319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43320/* end confdefs.h.  */
43321#include <X11/Xlib.h>
43322int
43323main ()
43324{
43325XrmInitialize ()
43326  ;
43327  return 0;
43328}
43329_ACEOF
43330if ac_fn_cxx_try_link "$LINENO"; then :
43331  LIBS=$ac_save_LIBS
43332# We can link X programs with no special library path.
43333ac_x_libraries=
43334else
43335  LIBS=$ac_save_LIBS
43336for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43337do
43338  # Don't even attempt the hair of trying to link an X program!
43339  for ac_extension in a so sl dylib la dll; do
43340    if test -r "$ac_dir/libX11.$ac_extension"; then
43341      ac_x_libraries=$ac_dir
43342      break 2
43343    fi
43344  done
43345done
43346fi
43347rm -f core conftest.err conftest.$ac_objext \
43348    conftest$ac_exeext conftest.$ac_ext
43349fi # $ac_x_libraries = no
43350
43351case $ac_x_includes,$ac_x_libraries in #(
43352  no,* | *,no | *\'*)
43353    # Didn't find X, or a directory has "'" in its name.
43354    ac_cv_have_x="have_x=no";; #(
43355  *)
43356    # Record where we found X for the cache.
43357    ac_cv_have_x="have_x=yes\
43358	ac_x_includes='$ac_x_includes'\
43359	ac_x_libraries='$ac_x_libraries'"
43360esac
43361fi
43362;; #(
43363    *) have_x=yes;;
43364  esac
43365  eval "$ac_cv_have_x"
43366fi # $with_x != no
43367
43368if test "$have_x" != yes; then
43369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43370$as_echo "$have_x" >&6; }
43371  no_x=yes
43372else
43373  # If each of the values was on the command line, it overrides each guess.
43374  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43375  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43376  # Update the cache value to reflect the command line values.
43377  ac_cv_have_x="have_x=yes\
43378	ac_x_includes='$x_includes'\
43379	ac_x_libraries='$x_libraries'"
43380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43381$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43382fi
43383
43384    if test "$no_x" = yes; then
43385  # Not all programs may use this symbol, but it does not hurt to define it.
43386
43387$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43388
43389  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43390else
43391  if test -n "$x_includes"; then
43392    X_CFLAGS="$X_CFLAGS -I$x_includes"
43393  fi
43394
43395  # It would also be nice to do this for all -L options, not just this one.
43396  if test -n "$x_libraries"; then
43397    X_LIBS="$X_LIBS -L$x_libraries"
43398    # For Solaris; some versions of Sun CC require a space after -R and
43399    # others require no space.  Words are not sufficient . . . .
43400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43401$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43402    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43403    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43404    ac_cxx_werror_flag=yes
43405    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43406/* end confdefs.h.  */
43407
43408int
43409main ()
43410{
43411
43412  ;
43413  return 0;
43414}
43415_ACEOF
43416if ac_fn_cxx_try_link "$LINENO"; then :
43417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43418$as_echo "no" >&6; }
43419       X_LIBS="$X_LIBS -R$x_libraries"
43420else
43421  LIBS="$ac_xsave_LIBS -R $x_libraries"
43422       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43423/* end confdefs.h.  */
43424
43425int
43426main ()
43427{
43428
43429  ;
43430  return 0;
43431}
43432_ACEOF
43433if ac_fn_cxx_try_link "$LINENO"; then :
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43435$as_echo "yes" >&6; }
43436	  X_LIBS="$X_LIBS -R $x_libraries"
43437else
43438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43439$as_echo "neither works" >&6; }
43440fi
43441rm -f core conftest.err conftest.$ac_objext \
43442    conftest$ac_exeext conftest.$ac_ext
43443fi
43444rm -f core conftest.err conftest.$ac_objext \
43445    conftest$ac_exeext conftest.$ac_ext
43446    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43447    LIBS=$ac_xsave_LIBS
43448  fi
43449
43450  # Check for system-dependent libraries X programs must link with.
43451  # Do this before checking for the system-independent R6 libraries
43452  # (-lICE), since we may need -lsocket or whatever for X linking.
43453
43454  if test "$ISC" = yes; then
43455    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43456  else
43457    # Martyn Johnson says this is needed for Ultrix, if the X
43458    # libraries were built with DECnet support.  And Karl Berry says
43459    # the Alpha needs dnet_stub (dnet does not exist).
43460    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43461    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43462/* end confdefs.h.  */
43463
43464/* Override any GCC internal prototype to avoid an error.
43465   Use char because int might match the return type of a GCC
43466   builtin and then its argument prototype would still apply.  */
43467#ifdef __cplusplus
43468extern "C"
43469#endif
43470char XOpenDisplay ();
43471int
43472main ()
43473{
43474return XOpenDisplay ();
43475  ;
43476  return 0;
43477}
43478_ACEOF
43479if ac_fn_cxx_try_link "$LINENO"; then :
43480
43481else
43482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43483$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43484if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43485  $as_echo_n "(cached) " >&6
43486else
43487  ac_check_lib_save_LIBS=$LIBS
43488LIBS="-ldnet  $LIBS"
43489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43490/* end confdefs.h.  */
43491
43492/* Override any GCC internal prototype to avoid an error.
43493   Use char because int might match the return type of a GCC
43494   builtin and then its argument prototype would still apply.  */
43495#ifdef __cplusplus
43496extern "C"
43497#endif
43498char dnet_ntoa ();
43499int
43500main ()
43501{
43502return dnet_ntoa ();
43503  ;
43504  return 0;
43505}
43506_ACEOF
43507if ac_fn_cxx_try_link "$LINENO"; then :
43508  ac_cv_lib_dnet_dnet_ntoa=yes
43509else
43510  ac_cv_lib_dnet_dnet_ntoa=no
43511fi
43512rm -f core conftest.err conftest.$ac_objext \
43513    conftest$ac_exeext conftest.$ac_ext
43514LIBS=$ac_check_lib_save_LIBS
43515fi
43516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43517$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43518if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43519  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43520fi
43521
43522    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43524$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43525if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43526  $as_echo_n "(cached) " >&6
43527else
43528  ac_check_lib_save_LIBS=$LIBS
43529LIBS="-ldnet_stub  $LIBS"
43530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43531/* end confdefs.h.  */
43532
43533/* Override any GCC internal prototype to avoid an error.
43534   Use char because int might match the return type of a GCC
43535   builtin and then its argument prototype would still apply.  */
43536#ifdef __cplusplus
43537extern "C"
43538#endif
43539char dnet_ntoa ();
43540int
43541main ()
43542{
43543return dnet_ntoa ();
43544  ;
43545  return 0;
43546}
43547_ACEOF
43548if ac_fn_cxx_try_link "$LINENO"; then :
43549  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43550else
43551  ac_cv_lib_dnet_stub_dnet_ntoa=no
43552fi
43553rm -f core conftest.err conftest.$ac_objext \
43554    conftest$ac_exeext conftest.$ac_ext
43555LIBS=$ac_check_lib_save_LIBS
43556fi
43557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43558$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43559if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43560  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43561fi
43562
43563    fi
43564fi
43565rm -f core conftest.err conftest.$ac_objext \
43566    conftest$ac_exeext conftest.$ac_ext
43567    LIBS="$ac_xsave_LIBS"
43568
43569    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43570    # to get the SysV transport functions.
43571    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43572    # needs -lnsl.
43573    # The nsl library prevents programs from opening the X display
43574    # on Irix 5.2, according to T.E. Dickey.
43575    # The functions gethostbyname, getservbyname, and inet_addr are
43576    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43577    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43578if test "x$ac_cv_func_gethostbyname" = xyes; then :
43579
43580fi
43581
43582    if test $ac_cv_func_gethostbyname = no; then
43583      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43584$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43585if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43586  $as_echo_n "(cached) " >&6
43587else
43588  ac_check_lib_save_LIBS=$LIBS
43589LIBS="-lnsl  $LIBS"
43590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43591/* end confdefs.h.  */
43592
43593/* Override any GCC internal prototype to avoid an error.
43594   Use char because int might match the return type of a GCC
43595   builtin and then its argument prototype would still apply.  */
43596#ifdef __cplusplus
43597extern "C"
43598#endif
43599char gethostbyname ();
43600int
43601main ()
43602{
43603return gethostbyname ();
43604  ;
43605  return 0;
43606}
43607_ACEOF
43608if ac_fn_cxx_try_link "$LINENO"; then :
43609  ac_cv_lib_nsl_gethostbyname=yes
43610else
43611  ac_cv_lib_nsl_gethostbyname=no
43612fi
43613rm -f core conftest.err conftest.$ac_objext \
43614    conftest$ac_exeext conftest.$ac_ext
43615LIBS=$ac_check_lib_save_LIBS
43616fi
43617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43618$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43619if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43620  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43621fi
43622
43623      if test $ac_cv_lib_nsl_gethostbyname = no; then
43624	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43625$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43626if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43627  $as_echo_n "(cached) " >&6
43628else
43629  ac_check_lib_save_LIBS=$LIBS
43630LIBS="-lbsd  $LIBS"
43631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43632/* end confdefs.h.  */
43633
43634/* Override any GCC internal prototype to avoid an error.
43635   Use char because int might match the return type of a GCC
43636   builtin and then its argument prototype would still apply.  */
43637#ifdef __cplusplus
43638extern "C"
43639#endif
43640char gethostbyname ();
43641int
43642main ()
43643{
43644return gethostbyname ();
43645  ;
43646  return 0;
43647}
43648_ACEOF
43649if ac_fn_cxx_try_link "$LINENO"; then :
43650  ac_cv_lib_bsd_gethostbyname=yes
43651else
43652  ac_cv_lib_bsd_gethostbyname=no
43653fi
43654rm -f core conftest.err conftest.$ac_objext \
43655    conftest$ac_exeext conftest.$ac_ext
43656LIBS=$ac_check_lib_save_LIBS
43657fi
43658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43659$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43660if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43661  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43662fi
43663
43664      fi
43665    fi
43666
43667    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43668    # socket/setsockopt and other routines are undefined under SCO ODT
43669    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43670    # on later versions), says Simon Leinen: it contains gethostby*
43671    # variants that don't use the name server (or something).  -lsocket
43672    # must be given before -lnsl if both are needed.  We assume that
43673    # if connect needs -lnsl, so does gethostbyname.
43674    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43675if test "x$ac_cv_func_connect" = xyes; then :
43676
43677fi
43678
43679    if test $ac_cv_func_connect = no; then
43680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43681$as_echo_n "checking for connect in -lsocket... " >&6; }
43682if ${ac_cv_lib_socket_connect+:} false; then :
43683  $as_echo_n "(cached) " >&6
43684else
43685  ac_check_lib_save_LIBS=$LIBS
43686LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43688/* end confdefs.h.  */
43689
43690/* Override any GCC internal prototype to avoid an error.
43691   Use char because int might match the return type of a GCC
43692   builtin and then its argument prototype would still apply.  */
43693#ifdef __cplusplus
43694extern "C"
43695#endif
43696char connect ();
43697int
43698main ()
43699{
43700return connect ();
43701  ;
43702  return 0;
43703}
43704_ACEOF
43705if ac_fn_cxx_try_link "$LINENO"; then :
43706  ac_cv_lib_socket_connect=yes
43707else
43708  ac_cv_lib_socket_connect=no
43709fi
43710rm -f core conftest.err conftest.$ac_objext \
43711    conftest$ac_exeext conftest.$ac_ext
43712LIBS=$ac_check_lib_save_LIBS
43713fi
43714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43715$as_echo "$ac_cv_lib_socket_connect" >&6; }
43716if test "x$ac_cv_lib_socket_connect" = xyes; then :
43717  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43718fi
43719
43720    fi
43721
43722    # Guillermo Gomez says -lposix is necessary on A/UX.
43723    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43724if test "x$ac_cv_func_remove" = xyes; then :
43725
43726fi
43727
43728    if test $ac_cv_func_remove = no; then
43729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43730$as_echo_n "checking for remove in -lposix... " >&6; }
43731if ${ac_cv_lib_posix_remove+:} false; then :
43732  $as_echo_n "(cached) " >&6
43733else
43734  ac_check_lib_save_LIBS=$LIBS
43735LIBS="-lposix  $LIBS"
43736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43737/* end confdefs.h.  */
43738
43739/* Override any GCC internal prototype to avoid an error.
43740   Use char because int might match the return type of a GCC
43741   builtin and then its argument prototype would still apply.  */
43742#ifdef __cplusplus
43743extern "C"
43744#endif
43745char remove ();
43746int
43747main ()
43748{
43749return remove ();
43750  ;
43751  return 0;
43752}
43753_ACEOF
43754if ac_fn_cxx_try_link "$LINENO"; then :
43755  ac_cv_lib_posix_remove=yes
43756else
43757  ac_cv_lib_posix_remove=no
43758fi
43759rm -f core conftest.err conftest.$ac_objext \
43760    conftest$ac_exeext conftest.$ac_ext
43761LIBS=$ac_check_lib_save_LIBS
43762fi
43763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43764$as_echo "$ac_cv_lib_posix_remove" >&6; }
43765if test "x$ac_cv_lib_posix_remove" = xyes; then :
43766  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43767fi
43768
43769    fi
43770
43771    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43772    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43773if test "x$ac_cv_func_shmat" = xyes; then :
43774
43775fi
43776
43777    if test $ac_cv_func_shmat = no; then
43778      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43779$as_echo_n "checking for shmat in -lipc... " >&6; }
43780if ${ac_cv_lib_ipc_shmat+:} false; then :
43781  $as_echo_n "(cached) " >&6
43782else
43783  ac_check_lib_save_LIBS=$LIBS
43784LIBS="-lipc  $LIBS"
43785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43786/* end confdefs.h.  */
43787
43788/* Override any GCC internal prototype to avoid an error.
43789   Use char because int might match the return type of a GCC
43790   builtin and then its argument prototype would still apply.  */
43791#ifdef __cplusplus
43792extern "C"
43793#endif
43794char shmat ();
43795int
43796main ()
43797{
43798return shmat ();
43799  ;
43800  return 0;
43801}
43802_ACEOF
43803if ac_fn_cxx_try_link "$LINENO"; then :
43804  ac_cv_lib_ipc_shmat=yes
43805else
43806  ac_cv_lib_ipc_shmat=no
43807fi
43808rm -f core conftest.err conftest.$ac_objext \
43809    conftest$ac_exeext conftest.$ac_ext
43810LIBS=$ac_check_lib_save_LIBS
43811fi
43812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43813$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43814if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43815  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43816fi
43817
43818    fi
43819  fi
43820
43821  # Check for libraries that X11R6 Xt/Xaw programs need.
43822  ac_save_LDFLAGS=$LDFLAGS
43823  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43824  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43825  # check for ICE first), but we must link in the order -lSM -lICE or
43826  # we get undefined symbols.  So assume we have SM if we have ICE.
43827  # These have to be linked with before -lX11, unlike the other
43828  # libraries we check for below, so use a different variable.
43829  # John Interrante, Karl Berry
43830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43831$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43832if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43833  $as_echo_n "(cached) " >&6
43834else
43835  ac_check_lib_save_LIBS=$LIBS
43836LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43838/* end confdefs.h.  */
43839
43840/* Override any GCC internal prototype to avoid an error.
43841   Use char because int might match the return type of a GCC
43842   builtin and then its argument prototype would still apply.  */
43843#ifdef __cplusplus
43844extern "C"
43845#endif
43846char IceConnectionNumber ();
43847int
43848main ()
43849{
43850return IceConnectionNumber ();
43851  ;
43852  return 0;
43853}
43854_ACEOF
43855if ac_fn_cxx_try_link "$LINENO"; then :
43856  ac_cv_lib_ICE_IceConnectionNumber=yes
43857else
43858  ac_cv_lib_ICE_IceConnectionNumber=no
43859fi
43860rm -f core conftest.err conftest.$ac_objext \
43861    conftest$ac_exeext conftest.$ac_ext
43862LIBS=$ac_check_lib_save_LIBS
43863fi
43864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43865$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43866if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43867  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43868fi
43869
43870  LDFLAGS=$ac_save_LDFLAGS
43871
43872fi
43873
43874
43875    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43876    # this doesn't make sense so we remove it.
43877    if test "x$COMPILE_TYPE" = xcross; then
43878      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43879    fi
43880
43881    if test "x$no_x" = xyes; then
43882
43883  # Print a helpful message on how to acquire the necessary build dependency.
43884  # x11 is the help tag: freetype, cups, pulse, alsa etc
43885  MISSING_DEPENDENCY=x11
43886
43887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43888    cygwin_help $MISSING_DEPENDENCY
43889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43890    msys_help $MISSING_DEPENDENCY
43891  else
43892    PKGHANDLER_COMMAND=
43893
43894    case $PKGHANDLER in
43895      apt-get)
43896        apt_help     $MISSING_DEPENDENCY ;;
43897      yum)
43898        yum_help     $MISSING_DEPENDENCY ;;
43899      port)
43900        port_help    $MISSING_DEPENDENCY ;;
43901      pkgutil)
43902        pkgutil_help $MISSING_DEPENDENCY ;;
43903      pkgadd)
43904        pkgadd_help  $MISSING_DEPENDENCY ;;
43905    esac
43906
43907    if test "x$PKGHANDLER_COMMAND" != x; then
43908      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43909    fi
43910  fi
43911
43912      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43913    fi
43914
43915    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43916      OPENWIN_HOME="/usr/openwin"
43917      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43918      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43919          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43920          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43921          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43922    fi
43923
43924    ac_ext=c
43925ac_cpp='$CPP $CPPFLAGS'
43926ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43927ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43928ac_compiler_gnu=$ac_cv_c_compiler_gnu
43929
43930    OLD_CFLAGS="$CFLAGS"
43931    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43932
43933    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43934    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43935do :
43936  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43937ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43938          # include <X11/Xlib.h>
43939          # include <X11/Xutil.h>
43940
43941
43942"
43943if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43944  cat >>confdefs.h <<_ACEOF
43945#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43946_ACEOF
43947 X11_HEADERS_OK=yes
43948else
43949  X11_HEADERS_OK=no; break
43950fi
43951
43952done
43953
43954
43955    if test "x$X11_HEADERS_OK" = xno; then
43956
43957  # Print a helpful message on how to acquire the necessary build dependency.
43958  # x11 is the help tag: freetype, cups, pulse, alsa etc
43959  MISSING_DEPENDENCY=x11
43960
43961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43962    cygwin_help $MISSING_DEPENDENCY
43963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43964    msys_help $MISSING_DEPENDENCY
43965  else
43966    PKGHANDLER_COMMAND=
43967
43968    case $PKGHANDLER in
43969      apt-get)
43970        apt_help     $MISSING_DEPENDENCY ;;
43971      yum)
43972        yum_help     $MISSING_DEPENDENCY ;;
43973      port)
43974        port_help    $MISSING_DEPENDENCY ;;
43975      pkgutil)
43976        pkgutil_help $MISSING_DEPENDENCY ;;
43977      pkgadd)
43978        pkgadd_help  $MISSING_DEPENDENCY ;;
43979    esac
43980
43981    if test "x$PKGHANDLER_COMMAND" != x; then
43982      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43983    fi
43984  fi
43985
43986      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43987    fi
43988
43989    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43990    # defined in libawt_xawt.
43991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43992$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43993    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43994/* end confdefs.h.  */
43995#include <X11/extensions/Xrender.h>
43996int
43997main ()
43998{
43999XLinearGradient x;
44000  ;
44001  return 0;
44002}
44003_ACEOF
44004if ac_fn_c_try_compile "$LINENO"; then :
44005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44006$as_echo "yes" >&6; }
44007else
44008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44009$as_echo "no" >&6; }
44010         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44011fi
44012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44013
44014    CFLAGS="$OLD_CFLAGS"
44015    ac_ext=cpp
44016ac_cpp='$CXXCPP $CPPFLAGS'
44017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44020
44021  fi # X11_NOT_NEEDED
44022
44023
44024
44025
44026
44027
44028  ###############################################################################
44029  #
44030  # The common unix printing system cups is used to print from java.
44031  #
44032
44033# Check whether --with-cups was given.
44034if test "${with_cups+set}" = set; then :
44035  withval=$with_cups;
44036fi
44037
44038
44039# Check whether --with-cups-include was given.
44040if test "${with_cups_include+set}" = set; then :
44041  withval=$with_cups_include;
44042fi
44043
44044
44045  if test "x$CUPS_NOT_NEEDED" = xyes; then
44046    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44047      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44048$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44049    fi
44050    CUPS_CFLAGS=
44051  else
44052    CUPS_FOUND=no
44053
44054    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44055      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44056    fi
44057
44058    if test "x${with_cups}" != x; then
44059      CUPS_CFLAGS="-I${with_cups}/include"
44060      CUPS_FOUND=yes
44061    fi
44062    if test "x${with_cups_include}" != x; then
44063      CUPS_CFLAGS="-I${with_cups_include}"
44064      CUPS_FOUND=yes
44065    fi
44066    if test "x$CUPS_FOUND" = xno; then
44067
44068
44069  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44070    # Source the builddeps file again, to make sure it uses the latest variables!
44071    . $builddepsfile
44072    # Look for a target and build machine specific resource!
44073    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44074    if test "x$resource" = x; then
44075      # Ok, lets instead look for a target specific resource
44076      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44077    fi
44078    if test "x$resource" = x; then
44079      # Ok, lets instead look for a build specific resource
44080      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44081    fi
44082    if test "x$resource" = x; then
44083      # Ok, lets instead look for a generic resource
44084      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44085      resource=${builddep_cups}
44086    fi
44087    if test "x$resource" != x; then
44088      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44089$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44090      # If the resource in the builddeps.conf file is an existing directory,
44091      # for example /java/linux/cups
44092      if test -d ${resource}; then
44093        depdir=${resource}
44094      else
44095
44096  # cups is for example mymodule
44097  # $resource is for example libs/general/libmymod_1_2_3.zip
44098  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44099  # $with_builddeps_dir is for example /localhome/builddeps
44100  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44101  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44102  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44103  filename=`basename $resource`
44104  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44105  filebase=${filename%%.*}
44106  extension=${filename#*.}
44107  installdir=$with_builddeps_dir/$filebase
44108  if test ! -f $installdir/$filename.unpacked; then
44109    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44110$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44111    if test ! -d $installdir; then
44112      mkdir -p $installdir
44113    fi
44114    if test ! -d $installdir; then
44115      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44116    fi
44117    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44118    touch $tmpfile
44119    if test ! -f $tmpfile; then
44120      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44121    fi
44122
44123  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44124  # $tmpfile is the local file name for the downloaded file.
44125  VALID_TOOL=no
44126  if test "x$BDEPS_FTP" = xwget; then
44127    VALID_TOOL=yes
44128    wget -O $tmpfile $with_builddeps_server/$resource
44129  fi
44130  if test "x$BDEPS_FTP" = xlftp; then
44131    VALID_TOOL=yes
44132    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44133  fi
44134  if test "x$BDEPS_FTP" = xftp; then
44135    VALID_TOOL=yes
44136    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44137    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44138    FTPUSERPWD=${FTPSERVER%%@*}
44139    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44140      FTPUSER=${userpwd%%:*}
44141      FTPPWD=${userpwd#*@}
44142      FTPSERVER=${FTPSERVER#*@}
44143    else
44144      FTPUSER=ftp
44145      FTPPWD=ftp
44146    fi
44147    # the "pass" command does not work on some
44148    # ftp clients (read ftp.exe) but if it works,
44149    # passive mode is better!
44150    ( \
44151        echo "user $FTPUSER $FTPPWD"        ; \
44152        echo "pass"                         ; \
44153        echo "bin"                          ; \
44154        echo "get $FTPPATH $tmpfile"              ; \
44155    ) | ftp -in $FTPSERVER
44156  fi
44157  if test "x$VALID_TOOL" != xyes; then
44158    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44159  fi
44160
44161    mv $tmpfile $installdir/$filename
44162    if test ! -s $installdir/$filename; then
44163      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44164    fi
44165    case "$extension" in
44166      zip)  echo "Unzipping $installdir/$filename..."
44167        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44168        ;;
44169      tar.gz) echo "Untaring $installdir/$filename..."
44170        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44171        ;;
44172      tgz) echo "Untaring $installdir/$filename..."
44173        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44174        ;;
44175      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44176        ;;
44177    esac
44178  fi
44179  if test -f $installdir/$filename.unpacked; then
44180    depdir=$installdir
44181  fi
44182
44183      fi
44184      # Source the builddeps file again, because in the previous command, the depdir
44185      # was updated to point at the current build dependency install directory.
44186      . $builddepsfile
44187      # Now extract variables from the builddeps.conf files.
44188      theroot=${builddep_cups_ROOT}
44189      thecflags=${builddep_cups_CFLAGS}
44190      thelibs=${builddep_cups_LIBS}
44191      if test "x$depdir" = x; then
44192        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44193      fi
44194      CUPS=$depdir
44195      if test "x$theroot" != x; then
44196        CUPS="$theroot"
44197      fi
44198      if test "x$thecflags" != x; then
44199        CUPS_CFLAGS="$thecflags"
44200      fi
44201      if test "x$thelibs" != x; then
44202        CUPS_LIBS="$thelibs"
44203      fi
44204      CUPS_FOUND=yes
44205
44206    fi
44207
44208  fi
44209
44210    fi
44211    if test "x$CUPS_FOUND" = xno; then
44212      # Are the cups headers installed in the default /usr/include location?
44213      for ac_header in cups/cups.h cups/ppd.h
44214do :
44215  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44216ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44217if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44218  cat >>confdefs.h <<_ACEOF
44219#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44220_ACEOF
44221
44222            CUPS_FOUND=yes
44223            CUPS_CFLAGS=
44224            DEFAULT_CUPS=yes
44225
44226
44227fi
44228
44229done
44230
44231    fi
44232    if test "x$CUPS_FOUND" = xno; then
44233      # Getting nervous now? Lets poke around for standard Solaris third-party
44234      # package installation locations.
44235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44236$as_echo_n "checking for cups headers... " >&6; }
44237      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44238        # An SFW package seems to be installed!
44239        CUPS_FOUND=yes
44240        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44241      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44242        # A CSW package seems to be installed!
44243        CUPS_FOUND=yes
44244        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44245      fi
44246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44247$as_echo "$CUPS_FOUND" >&6; }
44248    fi
44249    if test "x$CUPS_FOUND" = xno; then
44250
44251  # Print a helpful message on how to acquire the necessary build dependency.
44252  # cups is the help tag: freetype, cups, pulse, alsa etc
44253  MISSING_DEPENDENCY=cups
44254
44255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44256    cygwin_help $MISSING_DEPENDENCY
44257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44258    msys_help $MISSING_DEPENDENCY
44259  else
44260    PKGHANDLER_COMMAND=
44261
44262    case $PKGHANDLER in
44263      apt-get)
44264        apt_help     $MISSING_DEPENDENCY ;;
44265      yum)
44266        yum_help     $MISSING_DEPENDENCY ;;
44267      port)
44268        port_help    $MISSING_DEPENDENCY ;;
44269      pkgutil)
44270        pkgutil_help $MISSING_DEPENDENCY ;;
44271      pkgadd)
44272        pkgadd_help  $MISSING_DEPENDENCY ;;
44273    esac
44274
44275    if test "x$PKGHANDLER_COMMAND" != x; then
44276      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44277    fi
44278  fi
44279
44280      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44281    fi
44282  fi
44283
44284
44285
44286
44287
44288
44289  ###############################################################################
44290  #
44291  # The ubiquitous freetype library is used to render fonts.
44292  #
44293
44294# Check whether --with-freetype was given.
44295if test "${with_freetype+set}" = set; then :
44296  withval=$with_freetype;
44297fi
44298
44299
44300# Check whether --with-freetype-include was given.
44301if test "${with_freetype_include+set}" = set; then :
44302  withval=$with_freetype_include;
44303fi
44304
44305
44306# Check whether --with-freetype-lib was given.
44307if test "${with_freetype_lib+set}" = set; then :
44308  withval=$with_freetype_lib;
44309fi
44310
44311
44312# Check whether --with-freetype-src was given.
44313if test "${with_freetype_src+set}" = set; then :
44314  withval=$with_freetype_src;
44315fi
44316
44317  # Check whether --enable-freetype-bundling was given.
44318if test "${enable_freetype_bundling+set}" = set; then :
44319  enableval=$enable_freetype_bundling;
44320fi
44321
44322
44323  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44324  FREETYPE_BASE_NAME=freetype
44325  FREETYPE_CFLAGS=
44326  FREETYPE_LIBS=
44327  FREETYPE_BUNDLE_LIB_PATH=
44328
44329  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44330    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44331      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44332$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44333    fi
44334    if test "x$enable_freetype_bundling" != x; then
44335      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44336$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44337    fi
44338  else
44339    # freetype is needed to build; go get it!
44340
44341    BUNDLE_FREETYPE="$enable_freetype_bundling"
44342
44343    if  test "x$with_freetype_src" != x; then
44344      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44345        # Try to build freetype if --with-freetype-src was given on Windows
44346
44347  FREETYPE_SRC_PATH="$with_freetype_src"
44348  BUILD_FREETYPE=yes
44349
44350  # Check if the freetype sources are acessible..
44351  if ! test -d $FREETYPE_SRC_PATH; then
44352    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44353$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44354    BUILD_FREETYPE=no
44355  fi
44356  # ..and contain a vc2010 project file
44357  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44358  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44360$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44361    BUILD_FREETYPE=no
44362  fi
44363  # Now check if configure found a version of 'msbuild.exe'
44364  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44365    { $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
44366$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;}
44367    BUILD_FREETYPE=no
44368  fi
44369
44370  # Ready to go..
44371  if test "x$BUILD_FREETYPE" = xyes; then
44372
44373    # msbuild requires trailing slashes for output directories
44374    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44375    freetype_lib_path_unix="$freetype_lib_path"
44376    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44377
44378  unix_path="$vcxproj_path"
44379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44380    windows_path=`$CYGPATH -m "$unix_path"`
44381    vcxproj_path="$windows_path"
44382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44383    windows_path=`cmd //c echo $unix_path`
44384    vcxproj_path="$windows_path"
44385  fi
44386
44387
44388  unix_path="$freetype_lib_path"
44389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44390    windows_path=`$CYGPATH -m "$unix_path"`
44391    freetype_lib_path="$windows_path"
44392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393    windows_path=`cmd //c echo $unix_path`
44394    freetype_lib_path="$windows_path"
44395  fi
44396
44397
44398  unix_path="$freetype_obj_path"
44399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44400    windows_path=`$CYGPATH -m "$unix_path"`
44401    freetype_obj_path="$windows_path"
44402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44403    windows_path=`cmd //c echo $unix_path`
44404    freetype_obj_path="$windows_path"
44405  fi
44406
44407    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44408      freetype_platform=x64
44409    else
44410      freetype_platform=win32
44411    fi
44412
44413    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44414    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44415    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44416    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44417    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44418$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44419
44420    # First we try to build the freetype.dll
44421    $ECHO -e "@echo off\n"\
44422	     "$MSBUILD $vcxproj_path "\
44423		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44424		       "/p:Configuration=\"Release Multithreaded\" "\
44425		       "/p:Platform=$freetype_platform "\
44426		       "/p:ConfigurationType=DynamicLibrary "\
44427		       "/p:TargetName=freetype "\
44428		       "/p:OutDir=\"$freetype_lib_path\" "\
44429		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44430    cmd /c freetype.bat
44431
44432    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44433      # If that succeeds we also build freetype.lib
44434      $ECHO -e "@echo off\n"\
44435	       "$MSBUILD $vcxproj_path "\
44436			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44437			 "/p:Configuration=\"Release Multithreaded\" "\
44438			 "/p:Platform=$freetype_platform "\
44439			 "/p:ConfigurationType=StaticLibrary "\
44440			 "/p:TargetName=freetype "\
44441			 "/p:OutDir=\"$freetype_lib_path\" "\
44442			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44443      cmd /c freetype.bat
44444
44445      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44446	# Once we build both, lib and dll, set freetype lib and include path appropriately
44447	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44448	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44449	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44450$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44451      else
44452	BUILD_FREETYPE=no
44453      fi
44454    else
44455      BUILD_FREETYPE=no
44456    fi
44457  fi
44458
44459        if test "x$BUILD_FREETYPE" = xyes; then
44460          # Okay, we built it. Check that it works.
44461
44462  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44463  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44464  METHOD="--with-freetype-src"
44465
44466  # Let's start with an optimistic view of the world :-)
44467  FOUND_FREETYPE=yes
44468
44469  # First look for the canonical freetype main include file ft2build.h.
44470  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44471    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44472    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44473    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44474      # Fail.
44475      FOUND_FREETYPE=no
44476    fi
44477  fi
44478
44479  if test "x$FOUND_FREETYPE" = xyes; then
44480    # Include file found, let's continue the sanity check.
44481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44483
44484    # Reset to default value
44485    FREETYPE_BASE_NAME=freetype
44486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44488      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44490        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44491        # for the .6 version explicitly.
44492        FREETYPE_BASE_NAME=freetype.6
44493        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44494        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44495$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44496      else
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44499        FOUND_FREETYPE=no
44500      fi
44501    else
44502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44503        # On Windows, we will need both .lib and .dll file.
44504        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44507          FOUND_FREETYPE=no
44508        fi
44509      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44510          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44511        # Found lib in isa dir, use that instead.
44512        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44513        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44514$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44515      fi
44516    fi
44517  fi
44518
44519  if test "x$FOUND_FREETYPE" = xyes; then
44520
44521  # Only process if variable expands to non-empty
44522
44523  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44525
44526  # Input might be given as Windows format, start by converting to
44527  # unix format.
44528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44529  new_path=`$CYGPATH -u "$path"`
44530
44531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44534  # "foo.exe" is OK but "foo" is an error.
44535  #
44536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44537  # It is also a way to make sure we got the proper file name for the real test later on.
44538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44539  if test "x$test_shortpath" = x; then
44540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44543  fi
44544
44545  # Call helper function which possibly converts this using DOS-style short mode.
44546  # If so, the updated path is stored in $new_path.
44547
44548  input_path="$new_path"
44549  # Check if we need to convert this using DOS-style short mode. If the path
44550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44551  # take no chances and rewrite it.
44552  # Note: m4 eats our [], so we need to use [ and ] instead.
44553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44554  if test "x$has_forbidden_chars" != x; then
44555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44559      # Going to short mode and back again did indeed matter. Since short mode is
44560      # case insensitive, let's make it lowercase to improve readability.
44561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44562      # Now convert it back to Unix-style (cygpath)
44563      input_path=`$CYGPATH -u "$shortmode_path"`
44564      new_path="$input_path"
44565    fi
44566  fi
44567
44568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44569  if test "x$test_cygdrive_prefix" = x; then
44570    # As a simple fix, exclude /usr/bin since it's not a real path.
44571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44573      # a path prefixed by /cygdrive for fixpath to work.
44574      new_path="$CYGWIN_ROOT_PATH$input_path"
44575    fi
44576  fi
44577
44578
44579  if test "x$path" != "x$new_path"; then
44580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44583  fi
44584
44585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44586
44587  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44588  has_colon=`$ECHO $path | $GREP ^.:`
44589  new_path="$path"
44590  if test "x$has_colon" = x; then
44591    # Not in mixed or Windows style, start by that.
44592    new_path=`cmd //c echo $path`
44593  fi
44594
44595
44596  input_path="$new_path"
44597  # Check if we need to convert this using DOS-style short mode. If the path
44598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44599  # take no chances and rewrite it.
44600  # Note: m4 eats our [], so we need to use [ and ] instead.
44601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44602  if test "x$has_forbidden_chars" != x; then
44603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44605  fi
44606
44607
44608  windows_path="$new_path"
44609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44610    unix_path=`$CYGPATH -u "$windows_path"`
44611    new_path="$unix_path"
44612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44614    new_path="$unix_path"
44615  fi
44616
44617  if test "x$path" != "x$new_path"; then
44618    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44621  fi
44622
44623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44625
44626    else
44627      # We're on a unix platform. Hooray! :)
44628      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44629      has_space=`$ECHO "$path" | $GREP " "`
44630      if test "x$has_space" != x; then
44631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44634      fi
44635
44636      # Use eval to expand a potential ~
44637      eval path="$path"
44638      if test ! -f "$path" && test ! -d "$path"; then
44639        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44640      fi
44641
44642      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44643    fi
44644  fi
44645
44646
44647  # Only process if variable expands to non-empty
44648
44649  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44651
44652  # Input might be given as Windows format, start by converting to
44653  # unix format.
44654  path="$POTENTIAL_FREETYPE_LIB_PATH"
44655  new_path=`$CYGPATH -u "$path"`
44656
44657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44660  # "foo.exe" is OK but "foo" is an error.
44661  #
44662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44663  # It is also a way to make sure we got the proper file name for the real test later on.
44664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44665  if test "x$test_shortpath" = x; then
44666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44668    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44669  fi
44670
44671  # Call helper function which possibly converts this using DOS-style short mode.
44672  # If so, the updated path is stored in $new_path.
44673
44674  input_path="$new_path"
44675  # Check if we need to convert this using DOS-style short mode. If the path
44676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44677  # take no chances and rewrite it.
44678  # Note: m4 eats our [], so we need to use [ and ] instead.
44679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44680  if test "x$has_forbidden_chars" != x; then
44681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44685      # Going to short mode and back again did indeed matter. Since short mode is
44686      # case insensitive, let's make it lowercase to improve readability.
44687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44688      # Now convert it back to Unix-style (cygpath)
44689      input_path=`$CYGPATH -u "$shortmode_path"`
44690      new_path="$input_path"
44691    fi
44692  fi
44693
44694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44695  if test "x$test_cygdrive_prefix" = x; then
44696    # As a simple fix, exclude /usr/bin since it's not a real path.
44697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44699      # a path prefixed by /cygdrive for fixpath to work.
44700      new_path="$CYGWIN_ROOT_PATH$input_path"
44701    fi
44702  fi
44703
44704
44705  if test "x$path" != "x$new_path"; then
44706    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44709  fi
44710
44711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44712
44713  path="$POTENTIAL_FREETYPE_LIB_PATH"
44714  has_colon=`$ECHO $path | $GREP ^.:`
44715  new_path="$path"
44716  if test "x$has_colon" = x; then
44717    # Not in mixed or Windows style, start by that.
44718    new_path=`cmd //c echo $path`
44719  fi
44720
44721
44722  input_path="$new_path"
44723  # Check if we need to convert this using DOS-style short mode. If the path
44724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44725  # take no chances and rewrite it.
44726  # Note: m4 eats our [], so we need to use [ and ] instead.
44727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44728  if test "x$has_forbidden_chars" != x; then
44729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44731  fi
44732
44733
44734  windows_path="$new_path"
44735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44736    unix_path=`$CYGPATH -u "$windows_path"`
44737    new_path="$unix_path"
44738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44740    new_path="$unix_path"
44741  fi
44742
44743  if test "x$path" != "x$new_path"; then
44744    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44747  fi
44748
44749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44751
44752    else
44753      # We're on a unix platform. Hooray! :)
44754      path="$POTENTIAL_FREETYPE_LIB_PATH"
44755      has_space=`$ECHO "$path" | $GREP " "`
44756      if test "x$has_space" != x; then
44757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44760      fi
44761
44762      # Use eval to expand a potential ~
44763      eval path="$path"
44764      if test ! -f "$path" && test ! -d "$path"; then
44765        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44766      fi
44767
44768      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44769    fi
44770  fi
44771
44772
44773    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44775$as_echo_n "checking for freetype includes... " >&6; }
44776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44777$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44778    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44780$as_echo_n "checking for freetype libraries... " >&6; }
44781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44782$as_echo "$FREETYPE_LIB_PATH" >&6; }
44783  fi
44784
44785          if test "x$FOUND_FREETYPE" != xyes; then
44786            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44787          fi
44788        else
44789          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44790$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44791          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44792        fi
44793      else
44794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44795$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44796      fi
44797    fi
44798
44799    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44800      # User has specified settings
44801
44802      if test "x$BUNDLE_FREETYPE" = x; then
44803        # If not specified, default is to bundle freetype
44804        BUNDLE_FREETYPE=yes
44805      fi
44806
44807      if test "x$with_freetype" != x; then
44808        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44809        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44810      fi
44811
44812      # Allow --with-freetype-lib and --with-freetype-include to override
44813      if test "x$with_freetype_include" != x; then
44814        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44815      fi
44816      if test "x$with_freetype_lib" != x; then
44817        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44818      fi
44819
44820      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44821        # Okay, we got it. Check that it works.
44822
44823  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44824  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44825  METHOD="--with-freetype"
44826
44827  # Let's start with an optimistic view of the world :-)
44828  FOUND_FREETYPE=yes
44829
44830  # First look for the canonical freetype main include file ft2build.h.
44831  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44832    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44833    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44834    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44835      # Fail.
44836      FOUND_FREETYPE=no
44837    fi
44838  fi
44839
44840  if test "x$FOUND_FREETYPE" = xyes; then
44841    # Include file found, let's continue the sanity check.
44842    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44843$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44844
44845    # Reset to default value
44846    FREETYPE_BASE_NAME=freetype
44847    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44848    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44849      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44850          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44851        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44852        # for the .6 version explicitly.
44853        FREETYPE_BASE_NAME=freetype.6
44854        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44855        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44856$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44857      else
44858        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44860        FOUND_FREETYPE=no
44861      fi
44862    else
44863      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44864        # On Windows, we will need both .lib and .dll file.
44865        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44866          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44867$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44868          FOUND_FREETYPE=no
44869        fi
44870      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44871          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44872        # Found lib in isa dir, use that instead.
44873        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44874        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44875$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44876      fi
44877    fi
44878  fi
44879
44880  if test "x$FOUND_FREETYPE" = xyes; then
44881
44882  # Only process if variable expands to non-empty
44883
44884  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44886
44887  # Input might be given as Windows format, start by converting to
44888  # unix format.
44889  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44890  new_path=`$CYGPATH -u "$path"`
44891
44892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44895  # "foo.exe" is OK but "foo" is an error.
44896  #
44897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44898  # It is also a way to make sure we got the proper file name for the real test later on.
44899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44900  if test "x$test_shortpath" = x; then
44901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44903    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44904  fi
44905
44906  # Call helper function which possibly converts this using DOS-style short mode.
44907  # If so, the updated path is stored in $new_path.
44908
44909  input_path="$new_path"
44910  # Check if we need to convert this using DOS-style short mode. If the path
44911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44912  # take no chances and rewrite it.
44913  # Note: m4 eats our [], so we need to use [ and ] instead.
44914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44915  if test "x$has_forbidden_chars" != x; then
44916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44920      # Going to short mode and back again did indeed matter. Since short mode is
44921      # case insensitive, let's make it lowercase to improve readability.
44922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44923      # Now convert it back to Unix-style (cygpath)
44924      input_path=`$CYGPATH -u "$shortmode_path"`
44925      new_path="$input_path"
44926    fi
44927  fi
44928
44929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44930  if test "x$test_cygdrive_prefix" = x; then
44931    # As a simple fix, exclude /usr/bin since it's not a real path.
44932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44934      # a path prefixed by /cygdrive for fixpath to work.
44935      new_path="$CYGWIN_ROOT_PATH$input_path"
44936    fi
44937  fi
44938
44939
44940  if test "x$path" != "x$new_path"; then
44941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44944  fi
44945
44946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44947
44948  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44949  has_colon=`$ECHO $path | $GREP ^.:`
44950  new_path="$path"
44951  if test "x$has_colon" = x; then
44952    # Not in mixed or Windows style, start by that.
44953    new_path=`cmd //c echo $path`
44954  fi
44955
44956
44957  input_path="$new_path"
44958  # Check if we need to convert this using DOS-style short mode. If the path
44959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44960  # take no chances and rewrite it.
44961  # Note: m4 eats our [], so we need to use [ and ] instead.
44962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44963  if test "x$has_forbidden_chars" != x; then
44964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44966  fi
44967
44968
44969  windows_path="$new_path"
44970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44971    unix_path=`$CYGPATH -u "$windows_path"`
44972    new_path="$unix_path"
44973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44975    new_path="$unix_path"
44976  fi
44977
44978  if test "x$path" != "x$new_path"; then
44979    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44982  fi
44983
44984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44986
44987    else
44988      # We're on a unix platform. Hooray! :)
44989      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44990      has_space=`$ECHO "$path" | $GREP " "`
44991      if test "x$has_space" != x; then
44992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44995      fi
44996
44997      # Use eval to expand a potential ~
44998      eval path="$path"
44999      if test ! -f "$path" && test ! -d "$path"; then
45000        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45001      fi
45002
45003      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45004    fi
45005  fi
45006
45007
45008  # Only process if variable expands to non-empty
45009
45010  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45012
45013  # Input might be given as Windows format, start by converting to
45014  # unix format.
45015  path="$POTENTIAL_FREETYPE_LIB_PATH"
45016  new_path=`$CYGPATH -u "$path"`
45017
45018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45021  # "foo.exe" is OK but "foo" is an error.
45022  #
45023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45024  # It is also a way to make sure we got the proper file name for the real test later on.
45025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45026  if test "x$test_shortpath" = x; then
45027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45030  fi
45031
45032  # Call helper function which possibly converts this using DOS-style short mode.
45033  # If so, the updated path is stored in $new_path.
45034
45035  input_path="$new_path"
45036  # Check if we need to convert this using DOS-style short mode. If the path
45037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45038  # take no chances and rewrite it.
45039  # Note: m4 eats our [], so we need to use [ and ] instead.
45040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45041  if test "x$has_forbidden_chars" != x; then
45042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45046      # Going to short mode and back again did indeed matter. Since short mode is
45047      # case insensitive, let's make it lowercase to improve readability.
45048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45049      # Now convert it back to Unix-style (cygpath)
45050      input_path=`$CYGPATH -u "$shortmode_path"`
45051      new_path="$input_path"
45052    fi
45053  fi
45054
45055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45056  if test "x$test_cygdrive_prefix" = x; then
45057    # As a simple fix, exclude /usr/bin since it's not a real path.
45058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45060      # a path prefixed by /cygdrive for fixpath to work.
45061      new_path="$CYGWIN_ROOT_PATH$input_path"
45062    fi
45063  fi
45064
45065
45066  if test "x$path" != "x$new_path"; then
45067    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45070  fi
45071
45072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45073
45074  path="$POTENTIAL_FREETYPE_LIB_PATH"
45075  has_colon=`$ECHO $path | $GREP ^.:`
45076  new_path="$path"
45077  if test "x$has_colon" = x; then
45078    # Not in mixed or Windows style, start by that.
45079    new_path=`cmd //c echo $path`
45080  fi
45081
45082
45083  input_path="$new_path"
45084  # Check if we need to convert this using DOS-style short mode. If the path
45085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45086  # take no chances and rewrite it.
45087  # Note: m4 eats our [], so we need to use [ and ] instead.
45088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45089  if test "x$has_forbidden_chars" != x; then
45090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45092  fi
45093
45094
45095  windows_path="$new_path"
45096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45097    unix_path=`$CYGPATH -u "$windows_path"`
45098    new_path="$unix_path"
45099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45101    new_path="$unix_path"
45102  fi
45103
45104  if test "x$path" != "x$new_path"; then
45105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45108  fi
45109
45110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45112
45113    else
45114      # We're on a unix platform. Hooray! :)
45115      path="$POTENTIAL_FREETYPE_LIB_PATH"
45116      has_space=`$ECHO "$path" | $GREP " "`
45117      if test "x$has_space" != x; then
45118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45121      fi
45122
45123      # Use eval to expand a potential ~
45124      eval path="$path"
45125      if test ! -f "$path" && test ! -d "$path"; then
45126        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45127      fi
45128
45129      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45130    fi
45131  fi
45132
45133
45134    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45136$as_echo_n "checking for freetype includes... " >&6; }
45137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45138$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45139    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45141$as_echo_n "checking for freetype libraries... " >&6; }
45142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45143$as_echo "$FREETYPE_LIB_PATH" >&6; }
45144  fi
45145
45146        if test "x$FOUND_FREETYPE" != xyes; then
45147          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45148        fi
45149      else
45150        # User specified only one of lib or include. This is an error.
45151        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45152          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45153$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45154          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45155        else
45156          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45157$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45158          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45159        fi
45160      fi
45161    else
45162      # User did not specify settings, but we need freetype. Try to locate it.
45163
45164      if test "x$BUNDLE_FREETYPE" = x; then
45165        # If not specified, default is to bundle freetype only on windows
45166        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45167          BUNDLE_FREETYPE=yes
45168        else
45169          BUNDLE_FREETYPE=no
45170        fi
45171      fi
45172
45173      if test "x$FOUND_FREETYPE" != xyes; then
45174        # Check builddeps
45175
45176
45177  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45178    # Source the builddeps file again, to make sure it uses the latest variables!
45179    . $builddepsfile
45180    # Look for a target and build machine specific resource!
45181    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45182    if test "x$resource" = x; then
45183      # Ok, lets instead look for a target specific resource
45184      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45185    fi
45186    if test "x$resource" = x; then
45187      # Ok, lets instead look for a build specific resource
45188      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45189    fi
45190    if test "x$resource" = x; then
45191      # Ok, lets instead look for a generic resource
45192      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45193      resource=${builddep_freetype2}
45194    fi
45195    if test "x$resource" != x; then
45196      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45197$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45198      # If the resource in the builddeps.conf file is an existing directory,
45199      # for example /java/linux/cups
45200      if test -d ${resource}; then
45201        depdir=${resource}
45202      else
45203
45204  # freetype2 is for example mymodule
45205  # $resource is for example libs/general/libmymod_1_2_3.zip
45206  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45207  # $with_builddeps_dir is for example /localhome/builddeps
45208  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45209  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45210  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45211  filename=`basename $resource`
45212  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45213  filebase=${filename%%.*}
45214  extension=${filename#*.}
45215  installdir=$with_builddeps_dir/$filebase
45216  if test ! -f $installdir/$filename.unpacked; then
45217    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45218$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45219    if test ! -d $installdir; then
45220      mkdir -p $installdir
45221    fi
45222    if test ! -d $installdir; then
45223      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45224    fi
45225    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45226    touch $tmpfile
45227    if test ! -f $tmpfile; then
45228      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45229    fi
45230
45231  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45232  # $tmpfile is the local file name for the downloaded file.
45233  VALID_TOOL=no
45234  if test "x$BDEPS_FTP" = xwget; then
45235    VALID_TOOL=yes
45236    wget -O $tmpfile $with_builddeps_server/$resource
45237  fi
45238  if test "x$BDEPS_FTP" = xlftp; then
45239    VALID_TOOL=yes
45240    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45241  fi
45242  if test "x$BDEPS_FTP" = xftp; then
45243    VALID_TOOL=yes
45244    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45245    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45246    FTPUSERPWD=${FTPSERVER%%@*}
45247    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45248      FTPUSER=${userpwd%%:*}
45249      FTPPWD=${userpwd#*@}
45250      FTPSERVER=${FTPSERVER#*@}
45251    else
45252      FTPUSER=ftp
45253      FTPPWD=ftp
45254    fi
45255    # the "pass" command does not work on some
45256    # ftp clients (read ftp.exe) but if it works,
45257    # passive mode is better!
45258    ( \
45259        echo "user $FTPUSER $FTPPWD"        ; \
45260        echo "pass"                         ; \
45261        echo "bin"                          ; \
45262        echo "get $FTPPATH $tmpfile"              ; \
45263    ) | ftp -in $FTPSERVER
45264  fi
45265  if test "x$VALID_TOOL" != xyes; then
45266    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45267  fi
45268
45269    mv $tmpfile $installdir/$filename
45270    if test ! -s $installdir/$filename; then
45271      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45272    fi
45273    case "$extension" in
45274      zip)  echo "Unzipping $installdir/$filename..."
45275        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45276        ;;
45277      tar.gz) echo "Untaring $installdir/$filename..."
45278        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45279        ;;
45280      tgz) echo "Untaring $installdir/$filename..."
45281        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45282        ;;
45283      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45284        ;;
45285    esac
45286  fi
45287  if test -f $installdir/$filename.unpacked; then
45288    depdir=$installdir
45289  fi
45290
45291      fi
45292      # Source the builddeps file again, because in the previous command, the depdir
45293      # was updated to point at the current build dependency install directory.
45294      . $builddepsfile
45295      # Now extract variables from the builddeps.conf files.
45296      theroot=${builddep_freetype2_ROOT}
45297      thecflags=${builddep_freetype2_CFLAGS}
45298      thelibs=${builddep_freetype2_LIBS}
45299      if test "x$depdir" = x; then
45300        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45301      fi
45302      FREETYPE=$depdir
45303      if test "x$theroot" != x; then
45304        FREETYPE="$theroot"
45305      fi
45306      if test "x$thecflags" != x; then
45307        FREETYPE_CFLAGS="$thecflags"
45308      fi
45309      if test "x$thelibs" != x; then
45310        FREETYPE_LIBS="$thelibs"
45311      fi
45312      FOUND_FREETYPE=yes
45313      else FOUND_FREETYPE=no
45314
45315    fi
45316    else FOUND_FREETYPE=no
45317
45318  fi
45319
45320        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45321        if test "x$FOUND_FREETYPE" = xyes; then
45322          if test "x$BUNDLE_FREETYPE" = xyes; then
45323            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45324$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45325            FOUND_FREETYPE=no
45326          else
45327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45328$as_echo_n "checking for freetype... " >&6; }
45329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45330$as_echo "yes (using builddeps)" >&6; }
45331          fi
45332        fi
45333      fi
45334
45335      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45336      if test "x$SYSROOT" = x; then
45337        if test "x$FOUND_FREETYPE" != xyes; then
45338          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45339          if test "x$PKG_CONFIG" != x; then
45340
45341pkg_failed=no
45342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45343$as_echo_n "checking for FREETYPE... " >&6; }
45344
45345if test -n "$FREETYPE_CFLAGS"; then
45346    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45347 elif test -n "$PKG_CONFIG"; then
45348    if test -n "$PKG_CONFIG" && \
45349    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45350  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45351  ac_status=$?
45352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45353  test $ac_status = 0; }; then
45354  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45355else
45356  pkg_failed=yes
45357fi
45358 else
45359    pkg_failed=untried
45360fi
45361if test -n "$FREETYPE_LIBS"; then
45362    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45363 elif test -n "$PKG_CONFIG"; then
45364    if test -n "$PKG_CONFIG" && \
45365    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45366  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45367  ac_status=$?
45368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45369  test $ac_status = 0; }; then
45370  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45371else
45372  pkg_failed=yes
45373fi
45374 else
45375    pkg_failed=untried
45376fi
45377
45378
45379
45380if test $pkg_failed = yes; then
45381
45382if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45383        _pkg_short_errors_supported=yes
45384else
45385        _pkg_short_errors_supported=no
45386fi
45387        if test $_pkg_short_errors_supported = yes; then
45388	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45389        else
45390	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45391        fi
45392	# Put the nasty error message in config.log where it belongs
45393	echo "$FREETYPE_PKG_ERRORS" >&5
45394
45395	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45396$as_echo "no" >&6; }
45397                FOUND_FREETYPE=no
45398elif test $pkg_failed = untried; then
45399	FOUND_FREETYPE=no
45400else
45401	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45402	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45404$as_echo "yes" >&6; }
45405	FOUND_FREETYPE=yes
45406fi
45407            if test "x$FOUND_FREETYPE" = xyes; then
45408              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45409              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45410              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45411              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45412                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45413              fi
45414              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45415              if test "x$BUNDLE_FREETYPE" = xyes; then
45416                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45417$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45418                FOUND_FREETYPE=no
45419              else
45420                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45421$as_echo_n "checking for freetype... " >&6; }
45422                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45423$as_echo "yes (using pkg-config)" >&6; }
45424              fi
45425            fi
45426          fi
45427        fi
45428      fi
45429
45430      if test "x$FOUND_FREETYPE" != xyes; then
45431        # Check in well-known locations
45432        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45433          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45434
45435  windows_path="$FREETYPE_BASE_DIR"
45436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45437    unix_path=`$CYGPATH -u "$windows_path"`
45438    FREETYPE_BASE_DIR="$unix_path"
45439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45441    FREETYPE_BASE_DIR="$unix_path"
45442  fi
45443
45444
45445  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45446  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45447  METHOD="well-known location"
45448
45449  # Let's start with an optimistic view of the world :-)
45450  FOUND_FREETYPE=yes
45451
45452  # First look for the canonical freetype main include file ft2build.h.
45453  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45454    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45455    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45456    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45457      # Fail.
45458      FOUND_FREETYPE=no
45459    fi
45460  fi
45461
45462  if test "x$FOUND_FREETYPE" = xyes; then
45463    # Include file found, let's continue the sanity check.
45464    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45465$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45466
45467    # Reset to default value
45468    FREETYPE_BASE_NAME=freetype
45469    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45470    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45471      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45472          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45473        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45474        # for the .6 version explicitly.
45475        FREETYPE_BASE_NAME=freetype.6
45476        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45477        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45478$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45479      else
45480        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45482        FOUND_FREETYPE=no
45483      fi
45484    else
45485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45486        # On Windows, we will need both .lib and .dll file.
45487        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45488          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45490          FOUND_FREETYPE=no
45491        fi
45492      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45493          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45494        # Found lib in isa dir, use that instead.
45495        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45496        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45497$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45498      fi
45499    fi
45500  fi
45501
45502  if test "x$FOUND_FREETYPE" = xyes; then
45503
45504  # Only process if variable expands to non-empty
45505
45506  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45508
45509  # Input might be given as Windows format, start by converting to
45510  # unix format.
45511  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45512  new_path=`$CYGPATH -u "$path"`
45513
45514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45517  # "foo.exe" is OK but "foo" is an error.
45518  #
45519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45520  # It is also a way to make sure we got the proper file name for the real test later on.
45521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45522  if test "x$test_shortpath" = x; then
45523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45526  fi
45527
45528  # Call helper function which possibly converts this using DOS-style short mode.
45529  # If so, the updated path is stored in $new_path.
45530
45531  input_path="$new_path"
45532  # Check if we need to convert this using DOS-style short mode. If the path
45533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45534  # take no chances and rewrite it.
45535  # Note: m4 eats our [], so we need to use [ and ] instead.
45536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45537  if test "x$has_forbidden_chars" != x; then
45538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45542      # Going to short mode and back again did indeed matter. Since short mode is
45543      # case insensitive, let's make it lowercase to improve readability.
45544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45545      # Now convert it back to Unix-style (cygpath)
45546      input_path=`$CYGPATH -u "$shortmode_path"`
45547      new_path="$input_path"
45548    fi
45549  fi
45550
45551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45552  if test "x$test_cygdrive_prefix" = x; then
45553    # As a simple fix, exclude /usr/bin since it's not a real path.
45554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45556      # a path prefixed by /cygdrive for fixpath to work.
45557      new_path="$CYGWIN_ROOT_PATH$input_path"
45558    fi
45559  fi
45560
45561
45562  if test "x$path" != "x$new_path"; then
45563    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45566  fi
45567
45568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45569
45570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45571  has_colon=`$ECHO $path | $GREP ^.:`
45572  new_path="$path"
45573  if test "x$has_colon" = x; then
45574    # Not in mixed or Windows style, start by that.
45575    new_path=`cmd //c echo $path`
45576  fi
45577
45578
45579  input_path="$new_path"
45580  # Check if we need to convert this using DOS-style short mode. If the path
45581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45582  # take no chances and rewrite it.
45583  # Note: m4 eats our [], so we need to use [ and ] instead.
45584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45585  if test "x$has_forbidden_chars" != x; then
45586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45588  fi
45589
45590
45591  windows_path="$new_path"
45592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45593    unix_path=`$CYGPATH -u "$windows_path"`
45594    new_path="$unix_path"
45595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45597    new_path="$unix_path"
45598  fi
45599
45600  if test "x$path" != "x$new_path"; then
45601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45604  fi
45605
45606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45608
45609    else
45610      # We're on a unix platform. Hooray! :)
45611      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45612      has_space=`$ECHO "$path" | $GREP " "`
45613      if test "x$has_space" != x; then
45614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45617      fi
45618
45619      # Use eval to expand a potential ~
45620      eval path="$path"
45621      if test ! -f "$path" && test ! -d "$path"; then
45622        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45623      fi
45624
45625      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45626    fi
45627  fi
45628
45629
45630  # Only process if variable expands to non-empty
45631
45632  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45634
45635  # Input might be given as Windows format, start by converting to
45636  # unix format.
45637  path="$POTENTIAL_FREETYPE_LIB_PATH"
45638  new_path=`$CYGPATH -u "$path"`
45639
45640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45643  # "foo.exe" is OK but "foo" is an error.
45644  #
45645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45646  # It is also a way to make sure we got the proper file name for the real test later on.
45647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45648  if test "x$test_shortpath" = x; then
45649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45652  fi
45653
45654  # Call helper function which possibly converts this using DOS-style short mode.
45655  # If so, the updated path is stored in $new_path.
45656
45657  input_path="$new_path"
45658  # Check if we need to convert this using DOS-style short mode. If the path
45659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45660  # take no chances and rewrite it.
45661  # Note: m4 eats our [], so we need to use [ and ] instead.
45662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45663  if test "x$has_forbidden_chars" != x; then
45664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45668      # Going to short mode and back again did indeed matter. Since short mode is
45669      # case insensitive, let's make it lowercase to improve readability.
45670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45671      # Now convert it back to Unix-style (cygpath)
45672      input_path=`$CYGPATH -u "$shortmode_path"`
45673      new_path="$input_path"
45674    fi
45675  fi
45676
45677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45678  if test "x$test_cygdrive_prefix" = x; then
45679    # As a simple fix, exclude /usr/bin since it's not a real path.
45680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45682      # a path prefixed by /cygdrive for fixpath to work.
45683      new_path="$CYGWIN_ROOT_PATH$input_path"
45684    fi
45685  fi
45686
45687
45688  if test "x$path" != "x$new_path"; then
45689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45692  fi
45693
45694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45695
45696  path="$POTENTIAL_FREETYPE_LIB_PATH"
45697  has_colon=`$ECHO $path | $GREP ^.:`
45698  new_path="$path"
45699  if test "x$has_colon" = x; then
45700    # Not in mixed or Windows style, start by that.
45701    new_path=`cmd //c echo $path`
45702  fi
45703
45704
45705  input_path="$new_path"
45706  # Check if we need to convert this using DOS-style short mode. If the path
45707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45708  # take no chances and rewrite it.
45709  # Note: m4 eats our [], so we need to use [ and ] instead.
45710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45711  if test "x$has_forbidden_chars" != x; then
45712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45714  fi
45715
45716
45717  windows_path="$new_path"
45718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719    unix_path=`$CYGPATH -u "$windows_path"`
45720    new_path="$unix_path"
45721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45723    new_path="$unix_path"
45724  fi
45725
45726  if test "x$path" != "x$new_path"; then
45727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45730  fi
45731
45732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45734
45735    else
45736      # We're on a unix platform. Hooray! :)
45737      path="$POTENTIAL_FREETYPE_LIB_PATH"
45738      has_space=`$ECHO "$path" | $GREP " "`
45739      if test "x$has_space" != x; then
45740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45743      fi
45744
45745      # Use eval to expand a potential ~
45746      eval path="$path"
45747      if test ! -f "$path" && test ! -d "$path"; then
45748        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45749      fi
45750
45751      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45752    fi
45753  fi
45754
45755
45756    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45758$as_echo_n "checking for freetype includes... " >&6; }
45759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45760$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45761    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45763$as_echo_n "checking for freetype libraries... " >&6; }
45764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45765$as_echo "$FREETYPE_LIB_PATH" >&6; }
45766  fi
45767
45768          if test "x$FOUND_FREETYPE" != xyes; then
45769            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45770
45771  windows_path="$FREETYPE_BASE_DIR"
45772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45773    unix_path=`$CYGPATH -u "$windows_path"`
45774    FREETYPE_BASE_DIR="$unix_path"
45775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45777    FREETYPE_BASE_DIR="$unix_path"
45778  fi
45779
45780
45781  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45782  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45783  METHOD="well-known location"
45784
45785  # Let's start with an optimistic view of the world :-)
45786  FOUND_FREETYPE=yes
45787
45788  # First look for the canonical freetype main include file ft2build.h.
45789  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45790    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45791    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45792    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45793      # Fail.
45794      FOUND_FREETYPE=no
45795    fi
45796  fi
45797
45798  if test "x$FOUND_FREETYPE" = xyes; then
45799    # Include file found, let's continue the sanity check.
45800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45801$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45802
45803    # Reset to default value
45804    FREETYPE_BASE_NAME=freetype
45805    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45806    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45807      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45808          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45809        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45810        # for the .6 version explicitly.
45811        FREETYPE_BASE_NAME=freetype.6
45812        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45813        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45814$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45815      else
45816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45817$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45818        FOUND_FREETYPE=no
45819      fi
45820    else
45821      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45822        # On Windows, we will need both .lib and .dll file.
45823        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45824          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45826          FOUND_FREETYPE=no
45827        fi
45828      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45829          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45830        # Found lib in isa dir, use that instead.
45831        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45832        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45833$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45834      fi
45835    fi
45836  fi
45837
45838  if test "x$FOUND_FREETYPE" = xyes; then
45839
45840  # Only process if variable expands to non-empty
45841
45842  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45844
45845  # Input might be given as Windows format, start by converting to
45846  # unix format.
45847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45848  new_path=`$CYGPATH -u "$path"`
45849
45850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45853  # "foo.exe" is OK but "foo" is an error.
45854  #
45855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45856  # It is also a way to make sure we got the proper file name for the real test later on.
45857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45858  if test "x$test_shortpath" = x; then
45859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45861    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45862  fi
45863
45864  # Call helper function which possibly converts this using DOS-style short mode.
45865  # If so, the updated path is stored in $new_path.
45866
45867  input_path="$new_path"
45868  # Check if we need to convert this using DOS-style short mode. If the path
45869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45870  # take no chances and rewrite it.
45871  # Note: m4 eats our [], so we need to use [ and ] instead.
45872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45873  if test "x$has_forbidden_chars" != x; then
45874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45878      # Going to short mode and back again did indeed matter. Since short mode is
45879      # case insensitive, let's make it lowercase to improve readability.
45880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45881      # Now convert it back to Unix-style (cygpath)
45882      input_path=`$CYGPATH -u "$shortmode_path"`
45883      new_path="$input_path"
45884    fi
45885  fi
45886
45887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45888  if test "x$test_cygdrive_prefix" = x; then
45889    # As a simple fix, exclude /usr/bin since it's not a real path.
45890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45892      # a path prefixed by /cygdrive for fixpath to work.
45893      new_path="$CYGWIN_ROOT_PATH$input_path"
45894    fi
45895  fi
45896
45897
45898  if test "x$path" != "x$new_path"; then
45899    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45901$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45902  fi
45903
45904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45905
45906  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45907  has_colon=`$ECHO $path | $GREP ^.:`
45908  new_path="$path"
45909  if test "x$has_colon" = x; then
45910    # Not in mixed or Windows style, start by that.
45911    new_path=`cmd //c echo $path`
45912  fi
45913
45914
45915  input_path="$new_path"
45916  # Check if we need to convert this using DOS-style short mode. If the path
45917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45918  # take no chances and rewrite it.
45919  # Note: m4 eats our [], so we need to use [ and ] instead.
45920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45921  if test "x$has_forbidden_chars" != x; then
45922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45924  fi
45925
45926
45927  windows_path="$new_path"
45928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45929    unix_path=`$CYGPATH -u "$windows_path"`
45930    new_path="$unix_path"
45931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45933    new_path="$unix_path"
45934  fi
45935
45936  if test "x$path" != "x$new_path"; then
45937    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45939$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45940  fi
45941
45942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45944
45945    else
45946      # We're on a unix platform. Hooray! :)
45947      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45948      has_space=`$ECHO "$path" | $GREP " "`
45949      if test "x$has_space" != x; then
45950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45951$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45953      fi
45954
45955      # Use eval to expand a potential ~
45956      eval path="$path"
45957      if test ! -f "$path" && test ! -d "$path"; then
45958        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45959      fi
45960
45961      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45962    fi
45963  fi
45964
45965
45966  # Only process if variable expands to non-empty
45967
45968  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45970
45971  # Input might be given as Windows format, start by converting to
45972  # unix format.
45973  path="$POTENTIAL_FREETYPE_LIB_PATH"
45974  new_path=`$CYGPATH -u "$path"`
45975
45976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45979  # "foo.exe" is OK but "foo" is an error.
45980  #
45981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45982  # It is also a way to make sure we got the proper file name for the real test later on.
45983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45984  if test "x$test_shortpath" = x; then
45985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45987    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45988  fi
45989
45990  # Call helper function which possibly converts this using DOS-style short mode.
45991  # If so, the updated path is stored in $new_path.
45992
45993  input_path="$new_path"
45994  # Check if we need to convert this using DOS-style short mode. If the path
45995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45996  # take no chances and rewrite it.
45997  # Note: m4 eats our [], so we need to use [ and ] instead.
45998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45999  if test "x$has_forbidden_chars" != x; then
46000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46004      # Going to short mode and back again did indeed matter. Since short mode is
46005      # case insensitive, let's make it lowercase to improve readability.
46006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46007      # Now convert it back to Unix-style (cygpath)
46008      input_path=`$CYGPATH -u "$shortmode_path"`
46009      new_path="$input_path"
46010    fi
46011  fi
46012
46013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46014  if test "x$test_cygdrive_prefix" = x; then
46015    # As a simple fix, exclude /usr/bin since it's not a real path.
46016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46018      # a path prefixed by /cygdrive for fixpath to work.
46019      new_path="$CYGWIN_ROOT_PATH$input_path"
46020    fi
46021  fi
46022
46023
46024  if test "x$path" != "x$new_path"; then
46025    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46028  fi
46029
46030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46031
46032  path="$POTENTIAL_FREETYPE_LIB_PATH"
46033  has_colon=`$ECHO $path | $GREP ^.:`
46034  new_path="$path"
46035  if test "x$has_colon" = x; then
46036    # Not in mixed or Windows style, start by that.
46037    new_path=`cmd //c echo $path`
46038  fi
46039
46040
46041  input_path="$new_path"
46042  # Check if we need to convert this using DOS-style short mode. If the path
46043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46044  # take no chances and rewrite it.
46045  # Note: m4 eats our [], so we need to use [ and ] instead.
46046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46047  if test "x$has_forbidden_chars" != x; then
46048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46050  fi
46051
46052
46053  windows_path="$new_path"
46054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46055    unix_path=`$CYGPATH -u "$windows_path"`
46056    new_path="$unix_path"
46057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46059    new_path="$unix_path"
46060  fi
46061
46062  if test "x$path" != "x$new_path"; then
46063    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46066  fi
46067
46068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46070
46071    else
46072      # We're on a unix platform. Hooray! :)
46073      path="$POTENTIAL_FREETYPE_LIB_PATH"
46074      has_space=`$ECHO "$path" | $GREP " "`
46075      if test "x$has_space" != x; then
46076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46077$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46079      fi
46080
46081      # Use eval to expand a potential ~
46082      eval path="$path"
46083      if test ! -f "$path" && test ! -d "$path"; then
46084        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46085      fi
46086
46087      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46088    fi
46089  fi
46090
46091
46092    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46094$as_echo_n "checking for freetype includes... " >&6; }
46095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46096$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46097    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46099$as_echo_n "checking for freetype libraries... " >&6; }
46100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46101$as_echo "$FREETYPE_LIB_PATH" >&6; }
46102  fi
46103
46104          fi
46105        else
46106          FREETYPE_BASE_DIR="$SYSROOT/usr"
46107
46108  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46109  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46110  METHOD="well-known location"
46111
46112  # Let's start with an optimistic view of the world :-)
46113  FOUND_FREETYPE=yes
46114
46115  # First look for the canonical freetype main include file ft2build.h.
46116  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46117    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46118    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46119    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46120      # Fail.
46121      FOUND_FREETYPE=no
46122    fi
46123  fi
46124
46125  if test "x$FOUND_FREETYPE" = xyes; then
46126    # Include file found, let's continue the sanity check.
46127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46128$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46129
46130    # Reset to default value
46131    FREETYPE_BASE_NAME=freetype
46132    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46133    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46134      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46135          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46136        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46137        # for the .6 version explicitly.
46138        FREETYPE_BASE_NAME=freetype.6
46139        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46140        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46141$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46142      else
46143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46144$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46145        FOUND_FREETYPE=no
46146      fi
46147    else
46148      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46149        # On Windows, we will need both .lib and .dll file.
46150        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46151          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46152$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46153          FOUND_FREETYPE=no
46154        fi
46155      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46157        # Found lib in isa dir, use that instead.
46158        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46159        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46160$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46161      fi
46162    fi
46163  fi
46164
46165  if test "x$FOUND_FREETYPE" = xyes; then
46166
46167  # Only process if variable expands to non-empty
46168
46169  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46171
46172  # Input might be given as Windows format, start by converting to
46173  # unix format.
46174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46175  new_path=`$CYGPATH -u "$path"`
46176
46177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46180  # "foo.exe" is OK but "foo" is an error.
46181  #
46182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46183  # It is also a way to make sure we got the proper file name for the real test later on.
46184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46185  if test "x$test_shortpath" = x; then
46186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46189  fi
46190
46191  # Call helper function which possibly converts this using DOS-style short mode.
46192  # If so, the updated path is stored in $new_path.
46193
46194  input_path="$new_path"
46195  # Check if we need to convert this using DOS-style short mode. If the path
46196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46197  # take no chances and rewrite it.
46198  # Note: m4 eats our [], so we need to use [ and ] instead.
46199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46200  if test "x$has_forbidden_chars" != x; then
46201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46205      # Going to short mode and back again did indeed matter. Since short mode is
46206      # case insensitive, let's make it lowercase to improve readability.
46207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46208      # Now convert it back to Unix-style (cygpath)
46209      input_path=`$CYGPATH -u "$shortmode_path"`
46210      new_path="$input_path"
46211    fi
46212  fi
46213
46214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46215  if test "x$test_cygdrive_prefix" = x; then
46216    # As a simple fix, exclude /usr/bin since it's not a real path.
46217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46219      # a path prefixed by /cygdrive for fixpath to work.
46220      new_path="$CYGWIN_ROOT_PATH$input_path"
46221    fi
46222  fi
46223
46224
46225  if test "x$path" != "x$new_path"; then
46226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46229  fi
46230
46231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46232
46233  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46234  has_colon=`$ECHO $path | $GREP ^.:`
46235  new_path="$path"
46236  if test "x$has_colon" = x; then
46237    # Not in mixed or Windows style, start by that.
46238    new_path=`cmd //c echo $path`
46239  fi
46240
46241
46242  input_path="$new_path"
46243  # Check if we need to convert this using DOS-style short mode. If the path
46244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46245  # take no chances and rewrite it.
46246  # Note: m4 eats our [], so we need to use [ and ] instead.
46247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46248  if test "x$has_forbidden_chars" != x; then
46249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46251  fi
46252
46253
46254  windows_path="$new_path"
46255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46256    unix_path=`$CYGPATH -u "$windows_path"`
46257    new_path="$unix_path"
46258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46260    new_path="$unix_path"
46261  fi
46262
46263  if test "x$path" != "x$new_path"; then
46264    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46267  fi
46268
46269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46271
46272    else
46273      # We're on a unix platform. Hooray! :)
46274      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46275      has_space=`$ECHO "$path" | $GREP " "`
46276      if test "x$has_space" != x; then
46277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46280      fi
46281
46282      # Use eval to expand a potential ~
46283      eval path="$path"
46284      if test ! -f "$path" && test ! -d "$path"; then
46285        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46286      fi
46287
46288      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46289    fi
46290  fi
46291
46292
46293  # Only process if variable expands to non-empty
46294
46295  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46297
46298  # Input might be given as Windows format, start by converting to
46299  # unix format.
46300  path="$POTENTIAL_FREETYPE_LIB_PATH"
46301  new_path=`$CYGPATH -u "$path"`
46302
46303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46306  # "foo.exe" is OK but "foo" is an error.
46307  #
46308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46309  # It is also a way to make sure we got the proper file name for the real test later on.
46310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46311  if test "x$test_shortpath" = x; then
46312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46314    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46315  fi
46316
46317  # Call helper function which possibly converts this using DOS-style short mode.
46318  # If so, the updated path is stored in $new_path.
46319
46320  input_path="$new_path"
46321  # Check if we need to convert this using DOS-style short mode. If the path
46322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46323  # take no chances and rewrite it.
46324  # Note: m4 eats our [], so we need to use [ and ] instead.
46325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46326  if test "x$has_forbidden_chars" != x; then
46327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46331      # Going to short mode and back again did indeed matter. Since short mode is
46332      # case insensitive, let's make it lowercase to improve readability.
46333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46334      # Now convert it back to Unix-style (cygpath)
46335      input_path=`$CYGPATH -u "$shortmode_path"`
46336      new_path="$input_path"
46337    fi
46338  fi
46339
46340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46341  if test "x$test_cygdrive_prefix" = x; then
46342    # As a simple fix, exclude /usr/bin since it's not a real path.
46343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46345      # a path prefixed by /cygdrive for fixpath to work.
46346      new_path="$CYGWIN_ROOT_PATH$input_path"
46347    fi
46348  fi
46349
46350
46351  if test "x$path" != "x$new_path"; then
46352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46355  fi
46356
46357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46358
46359  path="$POTENTIAL_FREETYPE_LIB_PATH"
46360  has_colon=`$ECHO $path | $GREP ^.:`
46361  new_path="$path"
46362  if test "x$has_colon" = x; then
46363    # Not in mixed or Windows style, start by that.
46364    new_path=`cmd //c echo $path`
46365  fi
46366
46367
46368  input_path="$new_path"
46369  # Check if we need to convert this using DOS-style short mode. If the path
46370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46371  # take no chances and rewrite it.
46372  # Note: m4 eats our [], so we need to use [ and ] instead.
46373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46374  if test "x$has_forbidden_chars" != x; then
46375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46377  fi
46378
46379
46380  windows_path="$new_path"
46381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46382    unix_path=`$CYGPATH -u "$windows_path"`
46383    new_path="$unix_path"
46384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46386    new_path="$unix_path"
46387  fi
46388
46389  if test "x$path" != "x$new_path"; then
46390    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46393  fi
46394
46395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46397
46398    else
46399      # We're on a unix platform. Hooray! :)
46400      path="$POTENTIAL_FREETYPE_LIB_PATH"
46401      has_space=`$ECHO "$path" | $GREP " "`
46402      if test "x$has_space" != x; then
46403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46406      fi
46407
46408      # Use eval to expand a potential ~
46409      eval path="$path"
46410      if test ! -f "$path" && test ! -d "$path"; then
46411        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46412      fi
46413
46414      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46415    fi
46416  fi
46417
46418
46419    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46421$as_echo_n "checking for freetype includes... " >&6; }
46422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46423$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46424    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46426$as_echo_n "checking for freetype libraries... " >&6; }
46427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46428$as_echo "$FREETYPE_LIB_PATH" >&6; }
46429  fi
46430
46431
46432          if test "x$FOUND_FREETYPE" != xyes; then
46433            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46434
46435  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46436  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46437  METHOD="well-known location"
46438
46439  # Let's start with an optimistic view of the world :-)
46440  FOUND_FREETYPE=yes
46441
46442  # First look for the canonical freetype main include file ft2build.h.
46443  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46444    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46445    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46446    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46447      # Fail.
46448      FOUND_FREETYPE=no
46449    fi
46450  fi
46451
46452  if test "x$FOUND_FREETYPE" = xyes; then
46453    # Include file found, let's continue the sanity check.
46454    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46455$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46456
46457    # Reset to default value
46458    FREETYPE_BASE_NAME=freetype
46459    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46460    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46461      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46462          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46463        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46464        # for the .6 version explicitly.
46465        FREETYPE_BASE_NAME=freetype.6
46466        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46467        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46468$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46469      else
46470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46471$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46472        FOUND_FREETYPE=no
46473      fi
46474    else
46475      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46476        # On Windows, we will need both .lib and .dll file.
46477        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46478          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46479$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46480          FOUND_FREETYPE=no
46481        fi
46482      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46483          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46484        # Found lib in isa dir, use that instead.
46485        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46486        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46487$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46488      fi
46489    fi
46490  fi
46491
46492  if test "x$FOUND_FREETYPE" = xyes; then
46493
46494  # Only process if variable expands to non-empty
46495
46496  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46498
46499  # Input might be given as Windows format, start by converting to
46500  # unix format.
46501  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46502  new_path=`$CYGPATH -u "$path"`
46503
46504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46507  # "foo.exe" is OK but "foo" is an error.
46508  #
46509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46510  # It is also a way to make sure we got the proper file name for the real test later on.
46511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46512  if test "x$test_shortpath" = x; then
46513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46515    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46516  fi
46517
46518  # Call helper function which possibly converts this using DOS-style short mode.
46519  # If so, the updated path is stored in $new_path.
46520
46521  input_path="$new_path"
46522  # Check if we need to convert this using DOS-style short mode. If the path
46523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46524  # take no chances and rewrite it.
46525  # Note: m4 eats our [], so we need to use [ and ] instead.
46526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46527  if test "x$has_forbidden_chars" != x; then
46528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46532      # Going to short mode and back again did indeed matter. Since short mode is
46533      # case insensitive, let's make it lowercase to improve readability.
46534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46535      # Now convert it back to Unix-style (cygpath)
46536      input_path=`$CYGPATH -u "$shortmode_path"`
46537      new_path="$input_path"
46538    fi
46539  fi
46540
46541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46542  if test "x$test_cygdrive_prefix" = x; then
46543    # As a simple fix, exclude /usr/bin since it's not a real path.
46544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46546      # a path prefixed by /cygdrive for fixpath to work.
46547      new_path="$CYGWIN_ROOT_PATH$input_path"
46548    fi
46549  fi
46550
46551
46552  if test "x$path" != "x$new_path"; then
46553    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46556  fi
46557
46558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46559
46560  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46561  has_colon=`$ECHO $path | $GREP ^.:`
46562  new_path="$path"
46563  if test "x$has_colon" = x; then
46564    # Not in mixed or Windows style, start by that.
46565    new_path=`cmd //c echo $path`
46566  fi
46567
46568
46569  input_path="$new_path"
46570  # Check if we need to convert this using DOS-style short mode. If the path
46571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46572  # take no chances and rewrite it.
46573  # Note: m4 eats our [], so we need to use [ and ] instead.
46574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46575  if test "x$has_forbidden_chars" != x; then
46576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46578  fi
46579
46580
46581  windows_path="$new_path"
46582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46583    unix_path=`$CYGPATH -u "$windows_path"`
46584    new_path="$unix_path"
46585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46587    new_path="$unix_path"
46588  fi
46589
46590  if test "x$path" != "x$new_path"; then
46591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46594  fi
46595
46596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46598
46599    else
46600      # We're on a unix platform. Hooray! :)
46601      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46602      has_space=`$ECHO "$path" | $GREP " "`
46603      if test "x$has_space" != x; then
46604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46607      fi
46608
46609      # Use eval to expand a potential ~
46610      eval path="$path"
46611      if test ! -f "$path" && test ! -d "$path"; then
46612        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46613      fi
46614
46615      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46616    fi
46617  fi
46618
46619
46620  # Only process if variable expands to non-empty
46621
46622  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46624
46625  # Input might be given as Windows format, start by converting to
46626  # unix format.
46627  path="$POTENTIAL_FREETYPE_LIB_PATH"
46628  new_path=`$CYGPATH -u "$path"`
46629
46630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46633  # "foo.exe" is OK but "foo" is an error.
46634  #
46635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46636  # It is also a way to make sure we got the proper file name for the real test later on.
46637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46638  if test "x$test_shortpath" = x; then
46639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46642  fi
46643
46644  # Call helper function which possibly converts this using DOS-style short mode.
46645  # If so, the updated path is stored in $new_path.
46646
46647  input_path="$new_path"
46648  # Check if we need to convert this using DOS-style short mode. If the path
46649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46650  # take no chances and rewrite it.
46651  # Note: m4 eats our [], so we need to use [ and ] instead.
46652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46653  if test "x$has_forbidden_chars" != x; then
46654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46658      # Going to short mode and back again did indeed matter. Since short mode is
46659      # case insensitive, let's make it lowercase to improve readability.
46660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46661      # Now convert it back to Unix-style (cygpath)
46662      input_path=`$CYGPATH -u "$shortmode_path"`
46663      new_path="$input_path"
46664    fi
46665  fi
46666
46667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46668  if test "x$test_cygdrive_prefix" = x; then
46669    # As a simple fix, exclude /usr/bin since it's not a real path.
46670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46672      # a path prefixed by /cygdrive for fixpath to work.
46673      new_path="$CYGWIN_ROOT_PATH$input_path"
46674    fi
46675  fi
46676
46677
46678  if test "x$path" != "x$new_path"; then
46679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46682  fi
46683
46684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46685
46686  path="$POTENTIAL_FREETYPE_LIB_PATH"
46687  has_colon=`$ECHO $path | $GREP ^.:`
46688  new_path="$path"
46689  if test "x$has_colon" = x; then
46690    # Not in mixed or Windows style, start by that.
46691    new_path=`cmd //c echo $path`
46692  fi
46693
46694
46695  input_path="$new_path"
46696  # Check if we need to convert this using DOS-style short mode. If the path
46697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46698  # take no chances and rewrite it.
46699  # Note: m4 eats our [], so we need to use [ and ] instead.
46700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46701  if test "x$has_forbidden_chars" != x; then
46702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46704  fi
46705
46706
46707  windows_path="$new_path"
46708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46709    unix_path=`$CYGPATH -u "$windows_path"`
46710    new_path="$unix_path"
46711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46713    new_path="$unix_path"
46714  fi
46715
46716  if test "x$path" != "x$new_path"; then
46717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46720  fi
46721
46722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46724
46725    else
46726      # We're on a unix platform. Hooray! :)
46727      path="$POTENTIAL_FREETYPE_LIB_PATH"
46728      has_space=`$ECHO "$path" | $GREP " "`
46729      if test "x$has_space" != x; then
46730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46733      fi
46734
46735      # Use eval to expand a potential ~
46736      eval path="$path"
46737      if test ! -f "$path" && test ! -d "$path"; then
46738        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46739      fi
46740
46741      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46742    fi
46743  fi
46744
46745
46746    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46748$as_echo_n "checking for freetype includes... " >&6; }
46749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46750$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46751    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46753$as_echo_n "checking for freetype libraries... " >&6; }
46754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46755$as_echo "$FREETYPE_LIB_PATH" >&6; }
46756  fi
46757
46758          fi
46759
46760          if test "x$FOUND_FREETYPE" != xyes; then
46761            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46762
46763  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46764  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46765  METHOD="well-known location"
46766
46767  # Let's start with an optimistic view of the world :-)
46768  FOUND_FREETYPE=yes
46769
46770  # First look for the canonical freetype main include file ft2build.h.
46771  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46772    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46773    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46774    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46775      # Fail.
46776      FOUND_FREETYPE=no
46777    fi
46778  fi
46779
46780  if test "x$FOUND_FREETYPE" = xyes; then
46781    # Include file found, let's continue the sanity check.
46782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46783$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46784
46785    # Reset to default value
46786    FREETYPE_BASE_NAME=freetype
46787    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46788    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46789      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46790          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46791        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46792        # for the .6 version explicitly.
46793        FREETYPE_BASE_NAME=freetype.6
46794        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46795        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46796$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46797      else
46798        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46799$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46800        FOUND_FREETYPE=no
46801      fi
46802    else
46803      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46804        # On Windows, we will need both .lib and .dll file.
46805        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46806          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46807$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46808          FOUND_FREETYPE=no
46809        fi
46810      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46811          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46812        # Found lib in isa dir, use that instead.
46813        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46814        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46815$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46816      fi
46817    fi
46818  fi
46819
46820  if test "x$FOUND_FREETYPE" = xyes; then
46821
46822  # Only process if variable expands to non-empty
46823
46824  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46826
46827  # Input might be given as Windows format, start by converting to
46828  # unix format.
46829  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46830  new_path=`$CYGPATH -u "$path"`
46831
46832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46835  # "foo.exe" is OK but "foo" is an error.
46836  #
46837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46838  # It is also a way to make sure we got the proper file name for the real test later on.
46839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46840  if test "x$test_shortpath" = x; then
46841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46843    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46844  fi
46845
46846  # Call helper function which possibly converts this using DOS-style short mode.
46847  # If so, the updated path is stored in $new_path.
46848
46849  input_path="$new_path"
46850  # Check if we need to convert this using DOS-style short mode. If the path
46851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46852  # take no chances and rewrite it.
46853  # Note: m4 eats our [], so we need to use [ and ] instead.
46854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46855  if test "x$has_forbidden_chars" != x; then
46856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46860      # Going to short mode and back again did indeed matter. Since short mode is
46861      # case insensitive, let's make it lowercase to improve readability.
46862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46863      # Now convert it back to Unix-style (cygpath)
46864      input_path=`$CYGPATH -u "$shortmode_path"`
46865      new_path="$input_path"
46866    fi
46867  fi
46868
46869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46870  if test "x$test_cygdrive_prefix" = x; then
46871    # As a simple fix, exclude /usr/bin since it's not a real path.
46872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46874      # a path prefixed by /cygdrive for fixpath to work.
46875      new_path="$CYGWIN_ROOT_PATH$input_path"
46876    fi
46877  fi
46878
46879
46880  if test "x$path" != "x$new_path"; then
46881    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46884  fi
46885
46886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46887
46888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46889  has_colon=`$ECHO $path | $GREP ^.:`
46890  new_path="$path"
46891  if test "x$has_colon" = x; then
46892    # Not in mixed or Windows style, start by that.
46893    new_path=`cmd //c echo $path`
46894  fi
46895
46896
46897  input_path="$new_path"
46898  # Check if we need to convert this using DOS-style short mode. If the path
46899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46900  # take no chances and rewrite it.
46901  # Note: m4 eats our [], so we need to use [ and ] instead.
46902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46903  if test "x$has_forbidden_chars" != x; then
46904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46906  fi
46907
46908
46909  windows_path="$new_path"
46910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46911    unix_path=`$CYGPATH -u "$windows_path"`
46912    new_path="$unix_path"
46913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46915    new_path="$unix_path"
46916  fi
46917
46918  if test "x$path" != "x$new_path"; then
46919    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46922  fi
46923
46924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46926
46927    else
46928      # We're on a unix platform. Hooray! :)
46929      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46930      has_space=`$ECHO "$path" | $GREP " "`
46931      if test "x$has_space" != x; then
46932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46935      fi
46936
46937      # Use eval to expand a potential ~
46938      eval path="$path"
46939      if test ! -f "$path" && test ! -d "$path"; then
46940        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46941      fi
46942
46943      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46944    fi
46945  fi
46946
46947
46948  # Only process if variable expands to non-empty
46949
46950  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46952
46953  # Input might be given as Windows format, start by converting to
46954  # unix format.
46955  path="$POTENTIAL_FREETYPE_LIB_PATH"
46956  new_path=`$CYGPATH -u "$path"`
46957
46958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46961  # "foo.exe" is OK but "foo" is an error.
46962  #
46963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46964  # It is also a way to make sure we got the proper file name for the real test later on.
46965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46966  if test "x$test_shortpath" = x; then
46967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46970  fi
46971
46972  # Call helper function which possibly converts this using DOS-style short mode.
46973  # If so, the updated path is stored in $new_path.
46974
46975  input_path="$new_path"
46976  # Check if we need to convert this using DOS-style short mode. If the path
46977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46978  # take no chances and rewrite it.
46979  # Note: m4 eats our [], so we need to use [ and ] instead.
46980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46981  if test "x$has_forbidden_chars" != x; then
46982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46986      # Going to short mode and back again did indeed matter. Since short mode is
46987      # case insensitive, let's make it lowercase to improve readability.
46988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46989      # Now convert it back to Unix-style (cygpath)
46990      input_path=`$CYGPATH -u "$shortmode_path"`
46991      new_path="$input_path"
46992    fi
46993  fi
46994
46995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46996  if test "x$test_cygdrive_prefix" = x; then
46997    # As a simple fix, exclude /usr/bin since it's not a real path.
46998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47000      # a path prefixed by /cygdrive for fixpath to work.
47001      new_path="$CYGWIN_ROOT_PATH$input_path"
47002    fi
47003  fi
47004
47005
47006  if test "x$path" != "x$new_path"; then
47007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47010  fi
47011
47012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47013
47014  path="$POTENTIAL_FREETYPE_LIB_PATH"
47015  has_colon=`$ECHO $path | $GREP ^.:`
47016  new_path="$path"
47017  if test "x$has_colon" = x; then
47018    # Not in mixed or Windows style, start by that.
47019    new_path=`cmd //c echo $path`
47020  fi
47021
47022
47023  input_path="$new_path"
47024  # Check if we need to convert this using DOS-style short mode. If the path
47025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47026  # take no chances and rewrite it.
47027  # Note: m4 eats our [], so we need to use [ and ] instead.
47028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47029  if test "x$has_forbidden_chars" != x; then
47030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47032  fi
47033
47034
47035  windows_path="$new_path"
47036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47037    unix_path=`$CYGPATH -u "$windows_path"`
47038    new_path="$unix_path"
47039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47041    new_path="$unix_path"
47042  fi
47043
47044  if test "x$path" != "x$new_path"; then
47045    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47048  fi
47049
47050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47052
47053    else
47054      # We're on a unix platform. Hooray! :)
47055      path="$POTENTIAL_FREETYPE_LIB_PATH"
47056      has_space=`$ECHO "$path" | $GREP " "`
47057      if test "x$has_space" != x; then
47058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47061      fi
47062
47063      # Use eval to expand a potential ~
47064      eval path="$path"
47065      if test ! -f "$path" && test ! -d "$path"; then
47066        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47067      fi
47068
47069      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47070    fi
47071  fi
47072
47073
47074    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47076$as_echo_n "checking for freetype includes... " >&6; }
47077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47078$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47079    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47081$as_echo_n "checking for freetype libraries... " >&6; }
47082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47083$as_echo "$FREETYPE_LIB_PATH" >&6; }
47084  fi
47085
47086          fi
47087
47088          if test "x$FOUND_FREETYPE" != xyes; then
47089            FREETYPE_BASE_DIR="$SYSROOT/usr"
47090            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47091
47092  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47093  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47094  METHOD="well-known location"
47095
47096  # Let's start with an optimistic view of the world :-)
47097  FOUND_FREETYPE=yes
47098
47099  # First look for the canonical freetype main include file ft2build.h.
47100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47104      # Fail.
47105      FOUND_FREETYPE=no
47106    fi
47107  fi
47108
47109  if test "x$FOUND_FREETYPE" = xyes; then
47110    # Include file found, let's continue the sanity check.
47111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47113
47114    # Reset to default value
47115    FREETYPE_BASE_NAME=freetype
47116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47121        # for the .6 version explicitly.
47122        FREETYPE_BASE_NAME=freetype.6
47123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47126      else
47127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47129        FOUND_FREETYPE=no
47130      fi
47131    else
47132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47133        # On Windows, we will need both .lib and .dll file.
47134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47137          FOUND_FREETYPE=no
47138        fi
47139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47141        # Found lib in isa dir, use that instead.
47142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47145      fi
47146    fi
47147  fi
47148
47149  if test "x$FOUND_FREETYPE" = xyes; then
47150
47151  # Only process if variable expands to non-empty
47152
47153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155
47156  # Input might be given as Windows format, start by converting to
47157  # unix format.
47158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47159  new_path=`$CYGPATH -u "$path"`
47160
47161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47164  # "foo.exe" is OK but "foo" is an error.
47165  #
47166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47167  # It is also a way to make sure we got the proper file name for the real test later on.
47168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47169  if test "x$test_shortpath" = x; then
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47173  fi
47174
47175  # Call helper function which possibly converts this using DOS-style short mode.
47176  # If so, the updated path is stored in $new_path.
47177
47178  input_path="$new_path"
47179  # Check if we need to convert this using DOS-style short mode. If the path
47180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47181  # take no chances and rewrite it.
47182  # Note: m4 eats our [], so we need to use [ and ] instead.
47183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47184  if test "x$has_forbidden_chars" != x; then
47185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47189      # Going to short mode and back again did indeed matter. Since short mode is
47190      # case insensitive, let's make it lowercase to improve readability.
47191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47192      # Now convert it back to Unix-style (cygpath)
47193      input_path=`$CYGPATH -u "$shortmode_path"`
47194      new_path="$input_path"
47195    fi
47196  fi
47197
47198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47199  if test "x$test_cygdrive_prefix" = x; then
47200    # As a simple fix, exclude /usr/bin since it's not a real path.
47201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47203      # a path prefixed by /cygdrive for fixpath to work.
47204      new_path="$CYGWIN_ROOT_PATH$input_path"
47205    fi
47206  fi
47207
47208
47209  if test "x$path" != "x$new_path"; then
47210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47213  fi
47214
47215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47216
47217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47218  has_colon=`$ECHO $path | $GREP ^.:`
47219  new_path="$path"
47220  if test "x$has_colon" = x; then
47221    # Not in mixed or Windows style, start by that.
47222    new_path=`cmd //c echo $path`
47223  fi
47224
47225
47226  input_path="$new_path"
47227  # Check if we need to convert this using DOS-style short mode. If the path
47228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47229  # take no chances and rewrite it.
47230  # Note: m4 eats our [], so we need to use [ and ] instead.
47231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47232  if test "x$has_forbidden_chars" != x; then
47233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47235  fi
47236
47237
47238  windows_path="$new_path"
47239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47240    unix_path=`$CYGPATH -u "$windows_path"`
47241    new_path="$unix_path"
47242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47244    new_path="$unix_path"
47245  fi
47246
47247  if test "x$path" != "x$new_path"; then
47248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47251  fi
47252
47253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47255
47256    else
47257      # We're on a unix platform. Hooray! :)
47258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47259      has_space=`$ECHO "$path" | $GREP " "`
47260      if test "x$has_space" != x; then
47261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47264      fi
47265
47266      # Use eval to expand a potential ~
47267      eval path="$path"
47268      if test ! -f "$path" && test ! -d "$path"; then
47269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47270      fi
47271
47272      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47273    fi
47274  fi
47275
47276
47277  # Only process if variable expands to non-empty
47278
47279  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47281
47282  # Input might be given as Windows format, start by converting to
47283  # unix format.
47284  path="$POTENTIAL_FREETYPE_LIB_PATH"
47285  new_path=`$CYGPATH -u "$path"`
47286
47287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47290  # "foo.exe" is OK but "foo" is an error.
47291  #
47292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47293  # It is also a way to make sure we got the proper file name for the real test later on.
47294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47295  if test "x$test_shortpath" = x; then
47296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47298    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47299  fi
47300
47301  # Call helper function which possibly converts this using DOS-style short mode.
47302  # If so, the updated path is stored in $new_path.
47303
47304  input_path="$new_path"
47305  # Check if we need to convert this using DOS-style short mode. If the path
47306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47307  # take no chances and rewrite it.
47308  # Note: m4 eats our [], so we need to use [ and ] instead.
47309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47310  if test "x$has_forbidden_chars" != x; then
47311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47315      # Going to short mode and back again did indeed matter. Since short mode is
47316      # case insensitive, let's make it lowercase to improve readability.
47317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47318      # Now convert it back to Unix-style (cygpath)
47319      input_path=`$CYGPATH -u "$shortmode_path"`
47320      new_path="$input_path"
47321    fi
47322  fi
47323
47324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47325  if test "x$test_cygdrive_prefix" = x; then
47326    # As a simple fix, exclude /usr/bin since it's not a real path.
47327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47329      # a path prefixed by /cygdrive for fixpath to work.
47330      new_path="$CYGWIN_ROOT_PATH$input_path"
47331    fi
47332  fi
47333
47334
47335  if test "x$path" != "x$new_path"; then
47336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47339  fi
47340
47341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47342
47343  path="$POTENTIAL_FREETYPE_LIB_PATH"
47344  has_colon=`$ECHO $path | $GREP ^.:`
47345  new_path="$path"
47346  if test "x$has_colon" = x; then
47347    # Not in mixed or Windows style, start by that.
47348    new_path=`cmd //c echo $path`
47349  fi
47350
47351
47352  input_path="$new_path"
47353  # Check if we need to convert this using DOS-style short mode. If the path
47354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47355  # take no chances and rewrite it.
47356  # Note: m4 eats our [], so we need to use [ and ] instead.
47357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47358  if test "x$has_forbidden_chars" != x; then
47359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47361  fi
47362
47363
47364  windows_path="$new_path"
47365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47366    unix_path=`$CYGPATH -u "$windows_path"`
47367    new_path="$unix_path"
47368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47370    new_path="$unix_path"
47371  fi
47372
47373  if test "x$path" != "x$new_path"; then
47374    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47377  fi
47378
47379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47381
47382    else
47383      # We're on a unix platform. Hooray! :)
47384      path="$POTENTIAL_FREETYPE_LIB_PATH"
47385      has_space=`$ECHO "$path" | $GREP " "`
47386      if test "x$has_space" != x; then
47387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47390      fi
47391
47392      # Use eval to expand a potential ~
47393      eval path="$path"
47394      if test ! -f "$path" && test ! -d "$path"; then
47395        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47396      fi
47397
47398      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47399    fi
47400  fi
47401
47402
47403    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47405$as_echo_n "checking for freetype includes... " >&6; }
47406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47407$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47408    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47410$as_echo_n "checking for freetype libraries... " >&6; }
47411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47412$as_echo "$FREETYPE_LIB_PATH" >&6; }
47413  fi
47414
47415            else
47416
47417  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47418  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47419  METHOD="well-known location"
47420
47421  # Let's start with an optimistic view of the world :-)
47422  FOUND_FREETYPE=yes
47423
47424  # First look for the canonical freetype main include file ft2build.h.
47425  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47426    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47427    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47428    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47429      # Fail.
47430      FOUND_FREETYPE=no
47431    fi
47432  fi
47433
47434  if test "x$FOUND_FREETYPE" = xyes; then
47435    # Include file found, let's continue the sanity check.
47436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47437$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47438
47439    # Reset to default value
47440    FREETYPE_BASE_NAME=freetype
47441    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47442    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47443      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47444          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47445        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47446        # for the .6 version explicitly.
47447        FREETYPE_BASE_NAME=freetype.6
47448        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47449        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47450$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47451      else
47452        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47453$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47454        FOUND_FREETYPE=no
47455      fi
47456    else
47457      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47458        # On Windows, we will need both .lib and .dll file.
47459        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47460          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47462          FOUND_FREETYPE=no
47463        fi
47464      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47466        # Found lib in isa dir, use that instead.
47467        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47468        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47469$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47470      fi
47471    fi
47472  fi
47473
47474  if test "x$FOUND_FREETYPE" = xyes; then
47475
47476  # Only process if variable expands to non-empty
47477
47478  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47480
47481  # Input might be given as Windows format, start by converting to
47482  # unix format.
47483  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47484  new_path=`$CYGPATH -u "$path"`
47485
47486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47489  # "foo.exe" is OK but "foo" is an error.
47490  #
47491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47492  # It is also a way to make sure we got the proper file name for the real test later on.
47493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47494  if test "x$test_shortpath" = x; then
47495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47497    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47498  fi
47499
47500  # Call helper function which possibly converts this using DOS-style short mode.
47501  # If so, the updated path is stored in $new_path.
47502
47503  input_path="$new_path"
47504  # Check if we need to convert this using DOS-style short mode. If the path
47505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47506  # take no chances and rewrite it.
47507  # Note: m4 eats our [], so we need to use [ and ] instead.
47508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47509  if test "x$has_forbidden_chars" != x; then
47510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47514      # Going to short mode and back again did indeed matter. Since short mode is
47515      # case insensitive, let's make it lowercase to improve readability.
47516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47517      # Now convert it back to Unix-style (cygpath)
47518      input_path=`$CYGPATH -u "$shortmode_path"`
47519      new_path="$input_path"
47520    fi
47521  fi
47522
47523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47524  if test "x$test_cygdrive_prefix" = x; then
47525    # As a simple fix, exclude /usr/bin since it's not a real path.
47526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47528      # a path prefixed by /cygdrive for fixpath to work.
47529      new_path="$CYGWIN_ROOT_PATH$input_path"
47530    fi
47531  fi
47532
47533
47534  if test "x$path" != "x$new_path"; then
47535    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47538  fi
47539
47540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47541
47542  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47543  has_colon=`$ECHO $path | $GREP ^.:`
47544  new_path="$path"
47545  if test "x$has_colon" = x; then
47546    # Not in mixed or Windows style, start by that.
47547    new_path=`cmd //c echo $path`
47548  fi
47549
47550
47551  input_path="$new_path"
47552  # Check if we need to convert this using DOS-style short mode. If the path
47553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47554  # take no chances and rewrite it.
47555  # Note: m4 eats our [], so we need to use [ and ] instead.
47556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47557  if test "x$has_forbidden_chars" != x; then
47558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47560  fi
47561
47562
47563  windows_path="$new_path"
47564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47565    unix_path=`$CYGPATH -u "$windows_path"`
47566    new_path="$unix_path"
47567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47569    new_path="$unix_path"
47570  fi
47571
47572  if test "x$path" != "x$new_path"; then
47573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47576  fi
47577
47578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47580
47581    else
47582      # We're on a unix platform. Hooray! :)
47583      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47584      has_space=`$ECHO "$path" | $GREP " "`
47585      if test "x$has_space" != x; then
47586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47588        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47589      fi
47590
47591      # Use eval to expand a potential ~
47592      eval path="$path"
47593      if test ! -f "$path" && test ! -d "$path"; then
47594        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47595      fi
47596
47597      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47598    fi
47599  fi
47600
47601
47602  # Only process if variable expands to non-empty
47603
47604  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47606
47607  # Input might be given as Windows format, start by converting to
47608  # unix format.
47609  path="$POTENTIAL_FREETYPE_LIB_PATH"
47610  new_path=`$CYGPATH -u "$path"`
47611
47612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47615  # "foo.exe" is OK but "foo" is an error.
47616  #
47617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47618  # It is also a way to make sure we got the proper file name for the real test later on.
47619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47620  if test "x$test_shortpath" = x; then
47621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47624  fi
47625
47626  # Call helper function which possibly converts this using DOS-style short mode.
47627  # If so, the updated path is stored in $new_path.
47628
47629  input_path="$new_path"
47630  # Check if we need to convert this using DOS-style short mode. If the path
47631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47632  # take no chances and rewrite it.
47633  # Note: m4 eats our [], so we need to use [ and ] instead.
47634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47635  if test "x$has_forbidden_chars" != x; then
47636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47640      # Going to short mode and back again did indeed matter. Since short mode is
47641      # case insensitive, let's make it lowercase to improve readability.
47642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47643      # Now convert it back to Unix-style (cygpath)
47644      input_path=`$CYGPATH -u "$shortmode_path"`
47645      new_path="$input_path"
47646    fi
47647  fi
47648
47649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47650  if test "x$test_cygdrive_prefix" = x; then
47651    # As a simple fix, exclude /usr/bin since it's not a real path.
47652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47654      # a path prefixed by /cygdrive for fixpath to work.
47655      new_path="$CYGWIN_ROOT_PATH$input_path"
47656    fi
47657  fi
47658
47659
47660  if test "x$path" != "x$new_path"; then
47661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47664  fi
47665
47666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47667
47668  path="$POTENTIAL_FREETYPE_LIB_PATH"
47669  has_colon=`$ECHO $path | $GREP ^.:`
47670  new_path="$path"
47671  if test "x$has_colon" = x; then
47672    # Not in mixed or Windows style, start by that.
47673    new_path=`cmd //c echo $path`
47674  fi
47675
47676
47677  input_path="$new_path"
47678  # Check if we need to convert this using DOS-style short mode. If the path
47679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47680  # take no chances and rewrite it.
47681  # Note: m4 eats our [], so we need to use [ and ] instead.
47682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47683  if test "x$has_forbidden_chars" != x; then
47684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47686  fi
47687
47688
47689  windows_path="$new_path"
47690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47691    unix_path=`$CYGPATH -u "$windows_path"`
47692    new_path="$unix_path"
47693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47695    new_path="$unix_path"
47696  fi
47697
47698  if test "x$path" != "x$new_path"; then
47699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47702  fi
47703
47704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47706
47707    else
47708      # We're on a unix platform. Hooray! :)
47709      path="$POTENTIAL_FREETYPE_LIB_PATH"
47710      has_space=`$ECHO "$path" | $GREP " "`
47711      if test "x$has_space" != x; then
47712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47715      fi
47716
47717      # Use eval to expand a potential ~
47718      eval path="$path"
47719      if test ! -f "$path" && test ! -d "$path"; then
47720        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47721      fi
47722
47723      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47724    fi
47725  fi
47726
47727
47728    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47730$as_echo_n "checking for freetype includes... " >&6; }
47731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47732$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47733    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47735$as_echo_n "checking for freetype libraries... " >&6; }
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47737$as_echo "$FREETYPE_LIB_PATH" >&6; }
47738  fi
47739
47740              if test "x$FOUND_FREETYPE" != xyes; then
47741
47742  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47743  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47744  METHOD="well-known location"
47745
47746  # Let's start with an optimistic view of the world :-)
47747  FOUND_FREETYPE=yes
47748
47749  # First look for the canonical freetype main include file ft2build.h.
47750  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47751    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47752    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47753    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47754      # Fail.
47755      FOUND_FREETYPE=no
47756    fi
47757  fi
47758
47759  if test "x$FOUND_FREETYPE" = xyes; then
47760    # Include file found, let's continue the sanity check.
47761    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47762$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47763
47764    # Reset to default value
47765    FREETYPE_BASE_NAME=freetype
47766    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47767    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47768      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47769          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47770        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47771        # for the .6 version explicitly.
47772        FREETYPE_BASE_NAME=freetype.6
47773        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47774        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47775$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47776      else
47777        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47778$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47779        FOUND_FREETYPE=no
47780      fi
47781    else
47782      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47783        # On Windows, we will need both .lib and .dll file.
47784        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47785          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47786$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47787          FOUND_FREETYPE=no
47788        fi
47789      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47790          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47791        # Found lib in isa dir, use that instead.
47792        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47793        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47794$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47795      fi
47796    fi
47797  fi
47798
47799  if test "x$FOUND_FREETYPE" = xyes; then
47800
47801  # Only process if variable expands to non-empty
47802
47803  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != 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="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47822    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$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    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47863  fi
47864
47865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47866
47867  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH 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="$POTENTIAL_FREETYPE_INCLUDE_PATH"
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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, 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 POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47920      fi
47921
47922      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47923    fi
47924  fi
47925
47926
47927  # Only process if variable expands to non-empty
47928
47929  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47931
47932  # Input might be given as Windows format, start by converting to
47933  # unix format.
47934  path="$POTENTIAL_FREETYPE_LIB_PATH"
47935  new_path=`$CYGPATH -u "$path"`
47936
47937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47940  # "foo.exe" is OK but "foo" is an error.
47941  #
47942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47943  # It is also a way to make sure we got the proper file name for the real test later on.
47944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47945  if test "x$test_shortpath" = x; then
47946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47948    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47949  fi
47950
47951  # Call helper function which possibly converts this using DOS-style short mode.
47952  # If so, the updated path is stored in $new_path.
47953
47954  input_path="$new_path"
47955  # Check if we need to convert this using DOS-style short mode. If the path
47956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957  # take no chances and rewrite it.
47958  # Note: m4 eats our [], so we need to use [ and ] instead.
47959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47960  if test "x$has_forbidden_chars" != x; then
47961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47965      # Going to short mode and back again did indeed matter. Since short mode is
47966      # case insensitive, let's make it lowercase to improve readability.
47967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47968      # Now convert it back to Unix-style (cygpath)
47969      input_path=`$CYGPATH -u "$shortmode_path"`
47970      new_path="$input_path"
47971    fi
47972  fi
47973
47974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47975  if test "x$test_cygdrive_prefix" = x; then
47976    # As a simple fix, exclude /usr/bin since it's not a real path.
47977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47979      # a path prefixed by /cygdrive for fixpath to work.
47980      new_path="$CYGWIN_ROOT_PATH$input_path"
47981    fi
47982  fi
47983
47984
47985  if test "x$path" != "x$new_path"; then
47986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47989  fi
47990
47991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47992
47993  path="$POTENTIAL_FREETYPE_LIB_PATH"
47994  has_colon=`$ECHO $path | $GREP ^.:`
47995  new_path="$path"
47996  if test "x$has_colon" = x; then
47997    # Not in mixed or Windows style, start by that.
47998    new_path=`cmd //c echo $path`
47999  fi
48000
48001
48002  input_path="$new_path"
48003  # Check if we need to convert this using DOS-style short mode. If the path
48004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48005  # take no chances and rewrite it.
48006  # Note: m4 eats our [], so we need to use [ and ] instead.
48007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48008  if test "x$has_forbidden_chars" != x; then
48009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48011  fi
48012
48013
48014  windows_path="$new_path"
48015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016    unix_path=`$CYGPATH -u "$windows_path"`
48017    new_path="$unix_path"
48018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48020    new_path="$unix_path"
48021  fi
48022
48023  if test "x$path" != "x$new_path"; then
48024    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48027  fi
48028
48029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48031
48032    else
48033      # We're on a unix platform. Hooray! :)
48034      path="$POTENTIAL_FREETYPE_LIB_PATH"
48035      has_space=`$ECHO "$path" | $GREP " "`
48036      if test "x$has_space" != x; then
48037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48040      fi
48041
48042      # Use eval to expand a potential ~
48043      eval path="$path"
48044      if test ! -f "$path" && test ! -d "$path"; then
48045        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48046      fi
48047
48048      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48049    fi
48050  fi
48051
48052
48053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48055$as_echo_n "checking for freetype includes... " >&6; }
48056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48060$as_echo_n "checking for freetype libraries... " >&6; }
48061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48062$as_echo "$FREETYPE_LIB_PATH" >&6; }
48063  fi
48064
48065              fi
48066            fi
48067          fi
48068        fi
48069      fi # end check in well-known locations
48070
48071      if test "x$FOUND_FREETYPE" != xyes; then
48072
48073  # Print a helpful message on how to acquire the necessary build dependency.
48074  # freetype is the help tag: freetype, cups, pulse, alsa etc
48075  MISSING_DEPENDENCY=freetype
48076
48077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078    cygwin_help $MISSING_DEPENDENCY
48079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48080    msys_help $MISSING_DEPENDENCY
48081  else
48082    PKGHANDLER_COMMAND=
48083
48084    case $PKGHANDLER in
48085      apt-get)
48086        apt_help     $MISSING_DEPENDENCY ;;
48087      yum)
48088        yum_help     $MISSING_DEPENDENCY ;;
48089      port)
48090        port_help    $MISSING_DEPENDENCY ;;
48091      pkgutil)
48092        pkgutil_help $MISSING_DEPENDENCY ;;
48093      pkgadd)
48094        pkgadd_help  $MISSING_DEPENDENCY ;;
48095    esac
48096
48097    if test "x$PKGHANDLER_COMMAND" != x; then
48098      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48099    fi
48100  fi
48101
48102        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48103      fi
48104    fi # end user specified settings
48105
48106    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48107    if test "x$FREETYPE_CFLAGS" = x; then
48108
48109  # Only process if variable expands to non-empty
48110
48111  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48113
48114  # Input might be given as Windows format, start by converting to
48115  # unix format.
48116  path="$FREETYPE_INCLUDE_PATH"
48117  new_path=`$CYGPATH -u "$path"`
48118
48119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48122  # "foo.exe" is OK but "foo" is an error.
48123  #
48124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48125  # It is also a way to make sure we got the proper file name for the real test later on.
48126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48127  if test "x$test_shortpath" = x; then
48128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48129$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48130    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48131  fi
48132
48133  # Call helper function which possibly converts this using DOS-style short mode.
48134  # If so, the updated path is stored in $new_path.
48135
48136  input_path="$new_path"
48137  # Check if we need to convert this using DOS-style short mode. If the path
48138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48139  # take no chances and rewrite it.
48140  # Note: m4 eats our [], so we need to use [ and ] instead.
48141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48142  if test "x$has_forbidden_chars" != x; then
48143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48147      # Going to short mode and back again did indeed matter. Since short mode is
48148      # case insensitive, let's make it lowercase to improve readability.
48149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48150      # Now convert it back to Unix-style (cygpath)
48151      input_path=`$CYGPATH -u "$shortmode_path"`
48152      new_path="$input_path"
48153    fi
48154  fi
48155
48156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48157  if test "x$test_cygdrive_prefix" = x; then
48158    # As a simple fix, exclude /usr/bin since it's not a real path.
48159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48161      # a path prefixed by /cygdrive for fixpath to work.
48162      new_path="$CYGWIN_ROOT_PATH$input_path"
48163    fi
48164  fi
48165
48166
48167  if test "x$path" != "x$new_path"; then
48168    FREETYPE_INCLUDE_PATH="$new_path"
48169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48170$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48171  fi
48172
48173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48174
48175  path="$FREETYPE_INCLUDE_PATH"
48176  has_colon=`$ECHO $path | $GREP ^.:`
48177  new_path="$path"
48178  if test "x$has_colon" = x; then
48179    # Not in mixed or Windows style, start by that.
48180    new_path=`cmd //c echo $path`
48181  fi
48182
48183
48184  input_path="$new_path"
48185  # Check if we need to convert this using DOS-style short mode. If the path
48186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48187  # take no chances and rewrite it.
48188  # Note: m4 eats our [], so we need to use [ and ] instead.
48189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48190  if test "x$has_forbidden_chars" != x; then
48191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48193  fi
48194
48195
48196  windows_path="$new_path"
48197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48198    unix_path=`$CYGPATH -u "$windows_path"`
48199    new_path="$unix_path"
48200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48202    new_path="$unix_path"
48203  fi
48204
48205  if test "x$path" != "x$new_path"; then
48206    FREETYPE_INCLUDE_PATH="$new_path"
48207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48208$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48209  fi
48210
48211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48213
48214    else
48215      # We're on a unix platform. Hooray! :)
48216      path="$FREETYPE_INCLUDE_PATH"
48217      has_space=`$ECHO "$path" | $GREP " "`
48218      if test "x$has_space" != x; then
48219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48220$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48222      fi
48223
48224      # Use eval to expand a potential ~
48225      eval path="$path"
48226      if test ! -f "$path" && test ! -d "$path"; then
48227        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48228      fi
48229
48230      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48231    fi
48232  fi
48233
48234      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48235        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48236      else
48237        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48238      fi
48239    fi
48240
48241    if test "x$FREETYPE_LIBS" = x; then
48242
48243  # Only process if variable expands to non-empty
48244
48245  if test "x$FREETYPE_LIB_PATH" != x; then
48246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48247
48248  # Input might be given as Windows format, start by converting to
48249  # unix format.
48250  path="$FREETYPE_LIB_PATH"
48251  new_path=`$CYGPATH -u "$path"`
48252
48253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48256  # "foo.exe" is OK but "foo" is an error.
48257  #
48258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48259  # It is also a way to make sure we got the proper file name for the real test later on.
48260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48261  if test "x$test_shortpath" = x; then
48262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48263$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48264    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48265  fi
48266
48267  # Call helper function which possibly converts this using DOS-style short mode.
48268  # If so, the updated path is stored in $new_path.
48269
48270  input_path="$new_path"
48271  # Check if we need to convert this using DOS-style short mode. If the path
48272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48273  # take no chances and rewrite it.
48274  # Note: m4 eats our [], so we need to use [ and ] instead.
48275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48276  if test "x$has_forbidden_chars" != x; then
48277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48281      # Going to short mode and back again did indeed matter. Since short mode is
48282      # case insensitive, let's make it lowercase to improve readability.
48283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48284      # Now convert it back to Unix-style (cygpath)
48285      input_path=`$CYGPATH -u "$shortmode_path"`
48286      new_path="$input_path"
48287    fi
48288  fi
48289
48290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48291  if test "x$test_cygdrive_prefix" = x; then
48292    # As a simple fix, exclude /usr/bin since it's not a real path.
48293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48295      # a path prefixed by /cygdrive for fixpath to work.
48296      new_path="$CYGWIN_ROOT_PATH$input_path"
48297    fi
48298  fi
48299
48300
48301  if test "x$path" != "x$new_path"; then
48302    FREETYPE_LIB_PATH="$new_path"
48303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48304$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48305  fi
48306
48307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48308
48309  path="$FREETYPE_LIB_PATH"
48310  has_colon=`$ECHO $path | $GREP ^.:`
48311  new_path="$path"
48312  if test "x$has_colon" = x; then
48313    # Not in mixed or Windows style, start by that.
48314    new_path=`cmd //c echo $path`
48315  fi
48316
48317
48318  input_path="$new_path"
48319  # Check if we need to convert this using DOS-style short mode. If the path
48320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48321  # take no chances and rewrite it.
48322  # Note: m4 eats our [], so we need to use [ and ] instead.
48323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48324  if test "x$has_forbidden_chars" != x; then
48325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48327  fi
48328
48329
48330  windows_path="$new_path"
48331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48332    unix_path=`$CYGPATH -u "$windows_path"`
48333    new_path="$unix_path"
48334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48336    new_path="$unix_path"
48337  fi
48338
48339  if test "x$path" != "x$new_path"; then
48340    FREETYPE_LIB_PATH="$new_path"
48341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48342$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48343  fi
48344
48345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48347
48348    else
48349      # We're on a unix platform. Hooray! :)
48350      path="$FREETYPE_LIB_PATH"
48351      has_space=`$ECHO "$path" | $GREP " "`
48352      if test "x$has_space" != x; then
48353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48354$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48356      fi
48357
48358      # Use eval to expand a potential ~
48359      eval path="$path"
48360      if test ! -f "$path" && test ! -d "$path"; then
48361        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48362      fi
48363
48364      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48365    fi
48366  fi
48367
48368      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48369        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48370      else
48371        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48372      fi
48373    fi
48374
48375    # Try to compile it
48376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48377$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48378    ac_ext=cpp
48379ac_cpp='$CXXCPP $CPPFLAGS'
48380ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48381ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48382ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48383
48384    PREV_CXXCFLAGS="$CXXFLAGS"
48385    PREV_LIBS="$LIBS"
48386    PREV_CXX="$CXX"
48387    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48388    LIBS="$LIBS $FREETYPE_LIBS"
48389    CXX="$FIXPATH $CXX"
48390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48391/* end confdefs.h.  */
48392
48393          #include<ft2build.h>
48394          #include FT_FREETYPE_H
48395          int main () {
48396            FT_Init_FreeType(NULL);
48397            return 0;
48398          }
48399
48400_ACEOF
48401if ac_fn_cxx_try_link "$LINENO"; then :
48402
48403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48404$as_echo "yes" >&6; }
48405
48406else
48407
48408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48409$as_echo "no" >&6; }
48410          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48411$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48412          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48413$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48414
48415
48416  # Print a helpful message on how to acquire the necessary build dependency.
48417  # freetype is the help tag: freetype, cups, pulse, alsa etc
48418  MISSING_DEPENDENCY=freetype
48419
48420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48421    cygwin_help $MISSING_DEPENDENCY
48422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48423    msys_help $MISSING_DEPENDENCY
48424  else
48425    PKGHANDLER_COMMAND=
48426
48427    case $PKGHANDLER in
48428      apt-get)
48429        apt_help     $MISSING_DEPENDENCY ;;
48430      yum)
48431        yum_help     $MISSING_DEPENDENCY ;;
48432      port)
48433        port_help    $MISSING_DEPENDENCY ;;
48434      pkgutil)
48435        pkgutil_help $MISSING_DEPENDENCY ;;
48436      pkgadd)
48437        pkgadd_help  $MISSING_DEPENDENCY ;;
48438    esac
48439
48440    if test "x$PKGHANDLER_COMMAND" != x; then
48441      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48442    fi
48443  fi
48444
48445
48446          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48447
48448
48449fi
48450rm -f core conftest.err conftest.$ac_objext \
48451    conftest$ac_exeext conftest.$ac_ext
48452    CXXCFLAGS="$PREV_CXXFLAGS"
48453    LIBS="$PREV_LIBS"
48454    CXX="$PREV_CXX"
48455    ac_ext=cpp
48456ac_cpp='$CXXCPP $CPPFLAGS'
48457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48460
48461
48462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48463$as_echo_n "checking if we should bundle freetype... " >&6; }
48464    if test "x$BUNDLE_FREETYPE" = xyes; then
48465      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48466    fi
48467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48468$as_echo "$BUNDLE_FREETYPE" >&6; }
48469
48470  fi # end freetype needed
48471
48472
48473
48474
48475
48476
48477
48478  ###############################################################################
48479  #
48480  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48481  #
48482
48483# Check whether --with-alsa was given.
48484if test "${with_alsa+set}" = set; then :
48485  withval=$with_alsa;
48486fi
48487
48488
48489# Check whether --with-alsa-include was given.
48490if test "${with_alsa_include+set}" = set; then :
48491  withval=$with_alsa_include;
48492fi
48493
48494
48495# Check whether --with-alsa-lib was given.
48496if test "${with_alsa_lib+set}" = set; then :
48497  withval=$with_alsa_lib;
48498fi
48499
48500
48501  if test "x$ALSA_NOT_NEEDED" = xyes; then
48502    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48503      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48504$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48505    fi
48506    ALSA_CFLAGS=
48507    ALSA_LIBS=
48508  else
48509    ALSA_FOUND=no
48510
48511    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48512      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48513    fi
48514
48515    if test "x${with_alsa}" != x; then
48516      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48517      ALSA_CFLAGS="-I${with_alsa}/include"
48518      ALSA_FOUND=yes
48519    fi
48520    if test "x${with_alsa_include}" != x; then
48521      ALSA_CFLAGS="-I${with_alsa_include}"
48522      ALSA_FOUND=yes
48523    fi
48524    if test "x${with_alsa_lib}" != x; then
48525      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48526      ALSA_FOUND=yes
48527    fi
48528    if test "x$ALSA_FOUND" = xno; then
48529
48530
48531  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48532    # Source the builddeps file again, to make sure it uses the latest variables!
48533    . $builddepsfile
48534    # Look for a target and build machine specific resource!
48535    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48536    if test "x$resource" = x; then
48537      # Ok, lets instead look for a target specific resource
48538      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48539    fi
48540    if test "x$resource" = x; then
48541      # Ok, lets instead look for a build specific resource
48542      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48543    fi
48544    if test "x$resource" = x; then
48545      # Ok, lets instead look for a generic resource
48546      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48547      resource=${builddep_alsa}
48548    fi
48549    if test "x$resource" != x; then
48550      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48551$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48552      # If the resource in the builddeps.conf file is an existing directory,
48553      # for example /java/linux/cups
48554      if test -d ${resource}; then
48555        depdir=${resource}
48556      else
48557
48558  # alsa is for example mymodule
48559  # $resource is for example libs/general/libmymod_1_2_3.zip
48560  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48561  # $with_builddeps_dir is for example /localhome/builddeps
48562  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48563  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48564  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48565  filename=`basename $resource`
48566  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48567  filebase=${filename%%.*}
48568  extension=${filename#*.}
48569  installdir=$with_builddeps_dir/$filebase
48570  if test ! -f $installdir/$filename.unpacked; then
48571    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48572$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48573    if test ! -d $installdir; then
48574      mkdir -p $installdir
48575    fi
48576    if test ! -d $installdir; then
48577      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48578    fi
48579    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48580    touch $tmpfile
48581    if test ! -f $tmpfile; then
48582      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48583    fi
48584
48585  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48586  # $tmpfile is the local file name for the downloaded file.
48587  VALID_TOOL=no
48588  if test "x$BDEPS_FTP" = xwget; then
48589    VALID_TOOL=yes
48590    wget -O $tmpfile $with_builddeps_server/$resource
48591  fi
48592  if test "x$BDEPS_FTP" = xlftp; then
48593    VALID_TOOL=yes
48594    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48595  fi
48596  if test "x$BDEPS_FTP" = xftp; then
48597    VALID_TOOL=yes
48598    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48599    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48600    FTPUSERPWD=${FTPSERVER%%@*}
48601    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48602      FTPUSER=${userpwd%%:*}
48603      FTPPWD=${userpwd#*@}
48604      FTPSERVER=${FTPSERVER#*@}
48605    else
48606      FTPUSER=ftp
48607      FTPPWD=ftp
48608    fi
48609    # the "pass" command does not work on some
48610    # ftp clients (read ftp.exe) but if it works,
48611    # passive mode is better!
48612    ( \
48613        echo "user $FTPUSER $FTPPWD"        ; \
48614        echo "pass"                         ; \
48615        echo "bin"                          ; \
48616        echo "get $FTPPATH $tmpfile"              ; \
48617    ) | ftp -in $FTPSERVER
48618  fi
48619  if test "x$VALID_TOOL" != xyes; then
48620    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48621  fi
48622
48623    mv $tmpfile $installdir/$filename
48624    if test ! -s $installdir/$filename; then
48625      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48626    fi
48627    case "$extension" in
48628      zip)  echo "Unzipping $installdir/$filename..."
48629        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48630        ;;
48631      tar.gz) echo "Untaring $installdir/$filename..."
48632        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48633        ;;
48634      tgz) echo "Untaring $installdir/$filename..."
48635        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48636        ;;
48637      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48638        ;;
48639    esac
48640  fi
48641  if test -f $installdir/$filename.unpacked; then
48642    depdir=$installdir
48643  fi
48644
48645      fi
48646      # Source the builddeps file again, because in the previous command, the depdir
48647      # was updated to point at the current build dependency install directory.
48648      . $builddepsfile
48649      # Now extract variables from the builddeps.conf files.
48650      theroot=${builddep_alsa_ROOT}
48651      thecflags=${builddep_alsa_CFLAGS}
48652      thelibs=${builddep_alsa_LIBS}
48653      if test "x$depdir" = x; then
48654        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48655      fi
48656      ALSA=$depdir
48657      if test "x$theroot" != x; then
48658        ALSA="$theroot"
48659      fi
48660      if test "x$thecflags" != x; then
48661        ALSA_CFLAGS="$thecflags"
48662      fi
48663      if test "x$thelibs" != x; then
48664        ALSA_LIBS="$thelibs"
48665      fi
48666      ALSA_FOUND=yes
48667      else ALSA_FOUND=no
48668
48669    fi
48670    else ALSA_FOUND=no
48671
48672  fi
48673
48674    fi
48675    # Do not try pkg-config if we have a sysroot set.
48676    if test "x$SYSROOT" = x; then
48677      if test "x$ALSA_FOUND" = xno; then
48678
48679pkg_failed=no
48680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48681$as_echo_n "checking for ALSA... " >&6; }
48682
48683if test -n "$ALSA_CFLAGS"; then
48684    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48685 elif test -n "$PKG_CONFIG"; then
48686    if test -n "$PKG_CONFIG" && \
48687    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48688  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48689  ac_status=$?
48690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48691  test $ac_status = 0; }; then
48692  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48693else
48694  pkg_failed=yes
48695fi
48696 else
48697    pkg_failed=untried
48698fi
48699if test -n "$ALSA_LIBS"; then
48700    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48701 elif test -n "$PKG_CONFIG"; then
48702    if test -n "$PKG_CONFIG" && \
48703    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48704  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48705  ac_status=$?
48706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48707  test $ac_status = 0; }; then
48708  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48709else
48710  pkg_failed=yes
48711fi
48712 else
48713    pkg_failed=untried
48714fi
48715
48716
48717
48718if test $pkg_failed = yes; then
48719
48720if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48721        _pkg_short_errors_supported=yes
48722else
48723        _pkg_short_errors_supported=no
48724fi
48725        if test $_pkg_short_errors_supported = yes; then
48726	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48727        else
48728	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48729        fi
48730	# Put the nasty error message in config.log where it belongs
48731	echo "$ALSA_PKG_ERRORS" >&5
48732
48733	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48734$as_echo "no" >&6; }
48735                ALSA_FOUND=no
48736elif test $pkg_failed = untried; then
48737	ALSA_FOUND=no
48738else
48739	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48740	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48742$as_echo "yes" >&6; }
48743	ALSA_FOUND=yes
48744fi
48745      fi
48746    fi
48747    if test "x$ALSA_FOUND" = xno; then
48748      for ac_header in alsa/asoundlib.h
48749do :
48750  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48751if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48752  cat >>confdefs.h <<_ACEOF
48753#define HAVE_ALSA_ASOUNDLIB_H 1
48754_ACEOF
48755
48756            ALSA_FOUND=yes
48757            ALSA_CFLAGS=-Iignoreme
48758            ALSA_LIBS=-lasound
48759            DEFAULT_ALSA=yes
48760
48761else
48762  ALSA_FOUND=no
48763fi
48764
48765done
48766
48767    fi
48768    if test "x$ALSA_FOUND" = xno; then
48769
48770  # Print a helpful message on how to acquire the necessary build dependency.
48771  # alsa is the help tag: freetype, cups, pulse, alsa etc
48772  MISSING_DEPENDENCY=alsa
48773
48774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48775    cygwin_help $MISSING_DEPENDENCY
48776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48777    msys_help $MISSING_DEPENDENCY
48778  else
48779    PKGHANDLER_COMMAND=
48780
48781    case $PKGHANDLER in
48782      apt-get)
48783        apt_help     $MISSING_DEPENDENCY ;;
48784      yum)
48785        yum_help     $MISSING_DEPENDENCY ;;
48786      port)
48787        port_help    $MISSING_DEPENDENCY ;;
48788      pkgutil)
48789        pkgutil_help $MISSING_DEPENDENCY ;;
48790      pkgadd)
48791        pkgadd_help  $MISSING_DEPENDENCY ;;
48792    esac
48793
48794    if test "x$PKGHANDLER_COMMAND" != x; then
48795      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48796    fi
48797  fi
48798
48799      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48800    fi
48801  fi
48802
48803
48804
48805
48806
48807
48808  ###############################################################################
48809  #
48810  # Check for the jpeg library
48811  #
48812
48813
48814# Check whether --with-libjpeg was given.
48815if test "${with_libjpeg+set}" = set; then :
48816  withval=$with_libjpeg;
48817fi
48818
48819
48820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48821$as_echo_n "checking for which libjpeg to use... " >&6; }
48822
48823  # default is bundled
48824  DEFAULT_LIBJPEG=bundled
48825
48826  #
48827  # if user didn't specify, use DEFAULT_LIBJPEG
48828  #
48829  if test "x${with_libjpeg}" = "x"; then
48830    with_libjpeg=${DEFAULT_LIBJPEG}
48831  fi
48832
48833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48834$as_echo "${with_libjpeg}" >&6; }
48835
48836  if test "x${with_libjpeg}" = "xbundled"; then
48837    USE_EXTERNAL_LIBJPEG=false
48838  elif test "x${with_libjpeg}" = "xsystem"; then
48839    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48840if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48841
48842else
48843   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48844fi
48845
48846
48847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48848$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48849if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  ac_check_lib_save_LIBS=$LIBS
48853LIBS="-ljpeg  $LIBS"
48854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856
48857/* Override any GCC internal prototype to avoid an error.
48858   Use char because int might match the return type of a GCC
48859   builtin and then its argument prototype would still apply.  */
48860#ifdef __cplusplus
48861extern "C"
48862#endif
48863char jpeg_CreateDecompress ();
48864int
48865main ()
48866{
48867return jpeg_CreateDecompress ();
48868  ;
48869  return 0;
48870}
48871_ACEOF
48872if ac_fn_cxx_try_link "$LINENO"; then :
48873  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48874else
48875  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48876fi
48877rm -f core conftest.err conftest.$ac_objext \
48878    conftest$ac_exeext conftest.$ac_ext
48879LIBS=$ac_check_lib_save_LIBS
48880fi
48881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48882$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48883if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48884  cat >>confdefs.h <<_ACEOF
48885#define HAVE_LIBJPEG 1
48886_ACEOF
48887
48888  LIBS="-ljpeg $LIBS"
48889
48890else
48891   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48892fi
48893
48894
48895    USE_EXTERNAL_LIBJPEG=true
48896  else
48897    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48898  fi
48899
48900
48901
48902  ###############################################################################
48903  #
48904  # Check for the gif library
48905  #
48906
48907
48908# Check whether --with-giflib was given.
48909if test "${with_giflib+set}" = set; then :
48910  withval=$with_giflib;
48911fi
48912
48913
48914
48915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48916$as_echo_n "checking for which giflib to use... " >&6; }
48917
48918  # default is bundled
48919  DEFAULT_GIFLIB=bundled
48920
48921  #
48922  # if user didn't specify, use DEFAULT_GIFLIB
48923  #
48924  if test "x${with_giflib}" = "x"; then
48925    with_giflib=${DEFAULT_GIFLIB}
48926  fi
48927
48928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48929$as_echo "${with_giflib}" >&6; }
48930
48931  if test "x${with_giflib}" = "xbundled"; then
48932    USE_EXTERNAL_LIBGIF=false
48933  elif test "x${with_giflib}" = "xsystem"; then
48934    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48935if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48936
48937else
48938   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48939fi
48940
48941
48942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48943$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48944if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48945  $as_echo_n "(cached) " >&6
48946else
48947  ac_check_lib_save_LIBS=$LIBS
48948LIBS="-lgif  $LIBS"
48949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48950/* end confdefs.h.  */
48951
48952/* Override any GCC internal prototype to avoid an error.
48953   Use char because int might match the return type of a GCC
48954   builtin and then its argument prototype would still apply.  */
48955#ifdef __cplusplus
48956extern "C"
48957#endif
48958char DGifGetCode ();
48959int
48960main ()
48961{
48962return DGifGetCode ();
48963  ;
48964  return 0;
48965}
48966_ACEOF
48967if ac_fn_cxx_try_link "$LINENO"; then :
48968  ac_cv_lib_gif_DGifGetCode=yes
48969else
48970  ac_cv_lib_gif_DGifGetCode=no
48971fi
48972rm -f core conftest.err conftest.$ac_objext \
48973    conftest$ac_exeext conftest.$ac_ext
48974LIBS=$ac_check_lib_save_LIBS
48975fi
48976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48977$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48978if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48979  cat >>confdefs.h <<_ACEOF
48980#define HAVE_LIBGIF 1
48981_ACEOF
48982
48983  LIBS="-lgif $LIBS"
48984
48985else
48986   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48987fi
48988
48989
48990    USE_EXTERNAL_LIBGIF=true
48991  else
48992    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48993  fi
48994
48995
48996  ###############################################################################
48997  #
48998  # Check for the lcms2 library
48999  #
49000
49001
49002# Check whether --with-lcms was given.
49003if test "${with_lcms+set}" = set; then :
49004  withval=$with_lcms;
49005fi
49006
49007
49008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49009$as_echo_n "checking for which lcms to use... " >&6; }
49010
49011  DEFAULT_LCMS=bundled
49012
49013  #
49014  # If user didn't specify, use DEFAULT_LCMS
49015  #
49016  if test "x${with_lcms}" = "x"; then
49017      with_lcms=${DEFAULT_LCMS}
49018  fi
49019
49020  if test "x${with_lcms}" = "xbundled"; then
49021    USE_EXTERNAL_LCMS=false
49022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49023$as_echo "bundled" >&6; }
49024  elif test "x${with_lcms}" = "xsystem"; then
49025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49026$as_echo "system" >&6; }
49027
49028pkg_failed=no
49029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49030$as_echo_n "checking for LCMS... " >&6; }
49031
49032if test -n "$LCMS_CFLAGS"; then
49033    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49034 elif test -n "$PKG_CONFIG"; then
49035    if test -n "$PKG_CONFIG" && \
49036    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49037  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49038  ac_status=$?
49039  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49040  test $ac_status = 0; }; then
49041  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49042else
49043  pkg_failed=yes
49044fi
49045 else
49046    pkg_failed=untried
49047fi
49048if test -n "$LCMS_LIBS"; then
49049    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49050 elif test -n "$PKG_CONFIG"; then
49051    if test -n "$PKG_CONFIG" && \
49052    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49053  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49054  ac_status=$?
49055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49056  test $ac_status = 0; }; then
49057  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49058else
49059  pkg_failed=yes
49060fi
49061 else
49062    pkg_failed=untried
49063fi
49064
49065
49066
49067if test $pkg_failed = yes; then
49068
49069if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49070        _pkg_short_errors_supported=yes
49071else
49072        _pkg_short_errors_supported=no
49073fi
49074        if test $_pkg_short_errors_supported = yes; then
49075	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49076        else
49077	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49078        fi
49079	# Put the nasty error message in config.log where it belongs
49080	echo "$LCMS_PKG_ERRORS" >&5
49081
49082	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49083$as_echo "no" >&6; }
49084                LCMS_FOUND=no
49085elif test $pkg_failed = untried; then
49086	LCMS_FOUND=no
49087else
49088	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49089	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49091$as_echo "yes" >&6; }
49092	LCMS_FOUND=yes
49093fi
49094    if test "x${LCMS_FOUND}" = "xyes"; then
49095      USE_EXTERNAL_LCMS=true
49096    else
49097      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49098    fi
49099  else
49100    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49101  fi
49102
49103
49104
49105  ###############################################################################
49106  #
49107  # Check for the png library
49108  #
49109
49110
49111# Check whether --with-libpng was given.
49112if test "${with_libpng+set}" = set; then :
49113  withval=$with_libpng;
49114fi
49115
49116
49117
49118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49119$as_echo_n "checking for which libpng to use... " >&6; }
49120
49121  # default is bundled
49122  DEFAULT_LIBPNG=bundled
49123
49124  #
49125  # if user didn't specify, use DEFAULT_LIBPNG
49126  #
49127  if test "x${with_libpng}" = "x"; then
49128      with_libpng=${DEFAULT_LIBPNG}
49129  fi
49130
49131  if test "x${with_libpng}" = "xbundled"; then
49132      USE_EXTERNAL_LIBPNG=false
49133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49134$as_echo "bundled" >&6; }
49135  elif test "x${with_libpng}" = "xsystem"; then
49136
49137pkg_failed=no
49138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49139$as_echo_n "checking for PNG... " >&6; }
49140
49141if test -n "$PNG_CFLAGS"; then
49142    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49143 elif test -n "$PKG_CONFIG"; then
49144    if test -n "$PKG_CONFIG" && \
49145    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49146  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49147  ac_status=$?
49148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49149  test $ac_status = 0; }; then
49150  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49151else
49152  pkg_failed=yes
49153fi
49154 else
49155    pkg_failed=untried
49156fi
49157if test -n "$PNG_LIBS"; then
49158    pkg_cv_PNG_LIBS="$PNG_LIBS"
49159 elif test -n "$PKG_CONFIG"; then
49160    if test -n "$PKG_CONFIG" && \
49161    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49162  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49163  ac_status=$?
49164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49165  test $ac_status = 0; }; then
49166  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49167else
49168  pkg_failed=yes
49169fi
49170 else
49171    pkg_failed=untried
49172fi
49173
49174
49175
49176if test $pkg_failed = yes; then
49177
49178if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49179        _pkg_short_errors_supported=yes
49180else
49181        _pkg_short_errors_supported=no
49182fi
49183        if test $_pkg_short_errors_supported = yes; then
49184	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49185        else
49186	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49187        fi
49188	# Put the nasty error message in config.log where it belongs
49189	echo "$PNG_PKG_ERRORS" >&5
49190
49191	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49192$as_echo "no" >&6; }
49193                 LIBPNG_FOUND=no
49194elif test $pkg_failed = untried; then
49195	 LIBPNG_FOUND=no
49196else
49197	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49198	PNG_LIBS=$pkg_cv_PNG_LIBS
49199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49200$as_echo "yes" >&6; }
49201	 LIBPNG_FOUND=yes
49202fi
49203      if test "x${LIBPNG_FOUND}" = "xyes"; then
49204          USE_EXTERNAL_LIBPNG=true
49205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49206$as_echo "system" >&6; }
49207      else
49208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49209$as_echo "system not found" >&6; }
49210          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49211      fi
49212  else
49213      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49214  fi
49215
49216
49217  ###############################################################################
49218  #
49219  # Check for the zlib library
49220  #
49221
49222
49223# Check whether --with-zlib was given.
49224if test "${with_zlib+set}" = set; then :
49225  withval=$with_zlib;
49226fi
49227
49228
49229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49230$as_echo_n "checking for compress in -lz... " >&6; }
49231if ${ac_cv_lib_z_compress+:} false; then :
49232  $as_echo_n "(cached) " >&6
49233else
49234  ac_check_lib_save_LIBS=$LIBS
49235LIBS="-lz  $LIBS"
49236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49237/* end confdefs.h.  */
49238
49239/* Override any GCC internal prototype to avoid an error.
49240   Use char because int might match the return type of a GCC
49241   builtin and then its argument prototype would still apply.  */
49242#ifdef __cplusplus
49243extern "C"
49244#endif
49245char compress ();
49246int
49247main ()
49248{
49249return compress ();
49250  ;
49251  return 0;
49252}
49253_ACEOF
49254if ac_fn_cxx_try_link "$LINENO"; then :
49255  ac_cv_lib_z_compress=yes
49256else
49257  ac_cv_lib_z_compress=no
49258fi
49259rm -f core conftest.err conftest.$ac_objext \
49260    conftest$ac_exeext conftest.$ac_ext
49261LIBS=$ac_check_lib_save_LIBS
49262fi
49263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49264$as_echo "$ac_cv_lib_z_compress" >&6; }
49265if test "x$ac_cv_lib_z_compress" = xyes; then :
49266   ZLIB_FOUND=yes
49267else
49268   ZLIB_FOUND=no
49269fi
49270
49271
49272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49273$as_echo_n "checking for which zlib to use... " >&6; }
49274
49275  DEFAULT_ZLIB=bundled
49276  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49277    #
49278    # On macosx default is system...on others default is
49279    #
49280    DEFAULT_ZLIB=system
49281  fi
49282
49283  if test "x${ZLIB_FOUND}" != "xyes"; then
49284    #
49285    # If we don't find any system...set default to bundled
49286    #
49287    DEFAULT_ZLIB=bundled
49288  fi
49289
49290  #
49291  # If user didn't specify, use DEFAULT_ZLIB
49292  #
49293  if test "x${with_zlib}" = "x"; then
49294    with_zlib=${DEFAULT_ZLIB}
49295  fi
49296
49297  if test "x${with_zlib}" = "xbundled"; then
49298    USE_EXTERNAL_LIBZ=false
49299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49300$as_echo "bundled" >&6; }
49301  elif test "x${with_zlib}" = "xsystem"; then
49302    if test "x${ZLIB_FOUND}" = "xyes"; then
49303      USE_EXTERNAL_LIBZ=true
49304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49305$as_echo "system" >&6; }
49306    else
49307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49308$as_echo "system not found" >&6; }
49309      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49310    fi
49311  else
49312    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49313  fi
49314
49315
49316
49317  ###############################################################################
49318  LIBZIP_CAN_USE_MMAP=true
49319
49320
49321
49322  ###############################################################################
49323  #
49324  # Check if altzone exists in time.h
49325  #
49326
49327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49328/* end confdefs.h.  */
49329#include <time.h>
49330int
49331main ()
49332{
49333return (int)altzone;
49334  ;
49335  return 0;
49336}
49337_ACEOF
49338if ac_fn_cxx_try_link "$LINENO"; then :
49339  has_altzone=yes
49340else
49341  has_altzone=no
49342fi
49343rm -f core conftest.err conftest.$ac_objext \
49344    conftest$ac_exeext conftest.$ac_ext
49345  if test "x$has_altzone" = xyes; then
49346
49347$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49348
49349  fi
49350
49351  ###############################################################################
49352  #
49353  # Check the maths library
49354  #
49355
49356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49357$as_echo_n "checking for cos in -lm... " >&6; }
49358if ${ac_cv_lib_m_cos+:} false; then :
49359  $as_echo_n "(cached) " >&6
49360else
49361  ac_check_lib_save_LIBS=$LIBS
49362LIBS="-lm  $LIBS"
49363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49364/* end confdefs.h.  */
49365
49366/* Override any GCC internal prototype to avoid an error.
49367   Use char because int might match the return type of a GCC
49368   builtin and then its argument prototype would still apply.  */
49369#ifdef __cplusplus
49370extern "C"
49371#endif
49372char cos ();
49373int
49374main ()
49375{
49376return cos ();
49377  ;
49378  return 0;
49379}
49380_ACEOF
49381if ac_fn_cxx_try_link "$LINENO"; then :
49382  ac_cv_lib_m_cos=yes
49383else
49384  ac_cv_lib_m_cos=no
49385fi
49386rm -f core conftest.err conftest.$ac_objext \
49387    conftest$ac_exeext conftest.$ac_ext
49388LIBS=$ac_check_lib_save_LIBS
49389fi
49390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49391$as_echo "$ac_cv_lib_m_cos" >&6; }
49392if test "x$ac_cv_lib_m_cos" = xyes; then :
49393  cat >>confdefs.h <<_ACEOF
49394#define HAVE_LIBM 1
49395_ACEOF
49396
49397  LIBS="-lm $LIBS"
49398
49399else
49400
49401        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49402$as_echo "$as_me: Maths library was not found" >&6;}
49403
49404
49405fi
49406
49407
49408
49409  ###############################################################################
49410  #
49411  # Check for libdl.so
49412
49413  save_LIBS="$LIBS"
49414  LIBS=""
49415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49416$as_echo_n "checking for dlopen in -ldl... " >&6; }
49417if ${ac_cv_lib_dl_dlopen+:} false; then :
49418  $as_echo_n "(cached) " >&6
49419else
49420  ac_check_lib_save_LIBS=$LIBS
49421LIBS="-ldl  $LIBS"
49422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49423/* end confdefs.h.  */
49424
49425/* Override any GCC internal prototype to avoid an error.
49426   Use char because int might match the return type of a GCC
49427   builtin and then its argument prototype would still apply.  */
49428#ifdef __cplusplus
49429extern "C"
49430#endif
49431char dlopen ();
49432int
49433main ()
49434{
49435return dlopen ();
49436  ;
49437  return 0;
49438}
49439_ACEOF
49440if ac_fn_cxx_try_link "$LINENO"; then :
49441  ac_cv_lib_dl_dlopen=yes
49442else
49443  ac_cv_lib_dl_dlopen=no
49444fi
49445rm -f core conftest.err conftest.$ac_objext \
49446    conftest$ac_exeext conftest.$ac_ext
49447LIBS=$ac_check_lib_save_LIBS
49448fi
49449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49450$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49451if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49452  cat >>confdefs.h <<_ACEOF
49453#define HAVE_LIBDL 1
49454_ACEOF
49455
49456  LIBS="-ldl $LIBS"
49457
49458fi
49459
49460  LIBDL="$LIBS"
49461
49462  LIBS="$save_LIBS"
49463
49464
49465  ###############################################################################
49466  #
49467  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49468  # dynamic build is configured on command line.
49469  #
49470
49471# Check whether --with-stdc++lib was given.
49472if test "${with_stdc__lib+set}" = set; then :
49473  withval=$with_stdc__lib;
49474        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49475                && test "x$with_stdc__lib" != xdefault; then
49476          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49477        fi
49478
49479else
49480  with_stdc__lib=default
49481
49482fi
49483
49484
49485  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49486    # Test if -lstdc++ works.
49487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49488$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49489    ac_ext=cpp
49490ac_cpp='$CXXCPP $CPPFLAGS'
49491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49494
49495    OLD_CXXFLAGS="$CXXFLAGS"
49496    CXXFLAGS="$CXXFLAGS -lstdc++"
49497    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49498/* end confdefs.h.  */
49499
49500int
49501main ()
49502{
49503return 0;
49504  ;
49505  return 0;
49506}
49507_ACEOF
49508if ac_fn_cxx_try_link "$LINENO"; then :
49509  has_dynamic_libstdcxx=yes
49510else
49511  has_dynamic_libstdcxx=no
49512fi
49513rm -f core conftest.err conftest.$ac_objext \
49514    conftest$ac_exeext conftest.$ac_ext
49515    CXXFLAGS="$OLD_CXXFLAGS"
49516    ac_ext=cpp
49517ac_cpp='$CXXCPP $CPPFLAGS'
49518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49521
49522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49523$as_echo "$has_dynamic_libstdcxx" >&6; }
49524
49525    # Test if stdc++ can be linked statically.
49526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49527$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49528    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49529    ac_ext=cpp
49530ac_cpp='$CXXCPP $CPPFLAGS'
49531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49534
49535    OLD_LIBS="$LIBS"
49536    OLD_CXX="$CXX"
49537    LIBS="$STATIC_STDCXX_FLAGS"
49538    CXX="$CC"
49539    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49540/* end confdefs.h.  */
49541
49542int
49543main ()
49544{
49545return 0;
49546  ;
49547  return 0;
49548}
49549_ACEOF
49550if ac_fn_cxx_try_link "$LINENO"; then :
49551  has_static_libstdcxx=yes
49552else
49553  has_static_libstdcxx=no
49554fi
49555rm -f core conftest.err conftest.$ac_objext \
49556    conftest$ac_exeext conftest.$ac_ext
49557    LIBS="$OLD_LIBS"
49558    CXX="$OLD_CXX"
49559    ac_ext=cpp
49560ac_cpp='$CXXCPP $CPPFLAGS'
49561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49564
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49566$as_echo "$has_static_libstdcxx" >&6; }
49567
49568    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49569      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49570    fi
49571
49572    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49573      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49574    fi
49575
49576    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49577      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49578    fi
49579
49580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49581$as_echo_n "checking how to link with libstdc++... " >&6; }
49582    # If dynamic was requested, it's available since it would fail above otherwise.
49583    # If dynamic wasn't requested, go with static unless it isn't available.
49584    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49585      LIBCXX="$LIBCXX -lstdc++"
49586      LDCXX="$CXX"
49587      STATIC_CXX_SETTING="STATIC_CXX=false"
49588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49589$as_echo "dynamic" >&6; }
49590    else
49591      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49592      LDCXX="$CC"
49593      STATIC_CXX_SETTING="STATIC_CXX=true"
49594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49595$as_echo "static" >&6; }
49596    fi
49597  fi
49598
49599
49600  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49601    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49602
49603pkg_failed=no
49604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49605$as_echo_n "checking for LIBFFI... " >&6; }
49606
49607if test -n "$LIBFFI_CFLAGS"; then
49608    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49609 elif test -n "$PKG_CONFIG"; then
49610    if test -n "$PKG_CONFIG" && \
49611    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49612  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49613  ac_status=$?
49614  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49615  test $ac_status = 0; }; then
49616  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49617else
49618  pkg_failed=yes
49619fi
49620 else
49621    pkg_failed=untried
49622fi
49623if test -n "$LIBFFI_LIBS"; then
49624    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49625 elif test -n "$PKG_CONFIG"; then
49626    if test -n "$PKG_CONFIG" && \
49627    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49628  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49629  ac_status=$?
49630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49631  test $ac_status = 0; }; then
49632  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49633else
49634  pkg_failed=yes
49635fi
49636 else
49637    pkg_failed=untried
49638fi
49639
49640
49641
49642if test $pkg_failed = yes; then
49643
49644if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49645        _pkg_short_errors_supported=yes
49646else
49647        _pkg_short_errors_supported=no
49648fi
49649        if test $_pkg_short_errors_supported = yes; then
49650	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49651        else
49652	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49653        fi
49654	# Put the nasty error message in config.log where it belongs
49655	echo "$LIBFFI_PKG_ERRORS" >&5
49656
49657	as_fn_error $? "Package requirements (libffi) were not met:
49658
49659$LIBFFI_PKG_ERRORS
49660
49661Consider adjusting the PKG_CONFIG_PATH environment variable if you
49662installed software in a non-standard prefix.
49663
49664Alternatively, you may set the environment variables LIBFFI_CFLAGS
49665and LIBFFI_LIBS to avoid the need to call pkg-config.
49666See the pkg-config man page for more details.
49667" "$LINENO" 5
49668elif test $pkg_failed = untried; then
49669	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49671as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49672is in your PATH or set the PKG_CONFIG environment variable to the full
49673path to pkg-config.
49674
49675Alternatively, you may set the environment variables LIBFFI_CFLAGS
49676and LIBFFI_LIBS to avoid the need to call pkg-config.
49677See the pkg-config man page for more details.
49678
49679To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49680See \`config.log' for more details" "$LINENO" 5; }
49681else
49682	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49683	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49685$as_echo "yes" >&6; }
49686	:
49687fi
49688
49689  fi
49690
49691  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49692    # Extract the first word of "llvm-config", so it can be a program name with args.
49693set dummy llvm-config; ac_word=$2
49694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49695$as_echo_n "checking for $ac_word... " >&6; }
49696if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49697  $as_echo_n "(cached) " >&6
49698else
49699  if test -n "$LLVM_CONFIG"; then
49700  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49701else
49702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49703for as_dir in $PATH
49704do
49705  IFS=$as_save_IFS
49706  test -z "$as_dir" && as_dir=.
49707    for ac_exec_ext in '' $ac_executable_extensions; do
49708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49709    ac_cv_prog_LLVM_CONFIG="llvm-config"
49710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49711    break 2
49712  fi
49713done
49714  done
49715IFS=$as_save_IFS
49716
49717fi
49718fi
49719LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49720if test -n "$LLVM_CONFIG"; then
49721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49722$as_echo "$LLVM_CONFIG" >&6; }
49723else
49724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49725$as_echo "no" >&6; }
49726fi
49727
49728
49729
49730    if test "x$LLVM_CONFIG" != xllvm-config; then
49731      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49732    fi
49733
49734    llvm_components="jit mcjit engine nativecodegen native"
49735    unset LLVM_CFLAGS
49736    for flag in $("$LLVM_CONFIG" --cxxflags); do
49737      if echo "${flag}" | grep -q '^-[ID]'; then
49738        if test "${flag}" != "-D_DEBUG" ; then
49739          if test "${LLVM_CFLAGS}" != "" ; then
49740            LLVM_CFLAGS="${LLVM_CFLAGS} "
49741          fi
49742          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49743        fi
49744      fi
49745    done
49746    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49747    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49748
49749    unset LLVM_LDFLAGS
49750    for flag in $("${LLVM_CONFIG}" --ldflags); do
49751      if echo "${flag}" | grep -q '^-L'; then
49752        if test "${LLVM_LDFLAGS}" != ""; then
49753          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49754        fi
49755        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49756      fi
49757    done
49758
49759    unset LLVM_LIBS
49760    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49761      if echo "${flag}" | grep -q '^-l'; then
49762        if test "${LLVM_LIBS}" != ""; then
49763          LLVM_LIBS="${LLVM_LIBS} "
49764        fi
49765        LLVM_LIBS="${LLVM_LIBS}${flag}"
49766      fi
49767    done
49768
49769
49770
49771
49772  fi
49773
49774  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49775  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49776    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49777  fi
49778
49779  # TODO better (platform agnostic) test
49780  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49781    LIBCXX="-lstdc++"
49782  fi
49783
49784
49785
49786
49787  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49788
49789
49790# Check whether --with-msvcr-dll was given.
49791if test "${with_msvcr_dll+set}" = set; then :
49792  withval=$with_msvcr_dll;
49793fi
49794
49795
49796  if test "x$with_msvcr_dll" != x; then
49797    # If given explicitely by user, do not probe. If not present, fail directly.
49798
49799  DLL_NAME="$MSVCR_NAME"
49800  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49801  METHOD="--with-msvcr-dll"
49802  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49804$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49805
49806    # Need to check if the found msvcr is correct architecture
49807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49808$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49809    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49811      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49812      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49814        CORRECT_MSVCR_ARCH="PE32 executable"
49815      else
49816        CORRECT_MSVCR_ARCH="PE32+ executable"
49817      fi
49818    else
49819      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49820        CORRECT_MSVCR_ARCH=386
49821      else
49822        CORRECT_MSVCR_ARCH=x86-64
49823      fi
49824    fi
49825    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49827$as_echo "ok" >&6; }
49828      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49829
49830  # Only process if variable expands to non-empty
49831
49832  if test "x$MSVC_DLL" != x; then
49833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49834
49835  # Input might be given as Windows format, start by converting to
49836  # unix format.
49837  path="$MSVC_DLL"
49838  new_path=`$CYGPATH -u "$path"`
49839
49840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49843  # "foo.exe" is OK but "foo" is an error.
49844  #
49845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49846  # It is also a way to make sure we got the proper file name for the real test later on.
49847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49848  if test "x$test_shortpath" = x; then
49849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49850$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49851    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49852  fi
49853
49854  # Call helper function which possibly converts this using DOS-style short mode.
49855  # If so, the updated path is stored in $new_path.
49856
49857  input_path="$new_path"
49858  # Check if we need to convert this using DOS-style short mode. If the path
49859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49860  # take no chances and rewrite it.
49861  # Note: m4 eats our [], so we need to use [ and ] instead.
49862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49863  if test "x$has_forbidden_chars" != x; then
49864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49868      # Going to short mode and back again did indeed matter. Since short mode is
49869      # case insensitive, let's make it lowercase to improve readability.
49870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49871      # Now convert it back to Unix-style (cygpath)
49872      input_path=`$CYGPATH -u "$shortmode_path"`
49873      new_path="$input_path"
49874    fi
49875  fi
49876
49877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49878  if test "x$test_cygdrive_prefix" = x; then
49879    # As a simple fix, exclude /usr/bin since it's not a real path.
49880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49882      # a path prefixed by /cygdrive for fixpath to work.
49883      new_path="$CYGWIN_ROOT_PATH$input_path"
49884    fi
49885  fi
49886
49887
49888  if test "x$path" != "x$new_path"; then
49889    MSVC_DLL="$new_path"
49890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49891$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49892  fi
49893
49894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49895
49896  path="$MSVC_DLL"
49897  has_colon=`$ECHO $path | $GREP ^.:`
49898  new_path="$path"
49899  if test "x$has_colon" = x; then
49900    # Not in mixed or Windows style, start by that.
49901    new_path=`cmd //c echo $path`
49902  fi
49903
49904
49905  input_path="$new_path"
49906  # Check if we need to convert this using DOS-style short mode. If the path
49907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49908  # take no chances and rewrite it.
49909  # Note: m4 eats our [], so we need to use [ and ] instead.
49910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49911  if test "x$has_forbidden_chars" != x; then
49912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49914  fi
49915
49916
49917  windows_path="$new_path"
49918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49919    unix_path=`$CYGPATH -u "$windows_path"`
49920    new_path="$unix_path"
49921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49923    new_path="$unix_path"
49924  fi
49925
49926  if test "x$path" != "x$new_path"; then
49927    MSVC_DLL="$new_path"
49928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49929$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49930  fi
49931
49932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49934
49935    else
49936      # We're on a unix platform. Hooray! :)
49937      path="$MSVC_DLL"
49938      has_space=`$ECHO "$path" | $GREP " "`
49939      if test "x$has_space" != x; then
49940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49941$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49943      fi
49944
49945      # Use eval to expand a potential ~
49946      eval path="$path"
49947      if test ! -f "$path" && test ! -d "$path"; then
49948        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49949      fi
49950
49951      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49952    fi
49953  fi
49954
49955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49956$as_echo_n "checking for $DLL_NAME... " >&6; }
49957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49958$as_echo "$MSVC_DLL" >&6; }
49959    else
49960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49961$as_echo "incorrect, ignoring" >&6; }
49962      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49963$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49964    fi
49965  fi
49966
49967    if test "x$MSVC_DLL" = x; then
49968      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49969    fi
49970    MSVCR_DLL="$MSVC_DLL"
49971  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49972
49973  DLL_NAME="$MSVCR_NAME"
49974  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49975  METHOD="devkit"
49976  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49977    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49978$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49979
49980    # Need to check if the found msvcr is correct architecture
49981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49982$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49983    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49985      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49986      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49987      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49988        CORRECT_MSVCR_ARCH="PE32 executable"
49989      else
49990        CORRECT_MSVCR_ARCH="PE32+ executable"
49991      fi
49992    else
49993      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49994        CORRECT_MSVCR_ARCH=386
49995      else
49996        CORRECT_MSVCR_ARCH=x86-64
49997      fi
49998    fi
49999    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50001$as_echo "ok" >&6; }
50002      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50003
50004  # Only process if variable expands to non-empty
50005
50006  if test "x$MSVC_DLL" != x; then
50007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50008
50009  # Input might be given as Windows format, start by converting to
50010  # unix format.
50011  path="$MSVC_DLL"
50012  new_path=`$CYGPATH -u "$path"`
50013
50014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50017  # "foo.exe" is OK but "foo" is an error.
50018  #
50019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50020  # It is also a way to make sure we got the proper file name for the real test later on.
50021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50022  if test "x$test_shortpath" = x; then
50023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50024$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50025    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50026  fi
50027
50028  # Call helper function which possibly converts this using DOS-style short mode.
50029  # If so, the updated path is stored in $new_path.
50030
50031  input_path="$new_path"
50032  # Check if we need to convert this using DOS-style short mode. If the path
50033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50034  # take no chances and rewrite it.
50035  # Note: m4 eats our [], so we need to use [ and ] instead.
50036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50037  if test "x$has_forbidden_chars" != x; then
50038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50042      # Going to short mode and back again did indeed matter. Since short mode is
50043      # case insensitive, let's make it lowercase to improve readability.
50044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50045      # Now convert it back to Unix-style (cygpath)
50046      input_path=`$CYGPATH -u "$shortmode_path"`
50047      new_path="$input_path"
50048    fi
50049  fi
50050
50051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50052  if test "x$test_cygdrive_prefix" = x; then
50053    # As a simple fix, exclude /usr/bin since it's not a real path.
50054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50056      # a path prefixed by /cygdrive for fixpath to work.
50057      new_path="$CYGWIN_ROOT_PATH$input_path"
50058    fi
50059  fi
50060
50061
50062  if test "x$path" != "x$new_path"; then
50063    MSVC_DLL="$new_path"
50064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50065$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50066  fi
50067
50068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069
50070  path="$MSVC_DLL"
50071  has_colon=`$ECHO $path | $GREP ^.:`
50072  new_path="$path"
50073  if test "x$has_colon" = x; then
50074    # Not in mixed or Windows style, start by that.
50075    new_path=`cmd //c echo $path`
50076  fi
50077
50078
50079  input_path="$new_path"
50080  # Check if we need to convert this using DOS-style short mode. If the path
50081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50082  # take no chances and rewrite it.
50083  # Note: m4 eats our [], so we need to use [ and ] instead.
50084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50085  if test "x$has_forbidden_chars" != x; then
50086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50088  fi
50089
50090
50091  windows_path="$new_path"
50092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50093    unix_path=`$CYGPATH -u "$windows_path"`
50094    new_path="$unix_path"
50095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50097    new_path="$unix_path"
50098  fi
50099
50100  if test "x$path" != "x$new_path"; then
50101    MSVC_DLL="$new_path"
50102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50103$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50104  fi
50105
50106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50108
50109    else
50110      # We're on a unix platform. Hooray! :)
50111      path="$MSVC_DLL"
50112      has_space=`$ECHO "$path" | $GREP " "`
50113      if test "x$has_space" != x; then
50114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50115$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50117      fi
50118
50119      # Use eval to expand a potential ~
50120      eval path="$path"
50121      if test ! -f "$path" && test ! -d "$path"; then
50122        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50123      fi
50124
50125      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50126    fi
50127  fi
50128
50129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50130$as_echo_n "checking for $DLL_NAME... " >&6; }
50131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50132$as_echo "$MSVC_DLL" >&6; }
50133    else
50134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50135$as_echo "incorrect, ignoring" >&6; }
50136      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50137$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50138    fi
50139  fi
50140
50141    if test "x$MSVC_DLL" = x; then
50142      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50143    fi
50144    MSVCR_DLL="$MSVC_DLL"
50145  else
50146
50147  DLL_NAME="${MSVCR_NAME}"
50148  MSVC_DLL=
50149
50150  if test "x$MSVC_DLL" = x; then
50151    # Probe: Using well-known location from Visual Studio 10.0
50152    if test "x$VCINSTALLDIR" != x; then
50153      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50154
50155  windows_path="$CYGWIN_VC_INSTALL_DIR"
50156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50157    unix_path=`$CYGPATH -u "$windows_path"`
50158    CYGWIN_VC_INSTALL_DIR="$unix_path"
50159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50161    CYGWIN_VC_INSTALL_DIR="$unix_path"
50162  fi
50163
50164      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50165        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50166      else
50167        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50168      fi
50169      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50170
50171  DLL_NAME="$DLL_NAME"
50172  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50173  METHOD="well-known location in VCINSTALLDIR"
50174  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50176$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50177
50178    # Need to check if the found msvcr is correct architecture
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50180$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50181    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50183      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50184      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50185      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50186        CORRECT_MSVCR_ARCH="PE32 executable"
50187      else
50188        CORRECT_MSVCR_ARCH="PE32+ executable"
50189      fi
50190    else
50191      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50192        CORRECT_MSVCR_ARCH=386
50193      else
50194        CORRECT_MSVCR_ARCH=x86-64
50195      fi
50196    fi
50197    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50199$as_echo "ok" >&6; }
50200      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50201
50202  # Only process if variable expands to non-empty
50203
50204  if test "x$MSVC_DLL" != x; then
50205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50206
50207  # Input might be given as Windows format, start by converting to
50208  # unix format.
50209  path="$MSVC_DLL"
50210  new_path=`$CYGPATH -u "$path"`
50211
50212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50215  # "foo.exe" is OK but "foo" is an error.
50216  #
50217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50218  # It is also a way to make sure we got the proper file name for the real test later on.
50219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50220  if test "x$test_shortpath" = x; then
50221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50222$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50223    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50224  fi
50225
50226  # Call helper function which possibly converts this using DOS-style short mode.
50227  # If so, the updated path is stored in $new_path.
50228
50229  input_path="$new_path"
50230  # Check if we need to convert this using DOS-style short mode. If the path
50231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50232  # take no chances and rewrite it.
50233  # Note: m4 eats our [], so we need to use [ and ] instead.
50234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50235  if test "x$has_forbidden_chars" != x; then
50236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50240      # Going to short mode and back again did indeed matter. Since short mode is
50241      # case insensitive, let's make it lowercase to improve readability.
50242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50243      # Now convert it back to Unix-style (cygpath)
50244      input_path=`$CYGPATH -u "$shortmode_path"`
50245      new_path="$input_path"
50246    fi
50247  fi
50248
50249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50250  if test "x$test_cygdrive_prefix" = x; then
50251    # As a simple fix, exclude /usr/bin since it's not a real path.
50252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50254      # a path prefixed by /cygdrive for fixpath to work.
50255      new_path="$CYGWIN_ROOT_PATH$input_path"
50256    fi
50257  fi
50258
50259
50260  if test "x$path" != "x$new_path"; then
50261    MSVC_DLL="$new_path"
50262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50263$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50264  fi
50265
50266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50267
50268  path="$MSVC_DLL"
50269  has_colon=`$ECHO $path | $GREP ^.:`
50270  new_path="$path"
50271  if test "x$has_colon" = x; then
50272    # Not in mixed or Windows style, start by that.
50273    new_path=`cmd //c echo $path`
50274  fi
50275
50276
50277  input_path="$new_path"
50278  # Check if we need to convert this using DOS-style short mode. If the path
50279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50280  # take no chances and rewrite it.
50281  # Note: m4 eats our [], so we need to use [ and ] instead.
50282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50283  if test "x$has_forbidden_chars" != x; then
50284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50286  fi
50287
50288
50289  windows_path="$new_path"
50290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50291    unix_path=`$CYGPATH -u "$windows_path"`
50292    new_path="$unix_path"
50293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50295    new_path="$unix_path"
50296  fi
50297
50298  if test "x$path" != "x$new_path"; then
50299    MSVC_DLL="$new_path"
50300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50301$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50302  fi
50303
50304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50306
50307    else
50308      # We're on a unix platform. Hooray! :)
50309      path="$MSVC_DLL"
50310      has_space=`$ECHO "$path" | $GREP " "`
50311      if test "x$has_space" != x; then
50312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50313$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50315      fi
50316
50317      # Use eval to expand a potential ~
50318      eval path="$path"
50319      if test ! -f "$path" && test ! -d "$path"; then
50320        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50321      fi
50322
50323      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50324    fi
50325  fi
50326
50327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50328$as_echo_n "checking for $DLL_NAME... " >&6; }
50329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50330$as_echo "$MSVC_DLL" >&6; }
50331    else
50332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50333$as_echo "incorrect, ignoring" >&6; }
50334      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50335$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50336    fi
50337  fi
50338
50339    fi
50340  fi
50341
50342  if test "x$MSVC_DLL" = x; then
50343    # Probe: Check in the Boot JDK directory.
50344    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50345
50346  DLL_NAME="$DLL_NAME"
50347  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50348  METHOD="well-known location in Boot JDK"
50349  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50350    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50351$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50352
50353    # Need to check if the found msvcr is correct architecture
50354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50355$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50356    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50358      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50359      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50360      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50361        CORRECT_MSVCR_ARCH="PE32 executable"
50362      else
50363        CORRECT_MSVCR_ARCH="PE32+ executable"
50364      fi
50365    else
50366      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50367        CORRECT_MSVCR_ARCH=386
50368      else
50369        CORRECT_MSVCR_ARCH=x86-64
50370      fi
50371    fi
50372    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50374$as_echo "ok" >&6; }
50375      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50376
50377  # Only process if variable expands to non-empty
50378
50379  if test "x$MSVC_DLL" != x; then
50380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50381
50382  # Input might be given as Windows format, start by converting to
50383  # unix format.
50384  path="$MSVC_DLL"
50385  new_path=`$CYGPATH -u "$path"`
50386
50387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50390  # "foo.exe" is OK but "foo" is an error.
50391  #
50392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50393  # It is also a way to make sure we got the proper file name for the real test later on.
50394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50395  if test "x$test_shortpath" = x; then
50396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50397$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50398    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50399  fi
50400
50401  # Call helper function which possibly converts this using DOS-style short mode.
50402  # If so, the updated path is stored in $new_path.
50403
50404  input_path="$new_path"
50405  # Check if we need to convert this using DOS-style short mode. If the path
50406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50407  # take no chances and rewrite it.
50408  # Note: m4 eats our [], so we need to use [ and ] instead.
50409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50410  if test "x$has_forbidden_chars" != x; then
50411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50415      # Going to short mode and back again did indeed matter. Since short mode is
50416      # case insensitive, let's make it lowercase to improve readability.
50417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50418      # Now convert it back to Unix-style (cygpath)
50419      input_path=`$CYGPATH -u "$shortmode_path"`
50420      new_path="$input_path"
50421    fi
50422  fi
50423
50424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50425  if test "x$test_cygdrive_prefix" = x; then
50426    # As a simple fix, exclude /usr/bin since it's not a real path.
50427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50429      # a path prefixed by /cygdrive for fixpath to work.
50430      new_path="$CYGWIN_ROOT_PATH$input_path"
50431    fi
50432  fi
50433
50434
50435  if test "x$path" != "x$new_path"; then
50436    MSVC_DLL="$new_path"
50437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50438$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50439  fi
50440
50441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50442
50443  path="$MSVC_DLL"
50444  has_colon=`$ECHO $path | $GREP ^.:`
50445  new_path="$path"
50446  if test "x$has_colon" = x; then
50447    # Not in mixed or Windows style, start by that.
50448    new_path=`cmd //c echo $path`
50449  fi
50450
50451
50452  input_path="$new_path"
50453  # Check if we need to convert this using DOS-style short mode. If the path
50454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50455  # take no chances and rewrite it.
50456  # Note: m4 eats our [], so we need to use [ and ] instead.
50457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50458  if test "x$has_forbidden_chars" != x; then
50459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50461  fi
50462
50463
50464  windows_path="$new_path"
50465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50466    unix_path=`$CYGPATH -u "$windows_path"`
50467    new_path="$unix_path"
50468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50470    new_path="$unix_path"
50471  fi
50472
50473  if test "x$path" != "x$new_path"; then
50474    MSVC_DLL="$new_path"
50475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50476$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50477  fi
50478
50479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50481
50482    else
50483      # We're on a unix platform. Hooray! :)
50484      path="$MSVC_DLL"
50485      has_space=`$ECHO "$path" | $GREP " "`
50486      if test "x$has_space" != x; then
50487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50488$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50490      fi
50491
50492      # Use eval to expand a potential ~
50493      eval path="$path"
50494      if test ! -f "$path" && test ! -d "$path"; then
50495        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50496      fi
50497
50498      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50499    fi
50500  fi
50501
50502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50503$as_echo_n "checking for $DLL_NAME... " >&6; }
50504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50505$as_echo "$MSVC_DLL" >&6; }
50506    else
50507      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50508$as_echo "incorrect, ignoring" >&6; }
50509      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50510$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50511    fi
50512  fi
50513
50514  fi
50515
50516  if test "x$MSVC_DLL" = x; then
50517    # Probe: Look in the Windows system32 directory
50518    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50519
50520  windows_path="$CYGWIN_SYSTEMROOT"
50521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50522    unix_path=`$CYGPATH -u "$windows_path"`
50523    CYGWIN_SYSTEMROOT="$unix_path"
50524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50526    CYGWIN_SYSTEMROOT="$unix_path"
50527  fi
50528
50529    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50530
50531  DLL_NAME="$DLL_NAME"
50532  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50533  METHOD="well-known location in SYSTEMROOT"
50534  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50536$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50537
50538    # Need to check if the found msvcr is correct architecture
50539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50540$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50541    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50543      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50544      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50545      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50546        CORRECT_MSVCR_ARCH="PE32 executable"
50547      else
50548        CORRECT_MSVCR_ARCH="PE32+ executable"
50549      fi
50550    else
50551      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50552        CORRECT_MSVCR_ARCH=386
50553      else
50554        CORRECT_MSVCR_ARCH=x86-64
50555      fi
50556    fi
50557    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50559$as_echo "ok" >&6; }
50560      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50561
50562  # Only process if variable expands to non-empty
50563
50564  if test "x$MSVC_DLL" != x; then
50565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50566
50567  # Input might be given as Windows format, start by converting to
50568  # unix format.
50569  path="$MSVC_DLL"
50570  new_path=`$CYGPATH -u "$path"`
50571
50572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50575  # "foo.exe" is OK but "foo" is an error.
50576  #
50577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50578  # It is also a way to make sure we got the proper file name for the real test later on.
50579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50580  if test "x$test_shortpath" = x; then
50581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50583    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50584  fi
50585
50586  # Call helper function which possibly converts this using DOS-style short mode.
50587  # If so, the updated path is stored in $new_path.
50588
50589  input_path="$new_path"
50590  # Check if we need to convert this using DOS-style short mode. If the path
50591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50592  # take no chances and rewrite it.
50593  # Note: m4 eats our [], so we need to use [ and ] instead.
50594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50595  if test "x$has_forbidden_chars" != x; then
50596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50600      # Going to short mode and back again did indeed matter. Since short mode is
50601      # case insensitive, let's make it lowercase to improve readability.
50602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50603      # Now convert it back to Unix-style (cygpath)
50604      input_path=`$CYGPATH -u "$shortmode_path"`
50605      new_path="$input_path"
50606    fi
50607  fi
50608
50609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50610  if test "x$test_cygdrive_prefix" = x; then
50611    # As a simple fix, exclude /usr/bin since it's not a real path.
50612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50614      # a path prefixed by /cygdrive for fixpath to work.
50615      new_path="$CYGWIN_ROOT_PATH$input_path"
50616    fi
50617  fi
50618
50619
50620  if test "x$path" != "x$new_path"; then
50621    MSVC_DLL="$new_path"
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50624  fi
50625
50626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50627
50628  path="$MSVC_DLL"
50629  has_colon=`$ECHO $path | $GREP ^.:`
50630  new_path="$path"
50631  if test "x$has_colon" = x; then
50632    # Not in mixed or Windows style, start by that.
50633    new_path=`cmd //c echo $path`
50634  fi
50635
50636
50637  input_path="$new_path"
50638  # Check if we need to convert this using DOS-style short mode. If the path
50639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50640  # take no chances and rewrite it.
50641  # Note: m4 eats our [], so we need to use [ and ] instead.
50642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50643  if test "x$has_forbidden_chars" != x; then
50644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50646  fi
50647
50648
50649  windows_path="$new_path"
50650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50651    unix_path=`$CYGPATH -u "$windows_path"`
50652    new_path="$unix_path"
50653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50655    new_path="$unix_path"
50656  fi
50657
50658  if test "x$path" != "x$new_path"; then
50659    MSVC_DLL="$new_path"
50660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50661$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50662  fi
50663
50664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50666
50667    else
50668      # We're on a unix platform. Hooray! :)
50669      path="$MSVC_DLL"
50670      has_space=`$ECHO "$path" | $GREP " "`
50671      if test "x$has_space" != x; then
50672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50675      fi
50676
50677      # Use eval to expand a potential ~
50678      eval path="$path"
50679      if test ! -f "$path" && test ! -d "$path"; then
50680        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50681      fi
50682
50683      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50684    fi
50685  fi
50686
50687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50688$as_echo_n "checking for $DLL_NAME... " >&6; }
50689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50690$as_echo "$MSVC_DLL" >&6; }
50691    else
50692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50693$as_echo "incorrect, ignoring" >&6; }
50694      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50695$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50696    fi
50697  fi
50698
50699  fi
50700
50701  if test "x$MSVC_DLL" = x; then
50702    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50703    if test "x$VS100COMNTOOLS" != x; then
50704      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50705
50706  windows_path="$CYGWIN_VS_TOOLS_DIR"
50707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50708    unix_path=`$CYGPATH -u "$windows_path"`
50709    CYGWIN_VS_TOOLS_DIR="$unix_path"
50710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50712    CYGWIN_VS_TOOLS_DIR="$unix_path"
50713  fi
50714
50715      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50716        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50717	    | $GREP -i /x64/ | $HEAD --lines 1`
50718      else
50719        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50720	    | $GREP -i /x86/ | $HEAD --lines 1`
50721      fi
50722
50723  DLL_NAME="$DLL_NAME"
50724  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50725  METHOD="search of VS100COMNTOOLS"
50726  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50727    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50728$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50729
50730    # Need to check if the found msvcr is correct architecture
50731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50732$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50733    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50735      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50736      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50737      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50738        CORRECT_MSVCR_ARCH="PE32 executable"
50739      else
50740        CORRECT_MSVCR_ARCH="PE32+ executable"
50741      fi
50742    else
50743      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50744        CORRECT_MSVCR_ARCH=386
50745      else
50746        CORRECT_MSVCR_ARCH=x86-64
50747      fi
50748    fi
50749    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50751$as_echo "ok" >&6; }
50752      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50753
50754  # Only process if variable expands to non-empty
50755
50756  if test "x$MSVC_DLL" != x; then
50757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50758
50759  # Input might be given as Windows format, start by converting to
50760  # unix format.
50761  path="$MSVC_DLL"
50762  new_path=`$CYGPATH -u "$path"`
50763
50764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50767  # "foo.exe" is OK but "foo" is an error.
50768  #
50769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50770  # It is also a way to make sure we got the proper file name for the real test later on.
50771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50772  if test "x$test_shortpath" = x; then
50773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50774$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50775    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50776  fi
50777
50778  # Call helper function which possibly converts this using DOS-style short mode.
50779  # If so, the updated path is stored in $new_path.
50780
50781  input_path="$new_path"
50782  # Check if we need to convert this using DOS-style short mode. If the path
50783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50784  # take no chances and rewrite it.
50785  # Note: m4 eats our [], so we need to use [ and ] instead.
50786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50787  if test "x$has_forbidden_chars" != x; then
50788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50792      # Going to short mode and back again did indeed matter. Since short mode is
50793      # case insensitive, let's make it lowercase to improve readability.
50794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50795      # Now convert it back to Unix-style (cygpath)
50796      input_path=`$CYGPATH -u "$shortmode_path"`
50797      new_path="$input_path"
50798    fi
50799  fi
50800
50801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50802  if test "x$test_cygdrive_prefix" = x; then
50803    # As a simple fix, exclude /usr/bin since it's not a real path.
50804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50806      # a path prefixed by /cygdrive for fixpath to work.
50807      new_path="$CYGWIN_ROOT_PATH$input_path"
50808    fi
50809  fi
50810
50811
50812  if test "x$path" != "x$new_path"; then
50813    MSVC_DLL="$new_path"
50814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50815$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50816  fi
50817
50818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50819
50820  path="$MSVC_DLL"
50821  has_colon=`$ECHO $path | $GREP ^.:`
50822  new_path="$path"
50823  if test "x$has_colon" = x; then
50824    # Not in mixed or Windows style, start by that.
50825    new_path=`cmd //c echo $path`
50826  fi
50827
50828
50829  input_path="$new_path"
50830  # Check if we need to convert this using DOS-style short mode. If the path
50831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50832  # take no chances and rewrite it.
50833  # Note: m4 eats our [], so we need to use [ and ] instead.
50834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50835  if test "x$has_forbidden_chars" != x; then
50836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50838  fi
50839
50840
50841  windows_path="$new_path"
50842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50843    unix_path=`$CYGPATH -u "$windows_path"`
50844    new_path="$unix_path"
50845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50847    new_path="$unix_path"
50848  fi
50849
50850  if test "x$path" != "x$new_path"; then
50851    MSVC_DLL="$new_path"
50852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50853$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50854  fi
50855
50856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50858
50859    else
50860      # We're on a unix platform. Hooray! :)
50861      path="$MSVC_DLL"
50862      has_space=`$ECHO "$path" | $GREP " "`
50863      if test "x$has_space" != x; then
50864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50865$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50867      fi
50868
50869      # Use eval to expand a potential ~
50870      eval path="$path"
50871      if test ! -f "$path" && test ! -d "$path"; then
50872        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50873      fi
50874
50875      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50876    fi
50877  fi
50878
50879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50880$as_echo_n "checking for $DLL_NAME... " >&6; }
50881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50882$as_echo "$MSVC_DLL" >&6; }
50883    else
50884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50885$as_echo "incorrect, ignoring" >&6; }
50886      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50887$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50888    fi
50889  fi
50890
50891    fi
50892  fi
50893
50894  if test "x$MSVC_DLL" = x; then
50895    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50896    # (This was the original behaviour; kept since it might turn something up)
50897    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50898      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50899        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50900	    | $GREP x64 | $HEAD --lines 1`
50901      else
50902        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50903	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50904        if test "x$POSSIBLE_MSVC_DLL" = x; then
50905          # We're grasping at straws now...
50906          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50907	      | $HEAD --lines 1`
50908        fi
50909      fi
50910
50911
50912  DLL_NAME="$DLL_NAME"
50913  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50914  METHOD="search of VCINSTALLDIR"
50915  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50916    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50917$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50918
50919    # Need to check if the found msvcr is correct architecture
50920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50921$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50922    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50924      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50925      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50926      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50927        CORRECT_MSVCR_ARCH="PE32 executable"
50928      else
50929        CORRECT_MSVCR_ARCH="PE32+ executable"
50930      fi
50931    else
50932      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50933        CORRECT_MSVCR_ARCH=386
50934      else
50935        CORRECT_MSVCR_ARCH=x86-64
50936      fi
50937    fi
50938    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50940$as_echo "ok" >&6; }
50941      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50942
50943  # Only process if variable expands to non-empty
50944
50945  if test "x$MSVC_DLL" != x; then
50946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50947
50948  # Input might be given as Windows format, start by converting to
50949  # unix format.
50950  path="$MSVC_DLL"
50951  new_path=`$CYGPATH -u "$path"`
50952
50953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50956  # "foo.exe" is OK but "foo" is an error.
50957  #
50958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50959  # It is also a way to make sure we got the proper file name for the real test later on.
50960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50961  if test "x$test_shortpath" = x; then
50962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50963$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50964    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50965  fi
50966
50967  # Call helper function which possibly converts this using DOS-style short mode.
50968  # If so, the updated path is stored in $new_path.
50969
50970  input_path="$new_path"
50971  # Check if we need to convert this using DOS-style short mode. If the path
50972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50973  # take no chances and rewrite it.
50974  # Note: m4 eats our [], so we need to use [ and ] instead.
50975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50976  if test "x$has_forbidden_chars" != x; then
50977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50981      # Going to short mode and back again did indeed matter. Since short mode is
50982      # case insensitive, let's make it lowercase to improve readability.
50983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50984      # Now convert it back to Unix-style (cygpath)
50985      input_path=`$CYGPATH -u "$shortmode_path"`
50986      new_path="$input_path"
50987    fi
50988  fi
50989
50990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50991  if test "x$test_cygdrive_prefix" = x; then
50992    # As a simple fix, exclude /usr/bin since it's not a real path.
50993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50995      # a path prefixed by /cygdrive for fixpath to work.
50996      new_path="$CYGWIN_ROOT_PATH$input_path"
50997    fi
50998  fi
50999
51000
51001  if test "x$path" != "x$new_path"; then
51002    MSVC_DLL="$new_path"
51003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51004$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51005  fi
51006
51007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51008
51009  path="$MSVC_DLL"
51010  has_colon=`$ECHO $path | $GREP ^.:`
51011  new_path="$path"
51012  if test "x$has_colon" = x; then
51013    # Not in mixed or Windows style, start by that.
51014    new_path=`cmd //c echo $path`
51015  fi
51016
51017
51018  input_path="$new_path"
51019  # Check if we need to convert this using DOS-style short mode. If the path
51020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51021  # take no chances and rewrite it.
51022  # Note: m4 eats our [], so we need to use [ and ] instead.
51023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51024  if test "x$has_forbidden_chars" != x; then
51025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51027  fi
51028
51029
51030  windows_path="$new_path"
51031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51032    unix_path=`$CYGPATH -u "$windows_path"`
51033    new_path="$unix_path"
51034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51036    new_path="$unix_path"
51037  fi
51038
51039  if test "x$path" != "x$new_path"; then
51040    MSVC_DLL="$new_path"
51041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51042$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51043  fi
51044
51045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51047
51048    else
51049      # We're on a unix platform. Hooray! :)
51050      path="$MSVC_DLL"
51051      has_space=`$ECHO "$path" | $GREP " "`
51052      if test "x$has_space" != x; then
51053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51054$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51055        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51056      fi
51057
51058      # Use eval to expand a potential ~
51059      eval path="$path"
51060      if test ! -f "$path" && test ! -d "$path"; then
51061        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51062      fi
51063
51064      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51065    fi
51066  fi
51067
51068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51069$as_echo_n "checking for $DLL_NAME... " >&6; }
51070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51071$as_echo "$MSVC_DLL" >&6; }
51072    else
51073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51074$as_echo "incorrect, ignoring" >&6; }
51075      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51076$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51077    fi
51078  fi
51079
51080    fi
51081  fi
51082
51083  if test "x$MSVC_DLL" = x; then
51084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51085$as_echo_n "checking for $DLL_NAME... " >&6; }
51086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51087$as_echo "no" >&6; }
51088    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51089  fi
51090
51091    MSVCR_DLL="$MSVC_DLL"
51092  fi
51093
51094
51095
51096# Check whether --with-msvcp-dll was given.
51097if test "${with_msvcp_dll+set}" = set; then :
51098  withval=$with_msvcp_dll;
51099fi
51100
51101
51102  if test "x$MSVCP_NAME" != "x"; then
51103    if test "x$with_msvcp_dll" != x; then
51104      # If given explicitely by user, do not probe. If not present, fail directly.
51105
51106  DLL_NAME="$MSVCP_NAME"
51107  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51108  METHOD="--with-msvcp-dll"
51109  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51111$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51112
51113    # Need to check if the found msvcr is correct architecture
51114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51115$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51116    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51118      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51119      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51121        CORRECT_MSVCR_ARCH="PE32 executable"
51122      else
51123        CORRECT_MSVCR_ARCH="PE32+ executable"
51124      fi
51125    else
51126      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51127        CORRECT_MSVCR_ARCH=386
51128      else
51129        CORRECT_MSVCR_ARCH=x86-64
51130      fi
51131    fi
51132    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51134$as_echo "ok" >&6; }
51135      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51136
51137  # Only process if variable expands to non-empty
51138
51139  if test "x$MSVC_DLL" != x; then
51140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51141
51142  # Input might be given as Windows format, start by converting to
51143  # unix format.
51144  path="$MSVC_DLL"
51145  new_path=`$CYGPATH -u "$path"`
51146
51147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51150  # "foo.exe" is OK but "foo" is an error.
51151  #
51152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51153  # It is also a way to make sure we got the proper file name for the real test later on.
51154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51155  if test "x$test_shortpath" = x; then
51156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51157$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51158    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51159  fi
51160
51161  # Call helper function which possibly converts this using DOS-style short mode.
51162  # If so, the updated path is stored in $new_path.
51163
51164  input_path="$new_path"
51165  # Check if we need to convert this using DOS-style short mode. If the path
51166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51167  # take no chances and rewrite it.
51168  # Note: m4 eats our [], so we need to use [ and ] instead.
51169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51170  if test "x$has_forbidden_chars" != x; then
51171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51175      # Going to short mode and back again did indeed matter. Since short mode is
51176      # case insensitive, let's make it lowercase to improve readability.
51177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51178      # Now convert it back to Unix-style (cygpath)
51179      input_path=`$CYGPATH -u "$shortmode_path"`
51180      new_path="$input_path"
51181    fi
51182  fi
51183
51184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51185  if test "x$test_cygdrive_prefix" = x; then
51186    # As a simple fix, exclude /usr/bin since it's not a real path.
51187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51189      # a path prefixed by /cygdrive for fixpath to work.
51190      new_path="$CYGWIN_ROOT_PATH$input_path"
51191    fi
51192  fi
51193
51194
51195  if test "x$path" != "x$new_path"; then
51196    MSVC_DLL="$new_path"
51197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51198$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51199  fi
51200
51201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51202
51203  path="$MSVC_DLL"
51204  has_colon=`$ECHO $path | $GREP ^.:`
51205  new_path="$path"
51206  if test "x$has_colon" = x; then
51207    # Not in mixed or Windows style, start by that.
51208    new_path=`cmd //c echo $path`
51209  fi
51210
51211
51212  input_path="$new_path"
51213  # Check if we need to convert this using DOS-style short mode. If the path
51214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51215  # take no chances and rewrite it.
51216  # Note: m4 eats our [], so we need to use [ and ] instead.
51217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51218  if test "x$has_forbidden_chars" != x; then
51219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51221  fi
51222
51223
51224  windows_path="$new_path"
51225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51226    unix_path=`$CYGPATH -u "$windows_path"`
51227    new_path="$unix_path"
51228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51230    new_path="$unix_path"
51231  fi
51232
51233  if test "x$path" != "x$new_path"; then
51234    MSVC_DLL="$new_path"
51235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51236$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51237  fi
51238
51239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51241
51242    else
51243      # We're on a unix platform. Hooray! :)
51244      path="$MSVC_DLL"
51245      has_space=`$ECHO "$path" | $GREP " "`
51246      if test "x$has_space" != x; then
51247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51248$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51250      fi
51251
51252      # Use eval to expand a potential ~
51253      eval path="$path"
51254      if test ! -f "$path" && test ! -d "$path"; then
51255        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51256      fi
51257
51258      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51259    fi
51260  fi
51261
51262      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51263$as_echo_n "checking for $DLL_NAME... " >&6; }
51264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51265$as_echo "$MSVC_DLL" >&6; }
51266    else
51267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51268$as_echo "incorrect, ignoring" >&6; }
51269      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51270$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51271    fi
51272  fi
51273
51274      if test "x$MSVC_DLL" = x; then
51275        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51276      fi
51277      MSVCP_DLL="$MSVC_DLL"
51278    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51279
51280  DLL_NAME="$MSVCP_NAME"
51281  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51282  METHOD="devkit"
51283  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51284    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51285$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51286
51287    # Need to check if the found msvcr is correct architecture
51288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51289$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51290    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51292      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51293      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51294      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51295        CORRECT_MSVCR_ARCH="PE32 executable"
51296      else
51297        CORRECT_MSVCR_ARCH="PE32+ executable"
51298      fi
51299    else
51300      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51301        CORRECT_MSVCR_ARCH=386
51302      else
51303        CORRECT_MSVCR_ARCH=x86-64
51304      fi
51305    fi
51306    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51308$as_echo "ok" >&6; }
51309      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51310
51311  # Only process if variable expands to non-empty
51312
51313  if test "x$MSVC_DLL" != x; then
51314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51315
51316  # Input might be given as Windows format, start by converting to
51317  # unix format.
51318  path="$MSVC_DLL"
51319  new_path=`$CYGPATH -u "$path"`
51320
51321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51324  # "foo.exe" is OK but "foo" is an error.
51325  #
51326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51327  # It is also a way to make sure we got the proper file name for the real test later on.
51328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51329  if test "x$test_shortpath" = x; then
51330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51331$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51332    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51333  fi
51334
51335  # Call helper function which possibly converts this using DOS-style short mode.
51336  # If so, the updated path is stored in $new_path.
51337
51338  input_path="$new_path"
51339  # Check if we need to convert this using DOS-style short mode. If the path
51340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51341  # take no chances and rewrite it.
51342  # Note: m4 eats our [], so we need to use [ and ] instead.
51343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51344  if test "x$has_forbidden_chars" != x; then
51345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51349      # Going to short mode and back again did indeed matter. Since short mode is
51350      # case insensitive, let's make it lowercase to improve readability.
51351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51352      # Now convert it back to Unix-style (cygpath)
51353      input_path=`$CYGPATH -u "$shortmode_path"`
51354      new_path="$input_path"
51355    fi
51356  fi
51357
51358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51359  if test "x$test_cygdrive_prefix" = x; then
51360    # As a simple fix, exclude /usr/bin since it's not a real path.
51361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51363      # a path prefixed by /cygdrive for fixpath to work.
51364      new_path="$CYGWIN_ROOT_PATH$input_path"
51365    fi
51366  fi
51367
51368
51369  if test "x$path" != "x$new_path"; then
51370    MSVC_DLL="$new_path"
51371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51372$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51373  fi
51374
51375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51376
51377  path="$MSVC_DLL"
51378  has_colon=`$ECHO $path | $GREP ^.:`
51379  new_path="$path"
51380  if test "x$has_colon" = x; then
51381    # Not in mixed or Windows style, start by that.
51382    new_path=`cmd //c echo $path`
51383  fi
51384
51385
51386  input_path="$new_path"
51387  # Check if we need to convert this using DOS-style short mode. If the path
51388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51389  # take no chances and rewrite it.
51390  # Note: m4 eats our [], so we need to use [ and ] instead.
51391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51392  if test "x$has_forbidden_chars" != x; then
51393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51395  fi
51396
51397
51398  windows_path="$new_path"
51399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51400    unix_path=`$CYGPATH -u "$windows_path"`
51401    new_path="$unix_path"
51402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51404    new_path="$unix_path"
51405  fi
51406
51407  if test "x$path" != "x$new_path"; then
51408    MSVC_DLL="$new_path"
51409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51410$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51411  fi
51412
51413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51415
51416    else
51417      # We're on a unix platform. Hooray! :)
51418      path="$MSVC_DLL"
51419      has_space=`$ECHO "$path" | $GREP " "`
51420      if test "x$has_space" != x; then
51421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51422$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51424      fi
51425
51426      # Use eval to expand a potential ~
51427      eval path="$path"
51428      if test ! -f "$path" && test ! -d "$path"; then
51429        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51430      fi
51431
51432      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51433    fi
51434  fi
51435
51436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51437$as_echo_n "checking for $DLL_NAME... " >&6; }
51438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51439$as_echo "$MSVC_DLL" >&6; }
51440    else
51441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51442$as_echo "incorrect, ignoring" >&6; }
51443      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51444$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51445    fi
51446  fi
51447
51448      if test "x$MSVC_DLL" = x; then
51449        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51450      fi
51451      MSVCP_DLL="$MSVC_DLL"
51452    else
51453
51454  DLL_NAME="${MSVCP_NAME}"
51455  MSVC_DLL=
51456
51457  if test "x$MSVC_DLL" = x; then
51458    # Probe: Using well-known location from Visual Studio 10.0
51459    if test "x$VCINSTALLDIR" != x; then
51460      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51461
51462  windows_path="$CYGWIN_VC_INSTALL_DIR"
51463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51464    unix_path=`$CYGPATH -u "$windows_path"`
51465    CYGWIN_VC_INSTALL_DIR="$unix_path"
51466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51468    CYGWIN_VC_INSTALL_DIR="$unix_path"
51469  fi
51470
51471      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51472        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51473      else
51474        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51475      fi
51476      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51477
51478  DLL_NAME="$DLL_NAME"
51479  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51480  METHOD="well-known location in VCINSTALLDIR"
51481  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51483$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51484
51485    # Need to check if the found msvcr is correct architecture
51486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51487$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51488    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51490      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51491      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51492      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51493        CORRECT_MSVCR_ARCH="PE32 executable"
51494      else
51495        CORRECT_MSVCR_ARCH="PE32+ executable"
51496      fi
51497    else
51498      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51499        CORRECT_MSVCR_ARCH=386
51500      else
51501        CORRECT_MSVCR_ARCH=x86-64
51502      fi
51503    fi
51504    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51506$as_echo "ok" >&6; }
51507      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51508
51509  # Only process if variable expands to non-empty
51510
51511  if test "x$MSVC_DLL" != x; then
51512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51513
51514  # Input might be given as Windows format, start by converting to
51515  # unix format.
51516  path="$MSVC_DLL"
51517  new_path=`$CYGPATH -u "$path"`
51518
51519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51522  # "foo.exe" is OK but "foo" is an error.
51523  #
51524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51525  # It is also a way to make sure we got the proper file name for the real test later on.
51526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51527  if test "x$test_shortpath" = x; then
51528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51529$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51530    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51531  fi
51532
51533  # Call helper function which possibly converts this using DOS-style short mode.
51534  # If so, the updated path is stored in $new_path.
51535
51536  input_path="$new_path"
51537  # Check if we need to convert this using DOS-style short mode. If the path
51538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51539  # take no chances and rewrite it.
51540  # Note: m4 eats our [], so we need to use [ and ] instead.
51541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51542  if test "x$has_forbidden_chars" != x; then
51543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51547      # Going to short mode and back again did indeed matter. Since short mode is
51548      # case insensitive, let's make it lowercase to improve readability.
51549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51550      # Now convert it back to Unix-style (cygpath)
51551      input_path=`$CYGPATH -u "$shortmode_path"`
51552      new_path="$input_path"
51553    fi
51554  fi
51555
51556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51557  if test "x$test_cygdrive_prefix" = x; then
51558    # As a simple fix, exclude /usr/bin since it's not a real path.
51559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51561      # a path prefixed by /cygdrive for fixpath to work.
51562      new_path="$CYGWIN_ROOT_PATH$input_path"
51563    fi
51564  fi
51565
51566
51567  if test "x$path" != "x$new_path"; then
51568    MSVC_DLL="$new_path"
51569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51571  fi
51572
51573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51574
51575  path="$MSVC_DLL"
51576  has_colon=`$ECHO $path | $GREP ^.:`
51577  new_path="$path"
51578  if test "x$has_colon" = x; then
51579    # Not in mixed or Windows style, start by that.
51580    new_path=`cmd //c echo $path`
51581  fi
51582
51583
51584  input_path="$new_path"
51585  # Check if we need to convert this using DOS-style short mode. If the path
51586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51587  # take no chances and rewrite it.
51588  # Note: m4 eats our [], so we need to use [ and ] instead.
51589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51590  if test "x$has_forbidden_chars" != x; then
51591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51593  fi
51594
51595
51596  windows_path="$new_path"
51597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51598    unix_path=`$CYGPATH -u "$windows_path"`
51599    new_path="$unix_path"
51600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51602    new_path="$unix_path"
51603  fi
51604
51605  if test "x$path" != "x$new_path"; then
51606    MSVC_DLL="$new_path"
51607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51609  fi
51610
51611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51613
51614    else
51615      # We're on a unix platform. Hooray! :)
51616      path="$MSVC_DLL"
51617      has_space=`$ECHO "$path" | $GREP " "`
51618      if test "x$has_space" != x; then
51619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51620$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51622      fi
51623
51624      # Use eval to expand a potential ~
51625      eval path="$path"
51626      if test ! -f "$path" && test ! -d "$path"; then
51627        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51628      fi
51629
51630      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51631    fi
51632  fi
51633
51634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51635$as_echo_n "checking for $DLL_NAME... " >&6; }
51636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51637$as_echo "$MSVC_DLL" >&6; }
51638    else
51639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51640$as_echo "incorrect, ignoring" >&6; }
51641      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51642$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51643    fi
51644  fi
51645
51646    fi
51647  fi
51648
51649  if test "x$MSVC_DLL" = x; then
51650    # Probe: Check in the Boot JDK directory.
51651    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51652
51653  DLL_NAME="$DLL_NAME"
51654  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51655  METHOD="well-known location in Boot JDK"
51656  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51657    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51658$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51659
51660    # Need to check if the found msvcr is correct architecture
51661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51662$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51663    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51665      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51666      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51667      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51668        CORRECT_MSVCR_ARCH="PE32 executable"
51669      else
51670        CORRECT_MSVCR_ARCH="PE32+ executable"
51671      fi
51672    else
51673      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51674        CORRECT_MSVCR_ARCH=386
51675      else
51676        CORRECT_MSVCR_ARCH=x86-64
51677      fi
51678    fi
51679    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51681$as_echo "ok" >&6; }
51682      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51683
51684  # Only process if variable expands to non-empty
51685
51686  if test "x$MSVC_DLL" != x; then
51687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51688
51689  # Input might be given as Windows format, start by converting to
51690  # unix format.
51691  path="$MSVC_DLL"
51692  new_path=`$CYGPATH -u "$path"`
51693
51694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51697  # "foo.exe" is OK but "foo" is an error.
51698  #
51699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51700  # It is also a way to make sure we got the proper file name for the real test later on.
51701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51702  if test "x$test_shortpath" = x; then
51703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51704$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51705    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51706  fi
51707
51708  # Call helper function which possibly converts this using DOS-style short mode.
51709  # If so, the updated path is stored in $new_path.
51710
51711  input_path="$new_path"
51712  # Check if we need to convert this using DOS-style short mode. If the path
51713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51714  # take no chances and rewrite it.
51715  # Note: m4 eats our [], so we need to use [ and ] instead.
51716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51717  if test "x$has_forbidden_chars" != x; then
51718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51722      # Going to short mode and back again did indeed matter. Since short mode is
51723      # case insensitive, let's make it lowercase to improve readability.
51724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51725      # Now convert it back to Unix-style (cygpath)
51726      input_path=`$CYGPATH -u "$shortmode_path"`
51727      new_path="$input_path"
51728    fi
51729  fi
51730
51731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51732  if test "x$test_cygdrive_prefix" = x; then
51733    # As a simple fix, exclude /usr/bin since it's not a real path.
51734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51736      # a path prefixed by /cygdrive for fixpath to work.
51737      new_path="$CYGWIN_ROOT_PATH$input_path"
51738    fi
51739  fi
51740
51741
51742  if test "x$path" != "x$new_path"; then
51743    MSVC_DLL="$new_path"
51744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51745$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51746  fi
51747
51748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51749
51750  path="$MSVC_DLL"
51751  has_colon=`$ECHO $path | $GREP ^.:`
51752  new_path="$path"
51753  if test "x$has_colon" = x; then
51754    # Not in mixed or Windows style, start by that.
51755    new_path=`cmd //c echo $path`
51756  fi
51757
51758
51759  input_path="$new_path"
51760  # Check if we need to convert this using DOS-style short mode. If the path
51761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51762  # take no chances and rewrite it.
51763  # Note: m4 eats our [], so we need to use [ and ] instead.
51764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51765  if test "x$has_forbidden_chars" != x; then
51766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51768  fi
51769
51770
51771  windows_path="$new_path"
51772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51773    unix_path=`$CYGPATH -u "$windows_path"`
51774    new_path="$unix_path"
51775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51777    new_path="$unix_path"
51778  fi
51779
51780  if test "x$path" != "x$new_path"; then
51781    MSVC_DLL="$new_path"
51782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51783$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51784  fi
51785
51786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51788
51789    else
51790      # We're on a unix platform. Hooray! :)
51791      path="$MSVC_DLL"
51792      has_space=`$ECHO "$path" | $GREP " "`
51793      if test "x$has_space" != x; then
51794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51795$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51797      fi
51798
51799      # Use eval to expand a potential ~
51800      eval path="$path"
51801      if test ! -f "$path" && test ! -d "$path"; then
51802        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51803      fi
51804
51805      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51806    fi
51807  fi
51808
51809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51810$as_echo_n "checking for $DLL_NAME... " >&6; }
51811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51812$as_echo "$MSVC_DLL" >&6; }
51813    else
51814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51815$as_echo "incorrect, ignoring" >&6; }
51816      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51817$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51818    fi
51819  fi
51820
51821  fi
51822
51823  if test "x$MSVC_DLL" = x; then
51824    # Probe: Look in the Windows system32 directory
51825    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51826
51827  windows_path="$CYGWIN_SYSTEMROOT"
51828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51829    unix_path=`$CYGPATH -u "$windows_path"`
51830    CYGWIN_SYSTEMROOT="$unix_path"
51831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51833    CYGWIN_SYSTEMROOT="$unix_path"
51834  fi
51835
51836    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51837
51838  DLL_NAME="$DLL_NAME"
51839  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51840  METHOD="well-known location in SYSTEMROOT"
51841  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51842    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51843$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51844
51845    # Need to check if the found msvcr is correct architecture
51846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51847$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51848    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51850      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51851      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51852      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51853        CORRECT_MSVCR_ARCH="PE32 executable"
51854      else
51855        CORRECT_MSVCR_ARCH="PE32+ executable"
51856      fi
51857    else
51858      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51859        CORRECT_MSVCR_ARCH=386
51860      else
51861        CORRECT_MSVCR_ARCH=x86-64
51862      fi
51863    fi
51864    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51866$as_echo "ok" >&6; }
51867      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51868
51869  # Only process if variable expands to non-empty
51870
51871  if test "x$MSVC_DLL" != x; then
51872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51873
51874  # Input might be given as Windows format, start by converting to
51875  # unix format.
51876  path="$MSVC_DLL"
51877  new_path=`$CYGPATH -u "$path"`
51878
51879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51882  # "foo.exe" is OK but "foo" is an error.
51883  #
51884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51885  # It is also a way to make sure we got the proper file name for the real test later on.
51886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51887  if test "x$test_shortpath" = x; then
51888    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51889$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51890    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51891  fi
51892
51893  # Call helper function which possibly converts this using DOS-style short mode.
51894  # If so, the updated path is stored in $new_path.
51895
51896  input_path="$new_path"
51897  # Check if we need to convert this using DOS-style short mode. If the path
51898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51899  # take no chances and rewrite it.
51900  # Note: m4 eats our [], so we need to use [ and ] instead.
51901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51902  if test "x$has_forbidden_chars" != x; then
51903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51907      # Going to short mode and back again did indeed matter. Since short mode is
51908      # case insensitive, let's make it lowercase to improve readability.
51909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51910      # Now convert it back to Unix-style (cygpath)
51911      input_path=`$CYGPATH -u "$shortmode_path"`
51912      new_path="$input_path"
51913    fi
51914  fi
51915
51916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51917  if test "x$test_cygdrive_prefix" = x; then
51918    # As a simple fix, exclude /usr/bin since it's not a real path.
51919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51921      # a path prefixed by /cygdrive for fixpath to work.
51922      new_path="$CYGWIN_ROOT_PATH$input_path"
51923    fi
51924  fi
51925
51926
51927  if test "x$path" != "x$new_path"; then
51928    MSVC_DLL="$new_path"
51929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51930$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51931  fi
51932
51933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51934
51935  path="$MSVC_DLL"
51936  has_colon=`$ECHO $path | $GREP ^.:`
51937  new_path="$path"
51938  if test "x$has_colon" = x; then
51939    # Not in mixed or Windows style, start by that.
51940    new_path=`cmd //c echo $path`
51941  fi
51942
51943
51944  input_path="$new_path"
51945  # Check if we need to convert this using DOS-style short mode. If the path
51946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51947  # take no chances and rewrite it.
51948  # Note: m4 eats our [], so we need to use [ and ] instead.
51949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51950  if test "x$has_forbidden_chars" != x; then
51951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51953  fi
51954
51955
51956  windows_path="$new_path"
51957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51958    unix_path=`$CYGPATH -u "$windows_path"`
51959    new_path="$unix_path"
51960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51962    new_path="$unix_path"
51963  fi
51964
51965  if test "x$path" != "x$new_path"; then
51966    MSVC_DLL="$new_path"
51967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51968$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51969  fi
51970
51971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51973
51974    else
51975      # We're on a unix platform. Hooray! :)
51976      path="$MSVC_DLL"
51977      has_space=`$ECHO "$path" | $GREP " "`
51978      if test "x$has_space" != x; then
51979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51980$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51981        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51982      fi
51983
51984      # Use eval to expand a potential ~
51985      eval path="$path"
51986      if test ! -f "$path" && test ! -d "$path"; then
51987        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51988      fi
51989
51990      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51991    fi
51992  fi
51993
51994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51995$as_echo_n "checking for $DLL_NAME... " >&6; }
51996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51997$as_echo "$MSVC_DLL" >&6; }
51998    else
51999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52000$as_echo "incorrect, ignoring" >&6; }
52001      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52002$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52003    fi
52004  fi
52005
52006  fi
52007
52008  if test "x$MSVC_DLL" = x; then
52009    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52010    if test "x$VS100COMNTOOLS" != x; then
52011      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52012
52013  windows_path="$CYGWIN_VS_TOOLS_DIR"
52014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52015    unix_path=`$CYGPATH -u "$windows_path"`
52016    CYGWIN_VS_TOOLS_DIR="$unix_path"
52017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52019    CYGWIN_VS_TOOLS_DIR="$unix_path"
52020  fi
52021
52022      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52023        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52024	    | $GREP -i /x64/ | $HEAD --lines 1`
52025      else
52026        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52027	    | $GREP -i /x86/ | $HEAD --lines 1`
52028      fi
52029
52030  DLL_NAME="$DLL_NAME"
52031  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52032  METHOD="search of VS100COMNTOOLS"
52033  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52034    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52035$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52036
52037    # Need to check if the found msvcr is correct architecture
52038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52039$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52040    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52042      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52043      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52044      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52045        CORRECT_MSVCR_ARCH="PE32 executable"
52046      else
52047        CORRECT_MSVCR_ARCH="PE32+ executable"
52048      fi
52049    else
52050      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52051        CORRECT_MSVCR_ARCH=386
52052      else
52053        CORRECT_MSVCR_ARCH=x86-64
52054      fi
52055    fi
52056    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52058$as_echo "ok" >&6; }
52059      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52060
52061  # Only process if variable expands to non-empty
52062
52063  if test "x$MSVC_DLL" != x; then
52064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52065
52066  # Input might be given as Windows format, start by converting to
52067  # unix format.
52068  path="$MSVC_DLL"
52069  new_path=`$CYGPATH -u "$path"`
52070
52071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52074  # "foo.exe" is OK but "foo" is an error.
52075  #
52076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52077  # It is also a way to make sure we got the proper file name for the real test later on.
52078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52079  if test "x$test_shortpath" = x; then
52080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52081$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52082    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52083  fi
52084
52085  # Call helper function which possibly converts this using DOS-style short mode.
52086  # If so, the updated path is stored in $new_path.
52087
52088  input_path="$new_path"
52089  # Check if we need to convert this using DOS-style short mode. If the path
52090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52091  # take no chances and rewrite it.
52092  # Note: m4 eats our [], so we need to use [ and ] instead.
52093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52094  if test "x$has_forbidden_chars" != x; then
52095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52099      # Going to short mode and back again did indeed matter. Since short mode is
52100      # case insensitive, let's make it lowercase to improve readability.
52101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52102      # Now convert it back to Unix-style (cygpath)
52103      input_path=`$CYGPATH -u "$shortmode_path"`
52104      new_path="$input_path"
52105    fi
52106  fi
52107
52108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52109  if test "x$test_cygdrive_prefix" = x; then
52110    # As a simple fix, exclude /usr/bin since it's not a real path.
52111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52113      # a path prefixed by /cygdrive for fixpath to work.
52114      new_path="$CYGWIN_ROOT_PATH$input_path"
52115    fi
52116  fi
52117
52118
52119  if test "x$path" != "x$new_path"; then
52120    MSVC_DLL="$new_path"
52121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52122$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52123  fi
52124
52125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52126
52127  path="$MSVC_DLL"
52128  has_colon=`$ECHO $path | $GREP ^.:`
52129  new_path="$path"
52130  if test "x$has_colon" = x; then
52131    # Not in mixed or Windows style, start by that.
52132    new_path=`cmd //c echo $path`
52133  fi
52134
52135
52136  input_path="$new_path"
52137  # Check if we need to convert this using DOS-style short mode. If the path
52138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52139  # take no chances and rewrite it.
52140  # Note: m4 eats our [], so we need to use [ and ] instead.
52141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52142  if test "x$has_forbidden_chars" != x; then
52143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52145  fi
52146
52147
52148  windows_path="$new_path"
52149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52150    unix_path=`$CYGPATH -u "$windows_path"`
52151    new_path="$unix_path"
52152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52154    new_path="$unix_path"
52155  fi
52156
52157  if test "x$path" != "x$new_path"; then
52158    MSVC_DLL="$new_path"
52159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52160$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52161  fi
52162
52163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52165
52166    else
52167      # We're on a unix platform. Hooray! :)
52168      path="$MSVC_DLL"
52169      has_space=`$ECHO "$path" | $GREP " "`
52170      if test "x$has_space" != x; then
52171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52172$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52174      fi
52175
52176      # Use eval to expand a potential ~
52177      eval path="$path"
52178      if test ! -f "$path" && test ! -d "$path"; then
52179        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52180      fi
52181
52182      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52183    fi
52184  fi
52185
52186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52187$as_echo_n "checking for $DLL_NAME... " >&6; }
52188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52189$as_echo "$MSVC_DLL" >&6; }
52190    else
52191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52192$as_echo "incorrect, ignoring" >&6; }
52193      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52194$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52195    fi
52196  fi
52197
52198    fi
52199  fi
52200
52201  if test "x$MSVC_DLL" = x; then
52202    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52203    # (This was the original behaviour; kept since it might turn something up)
52204    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52205      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52206        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52207	    | $GREP x64 | $HEAD --lines 1`
52208      else
52209        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52210	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52211        if test "x$POSSIBLE_MSVC_DLL" = x; then
52212          # We're grasping at straws now...
52213          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52214	      | $HEAD --lines 1`
52215        fi
52216      fi
52217
52218
52219  DLL_NAME="$DLL_NAME"
52220  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52221  METHOD="search of VCINSTALLDIR"
52222  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52224$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52225
52226    # Need to check if the found msvcr is correct architecture
52227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52228$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52229    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52231      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52232      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52233      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52234        CORRECT_MSVCR_ARCH="PE32 executable"
52235      else
52236        CORRECT_MSVCR_ARCH="PE32+ executable"
52237      fi
52238    else
52239      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52240        CORRECT_MSVCR_ARCH=386
52241      else
52242        CORRECT_MSVCR_ARCH=x86-64
52243      fi
52244    fi
52245    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52247$as_echo "ok" >&6; }
52248      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52249
52250  # Only process if variable expands to non-empty
52251
52252  if test "x$MSVC_DLL" != x; then
52253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52254
52255  # Input might be given as Windows format, start by converting to
52256  # unix format.
52257  path="$MSVC_DLL"
52258  new_path=`$CYGPATH -u "$path"`
52259
52260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52263  # "foo.exe" is OK but "foo" is an error.
52264  #
52265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52266  # It is also a way to make sure we got the proper file name for the real test later on.
52267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52268  if test "x$test_shortpath" = x; then
52269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52270$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52271    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52272  fi
52273
52274  # Call helper function which possibly converts this using DOS-style short mode.
52275  # If so, the updated path is stored in $new_path.
52276
52277  input_path="$new_path"
52278  # Check if we need to convert this using DOS-style short mode. If the path
52279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52280  # take no chances and rewrite it.
52281  # Note: m4 eats our [], so we need to use [ and ] instead.
52282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52283  if test "x$has_forbidden_chars" != x; then
52284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52288      # Going to short mode and back again did indeed matter. Since short mode is
52289      # case insensitive, let's make it lowercase to improve readability.
52290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52291      # Now convert it back to Unix-style (cygpath)
52292      input_path=`$CYGPATH -u "$shortmode_path"`
52293      new_path="$input_path"
52294    fi
52295  fi
52296
52297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52298  if test "x$test_cygdrive_prefix" = x; then
52299    # As a simple fix, exclude /usr/bin since it's not a real path.
52300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52302      # a path prefixed by /cygdrive for fixpath to work.
52303      new_path="$CYGWIN_ROOT_PATH$input_path"
52304    fi
52305  fi
52306
52307
52308  if test "x$path" != "x$new_path"; then
52309    MSVC_DLL="$new_path"
52310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52312  fi
52313
52314    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52315
52316  path="$MSVC_DLL"
52317  has_colon=`$ECHO $path | $GREP ^.:`
52318  new_path="$path"
52319  if test "x$has_colon" = x; then
52320    # Not in mixed or Windows style, start by that.
52321    new_path=`cmd //c echo $path`
52322  fi
52323
52324
52325  input_path="$new_path"
52326  # Check if we need to convert this using DOS-style short mode. If the path
52327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52328  # take no chances and rewrite it.
52329  # Note: m4 eats our [], so we need to use [ and ] instead.
52330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52331  if test "x$has_forbidden_chars" != x; then
52332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52334  fi
52335
52336
52337  windows_path="$new_path"
52338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52339    unix_path=`$CYGPATH -u "$windows_path"`
52340    new_path="$unix_path"
52341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52343    new_path="$unix_path"
52344  fi
52345
52346  if test "x$path" != "x$new_path"; then
52347    MSVC_DLL="$new_path"
52348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52349$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52350  fi
52351
52352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52354
52355    else
52356      # We're on a unix platform. Hooray! :)
52357      path="$MSVC_DLL"
52358      has_space=`$ECHO "$path" | $GREP " "`
52359      if test "x$has_space" != x; then
52360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52362        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52363      fi
52364
52365      # Use eval to expand a potential ~
52366      eval path="$path"
52367      if test ! -f "$path" && test ! -d "$path"; then
52368        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52369      fi
52370
52371      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52372    fi
52373  fi
52374
52375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52376$as_echo_n "checking for $DLL_NAME... " >&6; }
52377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52378$as_echo "$MSVC_DLL" >&6; }
52379    else
52380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52381$as_echo "incorrect, ignoring" >&6; }
52382      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52383$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52384    fi
52385  fi
52386
52387    fi
52388  fi
52389
52390  if test "x$MSVC_DLL" = x; then
52391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52392$as_echo_n "checking for $DLL_NAME... " >&6; }
52393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52394$as_echo "no" >&6; }
52395    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52396  fi
52397
52398      MSVCP_DLL="$MSVC_DLL"
52399    fi
52400
52401  fi
52402
52403
52404
52405# Check whether --with-dxsdk was given.
52406if test "${with_dxsdk+set}" = set; then :
52407  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52408$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52409fi
52410
52411
52412
52413
52414# Check whether --with-dxsdk-lib was given.
52415if test "${with_dxsdk_lib+set}" = set; then :
52416  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52417$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52418fi
52419
52420
52421
52422
52423# Check whether --with-dxsdk-include was given.
52424if test "${with_dxsdk_include+set}" = set; then :
52425  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52426$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52427fi
52428
52429
52430  fi
52431
52432
52433###############################################################################
52434#
52435# We need to do some final tweaking, when everything else is done.
52436#
52437###############################################################################
52438
52439
52440  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52441
52442
52443  # The name of the Service Agent jar.
52444  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52445  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52446    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52447  fi
52448
52449
52450
52451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52452$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52453
52454    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52455      ENABLE_INTREE_EC=yes
52456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52457$as_echo "yes" >&6; }
52458    else
52459      ENABLE_INTREE_EC=no
52460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52461$as_echo "no" >&6; }
52462    fi
52463
52464
52465
52466
52467###############################################################################
52468#
52469# Configure parts of the build that only affect the build performance,
52470# not the result.
52471#
52472###############################################################################
52473
52474
52475  # How many cores do we have on this build system?
52476
52477# Check whether --with-num-cores was given.
52478if test "${with_num_cores+set}" = set; then :
52479  withval=$with_num_cores;
52480fi
52481
52482  if test "x$with_num_cores" = x; then
52483    # The number of cores were not specified, try to probe them.
52484
52485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52486$as_echo_n "checking for number of cores... " >&6; }
52487  NUM_CORES=1
52488  FOUND_CORES=no
52489
52490  if test -f /proc/cpuinfo; then
52491    # Looks like a Linux (or cygwin) system
52492    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52493    FOUND_CORES=yes
52494  elif test -x /usr/sbin/psrinfo; then
52495    # Looks like a Solaris system
52496    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52497    FOUND_CORES=yes
52498  elif test -x /usr/sbin/system_profiler; then
52499    # Looks like a MacOSX system
52500    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52501    FOUND_CORES=yes
52502  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52503    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52504    FOUND_CORES=yes
52505  elif test -n "$NUMBER_OF_PROCESSORS"; then
52506    # On windows, look in the env
52507    NUM_CORES=$NUMBER_OF_PROCESSORS
52508    FOUND_CORES=yes
52509  fi
52510
52511  if test "x$FOUND_CORES" = xyes; then
52512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52513$as_echo "$NUM_CORES" >&6; }
52514  else
52515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52516$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52518$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52519  fi
52520
52521  else
52522    NUM_CORES=$with_num_cores
52523  fi
52524
52525
52526
52527  # How much memory do we have on this build system?
52528
52529# Check whether --with-memory-size was given.
52530if test "${with_memory_size+set}" = set; then :
52531  withval=$with_memory_size;
52532fi
52533
52534  if test "x$with_memory_size" = x; then
52535    # The memory size was not specified, try to probe it.
52536
52537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52538$as_echo_n "checking for memory size... " >&6; }
52539  # Default to 1024 MB
52540  MEMORY_SIZE=1024
52541  FOUND_MEM=no
52542
52543  if test -f /proc/meminfo; then
52544    # Looks like a Linux (or cygwin) system
52545    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52546    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52547    FOUND_MEM=yes
52548  elif test -x /usr/sbin/prtconf; then
52549    # Looks like a Solaris or AIX system
52550    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52551    FOUND_MEM=yes
52552  elif test -x /usr/sbin/system_profiler; then
52553    # Looks like a MacOSX system
52554    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52555    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52556    FOUND_MEM=yes
52557  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52558    # Windows, but without cygwin
52559    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52560    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52561    FOUND_MEM=yes
52562  fi
52563
52564  if test "x$FOUND_MEM" = xyes; then
52565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52566$as_echo "$MEMORY_SIZE MB" >&6; }
52567  else
52568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52569$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52570    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52571$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52572  fi
52573
52574  else
52575    MEMORY_SIZE=$with_memory_size
52576  fi
52577
52578
52579
52580  # Provide a decent default number of parallel jobs for make depending on
52581  # number of cores, amount of memory and machine architecture.
52582
52583# Check whether --with-jobs was given.
52584if test "${with_jobs+set}" = set; then :
52585  withval=$with_jobs;
52586fi
52587
52588  if test "x$with_jobs" = x; then
52589    # Number of jobs was not specified, calculate.
52590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52591$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52592    # Approximate memory in GB.
52593    memory_gb=`expr $MEMORY_SIZE / 1024`
52594    # Pick the lowest of memory in gb and number of cores.
52595    if test "$memory_gb" -lt "$NUM_CORES"; then
52596      JOBS="$memory_gb"
52597    else
52598      JOBS="$NUM_CORES"
52599      # On bigger machines, leave some room for other processes to run
52600      if test "$JOBS" -gt "4"; then
52601        JOBS=`expr $JOBS '*' 90 / 100`
52602      fi
52603    fi
52604    # Cap number of jobs to 16
52605    if test "$JOBS" -gt "16"; then
52606      JOBS=16
52607    fi
52608    if test "$JOBS" -eq "0"; then
52609      JOBS=1
52610    fi
52611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52612$as_echo "$JOBS" >&6; }
52613  else
52614    JOBS=$with_jobs
52615  fi
52616
52617
52618
52619# Setup arguments for the boot jdk (after cores and memory have been setup)
52620
52621  ##############################################################################
52622  #
52623  # Specify jvm options for anything that is run with the Boot JDK.
52624  # Not all JVM:s accept the same arguments on the command line.
52625  #
52626
52627# Check whether --with-boot-jdk-jvmargs was given.
52628if test "${with_boot_jdk_jvmargs+set}" = set; then :
52629  withval=$with_boot_jdk_jvmargs;
52630fi
52631
52632
52633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52634$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52635
52636  # Disable special log output when a debug build is used as Boot JDK...
52637
52638  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52639  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52640  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52641  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52642  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52643  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52644    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52645    JVM_ARG_OK=true
52646  else
52647    $ECHO "Arg failed:" >&5
52648    $ECHO "$OUTPUT" >&5
52649    JVM_ARG_OK=false
52650  fi
52651
52652
52653  # Apply user provided options.
52654
52655  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52656  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52657  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52658  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52659  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52660  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52661    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52662    JVM_ARG_OK=true
52663  else
52664    $ECHO "Arg failed:" >&5
52665    $ECHO "$OUTPUT" >&5
52666    JVM_ARG_OK=false
52667  fi
52668
52669
52670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52671$as_echo "$boot_jdk_jvmargs" >&6; }
52672
52673  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52674  JAVA_FLAGS=$boot_jdk_jvmargs
52675
52676
52677
52678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52679$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52680
52681  # Starting amount of heap memory.
52682
52683  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52684  $ECHO "Command: $JAVA -Xms64M -version" >&5
52685  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52686  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52687  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52688  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52689    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52690    JVM_ARG_OK=true
52691  else
52692    $ECHO "Arg failed:" >&5
52693    $ECHO "$OUTPUT" >&5
52694    JVM_ARG_OK=false
52695  fi
52696
52697
52698  # Maximum amount of heap memory.
52699  # Maximum stack size.
52700  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52701  if test "x$BUILD_NUM_BITS" = x32; then
52702    if test "$JVM_MAX_HEAP" -gt "1100"; then
52703      JVM_MAX_HEAP=1100
52704    elif test "$JVM_MAX_HEAP" -lt "512"; then
52705      JVM_MAX_HEAP=512
52706    fi
52707    STACK_SIZE=768
52708  else
52709    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52710    # pointers are used. Apparently, we need to increase the heap and stack
52711    # space for the jvm. More specifically, when running javac to build huge
52712    # jdk batch
52713    if test "$JVM_MAX_HEAP" -gt "1600"; then
52714      JVM_MAX_HEAP=1600
52715    elif test "$JVM_MAX_HEAP" -lt "512"; then
52716      JVM_MAX_HEAP=512
52717    fi
52718    STACK_SIZE=1536
52719  fi
52720
52721  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52722  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52723  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52724  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52725  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52726  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52727    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52728    JVM_ARG_OK=true
52729  else
52730    $ECHO "Arg failed:" >&5
52731    $ECHO "$OUTPUT" >&5
52732    JVM_ARG_OK=false
52733  fi
52734
52735
52736  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52737  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52738  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52739  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52740  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52741  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52742    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52743    JVM_ARG_OK=true
52744  else
52745    $ECHO "Arg failed:" >&5
52746    $ECHO "$OUTPUT" >&5
52747    JVM_ARG_OK=false
52748  fi
52749
52750
52751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52752$as_echo "$boot_jdk_jvmargs_big" >&6; }
52753
52754  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52755
52756
52757
52758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52759$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52760
52761  # Use serial gc for small short lived tools if possible
52762
52763  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52764  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52765  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52766  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52767  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52768  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52769    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52770    JVM_ARG_OK=true
52771  else
52772    $ECHO "Arg failed:" >&5
52773    $ECHO "$OUTPUT" >&5
52774    JVM_ARG_OK=false
52775  fi
52776
52777
52778  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52779  $ECHO "Command: $JAVA -Xms32M -version" >&5
52780  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52781  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52782  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52783  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52784    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52785    JVM_ARG_OK=true
52786  else
52787    $ECHO "Arg failed:" >&5
52788    $ECHO "$OUTPUT" >&5
52789    JVM_ARG_OK=false
52790  fi
52791
52792
52793  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52794  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52795  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52796  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52797  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52798  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52799    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52800    JVM_ARG_OK=true
52801  else
52802    $ECHO "Arg failed:" >&5
52803    $ECHO "$OUTPUT" >&5
52804    JVM_ARG_OK=false
52805  fi
52806
52807
52808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52809$as_echo "$boot_jdk_jvmargs_small" >&6; }
52810
52811  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52812
52813
52814  JAVA_TOOL_FLAGS_SMALL=""
52815  for f in $JAVA_FLAGS_SMALL; do
52816    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52817  done
52818
52819
52820
52821# Setup smart javac (after cores and memory have been setup)
52822
52823
52824# Check whether --with-sjavac-server-java was given.
52825if test "${with_sjavac_server_java+set}" = set; then :
52826  withval=$with_sjavac_server_java;
52827fi
52828
52829
52830  if test "x$with_sjavac_server_java" != x; then
52831    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52832    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52833    if test "x$FOUND_VERSION" = x; then
52834      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52835    fi
52836  else
52837    SJAVAC_SERVER_JAVA="$JAVA"
52838  fi
52839
52840
52841  if test "$MEMORY_SIZE" -gt "3000"; then
52842
52843  $ECHO "Check if jvm arg is ok: -d64" >&5
52844  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52845  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52846  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52847  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52848  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52849    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52850    JVM_ARG_OK=true
52851  else
52852    $ECHO "Arg failed:" >&5
52853    $ECHO "$OUTPUT" >&5
52854    JVM_ARG_OK=false
52855  fi
52856
52857    if test "$JVM_ARG_OK" = true; then
52858      JVM_64BIT=true
52859      JVM_ARG_OK=false
52860    fi
52861  fi
52862
52863  MX_VALUE=`expr $MEMORY_SIZE / 2`
52864  if test "$JVM_64BIT" = true; then
52865    # Set ms lower than mx since more than one instance of the server might
52866    # get launched at the same time before they figure out which instance won.
52867    MS_VALUE=512
52868    if test "$MX_VALUE" -gt "2048"; then
52869      MX_VALUE=2048
52870    fi
52871  else
52872    MS_VALUE=256
52873    if test "$MX_VALUE" -gt "1500"; then
52874      MX_VALUE=1500
52875    fi
52876  fi
52877  if test "$MX_VALUE" -lt "512"; then
52878    MX_VALUE=512
52879  fi
52880
52881  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52882  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52883  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52884  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52885  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52886  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52887    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52888    JVM_ARG_OK=true
52889  else
52890    $ECHO "Arg failed:" >&5
52891    $ECHO "$OUTPUT" >&5
52892    JVM_ARG_OK=false
52893  fi
52894
52895
52896
52897  # Check whether --enable-sjavac was given.
52898if test "${enable_sjavac+set}" = set; then :
52899  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52900else
52901  ENABLE_SJAVAC='no'
52902fi
52903
52904  if test "x$JVM_ARG_OK" = "xfalse"; then
52905    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52906$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52907    ENABLE_SJAVAC=no;
52908  fi
52909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52910$as_echo_n "checking whether to use sjavac... " >&6; }
52911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52912$as_echo "$ENABLE_SJAVAC" >&6; }
52913
52914
52915
52916# Can the C/C++ compiler use precompiled headers?
52917
52918
52919  ###############################################################################
52920  #
52921  # Can the C/C++ compiler use precompiled headers?
52922  #
52923  # Check whether --enable-precompiled-headers was given.
52924if test "${enable_precompiled_headers+set}" = set; then :
52925  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52926else
52927  ENABLE_PRECOMPH=yes
52928fi
52929
52930
52931  USE_PRECOMPILED_HEADER=1
52932  if test "x$ENABLE_PRECOMPH" = xno; then
52933    USE_PRECOMPILED_HEADER=0
52934  fi
52935
52936  if test "x$ENABLE_PRECOMPH" = xyes; then
52937    # Check that the compiler actually supports precomp headers.
52938    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52940$as_echo_n "checking that precompiled headers work... " >&6; }
52941      echo "int alfa();" > conftest.h
52942      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52943      if test ! -f conftest.hpp.gch; then
52944        USE_PRECOMPILED_HEADER=0
52945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52946$as_echo "no" >&6; }
52947      else
52948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52949$as_echo "yes" >&6; }
52950      fi
52951      rm -f conftest.h conftest.hpp.gch
52952    fi
52953  fi
52954
52955
52956
52957
52958# Setup use of ccache, if available
52959
52960  # Check whether --enable-ccache was given.
52961if test "${enable_ccache+set}" = set; then :
52962  enableval=$enable_ccache;
52963fi
52964
52965
52966  CCACHE=
52967  CCACHE_STATUS=
52968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52969$as_echo_n "checking is ccache enabled... " >&6; }
52970  if test "x$enable_ccache" = xyes; then
52971    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52973$as_echo "yes" >&6; }
52974      OLD_PATH="$PATH"
52975      if test "x$TOOLCHAIN_PATH" != x; then
52976        PATH=$TOOLCHAIN_PATH:$PATH
52977      fi
52978
52979
52980
52981  # Publish this variable in the help.
52982
52983
52984  if test "x$CCACHE" = x; then
52985    # The variable is not set by user, try to locate tool using the code snippet
52986    for ac_prog in ccache
52987do
52988  # Extract the first word of "$ac_prog", so it can be a program name with args.
52989set dummy $ac_prog; ac_word=$2
52990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52991$as_echo_n "checking for $ac_word... " >&6; }
52992if ${ac_cv_path_CCACHE+:} false; then :
52993  $as_echo_n "(cached) " >&6
52994else
52995  case $CCACHE in
52996  [\\/]* | ?:[\\/]*)
52997  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52998  ;;
52999  *)
53000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53001for as_dir in $PATH
53002do
53003  IFS=$as_save_IFS
53004  test -z "$as_dir" && as_dir=.
53005    for ac_exec_ext in '' $ac_executable_extensions; do
53006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53007    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53009    break 2
53010  fi
53011done
53012  done
53013IFS=$as_save_IFS
53014
53015  ;;
53016esac
53017fi
53018CCACHE=$ac_cv_path_CCACHE
53019if test -n "$CCACHE"; then
53020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53021$as_echo "$CCACHE" >&6; }
53022else
53023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53024$as_echo "no" >&6; }
53025fi
53026
53027
53028  test -n "$CCACHE" && break
53029done
53030
53031  else
53032    # The variable is set, but is it from the command line or the environment?
53033
53034    # Try to remove the string !CCACHE! from our list.
53035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53037      # If it failed, the variable was not from the command line. Ignore it,
53038      # but warn the user (except for BASH, which is always set by the calling BASH).
53039      if test "xCCACHE" != xBASH; then
53040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53041$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53042      fi
53043      # Try to locate tool using the code snippet
53044      for ac_prog in ccache
53045do
53046  # Extract the first word of "$ac_prog", so it can be a program name with args.
53047set dummy $ac_prog; ac_word=$2
53048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53049$as_echo_n "checking for $ac_word... " >&6; }
53050if ${ac_cv_path_CCACHE+:} false; then :
53051  $as_echo_n "(cached) " >&6
53052else
53053  case $CCACHE in
53054  [\\/]* | ?:[\\/]*)
53055  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53056  ;;
53057  *)
53058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53059for as_dir in $PATH
53060do
53061  IFS=$as_save_IFS
53062  test -z "$as_dir" && as_dir=.
53063    for ac_exec_ext in '' $ac_executable_extensions; do
53064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53065    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53067    break 2
53068  fi
53069done
53070  done
53071IFS=$as_save_IFS
53072
53073  ;;
53074esac
53075fi
53076CCACHE=$ac_cv_path_CCACHE
53077if test -n "$CCACHE"; then
53078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53079$as_echo "$CCACHE" >&6; }
53080else
53081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53082$as_echo "no" >&6; }
53083fi
53084
53085
53086  test -n "$CCACHE" && break
53087done
53088
53089    else
53090      # If it succeeded, then it was overridden by the user. We will use it
53091      # for the tool.
53092
53093      # First remove it from the list of overridden variables, so we can test
53094      # for unknown variables in the end.
53095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53096
53097      # Check if the provided tool contains a complete path.
53098      tool_specified="$CCACHE"
53099      tool_basename="${tool_specified##*/}"
53100      if test "x$tool_basename" = "x$tool_specified"; then
53101        # A command without a complete path is provided, search $PATH.
53102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53103$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53104        # Extract the first word of "$tool_basename", so it can be a program name with args.
53105set dummy $tool_basename; ac_word=$2
53106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53107$as_echo_n "checking for $ac_word... " >&6; }
53108if ${ac_cv_path_CCACHE+:} false; then :
53109  $as_echo_n "(cached) " >&6
53110else
53111  case $CCACHE in
53112  [\\/]* | ?:[\\/]*)
53113  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53114  ;;
53115  *)
53116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53117for as_dir in $PATH
53118do
53119  IFS=$as_save_IFS
53120  test -z "$as_dir" && as_dir=.
53121    for ac_exec_ext in '' $ac_executable_extensions; do
53122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53123    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53125    break 2
53126  fi
53127done
53128  done
53129IFS=$as_save_IFS
53130
53131  ;;
53132esac
53133fi
53134CCACHE=$ac_cv_path_CCACHE
53135if test -n "$CCACHE"; then
53136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53137$as_echo "$CCACHE" >&6; }
53138else
53139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53140$as_echo "no" >&6; }
53141fi
53142
53143
53144        if test "x$CCACHE" = x; then
53145          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53146        fi
53147      else
53148        # Otherwise we believe it is a complete path. Use it as it is.
53149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53150$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53152$as_echo_n "checking for CCACHE... " >&6; }
53153        if test ! -x "$tool_specified"; then
53154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53155$as_echo "not found" >&6; }
53156          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53157        fi
53158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53159$as_echo "$tool_specified" >&6; }
53160      fi
53161    fi
53162  fi
53163
53164
53165
53166  if test "x$CCACHE" = x; then
53167    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53168  fi
53169
53170
53171      PATH="$OLD_PATH"
53172      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53173      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53174    else
53175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53176$as_echo "no" >&6; }
53177      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53178$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53179    fi
53180  elif test "x$enable_ccache" = xno; then
53181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53182$as_echo "no, explicitly disabled" >&6; }
53183    CCACHE_STATUS="Disabled"
53184  elif test "x$enable_ccache" = x; then
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53186$as_echo "no" >&6; }
53187  else
53188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53189$as_echo "unknown" >&6; }
53190    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53191  fi
53192
53193
53194
53195# Check whether --with-ccache-dir was given.
53196if test "${with_ccache_dir+set}" = set; then :
53197  withval=$with_ccache_dir;
53198fi
53199
53200
53201  if test "x$with_ccache_dir" != x; then
53202    # When using a non home ccache directory, assume the use is to share ccache files
53203    # with other users. Thus change the umask.
53204    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53205    if test "x$CCACHE" = x; then
53206      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53207$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53208    fi
53209  fi
53210
53211  if test "x$CCACHE" != x; then
53212
53213  if test "x$CCACHE" != x; then
53214    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53215      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53216          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53217      if test "x$HAS_BAD_CCACHE" != "x"; then
53218        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53219      fi
53220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53221$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53222      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53223      PUSHED_FLAGS="$CXXFLAGS"
53224      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53225      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53226/* end confdefs.h.  */
53227
53228int
53229main ()
53230{
53231
53232  ;
53233  return 0;
53234}
53235_ACEOF
53236if ac_fn_cxx_try_compile "$LINENO"; then :
53237  CC_KNOWS_CCACHE_TRICK=yes
53238else
53239  CC_KNOWS_CCACHE_TRICK=no
53240fi
53241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53242      CXXFLAGS="$PUSHED_FLAGS"
53243      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53245$as_echo "yes" >&6; }
53246        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53247
53248        CCACHE_SLOPPINESS=pch_defines,time_macros
53249      else
53250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53251$as_echo "no" >&6; }
53252        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53253      fi
53254    fi
53255
53256    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53257        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53258
53259    if test "x$SET_CCACHE_DIR" != x; then
53260      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53261      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53262    fi
53263  fi
53264
53265  fi
53266
53267
53268###############################################################################
53269#
53270# And now the finish...
53271#
53272###############################################################################
53273
53274# Check for some common pitfalls
53275
53276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53277    file_to_test="$SRC_ROOT/LICENSE"
53278    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53279      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
53280    fi
53281  fi
53282
53283
53284  # Did user specify any unknown variables?
53285
53286  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53287    # Replace the separating ! with spaces before presenting for end user.
53288    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53289    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53290$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53291  fi
53292
53293
53294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53295$as_echo_n "checking if build directory is on local disk... " >&6; }
53296
53297  # df -l lists only local disks; if the given directory is not found then
53298  # a non-zero exit code is given
53299  if test "x$DF" = x; then
53300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53301      # msys does not have df; use Windows "net use" instead.
53302      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53303      if test "x$IS_NETWORK_DISK" = x; then
53304        OUTPUT_DIR_IS_LOCAL="yes"
53305      else
53306        OUTPUT_DIR_IS_LOCAL="no"
53307      fi
53308    else
53309      # No df here, say it's local
53310      OUTPUT_DIR_IS_LOCAL="yes"
53311    fi
53312  else
53313    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53314      OUTPUT_DIR_IS_LOCAL="yes"
53315    else
53316      OUTPUT_DIR_IS_LOCAL="no"
53317    fi
53318  fi
53319
53320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53321$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53322
53323
53324
53325  # Check if the user has any old-style ALT_ variables set.
53326  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53327
53328  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53329  # Since we can't properly handle the dependencies for this, warn the user about the situation
53330  if test -e $OUTPUT_ROOT/spec.gmk; then
53331    IS_RECONFIGURE=yes
53332  else
53333    IS_RECONFIGURE=no
53334  fi
53335
53336
53337# At the end, call the custom hook. (Dummy macro if no custom sources available)
53338
53339
53340# We're messing a bit with internal autoconf variables to put the config.status
53341# in the output directory instead of the current directory.
53342CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53343
53344# Create the actual output files. Now the main work of configure is done.
53345cat >confcache <<\_ACEOF
53346# This file is a shell script that caches the results of configure
53347# tests run on this system so they can be shared between configure
53348# scripts and configure runs, see configure's option --config-cache.
53349# It is not useful on other systems.  If it contains results you don't
53350# want to keep, you may remove or edit it.
53351#
53352# config.status only pays attention to the cache file if you give it
53353# the --recheck option to rerun configure.
53354#
53355# `ac_cv_env_foo' variables (set or unset) will be overridden when
53356# loading this file, other *unset* `ac_cv_foo' will be assigned the
53357# following values.
53358
53359_ACEOF
53360
53361# The following way of writing the cache mishandles newlines in values,
53362# but we know of no workaround that is simple, portable, and efficient.
53363# So, we kill variables containing newlines.
53364# Ultrix sh set writes to stderr and can't be redirected directly,
53365# and sets the high bit in the cache file unless we assign to the vars.
53366(
53367  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53368    eval ac_val=\$$ac_var
53369    case $ac_val in #(
53370    *${as_nl}*)
53371      case $ac_var in #(
53372      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53373$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53374      esac
53375      case $ac_var in #(
53376      _ | IFS | as_nl) ;; #(
53377      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53378      *) { eval $ac_var=; unset $ac_var;} ;;
53379      esac ;;
53380    esac
53381  done
53382
53383  (set) 2>&1 |
53384    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53385    *${as_nl}ac_space=\ *)
53386      # `set' does not quote correctly, so add quotes: double-quote
53387      # substitution turns \\\\ into \\, and sed turns \\ into \.
53388      sed -n \
53389	"s/'/'\\\\''/g;
53390	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53391      ;; #(
53392    *)
53393      # `set' quotes correctly as required by POSIX, so do not add quotes.
53394      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53395      ;;
53396    esac |
53397    sort
53398) |
53399  sed '
53400     /^ac_cv_env_/b end
53401     t clear
53402     :clear
53403     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53404     t end
53405     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53406     :end' >>confcache
53407if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53408  if test -w "$cache_file"; then
53409    if test "x$cache_file" != "x/dev/null"; then
53410      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53411$as_echo "$as_me: updating cache $cache_file" >&6;}
53412      if test ! -f "$cache_file" || test -h "$cache_file"; then
53413	cat confcache >"$cache_file"
53414      else
53415        case $cache_file in #(
53416        */* | ?:*)
53417	  mv -f confcache "$cache_file"$$ &&
53418	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53419        *)
53420	  mv -f confcache "$cache_file" ;;
53421	esac
53422      fi
53423    fi
53424  else
53425    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53426$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53427  fi
53428fi
53429rm -f confcache
53430
53431test "x$prefix" = xNONE && prefix=$ac_default_prefix
53432# Let make expand exec_prefix.
53433test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53434
53435# Transform confdefs.h into DEFS.
53436# Protect against shell expansion while executing Makefile rules.
53437# Protect against Makefile macro expansion.
53438#
53439# If the first sed substitution is executed (which looks for macros that
53440# take arguments), then branch to the quote section.  Otherwise,
53441# look for a macro that doesn't take arguments.
53442ac_script='
53443:mline
53444/\\$/{
53445 N
53446 s,\\\n,,
53447 b mline
53448}
53449t clear
53450:clear
53451s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53452t quote
53453s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53454t quote
53455b any
53456:quote
53457s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53458s/\[/\\&/g
53459s/\]/\\&/g
53460s/\$/$$/g
53461H
53462:any
53463${
53464	g
53465	s/^\n//
53466	s/\n/ /g
53467	p
53468}
53469'
53470DEFS=`sed -n "$ac_script" confdefs.h`
53471
53472
53473ac_libobjs=
53474ac_ltlibobjs=
53475U=
53476for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53477  # 1. Remove the extension, and $U if already installed.
53478  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53479  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53480  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53481  #    will be set to the directory where LIBOBJS objects are built.
53482  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53483  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53484done
53485LIBOBJS=$ac_libobjs
53486
53487LTLIBOBJS=$ac_ltlibobjs
53488
53489
53490
53491: "${CONFIG_STATUS=./config.status}"
53492ac_write_fail=0
53493ac_clean_files_save=$ac_clean_files
53494ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53495{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53496$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53497as_write_fail=0
53498cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53499#! $SHELL
53500# Generated by $as_me.
53501# Run this file to recreate the current configuration.
53502# Compiler output produced by configure, useful for debugging
53503# configure, is in config.log if it exists.
53504
53505debug=false
53506ac_cs_recheck=false
53507ac_cs_silent=false
53508
53509SHELL=\${CONFIG_SHELL-$SHELL}
53510export SHELL
53511_ASEOF
53512cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53513## -------------------- ##
53514## M4sh Initialization. ##
53515## -------------------- ##
53516
53517# Be more Bourne compatible
53518DUALCASE=1; export DUALCASE # for MKS sh
53519if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53520  emulate sh
53521  NULLCMD=:
53522  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53523  # is contrary to our usage.  Disable this feature.
53524  alias -g '${1+"$@"}'='"$@"'
53525  setopt NO_GLOB_SUBST
53526else
53527  case `(set -o) 2>/dev/null` in #(
53528  *posix*) :
53529    set -o posix ;; #(
53530  *) :
53531     ;;
53532esac
53533fi
53534
53535
53536as_nl='
53537'
53538export as_nl
53539# Printing a long string crashes Solaris 7 /usr/bin/printf.
53540as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53541as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53542as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53543# Prefer a ksh shell builtin over an external printf program on Solaris,
53544# but without wasting forks for bash or zsh.
53545if test -z "$BASH_VERSION$ZSH_VERSION" \
53546    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53547  as_echo='print -r --'
53548  as_echo_n='print -rn --'
53549elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53550  as_echo='printf %s\n'
53551  as_echo_n='printf %s'
53552else
53553  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53554    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53555    as_echo_n='/usr/ucb/echo -n'
53556  else
53557    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53558    as_echo_n_body='eval
53559      arg=$1;
53560      case $arg in #(
53561      *"$as_nl"*)
53562	expr "X$arg" : "X\\(.*\\)$as_nl";
53563	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53564      esac;
53565      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53566    '
53567    export as_echo_n_body
53568    as_echo_n='sh -c $as_echo_n_body as_echo'
53569  fi
53570  export as_echo_body
53571  as_echo='sh -c $as_echo_body as_echo'
53572fi
53573
53574# The user is always right.
53575if test "${PATH_SEPARATOR+set}" != set; then
53576  PATH_SEPARATOR=:
53577  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53578    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53579      PATH_SEPARATOR=';'
53580  }
53581fi
53582
53583
53584# IFS
53585# We need space, tab and new line, in precisely that order.  Quoting is
53586# there to prevent editors from complaining about space-tab.
53587# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53588# splitting by setting IFS to empty value.)
53589IFS=" ""	$as_nl"
53590
53591# Find who we are.  Look in the path if we contain no directory separator.
53592as_myself=
53593case $0 in #((
53594  *[\\/]* ) as_myself=$0 ;;
53595  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53596for as_dir in $PATH
53597do
53598  IFS=$as_save_IFS
53599  test -z "$as_dir" && as_dir=.
53600    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53601  done
53602IFS=$as_save_IFS
53603
53604     ;;
53605esac
53606# We did not find ourselves, most probably we were run as `sh COMMAND'
53607# in which case we are not to be found in the path.
53608if test "x$as_myself" = x; then
53609  as_myself=$0
53610fi
53611if test ! -f "$as_myself"; then
53612  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53613  exit 1
53614fi
53615
53616# Unset variables that we do not need and which cause bugs (e.g. in
53617# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53618# suppresses any "Segmentation fault" message there.  '((' could
53619# trigger a bug in pdksh 5.2.14.
53620for as_var in BASH_ENV ENV MAIL MAILPATH
53621do eval test x\${$as_var+set} = xset \
53622  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53623done
53624PS1='$ '
53625PS2='> '
53626PS4='+ '
53627
53628# NLS nuisances.
53629LC_ALL=C
53630export LC_ALL
53631LANGUAGE=C
53632export LANGUAGE
53633
53634# CDPATH.
53635(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53636
53637
53638# as_fn_error STATUS ERROR [LINENO LOG_FD]
53639# ----------------------------------------
53640# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53641# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53642# script with STATUS, using 1 if that was 0.
53643as_fn_error ()
53644{
53645  as_status=$1; test $as_status -eq 0 && as_status=1
53646  if test "$4"; then
53647    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53648    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53649  fi
53650  $as_echo "$as_me: error: $2" >&2
53651  as_fn_exit $as_status
53652} # as_fn_error
53653
53654
53655# as_fn_set_status STATUS
53656# -----------------------
53657# Set $? to STATUS, without forking.
53658as_fn_set_status ()
53659{
53660  return $1
53661} # as_fn_set_status
53662
53663# as_fn_exit STATUS
53664# -----------------
53665# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53666as_fn_exit ()
53667{
53668  set +e
53669  as_fn_set_status $1
53670  exit $1
53671} # as_fn_exit
53672
53673# as_fn_unset VAR
53674# ---------------
53675# Portably unset VAR.
53676as_fn_unset ()
53677{
53678  { eval $1=; unset $1;}
53679}
53680as_unset=as_fn_unset
53681# as_fn_append VAR VALUE
53682# ----------------------
53683# Append the text in VALUE to the end of the definition contained in VAR. Take
53684# advantage of any shell optimizations that allow amortized linear growth over
53685# repeated appends, instead of the typical quadratic growth present in naive
53686# implementations.
53687if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53688  eval 'as_fn_append ()
53689  {
53690    eval $1+=\$2
53691  }'
53692else
53693  as_fn_append ()
53694  {
53695    eval $1=\$$1\$2
53696  }
53697fi # as_fn_append
53698
53699# as_fn_arith ARG...
53700# ------------------
53701# Perform arithmetic evaluation on the ARGs, and store the result in the
53702# global $as_val. Take advantage of shells that can avoid forks. The arguments
53703# must be portable across $(()) and expr.
53704if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53705  eval 'as_fn_arith ()
53706  {
53707    as_val=$(( $* ))
53708  }'
53709else
53710  as_fn_arith ()
53711  {
53712    as_val=`expr "$@" || test $? -eq 1`
53713  }
53714fi # as_fn_arith
53715
53716
53717if expr a : '\(a\)' >/dev/null 2>&1 &&
53718   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53719  as_expr=expr
53720else
53721  as_expr=false
53722fi
53723
53724if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53725  as_basename=basename
53726else
53727  as_basename=false
53728fi
53729
53730if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53731  as_dirname=dirname
53732else
53733  as_dirname=false
53734fi
53735
53736as_me=`$as_basename -- "$0" ||
53737$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53738	 X"$0" : 'X\(//\)$' \| \
53739	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53740$as_echo X/"$0" |
53741    sed '/^.*\/\([^/][^/]*\)\/*$/{
53742	    s//\1/
53743	    q
53744	  }
53745	  /^X\/\(\/\/\)$/{
53746	    s//\1/
53747	    q
53748	  }
53749	  /^X\/\(\/\).*/{
53750	    s//\1/
53751	    q
53752	  }
53753	  s/.*/./; q'`
53754
53755# Avoid depending upon Character Ranges.
53756as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53757as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53758as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53759as_cr_digits='0123456789'
53760as_cr_alnum=$as_cr_Letters$as_cr_digits
53761
53762ECHO_C= ECHO_N= ECHO_T=
53763case `echo -n x` in #(((((
53764-n*)
53765  case `echo 'xy\c'` in
53766  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53767  xy)  ECHO_C='\c';;
53768  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53769       ECHO_T='	';;
53770  esac;;
53771*)
53772  ECHO_N='-n';;
53773esac
53774
53775rm -f conf$$ conf$$.exe conf$$.file
53776if test -d conf$$.dir; then
53777  rm -f conf$$.dir/conf$$.file
53778else
53779  rm -f conf$$.dir
53780  mkdir conf$$.dir 2>/dev/null
53781fi
53782if (echo >conf$$.file) 2>/dev/null; then
53783  if ln -s conf$$.file conf$$ 2>/dev/null; then
53784    as_ln_s='ln -s'
53785    # ... but there are two gotchas:
53786    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53787    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53788    # In both cases, we have to default to `cp -pR'.
53789    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53790      as_ln_s='cp -pR'
53791  elif ln conf$$.file conf$$ 2>/dev/null; then
53792    as_ln_s=ln
53793  else
53794    as_ln_s='cp -pR'
53795  fi
53796else
53797  as_ln_s='cp -pR'
53798fi
53799rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53800rmdir conf$$.dir 2>/dev/null
53801
53802
53803# as_fn_mkdir_p
53804# -------------
53805# Create "$as_dir" as a directory, including parents if necessary.
53806as_fn_mkdir_p ()
53807{
53808
53809  case $as_dir in #(
53810  -*) as_dir=./$as_dir;;
53811  esac
53812  test -d "$as_dir" || eval $as_mkdir_p || {
53813    as_dirs=
53814    while :; do
53815      case $as_dir in #(
53816      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53817      *) as_qdir=$as_dir;;
53818      esac
53819      as_dirs="'$as_qdir' $as_dirs"
53820      as_dir=`$as_dirname -- "$as_dir" ||
53821$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53822	 X"$as_dir" : 'X\(//\)[^/]' \| \
53823	 X"$as_dir" : 'X\(//\)$' \| \
53824	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53825$as_echo X"$as_dir" |
53826    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53827	    s//\1/
53828	    q
53829	  }
53830	  /^X\(\/\/\)[^/].*/{
53831	    s//\1/
53832	    q
53833	  }
53834	  /^X\(\/\/\)$/{
53835	    s//\1/
53836	    q
53837	  }
53838	  /^X\(\/\).*/{
53839	    s//\1/
53840	    q
53841	  }
53842	  s/.*/./; q'`
53843      test -d "$as_dir" && break
53844    done
53845    test -z "$as_dirs" || eval "mkdir $as_dirs"
53846  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53847
53848
53849} # as_fn_mkdir_p
53850if mkdir -p . 2>/dev/null; then
53851  as_mkdir_p='mkdir -p "$as_dir"'
53852else
53853  test -d ./-p && rmdir ./-p
53854  as_mkdir_p=false
53855fi
53856
53857
53858# as_fn_executable_p FILE
53859# -----------------------
53860# Test if FILE is an executable regular file.
53861as_fn_executable_p ()
53862{
53863  test -f "$1" && test -x "$1"
53864} # as_fn_executable_p
53865as_test_x='test -x'
53866as_executable_p=as_fn_executable_p
53867
53868# Sed expression to map a string onto a valid CPP name.
53869as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53870
53871# Sed expression to map a string onto a valid variable name.
53872as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53873
53874
53875exec 6>&1
53876## ----------------------------------- ##
53877## Main body of $CONFIG_STATUS script. ##
53878## ----------------------------------- ##
53879_ASEOF
53880test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53881
53882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53883# Save the log message, to keep $0 and so on meaningful, and to
53884# report actual input values of CONFIG_FILES etc. instead of their
53885# values after options handling.
53886ac_log="
53887This file was extended by OpenJDK $as_me jdk9, which was
53888generated by GNU Autoconf 2.69.  Invocation command line was
53889
53890  CONFIG_FILES    = $CONFIG_FILES
53891  CONFIG_HEADERS  = $CONFIG_HEADERS
53892  CONFIG_LINKS    = $CONFIG_LINKS
53893  CONFIG_COMMANDS = $CONFIG_COMMANDS
53894  $ $0 $@
53895
53896on `(hostname || uname -n) 2>/dev/null | sed 1q`
53897"
53898
53899_ACEOF
53900
53901case $ac_config_files in *"
53902"*) set x $ac_config_files; shift; ac_config_files=$*;;
53903esac
53904
53905
53906
53907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53908# Files that config.status was made for.
53909config_files="$ac_config_files"
53910
53911_ACEOF
53912
53913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53914ac_cs_usage="\
53915\`$as_me' instantiates files and other configuration actions
53916from templates according to the current configuration.  Unless the files
53917and actions are specified as TAGs, all are instantiated by default.
53918
53919Usage: $0 [OPTION]... [TAG]...
53920
53921  -h, --help       print this help, then exit
53922  -V, --version    print version number and configuration settings, then exit
53923      --config     print configuration, then exit
53924  -q, --quiet, --silent
53925                   do not print progress messages
53926  -d, --debug      don't remove temporary files
53927      --recheck    update $as_me by reconfiguring in the same conditions
53928      --file=FILE[:TEMPLATE]
53929                   instantiate the configuration file FILE
53930
53931Configuration files:
53932$config_files
53933
53934Report bugs to <build-dev@openjdk.java.net>.
53935OpenJDK home page: <http://openjdk.java.net>."
53936
53937_ACEOF
53938cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53939ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53940ac_cs_version="\\
53941OpenJDK config.status jdk9
53942configured by $0, generated by GNU Autoconf 2.69,
53943  with options \\"\$ac_cs_config\\"
53944
53945Copyright (C) 2012 Free Software Foundation, Inc.
53946This config.status script is free software; the Free Software Foundation
53947gives unlimited permission to copy, distribute and modify it."
53948
53949ac_pwd='$ac_pwd'
53950srcdir='$srcdir'
53951AWK='$AWK'
53952test -n "\$AWK" || AWK=awk
53953_ACEOF
53954
53955cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53956# The default lists apply if the user does not specify any file.
53957ac_need_defaults=:
53958while test $# != 0
53959do
53960  case $1 in
53961  --*=?*)
53962    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53963    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53964    ac_shift=:
53965    ;;
53966  --*=)
53967    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53968    ac_optarg=
53969    ac_shift=:
53970    ;;
53971  *)
53972    ac_option=$1
53973    ac_optarg=$2
53974    ac_shift=shift
53975    ;;
53976  esac
53977
53978  case $ac_option in
53979  # Handling of the options.
53980  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53981    ac_cs_recheck=: ;;
53982  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53983    $as_echo "$ac_cs_version"; exit ;;
53984  --config | --confi | --conf | --con | --co | --c )
53985    $as_echo "$ac_cs_config"; exit ;;
53986  --debug | --debu | --deb | --de | --d | -d )
53987    debug=: ;;
53988  --file | --fil | --fi | --f )
53989    $ac_shift
53990    case $ac_optarg in
53991    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53992    '') as_fn_error $? "missing file argument" ;;
53993    esac
53994    as_fn_append CONFIG_FILES " '$ac_optarg'"
53995    ac_need_defaults=false;;
53996  --he | --h |  --help | --hel | -h )
53997    $as_echo "$ac_cs_usage"; exit ;;
53998  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53999  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54000    ac_cs_silent=: ;;
54001
54002  # This is an error.
54003  -*) as_fn_error $? "unrecognized option: \`$1'
54004Try \`$0 --help' for more information." ;;
54005
54006  *) as_fn_append ac_config_targets " $1"
54007     ac_need_defaults=false ;;
54008
54009  esac
54010  shift
54011done
54012
54013ac_configure_extra_args=
54014
54015if $ac_cs_silent; then
54016  exec 6>/dev/null
54017  ac_configure_extra_args="$ac_configure_extra_args --silent"
54018fi
54019
54020_ACEOF
54021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54022if \$ac_cs_recheck; then
54023  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54024  shift
54025  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54026  CONFIG_SHELL='$SHELL'
54027  export CONFIG_SHELL
54028  exec "\$@"
54029fi
54030
54031_ACEOF
54032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54033exec 5>>config.log
54034{
54035  echo
54036  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54037## Running $as_me. ##
54038_ASBOX
54039  $as_echo "$ac_log"
54040} >&5
54041
54042_ACEOF
54043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54044_ACEOF
54045
54046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54047
54048# Handling of arguments.
54049for ac_config_target in $ac_config_targets
54050do
54051  case $ac_config_target in
54052    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54053    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54054    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54055    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54056    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54057
54058  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54059  esac
54060done
54061
54062
54063# If the user did not use the arguments to specify the items to instantiate,
54064# then the envvar interface is used.  Set only those that are not.
54065# We use the long form for the default assignment because of an extremely
54066# bizarre bug on SunOS 4.1.3.
54067if $ac_need_defaults; then
54068  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54069fi
54070
54071# Have a temporary directory for convenience.  Make it in the build tree
54072# simply because there is no reason against having it here, and in addition,
54073# creating and moving files from /tmp can sometimes cause problems.
54074# Hook for its removal unless debugging.
54075# Note that there is a small window in which the directory will not be cleaned:
54076# after its creation but before its name has been assigned to `$tmp'.
54077$debug ||
54078{
54079  tmp= ac_tmp=
54080  trap 'exit_status=$?
54081  : "${ac_tmp:=$tmp}"
54082  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54083' 0
54084  trap 'as_fn_exit 1' 1 2 13 15
54085}
54086# Create a (secure) tmp directory for tmp files.
54087
54088{
54089  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54090  test -d "$tmp"
54091}  ||
54092{
54093  tmp=./conf$$-$RANDOM
54094  (umask 077 && mkdir "$tmp")
54095} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54096ac_tmp=$tmp
54097
54098# Set up the scripts for CONFIG_FILES section.
54099# No need to generate them if there are no CONFIG_FILES.
54100# This happens for instance with `./config.status config.h'.
54101if test -n "$CONFIG_FILES"; then
54102
54103
54104ac_cr=`echo X | tr X '\015'`
54105# On cygwin, bash can eat \r inside `` if the user requested igncr.
54106# But we know of no other shell where ac_cr would be empty at this
54107# point, so we can use a bashism as a fallback.
54108if test "x$ac_cr" = x; then
54109  eval ac_cr=\$\'\\r\'
54110fi
54111ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54112if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54113  ac_cs_awk_cr='\\r'
54114else
54115  ac_cs_awk_cr=$ac_cr
54116fi
54117
54118echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54119_ACEOF
54120
54121
54122{
54123  echo "cat >conf$$subs.awk <<_ACEOF" &&
54124  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54125  echo "_ACEOF"
54126} >conf$$subs.sh ||
54127  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54128ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54129ac_delim='%!_!# '
54130for ac_last_try in false false false false false :; do
54131  . ./conf$$subs.sh ||
54132    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54133
54134  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54135  if test $ac_delim_n = $ac_delim_num; then
54136    break
54137  elif $ac_last_try; then
54138    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54139  else
54140    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54141  fi
54142done
54143rm -f conf$$subs.sh
54144
54145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54146cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54147_ACEOF
54148sed -n '
54149h
54150s/^/S["/; s/!.*/"]=/
54151p
54152g
54153s/^[^!]*!//
54154:repl
54155t repl
54156s/'"$ac_delim"'$//
54157t delim
54158:nl
54159h
54160s/\(.\{148\}\)..*/\1/
54161t more1
54162s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54163p
54164n
54165b repl
54166:more1
54167s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54168p
54169g
54170s/.\{148\}//
54171t nl
54172:delim
54173h
54174s/\(.\{148\}\)..*/\1/
54175t more2
54176s/["\\]/\\&/g; s/^/"/; s/$/"/
54177p
54178b
54179:more2
54180s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54181p
54182g
54183s/.\{148\}//
54184t delim
54185' <conf$$subs.awk | sed '
54186/^[^""]/{
54187  N
54188  s/\n//
54189}
54190' >>$CONFIG_STATUS || ac_write_fail=1
54191rm -f conf$$subs.awk
54192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54193_ACAWK
54194cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54195  for (key in S) S_is_set[key] = 1
54196  FS = ""
54197
54198}
54199{
54200  line = $ 0
54201  nfields = split(line, field, "@")
54202  substed = 0
54203  len = length(field[1])
54204  for (i = 2; i < nfields; i++) {
54205    key = field[i]
54206    keylen = length(key)
54207    if (S_is_set[key]) {
54208      value = S[key]
54209      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54210      len += length(value) + length(field[++i])
54211      substed = 1
54212    } else
54213      len += 1 + keylen
54214  }
54215
54216  print line
54217}
54218
54219_ACAWK
54220_ACEOF
54221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54222if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54223  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54224else
54225  cat
54226fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54227  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54228_ACEOF
54229
54230# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54231# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54232# trailing colons and then remove the whole line if VPATH becomes empty
54233# (actually we leave an empty line to preserve line numbers).
54234if test "x$srcdir" = x.; then
54235  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54236h
54237s///
54238s/^/:/
54239s/[	 ]*$/:/
54240s/:\$(srcdir):/:/g
54241s/:\${srcdir}:/:/g
54242s/:@srcdir@:/:/g
54243s/^:*//
54244s/:*$//
54245x
54246s/\(=[	 ]*\).*/\1/
54247G
54248s/\n//
54249s/^[^=]*=[	 ]*$//
54250}'
54251fi
54252
54253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54254fi # test -n "$CONFIG_FILES"
54255
54256
54257eval set X "  :F $CONFIG_FILES      "
54258shift
54259for ac_tag
54260do
54261  case $ac_tag in
54262  :[FHLC]) ac_mode=$ac_tag; continue;;
54263  esac
54264  case $ac_mode$ac_tag in
54265  :[FHL]*:*);;
54266  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54267  :[FH]-) ac_tag=-:-;;
54268  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54269  esac
54270  ac_save_IFS=$IFS
54271  IFS=:
54272  set x $ac_tag
54273  IFS=$ac_save_IFS
54274  shift
54275  ac_file=$1
54276  shift
54277
54278  case $ac_mode in
54279  :L) ac_source=$1;;
54280  :[FH])
54281    ac_file_inputs=
54282    for ac_f
54283    do
54284      case $ac_f in
54285      -) ac_f="$ac_tmp/stdin";;
54286      *) # Look for the file first in the build tree, then in the source tree
54287	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54288	 # because $ac_f cannot contain `:'.
54289	 test -f "$ac_f" ||
54290	   case $ac_f in
54291	   [\\/$]*) false;;
54292	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54293	   esac ||
54294	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54295      esac
54296      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54297      as_fn_append ac_file_inputs " '$ac_f'"
54298    done
54299
54300    # Let's still pretend it is `configure' which instantiates (i.e., don't
54301    # use $as_me), people would be surprised to read:
54302    #    /* config.h.  Generated by config.status.  */
54303    configure_input='Generated from '`
54304	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54305	`' by configure.'
54306    if test x"$ac_file" != x-; then
54307      configure_input="$ac_file.  $configure_input"
54308      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54309$as_echo "$as_me: creating $ac_file" >&6;}
54310    fi
54311    # Neutralize special characters interpreted by sed in replacement strings.
54312    case $configure_input in #(
54313    *\&* | *\|* | *\\* )
54314       ac_sed_conf_input=`$as_echo "$configure_input" |
54315       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54316    *) ac_sed_conf_input=$configure_input;;
54317    esac
54318
54319    case $ac_tag in
54320    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54321      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54322    esac
54323    ;;
54324  esac
54325
54326  ac_dir=`$as_dirname -- "$ac_file" ||
54327$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54328	 X"$ac_file" : 'X\(//\)[^/]' \| \
54329	 X"$ac_file" : 'X\(//\)$' \| \
54330	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54331$as_echo X"$ac_file" |
54332    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54333	    s//\1/
54334	    q
54335	  }
54336	  /^X\(\/\/\)[^/].*/{
54337	    s//\1/
54338	    q
54339	  }
54340	  /^X\(\/\/\)$/{
54341	    s//\1/
54342	    q
54343	  }
54344	  /^X\(\/\).*/{
54345	    s//\1/
54346	    q
54347	  }
54348	  s/.*/./; q'`
54349  as_dir="$ac_dir"; as_fn_mkdir_p
54350  ac_builddir=.
54351
54352case "$ac_dir" in
54353.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54354*)
54355  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54356  # A ".." for each directory in $ac_dir_suffix.
54357  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54358  case $ac_top_builddir_sub in
54359  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54360  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54361  esac ;;
54362esac
54363ac_abs_top_builddir=$ac_pwd
54364ac_abs_builddir=$ac_pwd$ac_dir_suffix
54365# for backward compatibility:
54366ac_top_builddir=$ac_top_build_prefix
54367
54368case $srcdir in
54369  .)  # We are building in place.
54370    ac_srcdir=.
54371    ac_top_srcdir=$ac_top_builddir_sub
54372    ac_abs_top_srcdir=$ac_pwd ;;
54373  [\\/]* | ?:[\\/]* )  # Absolute name.
54374    ac_srcdir=$srcdir$ac_dir_suffix;
54375    ac_top_srcdir=$srcdir
54376    ac_abs_top_srcdir=$srcdir ;;
54377  *) # Relative name.
54378    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54379    ac_top_srcdir=$ac_top_build_prefix$srcdir
54380    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54381esac
54382ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54383
54384
54385  case $ac_mode in
54386  :F)
54387  #
54388  # CONFIG_FILE
54389  #
54390
54391_ACEOF
54392
54393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54394# If the template does not know about datarootdir, expand it.
54395# FIXME: This hack should be removed a few years after 2.60.
54396ac_datarootdir_hack=; ac_datarootdir_seen=
54397ac_sed_dataroot='
54398/datarootdir/ {
54399  p
54400  q
54401}
54402/@datadir@/p
54403/@docdir@/p
54404/@infodir@/p
54405/@localedir@/p
54406/@mandir@/p'
54407case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54408*datarootdir*) ac_datarootdir_seen=yes;;
54409*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54410  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54411$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54412_ACEOF
54413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54414  ac_datarootdir_hack='
54415  s&@datadir@&$datadir&g
54416  s&@docdir@&$docdir&g
54417  s&@infodir@&$infodir&g
54418  s&@localedir@&$localedir&g
54419  s&@mandir@&$mandir&g
54420  s&\\\${datarootdir}&$datarootdir&g' ;;
54421esac
54422_ACEOF
54423
54424# Neutralize VPATH when `$srcdir' = `.'.
54425# Shell code in configure.ac might set extrasub.
54426# FIXME: do we really want to maintain this feature?
54427cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54428ac_sed_extra="$ac_vpsub
54429$extrasub
54430_ACEOF
54431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54432:t
54433/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54434s|@configure_input@|$ac_sed_conf_input|;t t
54435s&@top_builddir@&$ac_top_builddir_sub&;t t
54436s&@top_build_prefix@&$ac_top_build_prefix&;t t
54437s&@srcdir@&$ac_srcdir&;t t
54438s&@abs_srcdir@&$ac_abs_srcdir&;t t
54439s&@top_srcdir@&$ac_top_srcdir&;t t
54440s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54441s&@builddir@&$ac_builddir&;t t
54442s&@abs_builddir@&$ac_abs_builddir&;t t
54443s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54444$ac_datarootdir_hack
54445"
54446eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54447  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54448
54449test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54450  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54451  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54452      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54453  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54454which seems to be undefined.  Please make sure it is defined" >&5
54455$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54456which seems to be undefined.  Please make sure it is defined" >&2;}
54457
54458  rm -f "$ac_tmp/stdin"
54459  case $ac_file in
54460  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54461  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54462  esac \
54463  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54464 ;;
54465
54466
54467
54468  esac
54469
54470done # for ac_tag
54471
54472
54473as_fn_exit 0
54474_ACEOF
54475ac_clean_files=$ac_clean_files_save
54476
54477test $ac_write_fail = 0 ||
54478  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54479
54480
54481# configure is writing to config.log, and then calls config.status.
54482# config.status does its own redirection, appending to config.log.
54483# Unfortunately, on DOS this fails, as config.log is still kept open
54484# by configure, so config.status won't be able to write to it; its
54485# output is simply discarded.  So we exec the FD to /dev/null,
54486# effectively closing config.log, so it can be properly (re)opened and
54487# appended to by config.status.  When coming back to configure, we
54488# need to make the FD available again.
54489if test "$no_create" != yes; then
54490  ac_cs_success=:
54491  ac_config_status_args=
54492  test "$silent" = yes &&
54493    ac_config_status_args="$ac_config_status_args --quiet"
54494  exec 5>/dev/null
54495  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54496  exec 5>>config.log
54497  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54498  # would make configure fail if this is the last instruction.
54499  $ac_cs_success || as_fn_exit 1
54500fi
54501if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54502  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54503$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54504fi
54505
54506
54507# After AC_OUTPUT, we need to do final work
54508
54509
54510  # Try to move config.log (generated by autoconf) to the configure-support directory.
54511  if test -e ./config.log; then
54512    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54513  fi
54514
54515  # Rotate our log file (configure.log)
54516  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54517    $RM -f "$OUTPUT_ROOT/configure.log.old"
54518  fi
54519  if test -e "$OUTPUT_ROOT/configure.log"; then
54520    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54521  fi
54522
54523  # Move configure.log from current directory to the build output root
54524  if test -e ./configure.log; then
54525    echo found it
54526    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54527  fi
54528
54529  # Make the compare script executable
54530  $CHMOD +x $OUTPUT_ROOT/compare.sh
54531
54532
54533# Finally output some useful information to the user
54534
54535  # Finally output some useful information to the user
54536
54537  printf "\n"
54538  printf "====================================================\n"
54539  if test "x$no_create" != "xyes"; then
54540    if test "x$IS_RECONFIGURE" != "xyes"; then
54541      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54542    else
54543      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54544    fi
54545  else
54546    if test "x$IS_RECONFIGURE" != "xyes"; then
54547      printf "A configuration has been successfully checked but not created\n"
54548    else
54549      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54550    fi
54551  fi
54552  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54553    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54554  else
54555    printf "using default settings.\n"
54556  fi
54557
54558  printf "\n"
54559  printf "Configuration summary:\n"
54560  printf "* Debug level:    $DEBUG_LEVEL\n"
54561  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54562  printf "* JDK variant:    $JDK_VARIANT\n"
54563  printf "* JVM variants:   $with_jvm_variants\n"
54564  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54565
54566  printf "\n"
54567  printf "Tools summary:\n"
54568  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54569    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54570  fi
54571  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54572  if test "x$TOOLCHAIN_VERSION" != "x"; then
54573    print_version=" $TOOLCHAIN_VERSION"
54574  fi
54575  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54576  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54577  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54578
54579  printf "\n"
54580  printf "Build performance summary:\n"
54581  printf "* Cores to use:   $JOBS\n"
54582  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54583  if test "x$CCACHE_STATUS" != "x"; then
54584    printf "* ccache status:  $CCACHE_STATUS\n"
54585  fi
54586  printf "\n"
54587
54588  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54589    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54590    printf "will result in longer build times.\n"
54591    printf "\n"
54592  fi
54593
54594  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54595    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54596    printf "These are not respected, and will be ignored. It is recommended\n"
54597    printf "that you clean your environment. The following variables are set:\n"
54598    printf "$FOUND_ALT_VARIABLES\n"
54599    printf "\n"
54600  fi
54601
54602  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54603    printf "WARNING: Your build output directory is not on a local disk.\n"
54604    printf "This will severely degrade build performance!\n"
54605    printf "It is recommended that you create an output directory on a local disk,\n"
54606    printf "and run the configure script again from that directory.\n"
54607    printf "\n"
54608  fi
54609
54610  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54611    printf "WARNING: The result of this configuration has overridden an older\n"
54612    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54613    printf "proper build. Failure to do so might result in strange build problems.\n"
54614    printf "\n"
54615  fi
54616
54617  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54618    printf "WARNING: The result of this configuration was not saved.\n"
54619    printf "You should run without '--no-create | -n' to create the configuration.\n"
54620    printf "\n"
54621  fi
54622
54623
54624
54625  # Locate config.log.
54626  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54627    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54628  elif test -e "./config.log"; then
54629    CONFIG_LOG_PATH="."
54630  fi
54631
54632  if test -e "$CONFIG_LOG_PATH/config.log"; then
54633    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54634    if test $? -eq 0; then
54635      printf "The following warnings were produced. Repeated here for convenience:\n"
54636      # We must quote sed expression (using []) to stop m4 from eating the [].
54637      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54638      printf "\n"
54639    fi
54640  fi
54641
54642