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 jdk8.
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='jdk8'
590PACKAGE_STRING='OpenJDK jdk8'
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
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643UCRT_DLL_DIR
644MSVCP_DLL
645MSVCR_DLL
646LIBCXX
647LLVM_LIBS
648LLVM_LDFLAGS
649LLVM_CFLAGS
650LLVM_CONFIG
651LIBFFI_LIBS
652LIBFFI_CFLAGS
653STATIC_CXX_SETTING
654LIBDL
655LIBM
656LIBZIP_CAN_USE_MMAP
657USE_EXTERNAL_LIBZ
658GIFLIB_LDFLAGS
659GIFLIB_CFLAGS
660USE_EXTERNAL_LIBGIF
661USE_EXTERNAL_LIBJPEG
662FONTCONFIG_CFLAGS
663ALSA_LIBS
664ALSA_CFLAGS
665FREETYPE_BUNDLE_LIB_PATH
666FREETYPE_LIBS
667FREETYPE_CFLAGS
668CUPS_CFLAGS
669X_EXTRA_LIBS
670X_LIBS
671X_PRE_LIBS
672X_CFLAGS
673XMKMF
674FIXPATH
675ZIP_DEBUGINFO_FILES
676DEBUG_BINARIES
677STRIP_POLICY
678ENABLE_DEBUG_SYMBOLS
679COMPILER_SUPPORTS_TARGET_BITS_FLAG
680ZERO_ARCHFLAG
681LDFLAGS_CXX_JDK
682LDFLAGS_JDKEXE_SUFFIX
683LDFLAGS_JDKLIB_SUFFIX
684LDFLAGS_JDKEXE
685LDFLAGS_JDKLIB
686CXXFLAGS_JDKEXE
687CXXFLAGS_JDKLIB
688CFLAGS_JDKEXE
689CFLAGS_JDKLIB
690MACOSX_VERSION_MIN
691FDLIBM_CFLAGS
692USE_FORMAT_OVERFLOW
693NO_LIFETIME_DSE_CFLAG
694NO_DELETE_NULL_POINTER_CHECKS_CFLAG
695LEGACY_EXTRA_ASFLAGS
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXXSTD_CXXFLAG
700CXX_O_FLAG_NONE
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_NORM
706C_O_FLAG_HI
707C_O_FLAG_HIGHEST
708CXXFLAGS_DEBUG_SYMBOLS
709CFLAGS_DEBUG_SYMBOLS
710ASFLAGS_DEBUG_SYMBOLS
711CXX_FLAG_DEPS
712C_FLAG_DEPS
713SET_SHARED_LIBRARY_MAPFILE
714SET_SHARED_LIBRARY_NAME
715SET_SHARED_LIBRARY_ORIGIN
716SET_EXECUTABLE_ORIGIN
717SHARED_LIBRARY_FLAGS
718CXX_FLAG_REORDER
719C_FLAG_REORDER
720SYSROOT_LDFLAGS
721SYSROOT_CFLAGS
722RC_FLAGS
723AR_OUT_OPTION
724LD_OUT_OPTION
725EXE_OUT_OPTION
726CC_OUT_OPTION
727POST_MCS_CMD
728POST_STRIP_CMD
729ARFLAGS
730COMPILER_TARGET_BITS_FLAG
731JT_HOME
732JTREGEXE
733USING_BROKEN_SUSE_LD
734PACKAGE_PATH
735LDEXECXX
736LDEXE
737USE_CLANG
738HOTSPOT_LD
739HOTSPOT_CXX
740HOTSPOT_RC
741HOTSPOT_MT
742BUILD_LD
743BUILD_CXX
744BUILD_CC
745ac_ct_OBJDUMP
746OBJDUMP
747ac_ct_OBJCOPY
748OBJCOPY
749ac_ct_NM
750OTOOL
751ac_ct_STRIP
752MCS
753GNM
754NM
755STRIP
756MSBUILD
757DUMPBIN
758RC
759MT
760LIPO
761ac_ct_OBJC
762OBJCFLAGS
763OBJC
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771CXX_VERSION_NUMBER
772CC_VERSION_NUMBER
773ac_ct_CXX
774CXXFLAGS
775CXX
776ac_ct_PROPER_COMPILER_CXX
777PROPER_COMPILER_CXX
778TOOLCHAIN_PATH_CXX
779POTENTIAL_CXX
780OBJEXT
781EXEEXT
782ac_ct_CC
783CPPFLAGS
784LDFLAGS
785CFLAGS
786CC
787ac_ct_PROPER_COMPILER_CC
788PROPER_COMPILER_CC
789TOOLCHAIN_PATH_CC
790POTENTIAL_CC
791SDKPATH
792XCODEBUILD
793SET_DEVELOPER_DIR
794VS_LIB
795VS_INCLUDE
796VS_PATH
797CYGWIN_LINK
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818JAVA_FLAGS_SMALL
819JAVA_FLAGS_BIG
820JAVA_FLAGS
821BOOT_JDK_BITS
822JAVAC_FLAGS
823BOOT_JDK_SOURCETARGET
824BOOT_JDK
825BOOT_TOOLSJAR
826BOOT_RTJAR
827JAVA_CHECK
828JAVAC_CHECK
829COOKED_BUILD_NUMBER
830COOKED_JDK_UPDATE_VERSION
831JDK_VERSION
832COPYRIGHT_YEAR
833VENDOR_URL_VM_BUG
834VENDOR_URL_BUG
835VENDOR_URL
836COMPANY_NAME
837MACOSX_BUNDLE_ID_BASE
838MACOSX_BUNDLE_NAME_BASE
839JDK_RC_PLATFORM_NAME
840PRODUCT_SUFFIX
841PRODUCT_NAME
842LAUNCHER_NAME
843MILESTONE
844JDK_BUILD_NUMBER
845JDK_UPDATE_VERSION
846JDK_MICRO_VERSION
847JDK_MINOR_VERSION
848JDK_MAJOR_VERSION
849USER_RELEASE_SUFFIX
850ENABLE_JFR
851COMPRESS_JARS
852BSD_STATIC_LIBJLI
853UNLIMITED_CRYPTO
854CACERTS_FILE
855TEST_IN_BUILD
856BUILD_HEADLESS
857SUPPORT_HEADFUL
858SUPPORT_HEADLESS
859BDEPS_FTP
860BDEPS_UNZIP
861OS_VERSION_MICRO
862OS_VERSION_MINOR
863OS_VERSION_MAJOR
864PKG_CONFIG
865CODESIGN
866XATTR
867DSYMUTIL
868IS_GNU_TIME
869TIME
870STAT
871HG
872READELF
873LDD
874ZIP
875UNZIP
876FIND_DELETE
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883OUTPUT_ROOT
884CONF_NAME
885SPEC
886DEVKIT_LIB_DIR
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905BUILD_LOG_WRAPPER
906BUILD_LOG_PREVIOUS
907BUILD_LOG
908TOPDIR
909PATH_SEP
910ZERO_ARCHDEF
911DEFINE_CROSS_COMPILE_ARCH
912LP64
913OPENJDK_TARGET_OS_EXPORT_DIR
914OPENJDK_TARGET_OS_API_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_API
930OPENJDK_TARGET_OS_VENDOR
931OPENJDK_TARGET_OS
932OPENJDK_BUILD_CPU_ENDIAN
933OPENJDK_BUILD_CPU_BITS
934OPENJDK_BUILD_CPU_ARCH
935OPENJDK_BUILD_CPU
936OPENJDK_BUILD_OS_ENV
937OPENJDK_BUILD_OS_API
938OPENJDK_BUILD_OS
939OPENJDK_BUILD_AUTOCONF_NAME
940OPENJDK_TARGET_AUTOCONF_NAME
941target_os
942target_vendor
943target_cpu
944target
945host_os
946host_vendor
947host_cpu
948host
949build_os
950build_vendor
951build_cpu
952build
953CPIO
954SETFILE
955DF
956READLINK
957CYGPATH
958SED
959FGREP
960EGREP
961GREP
962AWK
963XARGS
964WHICH
965WC
966UNIQ
967UNAME
968TR
969TOUCH
970TEE
971TAR
972TAIL
973SORT
974SH
975RM
976PRINTF
977NAWK
978MV
979MKTEMP
980MKDIR
981LS
982LN
983HEAD
984FIND
985FILE
986EXPR
987ECHO
988DIRNAME
989DIFF
990DATE
991CUT
992CP
993COMM
994CMP
995CHMOD
996CAT
997BASH
998BASENAME
999DATE_WHEN_CONFIGURED
1000CONFIGURE_COMMAND_LINE
1001CUSTOM_MAKE_DIR
1002target_alias
1003host_alias
1004build_alias
1005LIBS
1006ECHO_T
1007ECHO_N
1008ECHO_C
1009DEFS
1010mandir
1011localedir
1012libdir
1013psdir
1014pdfdir
1015dvidir
1016htmldir
1017infodir
1018docdir
1019oldincludedir
1020includedir
1021runstatedir
1022localstatedir
1023sharedstatedir
1024sysconfdir
1025datadir
1026datarootdir
1027libexecdir
1028sbindir
1029bindir
1030program_transform_name
1031prefix
1032exec_prefix
1033PACKAGE_URL
1034PACKAGE_BUGREPORT
1035PACKAGE_STRING
1036PACKAGE_VERSION
1037PACKAGE_TARNAME
1038PACKAGE_NAME
1039PATH_SEPARATOR
1040SHELL'
1041ac_subst_files=''
1042ac_user_opts='
1043enable_option_checking
1044with_custom_make_dir
1045with_target_bits
1046enable_openjdk_only
1047with_jdk_variant
1048with_jvm_interpreter
1049with_jvm_variants
1050enable_debug
1051with_debug_level
1052with_devkit
1053with_sys_root
1054with_sysroot
1055with_tools_dir
1056with_toolchain_path
1057with_extra_path
1058with_xcode_path
1059with_conf_name
1060with_builddeps_conf
1061with_builddeps_server
1062with_builddeps_dir
1063with_builddeps_group
1064enable_headful
1065enable_hotspot_test_in_build
1066with_cacerts_file
1067enable_unlimited_crypto
1068enable_static_libjli
1069enable_jfr
1070with_milestone
1071with_update_version
1072with_user_release_suffix
1073with_build_number
1074with_vendor_name
1075with_vendor_url
1076with_vendor_bug_url
1077with_vendor_vm_bug_url
1078with_company_name
1079with_copyright_year
1080with_boot_jdk
1081with_boot_jdk_jvmargs
1082with_add_source_root
1083with_override_source_root
1084with_adds_and_overrides
1085with_override_langtools
1086with_override_corba
1087with_override_jaxp
1088with_override_jaxws
1089with_override_hotspot
1090with_override_nashorn
1091with_override_jdk
1092with_import_hotspot
1093with_toolchain_type
1094with_toolchain_version
1095with_package_path
1096with_jtreg
1097with_extra_cflags
1098with_extra_cxxflags
1099with_extra_ldflags
1100with_extra_asflags
1101enable_debug_symbols
1102enable_zip_debug_info
1103with_native_debug_symbols
1104enable_macosx_runtime_support
1105with_x
1106with_cups
1107with_cups_include
1108with_freetype
1109with_freetype_include
1110with_freetype_lib
1111with_freetype_src
1112enable_freetype_bundling
1113with_alsa
1114with_alsa_include
1115with_alsa_lib
1116with_fontconfig
1117with_fontconfig_include
1118with_giflib
1119with_zlib
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_ucrt_dll_dir
1124with_dxsdk
1125with_dxsdk_lib
1126with_dxsdk_include
1127with_num_cores
1128with_memory_size
1129with_jobs
1130with_sjavac_server_java
1131enable_sjavac
1132enable_precompiled_headers
1133enable_ccache
1134with_ccache_dir
1135'
1136      ac_precious_vars='build_alias
1137host_alias
1138target_alias
1139BASENAME
1140BASH
1141CAT
1142CHMOD
1143CMP
1144COMM
1145CP
1146CUT
1147DATE
1148DIFF
1149DIRNAME
1150ECHO
1151EXPR
1152FILE
1153FIND
1154HEAD
1155LN
1156LS
1157MKDIR
1158MKTEMP
1159MV
1160NAWK
1161PRINTF
1162RM
1163SH
1164SORT
1165TAIL
1166TAR
1167TEE
1168TOUCH
1169TR
1170UNAME
1171UNIQ
1172WC
1173WHICH
1174XARGS
1175AWK
1176GREP
1177EGREP
1178FGREP
1179SED
1180CYGPATH
1181READLINK
1182DF
1183SETFILE
1184CPIO
1185UNZIP
1186ZIP
1187LDD
1188READELF
1189HG
1190STAT
1191TIME
1192DSYMUTIL
1193XATTR
1194CODESIGN
1195PKG_CONFIG
1196CC
1197CFLAGS
1198LDFLAGS
1199LIBS
1200CPPFLAGS
1201CXX
1202CXXFLAGS
1203CCC
1204CPP
1205CXXCPP
1206AS
1207AR
1208OBJC
1209OBJCFLAGS
1210LIPO
1211STRIP
1212NM
1213GNM
1214MCS
1215OBJCOPY
1216OBJDUMP
1217BUILD_CC
1218BUILD_CXX
1219BUILD_LD
1220JTREGEXE
1221XMKMF
1222FREETYPE_CFLAGS
1223FREETYPE_LIBS
1224ALSA_CFLAGS
1225ALSA_LIBS
1226LIBFFI_CFLAGS
1227LIBFFI_LIBS
1228CCACHE'
1229
1230
1231# Initialize some variables set by options.
1232ac_init_help=
1233ac_init_version=false
1234ac_unrecognized_opts=
1235ac_unrecognized_sep=
1236# The variables have the same names as the options, with
1237# dashes changed to underlines.
1238cache_file=/dev/null
1239exec_prefix=NONE
1240no_create=
1241no_recursion=
1242prefix=NONE
1243program_prefix=NONE
1244program_suffix=NONE
1245program_transform_name=s,x,x,
1246silent=
1247site=
1248srcdir=
1249verbose=
1250x_includes=NONE
1251x_libraries=NONE
1252
1253# Installation directory options.
1254# These are left unexpanded so users can "make install exec_prefix=/foo"
1255# and all the variables that are supposed to be based on exec_prefix
1256# by default will actually change.
1257# Use braces instead of parens because sh, perl, etc. also accept them.
1258# (The list follows the same order as the GNU Coding Standards.)
1259bindir='${exec_prefix}/bin'
1260sbindir='${exec_prefix}/sbin'
1261libexecdir='${exec_prefix}/libexec'
1262datarootdir='${prefix}/share'
1263datadir='${datarootdir}'
1264sysconfdir='${prefix}/etc'
1265sharedstatedir='${prefix}/com'
1266localstatedir='${prefix}/var'
1267runstatedir='${localstatedir}/run'
1268includedir='${prefix}/include'
1269oldincludedir='/usr/include'
1270docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1271infodir='${datarootdir}/info'
1272htmldir='${docdir}'
1273dvidir='${docdir}'
1274pdfdir='${docdir}'
1275psdir='${docdir}'
1276libdir='${exec_prefix}/lib'
1277localedir='${datarootdir}/locale'
1278mandir='${datarootdir}/man'
1279
1280ac_prev=
1281ac_dashdash=
1282for ac_option
1283do
1284  # If the previous option needs an argument, assign it.
1285  if test -n "$ac_prev"; then
1286    eval $ac_prev=\$ac_option
1287    ac_prev=
1288    continue
1289  fi
1290
1291  case $ac_option in
1292  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1293  *=)   ac_optarg= ;;
1294  *)    ac_optarg=yes ;;
1295  esac
1296
1297  # Accept the important Cygnus configure options, so we can diagnose typos.
1298
1299  case $ac_dashdash$ac_option in
1300  --)
1301    ac_dashdash=yes ;;
1302
1303  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1304    ac_prev=bindir ;;
1305  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1306    bindir=$ac_optarg ;;
1307
1308  -build | --build | --buil | --bui | --bu)
1309    ac_prev=build_alias ;;
1310  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1311    build_alias=$ac_optarg ;;
1312
1313  -cache-file | --cache-file | --cache-fil | --cache-fi \
1314  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1315    ac_prev=cache_file ;;
1316  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1317  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1318    cache_file=$ac_optarg ;;
1319
1320  --config-cache | -C)
1321    cache_file=config.cache ;;
1322
1323  -datadir | --datadir | --datadi | --datad)
1324    ac_prev=datadir ;;
1325  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1326    datadir=$ac_optarg ;;
1327
1328  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1329  | --dataroo | --dataro | --datar)
1330    ac_prev=datarootdir ;;
1331  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1332  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1333    datarootdir=$ac_optarg ;;
1334
1335  -disable-* | --disable-*)
1336    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1337    # Reject names that are not valid shell variable names.
1338    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1339      as_fn_error $? "invalid feature name: $ac_useropt"
1340    ac_useropt_orig=$ac_useropt
1341    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1342    case $ac_user_opts in
1343      *"
1344"enable_$ac_useropt"
1345"*) ;;
1346      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1347	 ac_unrecognized_sep=', ';;
1348    esac
1349    eval enable_$ac_useropt=no ;;
1350
1351  -docdir | --docdir | --docdi | --doc | --do)
1352    ac_prev=docdir ;;
1353  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1354    docdir=$ac_optarg ;;
1355
1356  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1357    ac_prev=dvidir ;;
1358  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1359    dvidir=$ac_optarg ;;
1360
1361  -enable-* | --enable-*)
1362    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1363    # Reject names that are not valid shell variable names.
1364    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1365      as_fn_error $? "invalid feature name: $ac_useropt"
1366    ac_useropt_orig=$ac_useropt
1367    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1368    case $ac_user_opts in
1369      *"
1370"enable_$ac_useropt"
1371"*) ;;
1372      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1373	 ac_unrecognized_sep=', ';;
1374    esac
1375    eval enable_$ac_useropt=\$ac_optarg ;;
1376
1377  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1378  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1379  | --exec | --exe | --ex)
1380    ac_prev=exec_prefix ;;
1381  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1382  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1383  | --exec=* | --exe=* | --ex=*)
1384    exec_prefix=$ac_optarg ;;
1385
1386  -gas | --gas | --ga | --g)
1387    # Obsolete; use --with-gas.
1388    with_gas=yes ;;
1389
1390  -help | --help | --hel | --he | -h)
1391    ac_init_help=long ;;
1392  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1393    ac_init_help=recursive ;;
1394  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1395    ac_init_help=short ;;
1396
1397  -host | --host | --hos | --ho)
1398    ac_prev=host_alias ;;
1399  -host=* | --host=* | --hos=* | --ho=*)
1400    host_alias=$ac_optarg ;;
1401
1402  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1403    ac_prev=htmldir ;;
1404  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1405  | --ht=*)
1406    htmldir=$ac_optarg ;;
1407
1408  -includedir | --includedir | --includedi | --included | --include \
1409  | --includ | --inclu | --incl | --inc)
1410    ac_prev=includedir ;;
1411  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1412  | --includ=* | --inclu=* | --incl=* | --inc=*)
1413    includedir=$ac_optarg ;;
1414
1415  -infodir | --infodir | --infodi | --infod | --info | --inf)
1416    ac_prev=infodir ;;
1417  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1418    infodir=$ac_optarg ;;
1419
1420  -libdir | --libdir | --libdi | --libd)
1421    ac_prev=libdir ;;
1422  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1423    libdir=$ac_optarg ;;
1424
1425  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1426  | --libexe | --libex | --libe)
1427    ac_prev=libexecdir ;;
1428  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1429  | --libexe=* | --libex=* | --libe=*)
1430    libexecdir=$ac_optarg ;;
1431
1432  -localedir | --localedir | --localedi | --localed | --locale)
1433    ac_prev=localedir ;;
1434  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1435    localedir=$ac_optarg ;;
1436
1437  -localstatedir | --localstatedir | --localstatedi | --localstated \
1438  | --localstate | --localstat | --localsta | --localst | --locals)
1439    ac_prev=localstatedir ;;
1440  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1441  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1442    localstatedir=$ac_optarg ;;
1443
1444  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1445    ac_prev=mandir ;;
1446  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1447    mandir=$ac_optarg ;;
1448
1449  -nfp | --nfp | --nf)
1450    # Obsolete; use --without-fp.
1451    with_fp=no ;;
1452
1453  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1454  | --no-cr | --no-c | -n)
1455    no_create=yes ;;
1456
1457  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1458  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1459    no_recursion=yes ;;
1460
1461  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1462  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1463  | --oldin | --oldi | --old | --ol | --o)
1464    ac_prev=oldincludedir ;;
1465  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1466  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1467  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1468    oldincludedir=$ac_optarg ;;
1469
1470  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1471    ac_prev=prefix ;;
1472  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1473    prefix=$ac_optarg ;;
1474
1475  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1476  | --program-pre | --program-pr | --program-p)
1477    ac_prev=program_prefix ;;
1478  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1479  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1480    program_prefix=$ac_optarg ;;
1481
1482  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1483  | --program-suf | --program-su | --program-s)
1484    ac_prev=program_suffix ;;
1485  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1486  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1487    program_suffix=$ac_optarg ;;
1488
1489  -program-transform-name | --program-transform-name \
1490  | --program-transform-nam | --program-transform-na \
1491  | --program-transform-n | --program-transform- \
1492  | --program-transform | --program-transfor \
1493  | --program-transfo | --program-transf \
1494  | --program-trans | --program-tran \
1495  | --progr-tra | --program-tr | --program-t)
1496    ac_prev=program_transform_name ;;
1497  -program-transform-name=* | --program-transform-name=* \
1498  | --program-transform-nam=* | --program-transform-na=* \
1499  | --program-transform-n=* | --program-transform-=* \
1500  | --program-transform=* | --program-transfor=* \
1501  | --program-transfo=* | --program-transf=* \
1502  | --program-trans=* | --program-tran=* \
1503  | --progr-tra=* | --program-tr=* | --program-t=*)
1504    program_transform_name=$ac_optarg ;;
1505
1506  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1507    ac_prev=pdfdir ;;
1508  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1509    pdfdir=$ac_optarg ;;
1510
1511  -psdir | --psdir | --psdi | --psd | --ps)
1512    ac_prev=psdir ;;
1513  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1514    psdir=$ac_optarg ;;
1515
1516  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1517  | -silent | --silent | --silen | --sile | --sil)
1518    silent=yes ;;
1519
1520  -runstatedir | --runstatedir | --runstatedi | --runstated \
1521  | --runstate | --runstat | --runsta | --runst | --runs \
1522  | --run | --ru | --r)
1523    ac_prev=runstatedir ;;
1524  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1525  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1526  | --run=* | --ru=* | --r=*)
1527    runstatedir=$ac_optarg ;;
1528
1529  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1530    ac_prev=sbindir ;;
1531  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1532  | --sbi=* | --sb=*)
1533    sbindir=$ac_optarg ;;
1534
1535  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1536  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1537  | --sharedst | --shareds | --shared | --share | --shar \
1538  | --sha | --sh)
1539    ac_prev=sharedstatedir ;;
1540  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1541  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1542  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1543  | --sha=* | --sh=*)
1544    sharedstatedir=$ac_optarg ;;
1545
1546  -site | --site | --sit)
1547    ac_prev=site ;;
1548  -site=* | --site=* | --sit=*)
1549    site=$ac_optarg ;;
1550
1551  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1552    ac_prev=srcdir ;;
1553  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1554    srcdir=$ac_optarg ;;
1555
1556  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1557  | --syscon | --sysco | --sysc | --sys | --sy)
1558    ac_prev=sysconfdir ;;
1559  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1560  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1561    sysconfdir=$ac_optarg ;;
1562
1563  -target | --target | --targe | --targ | --tar | --ta | --t)
1564    ac_prev=target_alias ;;
1565  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1566    target_alias=$ac_optarg ;;
1567
1568  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1569    verbose=yes ;;
1570
1571  -version | --version | --versio | --versi | --vers | -V)
1572    ac_init_version=: ;;
1573
1574  -with-* | --with-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=\$ac_optarg ;;
1589
1590  -without-* | --without-*)
1591    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1592    # Reject names that are not valid shell variable names.
1593    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1594      as_fn_error $? "invalid package name: $ac_useropt"
1595    ac_useropt_orig=$ac_useropt
1596    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1597    case $ac_user_opts in
1598      *"
1599"with_$ac_useropt"
1600"*) ;;
1601      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1602	 ac_unrecognized_sep=', ';;
1603    esac
1604    eval with_$ac_useropt=no ;;
1605
1606  --x)
1607    # Obsolete; use --with-x.
1608    with_x=yes ;;
1609
1610  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1611  | --x-incl | --x-inc | --x-in | --x-i)
1612    ac_prev=x_includes ;;
1613  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1614  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1615    x_includes=$ac_optarg ;;
1616
1617  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1618  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1619    ac_prev=x_libraries ;;
1620  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1621  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1622    x_libraries=$ac_optarg ;;
1623
1624  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1625Try \`$0 --help' for more information"
1626    ;;
1627
1628  *=*)
1629    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1630    # Reject names that are not valid shell variable names.
1631    case $ac_envvar in #(
1632      '' | [0-9]* | *[!_$as_cr_alnum]* )
1633      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1634    esac
1635    eval $ac_envvar=\$ac_optarg
1636    export $ac_envvar ;;
1637
1638  *)
1639    # FIXME: should be removed in autoconf 3.0.
1640    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1641    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1642      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1643    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1644    ;;
1645
1646  esac
1647done
1648
1649if test -n "$ac_prev"; then
1650  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1651  as_fn_error $? "missing argument to $ac_option"
1652fi
1653
1654if test -n "$ac_unrecognized_opts"; then
1655  case $enable_option_checking in
1656    no) ;;
1657    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1658    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1659  esac
1660fi
1661
1662# Check all directory arguments for consistency.
1663for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1664		datadir sysconfdir sharedstatedir localstatedir includedir \
1665		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1666		libdir localedir mandir runstatedir
1667do
1668  eval ac_val=\$$ac_var
1669  # Remove trailing slashes.
1670  case $ac_val in
1671    */ )
1672      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1673      eval $ac_var=\$ac_val;;
1674  esac
1675  # Be sure to have absolute directory names.
1676  case $ac_val in
1677    [\\/$]* | ?:[\\/]* )  continue;;
1678    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1679  esac
1680  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1681done
1682
1683# There might be people who depend on the old broken behavior: `$host'
1684# used to hold the argument of --host etc.
1685# FIXME: To remove some day.
1686build=$build_alias
1687host=$host_alias
1688target=$target_alias
1689
1690# FIXME: To remove some day.
1691if test "x$host_alias" != x; then
1692  if test "x$build_alias" = x; then
1693    cross_compiling=maybe
1694  elif test "x$build_alias" != "x$host_alias"; then
1695    cross_compiling=yes
1696  fi
1697fi
1698
1699ac_tool_prefix=
1700test -n "$host_alias" && ac_tool_prefix=$host_alias-
1701
1702test "$silent" = yes && exec 6>/dev/null
1703
1704
1705ac_pwd=`pwd` && test -n "$ac_pwd" &&
1706ac_ls_di=`ls -di .` &&
1707ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1708  as_fn_error $? "working directory cannot be determined"
1709test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1710  as_fn_error $? "pwd does not report name of working directory"
1711
1712
1713# Find the source files, if location was not specified.
1714if test -z "$srcdir"; then
1715  ac_srcdir_defaulted=yes
1716  # Try the directory containing this script, then the parent directory.
1717  ac_confdir=`$as_dirname -- "$as_myself" ||
1718$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1719	 X"$as_myself" : 'X\(//\)[^/]' \| \
1720	 X"$as_myself" : 'X\(//\)$' \| \
1721	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1722$as_echo X"$as_myself" |
1723    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\/\)[^/].*/{
1728	    s//\1/
1729	    q
1730	  }
1731	  /^X\(\/\/\)$/{
1732	    s//\1/
1733	    q
1734	  }
1735	  /^X\(\/\).*/{
1736	    s//\1/
1737	    q
1738	  }
1739	  s/.*/./; q'`
1740  srcdir=$ac_confdir
1741  if test ! -r "$srcdir/$ac_unique_file"; then
1742    srcdir=..
1743  fi
1744else
1745  ac_srcdir_defaulted=no
1746fi
1747if test ! -r "$srcdir/$ac_unique_file"; then
1748  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1749  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1750fi
1751ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1752ac_abs_confdir=`(
1753	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1754	pwd)`
1755# When building in place, set srcdir=.
1756if test "$ac_abs_confdir" = "$ac_pwd"; then
1757  srcdir=.
1758fi
1759# Remove unnecessary trailing slashes from srcdir.
1760# Double slashes in file names in object file debugging info
1761# mess up M-x gdb in Emacs.
1762case $srcdir in
1763*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1764esac
1765for ac_var in $ac_precious_vars; do
1766  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1767  eval ac_env_${ac_var}_value=\$${ac_var}
1768  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1769  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1770done
1771
1772#
1773# Report the --help message.
1774#
1775if test "$ac_init_help" = "long"; then
1776  # Omit some internal or obsolete options to make the list less imposing.
1777  # This message is too long to be a string in the A/UX 3.1 sh.
1778  cat <<_ACEOF
1779\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1780
1781Usage: $0 [OPTION]... [VAR=VALUE]...
1782
1783To assign environment variables (e.g., CC, CFLAGS...), specify them as
1784VAR=VALUE.  See below for descriptions of some of the useful variables.
1785
1786Defaults for the options are specified in brackets.
1787
1788Configuration:
1789  -h, --help              display this help and exit
1790      --help=short        display options specific to this package
1791      --help=recursive    display the short help of all the included packages
1792  -V, --version           display version information and exit
1793  -q, --quiet, --silent   do not print \`checking ...' messages
1794      --cache-file=FILE   cache test results in FILE [disabled]
1795  -C, --config-cache      alias for \`--cache-file=config.cache'
1796  -n, --no-create         do not create output files
1797      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1798
1799Installation directories:
1800  --prefix=PREFIX         install architecture-independent files in PREFIX
1801                          [$ac_default_prefix]
1802  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1803                          [PREFIX]
1804
1805By default, \`make install' will install all the files in
1806\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1807an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1808for instance \`--prefix=\$HOME'.
1809
1810For better control, use the options below.
1811
1812Fine tuning of the installation directories:
1813  --bindir=DIR            user executables [EPREFIX/bin]
1814  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1815  --libexecdir=DIR        program executables [EPREFIX/libexec]
1816  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1817  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1818  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1819  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1820  --libdir=DIR            object code libraries [EPREFIX/lib]
1821  --includedir=DIR        C header files [PREFIX/include]
1822  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1823  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1824  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1825  --infodir=DIR           info documentation [DATAROOTDIR/info]
1826  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1827  --mandir=DIR            man documentation [DATAROOTDIR/man]
1828  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1829  --htmldir=DIR           html documentation [DOCDIR]
1830  --dvidir=DIR            dvi documentation [DOCDIR]
1831  --pdfdir=DIR            pdf documentation [DOCDIR]
1832  --psdir=DIR             ps documentation [DOCDIR]
1833_ACEOF
1834
1835  cat <<\_ACEOF
1836
1837X features:
1838  --x-includes=DIR    X include files are in DIR
1839  --x-libraries=DIR   X library files are in DIR
1840
1841System types:
1842  --build=BUILD     configure for building on BUILD [guessed]
1843  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1844  --target=TARGET   configure for building compilers for TARGET [HOST]
1845_ACEOF
1846fi
1847
1848if test -n "$ac_init_help"; then
1849  case $ac_init_help in
1850     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1851   esac
1852  cat <<\_ACEOF
1853
1854Optional Features:
1855  --disable-option-checking  ignore unrecognized --enable/--with options
1856  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1857  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1858  --enable-openjdk-only   suppress building custom source even if present
1859                          [disabled]
1860  --enable-debug          set the debug level to fastdebug (shorthand for
1861                          --with-debug-level=fastdebug) [disabled]
1862  --disable-headful       disable building headful support (graphical UI
1863                          support) [enabled]
1864  --enable-hotspot-test-in-build
1865                          run the Queens test after Hotspot build [disabled]
1866  --enable-unlimited-crypto
1867                          Enable unlimited crypto policy [disabled]
1868  --enable-static-libjli  Enable staticly linking libjli on bsd [disabled]
1869  --disable-jfr           Disable Java Flight Recorder support [enabled]
1870  --disable-debug-symbols disable generation of debug symbols [enabled]
1871  --disable-zip-debug-info
1872                          disable zipping of debug-info files [enabled]
1873  --enable-macosx-runtime-support
1874                          Deprecated. Option is kept for backwards
1875                          compatibility and is ignored
1876  --disable-freetype-bundling
1877                          disable bundling of the freetype library with the
1878                          build result [enabled on Windows or when using
1879                          --with-freetype, disabled otherwise]
1880  --enable-sjavac         use sjavac to do fast incremental compiles
1881                          [disabled]
1882  --disable-precompiled-headers
1883                          disable using precompiled headers when compiling C++
1884                          [enabled]
1885  --enable-ccache         enable using ccache to speed up recompilations
1886                          [disabled]
1887
1888Optional Packages:
1889  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1890  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1891  --with-custom-make-dir  use this directory for custom build/make files
1892  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1893                          support it), e.g. --with-target-bits=32 [guessed]
1894  --with-jdk-variant      JDK variant to build (normal) [normal]
1895  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1896  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1897                          client, minimal1, kernel, zero, zeroshark, core)
1898                          [server]
1899  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1900                          [release]
1901  --with-devkit           use this devkit for compilers, tools and resources
1902  --with-sys-root         alias for --with-sysroot for backwards compatability
1903  --with-sysroot          use this directory as sysroot)
1904  --with-tools-dir        alias for --with-toolchain-path for backwards
1905                          compatibility
1906  --with-toolchain-path   prepend these directories when searching for
1907                          toolchain binaries (compilers etc)
1908  --with-extra-path       prepend these directories to the default path
1909  --with-xcode-path       explicit path to Xcode application (generally for
1910                          building on 10.9 and later)
1911  --with-conf-name        use this as the name of the configuration [generated
1912                          from important configuration options]
1913  --with-builddeps-conf   use this configuration file for the builddeps
1914  --with-builddeps-server download and use build dependencies from this server
1915                          url
1916  --with-builddeps-dir    store downloaded build dependencies here
1917                          [/localhome/builddeps]
1918  --with-builddeps-group  chgrp the downloaded build dependencies to this
1919                          group
1920  --with-cacerts-file     specify alternative cacerts file
1921  --with-milestone        Set milestone value for build [internal]
1922  --with-update-version   Set update version value for build [b00]
1923  --with-user-release-suffix
1924                          Add a custom string to the version string if build
1925                          number isn't set.[username_builddateb00]
1926  --with-build-number     Set build number value for build [b00]
1927  --with-vendor-name      Set vendor name. Among others, used to set the
1928                          'java.vendor' and 'java.vm.vendor' system
1929                          properties. [not specified]
1930  --with-vendor-url       Set the 'java.vendor.url' system property [not
1931                          specified]
1932  --with-vendor-bug-url   Set the 'java.vendor.url.bug' system property [not
1933                          specified]
1934  --with-vendor-vm-bug-url
1935                          Sets the bug URL which will be displayed when the VM
1936                          crashes [not specified]
1937  --with-company-name     Set company name.
1938  --with-copyright-year   Set copyright year value for build [current year]
1939  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1940  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1941                          invocations of the Boot JDK, overriding the default
1942                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1943                          -enableassertions"
1944  --with-add-source-root  for each and every source directory, look in this
1945                          additional source root for the same directory; if it
1946                          exists and have files in it, include it in the build
1947  --with-override-source-root
1948                          for each and every source directory, look in this
1949                          override source root for the same directory; if it
1950                          exists, use that directory instead and ignore the
1951                          directory in the original source root
1952  --with-adds-and-overrides
1953                          use the subdirs 'adds' and 'overrides' in the
1954                          specified directory as add-source-root and
1955                          override-source-root
1956  --with-override-langtools
1957                          use this langtools dir for the build
1958  --with-override-corba   use this corba dir for the build
1959  --with-override-jaxp    use this jaxp dir for the build
1960  --with-override-jaxws   use this jaxws dir for the build
1961  --with-override-hotspot use this hotspot dir for the build
1962  --with-override-nashorn use this nashorn dir for the build
1963  --with-override-jdk     use this jdk dir for the build
1964  --with-import-hotspot   import hotspot binaries from this jdk image or
1965                          hotspot build dist dir instead of building from
1966                          source
1967  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1968                          to show possible values [platform dependent]
1969  --with-toolchain-version
1970                          the version of the toolchain to look for, use
1971                          '--help' to show possible values [platform
1972                          dependent]
1973  --with-package-path     package path to be used for location of third party
1974                          packages
1975  --with-jtreg            Regression Test Harness [probed]
1976  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1977  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1978  --with-extra-ldflags    extra flags to be used when linking jdk
1979  --with-extra-asflags    extra flags to be passed to the assembler
1980  --with-native-debug-symbols
1981                          set the native debug symbol configuration (none,
1982                          internal, external, zipped) [varying]
1983  --with-x                use the X Window System
1984  --with-cups             specify prefix directory for the cups package
1985                          (expecting the headers under PATH/include)
1986  --with-cups-include     specify directory for the cups include files
1987  --with-freetype         specify prefix directory for the freetype package
1988                          (expecting the libraries under PATH/lib and the
1989                          headers under PATH/include)
1990  --with-freetype-include specify directory for the freetype include files
1991  --with-freetype-lib     specify directory for the freetype library
1992  --with-freetype-src     specify directory with freetype sources to
1993                          automatically build the library (experimental,
1994                          Windows-only)
1995  --with-alsa             specify prefix directory for the alsa package
1996                          (expecting the libraries under PATH/lib and the
1997                          headers under PATH/include)
1998  --with-alsa-include     specify directory for the alsa include files
1999  --with-alsa-lib         specify directory for the alsa library
2000  --with-fontconfig       specify prefix directory for the fontconfig package
2001                          (expecting the headers under PATH/include)
2002  --with-fontconfig-include
2003                          specify directory for the fontconfig include files
2004  --with-giflib           use giflib from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-zlib             use zlib from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-stdc++lib=<static>,<dynamic>,<default>
2009                          force linking of the C++ runtime on Linux to either
2010                          static or dynamic, default is static with dynamic as
2011                          fallback
2012  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2013                          (Windows only) [probed]
2014  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2015                          (Windows only) [probed]
2016  --with-ucrt-dll-dir     path to Microsoft Windows Kit UCRT DLL dir (Windows
2017                          only) [probed]
2018  --with-dxsdk            Deprecated. Option is kept for backwards
2019                          compatibility and is ignored
2020  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-include    Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-num-cores        number of cores in the build system, e.g.
2025                          --with-num-cores=8 [probed]
2026  --with-memory-size      memory (in MB) available in the build system, e.g.
2027                          --with-memory-size=1024 [probed]
2028  --with-jobs             number of parallel jobs to let make run [calculated
2029                          based on cores and memory]
2030  --with-sjavac-server-java
2031                          use this java binary for running the sjavac
2032                          background server [Boot JDK java]
2033  --with-ccache-dir       where to store ccache files [~/.ccache]
2034
2035Some influential environment variables:
2036  BASENAME    Override default value for BASENAME
2037  BASH        Override default value for BASH
2038  CAT         Override default value for CAT
2039  CHMOD       Override default value for CHMOD
2040  CMP         Override default value for CMP
2041  COMM        Override default value for COMM
2042  CP          Override default value for CP
2043  CUT         Override default value for CUT
2044  DATE        Override default value for DATE
2045  DIFF        Override default value for DIFF
2046  DIRNAME     Override default value for DIRNAME
2047  ECHO        Override default value for ECHO
2048  EXPR        Override default value for EXPR
2049  FILE        Override default value for FILE
2050  FIND        Override default value for FIND
2051  HEAD        Override default value for HEAD
2052  LN          Override default value for LN
2053  LS          Override default value for LS
2054  MKDIR       Override default value for MKDIR
2055  MKTEMP      Override default value for MKTEMP
2056  MV          Override default value for MV
2057  NAWK        Override default value for NAWK
2058  PRINTF      Override default value for PRINTF
2059  RM          Override default value for RM
2060  SH          Override default value for SH
2061  SORT        Override default value for SORT
2062  TAIL        Override default value for TAIL
2063  TAR         Override default value for TAR
2064  TEE         Override default value for TEE
2065  TOUCH       Override default value for TOUCH
2066  TR          Override default value for TR
2067  UNAME       Override default value for UNAME
2068  UNIQ        Override default value for UNIQ
2069  WC          Override default value for WC
2070  WHICH       Override default value for WHICH
2071  XARGS       Override default value for XARGS
2072  AWK         Override default value for AWK
2073  GREP        Override default value for GREP
2074  EGREP       Override default value for EGREP
2075  FGREP       Override default value for FGREP
2076  SED         Override default value for SED
2077  CYGPATH     Override default value for CYGPATH
2078  READLINK    Override default value for READLINK
2079  DF          Override default value for DF
2080  SETFILE     Override default value for SETFILE
2081  CPIO        Override default value for CPIO
2082  UNZIP       Override default value for UNZIP
2083  ZIP         Override default value for ZIP
2084  LDD         Override default value for LDD
2085  READELF     Override default value for READELF
2086  HG          Override default value for HG
2087  STAT        Override default value for STAT
2088  TIME        Override default value for TIME
2089  DSYMUTIL    Override default value for DSYMUTIL
2090  XATTR       Override default value for XATTR
2091  CODESIGN    Override default value for CODESIGN
2092  PKG_CONFIG  path to pkg-config utility
2093  CC          C compiler command
2094  CFLAGS      C compiler flags
2095  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2096              nonstandard directory <lib dir>
2097  LIBS        libraries to pass to the linker, e.g. -l<library>
2098  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2099              you have headers in a nonstandard directory <include dir>
2100  CXX         C++ compiler command
2101  CXXFLAGS    C++ compiler flags
2102  CPP         C preprocessor
2103  CXXCPP      C++ preprocessor
2104  AS          Override default value for AS
2105  AR          Override default value for AR
2106  OBJC        Objective C compiler command
2107  OBJCFLAGS   Objective C compiler flags
2108  LIPO        Override default value for LIPO
2109  STRIP       Override default value for STRIP
2110  NM          Override default value for NM
2111  GNM         Override default value for GNM
2112  MCS         Override default value for MCS
2113  OBJCOPY     Override default value for OBJCOPY
2114  OBJDUMP     Override default value for OBJDUMP
2115  BUILD_CC    Override default value for BUILD_CC
2116  BUILD_CXX   Override default value for BUILD_CXX
2117  BUILD_LD    Override default value for BUILD_LD
2118  JTREGEXE    Override default value for JTREGEXE
2119  XMKMF       Path to xmkmf, Makefile generator for X Window System
2120  FREETYPE_CFLAGS
2121              C compiler flags for FREETYPE, overriding pkg-config
2122  FREETYPE_LIBS
2123              linker flags for FREETYPE, overriding pkg-config
2124  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2125  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2126  LIBFFI_CFLAGS
2127              C compiler flags for LIBFFI, overriding pkg-config
2128  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2129  CCACHE      Override default value for CCACHE
2130
2131Use these variables to override the choices made by `configure' or to help
2132it to find libraries and programs with nonstandard names/locations.
2133
2134Report bugs to <build-dev@openjdk.java.net>.
2135OpenJDK home page: <http://openjdk.java.net>.
2136_ACEOF
2137ac_status=$?
2138fi
2139
2140if test "$ac_init_help" = "recursive"; then
2141  # If there are subdirs, report their specific --help.
2142  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2143    test -d "$ac_dir" ||
2144      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2145      continue
2146    ac_builddir=.
2147
2148case "$ac_dir" in
2149.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2150*)
2151  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2152  # A ".." for each directory in $ac_dir_suffix.
2153  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2154  case $ac_top_builddir_sub in
2155  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2156  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2157  esac ;;
2158esac
2159ac_abs_top_builddir=$ac_pwd
2160ac_abs_builddir=$ac_pwd$ac_dir_suffix
2161# for backward compatibility:
2162ac_top_builddir=$ac_top_build_prefix
2163
2164case $srcdir in
2165  .)  # We are building in place.
2166    ac_srcdir=.
2167    ac_top_srcdir=$ac_top_builddir_sub
2168    ac_abs_top_srcdir=$ac_pwd ;;
2169  [\\/]* | ?:[\\/]* )  # Absolute name.
2170    ac_srcdir=$srcdir$ac_dir_suffix;
2171    ac_top_srcdir=$srcdir
2172    ac_abs_top_srcdir=$srcdir ;;
2173  *) # Relative name.
2174    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2175    ac_top_srcdir=$ac_top_build_prefix$srcdir
2176    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2177esac
2178ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2179
2180    cd "$ac_dir" || { ac_status=$?; continue; }
2181    # Check for guested configure.
2182    if test -f "$ac_srcdir/configure.gnu"; then
2183      echo &&
2184      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2185    elif test -f "$ac_srcdir/configure"; then
2186      echo &&
2187      $SHELL "$ac_srcdir/configure" --help=recursive
2188    else
2189      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2190    fi || ac_status=$?
2191    cd "$ac_pwd" || { ac_status=$?; break; }
2192  done
2193fi
2194
2195test -n "$ac_init_help" && exit $ac_status
2196if $ac_init_version; then
2197  cat <<\_ACEOF
2198OpenJDK configure jdk8
2199generated by GNU Autoconf 2.69
2200
2201Copyright (C) 2012 Free Software Foundation, Inc.
2202This configure script is free software; the Free Software Foundation
2203gives unlimited permission to copy, distribute and modify it.
2204_ACEOF
2205  exit
2206fi
2207
2208## ------------------------ ##
2209## Autoconf initialization. ##
2210## ------------------------ ##
2211
2212# ac_fn_c_try_compile LINENO
2213# --------------------------
2214# Try to compile conftest.$ac_ext, and return whether this succeeded.
2215ac_fn_c_try_compile ()
2216{
2217  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218  rm -f conftest.$ac_objext
2219  if { { ac_try="$ac_compile"
2220case "(($ac_try" in
2221  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2222  *) ac_try_echo=$ac_try;;
2223esac
2224eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2225$as_echo "$ac_try_echo"; } >&5
2226  (eval "$ac_compile") 2>conftest.err
2227  ac_status=$?
2228  if test -s conftest.err; then
2229    grep -v '^ *+' conftest.err >conftest.er1
2230    cat conftest.er1 >&5
2231    mv -f conftest.er1 conftest.err
2232  fi
2233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2234  test $ac_status = 0; } && {
2235	 test -z "$ac_c_werror_flag" ||
2236	 test ! -s conftest.err
2237       } && test -s conftest.$ac_objext; then :
2238  ac_retval=0
2239else
2240  $as_echo "$as_me: failed program was:" >&5
2241sed 's/^/| /' conftest.$ac_ext >&5
2242
2243	ac_retval=1
2244fi
2245  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246  as_fn_set_status $ac_retval
2247
2248} # ac_fn_c_try_compile
2249
2250# ac_fn_cxx_try_compile LINENO
2251# ----------------------------
2252# Try to compile conftest.$ac_ext, and return whether this succeeded.
2253ac_fn_cxx_try_compile ()
2254{
2255  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256  rm -f conftest.$ac_objext
2257  if { { ac_try="$ac_compile"
2258case "(($ac_try" in
2259  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2260  *) ac_try_echo=$ac_try;;
2261esac
2262eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2263$as_echo "$ac_try_echo"; } >&5
2264  (eval "$ac_compile") 2>conftest.err
2265  ac_status=$?
2266  if test -s conftest.err; then
2267    grep -v '^ *+' conftest.err >conftest.er1
2268    cat conftest.er1 >&5
2269    mv -f conftest.er1 conftest.err
2270  fi
2271  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2272  test $ac_status = 0; } && {
2273	 test -z "$ac_cxx_werror_flag" ||
2274	 test ! -s conftest.err
2275       } && test -s conftest.$ac_objext; then :
2276  ac_retval=0
2277else
2278  $as_echo "$as_me: failed program was:" >&5
2279sed 's/^/| /' conftest.$ac_ext >&5
2280
2281	ac_retval=1
2282fi
2283  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2284  as_fn_set_status $ac_retval
2285
2286} # ac_fn_cxx_try_compile
2287
2288# ac_fn_c_try_cpp LINENO
2289# ----------------------
2290# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2291ac_fn_c_try_cpp ()
2292{
2293  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294  if { { ac_try="$ac_cpp conftest.$ac_ext"
2295case "(($ac_try" in
2296  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2297  *) ac_try_echo=$ac_try;;
2298esac
2299eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2300$as_echo "$ac_try_echo"; } >&5
2301  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2302  ac_status=$?
2303  if test -s conftest.err; then
2304    grep -v '^ *+' conftest.err >conftest.er1
2305    cat conftest.er1 >&5
2306    mv -f conftest.er1 conftest.err
2307  fi
2308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2309  test $ac_status = 0; } > conftest.i && {
2310	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2311	 test ! -s conftest.err
2312       }; then :
2313  ac_retval=0
2314else
2315  $as_echo "$as_me: failed program was:" >&5
2316sed 's/^/| /' conftest.$ac_ext >&5
2317
2318    ac_retval=1
2319fi
2320  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2321  as_fn_set_status $ac_retval
2322
2323} # ac_fn_c_try_cpp
2324
2325# ac_fn_cxx_try_cpp LINENO
2326# ------------------------
2327# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2328ac_fn_cxx_try_cpp ()
2329{
2330  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2331  if { { ac_try="$ac_cpp conftest.$ac_ext"
2332case "(($ac_try" in
2333  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2334  *) ac_try_echo=$ac_try;;
2335esac
2336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2337$as_echo "$ac_try_echo"; } >&5
2338  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2339  ac_status=$?
2340  if test -s conftest.err; then
2341    grep -v '^ *+' conftest.err >conftest.er1
2342    cat conftest.er1 >&5
2343    mv -f conftest.er1 conftest.err
2344  fi
2345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2346  test $ac_status = 0; } > conftest.i && {
2347	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2348	 test ! -s conftest.err
2349       }; then :
2350  ac_retval=0
2351else
2352  $as_echo "$as_me: failed program was:" >&5
2353sed 's/^/| /' conftest.$ac_ext >&5
2354
2355    ac_retval=1
2356fi
2357  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2358  as_fn_set_status $ac_retval
2359
2360} # ac_fn_cxx_try_cpp
2361
2362# ac_fn_objc_try_compile LINENO
2363# -----------------------------
2364# Try to compile conftest.$ac_ext, and return whether this succeeded.
2365ac_fn_objc_try_compile ()
2366{
2367  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368  rm -f conftest.$ac_objext
2369  if { { ac_try="$ac_compile"
2370case "(($ac_try" in
2371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2372  *) ac_try_echo=$ac_try;;
2373esac
2374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2375$as_echo "$ac_try_echo"; } >&5
2376  (eval "$ac_compile") 2>conftest.err
2377  ac_status=$?
2378  if test -s conftest.err; then
2379    grep -v '^ *+' conftest.err >conftest.er1
2380    cat conftest.er1 >&5
2381    mv -f conftest.er1 conftest.err
2382  fi
2383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2384  test $ac_status = 0; } && {
2385	 test -z "$ac_objc_werror_flag" ||
2386	 test ! -s conftest.err
2387       } && test -s conftest.$ac_objext; then :
2388  ac_retval=0
2389else
2390  $as_echo "$as_me: failed program was:" >&5
2391sed 's/^/| /' conftest.$ac_ext >&5
2392
2393	ac_retval=1
2394fi
2395  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2396  as_fn_set_status $ac_retval
2397
2398} # ac_fn_objc_try_compile
2399
2400# ac_fn_cxx_try_link LINENO
2401# -------------------------
2402# Try to link conftest.$ac_ext, and return whether this succeeded.
2403ac_fn_cxx_try_link ()
2404{
2405  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406  rm -f conftest.$ac_objext conftest$ac_exeext
2407  if { { ac_try="$ac_link"
2408case "(($ac_try" in
2409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2410  *) ac_try_echo=$ac_try;;
2411esac
2412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2413$as_echo "$ac_try_echo"; } >&5
2414  (eval "$ac_link") 2>conftest.err
2415  ac_status=$?
2416  if test -s conftest.err; then
2417    grep -v '^ *+' conftest.err >conftest.er1
2418    cat conftest.er1 >&5
2419    mv -f conftest.er1 conftest.err
2420  fi
2421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2422  test $ac_status = 0; } && {
2423	 test -z "$ac_cxx_werror_flag" ||
2424	 test ! -s conftest.err
2425       } && test -s conftest$ac_exeext && {
2426	 test "$cross_compiling" = yes ||
2427	 test -x conftest$ac_exeext
2428       }; then :
2429  ac_retval=0
2430else
2431  $as_echo "$as_me: failed program was:" >&5
2432sed 's/^/| /' conftest.$ac_ext >&5
2433
2434	ac_retval=1
2435fi
2436  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2437  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2438  # interfere with the next link command; also delete a directory that is
2439  # left behind by Apple's compiler.  We do this before executing the actions.
2440  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2441  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442  as_fn_set_status $ac_retval
2443
2444} # ac_fn_cxx_try_link
2445
2446# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2447# ---------------------------------------------------------
2448# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2449# the include files in INCLUDES and setting the cache variable VAR
2450# accordingly.
2451ac_fn_cxx_check_header_mongrel ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  if eval \${$3+:} false; then :
2455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2456$as_echo_n "checking for $2... " >&6; }
2457if eval \${$3+:} false; then :
2458  $as_echo_n "(cached) " >&6
2459fi
2460eval ac_res=\$$3
2461	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2462$as_echo "$ac_res" >&6; }
2463else
2464  # Is the header compilable?
2465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2466$as_echo_n "checking $2 usability... " >&6; }
2467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2468/* end confdefs.h.  */
2469$4
2470#include <$2>
2471_ACEOF
2472if ac_fn_cxx_try_compile "$LINENO"; then :
2473  ac_header_compiler=yes
2474else
2475  ac_header_compiler=no
2476fi
2477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2479$as_echo "$ac_header_compiler" >&6; }
2480
2481# Is the header present?
2482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2483$as_echo_n "checking $2 presence... " >&6; }
2484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h.  */
2486#include <$2>
2487_ACEOF
2488if ac_fn_cxx_try_cpp "$LINENO"; then :
2489  ac_header_preproc=yes
2490else
2491  ac_header_preproc=no
2492fi
2493rm -f conftest.err conftest.i conftest.$ac_ext
2494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2495$as_echo "$ac_header_preproc" >&6; }
2496
2497# So?  What about this header?
2498case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2499  yes:no: )
2500    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2501$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2502    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2503$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2504    ;;
2505  no:yes:* )
2506    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2507$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2508    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2509$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2511$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2512    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2513$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2514    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2515$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2516( $as_echo "## ----------------------------------------- ##
2517## Report this to build-dev@openjdk.java.net ##
2518## ----------------------------------------- ##"
2519     ) | sed "s/^/$as_me: WARNING:     /" >&2
2520    ;;
2521esac
2522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2523$as_echo_n "checking for $2... " >&6; }
2524if eval \${$3+:} false; then :
2525  $as_echo_n "(cached) " >&6
2526else
2527  eval "$3=\$ac_header_compiler"
2528fi
2529eval ac_res=\$$3
2530	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2531$as_echo "$ac_res" >&6; }
2532fi
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534
2535} # ac_fn_cxx_check_header_mongrel
2536
2537# ac_fn_cxx_try_run LINENO
2538# ------------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2540# that executables *can* be run.
2541ac_fn_cxx_try_run ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>&5
2552  ac_status=$?
2553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2554  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2555  { { case "(($ac_try" in
2556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2557  *) ac_try_echo=$ac_try;;
2558esac
2559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2560$as_echo "$ac_try_echo"; } >&5
2561  (eval "$ac_try") 2>&5
2562  ac_status=$?
2563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2564  test $ac_status = 0; }; }; then :
2565  ac_retval=0
2566else
2567  $as_echo "$as_me: program exited with status $ac_status" >&5
2568       $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571       ac_retval=$ac_status
2572fi
2573  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2574  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2575  as_fn_set_status $ac_retval
2576
2577} # ac_fn_cxx_try_run
2578
2579# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2580# ---------------------------------------------------------
2581# Tests whether HEADER exists and can be compiled using the include files in
2582# INCLUDES, setting the cache variable VAR accordingly.
2583ac_fn_cxx_check_header_compile ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2587$as_echo_n "checking for $2... " >&6; }
2588if eval \${$3+:} false; then :
2589  $as_echo_n "(cached) " >&6
2590else
2591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594#include <$2>
2595_ACEOF
2596if ac_fn_cxx_try_compile "$LINENO"; then :
2597  eval "$3=yes"
2598else
2599  eval "$3=no"
2600fi
2601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607
2608} # ac_fn_cxx_check_header_compile
2609
2610# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2611# ----------------------------------------------
2612# Tries to find the compile-time value of EXPR in a program that includes
2613# INCLUDES, setting VAR accordingly. Returns whether the value could be
2614# computed
2615ac_fn_cxx_compute_int ()
2616{
2617  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618  if test "$cross_compiling" = yes; then
2619    # Depending upon the size, compute the lo and hi bounds.
2620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) >= 0)];
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=0 ac_mid=0
2636  while :; do
2637    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h.  */
2639$4
2640int
2641main ()
2642{
2643static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2644test_array [0] = 0;
2645return test_array [0];
2646
2647  ;
2648  return 0;
2649}
2650_ACEOF
2651if ac_fn_cxx_try_compile "$LINENO"; then :
2652  ac_hi=$ac_mid; break
2653else
2654  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2655			if test $ac_lo -le $ac_mid; then
2656			  ac_lo= ac_hi=
2657			  break
2658			fi
2659			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2660fi
2661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662  done
2663else
2664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2665/* end confdefs.h.  */
2666$4
2667int
2668main ()
2669{
2670static int test_array [1 - 2 * !(($2) < 0)];
2671test_array [0] = 0;
2672return test_array [0];
2673
2674  ;
2675  return 0;
2676}
2677_ACEOF
2678if ac_fn_cxx_try_compile "$LINENO"; then :
2679  ac_hi=-1 ac_mid=-1
2680  while :; do
2681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684int
2685main ()
2686{
2687static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2688test_array [0] = 0;
2689return test_array [0];
2690
2691  ;
2692  return 0;
2693}
2694_ACEOF
2695if ac_fn_cxx_try_compile "$LINENO"; then :
2696  ac_lo=$ac_mid; break
2697else
2698  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2699			if test $ac_mid -le $ac_hi; then
2700			  ac_lo= ac_hi=
2701			  break
2702			fi
2703			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2704fi
2705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706  done
2707else
2708  ac_lo= ac_hi=
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711fi
2712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2713# Binary search between lo and hi bounds.
2714while test "x$ac_lo" != "x$ac_hi"; do
2715  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2717/* end confdefs.h.  */
2718$4
2719int
2720main ()
2721{
2722static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2723test_array [0] = 0;
2724return test_array [0];
2725
2726  ;
2727  return 0;
2728}
2729_ACEOF
2730if ac_fn_cxx_try_compile "$LINENO"; then :
2731  ac_hi=$ac_mid
2732else
2733  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2734fi
2735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736done
2737case $ac_lo in #((
2738?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2739'') ac_retval=1 ;;
2740esac
2741  else
2742    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2743/* end confdefs.h.  */
2744$4
2745static long int longval () { return $2; }
2746static unsigned long int ulongval () { return $2; }
2747#include <stdio.h>
2748#include <stdlib.h>
2749int
2750main ()
2751{
2752
2753  FILE *f = fopen ("conftest.val", "w");
2754  if (! f)
2755    return 1;
2756  if (($2) < 0)
2757    {
2758      long int i = longval ();
2759      if (i != ($2))
2760	return 1;
2761      fprintf (f, "%ld", i);
2762    }
2763  else
2764    {
2765      unsigned long int i = ulongval ();
2766      if (i != ($2))
2767	return 1;
2768      fprintf (f, "%lu", i);
2769    }
2770  /* Do not output a trailing newline, as this causes \r\n confusion
2771     on some platforms.  */
2772  return ferror (f) || fclose (f) != 0;
2773
2774  ;
2775  return 0;
2776}
2777_ACEOF
2778if ac_fn_cxx_try_run "$LINENO"; then :
2779  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2780else
2781  ac_retval=1
2782fi
2783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2784  conftest.$ac_objext conftest.beam conftest.$ac_ext
2785rm -f conftest.val
2786
2787  fi
2788  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789  as_fn_set_status $ac_retval
2790
2791} # ac_fn_cxx_compute_int
2792
2793# ac_fn_cxx_check_func LINENO FUNC VAR
2794# ------------------------------------
2795# Tests whether FUNC exists, setting the cache variable VAR accordingly
2796ac_fn_cxx_check_func ()
2797{
2798  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2800$as_echo_n "checking for $2... " >&6; }
2801if eval \${$3+:} false; then :
2802  $as_echo_n "(cached) " >&6
2803else
2804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805/* end confdefs.h.  */
2806/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2807   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2808#define $2 innocuous_$2
2809
2810/* System header to define __stub macros and hopefully few prototypes,
2811    which can conflict with char $2 (); below.
2812    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2813    <limits.h> exists even on freestanding compilers.  */
2814
2815#ifdef __STDC__
2816# include <limits.h>
2817#else
2818# include <assert.h>
2819#endif
2820
2821#undef $2
2822
2823/* Override any GCC internal prototype to avoid an error.
2824   Use char because int might match the return type of a GCC
2825   builtin and then its argument prototype would still apply.  */
2826#ifdef __cplusplus
2827extern "C"
2828#endif
2829char $2 ();
2830/* The GNU C library defines this for functions which it implements
2831    to always fail with ENOSYS.  Some functions are actually named
2832    something starting with __ and the normal name is an alias.  */
2833#if defined __stub_$2 || defined __stub___$2
2834choke me
2835#endif
2836
2837int
2838main ()
2839{
2840return $2 ();
2841  ;
2842  return 0;
2843}
2844_ACEOF
2845if ac_fn_cxx_try_link "$LINENO"; then :
2846  eval "$3=yes"
2847else
2848  eval "$3=no"
2849fi
2850rm -f core conftest.err conftest.$ac_objext \
2851    conftest$ac_exeext conftest.$ac_ext
2852fi
2853eval ac_res=\$$3
2854	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2855$as_echo "$ac_res" >&6; }
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857
2858} # ac_fn_cxx_check_func
2859
2860# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2861# -------------------------------------------------------
2862# Tests whether HEADER exists and can be compiled using the include files in
2863# INCLUDES, setting the cache variable VAR accordingly.
2864ac_fn_c_check_header_compile ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875#include <$2>
2876_ACEOF
2877if ac_fn_c_try_compile "$LINENO"; then :
2878  eval "$3=yes"
2879else
2880  eval "$3=no"
2881fi
2882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2883fi
2884eval ac_res=\$$3
2885	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2886$as_echo "$ac_res" >&6; }
2887  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2888
2889} # ac_fn_c_check_header_compile
2890cat >config.log <<_ACEOF
2891This file contains any messages produced by compilers while
2892running configure, to aid debugging if configure makes a mistake.
2893
2894It was created by OpenJDK $as_me jdk8, which was
2895generated by GNU Autoconf 2.69.  Invocation command line was
2896
2897  $ $0 $@
2898
2899_ACEOF
2900exec 5>>config.log
2901{
2902cat <<_ASUNAME
2903## --------- ##
2904## Platform. ##
2905## --------- ##
2906
2907hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2908uname -m = `(uname -m) 2>/dev/null || echo unknown`
2909uname -r = `(uname -r) 2>/dev/null || echo unknown`
2910uname -s = `(uname -s) 2>/dev/null || echo unknown`
2911uname -v = `(uname -v) 2>/dev/null || echo unknown`
2912
2913/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2914/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2915
2916/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2917/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2918/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2919/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2920/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2921/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2922/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2923
2924_ASUNAME
2925
2926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2927for as_dir in $PATH
2928do
2929  IFS=$as_save_IFS
2930  test -z "$as_dir" && as_dir=.
2931    $as_echo "PATH: $as_dir"
2932  done
2933IFS=$as_save_IFS
2934
2935} >&5
2936
2937cat >&5 <<_ACEOF
2938
2939
2940## ----------- ##
2941## Core tests. ##
2942## ----------- ##
2943
2944_ACEOF
2945
2946
2947# Keep a trace of the command line.
2948# Strip out --no-create and --no-recursion so they do not pile up.
2949# Strip out --silent because we don't want to record it for future runs.
2950# Also quote any args containing shell meta-characters.
2951# Make two passes to allow for proper duplicate-argument suppression.
2952ac_configure_args=
2953ac_configure_args0=
2954ac_configure_args1=
2955ac_must_keep_next=false
2956for ac_pass in 1 2
2957do
2958  for ac_arg
2959  do
2960    case $ac_arg in
2961    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2962    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2963    | -silent | --silent | --silen | --sile | --sil)
2964      continue ;;
2965    *\'*)
2966      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2967    esac
2968    case $ac_pass in
2969    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2970    2)
2971      as_fn_append ac_configure_args1 " '$ac_arg'"
2972      if test $ac_must_keep_next = true; then
2973	ac_must_keep_next=false # Got value, back to normal.
2974      else
2975	case $ac_arg in
2976	  *=* | --config-cache | -C | -disable-* | --disable-* \
2977	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2978	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2979	  | -with-* | --with-* | -without-* | --without-* | --x)
2980	    case "$ac_configure_args0 " in
2981	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2982	    esac
2983	    ;;
2984	  -* ) ac_must_keep_next=true ;;
2985	esac
2986      fi
2987      as_fn_append ac_configure_args " '$ac_arg'"
2988      ;;
2989    esac
2990  done
2991done
2992{ ac_configure_args0=; unset ac_configure_args0;}
2993{ ac_configure_args1=; unset ac_configure_args1;}
2994
2995# When interrupted or exit'd, cleanup temporary files, and complete
2996# config.log.  We remove comments because anyway the quotes in there
2997# would cause problems or look ugly.
2998# WARNING: Use '\'' to represent an apostrophe within the trap.
2999# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3000trap 'exit_status=$?
3001  # Save into config.log some information that might help in debugging.
3002  {
3003    echo
3004
3005    $as_echo "## ---------------- ##
3006## Cache variables. ##
3007## ---------------- ##"
3008    echo
3009    # The following way of writing the cache mishandles newlines in values,
3010(
3011  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3012    eval ac_val=\$$ac_var
3013    case $ac_val in #(
3014    *${as_nl}*)
3015      case $ac_var in #(
3016      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3017$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3018      esac
3019      case $ac_var in #(
3020      _ | IFS | as_nl) ;; #(
3021      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3022      *) { eval $ac_var=; unset $ac_var;} ;;
3023      esac ;;
3024    esac
3025  done
3026  (set) 2>&1 |
3027    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3028    *${as_nl}ac_space=\ *)
3029      sed -n \
3030	"s/'\''/'\''\\\\'\'''\''/g;
3031	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3032      ;; #(
3033    *)
3034      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3035      ;;
3036    esac |
3037    sort
3038)
3039    echo
3040
3041    $as_echo "## ----------------- ##
3042## Output variables. ##
3043## ----------------- ##"
3044    echo
3045    for ac_var in $ac_subst_vars
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
3055    if test -n "$ac_subst_files"; then
3056      $as_echo "## ------------------- ##
3057## File substitutions. ##
3058## ------------------- ##"
3059      echo
3060      for ac_var in $ac_subst_files
3061      do
3062	eval ac_val=\$$ac_var
3063	case $ac_val in
3064	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065	esac
3066	$as_echo "$ac_var='\''$ac_val'\''"
3067      done | sort
3068      echo
3069    fi
3070
3071    if test -s confdefs.h; then
3072      $as_echo "## ----------- ##
3073## confdefs.h. ##
3074## ----------- ##"
3075      echo
3076      cat confdefs.h
3077      echo
3078    fi
3079    test "$ac_signal" != 0 &&
3080      $as_echo "$as_me: caught signal $ac_signal"
3081    $as_echo "$as_me: exit $exit_status"
3082  } >&5
3083  rm -f core *.core core.conftest.* &&
3084    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3085    exit $exit_status
3086' 0
3087for ac_signal in 1 2 13 15; do
3088  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3089done
3090ac_signal=0
3091
3092# confdefs.h avoids OS command line length limits that DEFS can exceed.
3093rm -f -r conftest* confdefs.h
3094
3095$as_echo "/* confdefs.h */" > confdefs.h
3096
3097# Predefined preprocessor variables.
3098
3099cat >>confdefs.h <<_ACEOF
3100#define PACKAGE_NAME "$PACKAGE_NAME"
3101_ACEOF
3102
3103cat >>confdefs.h <<_ACEOF
3104#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3105_ACEOF
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_VERSION "$PACKAGE_VERSION"
3109_ACEOF
3110
3111cat >>confdefs.h <<_ACEOF
3112#define PACKAGE_STRING "$PACKAGE_STRING"
3113_ACEOF
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_URL "$PACKAGE_URL"
3121_ACEOF
3122
3123
3124# Let the site file select an alternate cache file if it wants to.
3125# Prefer an explicitly selected file to automatically selected ones.
3126ac_site_file1=NONE
3127ac_site_file2=NONE
3128if test -n "$CONFIG_SITE"; then
3129  # We do not want a PATH search for config.site.
3130  case $CONFIG_SITE in #((
3131    -*)  ac_site_file1=./$CONFIG_SITE;;
3132    */*) ac_site_file1=$CONFIG_SITE;;
3133    *)   ac_site_file1=./$CONFIG_SITE;;
3134  esac
3135elif test "x$prefix" != xNONE; then
3136  ac_site_file1=$prefix/share/config.site
3137  ac_site_file2=$prefix/etc/config.site
3138else
3139  ac_site_file1=$ac_default_prefix/share/config.site
3140  ac_site_file2=$ac_default_prefix/etc/config.site
3141fi
3142for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3143do
3144  test "x$ac_site_file" = xNONE && continue
3145  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3147$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3148    sed 's/^/| /' "$ac_site_file" >&5
3149    . "$ac_site_file" \
3150      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3152as_fn_error $? "failed to load site script $ac_site_file
3153See \`config.log' for more details" "$LINENO" 5; }
3154  fi
3155done
3156
3157if test -r "$cache_file"; then
3158  # Some versions of bash will fail to source /dev/null (special files
3159  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3160  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3162$as_echo "$as_me: loading cache $cache_file" >&6;}
3163    case $cache_file in
3164      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3165      *)                      . "./$cache_file";;
3166    esac
3167  fi
3168else
3169  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3170$as_echo "$as_me: creating cache $cache_file" >&6;}
3171  >$cache_file
3172fi
3173
3174# Check that the precious variables saved in the cache have kept the same
3175# value.
3176ac_cache_corrupted=false
3177for ac_var in $ac_precious_vars; do
3178  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3179  eval ac_new_set=\$ac_env_${ac_var}_set
3180  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3181  eval ac_new_val=\$ac_env_${ac_var}_value
3182  case $ac_old_set,$ac_new_set in
3183    set,)
3184      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3185$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3186      ac_cache_corrupted=: ;;
3187    ,set)
3188      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3189$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3190      ac_cache_corrupted=: ;;
3191    ,);;
3192    *)
3193      if test "x$ac_old_val" != "x$ac_new_val"; then
3194	# differences in whitespace do not lead to failure.
3195	ac_old_val_w=`echo x $ac_old_val`
3196	ac_new_val_w=`echo x $ac_new_val`
3197	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3198	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3199$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3200	  ac_cache_corrupted=:
3201	else
3202	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3203$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3204	  eval $ac_var=\$ac_old_val
3205	fi
3206	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3207$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3208	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3209$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3210      fi;;
3211  esac
3212  # Pass precious variables to config.status.
3213  if test "$ac_new_set" = set; then
3214    case $ac_new_val in
3215    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3216    *) ac_arg=$ac_var=$ac_new_val ;;
3217    esac
3218    case " $ac_configure_args " in
3219      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3220      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3221    esac
3222  fi
3223done
3224if $ac_cache_corrupted; then
3225  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3228$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3229  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3230fi
3231## -------------------- ##
3232## Main body of script. ##
3233## -------------------- ##
3234
3235ac_ext=c
3236ac_cpp='$CPP $CPPFLAGS'
3237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3239ac_compiler_gnu=$ac_cv_c_compiler_gnu
3240
3241
3242
3243ac_aux_dir=
3244for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3245  if test -f "$ac_dir/install-sh"; then
3246    ac_aux_dir=$ac_dir
3247    ac_install_sh="$ac_aux_dir/install-sh -c"
3248    break
3249  elif test -f "$ac_dir/install.sh"; then
3250    ac_aux_dir=$ac_dir
3251    ac_install_sh="$ac_aux_dir/install.sh -c"
3252    break
3253  elif test -f "$ac_dir/shtool"; then
3254    ac_aux_dir=$ac_dir
3255    ac_install_sh="$ac_aux_dir/shtool install -c"
3256    break
3257  fi
3258done
3259if test -z "$ac_aux_dir"; then
3260  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
3261fi
3262
3263# These three variables are undocumented and unsupported,
3264# and are intended to be withdrawn in a future Autoconf release.
3265# They can cause serious problems if a builder's source tree is in a directory
3266# whose full name contains unusual characters.
3267ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3268ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3269ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3270
3271
3272# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3273
3274#
3275# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3277#
3278# This code is free software; you can redistribute it and/or modify it
3279# under the terms of the GNU General Public License version 2 only, as
3280# published by the Free Software Foundation.  Oracle designates this
3281# particular file as subject to the "Classpath" exception as provided
3282# by Oracle in the LICENSE file that accompanied this code.
3283#
3284# This code is distributed in the hope that it will be useful, but WITHOUT
3285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3287# version 2 for more details (a copy is included in the LICENSE file that
3288# accompanied this code).
3289#
3290# You should have received a copy of the GNU General Public License version
3291# 2 along with this work; if not, write to the Free Software Foundation,
3292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3293#
3294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3295# or visit www.oracle.com if you need additional information or have any
3296# questions.
3297#
3298
3299#
3300# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3301#
3302# This program is free software; you can redistribute it and/or modify
3303# it under the terms of the GNU General Public License as published by
3304# the Free Software Foundation; either version 2 of the License, or
3305# (at your option) any later version.
3306#
3307# This program is distributed in the hope that it will be useful, but
3308# WITHOUT ANY WARRANTY; without even the implied warranty of
3309# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3310# General Public License for more details.
3311#
3312# You should have received a copy of the GNU General Public License
3313# along with this program; if not, write to the Free Software
3314# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3315#
3316# As a special exception to the GNU General Public License, if you
3317# distribute this file as part of a program that contains a
3318# configuration script generated by Autoconf, you may include it under
3319# the same distribution terms that you use for the rest of that program.
3320
3321# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3322# ----------------------------------
3323# PKG_PROG_PKG_CONFIG
3324
3325# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3326#
3327# Check to see whether a particular set of modules exists.  Similar
3328# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3329#
3330#
3331# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3332# this or PKG_CHECK_MODULES is called, or make sure to call
3333# PKG_CHECK_EXISTS manually
3334# --------------------------------------------------------------
3335
3336
3337
3338# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3339# ---------------------------------------------
3340# _PKG_CONFIG
3341
3342# _PKG_SHORT_ERRORS_SUPPORTED
3343# -----------------------------
3344# _PKG_SHORT_ERRORS_SUPPORTED
3345
3346
3347# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3348# [ACTION-IF-NOT-FOUND])
3349#
3350#
3351# Note that if there is a possibility the first call to
3352# PKG_CHECK_MODULES might not happen, you should be sure to include an
3353# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3354#
3355#
3356# --------------------------------------------------------------
3357# PKG_CHECK_MODULES
3358
3359
3360# Include these first...
3361#
3362# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3363# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3364#
3365# This code is free software; you can redistribute it and/or modify it
3366# under the terms of the GNU General Public License version 2 only, as
3367# published by the Free Software Foundation.  Oracle designates this
3368# particular file as subject to the "Classpath" exception as provided
3369# by Oracle in the LICENSE file that accompanied this code.
3370#
3371# This code is distributed in the hope that it will be useful, but WITHOUT
3372# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3373# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3374# version 2 for more details (a copy is included in the LICENSE file that
3375# accompanied this code).
3376#
3377# You should have received a copy of the GNU General Public License version
3378# 2 along with this work; if not, write to the Free Software Foundation,
3379# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3380#
3381# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3382# or visit www.oracle.com if you need additional information or have any
3383# questions.
3384#
3385
3386# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3387# If so, then append $1 to $2 \
3388# Also set JVM_ARG_OK to true/false depending on outcome.
3389
3390
3391# Appends a string to a path variable, only adding the : when needed.
3392
3393
3394# Prepends a string to a path variable, only adding the : when needed.
3395
3396
3397# This will make sure the given variable points to a full and proper
3398# path. This means:
3399# 1) There will be no spaces in the path. On posix platforms,
3400#    spaces in the path will result in an error. On Windows,
3401#    the path will be rewritten using short-style to be space-free.
3402# 2) The path will be absolute, and it will be in unix-style (on
3403#     cygwin).
3404# $1: The name of the variable to fix
3405
3406
3407# This will make sure the given variable points to a executable
3408# with a full and proper path. This means:
3409# 1) There will be no spaces in the path. On posix platforms,
3410#    spaces in the path will result in an error. On Windows,
3411#    the path will be rewritten using short-style to be space-free.
3412# 2) The path will be absolute, and it will be in unix-style (on
3413#     cygwin).
3414# Any arguments given to the executable is preserved.
3415# If the input variable does not have a directory specification, then
3416# it need to be in the PATH.
3417# $1: The name of the variable to fix
3418
3419
3420
3421
3422# Register a --with argument but mark it as deprecated
3423# $1: The name of the with argument to deprecate, not including --with-
3424
3425
3426# Register a --enable argument but mark it as deprecated
3427# $1: The name of the with argument to deprecate, not including --enable-
3428# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3429
3430
3431
3432
3433# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3434# $1: variable to check
3435
3436
3437# Check that there are no unprocessed overridden variables left.
3438# If so, they are an incorrect argument and we will exit with an error.
3439
3440
3441# Setup a tool for the given variable. If correctly specified by the user,
3442# use that value, otherwise search for the tool using the supplied code snippet.
3443# $1: variable to set
3444# $2: code snippet to call to look for the tool
3445
3446
3447# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3448# $1: variable to set
3449# $2: executable name (or list of names) to look for
3450
3451
3452# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3453# $1: variable to set
3454# $2: executable name (or list of names) to look for
3455
3456
3457# Like BASIC_PATH_PROGS but fails if no tool was found.
3458# $1: variable to set
3459# $2: executable name (or list of names) to look for
3460
3461
3462# Like BASIC_SETUP_TOOL but fails if no tool was found.
3463# $1: variable to set
3464# $2: autoconf macro to call to look for the special tool
3465
3466
3467# Setup the most fundamental tools that relies on not much else to set up,
3468# but is used by much of the early bootstrap code.
3469
3470
3471# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3472
3473
3474# Evaluates platform specific overrides for devkit variables.
3475# $1: Name of variable
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485#%%% Simple tools %%%
3486
3487# Check if we have found a usable version of make
3488# $1: the path to a potential make binary (or empty)
3489# $2: the description on how we found this
3490
3491
3492# Goes looking for a usable version of GNU make.
3493
3494
3495
3496
3497
3498
3499# Check if build directory is on local disk. If not possible to determine,
3500# we prefer to claim it's local.
3501# Argument 1: directory to test
3502# Argument 2: what to do if it is on local disk
3503# Argument 3: what to do otherwise (remote disk or failure)
3504
3505
3506# Check that source files have basic read permissions set. This might
3507# not be the case in cygwin in certain conditions.
3508
3509
3510
3511
3512# Code to run after AC_OUTPUT
3513
3514
3515#
3516# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3517# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3518#
3519# This code is free software; you can redistribute it and/or modify it
3520# under the terms of the GNU General Public License version 2 only, as
3521# published by the Free Software Foundation.  Oracle designates this
3522# particular file as subject to the "Classpath" exception as provided
3523# by Oracle in the LICENSE file that accompanied this code.
3524#
3525# This code is distributed in the hope that it will be useful, but WITHOUT
3526# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3527# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3528# version 2 for more details (a copy is included in the LICENSE file that
3529# accompanied this code).
3530#
3531# You should have received a copy of the GNU General Public License version
3532# 2 along with this work; if not, write to the Free Software Foundation,
3533# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3534#
3535# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3536# or visit www.oracle.com if you need additional information or have any
3537# questions.
3538#
3539
3540
3541
3542
3543
3544# Helper function which possibly converts a path using DOS-style short mode.
3545# If so, the updated path is stored in $new_path.
3546# $1: The path to check
3547
3548
3549# Helper function which possibly converts a path using DOS-style short mode.
3550# If so, the updated path is stored in $new_path.
3551# $1: The path to check
3552
3553
3554# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3555# and could probably be heavily simplified. However, all changes in this
3556# area tend to need lot of testing in different scenarios, and in lack of
3557# proper unit testing, cleaning this up has not been deemed worth the effort
3558# at the moment.
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3569
3570
3571
3572
3573#
3574# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3575# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3576#
3577# This code is free software; you can redistribute it and/or modify it
3578# under the terms of the GNU General Public License version 2 only, as
3579# published by the Free Software Foundation.  Oracle designates this
3580# particular file as subject to the "Classpath" exception as provided
3581# by Oracle in the LICENSE file that accompanied this code.
3582#
3583# This code is distributed in the hope that it will be useful, but WITHOUT
3584# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3585# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3586# version 2 for more details (a copy is included in the LICENSE file that
3587# accompanied this code).
3588#
3589# You should have received a copy of the GNU General Public License version
3590# 2 along with this work; if not, write to the Free Software Foundation,
3591# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3592#
3593# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3594# or visit www.oracle.com if you need additional information or have any
3595# questions.
3596#
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608# ... then the rest
3609#
3610# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3611# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3612#
3613# This code is free software; you can redistribute it and/or modify it
3614# under the terms of the GNU General Public License version 2 only, as
3615# published by the Free Software Foundation.  Oracle designates this
3616# particular file as subject to the "Classpath" exception as provided
3617# by Oracle in the LICENSE file that accompanied this code.
3618#
3619# This code is distributed in the hope that it will be useful, but WITHOUT
3620# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3621# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3622# version 2 for more details (a copy is included in the LICENSE file that
3623# accompanied this code).
3624#
3625# You should have received a copy of the GNU General Public License version
3626# 2 along with this work; if not, write to the Free Software Foundation,
3627# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3628#
3629# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3630# or visit www.oracle.com if you need additional information or have any
3631# questions.
3632#
3633
3634# Execute the check given as argument, and verify the result
3635# If the Boot JDK was previously found, do nothing
3636# $1 A command line (typically autoconf macro) to execute
3637
3638
3639# Test: Is bootjdk explicitely set by command line arguments?
3640
3641
3642# Test: Is bootjdk available from builddeps?
3643
3644
3645# Test: Is $JAVA_HOME set?
3646
3647
3648# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3649
3650
3651# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3652
3653
3654# Look for a jdk in the given path. If there are multiple, try to select the newest.
3655# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3656# $1 = Path to directory containing jdk installations.
3657# $2 = String to append to the found JDK directory to get the proper JDK home
3658
3659
3660# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3661# environmental variable as base for where to look.
3662# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3663
3664
3665# Test: Is there a JDK installed in default, well-known locations?
3666
3667
3668# Check that a command-line tool in the Boot JDK is correct
3669# $1 = name of variable to assign
3670# $2 = name of binary
3671
3672
3673###############################################################################
3674#
3675# We need a Boot JDK to bootstrap the build.
3676#
3677
3678
3679
3680
3681
3682#
3683# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3685#
3686# This code is free software; you can redistribute it and/or modify it
3687# under the terms of the GNU General Public License version 2 only, as
3688# published by the Free Software Foundation.  Oracle designates this
3689# particular file as subject to the "Classpath" exception as provided
3690# by Oracle in the LICENSE file that accompanied this code.
3691#
3692# This code is distributed in the hope that it will be useful, but WITHOUT
3693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3695# version 2 for more details (a copy is included in the LICENSE file that
3696# accompanied this code).
3697#
3698# You should have received a copy of the GNU General Public License version
3699# 2 along with this work; if not, write to the Free Software Foundation,
3700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3701#
3702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3703# or visit www.oracle.com if you need additional information or have any
3704# questions.
3705#
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726#
3727# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751
3752
3753
3754
3755# Documentation on common flags used for solstudio in HIGHEST.
3756#
3757# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3758#          done with care, there are some assumptions below that need to
3759#          be understood about the use of pointers, and IEEE behavior.
3760#
3761# -fns: Use non-standard floating point mode (not IEEE 754)
3762# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3763# -fsingle: Use single precision floating point with 'float'
3764# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3765#   (Source with excessing pointer casting and data access with mixed
3766#    pointer types are not recommended)
3767# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3768#   (If you expect perfect errno behavior, do not use this)
3769# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3770# -xrestrict: Pointer parameters to functions do not overlap
3771#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3772#    If you pass in multiple pointers to the same data, do not use this)
3773# -xlibmil: Inline some library routines
3774#   (If you expect perfect errno behavior, do not use this)
3775# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3776#   (If you expect perfect errno behavior, do not use this)
3777#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3778
3779    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3780    # Bug?
3781    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3782    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3783    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3784    #fi
3785
3786
3787
3788
3789
3790
3791# FLAGS_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3792#                                  [RUN-IF-FALSE])
3793# ------------------------------------------------------------
3794# Check that the C compiler supports an argument
3795
3796
3797# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3798#                                    [RUN-IF-FALSE])
3799# ------------------------------------------------------------
3800# Check that the C++ compiler supports an argument
3801
3802
3803# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3804#                                [RUN-IF-FALSE])
3805# ------------------------------------------------------------
3806# Check that the C and C++ compilers support an argument
3807
3808
3809
3810
3811
3812
3813
3814#
3815# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3816# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3817#
3818# This code is free software; you can redistribute it and/or modify it
3819# under the terms of the GNU General Public License version 2 only, as
3820# published by the Free Software Foundation.  Oracle designates this
3821# particular file as subject to the "Classpath" exception as provided
3822# by Oracle in the LICENSE file that accompanied this code.
3823#
3824# This code is distributed in the hope that it will be useful, but WITHOUT
3825# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3826# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3827# version 2 for more details (a copy is included in the LICENSE file that
3828# accompanied this code).
3829#
3830# You should have received a copy of the GNU General Public License version
3831# 2 along with this work; if not, write to the Free Software Foundation,
3832# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3833#
3834# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3835# or visit www.oracle.com if you need additional information or have any
3836# questions.
3837#
3838
3839
3840
3841
3842
3843cygwin_help() {
3844  case $1 in
3845    unzip)
3846      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3847      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3848      ;;
3849    zip)
3850      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3851      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3852      ;;
3853    make)
3854      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3855      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3856      ;;
3857    freetype)
3858      HELP_MSG="
3859The freetype library can now be build during the configure process.
3860Download the freetype sources and unpack them into an arbitrary directory:
3861
3862wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3863tar -xzf freetype-2.5.3.tar.gz
3864
3865Then run configure with '--with-freetype-src=<freetype_src>'. This will
3866automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3867builds or into '<freetype_src>/lib32' for 32-bit builds.
3868Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3869and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3870      ;;
3871  esac
3872}
3873
3874msys_help() {
3875  PKGHANDLER_COMMAND=""
3876}
3877
3878apt_help() {
3879  case $1 in
3880    devkit)
3881      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3882    openjdk)
3883      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3884    alsa)
3885      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3886    cups)
3887      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3888    fontconfig)
3889      PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
3890    freetype)
3891      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3892    pulse)
3893      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3894    x11)
3895      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3896    ccache)
3897      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3898  esac
3899}
3900
3901yum_help() {
3902  case $1 in
3903    devkit)
3904      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3905    openjdk)
3906      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3907    alsa)
3908      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3909    cups)
3910      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3911    fontconfig)
3912      PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
3913    freetype)
3914      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3915    pulse)
3916      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3917    x11)
3918      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3919    ccache)
3920      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3921  esac
3922}
3923
3924port_help() {
3925  PKGHANDLER_COMMAND=""
3926}
3927
3928pkgutil_help() {
3929  PKGHANDLER_COMMAND=""
3930}
3931
3932pkgadd_help() {
3933  PKGHANDLER_COMMAND=""
3934}
3935
3936# This function will check if we're called from the "configure" wrapper while
3937# printing --help. If so, we will print out additional information that can
3938# only be extracted within the autoconf script, and then exit. This must be
3939# called at the very beginning in configure.ac.
3940
3941
3942
3943
3944
3945
3946#
3947# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
3948# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3949#
3950# This code is free software; you can redistribute it and/or modify it
3951# under the terms of the GNU General Public License version 2 only, as
3952# published by the Free Software Foundation.  Oracle designates this
3953# particular file as subject to the "Classpath" exception as provided
3954# by Oracle in the LICENSE file that accompanied this code.
3955#
3956# This code is distributed in the hope that it will be useful, but WITHOUT
3957# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3958# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3959# version 2 for more details (a copy is included in the LICENSE file that
3960# accompanied this code).
3961#
3962# You should have received a copy of the GNU General Public License version
3963# 2 along with this work; if not, write to the Free Software Foundation,
3964# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3965#
3966# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3967# or visit www.oracle.com if you need additional information or have any
3968# questions.
3969#
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980###############################################################################
3981#
3982# Should we build only OpenJDK even if closed sources are present?
3983#
3984
3985
3986
3987
3988###############################################################################
3989#
3990# Setup version numbers
3991#
3992
3993
3994
3995
3996
3997
3998# Support for customization of the build process. Some build files
3999# will include counterparts from this location, if they exist. This allows
4000# for a degree of customization of the build targets and the rules/recipes
4001# to create them
4002
4003# Check whether --with-custom-make-dir was given.
4004if test "${with_custom_make_dir+set}" = set; then :
4005  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
4006fi
4007
4008
4009
4010#
4011# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4012# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4013#
4014# This code is free software; you can redistribute it and/or modify it
4015# under the terms of the GNU General Public License version 2 only, as
4016# published by the Free Software Foundation.  Oracle designates this
4017# particular file as subject to the "Classpath" exception as provided
4018# by Oracle in the LICENSE file that accompanied this code.
4019#
4020# This code is distributed in the hope that it will be useful, but WITHOUT
4021# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4022# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4023# version 2 for more details (a copy is included in the LICENSE file that
4024# accompanied this code).
4025#
4026# You should have received a copy of the GNU General Public License version
4027# 2 along with this work; if not, write to the Free Software Foundation,
4028# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4029#
4030# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4031# or visit www.oracle.com if you need additional information or have any
4032# questions.
4033#
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049################################################################################
4050# Setup fontconfig
4051################################################################################
4052
4053
4054
4055
4056
4057
4058
4059
4060#
4061# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4062# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4063#
4064# This code is free software; you can redistribute it and/or modify it
4065# under the terms of the GNU General Public License version 2 only, as
4066# published by the Free Software Foundation.  Oracle designates this
4067# particular file as subject to the "Classpath" exception as provided
4068# by Oracle in the LICENSE file that accompanied this code.
4069#
4070# This code is distributed in the hope that it will be useful, but WITHOUT
4071# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4072# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4073# version 2 for more details (a copy is included in the LICENSE file that
4074# accompanied this code).
4075#
4076# You should have received a copy of the GNU General Public License version
4077# 2 along with this work; if not, write to the Free Software Foundation,
4078# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4079#
4080# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4081# or visit www.oracle.com if you need additional information or have any
4082# questions.
4083#
4084
4085# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4086# Converts autoconf style CPU name to OpenJDK style, into
4087# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4088
4089
4090# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4091# Converts autoconf style OS name to OpenJDK style, into
4092# VAR_OS and VAR_OS_API.
4093
4094
4095# Expects $host_os $host_cpu $build_os and $build_cpu
4096# and $with_target_bits to have been setup!
4097#
4098# Translate the standard triplet(quadruplet) definition
4099# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4100# OPENJDK_BUILD_OS, etc.
4101
4102
4103# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4104# accordingly. Must be done after setting up build and target system, but before
4105# doing anything else with these values.
4106
4107
4108# Setup the legacy variables, for controlling the old makefiles.
4109#
4110
4111
4112
4113
4114#%%% Build and target systems %%%
4115
4116
4117
4118
4119# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4120# Add -mX to various FLAGS variables.
4121
4122
4123
4124
4125
4126
4127#
4128# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130#
4131# This code is free software; you can redistribute it and/or modify it
4132# under the terms of the GNU General Public License version 2 only, as
4133# published by the Free Software Foundation.  Oracle designates this
4134# particular file as subject to the "Classpath" exception as provided
4135# by Oracle in the LICENSE file that accompanied this code.
4136#
4137# This code is distributed in the hope that it will be useful, but WITHOUT
4138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4140# version 2 for more details (a copy is included in the LICENSE file that
4141# accompanied this code).
4142#
4143# You should have received a copy of the GNU General Public License version
4144# 2 along with this work; if not, write to the Free Software Foundation,
4145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4146#
4147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4148# or visit www.oracle.com if you need additional information or have any
4149# questions.
4150#
4151
4152
4153
4154
4155
4156
4157
4158
4159#
4160# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4161# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4162#
4163# This code is free software; you can redistribute it and/or modify it
4164# under the terms of the GNU General Public License version 2 only, as
4165# published by the Free Software Foundation.  Oracle designates this
4166# particular file as subject to the "Classpath" exception as provided
4167# by Oracle in the LICENSE file that accompanied this code.
4168#
4169# This code is distributed in the hope that it will be useful, but WITHOUT
4170# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4171# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4172# version 2 for more details (a copy is included in the LICENSE file that
4173# accompanied this code).
4174#
4175# You should have received a copy of the GNU General Public License version
4176# 2 along with this work; if not, write to the Free Software Foundation,
4177# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4178#
4179# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4180# or visit www.oracle.com if you need additional information or have any
4181# questions.
4182#
4183
4184########################################################################
4185# This file is responsible for detecting, verifying and setting up the
4186# toolchain, i.e. the compiler, linker and related utilities. It will setup
4187# proper paths to the binaries, but it will not setup any flags.
4188#
4189# The binaries used is determined by the toolchain type, which is the family of
4190# compilers and related tools that are used.
4191########################################################################
4192
4193
4194# All valid toolchains, regardless of platform (used by help.m4)
4195VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4196
4197# These toolchains are valid on different platforms
4198VALID_TOOLCHAINS_bsd="clang gcc"
4199VALID_TOOLCHAINS_linux="gcc clang"
4200VALID_TOOLCHAINS_solaris="solstudio"
4201VALID_TOOLCHAINS_macosx="gcc clang"
4202VALID_TOOLCHAINS_aix="xlc"
4203VALID_TOOLCHAINS_windows="microsoft"
4204
4205# Toolchain descriptions
4206TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4207TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4208TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4209TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4210TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4211
4212# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4213# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4214# $1 - optional variable prefix for compiler and version variables (BUILD_)
4215# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4216
4217
4218# Check if the configured compiler (C and C++) is of a specific version or
4219# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4220#
4221# Arguments:
4222#   $1:   The version string to check against the found version
4223#   $2:   block to run if the compiler is at least this version (>=)
4224#   $3:   block to run if the compiler is older than this version (<)
4225
4226
4227
4228# Setup a number of variables describing how native output files are
4229# named on this platform/toolchain.
4230
4231
4232# Determine which toolchain type to use, and make sure it is valid for this
4233# platform. Setup various information about the selected toolchain.
4234
4235
4236# Before we start detecting the toolchain executables, we might need some
4237# special setup, e.g. additional paths etc.
4238
4239
4240# Restore path, etc
4241
4242
4243# Check if a compiler is of the toolchain type we expect, and save the version
4244# information from it. If the compiler does not match the expected type,
4245# this function will abort using AC_MSG_ERROR. If it matches, the version will
4246# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4247# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4248#
4249# $1 = compiler to test (CC or CXX)
4250# $2 = human readable name of compiler (C or C++)
4251
4252
4253
4254# Try to locate the given C or C++ compiler in the path, or otherwise.
4255#
4256# $1 = compiler to test (CC or CXX)
4257# $2 = human readable name of compiler (C or C++)
4258# $3 = list of compiler names to search for
4259
4260
4261# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4262# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4263# archiver (AR). Verify that the compilers are correct according to the
4264# toolchain type.
4265
4266
4267# Setup additional tools that is considered a part of the toolchain, but not the
4268# core part. Many of these are highly platform-specific and do not exist,
4269# and/or are not needed on all platforms.
4270
4271
4272# Setup the build tools (i.e, the compiler and linker used to build programs
4273# that should be run on the build platform, not the target platform, as a build
4274# helper). Since the non-cross-compile case uses the normal, target compilers
4275# for this, we can only do this after these have been setup.
4276
4277
4278# Setup legacy variables that are still needed as alternative ways to refer to
4279# parts of the toolchain.
4280
4281
4282# Do some additional checks on the detected tools.
4283
4284
4285# Setup the JTReg Regression Test Harness.
4286
4287
4288
4289#
4290# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4292#
4293# This code is free software; you can redistribute it and/or modify it
4294# under the terms of the GNU General Public License version 2 only, as
4295# published by the Free Software Foundation.  Oracle designates this
4296# particular file as subject to the "Classpath" exception as provided
4297# by Oracle in the LICENSE file that accompanied this code.
4298#
4299# This code is distributed in the hope that it will be useful, but WITHOUT
4300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4302# version 2 for more details (a copy is included in the LICENSE file that
4303# accompanied this code).
4304#
4305# You should have received a copy of the GNU General Public License version
4306# 2 along with this work; if not, write to the Free Software Foundation,
4307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4308#
4309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4310# or visit www.oracle.com if you need additional information or have any
4311# questions.
4312#
4313
4314################################################################################
4315# The order of these defines the priority by which we try to find them.
4316VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
4317
4318VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4319VS_VERSION_INTERNAL_2010=100
4320VS_MSVCR_2010=msvcr100.dll
4321# We don't use msvcp on Visual Studio 2010
4322#VS_MSVCP_2010=msvcp100.dll
4323VS_ENVVAR_2010="VS100COMNTOOLS"
4324VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4325VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4326VS_VS_PLATFORM_NAME_2010="v100"
4327VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4328
4329VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4330VS_VERSION_INTERNAL_2012=110
4331VS_MSVCR_2012=msvcr110.dll
4332VS_MSVCP_2012=msvcp110.dll
4333VS_ENVVAR_2012="VS110COMNTOOLS"
4334VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4335VS_SDK_INSTALLDIR_2012=
4336VS_VS_PLATFORM_NAME_2012="v110"
4337VS_SDK_PLATFORM_NAME_2012=
4338
4339VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4340VS_VERSION_INTERNAL_2013=120
4341VS_MSVCR_2013=msvcr120.dll
4342VS_MSVCP_2013=msvcp120.dll
4343VS_ENVVAR_2013="VS120COMNTOOLS"
4344VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4345VS_SDK_INSTALLDIR_2013=
4346VS_VS_PLATFORM_NAME_2013="v120"
4347VS_SDK_PLATFORM_NAME_2013=
4348
4349VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
4350VS_VERSION_INTERNAL_2015=140
4351VS_MSVCR_2015=vcruntime140.dll
4352VS_MSVCP_2015=msvcp140.dll
4353VS_ENVVAR_2015="VS140COMNTOOLS"
4354VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
4355VS_SDK_INSTALLDIR_2015=
4356VS_VS_PLATFORM_NAME_2015="v140"
4357VS_SDK_PLATFORM_NAME_2015=
4358# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
4359# explicitly specifying Windows Kit 8.1 to be used.
4360VS_ENV_ARGS_2015="8.1"
4361
4362VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
4363VS_VERSION_INTERNAL_2017=141
4364VS_MSVCR_2017=vcruntime140.dll
4365VS_MSVCP_2017=msvcp140.dll
4366VS_ENVVAR_2017="VS150COMNTOOLS"
4367VS_USE_UCRT_2017="true"
4368VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
4369VS_EDITIONS_2017="Community Professional Enterprise"
4370VS_SDK_INSTALLDIR_2017=
4371VS_VS_PLATFORM_NAME_2017="v141"
4372VS_SDK_PLATFORM_NAME_2017=
4373
4374################################################################################
4375
4376
4377
4378################################################################################
4379
4380
4381
4382################################################################################
4383# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4384# build environment and assigns it to VS_ENV_CMD
4385
4386
4387################################################################################
4388
4389
4390
4391################################################################################
4392# Check if the VS env variables were setup prior to running configure.
4393# If not, then find vcvarsall.bat and run it automatically, and integrate
4394# the set env variables into the spec file.
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409# This line needs to be here, verbatim, after all includes and the dummy hook
4410# definitions. It is replaced with custom functionality when building
4411# custom sources.
4412#CUSTOM_AUTOCONF_INCLUDE
4413
4414# Do not change or remove the following line, it is needed for consistency checks:
4415DATE_WHEN_GENERATED=1625670527
4416
4417###############################################################################
4418#
4419# Initialization / Boot-strapping
4420#
4421# The bootstrapping process needs to solve the "chicken or the egg" problem,
4422# thus it jumps back and forth, each time gaining something needed later on.
4423#
4424###############################################################################
4425
4426# If we are requested to print additional help, do that and then exit.
4427# This must be the very first call.
4428
4429  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4430    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4431    $PRINTF "Which are valid to use depends on the build platform.\n"
4432    for toolchain in $VALID_TOOLCHAINS_all; do
4433      # Use indirect variable referencing
4434      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4435      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4436      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4437    done
4438
4439    # And now exit directly
4440    exit 0
4441  fi
4442
4443
4444# Basic initialization that must happen first of all in the normal process.
4445
4446  # Save the original command line. This is passed to us by the wrapper configure script.
4447
4448  DATE_WHEN_CONFIGURED=`LANG=C date`
4449
4450  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4451$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4453$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4454
4455
4456  # Start with tools that do not need have cross compilation support
4457  # and can be expected to be found in the default PATH. These tools are
4458  # used by configure. Nor are these tools expected to be found in the
4459  # devkit from the builddeps server either, since they are
4460  # needed to download the devkit.
4461
4462  # First are all the simple required tools.
4463
4464
4465
4466  # Publish this variable in the help.
4467
4468
4469  if test "x$BASENAME" = x; then
4470    # The variable is not set by user, try to locate tool using the code snippet
4471    for ac_prog in basename
4472do
4473  # Extract the first word of "$ac_prog", so it can be a program name with args.
4474set dummy $ac_prog; ac_word=$2
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4476$as_echo_n "checking for $ac_word... " >&6; }
4477if ${ac_cv_path_BASENAME+:} false; then :
4478  $as_echo_n "(cached) " >&6
4479else
4480  case $BASENAME in
4481  [\\/]* | ?:[\\/]*)
4482  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4483  ;;
4484  *)
4485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486for as_dir in $PATH
4487do
4488  IFS=$as_save_IFS
4489  test -z "$as_dir" && as_dir=.
4490    for ac_exec_ext in '' $ac_executable_extensions; do
4491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4492    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4494    break 2
4495  fi
4496done
4497  done
4498IFS=$as_save_IFS
4499
4500  ;;
4501esac
4502fi
4503BASENAME=$ac_cv_path_BASENAME
4504if test -n "$BASENAME"; then
4505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4506$as_echo "$BASENAME" >&6; }
4507else
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4509$as_echo "no" >&6; }
4510fi
4511
4512
4513  test -n "$BASENAME" && break
4514done
4515
4516  else
4517    # The variable is set, but is it from the command line or the environment?
4518
4519    # Try to remove the string !BASENAME! from our list.
4520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4522      # If it failed, the variable was not from the command line. Ignore it,
4523      # but warn the user (except for BASH, which is always set by the calling BASH).
4524      if test "xBASENAME" != xBASH; then
4525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4526$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4527      fi
4528      # Try to locate tool using the code snippet
4529      for ac_prog in basename
4530do
4531  # Extract the first word of "$ac_prog", so it can be a program name with args.
4532set dummy $ac_prog; ac_word=$2
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4534$as_echo_n "checking for $ac_word... " >&6; }
4535if ${ac_cv_path_BASENAME+:} false; then :
4536  $as_echo_n "(cached) " >&6
4537else
4538  case $BASENAME in
4539  [\\/]* | ?:[\\/]*)
4540  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4541  ;;
4542  *)
4543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in $PATH
4545do
4546  IFS=$as_save_IFS
4547  test -z "$as_dir" && as_dir=.
4548    for ac_exec_ext in '' $ac_executable_extensions; do
4549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4550    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4552    break 2
4553  fi
4554done
4555  done
4556IFS=$as_save_IFS
4557
4558  ;;
4559esac
4560fi
4561BASENAME=$ac_cv_path_BASENAME
4562if test -n "$BASENAME"; then
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4564$as_echo "$BASENAME" >&6; }
4565else
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
4568fi
4569
4570
4571  test -n "$BASENAME" && break
4572done
4573
4574    else
4575      # If it succeeded, then it was overridden by the user. We will use it
4576      # for the tool.
4577
4578      # First remove it from the list of overridden variables, so we can test
4579      # for unknown variables in the end.
4580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4581
4582      # Check if the provided tool contains a complete path.
4583      tool_specified="$BASENAME"
4584      tool_basename="${tool_specified##*/}"
4585      if test "x$tool_basename" = "x$tool_specified"; then
4586        # A command without a complete path is provided, search $PATH.
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4588$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4589        # Extract the first word of "$tool_basename", so it can be a program name with args.
4590set dummy $tool_basename; ac_word=$2
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4592$as_echo_n "checking for $ac_word... " >&6; }
4593if ${ac_cv_path_BASENAME+:} false; then :
4594  $as_echo_n "(cached) " >&6
4595else
4596  case $BASENAME in
4597  [\\/]* | ?:[\\/]*)
4598  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4599  ;;
4600  *)
4601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4602for as_dir in $PATH
4603do
4604  IFS=$as_save_IFS
4605  test -z "$as_dir" && as_dir=.
4606    for ac_exec_ext in '' $ac_executable_extensions; do
4607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4608    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4610    break 2
4611  fi
4612done
4613  done
4614IFS=$as_save_IFS
4615
4616  ;;
4617esac
4618fi
4619BASENAME=$ac_cv_path_BASENAME
4620if test -n "$BASENAME"; then
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4622$as_echo "$BASENAME" >&6; }
4623else
4624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
4626fi
4627
4628
4629        if test "x$BASENAME" = x; then
4630          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4631        fi
4632      else
4633        # Otherwise we believe it is a complete path. Use it as it is.
4634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4635$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4637$as_echo_n "checking for BASENAME... " >&6; }
4638        if test ! -x "$tool_specified"; then
4639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4640$as_echo "not found" >&6; }
4641          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4642        fi
4643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4644$as_echo "$tool_specified" >&6; }
4645      fi
4646    fi
4647  fi
4648
4649
4650
4651  if test "x$BASENAME" = x; then
4652    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4653  fi
4654
4655
4656
4657
4658
4659  # Publish this variable in the help.
4660
4661
4662  if test "x$BASH" = x; then
4663    # The variable is not set by user, try to locate tool using the code snippet
4664    for ac_prog in bash
4665do
4666  # Extract the first word of "$ac_prog", so it can be a program name with args.
4667set dummy $ac_prog; ac_word=$2
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
4670if ${ac_cv_path_BASH+:} false; then :
4671  $as_echo_n "(cached) " >&6
4672else
4673  case $BASH in
4674  [\\/]* | ?:[\\/]*)
4675  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4676  ;;
4677  *)
4678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in $PATH
4680do
4681  IFS=$as_save_IFS
4682  test -z "$as_dir" && as_dir=.
4683    for ac_exec_ext in '' $ac_executable_extensions; do
4684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4685    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687    break 2
4688  fi
4689done
4690  done
4691IFS=$as_save_IFS
4692
4693  ;;
4694esac
4695fi
4696BASH=$ac_cv_path_BASH
4697if test -n "$BASH"; then
4698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4699$as_echo "$BASH" >&6; }
4700else
4701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705
4706  test -n "$BASH" && break
4707done
4708
4709  else
4710    # The variable is set, but is it from the command line or the environment?
4711
4712    # Try to remove the string !BASH! from our list.
4713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4715      # If it failed, the variable was not from the command line. Ignore it,
4716      # but warn the user (except for BASH, which is always set by the calling BASH).
4717      if test "xBASH" != xBASH; then
4718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4719$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4720      fi
4721      # Try to locate tool using the code snippet
4722      for ac_prog in bash
4723do
4724  # Extract the first word of "$ac_prog", so it can be a program name with args.
4725set dummy $ac_prog; ac_word=$2
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
4728if ${ac_cv_path_BASH+:} false; then :
4729  $as_echo_n "(cached) " >&6
4730else
4731  case $BASH in
4732  [\\/]* | ?:[\\/]*)
4733  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4734  ;;
4735  *)
4736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in $PATH
4738do
4739  IFS=$as_save_IFS
4740  test -z "$as_dir" && as_dir=.
4741    for ac_exec_ext in '' $ac_executable_extensions; do
4742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4743    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745    break 2
4746  fi
4747done
4748  done
4749IFS=$as_save_IFS
4750
4751  ;;
4752esac
4753fi
4754BASH=$ac_cv_path_BASH
4755if test -n "$BASH"; then
4756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4757$as_echo "$BASH" >&6; }
4758else
4759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
4761fi
4762
4763
4764  test -n "$BASH" && break
4765done
4766
4767    else
4768      # If it succeeded, then it was overridden by the user. We will use it
4769      # for the tool.
4770
4771      # First remove it from the list of overridden variables, so we can test
4772      # for unknown variables in the end.
4773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4774
4775      # Check if the provided tool contains a complete path.
4776      tool_specified="$BASH"
4777      tool_basename="${tool_specified##*/}"
4778      if test "x$tool_basename" = "x$tool_specified"; then
4779        # A command without a complete path is provided, search $PATH.
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4781$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4782        # Extract the first word of "$tool_basename", so it can be a program name with args.
4783set dummy $tool_basename; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
4786if ${ac_cv_path_BASH+:} false; then :
4787  $as_echo_n "(cached) " >&6
4788else
4789  case $BASH in
4790  [\\/]* | ?:[\\/]*)
4791  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4792  ;;
4793  *)
4794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in $PATH
4796do
4797  IFS=$as_save_IFS
4798  test -z "$as_dir" && as_dir=.
4799    for ac_exec_ext in '' $ac_executable_extensions; do
4800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4801    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4803    break 2
4804  fi
4805done
4806  done
4807IFS=$as_save_IFS
4808
4809  ;;
4810esac
4811fi
4812BASH=$ac_cv_path_BASH
4813if test -n "$BASH"; then
4814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4815$as_echo "$BASH" >&6; }
4816else
4817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
4819fi
4820
4821
4822        if test "x$BASH" = x; then
4823          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4824        fi
4825      else
4826        # Otherwise we believe it is a complete path. Use it as it is.
4827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4828$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4829        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4830$as_echo_n "checking for BASH... " >&6; }
4831        if test ! -x "$tool_specified"; then
4832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4833$as_echo "not found" >&6; }
4834          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4835        fi
4836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4837$as_echo "$tool_specified" >&6; }
4838      fi
4839    fi
4840  fi
4841
4842
4843
4844  if test "x$BASH" = x; then
4845    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4846  fi
4847
4848
4849
4850
4851
4852  # Publish this variable in the help.
4853
4854
4855  if test "x$CAT" = x; then
4856    # The variable is not set by user, try to locate tool using the code snippet
4857    for ac_prog in cat
4858do
4859  # Extract the first word of "$ac_prog", so it can be a program name with args.
4860set dummy $ac_prog; ac_word=$2
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_CAT+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866  case $CAT in
4867  [\\/]* | ?:[\\/]*)
4868  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4869  ;;
4870  *)
4871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in $PATH
4873do
4874  IFS=$as_save_IFS
4875  test -z "$as_dir" && as_dir=.
4876    for ac_exec_ext in '' $ac_executable_extensions; do
4877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4878    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880    break 2
4881  fi
4882done
4883  done
4884IFS=$as_save_IFS
4885
4886  ;;
4887esac
4888fi
4889CAT=$ac_cv_path_CAT
4890if test -n "$CAT"; then
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4892$as_echo "$CAT" >&6; }
4893else
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898
4899  test -n "$CAT" && break
4900done
4901
4902  else
4903    # The variable is set, but is it from the command line or the environment?
4904
4905    # Try to remove the string !CAT! from our list.
4906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4908      # If it failed, the variable was not from the command line. Ignore it,
4909      # but warn the user (except for BASH, which is always set by the calling BASH).
4910      if test "xCAT" != xBASH; then
4911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4912$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4913      fi
4914      # Try to locate tool using the code snippet
4915      for ac_prog in cat
4916do
4917  # Extract the first word of "$ac_prog", so it can be a program name with args.
4918set dummy $ac_prog; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_CAT+:} false; then :
4922  $as_echo_n "(cached) " >&6
4923else
4924  case $CAT in
4925  [\\/]* | ?:[\\/]*)
4926  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4927  ;;
4928  *)
4929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932  IFS=$as_save_IFS
4933  test -z "$as_dir" && as_dir=.
4934    for ac_exec_ext in '' $ac_executable_extensions; do
4935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938    break 2
4939  fi
4940done
4941  done
4942IFS=$as_save_IFS
4943
4944  ;;
4945esac
4946fi
4947CAT=$ac_cv_path_CAT
4948if test -n "$CAT"; then
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4950$as_echo "$CAT" >&6; }
4951else
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957  test -n "$CAT" && break
4958done
4959
4960    else
4961      # If it succeeded, then it was overridden by the user. We will use it
4962      # for the tool.
4963
4964      # First remove it from the list of overridden variables, so we can test
4965      # for unknown variables in the end.
4966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4967
4968      # Check if the provided tool contains a complete path.
4969      tool_specified="$CAT"
4970      tool_basename="${tool_specified##*/}"
4971      if test "x$tool_basename" = "x$tool_specified"; then
4972        # A command without a complete path is provided, search $PATH.
4973        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4974$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4975        # Extract the first word of "$tool_basename", so it can be a program name with args.
4976set dummy $tool_basename; ac_word=$2
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4978$as_echo_n "checking for $ac_word... " >&6; }
4979if ${ac_cv_path_CAT+:} false; then :
4980  $as_echo_n "(cached) " >&6
4981else
4982  case $CAT in
4983  [\\/]* | ?:[\\/]*)
4984  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4985  ;;
4986  *)
4987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in $PATH
4989do
4990  IFS=$as_save_IFS
4991  test -z "$as_dir" && as_dir=.
4992    for ac_exec_ext in '' $ac_executable_extensions; do
4993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4994    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4996    break 2
4997  fi
4998done
4999  done
5000IFS=$as_save_IFS
5001
5002  ;;
5003esac
5004fi
5005CAT=$ac_cv_path_CAT
5006if test -n "$CAT"; then
5007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5008$as_echo "$CAT" >&6; }
5009else
5010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011$as_echo "no" >&6; }
5012fi
5013
5014
5015        if test "x$CAT" = x; then
5016          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5017        fi
5018      else
5019        # Otherwise we believe it is a complete path. Use it as it is.
5020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5021$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5023$as_echo_n "checking for CAT... " >&6; }
5024        if test ! -x "$tool_specified"; then
5025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5026$as_echo "not found" >&6; }
5027          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5028        fi
5029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5030$as_echo "$tool_specified" >&6; }
5031      fi
5032    fi
5033  fi
5034
5035
5036
5037  if test "x$CAT" = x; then
5038    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5039  fi
5040
5041
5042
5043
5044
5045  # Publish this variable in the help.
5046
5047
5048  if test "x$CHMOD" = x; then
5049    # The variable is not set by user, try to locate tool using the code snippet
5050    for ac_prog in chmod
5051do
5052  # Extract the first word of "$ac_prog", so it can be a program name with args.
5053set dummy $ac_prog; ac_word=$2
5054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5055$as_echo_n "checking for $ac_word... " >&6; }
5056if ${ac_cv_path_CHMOD+:} false; then :
5057  $as_echo_n "(cached) " >&6
5058else
5059  case $CHMOD in
5060  [\\/]* | ?:[\\/]*)
5061  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5062  ;;
5063  *)
5064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5065for as_dir in $PATH
5066do
5067  IFS=$as_save_IFS
5068  test -z "$as_dir" && as_dir=.
5069    for ac_exec_ext in '' $ac_executable_extensions; do
5070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5071    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5073    break 2
5074  fi
5075done
5076  done
5077IFS=$as_save_IFS
5078
5079  ;;
5080esac
5081fi
5082CHMOD=$ac_cv_path_CHMOD
5083if test -n "$CHMOD"; then
5084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5085$as_echo "$CHMOD" >&6; }
5086else
5087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088$as_echo "no" >&6; }
5089fi
5090
5091
5092  test -n "$CHMOD" && break
5093done
5094
5095  else
5096    # The variable is set, but is it from the command line or the environment?
5097
5098    # Try to remove the string !CHMOD! from our list.
5099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5101      # If it failed, the variable was not from the command line. Ignore it,
5102      # but warn the user (except for BASH, which is always set by the calling BASH).
5103      if test "xCHMOD" != xBASH; then
5104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5105$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5106      fi
5107      # Try to locate tool using the code snippet
5108      for ac_prog in chmod
5109do
5110  # Extract the first word of "$ac_prog", so it can be a program name with args.
5111set dummy $ac_prog; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if ${ac_cv_path_CHMOD+:} false; then :
5115  $as_echo_n "(cached) " >&6
5116else
5117  case $CHMOD in
5118  [\\/]* | ?:[\\/]*)
5119  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5120  ;;
5121  *)
5122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125  IFS=$as_save_IFS
5126  test -z "$as_dir" && as_dir=.
5127    for ac_exec_ext in '' $ac_executable_extensions; do
5128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5129    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131    break 2
5132  fi
5133done
5134  done
5135IFS=$as_save_IFS
5136
5137  ;;
5138esac
5139fi
5140CHMOD=$ac_cv_path_CHMOD
5141if test -n "$CHMOD"; then
5142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5143$as_echo "$CHMOD" >&6; }
5144else
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5146$as_echo "no" >&6; }
5147fi
5148
5149
5150  test -n "$CHMOD" && break
5151done
5152
5153    else
5154      # If it succeeded, then it was overridden by the user. We will use it
5155      # for the tool.
5156
5157      # First remove it from the list of overridden variables, so we can test
5158      # for unknown variables in the end.
5159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5160
5161      # Check if the provided tool contains a complete path.
5162      tool_specified="$CHMOD"
5163      tool_basename="${tool_specified##*/}"
5164      if test "x$tool_basename" = "x$tool_specified"; then
5165        # A command without a complete path is provided, search $PATH.
5166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5167$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5168        # Extract the first word of "$tool_basename", so it can be a program name with args.
5169set dummy $tool_basename; ac_word=$2
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171$as_echo_n "checking for $ac_word... " >&6; }
5172if ${ac_cv_path_CHMOD+:} false; then :
5173  $as_echo_n "(cached) " >&6
5174else
5175  case $CHMOD in
5176  [\\/]* | ?:[\\/]*)
5177  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5178  ;;
5179  *)
5180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181for as_dir in $PATH
5182do
5183  IFS=$as_save_IFS
5184  test -z "$as_dir" && as_dir=.
5185    for ac_exec_ext in '' $ac_executable_extensions; do
5186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5187    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5189    break 2
5190  fi
5191done
5192  done
5193IFS=$as_save_IFS
5194
5195  ;;
5196esac
5197fi
5198CHMOD=$ac_cv_path_CHMOD
5199if test -n "$CHMOD"; then
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5201$as_echo "$CHMOD" >&6; }
5202else
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204$as_echo "no" >&6; }
5205fi
5206
5207
5208        if test "x$CHMOD" = x; then
5209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5210        fi
5211      else
5212        # Otherwise we believe it is a complete path. Use it as it is.
5213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5214$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5216$as_echo_n "checking for CHMOD... " >&6; }
5217        if test ! -x "$tool_specified"; then
5218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5219$as_echo "not found" >&6; }
5220          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5221        fi
5222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5223$as_echo "$tool_specified" >&6; }
5224      fi
5225    fi
5226  fi
5227
5228
5229
5230  if test "x$CHMOD" = x; then
5231    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5232  fi
5233
5234
5235
5236
5237
5238  # Publish this variable in the help.
5239
5240
5241  if test "x$CMP" = x; then
5242    # The variable is not set by user, try to locate tool using the code snippet
5243    for ac_prog in cmp
5244do
5245  # Extract the first word of "$ac_prog", so it can be a program name with args.
5246set dummy $ac_prog; ac_word=$2
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248$as_echo_n "checking for $ac_word... " >&6; }
5249if ${ac_cv_path_CMP+:} false; then :
5250  $as_echo_n "(cached) " >&6
5251else
5252  case $CMP in
5253  [\\/]* | ?:[\\/]*)
5254  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5255  ;;
5256  *)
5257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258for as_dir in $PATH
5259do
5260  IFS=$as_save_IFS
5261  test -z "$as_dir" && as_dir=.
5262    for ac_exec_ext in '' $ac_executable_extensions; do
5263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5264    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5266    break 2
5267  fi
5268done
5269  done
5270IFS=$as_save_IFS
5271
5272  ;;
5273esac
5274fi
5275CMP=$ac_cv_path_CMP
5276if test -n "$CMP"; then
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5278$as_echo "$CMP" >&6; }
5279else
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281$as_echo "no" >&6; }
5282fi
5283
5284
5285  test -n "$CMP" && break
5286done
5287
5288  else
5289    # The variable is set, but is it from the command line or the environment?
5290
5291    # Try to remove the string !CMP! from our list.
5292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5294      # If it failed, the variable was not from the command line. Ignore it,
5295      # but warn the user (except for BASH, which is always set by the calling BASH).
5296      if test "xCMP" != xBASH; then
5297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5298$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5299      fi
5300      # Try to locate tool using the code snippet
5301      for ac_prog in cmp
5302do
5303  # Extract the first word of "$ac_prog", so it can be a program name with args.
5304set dummy $ac_prog; ac_word=$2
5305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5306$as_echo_n "checking for $ac_word... " >&6; }
5307if ${ac_cv_path_CMP+:} false; then :
5308  $as_echo_n "(cached) " >&6
5309else
5310  case $CMP in
5311  [\\/]* | ?:[\\/]*)
5312  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5313  ;;
5314  *)
5315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5316for as_dir in $PATH
5317do
5318  IFS=$as_save_IFS
5319  test -z "$as_dir" && as_dir=.
5320    for ac_exec_ext in '' $ac_executable_extensions; do
5321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5322    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5324    break 2
5325  fi
5326done
5327  done
5328IFS=$as_save_IFS
5329
5330  ;;
5331esac
5332fi
5333CMP=$ac_cv_path_CMP
5334if test -n "$CMP"; then
5335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5336$as_echo "$CMP" >&6; }
5337else
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5339$as_echo "no" >&6; }
5340fi
5341
5342
5343  test -n "$CMP" && break
5344done
5345
5346    else
5347      # If it succeeded, then it was overridden by the user. We will use it
5348      # for the tool.
5349
5350      # First remove it from the list of overridden variables, so we can test
5351      # for unknown variables in the end.
5352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5353
5354      # Check if the provided tool contains a complete path.
5355      tool_specified="$CMP"
5356      tool_basename="${tool_specified##*/}"
5357      if test "x$tool_basename" = "x$tool_specified"; then
5358        # A command without a complete path is provided, search $PATH.
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5360$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5361        # Extract the first word of "$tool_basename", so it can be a program name with args.
5362set dummy $tool_basename; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if ${ac_cv_path_CMP+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $CMP in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5380    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391CMP=$ac_cv_path_CMP
5392if test -n "$CMP"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5394$as_echo "$CMP" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401        if test "x$CMP" = x; then
5402          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5403        fi
5404      else
5405        # Otherwise we believe it is a complete path. Use it as it is.
5406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5407$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5409$as_echo_n "checking for CMP... " >&6; }
5410        if test ! -x "$tool_specified"; then
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5412$as_echo "not found" >&6; }
5413          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5414        fi
5415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5416$as_echo "$tool_specified" >&6; }
5417      fi
5418    fi
5419  fi
5420
5421
5422
5423  if test "x$CMP" = x; then
5424    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5425  fi
5426
5427
5428
5429
5430
5431  # Publish this variable in the help.
5432
5433
5434  if test "x$COMM" = x; then
5435    # The variable is not set by user, try to locate tool using the code snippet
5436    for ac_prog in comm
5437do
5438  # Extract the first word of "$ac_prog", so it can be a program name with args.
5439set dummy $ac_prog; ac_word=$2
5440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5441$as_echo_n "checking for $ac_word... " >&6; }
5442if ${ac_cv_path_COMM+:} false; then :
5443  $as_echo_n "(cached) " >&6
5444else
5445  case $COMM in
5446  [\\/]* | ?:[\\/]*)
5447  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5448  ;;
5449  *)
5450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5451for as_dir in $PATH
5452do
5453  IFS=$as_save_IFS
5454  test -z "$as_dir" && as_dir=.
5455    for ac_exec_ext in '' $ac_executable_extensions; do
5456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5457    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5459    break 2
5460  fi
5461done
5462  done
5463IFS=$as_save_IFS
5464
5465  ;;
5466esac
5467fi
5468COMM=$ac_cv_path_COMM
5469if test -n "$COMM"; then
5470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5471$as_echo "$COMM" >&6; }
5472else
5473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474$as_echo "no" >&6; }
5475fi
5476
5477
5478  test -n "$COMM" && break
5479done
5480
5481  else
5482    # The variable is set, but is it from the command line or the environment?
5483
5484    # Try to remove the string !COMM! from our list.
5485    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5486    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5487      # If it failed, the variable was not from the command line. Ignore it,
5488      # but warn the user (except for BASH, which is always set by the calling BASH).
5489      if test "xCOMM" != xBASH; then
5490        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5491$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5492      fi
5493      # Try to locate tool using the code snippet
5494      for ac_prog in comm
5495do
5496  # Extract the first word of "$ac_prog", so it can be a program name with args.
5497set dummy $ac_prog; ac_word=$2
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5499$as_echo_n "checking for $ac_word... " >&6; }
5500if ${ac_cv_path_COMM+:} false; then :
5501  $as_echo_n "(cached) " >&6
5502else
5503  case $COMM in
5504  [\\/]* | ?:[\\/]*)
5505  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5506  ;;
5507  *)
5508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5509for as_dir in $PATH
5510do
5511  IFS=$as_save_IFS
5512  test -z "$as_dir" && as_dir=.
5513    for ac_exec_ext in '' $ac_executable_extensions; do
5514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5515    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5517    break 2
5518  fi
5519done
5520  done
5521IFS=$as_save_IFS
5522
5523  ;;
5524esac
5525fi
5526COMM=$ac_cv_path_COMM
5527if test -n "$COMM"; then
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5529$as_echo "$COMM" >&6; }
5530else
5531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5532$as_echo "no" >&6; }
5533fi
5534
5535
5536  test -n "$COMM" && break
5537done
5538
5539    else
5540      # If it succeeded, then it was overridden by the user. We will use it
5541      # for the tool.
5542
5543      # First remove it from the list of overridden variables, so we can test
5544      # for unknown variables in the end.
5545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5546
5547      # Check if the provided tool contains a complete path.
5548      tool_specified="$COMM"
5549      tool_basename="${tool_specified##*/}"
5550      if test "x$tool_basename" = "x$tool_specified"; then
5551        # A command without a complete path is provided, search $PATH.
5552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5553$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5554        # Extract the first word of "$tool_basename", so it can be a program name with args.
5555set dummy $tool_basename; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_path_COMM+:} false; then :
5559  $as_echo_n "(cached) " >&6
5560else
5561  case $COMM in
5562  [\\/]* | ?:[\\/]*)
5563  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5564  ;;
5565  *)
5566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567for as_dir in $PATH
5568do
5569  IFS=$as_save_IFS
5570  test -z "$as_dir" && as_dir=.
5571    for ac_exec_ext in '' $ac_executable_extensions; do
5572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5573    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575    break 2
5576  fi
5577done
5578  done
5579IFS=$as_save_IFS
5580
5581  ;;
5582esac
5583fi
5584COMM=$ac_cv_path_COMM
5585if test -n "$COMM"; then
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5587$as_echo "$COMM" >&6; }
5588else
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
5591fi
5592
5593
5594        if test "x$COMM" = x; then
5595          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5596        fi
5597      else
5598        # Otherwise we believe it is a complete path. Use it as it is.
5599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5600$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5602$as_echo_n "checking for COMM... " >&6; }
5603        if test ! -x "$tool_specified"; then
5604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5605$as_echo "not found" >&6; }
5606          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5607        fi
5608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5609$as_echo "$tool_specified" >&6; }
5610      fi
5611    fi
5612  fi
5613
5614
5615
5616  if test "x$COMM" = x; then
5617    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5618  fi
5619
5620
5621
5622
5623
5624  # Publish this variable in the help.
5625
5626
5627  if test "x$CP" = x; then
5628    # The variable is not set by user, try to locate tool using the code snippet
5629    for ac_prog in cp
5630do
5631  # Extract the first word of "$ac_prog", so it can be a program name with args.
5632set dummy $ac_prog; ac_word=$2
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5634$as_echo_n "checking for $ac_word... " >&6; }
5635if ${ac_cv_path_CP+:} false; then :
5636  $as_echo_n "(cached) " >&6
5637else
5638  case $CP in
5639  [\\/]* | ?:[\\/]*)
5640  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5641  ;;
5642  *)
5643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646  IFS=$as_save_IFS
5647  test -z "$as_dir" && as_dir=.
5648    for ac_exec_ext in '' $ac_executable_extensions; do
5649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652    break 2
5653  fi
5654done
5655  done
5656IFS=$as_save_IFS
5657
5658  ;;
5659esac
5660fi
5661CP=$ac_cv_path_CP
5662if test -n "$CP"; then
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5664$as_echo "$CP" >&6; }
5665else
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667$as_echo "no" >&6; }
5668fi
5669
5670
5671  test -n "$CP" && break
5672done
5673
5674  else
5675    # The variable is set, but is it from the command line or the environment?
5676
5677    # Try to remove the string !CP! from our list.
5678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5680      # If it failed, the variable was not from the command line. Ignore it,
5681      # but warn the user (except for BASH, which is always set by the calling BASH).
5682      if test "xCP" != xBASH; then
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5684$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5685      fi
5686      # Try to locate tool using the code snippet
5687      for ac_prog in cp
5688do
5689  # Extract the first word of "$ac_prog", so it can be a program name with args.
5690set dummy $ac_prog; ac_word=$2
5691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5692$as_echo_n "checking for $ac_word... " >&6; }
5693if ${ac_cv_path_CP+:} false; then :
5694  $as_echo_n "(cached) " >&6
5695else
5696  case $CP in
5697  [\\/]* | ?:[\\/]*)
5698  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5699  ;;
5700  *)
5701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702for as_dir in $PATH
5703do
5704  IFS=$as_save_IFS
5705  test -z "$as_dir" && as_dir=.
5706    for ac_exec_ext in '' $ac_executable_extensions; do
5707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5708    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5710    break 2
5711  fi
5712done
5713  done
5714IFS=$as_save_IFS
5715
5716  ;;
5717esac
5718fi
5719CP=$ac_cv_path_CP
5720if test -n "$CP"; then
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5722$as_echo "$CP" >&6; }
5723else
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
5726fi
5727
5728
5729  test -n "$CP" && break
5730done
5731
5732    else
5733      # If it succeeded, then it was overridden by the user. We will use it
5734      # for the tool.
5735
5736      # First remove it from the list of overridden variables, so we can test
5737      # for unknown variables in the end.
5738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5739
5740      # Check if the provided tool contains a complete path.
5741      tool_specified="$CP"
5742      tool_basename="${tool_specified##*/}"
5743      if test "x$tool_basename" = "x$tool_specified"; then
5744        # A command without a complete path is provided, search $PATH.
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5746$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5747        # Extract the first word of "$tool_basename", so it can be a program name with args.
5748set dummy $tool_basename; ac_word=$2
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
5751if ${ac_cv_path_CP+:} false; then :
5752  $as_echo_n "(cached) " >&6
5753else
5754  case $CP in
5755  [\\/]* | ?:[\\/]*)
5756  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5757  ;;
5758  *)
5759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762  IFS=$as_save_IFS
5763  test -z "$as_dir" && as_dir=.
5764    for ac_exec_ext in '' $ac_executable_extensions; do
5765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5766    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5768    break 2
5769  fi
5770done
5771  done
5772IFS=$as_save_IFS
5773
5774  ;;
5775esac
5776fi
5777CP=$ac_cv_path_CP
5778if test -n "$CP"; then
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5780$as_echo "$CP" >&6; }
5781else
5782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
5784fi
5785
5786
5787        if test "x$CP" = x; then
5788          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5789        fi
5790      else
5791        # Otherwise we believe it is a complete path. Use it as it is.
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5793$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5795$as_echo_n "checking for CP... " >&6; }
5796        if test ! -x "$tool_specified"; then
5797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5798$as_echo "not found" >&6; }
5799          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5800        fi
5801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5802$as_echo "$tool_specified" >&6; }
5803      fi
5804    fi
5805  fi
5806
5807
5808
5809  if test "x$CP" = x; then
5810    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5811  fi
5812
5813
5814
5815
5816
5817  # Publish this variable in the help.
5818
5819
5820  if test "x$CUT" = x; then
5821    # The variable is not set by user, try to locate tool using the code snippet
5822    for ac_prog in cut
5823do
5824  # Extract the first word of "$ac_prog", so it can be a program name with args.
5825set dummy $ac_prog; ac_word=$2
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5827$as_echo_n "checking for $ac_word... " >&6; }
5828if ${ac_cv_path_CUT+:} false; then :
5829  $as_echo_n "(cached) " >&6
5830else
5831  case $CUT in
5832  [\\/]* | ?:[\\/]*)
5833  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5834  ;;
5835  *)
5836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5837for as_dir in $PATH
5838do
5839  IFS=$as_save_IFS
5840  test -z "$as_dir" && as_dir=.
5841    for ac_exec_ext in '' $ac_executable_extensions; do
5842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5843    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5845    break 2
5846  fi
5847done
5848  done
5849IFS=$as_save_IFS
5850
5851  ;;
5852esac
5853fi
5854CUT=$ac_cv_path_CUT
5855if test -n "$CUT"; then
5856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5857$as_echo "$CUT" >&6; }
5858else
5859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5860$as_echo "no" >&6; }
5861fi
5862
5863
5864  test -n "$CUT" && break
5865done
5866
5867  else
5868    # The variable is set, but is it from the command line or the environment?
5869
5870    # Try to remove the string !CUT! from our list.
5871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5873      # If it failed, the variable was not from the command line. Ignore it,
5874      # but warn the user (except for BASH, which is always set by the calling BASH).
5875      if test "xCUT" != xBASH; then
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5877$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5878      fi
5879      # Try to locate tool using the code snippet
5880      for ac_prog in cut
5881do
5882  # Extract the first word of "$ac_prog", so it can be a program name with args.
5883set dummy $ac_prog; ac_word=$2
5884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885$as_echo_n "checking for $ac_word... " >&6; }
5886if ${ac_cv_path_CUT+:} false; then :
5887  $as_echo_n "(cached) " >&6
5888else
5889  case $CUT in
5890  [\\/]* | ?:[\\/]*)
5891  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5892  ;;
5893  *)
5894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5895for as_dir in $PATH
5896do
5897  IFS=$as_save_IFS
5898  test -z "$as_dir" && as_dir=.
5899    for ac_exec_ext in '' $ac_executable_extensions; do
5900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5901    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5903    break 2
5904  fi
5905done
5906  done
5907IFS=$as_save_IFS
5908
5909  ;;
5910esac
5911fi
5912CUT=$ac_cv_path_CUT
5913if test -n "$CUT"; then
5914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5915$as_echo "$CUT" >&6; }
5916else
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5918$as_echo "no" >&6; }
5919fi
5920
5921
5922  test -n "$CUT" && break
5923done
5924
5925    else
5926      # If it succeeded, then it was overridden by the user. We will use it
5927      # for the tool.
5928
5929      # First remove it from the list of overridden variables, so we can test
5930      # for unknown variables in the end.
5931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5932
5933      # Check if the provided tool contains a complete path.
5934      tool_specified="$CUT"
5935      tool_basename="${tool_specified##*/}"
5936      if test "x$tool_basename" = "x$tool_specified"; then
5937        # A command without a complete path is provided, search $PATH.
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5939$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5940        # Extract the first word of "$tool_basename", so it can be a program name with args.
5941set dummy $tool_basename; ac_word=$2
5942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5943$as_echo_n "checking for $ac_word... " >&6; }
5944if ${ac_cv_path_CUT+:} false; then :
5945  $as_echo_n "(cached) " >&6
5946else
5947  case $CUT in
5948  [\\/]* | ?:[\\/]*)
5949  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5950  ;;
5951  *)
5952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955  IFS=$as_save_IFS
5956  test -z "$as_dir" && as_dir=.
5957    for ac_exec_ext in '' $ac_executable_extensions; do
5958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5959    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961    break 2
5962  fi
5963done
5964  done
5965IFS=$as_save_IFS
5966
5967  ;;
5968esac
5969fi
5970CUT=$ac_cv_path_CUT
5971if test -n "$CUT"; then
5972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5973$as_echo "$CUT" >&6; }
5974else
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
5977fi
5978
5979
5980        if test "x$CUT" = x; then
5981          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5982        fi
5983      else
5984        # Otherwise we believe it is a complete path. Use it as it is.
5985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5986$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5988$as_echo_n "checking for CUT... " >&6; }
5989        if test ! -x "$tool_specified"; then
5990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5991$as_echo "not found" >&6; }
5992          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5993        fi
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5995$as_echo "$tool_specified" >&6; }
5996      fi
5997    fi
5998  fi
5999
6000
6001
6002  if test "x$CUT" = x; then
6003    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6004  fi
6005
6006
6007
6008
6009
6010  # Publish this variable in the help.
6011
6012
6013  if test "x$DATE" = x; then
6014    # The variable is not set by user, try to locate tool using the code snippet
6015    for ac_prog in date
6016do
6017  # Extract the first word of "$ac_prog", so it can be a program name with args.
6018set dummy $ac_prog; ac_word=$2
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
6021if ${ac_cv_path_DATE+:} false; then :
6022  $as_echo_n "(cached) " >&6
6023else
6024  case $DATE in
6025  [\\/]* | ?:[\\/]*)
6026  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6027  ;;
6028  *)
6029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6030for as_dir in $PATH
6031do
6032  IFS=$as_save_IFS
6033  test -z "$as_dir" && as_dir=.
6034    for ac_exec_ext in '' $ac_executable_extensions; do
6035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6036    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6038    break 2
6039  fi
6040done
6041  done
6042IFS=$as_save_IFS
6043
6044  ;;
6045esac
6046fi
6047DATE=$ac_cv_path_DATE
6048if test -n "$DATE"; then
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6050$as_echo "$DATE" >&6; }
6051else
6052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054fi
6055
6056
6057  test -n "$DATE" && break
6058done
6059
6060  else
6061    # The variable is set, but is it from the command line or the environment?
6062
6063    # Try to remove the string !DATE! from our list.
6064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6066      # If it failed, the variable was not from the command line. Ignore it,
6067      # but warn the user (except for BASH, which is always set by the calling BASH).
6068      if test "xDATE" != xBASH; then
6069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6070$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6071      fi
6072      # Try to locate tool using the code snippet
6073      for ac_prog in date
6074do
6075  # Extract the first word of "$ac_prog", so it can be a program name with args.
6076set dummy $ac_prog; ac_word=$2
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078$as_echo_n "checking for $ac_word... " >&6; }
6079if ${ac_cv_path_DATE+:} false; then :
6080  $as_echo_n "(cached) " >&6
6081else
6082  case $DATE in
6083  [\\/]* | ?:[\\/]*)
6084  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6085  ;;
6086  *)
6087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH
6089do
6090  IFS=$as_save_IFS
6091  test -z "$as_dir" && as_dir=.
6092    for ac_exec_ext in '' $ac_executable_extensions; do
6093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6094    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6096    break 2
6097  fi
6098done
6099  done
6100IFS=$as_save_IFS
6101
6102  ;;
6103esac
6104fi
6105DATE=$ac_cv_path_DATE
6106if test -n "$DATE"; then
6107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6108$as_echo "$DATE" >&6; }
6109else
6110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111$as_echo "no" >&6; }
6112fi
6113
6114
6115  test -n "$DATE" && break
6116done
6117
6118    else
6119      # If it succeeded, then it was overridden by the user. We will use it
6120      # for the tool.
6121
6122      # First remove it from the list of overridden variables, so we can test
6123      # for unknown variables in the end.
6124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6125
6126      # Check if the provided tool contains a complete path.
6127      tool_specified="$DATE"
6128      tool_basename="${tool_specified##*/}"
6129      if test "x$tool_basename" = "x$tool_specified"; then
6130        # A command without a complete path is provided, search $PATH.
6131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6132$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6133        # Extract the first word of "$tool_basename", so it can be a program name with args.
6134set dummy $tool_basename; ac_word=$2
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
6137if ${ac_cv_path_DATE+:} false; then :
6138  $as_echo_n "(cached) " >&6
6139else
6140  case $DATE in
6141  [\\/]* | ?:[\\/]*)
6142  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6143  ;;
6144  *)
6145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6146for as_dir in $PATH
6147do
6148  IFS=$as_save_IFS
6149  test -z "$as_dir" && as_dir=.
6150    for ac_exec_ext in '' $ac_executable_extensions; do
6151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6152    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6154    break 2
6155  fi
6156done
6157  done
6158IFS=$as_save_IFS
6159
6160  ;;
6161esac
6162fi
6163DATE=$ac_cv_path_DATE
6164if test -n "$DATE"; then
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6166$as_echo "$DATE" >&6; }
6167else
6168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173        if test "x$DATE" = x; then
6174          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6175        fi
6176      else
6177        # Otherwise we believe it is a complete path. Use it as it is.
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6179$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6181$as_echo_n "checking for DATE... " >&6; }
6182        if test ! -x "$tool_specified"; then
6183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6184$as_echo "not found" >&6; }
6185          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6186        fi
6187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6188$as_echo "$tool_specified" >&6; }
6189      fi
6190    fi
6191  fi
6192
6193
6194
6195  if test "x$DATE" = x; then
6196    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6197  fi
6198
6199
6200
6201
6202
6203  # Publish this variable in the help.
6204
6205
6206  if test "x$DIFF" = x; then
6207    # The variable is not set by user, try to locate tool using the code snippet
6208    for ac_prog in gdiff diff
6209do
6210  # Extract the first word of "$ac_prog", so it can be a program name with args.
6211set dummy $ac_prog; ac_word=$2
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6213$as_echo_n "checking for $ac_word... " >&6; }
6214if ${ac_cv_path_DIFF+:} false; then :
6215  $as_echo_n "(cached) " >&6
6216else
6217  case $DIFF in
6218  [\\/]* | ?:[\\/]*)
6219  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6220  ;;
6221  *)
6222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225  IFS=$as_save_IFS
6226  test -z "$as_dir" && as_dir=.
6227    for ac_exec_ext in '' $ac_executable_extensions; do
6228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6229    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231    break 2
6232  fi
6233done
6234  done
6235IFS=$as_save_IFS
6236
6237  ;;
6238esac
6239fi
6240DIFF=$ac_cv_path_DIFF
6241if test -n "$DIFF"; then
6242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6243$as_echo "$DIFF" >&6; }
6244else
6245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6246$as_echo "no" >&6; }
6247fi
6248
6249
6250  test -n "$DIFF" && break
6251done
6252
6253  else
6254    # The variable is set, but is it from the command line or the environment?
6255
6256    # Try to remove the string !DIFF! from our list.
6257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6259      # If it failed, the variable was not from the command line. Ignore it,
6260      # but warn the user (except for BASH, which is always set by the calling BASH).
6261      if test "xDIFF" != xBASH; then
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6263$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6264      fi
6265      # Try to locate tool using the code snippet
6266      for ac_prog in gdiff diff
6267do
6268  # Extract the first word of "$ac_prog", so it can be a program name with args.
6269set dummy $ac_prog; ac_word=$2
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6271$as_echo_n "checking for $ac_word... " >&6; }
6272if ${ac_cv_path_DIFF+:} false; then :
6273  $as_echo_n "(cached) " >&6
6274else
6275  case $DIFF in
6276  [\\/]* | ?:[\\/]*)
6277  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6278  ;;
6279  *)
6280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283  IFS=$as_save_IFS
6284  test -z "$as_dir" && as_dir=.
6285    for ac_exec_ext in '' $ac_executable_extensions; do
6286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6287    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289    break 2
6290  fi
6291done
6292  done
6293IFS=$as_save_IFS
6294
6295  ;;
6296esac
6297fi
6298DIFF=$ac_cv_path_DIFF
6299if test -n "$DIFF"; then
6300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6301$as_echo "$DIFF" >&6; }
6302else
6303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304$as_echo "no" >&6; }
6305fi
6306
6307
6308  test -n "$DIFF" && break
6309done
6310
6311    else
6312      # If it succeeded, then it was overridden by the user. We will use it
6313      # for the tool.
6314
6315      # First remove it from the list of overridden variables, so we can test
6316      # for unknown variables in the end.
6317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6318
6319      # Check if the provided tool contains a complete path.
6320      tool_specified="$DIFF"
6321      tool_basename="${tool_specified##*/}"
6322      if test "x$tool_basename" = "x$tool_specified"; then
6323        # A command without a complete path is provided, search $PATH.
6324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6325$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6326        # Extract the first word of "$tool_basename", so it can be a program name with args.
6327set dummy $tool_basename; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if ${ac_cv_path_DIFF+:} false; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $DIFF in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6345    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356DIFF=$ac_cv_path_DIFF
6357if test -n "$DIFF"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6359$as_echo "$DIFF" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366        if test "x$DIFF" = x; then
6367          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6368        fi
6369      else
6370        # Otherwise we believe it is a complete path. Use it as it is.
6371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6372$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6374$as_echo_n "checking for DIFF... " >&6; }
6375        if test ! -x "$tool_specified"; then
6376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6377$as_echo "not found" >&6; }
6378          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6379        fi
6380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6381$as_echo "$tool_specified" >&6; }
6382      fi
6383    fi
6384  fi
6385
6386
6387
6388  if test "x$DIFF" = x; then
6389    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6390  fi
6391
6392
6393
6394
6395
6396  # Publish this variable in the help.
6397
6398
6399  if test "x$DIRNAME" = x; then
6400    # The variable is not set by user, try to locate tool using the code snippet
6401    for ac_prog in dirname
6402do
6403  # Extract the first word of "$ac_prog", so it can be a program name with args.
6404set dummy $ac_prog; ac_word=$2
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406$as_echo_n "checking for $ac_word... " >&6; }
6407if ${ac_cv_path_DIRNAME+:} false; then :
6408  $as_echo_n "(cached) " >&6
6409else
6410  case $DIRNAME in
6411  [\\/]* | ?:[\\/]*)
6412  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6413  ;;
6414  *)
6415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416for as_dir in $PATH
6417do
6418  IFS=$as_save_IFS
6419  test -z "$as_dir" && as_dir=.
6420    for ac_exec_ext in '' $ac_executable_extensions; do
6421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6422    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424    break 2
6425  fi
6426done
6427  done
6428IFS=$as_save_IFS
6429
6430  ;;
6431esac
6432fi
6433DIRNAME=$ac_cv_path_DIRNAME
6434if test -n "$DIRNAME"; then
6435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6436$as_echo "$DIRNAME" >&6; }
6437else
6438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }
6440fi
6441
6442
6443  test -n "$DIRNAME" && break
6444done
6445
6446  else
6447    # The variable is set, but is it from the command line or the environment?
6448
6449    # Try to remove the string !DIRNAME! from our list.
6450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6452      # If it failed, the variable was not from the command line. Ignore it,
6453      # but warn the user (except for BASH, which is always set by the calling BASH).
6454      if test "xDIRNAME" != xBASH; then
6455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6456$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6457      fi
6458      # Try to locate tool using the code snippet
6459      for ac_prog in dirname
6460do
6461  # Extract the first word of "$ac_prog", so it can be a program name with args.
6462set dummy $ac_prog; ac_word=$2
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464$as_echo_n "checking for $ac_word... " >&6; }
6465if ${ac_cv_path_DIRNAME+:} false; then :
6466  $as_echo_n "(cached) " >&6
6467else
6468  case $DIRNAME in
6469  [\\/]* | ?:[\\/]*)
6470  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6471  ;;
6472  *)
6473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474for as_dir in $PATH
6475do
6476  IFS=$as_save_IFS
6477  test -z "$as_dir" && as_dir=.
6478    for ac_exec_ext in '' $ac_executable_extensions; do
6479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6480    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482    break 2
6483  fi
6484done
6485  done
6486IFS=$as_save_IFS
6487
6488  ;;
6489esac
6490fi
6491DIRNAME=$ac_cv_path_DIRNAME
6492if test -n "$DIRNAME"; then
6493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6494$as_echo "$DIRNAME" >&6; }
6495else
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500
6501  test -n "$DIRNAME" && break
6502done
6503
6504    else
6505      # If it succeeded, then it was overridden by the user. We will use it
6506      # for the tool.
6507
6508      # First remove it from the list of overridden variables, so we can test
6509      # for unknown variables in the end.
6510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6511
6512      # Check if the provided tool contains a complete path.
6513      tool_specified="$DIRNAME"
6514      tool_basename="${tool_specified##*/}"
6515      if test "x$tool_basename" = "x$tool_specified"; then
6516        # A command without a complete path is provided, search $PATH.
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6518$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6519        # Extract the first word of "$tool_basename", so it can be a program name with args.
6520set dummy $tool_basename; ac_word=$2
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6522$as_echo_n "checking for $ac_word... " >&6; }
6523if ${ac_cv_path_DIRNAME+:} false; then :
6524  $as_echo_n "(cached) " >&6
6525else
6526  case $DIRNAME in
6527  [\\/]* | ?:[\\/]*)
6528  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6529  ;;
6530  *)
6531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in $PATH
6533do
6534  IFS=$as_save_IFS
6535  test -z "$as_dir" && as_dir=.
6536    for ac_exec_ext in '' $ac_executable_extensions; do
6537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540    break 2
6541  fi
6542done
6543  done
6544IFS=$as_save_IFS
6545
6546  ;;
6547esac
6548fi
6549DIRNAME=$ac_cv_path_DIRNAME
6550if test -n "$DIRNAME"; then
6551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6552$as_echo "$DIRNAME" >&6; }
6553else
6554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }
6556fi
6557
6558
6559        if test "x$DIRNAME" = x; then
6560          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6561        fi
6562      else
6563        # Otherwise we believe it is a complete path. Use it as it is.
6564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6565$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6567$as_echo_n "checking for DIRNAME... " >&6; }
6568        if test ! -x "$tool_specified"; then
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6570$as_echo "not found" >&6; }
6571          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6572        fi
6573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6574$as_echo "$tool_specified" >&6; }
6575      fi
6576    fi
6577  fi
6578
6579
6580
6581  if test "x$DIRNAME" = x; then
6582    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6583  fi
6584
6585
6586
6587
6588
6589  # Publish this variable in the help.
6590
6591
6592  if test "x$ECHO" = x; then
6593    # The variable is not set by user, try to locate tool using the code snippet
6594    for ac_prog in echo
6595do
6596  # Extract the first word of "$ac_prog", so it can be a program name with args.
6597set dummy $ac_prog; ac_word=$2
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599$as_echo_n "checking for $ac_word... " >&6; }
6600if ${ac_cv_path_ECHO+:} false; then :
6601  $as_echo_n "(cached) " >&6
6602else
6603  case $ECHO in
6604  [\\/]* | ?:[\\/]*)
6605  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6606  ;;
6607  *)
6608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609for as_dir in $PATH
6610do
6611  IFS=$as_save_IFS
6612  test -z "$as_dir" && as_dir=.
6613    for ac_exec_ext in '' $ac_executable_extensions; do
6614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6615    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6617    break 2
6618  fi
6619done
6620  done
6621IFS=$as_save_IFS
6622
6623  ;;
6624esac
6625fi
6626ECHO=$ac_cv_path_ECHO
6627if test -n "$ECHO"; then
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6629$as_echo "$ECHO" >&6; }
6630else
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632$as_echo "no" >&6; }
6633fi
6634
6635
6636  test -n "$ECHO" && break
6637done
6638
6639  else
6640    # The variable is set, but is it from the command line or the environment?
6641
6642    # Try to remove the string !ECHO! from our list.
6643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6645      # If it failed, the variable was not from the command line. Ignore it,
6646      # but warn the user (except for BASH, which is always set by the calling BASH).
6647      if test "xECHO" != xBASH; then
6648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6649$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6650      fi
6651      # Try to locate tool using the code snippet
6652      for ac_prog in echo
6653do
6654  # Extract the first word of "$ac_prog", so it can be a program name with args.
6655set dummy $ac_prog; ac_word=$2
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657$as_echo_n "checking for $ac_word... " >&6; }
6658if ${ac_cv_path_ECHO+:} false; then :
6659  $as_echo_n "(cached) " >&6
6660else
6661  case $ECHO in
6662  [\\/]* | ?:[\\/]*)
6663  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6664  ;;
6665  *)
6666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6667for as_dir in $PATH
6668do
6669  IFS=$as_save_IFS
6670  test -z "$as_dir" && as_dir=.
6671    for ac_exec_ext in '' $ac_executable_extensions; do
6672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6673    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6675    break 2
6676  fi
6677done
6678  done
6679IFS=$as_save_IFS
6680
6681  ;;
6682esac
6683fi
6684ECHO=$ac_cv_path_ECHO
6685if test -n "$ECHO"; then
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6687$as_echo "$ECHO" >&6; }
6688else
6689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6690$as_echo "no" >&6; }
6691fi
6692
6693
6694  test -n "$ECHO" && break
6695done
6696
6697    else
6698      # If it succeeded, then it was overridden by the user. We will use it
6699      # for the tool.
6700
6701      # First remove it from the list of overridden variables, so we can test
6702      # for unknown variables in the end.
6703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6704
6705      # Check if the provided tool contains a complete path.
6706      tool_specified="$ECHO"
6707      tool_basename="${tool_specified##*/}"
6708      if test "x$tool_basename" = "x$tool_specified"; then
6709        # A command without a complete path is provided, search $PATH.
6710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6711$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6712        # Extract the first word of "$tool_basename", so it can be a program name with args.
6713set dummy $tool_basename; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_ECHO+:} false; then :
6717  $as_echo_n "(cached) " >&6
6718else
6719  case $ECHO in
6720  [\\/]* | ?:[\\/]*)
6721  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6722  ;;
6723  *)
6724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in $PATH
6726do
6727  IFS=$as_save_IFS
6728  test -z "$as_dir" && as_dir=.
6729    for ac_exec_ext in '' $ac_executable_extensions; do
6730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733    break 2
6734  fi
6735done
6736  done
6737IFS=$as_save_IFS
6738
6739  ;;
6740esac
6741fi
6742ECHO=$ac_cv_path_ECHO
6743if test -n "$ECHO"; then
6744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6745$as_echo "$ECHO" >&6; }
6746else
6747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749fi
6750
6751
6752        if test "x$ECHO" = x; then
6753          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6754        fi
6755      else
6756        # Otherwise we believe it is a complete path. Use it as it is.
6757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6758$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6760$as_echo_n "checking for ECHO... " >&6; }
6761        if test ! -x "$tool_specified"; then
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6763$as_echo "not found" >&6; }
6764          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6765        fi
6766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6767$as_echo "$tool_specified" >&6; }
6768      fi
6769    fi
6770  fi
6771
6772
6773
6774  if test "x$ECHO" = x; then
6775    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6776  fi
6777
6778
6779
6780
6781
6782  # Publish this variable in the help.
6783
6784
6785  if test "x$EXPR" = x; then
6786    # The variable is not set by user, try to locate tool using the code snippet
6787    for ac_prog in expr
6788do
6789  # Extract the first word of "$ac_prog", so it can be a program name with args.
6790set dummy $ac_prog; ac_word=$2
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6792$as_echo_n "checking for $ac_word... " >&6; }
6793if ${ac_cv_path_EXPR+:} false; then :
6794  $as_echo_n "(cached) " >&6
6795else
6796  case $EXPR in
6797  [\\/]* | ?:[\\/]*)
6798  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6799  ;;
6800  *)
6801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6802for as_dir in $PATH
6803do
6804  IFS=$as_save_IFS
6805  test -z "$as_dir" && as_dir=.
6806    for ac_exec_ext in '' $ac_executable_extensions; do
6807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6808    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6810    break 2
6811  fi
6812done
6813  done
6814IFS=$as_save_IFS
6815
6816  ;;
6817esac
6818fi
6819EXPR=$ac_cv_path_EXPR
6820if test -n "$EXPR"; then
6821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6822$as_echo "$EXPR" >&6; }
6823else
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6825$as_echo "no" >&6; }
6826fi
6827
6828
6829  test -n "$EXPR" && break
6830done
6831
6832  else
6833    # The variable is set, but is it from the command line or the environment?
6834
6835    # Try to remove the string !EXPR! from our list.
6836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6838      # If it failed, the variable was not from the command line. Ignore it,
6839      # but warn the user (except for BASH, which is always set by the calling BASH).
6840      if test "xEXPR" != xBASH; then
6841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6842$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6843      fi
6844      # Try to locate tool using the code snippet
6845      for ac_prog in expr
6846do
6847  # Extract the first word of "$ac_prog", so it can be a program name with args.
6848set dummy $ac_prog; ac_word=$2
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6850$as_echo_n "checking for $ac_word... " >&6; }
6851if ${ac_cv_path_EXPR+:} false; then :
6852  $as_echo_n "(cached) " >&6
6853else
6854  case $EXPR in
6855  [\\/]* | ?:[\\/]*)
6856  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6857  ;;
6858  *)
6859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6860for as_dir in $PATH
6861do
6862  IFS=$as_save_IFS
6863  test -z "$as_dir" && as_dir=.
6864    for ac_exec_ext in '' $ac_executable_extensions; do
6865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6866    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6868    break 2
6869  fi
6870done
6871  done
6872IFS=$as_save_IFS
6873
6874  ;;
6875esac
6876fi
6877EXPR=$ac_cv_path_EXPR
6878if test -n "$EXPR"; then
6879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6880$as_echo "$EXPR" >&6; }
6881else
6882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883$as_echo "no" >&6; }
6884fi
6885
6886
6887  test -n "$EXPR" && break
6888done
6889
6890    else
6891      # If it succeeded, then it was overridden by the user. We will use it
6892      # for the tool.
6893
6894      # First remove it from the list of overridden variables, so we can test
6895      # for unknown variables in the end.
6896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6897
6898      # Check if the provided tool contains a complete path.
6899      tool_specified="$EXPR"
6900      tool_basename="${tool_specified##*/}"
6901      if test "x$tool_basename" = "x$tool_specified"; then
6902        # A command without a complete path is provided, search $PATH.
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6904$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6905        # Extract the first word of "$tool_basename", so it can be a program name with args.
6906set dummy $tool_basename; ac_word=$2
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6908$as_echo_n "checking for $ac_word... " >&6; }
6909if ${ac_cv_path_EXPR+:} false; then :
6910  $as_echo_n "(cached) " >&6
6911else
6912  case $EXPR in
6913  [\\/]* | ?:[\\/]*)
6914  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6915  ;;
6916  *)
6917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6918for as_dir in $PATH
6919do
6920  IFS=$as_save_IFS
6921  test -z "$as_dir" && as_dir=.
6922    for ac_exec_ext in '' $ac_executable_extensions; do
6923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6924    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6926    break 2
6927  fi
6928done
6929  done
6930IFS=$as_save_IFS
6931
6932  ;;
6933esac
6934fi
6935EXPR=$ac_cv_path_EXPR
6936if test -n "$EXPR"; then
6937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6938$as_echo "$EXPR" >&6; }
6939else
6940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6941$as_echo "no" >&6; }
6942fi
6943
6944
6945        if test "x$EXPR" = x; then
6946          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6947        fi
6948      else
6949        # Otherwise we believe it is a complete path. Use it as it is.
6950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6951$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6953$as_echo_n "checking for EXPR... " >&6; }
6954        if test ! -x "$tool_specified"; then
6955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6956$as_echo "not found" >&6; }
6957          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6958        fi
6959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6960$as_echo "$tool_specified" >&6; }
6961      fi
6962    fi
6963  fi
6964
6965
6966
6967  if test "x$EXPR" = x; then
6968    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6969  fi
6970
6971
6972
6973
6974
6975  # Publish this variable in the help.
6976
6977
6978  if test "x$FILE" = x; then
6979    # The variable is not set by user, try to locate tool using the code snippet
6980    for ac_prog in file
6981do
6982  # Extract the first word of "$ac_prog", so it can be a program name with args.
6983set dummy $ac_prog; ac_word=$2
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6985$as_echo_n "checking for $ac_word... " >&6; }
6986if ${ac_cv_path_FILE+:} false; then :
6987  $as_echo_n "(cached) " >&6
6988else
6989  case $FILE in
6990  [\\/]* | ?:[\\/]*)
6991  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6992  ;;
6993  *)
6994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6995for as_dir in $PATH
6996do
6997  IFS=$as_save_IFS
6998  test -z "$as_dir" && as_dir=.
6999    for ac_exec_ext in '' $ac_executable_extensions; do
7000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7001    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7003    break 2
7004  fi
7005done
7006  done
7007IFS=$as_save_IFS
7008
7009  ;;
7010esac
7011fi
7012FILE=$ac_cv_path_FILE
7013if test -n "$FILE"; then
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7015$as_echo "$FILE" >&6; }
7016else
7017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7018$as_echo "no" >&6; }
7019fi
7020
7021
7022  test -n "$FILE" && break
7023done
7024
7025  else
7026    # The variable is set, but is it from the command line or the environment?
7027
7028    # Try to remove the string !FILE! from our list.
7029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7031      # If it failed, the variable was not from the command line. Ignore it,
7032      # but warn the user (except for BASH, which is always set by the calling BASH).
7033      if test "xFILE" != xBASH; then
7034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7035$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7036      fi
7037      # Try to locate tool using the code snippet
7038      for ac_prog in file
7039do
7040  # Extract the first word of "$ac_prog", so it can be a program name with args.
7041set dummy $ac_prog; ac_word=$2
7042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7043$as_echo_n "checking for $ac_word... " >&6; }
7044if ${ac_cv_path_FILE+:} false; then :
7045  $as_echo_n "(cached) " >&6
7046else
7047  case $FILE in
7048  [\\/]* | ?:[\\/]*)
7049  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7050  ;;
7051  *)
7052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7053for as_dir in $PATH
7054do
7055  IFS=$as_save_IFS
7056  test -z "$as_dir" && as_dir=.
7057    for ac_exec_ext in '' $ac_executable_extensions; do
7058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7059    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7061    break 2
7062  fi
7063done
7064  done
7065IFS=$as_save_IFS
7066
7067  ;;
7068esac
7069fi
7070FILE=$ac_cv_path_FILE
7071if test -n "$FILE"; then
7072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7073$as_echo "$FILE" >&6; }
7074else
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7076$as_echo "no" >&6; }
7077fi
7078
7079
7080  test -n "$FILE" && break
7081done
7082
7083    else
7084      # If it succeeded, then it was overridden by the user. We will use it
7085      # for the tool.
7086
7087      # First remove it from the list of overridden variables, so we can test
7088      # for unknown variables in the end.
7089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7090
7091      # Check if the provided tool contains a complete path.
7092      tool_specified="$FILE"
7093      tool_basename="${tool_specified##*/}"
7094      if test "x$tool_basename" = "x$tool_specified"; then
7095        # A command without a complete path is provided, search $PATH.
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7097$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7098        # Extract the first word of "$tool_basename", so it can be a program name with args.
7099set dummy $tool_basename; ac_word=$2
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7101$as_echo_n "checking for $ac_word... " >&6; }
7102if ${ac_cv_path_FILE+:} false; then :
7103  $as_echo_n "(cached) " >&6
7104else
7105  case $FILE in
7106  [\\/]* | ?:[\\/]*)
7107  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7108  ;;
7109  *)
7110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7111for as_dir in $PATH
7112do
7113  IFS=$as_save_IFS
7114  test -z "$as_dir" && as_dir=.
7115    for ac_exec_ext in '' $ac_executable_extensions; do
7116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7117    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7119    break 2
7120  fi
7121done
7122  done
7123IFS=$as_save_IFS
7124
7125  ;;
7126esac
7127fi
7128FILE=$ac_cv_path_FILE
7129if test -n "$FILE"; then
7130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7131$as_echo "$FILE" >&6; }
7132else
7133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7134$as_echo "no" >&6; }
7135fi
7136
7137
7138        if test "x$FILE" = x; then
7139          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7140        fi
7141      else
7142        # Otherwise we believe it is a complete path. Use it as it is.
7143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7144$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7146$as_echo_n "checking for FILE... " >&6; }
7147        if test ! -x "$tool_specified"; then
7148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7149$as_echo "not found" >&6; }
7150          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7151        fi
7152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7153$as_echo "$tool_specified" >&6; }
7154      fi
7155    fi
7156  fi
7157
7158
7159
7160  if test "x$FILE" = x; then
7161    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7162  fi
7163
7164
7165
7166
7167
7168  # Publish this variable in the help.
7169
7170
7171  if test "x$FIND" = x; then
7172    # The variable is not set by user, try to locate tool using the code snippet
7173    for ac_prog in find
7174do
7175  # Extract the first word of "$ac_prog", so it can be a program name with args.
7176set dummy $ac_prog; ac_word=$2
7177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7178$as_echo_n "checking for $ac_word... " >&6; }
7179if ${ac_cv_path_FIND+:} false; then :
7180  $as_echo_n "(cached) " >&6
7181else
7182  case $FIND in
7183  [\\/]* | ?:[\\/]*)
7184  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7185  ;;
7186  *)
7187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7188for as_dir in $PATH
7189do
7190  IFS=$as_save_IFS
7191  test -z "$as_dir" && as_dir=.
7192    for ac_exec_ext in '' $ac_executable_extensions; do
7193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7194    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7196    break 2
7197  fi
7198done
7199  done
7200IFS=$as_save_IFS
7201
7202  ;;
7203esac
7204fi
7205FIND=$ac_cv_path_FIND
7206if test -n "$FIND"; then
7207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7208$as_echo "$FIND" >&6; }
7209else
7210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7211$as_echo "no" >&6; }
7212fi
7213
7214
7215  test -n "$FIND" && break
7216done
7217
7218  else
7219    # The variable is set, but is it from the command line or the environment?
7220
7221    # Try to remove the string !FIND! from our list.
7222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7224      # If it failed, the variable was not from the command line. Ignore it,
7225      # but warn the user (except for BASH, which is always set by the calling BASH).
7226      if test "xFIND" != xBASH; then
7227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7228$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7229      fi
7230      # Try to locate tool using the code snippet
7231      for ac_prog in find
7232do
7233  # Extract the first word of "$ac_prog", so it can be a program name with args.
7234set dummy $ac_prog; ac_word=$2
7235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7236$as_echo_n "checking for $ac_word... " >&6; }
7237if ${ac_cv_path_FIND+:} false; then :
7238  $as_echo_n "(cached) " >&6
7239else
7240  case $FIND in
7241  [\\/]* | ?:[\\/]*)
7242  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7243  ;;
7244  *)
7245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7246for as_dir in $PATH
7247do
7248  IFS=$as_save_IFS
7249  test -z "$as_dir" && as_dir=.
7250    for ac_exec_ext in '' $ac_executable_extensions; do
7251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7252    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7254    break 2
7255  fi
7256done
7257  done
7258IFS=$as_save_IFS
7259
7260  ;;
7261esac
7262fi
7263FIND=$ac_cv_path_FIND
7264if test -n "$FIND"; then
7265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7266$as_echo "$FIND" >&6; }
7267else
7268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269$as_echo "no" >&6; }
7270fi
7271
7272
7273  test -n "$FIND" && break
7274done
7275
7276    else
7277      # If it succeeded, then it was overridden by the user. We will use it
7278      # for the tool.
7279
7280      # First remove it from the list of overridden variables, so we can test
7281      # for unknown variables in the end.
7282      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7283
7284      # Check if the provided tool contains a complete path.
7285      tool_specified="$FIND"
7286      tool_basename="${tool_specified##*/}"
7287      if test "x$tool_basename" = "x$tool_specified"; then
7288        # A command without a complete path is provided, search $PATH.
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7290$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7291        # Extract the first word of "$tool_basename", so it can be a program name with args.
7292set dummy $tool_basename; ac_word=$2
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
7295if ${ac_cv_path_FIND+:} false; then :
7296  $as_echo_n "(cached) " >&6
7297else
7298  case $FIND in
7299  [\\/]* | ?:[\\/]*)
7300  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7301  ;;
7302  *)
7303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  test -z "$as_dir" && as_dir=.
7308    for ac_exec_ext in '' $ac_executable_extensions; do
7309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312    break 2
7313  fi
7314done
7315  done
7316IFS=$as_save_IFS
7317
7318  ;;
7319esac
7320fi
7321FIND=$ac_cv_path_FIND
7322if test -n "$FIND"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7324$as_echo "$FIND" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331        if test "x$FIND" = x; then
7332          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7333        fi
7334      else
7335        # Otherwise we believe it is a complete path. Use it as it is.
7336        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7337$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7339$as_echo_n "checking for FIND... " >&6; }
7340        if test ! -x "$tool_specified"; then
7341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7342$as_echo "not found" >&6; }
7343          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7344        fi
7345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7346$as_echo "$tool_specified" >&6; }
7347      fi
7348    fi
7349  fi
7350
7351
7352
7353  if test "x$FIND" = x; then
7354    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7355  fi
7356
7357
7358
7359
7360
7361  # Publish this variable in the help.
7362
7363
7364  if test "x$HEAD" = x; then
7365    # The variable is not set by user, try to locate tool using the code snippet
7366    for ac_prog in head
7367do
7368  # Extract the first word of "$ac_prog", so it can be a program name with args.
7369set dummy $ac_prog; ac_word=$2
7370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7371$as_echo_n "checking for $ac_word... " >&6; }
7372if ${ac_cv_path_HEAD+:} false; then :
7373  $as_echo_n "(cached) " >&6
7374else
7375  case $HEAD in
7376  [\\/]* | ?:[\\/]*)
7377  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7378  ;;
7379  *)
7380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7381for as_dir in $PATH
7382do
7383  IFS=$as_save_IFS
7384  test -z "$as_dir" && as_dir=.
7385    for ac_exec_ext in '' $ac_executable_extensions; do
7386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7387    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7389    break 2
7390  fi
7391done
7392  done
7393IFS=$as_save_IFS
7394
7395  ;;
7396esac
7397fi
7398HEAD=$ac_cv_path_HEAD
7399if test -n "$HEAD"; then
7400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7401$as_echo "$HEAD" >&6; }
7402else
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404$as_echo "no" >&6; }
7405fi
7406
7407
7408  test -n "$HEAD" && break
7409done
7410
7411  else
7412    # The variable is set, but is it from the command line or the environment?
7413
7414    # Try to remove the string !HEAD! from our list.
7415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7417      # If it failed, the variable was not from the command line. Ignore it,
7418      # but warn the user (except for BASH, which is always set by the calling BASH).
7419      if test "xHEAD" != xBASH; then
7420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7421$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7422      fi
7423      # Try to locate tool using the code snippet
7424      for ac_prog in head
7425do
7426  # Extract the first word of "$ac_prog", so it can be a program name with args.
7427set dummy $ac_prog; ac_word=$2
7428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7429$as_echo_n "checking for $ac_word... " >&6; }
7430if ${ac_cv_path_HEAD+:} false; then :
7431  $as_echo_n "(cached) " >&6
7432else
7433  case $HEAD in
7434  [\\/]* | ?:[\\/]*)
7435  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7436  ;;
7437  *)
7438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7439for as_dir in $PATH
7440do
7441  IFS=$as_save_IFS
7442  test -z "$as_dir" && as_dir=.
7443    for ac_exec_ext in '' $ac_executable_extensions; do
7444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7445    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7447    break 2
7448  fi
7449done
7450  done
7451IFS=$as_save_IFS
7452
7453  ;;
7454esac
7455fi
7456HEAD=$ac_cv_path_HEAD
7457if test -n "$HEAD"; then
7458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7459$as_echo "$HEAD" >&6; }
7460else
7461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
7463fi
7464
7465
7466  test -n "$HEAD" && break
7467done
7468
7469    else
7470      # If it succeeded, then it was overridden by the user. We will use it
7471      # for the tool.
7472
7473      # First remove it from the list of overridden variables, so we can test
7474      # for unknown variables in the end.
7475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7476
7477      # Check if the provided tool contains a complete path.
7478      tool_specified="$HEAD"
7479      tool_basename="${tool_specified##*/}"
7480      if test "x$tool_basename" = "x$tool_specified"; then
7481        # A command without a complete path is provided, search $PATH.
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7483$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7484        # Extract the first word of "$tool_basename", so it can be a program name with args.
7485set dummy $tool_basename; ac_word=$2
7486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7487$as_echo_n "checking for $ac_word... " >&6; }
7488if ${ac_cv_path_HEAD+:} false; then :
7489  $as_echo_n "(cached) " >&6
7490else
7491  case $HEAD in
7492  [\\/]* | ?:[\\/]*)
7493  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7494  ;;
7495  *)
7496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497for as_dir in $PATH
7498do
7499  IFS=$as_save_IFS
7500  test -z "$as_dir" && as_dir=.
7501    for ac_exec_ext in '' $ac_executable_extensions; do
7502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7503    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7505    break 2
7506  fi
7507done
7508  done
7509IFS=$as_save_IFS
7510
7511  ;;
7512esac
7513fi
7514HEAD=$ac_cv_path_HEAD
7515if test -n "$HEAD"; then
7516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7517$as_echo "$HEAD" >&6; }
7518else
7519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7520$as_echo "no" >&6; }
7521fi
7522
7523
7524        if test "x$HEAD" = x; then
7525          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7526        fi
7527      else
7528        # Otherwise we believe it is a complete path. Use it as it is.
7529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7530$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7532$as_echo_n "checking for HEAD... " >&6; }
7533        if test ! -x "$tool_specified"; then
7534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7535$as_echo "not found" >&6; }
7536          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7537        fi
7538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7539$as_echo "$tool_specified" >&6; }
7540      fi
7541    fi
7542  fi
7543
7544
7545
7546  if test "x$HEAD" = x; then
7547    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7548  fi
7549
7550
7551
7552
7553
7554  # Publish this variable in the help.
7555
7556
7557  if test "x$LN" = x; then
7558    # The variable is not set by user, try to locate tool using the code snippet
7559    for ac_prog in ln
7560do
7561  # Extract the first word of "$ac_prog", so it can be a program name with args.
7562set dummy $ac_prog; ac_word=$2
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564$as_echo_n "checking for $ac_word... " >&6; }
7565if ${ac_cv_path_LN+:} false; then :
7566  $as_echo_n "(cached) " >&6
7567else
7568  case $LN in
7569  [\\/]* | ?:[\\/]*)
7570  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7571  ;;
7572  *)
7573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7574for as_dir in $PATH
7575do
7576  IFS=$as_save_IFS
7577  test -z "$as_dir" && as_dir=.
7578    for ac_exec_ext in '' $ac_executable_extensions; do
7579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7580    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7582    break 2
7583  fi
7584done
7585  done
7586IFS=$as_save_IFS
7587
7588  ;;
7589esac
7590fi
7591LN=$ac_cv_path_LN
7592if test -n "$LN"; then
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7594$as_echo "$LN" >&6; }
7595else
7596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
7598fi
7599
7600
7601  test -n "$LN" && break
7602done
7603
7604  else
7605    # The variable is set, but is it from the command line or the environment?
7606
7607    # Try to remove the string !LN! from our list.
7608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7610      # If it failed, the variable was not from the command line. Ignore it,
7611      # but warn the user (except for BASH, which is always set by the calling BASH).
7612      if test "xLN" != xBASH; then
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7614$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7615      fi
7616      # Try to locate tool using the code snippet
7617      for ac_prog in ln
7618do
7619  # Extract the first word of "$ac_prog", so it can be a program name with args.
7620set dummy $ac_prog; ac_word=$2
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7622$as_echo_n "checking for $ac_word... " >&6; }
7623if ${ac_cv_path_LN+:} false; then :
7624  $as_echo_n "(cached) " >&6
7625else
7626  case $LN in
7627  [\\/]* | ?:[\\/]*)
7628  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7629  ;;
7630  *)
7631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7632for as_dir in $PATH
7633do
7634  IFS=$as_save_IFS
7635  test -z "$as_dir" && as_dir=.
7636    for ac_exec_ext in '' $ac_executable_extensions; do
7637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7638    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7640    break 2
7641  fi
7642done
7643  done
7644IFS=$as_save_IFS
7645
7646  ;;
7647esac
7648fi
7649LN=$ac_cv_path_LN
7650if test -n "$LN"; then
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7652$as_echo "$LN" >&6; }
7653else
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7655$as_echo "no" >&6; }
7656fi
7657
7658
7659  test -n "$LN" && break
7660done
7661
7662    else
7663      # If it succeeded, then it was overridden by the user. We will use it
7664      # for the tool.
7665
7666      # First remove it from the list of overridden variables, so we can test
7667      # for unknown variables in the end.
7668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7669
7670      # Check if the provided tool contains a complete path.
7671      tool_specified="$LN"
7672      tool_basename="${tool_specified##*/}"
7673      if test "x$tool_basename" = "x$tool_specified"; then
7674        # A command without a complete path is provided, search $PATH.
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7676$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7677        # Extract the first word of "$tool_basename", so it can be a program name with args.
7678set dummy $tool_basename; ac_word=$2
7679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7680$as_echo_n "checking for $ac_word... " >&6; }
7681if ${ac_cv_path_LN+:} false; then :
7682  $as_echo_n "(cached) " >&6
7683else
7684  case $LN in
7685  [\\/]* | ?:[\\/]*)
7686  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7687  ;;
7688  *)
7689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7690for as_dir in $PATH
7691do
7692  IFS=$as_save_IFS
7693  test -z "$as_dir" && as_dir=.
7694    for ac_exec_ext in '' $ac_executable_extensions; do
7695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7696    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7698    break 2
7699  fi
7700done
7701  done
7702IFS=$as_save_IFS
7703
7704  ;;
7705esac
7706fi
7707LN=$ac_cv_path_LN
7708if test -n "$LN"; then
7709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7710$as_echo "$LN" >&6; }
7711else
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7713$as_echo "no" >&6; }
7714fi
7715
7716
7717        if test "x$LN" = x; then
7718          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7719        fi
7720      else
7721        # Otherwise we believe it is a complete path. Use it as it is.
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7723$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7725$as_echo_n "checking for LN... " >&6; }
7726        if test ! -x "$tool_specified"; then
7727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7728$as_echo "not found" >&6; }
7729          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7730        fi
7731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7732$as_echo "$tool_specified" >&6; }
7733      fi
7734    fi
7735  fi
7736
7737
7738
7739  if test "x$LN" = x; then
7740    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7741  fi
7742
7743
7744
7745
7746
7747  # Publish this variable in the help.
7748
7749
7750  if test "x$LS" = x; then
7751    # The variable is not set by user, try to locate tool using the code snippet
7752    for ac_prog in ls
7753do
7754  # Extract the first word of "$ac_prog", so it can be a program name with args.
7755set dummy $ac_prog; ac_word=$2
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7757$as_echo_n "checking for $ac_word... " >&6; }
7758if ${ac_cv_path_LS+:} false; then :
7759  $as_echo_n "(cached) " >&6
7760else
7761  case $LS in
7762  [\\/]* | ?:[\\/]*)
7763  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7764  ;;
7765  *)
7766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767for as_dir in $PATH
7768do
7769  IFS=$as_save_IFS
7770  test -z "$as_dir" && as_dir=.
7771    for ac_exec_ext in '' $ac_executable_extensions; do
7772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775    break 2
7776  fi
7777done
7778  done
7779IFS=$as_save_IFS
7780
7781  ;;
7782esac
7783fi
7784LS=$ac_cv_path_LS
7785if test -n "$LS"; then
7786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7787$as_echo "$LS" >&6; }
7788else
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7790$as_echo "no" >&6; }
7791fi
7792
7793
7794  test -n "$LS" && break
7795done
7796
7797  else
7798    # The variable is set, but is it from the command line or the environment?
7799
7800    # Try to remove the string !LS! from our list.
7801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7803      # If it failed, the variable was not from the command line. Ignore it,
7804      # but warn the user (except for BASH, which is always set by the calling BASH).
7805      if test "xLS" != xBASH; then
7806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7807$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7808      fi
7809      # Try to locate tool using the code snippet
7810      for ac_prog in ls
7811do
7812  # Extract the first word of "$ac_prog", so it can be a program name with args.
7813set dummy $ac_prog; ac_word=$2
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7815$as_echo_n "checking for $ac_word... " >&6; }
7816if ${ac_cv_path_LS+:} false; then :
7817  $as_echo_n "(cached) " >&6
7818else
7819  case $LS in
7820  [\\/]* | ?:[\\/]*)
7821  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7822  ;;
7823  *)
7824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7825for as_dir in $PATH
7826do
7827  IFS=$as_save_IFS
7828  test -z "$as_dir" && as_dir=.
7829    for ac_exec_ext in '' $ac_executable_extensions; do
7830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7831    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7833    break 2
7834  fi
7835done
7836  done
7837IFS=$as_save_IFS
7838
7839  ;;
7840esac
7841fi
7842LS=$ac_cv_path_LS
7843if test -n "$LS"; then
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7845$as_echo "$LS" >&6; }
7846else
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848$as_echo "no" >&6; }
7849fi
7850
7851
7852  test -n "$LS" && break
7853done
7854
7855    else
7856      # If it succeeded, then it was overridden by the user. We will use it
7857      # for the tool.
7858
7859      # First remove it from the list of overridden variables, so we can test
7860      # for unknown variables in the end.
7861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7862
7863      # Check if the provided tool contains a complete path.
7864      tool_specified="$LS"
7865      tool_basename="${tool_specified##*/}"
7866      if test "x$tool_basename" = "x$tool_specified"; then
7867        # A command without a complete path is provided, search $PATH.
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7869$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7870        # Extract the first word of "$tool_basename", so it can be a program name with args.
7871set dummy $tool_basename; ac_word=$2
7872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7873$as_echo_n "checking for $ac_word... " >&6; }
7874if ${ac_cv_path_LS+:} false; then :
7875  $as_echo_n "(cached) " >&6
7876else
7877  case $LS in
7878  [\\/]* | ?:[\\/]*)
7879  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7880  ;;
7881  *)
7882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7883for as_dir in $PATH
7884do
7885  IFS=$as_save_IFS
7886  test -z "$as_dir" && as_dir=.
7887    for ac_exec_ext in '' $ac_executable_extensions; do
7888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7889    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7891    break 2
7892  fi
7893done
7894  done
7895IFS=$as_save_IFS
7896
7897  ;;
7898esac
7899fi
7900LS=$ac_cv_path_LS
7901if test -n "$LS"; then
7902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7903$as_echo "$LS" >&6; }
7904else
7905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7906$as_echo "no" >&6; }
7907fi
7908
7909
7910        if test "x$LS" = x; then
7911          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7912        fi
7913      else
7914        # Otherwise we believe it is a complete path. Use it as it is.
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7916$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7918$as_echo_n "checking for LS... " >&6; }
7919        if test ! -x "$tool_specified"; then
7920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7921$as_echo "not found" >&6; }
7922          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7923        fi
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7925$as_echo "$tool_specified" >&6; }
7926      fi
7927    fi
7928  fi
7929
7930
7931
7932  if test "x$LS" = x; then
7933    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7934  fi
7935
7936
7937
7938
7939
7940  # Publish this variable in the help.
7941
7942
7943  if test "x$MKDIR" = x; then
7944    # The variable is not set by user, try to locate tool using the code snippet
7945    for ac_prog in mkdir
7946do
7947  # Extract the first word of "$ac_prog", so it can be a program name with args.
7948set dummy $ac_prog; ac_word=$2
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7950$as_echo_n "checking for $ac_word... " >&6; }
7951if ${ac_cv_path_MKDIR+:} false; then :
7952  $as_echo_n "(cached) " >&6
7953else
7954  case $MKDIR in
7955  [\\/]* | ?:[\\/]*)
7956  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7957  ;;
7958  *)
7959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7960for as_dir in $PATH
7961do
7962  IFS=$as_save_IFS
7963  test -z "$as_dir" && as_dir=.
7964    for ac_exec_ext in '' $ac_executable_extensions; do
7965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7966    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7968    break 2
7969  fi
7970done
7971  done
7972IFS=$as_save_IFS
7973
7974  ;;
7975esac
7976fi
7977MKDIR=$ac_cv_path_MKDIR
7978if test -n "$MKDIR"; then
7979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7980$as_echo "$MKDIR" >&6; }
7981else
7982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7983$as_echo "no" >&6; }
7984fi
7985
7986
7987  test -n "$MKDIR" && break
7988done
7989
7990  else
7991    # The variable is set, but is it from the command line or the environment?
7992
7993    # Try to remove the string !MKDIR! from our list.
7994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7996      # If it failed, the variable was not from the command line. Ignore it,
7997      # but warn the user (except for BASH, which is always set by the calling BASH).
7998      if test "xMKDIR" != xBASH; then
7999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8000$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8001      fi
8002      # Try to locate tool using the code snippet
8003      for ac_prog in mkdir
8004do
8005  # Extract the first word of "$ac_prog", so it can be a program name with args.
8006set dummy $ac_prog; ac_word=$2
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8008$as_echo_n "checking for $ac_word... " >&6; }
8009if ${ac_cv_path_MKDIR+:} false; then :
8010  $as_echo_n "(cached) " >&6
8011else
8012  case $MKDIR in
8013  [\\/]* | ?:[\\/]*)
8014  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8015  ;;
8016  *)
8017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8018for as_dir in $PATH
8019do
8020  IFS=$as_save_IFS
8021  test -z "$as_dir" && as_dir=.
8022    for ac_exec_ext in '' $ac_executable_extensions; do
8023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8024    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8026    break 2
8027  fi
8028done
8029  done
8030IFS=$as_save_IFS
8031
8032  ;;
8033esac
8034fi
8035MKDIR=$ac_cv_path_MKDIR
8036if test -n "$MKDIR"; then
8037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8038$as_echo "$MKDIR" >&6; }
8039else
8040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041$as_echo "no" >&6; }
8042fi
8043
8044
8045  test -n "$MKDIR" && break
8046done
8047
8048    else
8049      # If it succeeded, then it was overridden by the user. We will use it
8050      # for the tool.
8051
8052      # First remove it from the list of overridden variables, so we can test
8053      # for unknown variables in the end.
8054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8055
8056      # Check if the provided tool contains a complete path.
8057      tool_specified="$MKDIR"
8058      tool_basename="${tool_specified##*/}"
8059      if test "x$tool_basename" = "x$tool_specified"; then
8060        # A command without a complete path is provided, search $PATH.
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8062$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8063        # Extract the first word of "$tool_basename", so it can be a program name with args.
8064set dummy $tool_basename; ac_word=$2
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066$as_echo_n "checking for $ac_word... " >&6; }
8067if ${ac_cv_path_MKDIR+:} false; then :
8068  $as_echo_n "(cached) " >&6
8069else
8070  case $MKDIR in
8071  [\\/]* | ?:[\\/]*)
8072  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8073  ;;
8074  *)
8075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076for as_dir in $PATH
8077do
8078  IFS=$as_save_IFS
8079  test -z "$as_dir" && as_dir=.
8080    for ac_exec_ext in '' $ac_executable_extensions; do
8081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084    break 2
8085  fi
8086done
8087  done
8088IFS=$as_save_IFS
8089
8090  ;;
8091esac
8092fi
8093MKDIR=$ac_cv_path_MKDIR
8094if test -n "$MKDIR"; then
8095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8096$as_echo "$MKDIR" >&6; }
8097else
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099$as_echo "no" >&6; }
8100fi
8101
8102
8103        if test "x$MKDIR" = x; then
8104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8105        fi
8106      else
8107        # Otherwise we believe it is a complete path. Use it as it is.
8108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8109$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8111$as_echo_n "checking for MKDIR... " >&6; }
8112        if test ! -x "$tool_specified"; then
8113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8114$as_echo "not found" >&6; }
8115          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8116        fi
8117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8118$as_echo "$tool_specified" >&6; }
8119      fi
8120    fi
8121  fi
8122
8123
8124
8125  if test "x$MKDIR" = x; then
8126    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8127  fi
8128
8129
8130
8131
8132
8133  # Publish this variable in the help.
8134
8135
8136  if test "x$MKTEMP" = x; then
8137    # The variable is not set by user, try to locate tool using the code snippet
8138    for ac_prog in mktemp
8139do
8140  # Extract the first word of "$ac_prog", so it can be a program name with args.
8141set dummy $ac_prog; ac_word=$2
8142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8143$as_echo_n "checking for $ac_word... " >&6; }
8144if ${ac_cv_path_MKTEMP+:} false; then :
8145  $as_echo_n "(cached) " >&6
8146else
8147  case $MKTEMP in
8148  [\\/]* | ?:[\\/]*)
8149  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8150  ;;
8151  *)
8152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8153for as_dir in $PATH
8154do
8155  IFS=$as_save_IFS
8156  test -z "$as_dir" && as_dir=.
8157    for ac_exec_ext in '' $ac_executable_extensions; do
8158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8159    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8161    break 2
8162  fi
8163done
8164  done
8165IFS=$as_save_IFS
8166
8167  ;;
8168esac
8169fi
8170MKTEMP=$ac_cv_path_MKTEMP
8171if test -n "$MKTEMP"; then
8172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8173$as_echo "$MKTEMP" >&6; }
8174else
8175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8176$as_echo "no" >&6; }
8177fi
8178
8179
8180  test -n "$MKTEMP" && break
8181done
8182
8183  else
8184    # The variable is set, but is it from the command line or the environment?
8185
8186    # Try to remove the string !MKTEMP! from our list.
8187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8189      # If it failed, the variable was not from the command line. Ignore it,
8190      # but warn the user (except for BASH, which is always set by the calling BASH).
8191      if test "xMKTEMP" != xBASH; then
8192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8193$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8194      fi
8195      # Try to locate tool using the code snippet
8196      for ac_prog in mktemp
8197do
8198  # Extract the first word of "$ac_prog", so it can be a program name with args.
8199set dummy $ac_prog; ac_word=$2
8200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8201$as_echo_n "checking for $ac_word... " >&6; }
8202if ${ac_cv_path_MKTEMP+:} false; then :
8203  $as_echo_n "(cached) " >&6
8204else
8205  case $MKTEMP in
8206  [\\/]* | ?:[\\/]*)
8207  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8208  ;;
8209  *)
8210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8211for as_dir in $PATH
8212do
8213  IFS=$as_save_IFS
8214  test -z "$as_dir" && as_dir=.
8215    for ac_exec_ext in '' $ac_executable_extensions; do
8216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8217    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8219    break 2
8220  fi
8221done
8222  done
8223IFS=$as_save_IFS
8224
8225  ;;
8226esac
8227fi
8228MKTEMP=$ac_cv_path_MKTEMP
8229if test -n "$MKTEMP"; then
8230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8231$as_echo "$MKTEMP" >&6; }
8232else
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8234$as_echo "no" >&6; }
8235fi
8236
8237
8238  test -n "$MKTEMP" && break
8239done
8240
8241    else
8242      # If it succeeded, then it was overridden by the user. We will use it
8243      # for the tool.
8244
8245      # First remove it from the list of overridden variables, so we can test
8246      # for unknown variables in the end.
8247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8248
8249      # Check if the provided tool contains a complete path.
8250      tool_specified="$MKTEMP"
8251      tool_basename="${tool_specified##*/}"
8252      if test "x$tool_basename" = "x$tool_specified"; then
8253        # A command without a complete path is provided, search $PATH.
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8255$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8256        # Extract the first word of "$tool_basename", so it can be a program name with args.
8257set dummy $tool_basename; ac_word=$2
8258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8259$as_echo_n "checking for $ac_word... " >&6; }
8260if ${ac_cv_path_MKTEMP+:} false; then :
8261  $as_echo_n "(cached) " >&6
8262else
8263  case $MKTEMP in
8264  [\\/]* | ?:[\\/]*)
8265  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8266  ;;
8267  *)
8268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8269for as_dir in $PATH
8270do
8271  IFS=$as_save_IFS
8272  test -z "$as_dir" && as_dir=.
8273    for ac_exec_ext in '' $ac_executable_extensions; do
8274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8275    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8277    break 2
8278  fi
8279done
8280  done
8281IFS=$as_save_IFS
8282
8283  ;;
8284esac
8285fi
8286MKTEMP=$ac_cv_path_MKTEMP
8287if test -n "$MKTEMP"; then
8288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8289$as_echo "$MKTEMP" >&6; }
8290else
8291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292$as_echo "no" >&6; }
8293fi
8294
8295
8296        if test "x$MKTEMP" = x; then
8297          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8298        fi
8299      else
8300        # Otherwise we believe it is a complete path. Use it as it is.
8301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8302$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8304$as_echo_n "checking for MKTEMP... " >&6; }
8305        if test ! -x "$tool_specified"; then
8306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8307$as_echo "not found" >&6; }
8308          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8309        fi
8310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8311$as_echo "$tool_specified" >&6; }
8312      fi
8313    fi
8314  fi
8315
8316
8317
8318  if test "x$MKTEMP" = x; then
8319    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8320  fi
8321
8322
8323
8324
8325
8326  # Publish this variable in the help.
8327
8328
8329  if test "x$MV" = x; then
8330    # The variable is not set by user, try to locate tool using the code snippet
8331    for ac_prog in mv
8332do
8333  # Extract the first word of "$ac_prog", so it can be a program name with args.
8334set dummy $ac_prog; ac_word=$2
8335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8336$as_echo_n "checking for $ac_word... " >&6; }
8337if ${ac_cv_path_MV+:} false; then :
8338  $as_echo_n "(cached) " >&6
8339else
8340  case $MV in
8341  [\\/]* | ?:[\\/]*)
8342  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8343  ;;
8344  *)
8345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8346for as_dir in $PATH
8347do
8348  IFS=$as_save_IFS
8349  test -z "$as_dir" && as_dir=.
8350    for ac_exec_ext in '' $ac_executable_extensions; do
8351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8352    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8354    break 2
8355  fi
8356done
8357  done
8358IFS=$as_save_IFS
8359
8360  ;;
8361esac
8362fi
8363MV=$ac_cv_path_MV
8364if test -n "$MV"; then
8365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8366$as_echo "$MV" >&6; }
8367else
8368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369$as_echo "no" >&6; }
8370fi
8371
8372
8373  test -n "$MV" && break
8374done
8375
8376  else
8377    # The variable is set, but is it from the command line or the environment?
8378
8379    # Try to remove the string !MV! from our list.
8380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8382      # If it failed, the variable was not from the command line. Ignore it,
8383      # but warn the user (except for BASH, which is always set by the calling BASH).
8384      if test "xMV" != xBASH; then
8385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8386$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8387      fi
8388      # Try to locate tool using the code snippet
8389      for ac_prog in mv
8390do
8391  # Extract the first word of "$ac_prog", so it can be a program name with args.
8392set dummy $ac_prog; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if ${ac_cv_path_MV+:} false; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $MV in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421MV=$ac_cv_path_MV
8422if test -n "$MV"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8424$as_echo "$MV" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431  test -n "$MV" && break
8432done
8433
8434    else
8435      # If it succeeded, then it was overridden by the user. We will use it
8436      # for the tool.
8437
8438      # First remove it from the list of overridden variables, so we can test
8439      # for unknown variables in the end.
8440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8441
8442      # Check if the provided tool contains a complete path.
8443      tool_specified="$MV"
8444      tool_basename="${tool_specified##*/}"
8445      if test "x$tool_basename" = "x$tool_specified"; then
8446        # A command without a complete path is provided, search $PATH.
8447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8448$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8449        # Extract the first word of "$tool_basename", so it can be a program name with args.
8450set dummy $tool_basename; ac_word=$2
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452$as_echo_n "checking for $ac_word... " >&6; }
8453if ${ac_cv_path_MV+:} false; then :
8454  $as_echo_n "(cached) " >&6
8455else
8456  case $MV in
8457  [\\/]* | ?:[\\/]*)
8458  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8459  ;;
8460  *)
8461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462for as_dir in $PATH
8463do
8464  IFS=$as_save_IFS
8465  test -z "$as_dir" && as_dir=.
8466    for ac_exec_ext in '' $ac_executable_extensions; do
8467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8468    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470    break 2
8471  fi
8472done
8473  done
8474IFS=$as_save_IFS
8475
8476  ;;
8477esac
8478fi
8479MV=$ac_cv_path_MV
8480if test -n "$MV"; then
8481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8482$as_echo "$MV" >&6; }
8483else
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
8486fi
8487
8488
8489        if test "x$MV" = x; then
8490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8491        fi
8492      else
8493        # Otherwise we believe it is a complete path. Use it as it is.
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8495$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8497$as_echo_n "checking for MV... " >&6; }
8498        if test ! -x "$tool_specified"; then
8499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8500$as_echo "not found" >&6; }
8501          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8502        fi
8503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8504$as_echo "$tool_specified" >&6; }
8505      fi
8506    fi
8507  fi
8508
8509
8510
8511  if test "x$MV" = x; then
8512    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8513  fi
8514
8515
8516
8517
8518
8519  # Publish this variable in the help.
8520
8521
8522  if test "x$NAWK" = x; then
8523    # The variable is not set by user, try to locate tool using the code snippet
8524    for ac_prog in nawk gawk awk
8525do
8526  # Extract the first word of "$ac_prog", so it can be a program name with args.
8527set dummy $ac_prog; ac_word=$2
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8529$as_echo_n "checking for $ac_word... " >&6; }
8530if ${ac_cv_path_NAWK+:} false; then :
8531  $as_echo_n "(cached) " >&6
8532else
8533  case $NAWK in
8534  [\\/]* | ?:[\\/]*)
8535  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8536  ;;
8537  *)
8538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8539for as_dir in $PATH
8540do
8541  IFS=$as_save_IFS
8542  test -z "$as_dir" && as_dir=.
8543    for ac_exec_ext in '' $ac_executable_extensions; do
8544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8545    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8547    break 2
8548  fi
8549done
8550  done
8551IFS=$as_save_IFS
8552
8553  ;;
8554esac
8555fi
8556NAWK=$ac_cv_path_NAWK
8557if test -n "$NAWK"; then
8558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8559$as_echo "$NAWK" >&6; }
8560else
8561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8562$as_echo "no" >&6; }
8563fi
8564
8565
8566  test -n "$NAWK" && break
8567done
8568
8569  else
8570    # The variable is set, but is it from the command line or the environment?
8571
8572    # Try to remove the string !NAWK! from our list.
8573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8575      # If it failed, the variable was not from the command line. Ignore it,
8576      # but warn the user (except for BASH, which is always set by the calling BASH).
8577      if test "xNAWK" != xBASH; then
8578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8579$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8580      fi
8581      # Try to locate tool using the code snippet
8582      for ac_prog in nawk gawk awk
8583do
8584  # Extract the first word of "$ac_prog", so it can be a program name with args.
8585set dummy $ac_prog; ac_word=$2
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587$as_echo_n "checking for $ac_word... " >&6; }
8588if ${ac_cv_path_NAWK+:} false; then :
8589  $as_echo_n "(cached) " >&6
8590else
8591  case $NAWK in
8592  [\\/]* | ?:[\\/]*)
8593  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8594  ;;
8595  *)
8596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8597for as_dir in $PATH
8598do
8599  IFS=$as_save_IFS
8600  test -z "$as_dir" && as_dir=.
8601    for ac_exec_ext in '' $ac_executable_extensions; do
8602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8603    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8605    break 2
8606  fi
8607done
8608  done
8609IFS=$as_save_IFS
8610
8611  ;;
8612esac
8613fi
8614NAWK=$ac_cv_path_NAWK
8615if test -n "$NAWK"; then
8616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8617$as_echo "$NAWK" >&6; }
8618else
8619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8620$as_echo "no" >&6; }
8621fi
8622
8623
8624  test -n "$NAWK" && break
8625done
8626
8627    else
8628      # If it succeeded, then it was overridden by the user. We will use it
8629      # for the tool.
8630
8631      # First remove it from the list of overridden variables, so we can test
8632      # for unknown variables in the end.
8633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8634
8635      # Check if the provided tool contains a complete path.
8636      tool_specified="$NAWK"
8637      tool_basename="${tool_specified##*/}"
8638      if test "x$tool_basename" = "x$tool_specified"; then
8639        # A command without a complete path is provided, search $PATH.
8640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8641$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8642        # Extract the first word of "$tool_basename", so it can be a program name with args.
8643set dummy $tool_basename; ac_word=$2
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8645$as_echo_n "checking for $ac_word... " >&6; }
8646if ${ac_cv_path_NAWK+:} false; then :
8647  $as_echo_n "(cached) " >&6
8648else
8649  case $NAWK in
8650  [\\/]* | ?:[\\/]*)
8651  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8652  ;;
8653  *)
8654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8655for as_dir in $PATH
8656do
8657  IFS=$as_save_IFS
8658  test -z "$as_dir" && as_dir=.
8659    for ac_exec_ext in '' $ac_executable_extensions; do
8660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8661    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8663    break 2
8664  fi
8665done
8666  done
8667IFS=$as_save_IFS
8668
8669  ;;
8670esac
8671fi
8672NAWK=$ac_cv_path_NAWK
8673if test -n "$NAWK"; then
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8675$as_echo "$NAWK" >&6; }
8676else
8677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }
8679fi
8680
8681
8682        if test "x$NAWK" = x; then
8683          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8684        fi
8685      else
8686        # Otherwise we believe it is a complete path. Use it as it is.
8687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8688$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8690$as_echo_n "checking for NAWK... " >&6; }
8691        if test ! -x "$tool_specified"; then
8692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8693$as_echo "not found" >&6; }
8694          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8695        fi
8696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8697$as_echo "$tool_specified" >&6; }
8698      fi
8699    fi
8700  fi
8701
8702
8703
8704  if test "x$NAWK" = x; then
8705    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8706  fi
8707
8708
8709
8710
8711
8712  # Publish this variable in the help.
8713
8714
8715  if test "x$PRINTF" = x; then
8716    # The variable is not set by user, try to locate tool using the code snippet
8717    for ac_prog in printf
8718do
8719  # Extract the first word of "$ac_prog", so it can be a program name with args.
8720set dummy $ac_prog; ac_word=$2
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8722$as_echo_n "checking for $ac_word... " >&6; }
8723if ${ac_cv_path_PRINTF+:} false; then :
8724  $as_echo_n "(cached) " >&6
8725else
8726  case $PRINTF in
8727  [\\/]* | ?:[\\/]*)
8728  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8729  ;;
8730  *)
8731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734  IFS=$as_save_IFS
8735  test -z "$as_dir" && as_dir=.
8736    for ac_exec_ext in '' $ac_executable_extensions; do
8737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740    break 2
8741  fi
8742done
8743  done
8744IFS=$as_save_IFS
8745
8746  ;;
8747esac
8748fi
8749PRINTF=$ac_cv_path_PRINTF
8750if test -n "$PRINTF"; then
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8752$as_echo "$PRINTF" >&6; }
8753else
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8755$as_echo "no" >&6; }
8756fi
8757
8758
8759  test -n "$PRINTF" && break
8760done
8761
8762  else
8763    # The variable is set, but is it from the command line or the environment?
8764
8765    # Try to remove the string !PRINTF! from our list.
8766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8768      # If it failed, the variable was not from the command line. Ignore it,
8769      # but warn the user (except for BASH, which is always set by the calling BASH).
8770      if test "xPRINTF" != xBASH; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8772$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8773      fi
8774      # Try to locate tool using the code snippet
8775      for ac_prog in printf
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_PRINTF+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $PRINTF in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807PRINTF=$ac_cv_path_PRINTF
8808if test -n "$PRINTF"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8810$as_echo "$PRINTF" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$PRINTF" && break
8818done
8819
8820    else
8821      # If it succeeded, then it was overridden by the user. We will use it
8822      # for the tool.
8823
8824      # First remove it from the list of overridden variables, so we can test
8825      # for unknown variables in the end.
8826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8827
8828      # Check if the provided tool contains a complete path.
8829      tool_specified="$PRINTF"
8830      tool_basename="${tool_specified##*/}"
8831      if test "x$tool_basename" = "x$tool_specified"; then
8832        # A command without a complete path is provided, search $PATH.
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8834$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8835        # Extract the first word of "$tool_basename", so it can be a program name with args.
8836set dummy $tool_basename; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_PRINTF+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $PRINTF in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865PRINTF=$ac_cv_path_PRINTF
8866if test -n "$PRINTF"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8868$as_echo "$PRINTF" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875        if test "x$PRINTF" = x; then
8876          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8877        fi
8878      else
8879        # Otherwise we believe it is a complete path. Use it as it is.
8880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8881$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8883$as_echo_n "checking for PRINTF... " >&6; }
8884        if test ! -x "$tool_specified"; then
8885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8886$as_echo "not found" >&6; }
8887          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8888        fi
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8890$as_echo "$tool_specified" >&6; }
8891      fi
8892    fi
8893  fi
8894
8895
8896
8897  if test "x$PRINTF" = x; then
8898    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8899  fi
8900
8901
8902
8903
8904
8905  # Publish this variable in the help.
8906
8907
8908  if test "x$RM" = x; then
8909    # The variable is not set by user, try to locate tool using the code snippet
8910    for ac_prog in rm
8911do
8912  # Extract the first word of "$ac_prog", so it can be a program name with args.
8913set dummy $ac_prog; ac_word=$2
8914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8915$as_echo_n "checking for $ac_word... " >&6; }
8916if ${ac_cv_path_RM+:} false; then :
8917  $as_echo_n "(cached) " >&6
8918else
8919  case $RM in
8920  [\\/]* | ?:[\\/]*)
8921  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8922  ;;
8923  *)
8924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8925for as_dir in $PATH
8926do
8927  IFS=$as_save_IFS
8928  test -z "$as_dir" && as_dir=.
8929    for ac_exec_ext in '' $ac_executable_extensions; do
8930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8931    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8933    break 2
8934  fi
8935done
8936  done
8937IFS=$as_save_IFS
8938
8939  ;;
8940esac
8941fi
8942RM=$ac_cv_path_RM
8943if test -n "$RM"; then
8944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8945$as_echo "$RM" >&6; }
8946else
8947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
8949fi
8950
8951
8952  test -n "$RM" && break
8953done
8954
8955  else
8956    # The variable is set, but is it from the command line or the environment?
8957
8958    # Try to remove the string !RM! from our list.
8959    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8960    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8961      # If it failed, the variable was not from the command line. Ignore it,
8962      # but warn the user (except for BASH, which is always set by the calling BASH).
8963      if test "xRM" != xBASH; then
8964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8965$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8966      fi
8967      # Try to locate tool using the code snippet
8968      for ac_prog in rm
8969do
8970  # Extract the first word of "$ac_prog", so it can be a program name with args.
8971set dummy $ac_prog; ac_word=$2
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8973$as_echo_n "checking for $ac_word... " >&6; }
8974if ${ac_cv_path_RM+:} false; then :
8975  $as_echo_n "(cached) " >&6
8976else
8977  case $RM in
8978  [\\/]* | ?:[\\/]*)
8979  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8980  ;;
8981  *)
8982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8983for as_dir in $PATH
8984do
8985  IFS=$as_save_IFS
8986  test -z "$as_dir" && as_dir=.
8987    for ac_exec_ext in '' $ac_executable_extensions; do
8988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8989    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8991    break 2
8992  fi
8993done
8994  done
8995IFS=$as_save_IFS
8996
8997  ;;
8998esac
8999fi
9000RM=$ac_cv_path_RM
9001if test -n "$RM"; then
9002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9003$as_echo "$RM" >&6; }
9004else
9005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9006$as_echo "no" >&6; }
9007fi
9008
9009
9010  test -n "$RM" && break
9011done
9012
9013    else
9014      # If it succeeded, then it was overridden by the user. We will use it
9015      # for the tool.
9016
9017      # First remove it from the list of overridden variables, so we can test
9018      # for unknown variables in the end.
9019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9020
9021      # Check if the provided tool contains a complete path.
9022      tool_specified="$RM"
9023      tool_basename="${tool_specified##*/}"
9024      if test "x$tool_basename" = "x$tool_specified"; then
9025        # A command without a complete path is provided, search $PATH.
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9027$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9028        # Extract the first word of "$tool_basename", so it can be a program name with args.
9029set dummy $tool_basename; ac_word=$2
9030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9031$as_echo_n "checking for $ac_word... " >&6; }
9032if ${ac_cv_path_RM+:} false; then :
9033  $as_echo_n "(cached) " >&6
9034else
9035  case $RM in
9036  [\\/]* | ?:[\\/]*)
9037  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9038  ;;
9039  *)
9040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9041for as_dir in $PATH
9042do
9043  IFS=$as_save_IFS
9044  test -z "$as_dir" && as_dir=.
9045    for ac_exec_ext in '' $ac_executable_extensions; do
9046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9047    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9049    break 2
9050  fi
9051done
9052  done
9053IFS=$as_save_IFS
9054
9055  ;;
9056esac
9057fi
9058RM=$ac_cv_path_RM
9059if test -n "$RM"; then
9060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9061$as_echo "$RM" >&6; }
9062else
9063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9064$as_echo "no" >&6; }
9065fi
9066
9067
9068        if test "x$RM" = x; then
9069          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9070        fi
9071      else
9072        # Otherwise we believe it is a complete path. Use it as it is.
9073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9074$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9076$as_echo_n "checking for RM... " >&6; }
9077        if test ! -x "$tool_specified"; then
9078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9079$as_echo "not found" >&6; }
9080          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9081        fi
9082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9083$as_echo "$tool_specified" >&6; }
9084      fi
9085    fi
9086  fi
9087
9088
9089
9090  if test "x$RM" = x; then
9091    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9092  fi
9093
9094
9095
9096
9097
9098  # Publish this variable in the help.
9099
9100
9101  if test "x$SH" = x; then
9102    # The variable is not set by user, try to locate tool using the code snippet
9103    for ac_prog in sh
9104do
9105  # Extract the first word of "$ac_prog", so it can be a program name with args.
9106set dummy $ac_prog; ac_word=$2
9107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9108$as_echo_n "checking for $ac_word... " >&6; }
9109if ${ac_cv_path_SH+:} false; then :
9110  $as_echo_n "(cached) " >&6
9111else
9112  case $SH in
9113  [\\/]* | ?:[\\/]*)
9114  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9115  ;;
9116  *)
9117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9118for as_dir in $PATH
9119do
9120  IFS=$as_save_IFS
9121  test -z "$as_dir" && as_dir=.
9122    for ac_exec_ext in '' $ac_executable_extensions; do
9123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9124    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9126    break 2
9127  fi
9128done
9129  done
9130IFS=$as_save_IFS
9131
9132  ;;
9133esac
9134fi
9135SH=$ac_cv_path_SH
9136if test -n "$SH"; then
9137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9138$as_echo "$SH" >&6; }
9139else
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9141$as_echo "no" >&6; }
9142fi
9143
9144
9145  test -n "$SH" && break
9146done
9147
9148  else
9149    # The variable is set, but is it from the command line or the environment?
9150
9151    # Try to remove the string !SH! from our list.
9152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9154      # If it failed, the variable was not from the command line. Ignore it,
9155      # but warn the user (except for BASH, which is always set by the calling BASH).
9156      if test "xSH" != xBASH; then
9157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9158$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9159      fi
9160      # Try to locate tool using the code snippet
9161      for ac_prog in sh
9162do
9163  # Extract the first word of "$ac_prog", so it can be a program name with args.
9164set dummy $ac_prog; ac_word=$2
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9166$as_echo_n "checking for $ac_word... " >&6; }
9167if ${ac_cv_path_SH+:} false; then :
9168  $as_echo_n "(cached) " >&6
9169else
9170  case $SH in
9171  [\\/]* | ?:[\\/]*)
9172  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9173  ;;
9174  *)
9175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9176for as_dir in $PATH
9177do
9178  IFS=$as_save_IFS
9179  test -z "$as_dir" && as_dir=.
9180    for ac_exec_ext in '' $ac_executable_extensions; do
9181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9182    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9184    break 2
9185  fi
9186done
9187  done
9188IFS=$as_save_IFS
9189
9190  ;;
9191esac
9192fi
9193SH=$ac_cv_path_SH
9194if test -n "$SH"; then
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9196$as_echo "$SH" >&6; }
9197else
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199$as_echo "no" >&6; }
9200fi
9201
9202
9203  test -n "$SH" && break
9204done
9205
9206    else
9207      # If it succeeded, then it was overridden by the user. We will use it
9208      # for the tool.
9209
9210      # First remove it from the list of overridden variables, so we can test
9211      # for unknown variables in the end.
9212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9213
9214      # Check if the provided tool contains a complete path.
9215      tool_specified="$SH"
9216      tool_basename="${tool_specified##*/}"
9217      if test "x$tool_basename" = "x$tool_specified"; then
9218        # A command without a complete path is provided, search $PATH.
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9220$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9221        # Extract the first word of "$tool_basename", so it can be a program name with args.
9222set dummy $tool_basename; ac_word=$2
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9224$as_echo_n "checking for $ac_word... " >&6; }
9225if ${ac_cv_path_SH+:} false; then :
9226  $as_echo_n "(cached) " >&6
9227else
9228  case $SH in
9229  [\\/]* | ?:[\\/]*)
9230  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9231  ;;
9232  *)
9233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9234for as_dir in $PATH
9235do
9236  IFS=$as_save_IFS
9237  test -z "$as_dir" && as_dir=.
9238    for ac_exec_ext in '' $ac_executable_extensions; do
9239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9240    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9242    break 2
9243  fi
9244done
9245  done
9246IFS=$as_save_IFS
9247
9248  ;;
9249esac
9250fi
9251SH=$ac_cv_path_SH
9252if test -n "$SH"; then
9253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9254$as_echo "$SH" >&6; }
9255else
9256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9257$as_echo "no" >&6; }
9258fi
9259
9260
9261        if test "x$SH" = x; then
9262          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9263        fi
9264      else
9265        # Otherwise we believe it is a complete path. Use it as it is.
9266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9267$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9269$as_echo_n "checking for SH... " >&6; }
9270        if test ! -x "$tool_specified"; then
9271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9272$as_echo "not found" >&6; }
9273          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9274        fi
9275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9276$as_echo "$tool_specified" >&6; }
9277      fi
9278    fi
9279  fi
9280
9281
9282
9283  if test "x$SH" = x; then
9284    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9285  fi
9286
9287
9288
9289
9290
9291  # Publish this variable in the help.
9292
9293
9294  if test "x$SORT" = x; then
9295    # The variable is not set by user, try to locate tool using the code snippet
9296    for ac_prog in sort
9297do
9298  # Extract the first word of "$ac_prog", so it can be a program name with args.
9299set dummy $ac_prog; ac_word=$2
9300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9301$as_echo_n "checking for $ac_word... " >&6; }
9302if ${ac_cv_path_SORT+:} false; then :
9303  $as_echo_n "(cached) " >&6
9304else
9305  case $SORT in
9306  [\\/]* | ?:[\\/]*)
9307  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9308  ;;
9309  *)
9310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9311for as_dir in $PATH
9312do
9313  IFS=$as_save_IFS
9314  test -z "$as_dir" && as_dir=.
9315    for ac_exec_ext in '' $ac_executable_extensions; do
9316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9317    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9319    break 2
9320  fi
9321done
9322  done
9323IFS=$as_save_IFS
9324
9325  ;;
9326esac
9327fi
9328SORT=$ac_cv_path_SORT
9329if test -n "$SORT"; then
9330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9331$as_echo "$SORT" >&6; }
9332else
9333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334$as_echo "no" >&6; }
9335fi
9336
9337
9338  test -n "$SORT" && break
9339done
9340
9341  else
9342    # The variable is set, but is it from the command line or the environment?
9343
9344    # Try to remove the string !SORT! from our list.
9345    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9346    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9347      # If it failed, the variable was not from the command line. Ignore it,
9348      # but warn the user (except for BASH, which is always set by the calling BASH).
9349      if test "xSORT" != xBASH; then
9350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9351$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9352      fi
9353      # Try to locate tool using the code snippet
9354      for ac_prog in sort
9355do
9356  # Extract the first word of "$ac_prog", so it can be a program name with args.
9357set dummy $ac_prog; ac_word=$2
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9359$as_echo_n "checking for $ac_word... " >&6; }
9360if ${ac_cv_path_SORT+:} false; then :
9361  $as_echo_n "(cached) " >&6
9362else
9363  case $SORT in
9364  [\\/]* | ?:[\\/]*)
9365  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9366  ;;
9367  *)
9368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9369for as_dir in $PATH
9370do
9371  IFS=$as_save_IFS
9372  test -z "$as_dir" && as_dir=.
9373    for ac_exec_ext in '' $ac_executable_extensions; do
9374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9375    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9377    break 2
9378  fi
9379done
9380  done
9381IFS=$as_save_IFS
9382
9383  ;;
9384esac
9385fi
9386SORT=$ac_cv_path_SORT
9387if test -n "$SORT"; then
9388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9389$as_echo "$SORT" >&6; }
9390else
9391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9392$as_echo "no" >&6; }
9393fi
9394
9395
9396  test -n "$SORT" && break
9397done
9398
9399    else
9400      # If it succeeded, then it was overridden by the user. We will use it
9401      # for the tool.
9402
9403      # First remove it from the list of overridden variables, so we can test
9404      # for unknown variables in the end.
9405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9406
9407      # Check if the provided tool contains a complete path.
9408      tool_specified="$SORT"
9409      tool_basename="${tool_specified##*/}"
9410      if test "x$tool_basename" = "x$tool_specified"; then
9411        # A command without a complete path is provided, search $PATH.
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9413$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9414        # Extract the first word of "$tool_basename", so it can be a program name with args.
9415set dummy $tool_basename; ac_word=$2
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9417$as_echo_n "checking for $ac_word... " >&6; }
9418if ${ac_cv_path_SORT+:} false; then :
9419  $as_echo_n "(cached) " >&6
9420else
9421  case $SORT in
9422  [\\/]* | ?:[\\/]*)
9423  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9424  ;;
9425  *)
9426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9427for as_dir in $PATH
9428do
9429  IFS=$as_save_IFS
9430  test -z "$as_dir" && as_dir=.
9431    for ac_exec_ext in '' $ac_executable_extensions; do
9432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9433    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9435    break 2
9436  fi
9437done
9438  done
9439IFS=$as_save_IFS
9440
9441  ;;
9442esac
9443fi
9444SORT=$ac_cv_path_SORT
9445if test -n "$SORT"; then
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9447$as_echo "$SORT" >&6; }
9448else
9449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9450$as_echo "no" >&6; }
9451fi
9452
9453
9454        if test "x$SORT" = x; then
9455          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9456        fi
9457      else
9458        # Otherwise we believe it is a complete path. Use it as it is.
9459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9460$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9462$as_echo_n "checking for SORT... " >&6; }
9463        if test ! -x "$tool_specified"; then
9464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9465$as_echo "not found" >&6; }
9466          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9467        fi
9468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9469$as_echo "$tool_specified" >&6; }
9470      fi
9471    fi
9472  fi
9473
9474
9475
9476  if test "x$SORT" = x; then
9477    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9478  fi
9479
9480
9481
9482
9483
9484  # Publish this variable in the help.
9485
9486
9487  if test "x$TAIL" = x; then
9488    # The variable is not set by user, try to locate tool using the code snippet
9489    for ac_prog in tail
9490do
9491  # Extract the first word of "$ac_prog", so it can be a program name with args.
9492set dummy $ac_prog; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if ${ac_cv_path_TAIL+:} false; then :
9496  $as_echo_n "(cached) " >&6
9497else
9498  case $TAIL in
9499  [\\/]* | ?:[\\/]*)
9500  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9501  ;;
9502  *)
9503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506  IFS=$as_save_IFS
9507  test -z "$as_dir" && as_dir=.
9508    for ac_exec_ext in '' $ac_executable_extensions; do
9509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512    break 2
9513  fi
9514done
9515  done
9516IFS=$as_save_IFS
9517
9518  ;;
9519esac
9520fi
9521TAIL=$ac_cv_path_TAIL
9522if test -n "$TAIL"; then
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9524$as_echo "$TAIL" >&6; }
9525else
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531  test -n "$TAIL" && break
9532done
9533
9534  else
9535    # The variable is set, but is it from the command line or the environment?
9536
9537    # Try to remove the string !TAIL! from our list.
9538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9540      # If it failed, the variable was not from the command line. Ignore it,
9541      # but warn the user (except for BASH, which is always set by the calling BASH).
9542      if test "xTAIL" != xBASH; then
9543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9544$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9545      fi
9546      # Try to locate tool using the code snippet
9547      for ac_prog in tail
9548do
9549  # Extract the first word of "$ac_prog", so it can be a program name with args.
9550set dummy $ac_prog; ac_word=$2
9551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9552$as_echo_n "checking for $ac_word... " >&6; }
9553if ${ac_cv_path_TAIL+:} false; then :
9554  $as_echo_n "(cached) " >&6
9555else
9556  case $TAIL in
9557  [\\/]* | ?:[\\/]*)
9558  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9559  ;;
9560  *)
9561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9562for as_dir in $PATH
9563do
9564  IFS=$as_save_IFS
9565  test -z "$as_dir" && as_dir=.
9566    for ac_exec_ext in '' $ac_executable_extensions; do
9567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9568    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9570    break 2
9571  fi
9572done
9573  done
9574IFS=$as_save_IFS
9575
9576  ;;
9577esac
9578fi
9579TAIL=$ac_cv_path_TAIL
9580if test -n "$TAIL"; then
9581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9582$as_echo "$TAIL" >&6; }
9583else
9584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585$as_echo "no" >&6; }
9586fi
9587
9588
9589  test -n "$TAIL" && break
9590done
9591
9592    else
9593      # If it succeeded, then it was overridden by the user. We will use it
9594      # for the tool.
9595
9596      # First remove it from the list of overridden variables, so we can test
9597      # for unknown variables in the end.
9598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9599
9600      # Check if the provided tool contains a complete path.
9601      tool_specified="$TAIL"
9602      tool_basename="${tool_specified##*/}"
9603      if test "x$tool_basename" = "x$tool_specified"; then
9604        # A command without a complete path is provided, search $PATH.
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9606$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9607        # Extract the first word of "$tool_basename", so it can be a program name with args.
9608set dummy $tool_basename; ac_word=$2
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9610$as_echo_n "checking for $ac_word... " >&6; }
9611if ${ac_cv_path_TAIL+:} false; then :
9612  $as_echo_n "(cached) " >&6
9613else
9614  case $TAIL in
9615  [\\/]* | ?:[\\/]*)
9616  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9617  ;;
9618  *)
9619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9620for as_dir in $PATH
9621do
9622  IFS=$as_save_IFS
9623  test -z "$as_dir" && as_dir=.
9624    for ac_exec_ext in '' $ac_executable_extensions; do
9625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9626    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9628    break 2
9629  fi
9630done
9631  done
9632IFS=$as_save_IFS
9633
9634  ;;
9635esac
9636fi
9637TAIL=$ac_cv_path_TAIL
9638if test -n "$TAIL"; then
9639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9640$as_echo "$TAIL" >&6; }
9641else
9642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
9644fi
9645
9646
9647        if test "x$TAIL" = x; then
9648          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9649        fi
9650      else
9651        # Otherwise we believe it is a complete path. Use it as it is.
9652        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9653$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9655$as_echo_n "checking for TAIL... " >&6; }
9656        if test ! -x "$tool_specified"; then
9657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9658$as_echo "not found" >&6; }
9659          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9660        fi
9661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9662$as_echo "$tool_specified" >&6; }
9663      fi
9664    fi
9665  fi
9666
9667
9668
9669  if test "x$TAIL" = x; then
9670    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9671  fi
9672
9673
9674
9675
9676
9677  # Publish this variable in the help.
9678
9679
9680  if test "x$TAR" = x; then
9681    # The variable is not set by user, try to locate tool using the code snippet
9682    for ac_prog in tar
9683do
9684  # Extract the first word of "$ac_prog", so it can be a program name with args.
9685set dummy $ac_prog; ac_word=$2
9686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9687$as_echo_n "checking for $ac_word... " >&6; }
9688if ${ac_cv_path_TAR+:} false; then :
9689  $as_echo_n "(cached) " >&6
9690else
9691  case $TAR in
9692  [\\/]* | ?:[\\/]*)
9693  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9694  ;;
9695  *)
9696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9697for as_dir in $PATH
9698do
9699  IFS=$as_save_IFS
9700  test -z "$as_dir" && as_dir=.
9701    for ac_exec_ext in '' $ac_executable_extensions; do
9702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9703    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9705    break 2
9706  fi
9707done
9708  done
9709IFS=$as_save_IFS
9710
9711  ;;
9712esac
9713fi
9714TAR=$ac_cv_path_TAR
9715if test -n "$TAR"; then
9716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9717$as_echo "$TAR" >&6; }
9718else
9719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720$as_echo "no" >&6; }
9721fi
9722
9723
9724  test -n "$TAR" && break
9725done
9726
9727  else
9728    # The variable is set, but is it from the command line or the environment?
9729
9730    # Try to remove the string !TAR! from our list.
9731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9733      # If it failed, the variable was not from the command line. Ignore it,
9734      # but warn the user (except for BASH, which is always set by the calling BASH).
9735      if test "xTAR" != xBASH; then
9736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9737$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9738      fi
9739      # Try to locate tool using the code snippet
9740      for ac_prog in tar
9741do
9742  # Extract the first word of "$ac_prog", so it can be a program name with args.
9743set dummy $ac_prog; ac_word=$2
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745$as_echo_n "checking for $ac_word... " >&6; }
9746if ${ac_cv_path_TAR+:} false; then :
9747  $as_echo_n "(cached) " >&6
9748else
9749  case $TAR in
9750  [\\/]* | ?:[\\/]*)
9751  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9752  ;;
9753  *)
9754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9755for as_dir in $PATH
9756do
9757  IFS=$as_save_IFS
9758  test -z "$as_dir" && as_dir=.
9759    for ac_exec_ext in '' $ac_executable_extensions; do
9760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9761    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9763    break 2
9764  fi
9765done
9766  done
9767IFS=$as_save_IFS
9768
9769  ;;
9770esac
9771fi
9772TAR=$ac_cv_path_TAR
9773if test -n "$TAR"; then
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9775$as_echo "$TAR" >&6; }
9776else
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779fi
9780
9781
9782  test -n "$TAR" && break
9783done
9784
9785    else
9786      # If it succeeded, then it was overridden by the user. We will use it
9787      # for the tool.
9788
9789      # First remove it from the list of overridden variables, so we can test
9790      # for unknown variables in the end.
9791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9792
9793      # Check if the provided tool contains a complete path.
9794      tool_specified="$TAR"
9795      tool_basename="${tool_specified##*/}"
9796      if test "x$tool_basename" = "x$tool_specified"; then
9797        # A command without a complete path is provided, search $PATH.
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9799$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9800        # Extract the first word of "$tool_basename", so it can be a program name with args.
9801set dummy $tool_basename; ac_word=$2
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9803$as_echo_n "checking for $ac_word... " >&6; }
9804if ${ac_cv_path_TAR+:} false; then :
9805  $as_echo_n "(cached) " >&6
9806else
9807  case $TAR in
9808  [\\/]* | ?:[\\/]*)
9809  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9810  ;;
9811  *)
9812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9813for as_dir in $PATH
9814do
9815  IFS=$as_save_IFS
9816  test -z "$as_dir" && as_dir=.
9817    for ac_exec_ext in '' $ac_executable_extensions; do
9818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9819    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9821    break 2
9822  fi
9823done
9824  done
9825IFS=$as_save_IFS
9826
9827  ;;
9828esac
9829fi
9830TAR=$ac_cv_path_TAR
9831if test -n "$TAR"; then
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9833$as_echo "$TAR" >&6; }
9834else
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837fi
9838
9839
9840        if test "x$TAR" = x; then
9841          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9842        fi
9843      else
9844        # Otherwise we believe it is a complete path. Use it as it is.
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9846$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9848$as_echo_n "checking for TAR... " >&6; }
9849        if test ! -x "$tool_specified"; then
9850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9851$as_echo "not found" >&6; }
9852          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9853        fi
9854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9855$as_echo "$tool_specified" >&6; }
9856      fi
9857    fi
9858  fi
9859
9860
9861
9862  if test "x$TAR" = x; then
9863    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9864  fi
9865
9866
9867
9868
9869
9870  # Publish this variable in the help.
9871
9872
9873  if test "x$TEE" = x; then
9874    # The variable is not set by user, try to locate tool using the code snippet
9875    for ac_prog in tee
9876do
9877  # Extract the first word of "$ac_prog", so it can be a program name with args.
9878set dummy $ac_prog; ac_word=$2
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
9881if ${ac_cv_path_TEE+:} false; then :
9882  $as_echo_n "(cached) " >&6
9883else
9884  case $TEE in
9885  [\\/]* | ?:[\\/]*)
9886  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9887  ;;
9888  *)
9889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890for as_dir in $PATH
9891do
9892  IFS=$as_save_IFS
9893  test -z "$as_dir" && as_dir=.
9894    for ac_exec_ext in '' $ac_executable_extensions; do
9895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898    break 2
9899  fi
9900done
9901  done
9902IFS=$as_save_IFS
9903
9904  ;;
9905esac
9906fi
9907TEE=$ac_cv_path_TEE
9908if test -n "$TEE"; then
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9910$as_echo "$TEE" >&6; }
9911else
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917  test -n "$TEE" && break
9918done
9919
9920  else
9921    # The variable is set, but is it from the command line or the environment?
9922
9923    # Try to remove the string !TEE! from our list.
9924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9926      # If it failed, the variable was not from the command line. Ignore it,
9927      # but warn the user (except for BASH, which is always set by the calling BASH).
9928      if test "xTEE" != xBASH; then
9929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9930$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9931      fi
9932      # Try to locate tool using the code snippet
9933      for ac_prog in tee
9934do
9935  # Extract the first word of "$ac_prog", so it can be a program name with args.
9936set dummy $ac_prog; ac_word=$2
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9938$as_echo_n "checking for $ac_word... " >&6; }
9939if ${ac_cv_path_TEE+:} false; then :
9940  $as_echo_n "(cached) " >&6
9941else
9942  case $TEE in
9943  [\\/]* | ?:[\\/]*)
9944  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9945  ;;
9946  *)
9947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948for as_dir in $PATH
9949do
9950  IFS=$as_save_IFS
9951  test -z "$as_dir" && as_dir=.
9952    for ac_exec_ext in '' $ac_executable_extensions; do
9953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9954    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9956    break 2
9957  fi
9958done
9959  done
9960IFS=$as_save_IFS
9961
9962  ;;
9963esac
9964fi
9965TEE=$ac_cv_path_TEE
9966if test -n "$TEE"; then
9967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9968$as_echo "$TEE" >&6; }
9969else
9970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972fi
9973
9974
9975  test -n "$TEE" && break
9976done
9977
9978    else
9979      # If it succeeded, then it was overridden by the user. We will use it
9980      # for the tool.
9981
9982      # First remove it from the list of overridden variables, so we can test
9983      # for unknown variables in the end.
9984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9985
9986      # Check if the provided tool contains a complete path.
9987      tool_specified="$TEE"
9988      tool_basename="${tool_specified##*/}"
9989      if test "x$tool_basename" = "x$tool_specified"; then
9990        # A command without a complete path is provided, search $PATH.
9991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9992$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9993        # Extract the first word of "$tool_basename", so it can be a program name with args.
9994set dummy $tool_basename; ac_word=$2
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9996$as_echo_n "checking for $ac_word... " >&6; }
9997if ${ac_cv_path_TEE+:} false; then :
9998  $as_echo_n "(cached) " >&6
9999else
10000  case $TEE in
10001  [\\/]* | ?:[\\/]*)
10002  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10003  ;;
10004  *)
10005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10006for as_dir in $PATH
10007do
10008  IFS=$as_save_IFS
10009  test -z "$as_dir" && as_dir=.
10010    for ac_exec_ext in '' $ac_executable_extensions; do
10011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10012    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10014    break 2
10015  fi
10016done
10017  done
10018IFS=$as_save_IFS
10019
10020  ;;
10021esac
10022fi
10023TEE=$ac_cv_path_TEE
10024if test -n "$TEE"; then
10025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10026$as_echo "$TEE" >&6; }
10027else
10028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
10030fi
10031
10032
10033        if test "x$TEE" = x; then
10034          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10035        fi
10036      else
10037        # Otherwise we believe it is a complete path. Use it as it is.
10038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10039$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10040        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10041$as_echo_n "checking for TEE... " >&6; }
10042        if test ! -x "$tool_specified"; then
10043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10044$as_echo "not found" >&6; }
10045          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10046        fi
10047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10048$as_echo "$tool_specified" >&6; }
10049      fi
10050    fi
10051  fi
10052
10053
10054
10055  if test "x$TEE" = x; then
10056    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10057  fi
10058
10059
10060
10061
10062
10063  # Publish this variable in the help.
10064
10065
10066  if test "x$TOUCH" = x; then
10067    # The variable is not set by user, try to locate tool using the code snippet
10068    for ac_prog in touch
10069do
10070  # Extract the first word of "$ac_prog", so it can be a program name with args.
10071set dummy $ac_prog; ac_word=$2
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10073$as_echo_n "checking for $ac_word... " >&6; }
10074if ${ac_cv_path_TOUCH+:} false; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  case $TOUCH in
10078  [\\/]* | ?:[\\/]*)
10079  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10080  ;;
10081  *)
10082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10083for as_dir in $PATH
10084do
10085  IFS=$as_save_IFS
10086  test -z "$as_dir" && as_dir=.
10087    for ac_exec_ext in '' $ac_executable_extensions; do
10088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10089    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10091    break 2
10092  fi
10093done
10094  done
10095IFS=$as_save_IFS
10096
10097  ;;
10098esac
10099fi
10100TOUCH=$ac_cv_path_TOUCH
10101if test -n "$TOUCH"; then
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10103$as_echo "$TOUCH" >&6; }
10104else
10105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
10110  test -n "$TOUCH" && break
10111done
10112
10113  else
10114    # The variable is set, but is it from the command line or the environment?
10115
10116    # Try to remove the string !TOUCH! from our list.
10117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10119      # If it failed, the variable was not from the command line. Ignore it,
10120      # but warn the user (except for BASH, which is always set by the calling BASH).
10121      if test "xTOUCH" != xBASH; then
10122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10123$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10124      fi
10125      # Try to locate tool using the code snippet
10126      for ac_prog in touch
10127do
10128  # Extract the first word of "$ac_prog", so it can be a program name with args.
10129set dummy $ac_prog; ac_word=$2
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10131$as_echo_n "checking for $ac_word... " >&6; }
10132if ${ac_cv_path_TOUCH+:} false; then :
10133  $as_echo_n "(cached) " >&6
10134else
10135  case $TOUCH in
10136  [\\/]* | ?:[\\/]*)
10137  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10138  ;;
10139  *)
10140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10141for as_dir in $PATH
10142do
10143  IFS=$as_save_IFS
10144  test -z "$as_dir" && as_dir=.
10145    for ac_exec_ext in '' $ac_executable_extensions; do
10146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10147    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10149    break 2
10150  fi
10151done
10152  done
10153IFS=$as_save_IFS
10154
10155  ;;
10156esac
10157fi
10158TOUCH=$ac_cv_path_TOUCH
10159if test -n "$TOUCH"; then
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10161$as_echo "$TOUCH" >&6; }
10162else
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168  test -n "$TOUCH" && break
10169done
10170
10171    else
10172      # If it succeeded, then it was overridden by the user. We will use it
10173      # for the tool.
10174
10175      # First remove it from the list of overridden variables, so we can test
10176      # for unknown variables in the end.
10177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10178
10179      # Check if the provided tool contains a complete path.
10180      tool_specified="$TOUCH"
10181      tool_basename="${tool_specified##*/}"
10182      if test "x$tool_basename" = "x$tool_specified"; then
10183        # A command without a complete path is provided, search $PATH.
10184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10185$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10186        # Extract the first word of "$tool_basename", so it can be a program name with args.
10187set dummy $tool_basename; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_TOUCH+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $TOUCH in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216TOUCH=$ac_cv_path_TOUCH
10217if test -n "$TOUCH"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10219$as_echo "$TOUCH" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226        if test "x$TOUCH" = x; then
10227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10228        fi
10229      else
10230        # Otherwise we believe it is a complete path. Use it as it is.
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10232$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10234$as_echo_n "checking for TOUCH... " >&6; }
10235        if test ! -x "$tool_specified"; then
10236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10237$as_echo "not found" >&6; }
10238          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10239        fi
10240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10241$as_echo "$tool_specified" >&6; }
10242      fi
10243    fi
10244  fi
10245
10246
10247
10248  if test "x$TOUCH" = x; then
10249    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10250  fi
10251
10252
10253
10254
10255
10256  # Publish this variable in the help.
10257
10258
10259  if test "x$TR" = x; then
10260    # The variable is not set by user, try to locate tool using the code snippet
10261    for ac_prog in tr
10262do
10263  # Extract the first word of "$ac_prog", so it can be a program name with args.
10264set dummy $ac_prog; ac_word=$2
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10266$as_echo_n "checking for $ac_word... " >&6; }
10267if ${ac_cv_path_TR+:} false; then :
10268  $as_echo_n "(cached) " >&6
10269else
10270  case $TR in
10271  [\\/]* | ?:[\\/]*)
10272  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10273  ;;
10274  *)
10275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276for as_dir in $PATH
10277do
10278  IFS=$as_save_IFS
10279  test -z "$as_dir" && as_dir=.
10280    for ac_exec_ext in '' $ac_executable_extensions; do
10281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10282    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10284    break 2
10285  fi
10286done
10287  done
10288IFS=$as_save_IFS
10289
10290  ;;
10291esac
10292fi
10293TR=$ac_cv_path_TR
10294if test -n "$TR"; then
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10296$as_echo "$TR" >&6; }
10297else
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303  test -n "$TR" && break
10304done
10305
10306  else
10307    # The variable is set, but is it from the command line or the environment?
10308
10309    # Try to remove the string !TR! from our list.
10310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10312      # If it failed, the variable was not from the command line. Ignore it,
10313      # but warn the user (except for BASH, which is always set by the calling BASH).
10314      if test "xTR" != xBASH; then
10315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10316$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10317      fi
10318      # Try to locate tool using the code snippet
10319      for ac_prog in tr
10320do
10321  # Extract the first word of "$ac_prog", so it can be a program name with args.
10322set dummy $ac_prog; ac_word=$2
10323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324$as_echo_n "checking for $ac_word... " >&6; }
10325if ${ac_cv_path_TR+:} false; then :
10326  $as_echo_n "(cached) " >&6
10327else
10328  case $TR in
10329  [\\/]* | ?:[\\/]*)
10330  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10331  ;;
10332  *)
10333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10334for as_dir in $PATH
10335do
10336  IFS=$as_save_IFS
10337  test -z "$as_dir" && as_dir=.
10338    for ac_exec_ext in '' $ac_executable_extensions; do
10339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10340    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10342    break 2
10343  fi
10344done
10345  done
10346IFS=$as_save_IFS
10347
10348  ;;
10349esac
10350fi
10351TR=$ac_cv_path_TR
10352if test -n "$TR"; then
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10354$as_echo "$TR" >&6; }
10355else
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358fi
10359
10360
10361  test -n "$TR" && break
10362done
10363
10364    else
10365      # If it succeeded, then it was overridden by the user. We will use it
10366      # for the tool.
10367
10368      # First remove it from the list of overridden variables, so we can test
10369      # for unknown variables in the end.
10370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10371
10372      # Check if the provided tool contains a complete path.
10373      tool_specified="$TR"
10374      tool_basename="${tool_specified##*/}"
10375      if test "x$tool_basename" = "x$tool_specified"; then
10376        # A command without a complete path is provided, search $PATH.
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10378$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10379        # Extract the first word of "$tool_basename", so it can be a program name with args.
10380set dummy $tool_basename; ac_word=$2
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10382$as_echo_n "checking for $ac_word... " >&6; }
10383if ${ac_cv_path_TR+:} false; then :
10384  $as_echo_n "(cached) " >&6
10385else
10386  case $TR in
10387  [\\/]* | ?:[\\/]*)
10388  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10389  ;;
10390  *)
10391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10392for as_dir in $PATH
10393do
10394  IFS=$as_save_IFS
10395  test -z "$as_dir" && as_dir=.
10396    for ac_exec_ext in '' $ac_executable_extensions; do
10397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10398    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10400    break 2
10401  fi
10402done
10403  done
10404IFS=$as_save_IFS
10405
10406  ;;
10407esac
10408fi
10409TR=$ac_cv_path_TR
10410if test -n "$TR"; then
10411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10412$as_echo "$TR" >&6; }
10413else
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
10416fi
10417
10418
10419        if test "x$TR" = x; then
10420          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10421        fi
10422      else
10423        # Otherwise we believe it is a complete path. Use it as it is.
10424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10425$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10427$as_echo_n "checking for TR... " >&6; }
10428        if test ! -x "$tool_specified"; then
10429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10430$as_echo "not found" >&6; }
10431          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10432        fi
10433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10434$as_echo "$tool_specified" >&6; }
10435      fi
10436    fi
10437  fi
10438
10439
10440
10441  if test "x$TR" = x; then
10442    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10443  fi
10444
10445
10446
10447
10448
10449  # Publish this variable in the help.
10450
10451
10452  if test "x$UNAME" = x; then
10453    # The variable is not set by user, try to locate tool using the code snippet
10454    for ac_prog in uname
10455do
10456  # Extract the first word of "$ac_prog", so it can be a program name with args.
10457set dummy $ac_prog; ac_word=$2
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10459$as_echo_n "checking for $ac_word... " >&6; }
10460if ${ac_cv_path_UNAME+:} false; then :
10461  $as_echo_n "(cached) " >&6
10462else
10463  case $UNAME in
10464  [\\/]* | ?:[\\/]*)
10465  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10466  ;;
10467  *)
10468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10469for as_dir in $PATH
10470do
10471  IFS=$as_save_IFS
10472  test -z "$as_dir" && as_dir=.
10473    for ac_exec_ext in '' $ac_executable_extensions; do
10474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10475    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10477    break 2
10478  fi
10479done
10480  done
10481IFS=$as_save_IFS
10482
10483  ;;
10484esac
10485fi
10486UNAME=$ac_cv_path_UNAME
10487if test -n "$UNAME"; then
10488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10489$as_echo "$UNAME" >&6; }
10490else
10491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
10493fi
10494
10495
10496  test -n "$UNAME" && break
10497done
10498
10499  else
10500    # The variable is set, but is it from the command line or the environment?
10501
10502    # Try to remove the string !UNAME! from our list.
10503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10505      # If it failed, the variable was not from the command line. Ignore it,
10506      # but warn the user (except for BASH, which is always set by the calling BASH).
10507      if test "xUNAME" != xBASH; then
10508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10509$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10510      fi
10511      # Try to locate tool using the code snippet
10512      for ac_prog in uname
10513do
10514  # Extract the first word of "$ac_prog", so it can be a program name with args.
10515set dummy $ac_prog; ac_word=$2
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517$as_echo_n "checking for $ac_word... " >&6; }
10518if ${ac_cv_path_UNAME+:} false; then :
10519  $as_echo_n "(cached) " >&6
10520else
10521  case $UNAME in
10522  [\\/]* | ?:[\\/]*)
10523  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10524  ;;
10525  *)
10526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527for as_dir in $PATH
10528do
10529  IFS=$as_save_IFS
10530  test -z "$as_dir" && as_dir=.
10531    for ac_exec_ext in '' $ac_executable_extensions; do
10532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10533    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10535    break 2
10536  fi
10537done
10538  done
10539IFS=$as_save_IFS
10540
10541  ;;
10542esac
10543fi
10544UNAME=$ac_cv_path_UNAME
10545if test -n "$UNAME"; then
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10547$as_echo "$UNAME" >&6; }
10548else
10549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
10551fi
10552
10553
10554  test -n "$UNAME" && break
10555done
10556
10557    else
10558      # If it succeeded, then it was overridden by the user. We will use it
10559      # for the tool.
10560
10561      # First remove it from the list of overridden variables, so we can test
10562      # for unknown variables in the end.
10563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10564
10565      # Check if the provided tool contains a complete path.
10566      tool_specified="$UNAME"
10567      tool_basename="${tool_specified##*/}"
10568      if test "x$tool_basename" = "x$tool_specified"; then
10569        # A command without a complete path is provided, search $PATH.
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10571$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10572        # Extract the first word of "$tool_basename", so it can be a program name with args.
10573set dummy $tool_basename; ac_word=$2
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10575$as_echo_n "checking for $ac_word... " >&6; }
10576if ${ac_cv_path_UNAME+:} false; then :
10577  $as_echo_n "(cached) " >&6
10578else
10579  case $UNAME in
10580  [\\/]* | ?:[\\/]*)
10581  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10582  ;;
10583  *)
10584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10585for as_dir in $PATH
10586do
10587  IFS=$as_save_IFS
10588  test -z "$as_dir" && as_dir=.
10589    for ac_exec_ext in '' $ac_executable_extensions; do
10590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10591    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10593    break 2
10594  fi
10595done
10596  done
10597IFS=$as_save_IFS
10598
10599  ;;
10600esac
10601fi
10602UNAME=$ac_cv_path_UNAME
10603if test -n "$UNAME"; then
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10605$as_echo "$UNAME" >&6; }
10606else
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
10609fi
10610
10611
10612        if test "x$UNAME" = x; then
10613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10614        fi
10615      else
10616        # Otherwise we believe it is a complete path. Use it as it is.
10617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10618$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10620$as_echo_n "checking for UNAME... " >&6; }
10621        if test ! -x "$tool_specified"; then
10622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10623$as_echo "not found" >&6; }
10624          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10625        fi
10626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10627$as_echo "$tool_specified" >&6; }
10628      fi
10629    fi
10630  fi
10631
10632
10633
10634  if test "x$UNAME" = x; then
10635    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10636  fi
10637
10638
10639
10640
10641
10642  # Publish this variable in the help.
10643
10644
10645  if test "x$UNIQ" = x; then
10646    # The variable is not set by user, try to locate tool using the code snippet
10647    for ac_prog in uniq
10648do
10649  # Extract the first word of "$ac_prog", so it can be a program name with args.
10650set dummy $ac_prog; ac_word=$2
10651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10652$as_echo_n "checking for $ac_word... " >&6; }
10653if ${ac_cv_path_UNIQ+:} false; then :
10654  $as_echo_n "(cached) " >&6
10655else
10656  case $UNIQ in
10657  [\\/]* | ?:[\\/]*)
10658  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10659  ;;
10660  *)
10661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10662for as_dir in $PATH
10663do
10664  IFS=$as_save_IFS
10665  test -z "$as_dir" && as_dir=.
10666    for ac_exec_ext in '' $ac_executable_extensions; do
10667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10668    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10670    break 2
10671  fi
10672done
10673  done
10674IFS=$as_save_IFS
10675
10676  ;;
10677esac
10678fi
10679UNIQ=$ac_cv_path_UNIQ
10680if test -n "$UNIQ"; then
10681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10682$as_echo "$UNIQ" >&6; }
10683else
10684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
10686fi
10687
10688
10689  test -n "$UNIQ" && break
10690done
10691
10692  else
10693    # The variable is set, but is it from the command line or the environment?
10694
10695    # Try to remove the string !UNIQ! from our list.
10696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10698      # If it failed, the variable was not from the command line. Ignore it,
10699      # but warn the user (except for BASH, which is always set by the calling BASH).
10700      if test "xUNIQ" != xBASH; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10702$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10703      fi
10704      # Try to locate tool using the code snippet
10705      for ac_prog in uniq
10706do
10707  # Extract the first word of "$ac_prog", so it can be a program name with args.
10708set dummy $ac_prog; ac_word=$2
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10710$as_echo_n "checking for $ac_word... " >&6; }
10711if ${ac_cv_path_UNIQ+:} false; then :
10712  $as_echo_n "(cached) " >&6
10713else
10714  case $UNIQ in
10715  [\\/]* | ?:[\\/]*)
10716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10717  ;;
10718  *)
10719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10720for as_dir in $PATH
10721do
10722  IFS=$as_save_IFS
10723  test -z "$as_dir" && as_dir=.
10724    for ac_exec_ext in '' $ac_executable_extensions; do
10725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10728    break 2
10729  fi
10730done
10731  done
10732IFS=$as_save_IFS
10733
10734  ;;
10735esac
10736fi
10737UNIQ=$ac_cv_path_UNIQ
10738if test -n "$UNIQ"; then
10739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10740$as_echo "$UNIQ" >&6; }
10741else
10742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
10744fi
10745
10746
10747  test -n "$UNIQ" && break
10748done
10749
10750    else
10751      # If it succeeded, then it was overridden by the user. We will use it
10752      # for the tool.
10753
10754      # First remove it from the list of overridden variables, so we can test
10755      # for unknown variables in the end.
10756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10757
10758      # Check if the provided tool contains a complete path.
10759      tool_specified="$UNIQ"
10760      tool_basename="${tool_specified##*/}"
10761      if test "x$tool_basename" = "x$tool_specified"; then
10762        # A command without a complete path is provided, search $PATH.
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10764$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10765        # Extract the first word of "$tool_basename", so it can be a program name with args.
10766set dummy $tool_basename; ac_word=$2
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10768$as_echo_n "checking for $ac_word... " >&6; }
10769if ${ac_cv_path_UNIQ+:} false; then :
10770  $as_echo_n "(cached) " >&6
10771else
10772  case $UNIQ in
10773  [\\/]* | ?:[\\/]*)
10774  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10775  ;;
10776  *)
10777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10778for as_dir in $PATH
10779do
10780  IFS=$as_save_IFS
10781  test -z "$as_dir" && as_dir=.
10782    for ac_exec_ext in '' $ac_executable_extensions; do
10783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10784    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10786    break 2
10787  fi
10788done
10789  done
10790IFS=$as_save_IFS
10791
10792  ;;
10793esac
10794fi
10795UNIQ=$ac_cv_path_UNIQ
10796if test -n "$UNIQ"; then
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10798$as_echo "$UNIQ" >&6; }
10799else
10800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
10802fi
10803
10804
10805        if test "x$UNIQ" = x; then
10806          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10807        fi
10808      else
10809        # Otherwise we believe it is a complete path. Use it as it is.
10810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10811$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10813$as_echo_n "checking for UNIQ... " >&6; }
10814        if test ! -x "$tool_specified"; then
10815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10816$as_echo "not found" >&6; }
10817          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10818        fi
10819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10820$as_echo "$tool_specified" >&6; }
10821      fi
10822    fi
10823  fi
10824
10825
10826
10827  if test "x$UNIQ" = x; then
10828    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10829  fi
10830
10831
10832
10833
10834
10835  # Publish this variable in the help.
10836
10837
10838  if test "x$WC" = x; then
10839    # The variable is not set by user, try to locate tool using the code snippet
10840    for ac_prog in wc
10841do
10842  # Extract the first word of "$ac_prog", so it can be a program name with args.
10843set dummy $ac_prog; ac_word=$2
10844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10845$as_echo_n "checking for $ac_word... " >&6; }
10846if ${ac_cv_path_WC+:} false; then :
10847  $as_echo_n "(cached) " >&6
10848else
10849  case $WC in
10850  [\\/]* | ?:[\\/]*)
10851  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10852  ;;
10853  *)
10854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10855for as_dir in $PATH
10856do
10857  IFS=$as_save_IFS
10858  test -z "$as_dir" && as_dir=.
10859    for ac_exec_ext in '' $ac_executable_extensions; do
10860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10861    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10863    break 2
10864  fi
10865done
10866  done
10867IFS=$as_save_IFS
10868
10869  ;;
10870esac
10871fi
10872WC=$ac_cv_path_WC
10873if test -n "$WC"; then
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10875$as_echo "$WC" >&6; }
10876else
10877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10878$as_echo "no" >&6; }
10879fi
10880
10881
10882  test -n "$WC" && break
10883done
10884
10885  else
10886    # The variable is set, but is it from the command line or the environment?
10887
10888    # Try to remove the string !WC! from our list.
10889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10891      # If it failed, the variable was not from the command line. Ignore it,
10892      # but warn the user (except for BASH, which is always set by the calling BASH).
10893      if test "xWC" != xBASH; then
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10895$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10896      fi
10897      # Try to locate tool using the code snippet
10898      for ac_prog in wc
10899do
10900  # Extract the first word of "$ac_prog", so it can be a program name with args.
10901set dummy $ac_prog; ac_word=$2
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903$as_echo_n "checking for $ac_word... " >&6; }
10904if ${ac_cv_path_WC+:} false; then :
10905  $as_echo_n "(cached) " >&6
10906else
10907  case $WC in
10908  [\\/]* | ?:[\\/]*)
10909  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10910  ;;
10911  *)
10912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10913for as_dir in $PATH
10914do
10915  IFS=$as_save_IFS
10916  test -z "$as_dir" && as_dir=.
10917    for ac_exec_ext in '' $ac_executable_extensions; do
10918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10919    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10921    break 2
10922  fi
10923done
10924  done
10925IFS=$as_save_IFS
10926
10927  ;;
10928esac
10929fi
10930WC=$ac_cv_path_WC
10931if test -n "$WC"; then
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10933$as_echo "$WC" >&6; }
10934else
10935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
10937fi
10938
10939
10940  test -n "$WC" && break
10941done
10942
10943    else
10944      # If it succeeded, then it was overridden by the user. We will use it
10945      # for the tool.
10946
10947      # First remove it from the list of overridden variables, so we can test
10948      # for unknown variables in the end.
10949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10950
10951      # Check if the provided tool contains a complete path.
10952      tool_specified="$WC"
10953      tool_basename="${tool_specified##*/}"
10954      if test "x$tool_basename" = "x$tool_specified"; then
10955        # A command without a complete path is provided, search $PATH.
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10957$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10958        # Extract the first word of "$tool_basename", so it can be a program name with args.
10959set dummy $tool_basename; ac_word=$2
10960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10961$as_echo_n "checking for $ac_word... " >&6; }
10962if ${ac_cv_path_WC+:} false; then :
10963  $as_echo_n "(cached) " >&6
10964else
10965  case $WC in
10966  [\\/]* | ?:[\\/]*)
10967  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10968  ;;
10969  *)
10970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971for as_dir in $PATH
10972do
10973  IFS=$as_save_IFS
10974  test -z "$as_dir" && as_dir=.
10975    for ac_exec_ext in '' $ac_executable_extensions; do
10976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10977    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10979    break 2
10980  fi
10981done
10982  done
10983IFS=$as_save_IFS
10984
10985  ;;
10986esac
10987fi
10988WC=$ac_cv_path_WC
10989if test -n "$WC"; then
10990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10991$as_echo "$WC" >&6; }
10992else
10993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
10995fi
10996
10997
10998        if test "x$WC" = x; then
10999          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11000        fi
11001      else
11002        # Otherwise we believe it is a complete path. Use it as it is.
11003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11004$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11006$as_echo_n "checking for WC... " >&6; }
11007        if test ! -x "$tool_specified"; then
11008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11009$as_echo "not found" >&6; }
11010          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11011        fi
11012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11013$as_echo "$tool_specified" >&6; }
11014      fi
11015    fi
11016  fi
11017
11018
11019
11020  if test "x$WC" = x; then
11021    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11022  fi
11023
11024
11025
11026
11027
11028  # Publish this variable in the help.
11029
11030
11031  if test "x$WHICH" = x; then
11032    # The variable is not set by user, try to locate tool using the code snippet
11033    for ac_prog in which
11034do
11035  # Extract the first word of "$ac_prog", so it can be a program name with args.
11036set dummy $ac_prog; ac_word=$2
11037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11038$as_echo_n "checking for $ac_word... " >&6; }
11039if ${ac_cv_path_WHICH+:} false; then :
11040  $as_echo_n "(cached) " >&6
11041else
11042  case $WHICH in
11043  [\\/]* | ?:[\\/]*)
11044  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11045  ;;
11046  *)
11047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11048for as_dir in $PATH
11049do
11050  IFS=$as_save_IFS
11051  test -z "$as_dir" && as_dir=.
11052    for ac_exec_ext in '' $ac_executable_extensions; do
11053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11054    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11056    break 2
11057  fi
11058done
11059  done
11060IFS=$as_save_IFS
11061
11062  ;;
11063esac
11064fi
11065WHICH=$ac_cv_path_WHICH
11066if test -n "$WHICH"; then
11067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11068$as_echo "$WHICH" >&6; }
11069else
11070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11071$as_echo "no" >&6; }
11072fi
11073
11074
11075  test -n "$WHICH" && break
11076done
11077
11078  else
11079    # The variable is set, but is it from the command line or the environment?
11080
11081    # Try to remove the string !WHICH! from our list.
11082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11084      # If it failed, the variable was not from the command line. Ignore it,
11085      # but warn the user (except for BASH, which is always set by the calling BASH).
11086      if test "xWHICH" != xBASH; then
11087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11088$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11089      fi
11090      # Try to locate tool using the code snippet
11091      for ac_prog in which
11092do
11093  # Extract the first word of "$ac_prog", so it can be a program name with args.
11094set dummy $ac_prog; ac_word=$2
11095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11096$as_echo_n "checking for $ac_word... " >&6; }
11097if ${ac_cv_path_WHICH+:} false; then :
11098  $as_echo_n "(cached) " >&6
11099else
11100  case $WHICH in
11101  [\\/]* | ?:[\\/]*)
11102  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11103  ;;
11104  *)
11105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11106for as_dir in $PATH
11107do
11108  IFS=$as_save_IFS
11109  test -z "$as_dir" && as_dir=.
11110    for ac_exec_ext in '' $ac_executable_extensions; do
11111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11112    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11114    break 2
11115  fi
11116done
11117  done
11118IFS=$as_save_IFS
11119
11120  ;;
11121esac
11122fi
11123WHICH=$ac_cv_path_WHICH
11124if test -n "$WHICH"; then
11125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11126$as_echo "$WHICH" >&6; }
11127else
11128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11129$as_echo "no" >&6; }
11130fi
11131
11132
11133  test -n "$WHICH" && break
11134done
11135
11136    else
11137      # If it succeeded, then it was overridden by the user. We will use it
11138      # for the tool.
11139
11140      # First remove it from the list of overridden variables, so we can test
11141      # for unknown variables in the end.
11142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11143
11144      # Check if the provided tool contains a complete path.
11145      tool_specified="$WHICH"
11146      tool_basename="${tool_specified##*/}"
11147      if test "x$tool_basename" = "x$tool_specified"; then
11148        # A command without a complete path is provided, search $PATH.
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11150$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11151        # Extract the first word of "$tool_basename", so it can be a program name with args.
11152set dummy $tool_basename; ac_word=$2
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11154$as_echo_n "checking for $ac_word... " >&6; }
11155if ${ac_cv_path_WHICH+:} false; then :
11156  $as_echo_n "(cached) " >&6
11157else
11158  case $WHICH in
11159  [\\/]* | ?:[\\/]*)
11160  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11161  ;;
11162  *)
11163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11164for as_dir in $PATH
11165do
11166  IFS=$as_save_IFS
11167  test -z "$as_dir" && as_dir=.
11168    for ac_exec_ext in '' $ac_executable_extensions; do
11169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11170    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11172    break 2
11173  fi
11174done
11175  done
11176IFS=$as_save_IFS
11177
11178  ;;
11179esac
11180fi
11181WHICH=$ac_cv_path_WHICH
11182if test -n "$WHICH"; then
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11184$as_echo "$WHICH" >&6; }
11185else
11186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
11188fi
11189
11190
11191        if test "x$WHICH" = x; then
11192          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11193        fi
11194      else
11195        # Otherwise we believe it is a complete path. Use it as it is.
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11197$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11199$as_echo_n "checking for WHICH... " >&6; }
11200        if test ! -x "$tool_specified"; then
11201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11202$as_echo "not found" >&6; }
11203          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11204        fi
11205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11206$as_echo "$tool_specified" >&6; }
11207      fi
11208    fi
11209  fi
11210
11211
11212
11213  if test "x$WHICH" = x; then
11214    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11215  fi
11216
11217
11218
11219
11220
11221  # Publish this variable in the help.
11222
11223
11224  if test "x$XARGS" = x; then
11225    # The variable is not set by user, try to locate tool using the code snippet
11226    for ac_prog in xargs
11227do
11228  # Extract the first word of "$ac_prog", so it can be a program name with args.
11229set dummy $ac_prog; ac_word=$2
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11231$as_echo_n "checking for $ac_word... " >&6; }
11232if ${ac_cv_path_XARGS+:} false; then :
11233  $as_echo_n "(cached) " >&6
11234else
11235  case $XARGS in
11236  [\\/]* | ?:[\\/]*)
11237  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11238  ;;
11239  *)
11240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243  IFS=$as_save_IFS
11244  test -z "$as_dir" && as_dir=.
11245    for ac_exec_ext in '' $ac_executable_extensions; do
11246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249    break 2
11250  fi
11251done
11252  done
11253IFS=$as_save_IFS
11254
11255  ;;
11256esac
11257fi
11258XARGS=$ac_cv_path_XARGS
11259if test -n "$XARGS"; then
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11261$as_echo "$XARGS" >&6; }
11262else
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
11265fi
11266
11267
11268  test -n "$XARGS" && break
11269done
11270
11271  else
11272    # The variable is set, but is it from the command line or the environment?
11273
11274    # Try to remove the string !XARGS! from our list.
11275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11277      # If it failed, the variable was not from the command line. Ignore it,
11278      # but warn the user (except for BASH, which is always set by the calling BASH).
11279      if test "xXARGS" != xBASH; then
11280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11281$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11282      fi
11283      # Try to locate tool using the code snippet
11284      for ac_prog in xargs
11285do
11286  # Extract the first word of "$ac_prog", so it can be a program name with args.
11287set dummy $ac_prog; ac_word=$2
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289$as_echo_n "checking for $ac_word... " >&6; }
11290if ${ac_cv_path_XARGS+:} false; then :
11291  $as_echo_n "(cached) " >&6
11292else
11293  case $XARGS in
11294  [\\/]* | ?:[\\/]*)
11295  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11296  ;;
11297  *)
11298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299for as_dir in $PATH
11300do
11301  IFS=$as_save_IFS
11302  test -z "$as_dir" && as_dir=.
11303    for ac_exec_ext in '' $ac_executable_extensions; do
11304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307    break 2
11308  fi
11309done
11310  done
11311IFS=$as_save_IFS
11312
11313  ;;
11314esac
11315fi
11316XARGS=$ac_cv_path_XARGS
11317if test -n "$XARGS"; then
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11319$as_echo "$XARGS" >&6; }
11320else
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
11323fi
11324
11325
11326  test -n "$XARGS" && break
11327done
11328
11329    else
11330      # If it succeeded, then it was overridden by the user. We will use it
11331      # for the tool.
11332
11333      # First remove it from the list of overridden variables, so we can test
11334      # for unknown variables in the end.
11335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11336
11337      # Check if the provided tool contains a complete path.
11338      tool_specified="$XARGS"
11339      tool_basename="${tool_specified##*/}"
11340      if test "x$tool_basename" = "x$tool_specified"; then
11341        # A command without a complete path is provided, search $PATH.
11342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11343$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11344        # Extract the first word of "$tool_basename", so it can be a program name with args.
11345set dummy $tool_basename; ac_word=$2
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11347$as_echo_n "checking for $ac_word... " >&6; }
11348if ${ac_cv_path_XARGS+:} false; then :
11349  $as_echo_n "(cached) " >&6
11350else
11351  case $XARGS in
11352  [\\/]* | ?:[\\/]*)
11353  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11354  ;;
11355  *)
11356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357for as_dir in $PATH
11358do
11359  IFS=$as_save_IFS
11360  test -z "$as_dir" && as_dir=.
11361    for ac_exec_ext in '' $ac_executable_extensions; do
11362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11363    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11365    break 2
11366  fi
11367done
11368  done
11369IFS=$as_save_IFS
11370
11371  ;;
11372esac
11373fi
11374XARGS=$ac_cv_path_XARGS
11375if test -n "$XARGS"; then
11376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11377$as_echo "$XARGS" >&6; }
11378else
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
11381fi
11382
11383
11384        if test "x$XARGS" = x; then
11385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11386        fi
11387      else
11388        # Otherwise we believe it is a complete path. Use it as it is.
11389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11390$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11392$as_echo_n "checking for XARGS... " >&6; }
11393        if test ! -x "$tool_specified"; then
11394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11395$as_echo "not found" >&6; }
11396          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11397        fi
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11399$as_echo "$tool_specified" >&6; }
11400      fi
11401    fi
11402  fi
11403
11404
11405
11406  if test "x$XARGS" = x; then
11407    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11408  fi
11409
11410
11411
11412  # Then required tools that require some special treatment.
11413
11414
11415  # Publish this variable in the help.
11416
11417
11418  if test "x$AWK" = x; then
11419    # The variable is not set by user, try to locate tool using the code snippet
11420    for ac_prog in gawk mawk nawk awk
11421do
11422  # Extract the first word of "$ac_prog", so it can be a program name with args.
11423set dummy $ac_prog; ac_word=$2
11424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11425$as_echo_n "checking for $ac_word... " >&6; }
11426if ${ac_cv_prog_AWK+:} false; then :
11427  $as_echo_n "(cached) " >&6
11428else
11429  if test -n "$AWK"; then
11430  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11431else
11432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11433for as_dir in $PATH
11434do
11435  IFS=$as_save_IFS
11436  test -z "$as_dir" && as_dir=.
11437    for ac_exec_ext in '' $ac_executable_extensions; do
11438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11439    ac_cv_prog_AWK="$ac_prog"
11440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11441    break 2
11442  fi
11443done
11444  done
11445IFS=$as_save_IFS
11446
11447fi
11448fi
11449AWK=$ac_cv_prog_AWK
11450if test -n "$AWK"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11452$as_echo "$AWK" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459  test -n "$AWK" && break
11460done
11461
11462  else
11463    # The variable is set, but is it from the command line or the environment?
11464
11465    # Try to remove the string !AWK! from our list.
11466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11468      # If it failed, the variable was not from the command line. Ignore it,
11469      # but warn the user (except for BASH, which is always set by the calling BASH).
11470      if test "xAWK" != xBASH; then
11471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11472$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11473      fi
11474      # Try to locate tool using the code snippet
11475      for ac_prog in gawk mawk nawk awk
11476do
11477  # Extract the first word of "$ac_prog", so it can be a program name with args.
11478set dummy $ac_prog; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_prog_AWK+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  if test -n "$AWK"; then
11485  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11486else
11487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11488for as_dir in $PATH
11489do
11490  IFS=$as_save_IFS
11491  test -z "$as_dir" && as_dir=.
11492    for ac_exec_ext in '' $ac_executable_extensions; do
11493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11494    ac_cv_prog_AWK="$ac_prog"
11495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11496    break 2
11497  fi
11498done
11499  done
11500IFS=$as_save_IFS
11501
11502fi
11503fi
11504AWK=$ac_cv_prog_AWK
11505if test -n "$AWK"; then
11506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11507$as_echo "$AWK" >&6; }
11508else
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
11511fi
11512
11513
11514  test -n "$AWK" && break
11515done
11516
11517    else
11518      # If it succeeded, then it was overridden by the user. We will use it
11519      # for the tool.
11520
11521      # First remove it from the list of overridden variables, so we can test
11522      # for unknown variables in the end.
11523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11524
11525      # Check if the provided tool contains a complete path.
11526      tool_specified="$AWK"
11527      tool_basename="${tool_specified##*/}"
11528      if test "x$tool_basename" = "x$tool_specified"; then
11529        # A command without a complete path is provided, search $PATH.
11530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11531$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11532        # Extract the first word of "$tool_basename", so it can be a program name with args.
11533set dummy $tool_basename; ac_word=$2
11534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11535$as_echo_n "checking for $ac_word... " >&6; }
11536if ${ac_cv_path_AWK+:} false; then :
11537  $as_echo_n "(cached) " >&6
11538else
11539  case $AWK in
11540  [\\/]* | ?:[\\/]*)
11541  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11542  ;;
11543  *)
11544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11545for as_dir in $PATH
11546do
11547  IFS=$as_save_IFS
11548  test -z "$as_dir" && as_dir=.
11549    for ac_exec_ext in '' $ac_executable_extensions; do
11550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11551    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11553    break 2
11554  fi
11555done
11556  done
11557IFS=$as_save_IFS
11558
11559  ;;
11560esac
11561fi
11562AWK=$ac_cv_path_AWK
11563if test -n "$AWK"; then
11564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11565$as_echo "$AWK" >&6; }
11566else
11567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
11569fi
11570
11571
11572        if test "x$AWK" = x; then
11573          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11574        fi
11575      else
11576        # Otherwise we believe it is a complete path. Use it as it is.
11577        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11578$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11580$as_echo_n "checking for AWK... " >&6; }
11581        if test ! -x "$tool_specified"; then
11582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11583$as_echo "not found" >&6; }
11584          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11585        fi
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11587$as_echo "$tool_specified" >&6; }
11588      fi
11589    fi
11590  fi
11591
11592
11593  if test "x$AWK" = x; then
11594    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11595  fi
11596
11597
11598
11599
11600  # Publish this variable in the help.
11601
11602
11603  if test "x$GREP" = x; then
11604    # The variable is not set by user, try to locate tool using the code snippet
11605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11606$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11607if ${ac_cv_path_GREP+:} false; then :
11608  $as_echo_n "(cached) " >&6
11609else
11610  if test -z "$GREP"; then
11611  ac_path_GREP_found=false
11612  # Loop through the user's path and test for each of PROGNAME-LIST
11613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11614for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11615do
11616  IFS=$as_save_IFS
11617  test -z "$as_dir" && as_dir=.
11618    for ac_prog in grep ggrep; do
11619    for ac_exec_ext in '' $ac_executable_extensions; do
11620      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11621      as_fn_executable_p "$ac_path_GREP" || continue
11622# Check for GNU ac_path_GREP and select it if it is found.
11623  # Check for GNU $ac_path_GREP
11624case `"$ac_path_GREP" --version 2>&1` in
11625*GNU*)
11626  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11627*)
11628  ac_count=0
11629  $as_echo_n 0123456789 >"conftest.in"
11630  while :
11631  do
11632    cat "conftest.in" "conftest.in" >"conftest.tmp"
11633    mv "conftest.tmp" "conftest.in"
11634    cp "conftest.in" "conftest.nl"
11635    $as_echo 'GREP' >> "conftest.nl"
11636    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11637    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11638    as_fn_arith $ac_count + 1 && ac_count=$as_val
11639    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11640      # Best one so far, save it but keep looking for a better one
11641      ac_cv_path_GREP="$ac_path_GREP"
11642      ac_path_GREP_max=$ac_count
11643    fi
11644    # 10*(2^10) chars as input seems more than enough
11645    test $ac_count -gt 10 && break
11646  done
11647  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11648esac
11649
11650      $ac_path_GREP_found && break 3
11651    done
11652  done
11653  done
11654IFS=$as_save_IFS
11655  if test -z "$ac_cv_path_GREP"; then
11656    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11657  fi
11658else
11659  ac_cv_path_GREP=$GREP
11660fi
11661
11662fi
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11664$as_echo "$ac_cv_path_GREP" >&6; }
11665 GREP="$ac_cv_path_GREP"
11666
11667
11668  else
11669    # The variable is set, but is it from the command line or the environment?
11670
11671    # Try to remove the string !GREP! from our list.
11672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11674      # If it failed, the variable was not from the command line. Ignore it,
11675      # but warn the user (except for BASH, which is always set by the calling BASH).
11676      if test "xGREP" != xBASH; then
11677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11678$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11679      fi
11680      # Try to locate tool using the code snippet
11681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11682$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11683if ${ac_cv_path_GREP+:} false; then :
11684  $as_echo_n "(cached) " >&6
11685else
11686  if test -z "$GREP"; then
11687  ac_path_GREP_found=false
11688  # Loop through the user's path and test for each of PROGNAME-LIST
11689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11690for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11691do
11692  IFS=$as_save_IFS
11693  test -z "$as_dir" && as_dir=.
11694    for ac_prog in grep ggrep; do
11695    for ac_exec_ext in '' $ac_executable_extensions; do
11696      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11697      as_fn_executable_p "$ac_path_GREP" || continue
11698# Check for GNU ac_path_GREP and select it if it is found.
11699  # Check for GNU $ac_path_GREP
11700case `"$ac_path_GREP" --version 2>&1` in
11701*GNU*)
11702  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11703*)
11704  ac_count=0
11705  $as_echo_n 0123456789 >"conftest.in"
11706  while :
11707  do
11708    cat "conftest.in" "conftest.in" >"conftest.tmp"
11709    mv "conftest.tmp" "conftest.in"
11710    cp "conftest.in" "conftest.nl"
11711    $as_echo 'GREP' >> "conftest.nl"
11712    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11713    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11714    as_fn_arith $ac_count + 1 && ac_count=$as_val
11715    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11716      # Best one so far, save it but keep looking for a better one
11717      ac_cv_path_GREP="$ac_path_GREP"
11718      ac_path_GREP_max=$ac_count
11719    fi
11720    # 10*(2^10) chars as input seems more than enough
11721    test $ac_count -gt 10 && break
11722  done
11723  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11724esac
11725
11726      $ac_path_GREP_found && break 3
11727    done
11728  done
11729  done
11730IFS=$as_save_IFS
11731  if test -z "$ac_cv_path_GREP"; then
11732    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11733  fi
11734else
11735  ac_cv_path_GREP=$GREP
11736fi
11737
11738fi
11739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11740$as_echo "$ac_cv_path_GREP" >&6; }
11741 GREP="$ac_cv_path_GREP"
11742
11743
11744    else
11745      # If it succeeded, then it was overridden by the user. We will use it
11746      # for the tool.
11747
11748      # First remove it from the list of overridden variables, so we can test
11749      # for unknown variables in the end.
11750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11751
11752      # Check if the provided tool contains a complete path.
11753      tool_specified="$GREP"
11754      tool_basename="${tool_specified##*/}"
11755      if test "x$tool_basename" = "x$tool_specified"; then
11756        # A command without a complete path is provided, search $PATH.
11757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11758$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11759        # Extract the first word of "$tool_basename", so it can be a program name with args.
11760set dummy $tool_basename; ac_word=$2
11761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11762$as_echo_n "checking for $ac_word... " >&6; }
11763if ${ac_cv_path_GREP+:} false; then :
11764  $as_echo_n "(cached) " >&6
11765else
11766  case $GREP in
11767  [\\/]* | ?:[\\/]*)
11768  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11769  ;;
11770  *)
11771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11772for as_dir in $PATH
11773do
11774  IFS=$as_save_IFS
11775  test -z "$as_dir" && as_dir=.
11776    for ac_exec_ext in '' $ac_executable_extensions; do
11777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11778    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11780    break 2
11781  fi
11782done
11783  done
11784IFS=$as_save_IFS
11785
11786  ;;
11787esac
11788fi
11789GREP=$ac_cv_path_GREP
11790if test -n "$GREP"; then
11791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11792$as_echo "$GREP" >&6; }
11793else
11794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11795$as_echo "no" >&6; }
11796fi
11797
11798
11799        if test "x$GREP" = x; then
11800          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11801        fi
11802      else
11803        # Otherwise we believe it is a complete path. Use it as it is.
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11805$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11807$as_echo_n "checking for GREP... " >&6; }
11808        if test ! -x "$tool_specified"; then
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11810$as_echo "not found" >&6; }
11811          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11812        fi
11813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11814$as_echo "$tool_specified" >&6; }
11815      fi
11816    fi
11817  fi
11818
11819
11820  if test "x$GREP" = x; then
11821    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11822  fi
11823
11824
11825
11826
11827  # Publish this variable in the help.
11828
11829
11830  if test "x$EGREP" = x; then
11831    # The variable is not set by user, try to locate tool using the code snippet
11832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11833$as_echo_n "checking for egrep... " >&6; }
11834if ${ac_cv_path_EGREP+:} false; then :
11835  $as_echo_n "(cached) " >&6
11836else
11837  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11838   then ac_cv_path_EGREP="$GREP -E"
11839   else
11840     if test -z "$EGREP"; then
11841  ac_path_EGREP_found=false
11842  # Loop through the user's path and test for each of PROGNAME-LIST
11843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11844for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11845do
11846  IFS=$as_save_IFS
11847  test -z "$as_dir" && as_dir=.
11848    for ac_prog in egrep; do
11849    for ac_exec_ext in '' $ac_executable_extensions; do
11850      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11851      as_fn_executable_p "$ac_path_EGREP" || continue
11852# Check for GNU ac_path_EGREP and select it if it is found.
11853  # Check for GNU $ac_path_EGREP
11854case `"$ac_path_EGREP" --version 2>&1` in
11855*GNU*)
11856  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11857*)
11858  ac_count=0
11859  $as_echo_n 0123456789 >"conftest.in"
11860  while :
11861  do
11862    cat "conftest.in" "conftest.in" >"conftest.tmp"
11863    mv "conftest.tmp" "conftest.in"
11864    cp "conftest.in" "conftest.nl"
11865    $as_echo 'EGREP' >> "conftest.nl"
11866    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11867    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11868    as_fn_arith $ac_count + 1 && ac_count=$as_val
11869    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11870      # Best one so far, save it but keep looking for a better one
11871      ac_cv_path_EGREP="$ac_path_EGREP"
11872      ac_path_EGREP_max=$ac_count
11873    fi
11874    # 10*(2^10) chars as input seems more than enough
11875    test $ac_count -gt 10 && break
11876  done
11877  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11878esac
11879
11880      $ac_path_EGREP_found && break 3
11881    done
11882  done
11883  done
11884IFS=$as_save_IFS
11885  if test -z "$ac_cv_path_EGREP"; then
11886    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11887  fi
11888else
11889  ac_cv_path_EGREP=$EGREP
11890fi
11891
11892   fi
11893fi
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11895$as_echo "$ac_cv_path_EGREP" >&6; }
11896 EGREP="$ac_cv_path_EGREP"
11897
11898
11899  else
11900    # The variable is set, but is it from the command line or the environment?
11901
11902    # Try to remove the string !EGREP! from our list.
11903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11905      # If it failed, the variable was not from the command line. Ignore it,
11906      # but warn the user (except for BASH, which is always set by the calling BASH).
11907      if test "xEGREP" != xBASH; then
11908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11909$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11910      fi
11911      # Try to locate tool using the code snippet
11912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11913$as_echo_n "checking for egrep... " >&6; }
11914if ${ac_cv_path_EGREP+:} false; then :
11915  $as_echo_n "(cached) " >&6
11916else
11917  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11918   then ac_cv_path_EGREP="$GREP -E"
11919   else
11920     if test -z "$EGREP"; then
11921  ac_path_EGREP_found=false
11922  # Loop through the user's path and test for each of PROGNAME-LIST
11923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11925do
11926  IFS=$as_save_IFS
11927  test -z "$as_dir" && as_dir=.
11928    for ac_prog in egrep; do
11929    for ac_exec_ext in '' $ac_executable_extensions; do
11930      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11931      as_fn_executable_p "$ac_path_EGREP" || continue
11932# Check for GNU ac_path_EGREP and select it if it is found.
11933  # Check for GNU $ac_path_EGREP
11934case `"$ac_path_EGREP" --version 2>&1` in
11935*GNU*)
11936  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11937*)
11938  ac_count=0
11939  $as_echo_n 0123456789 >"conftest.in"
11940  while :
11941  do
11942    cat "conftest.in" "conftest.in" >"conftest.tmp"
11943    mv "conftest.tmp" "conftest.in"
11944    cp "conftest.in" "conftest.nl"
11945    $as_echo 'EGREP' >> "conftest.nl"
11946    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11947    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11948    as_fn_arith $ac_count + 1 && ac_count=$as_val
11949    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11950      # Best one so far, save it but keep looking for a better one
11951      ac_cv_path_EGREP="$ac_path_EGREP"
11952      ac_path_EGREP_max=$ac_count
11953    fi
11954    # 10*(2^10) chars as input seems more than enough
11955    test $ac_count -gt 10 && break
11956  done
11957  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11958esac
11959
11960      $ac_path_EGREP_found && break 3
11961    done
11962  done
11963  done
11964IFS=$as_save_IFS
11965  if test -z "$ac_cv_path_EGREP"; then
11966    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11967  fi
11968else
11969  ac_cv_path_EGREP=$EGREP
11970fi
11971
11972   fi
11973fi
11974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11975$as_echo "$ac_cv_path_EGREP" >&6; }
11976 EGREP="$ac_cv_path_EGREP"
11977
11978
11979    else
11980      # If it succeeded, then it was overridden by the user. We will use it
11981      # for the tool.
11982
11983      # First remove it from the list of overridden variables, so we can test
11984      # for unknown variables in the end.
11985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11986
11987      # Check if the provided tool contains a complete path.
11988      tool_specified="$EGREP"
11989      tool_basename="${tool_specified##*/}"
11990      if test "x$tool_basename" = "x$tool_specified"; then
11991        # A command without a complete path is provided, search $PATH.
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11993$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11994        # Extract the first word of "$tool_basename", so it can be a program name with args.
11995set dummy $tool_basename; ac_word=$2
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11997$as_echo_n "checking for $ac_word... " >&6; }
11998if ${ac_cv_path_EGREP+:} false; then :
11999  $as_echo_n "(cached) " >&6
12000else
12001  case $EGREP in
12002  [\\/]* | ?:[\\/]*)
12003  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12004  ;;
12005  *)
12006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12007for as_dir in $PATH
12008do
12009  IFS=$as_save_IFS
12010  test -z "$as_dir" && as_dir=.
12011    for ac_exec_ext in '' $ac_executable_extensions; do
12012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12013    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12015    break 2
12016  fi
12017done
12018  done
12019IFS=$as_save_IFS
12020
12021  ;;
12022esac
12023fi
12024EGREP=$ac_cv_path_EGREP
12025if test -n "$EGREP"; then
12026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12027$as_echo "$EGREP" >&6; }
12028else
12029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12030$as_echo "no" >&6; }
12031fi
12032
12033
12034        if test "x$EGREP" = x; then
12035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12036        fi
12037      else
12038        # Otherwise we believe it is a complete path. Use it as it is.
12039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12040$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12042$as_echo_n "checking for EGREP... " >&6; }
12043        if test ! -x "$tool_specified"; then
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12045$as_echo "not found" >&6; }
12046          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12047        fi
12048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12049$as_echo "$tool_specified" >&6; }
12050      fi
12051    fi
12052  fi
12053
12054
12055  if test "x$EGREP" = x; then
12056    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12057  fi
12058
12059
12060
12061
12062  # Publish this variable in the help.
12063
12064
12065  if test "x$FGREP" = x; then
12066    # The variable is not set by user, try to locate tool using the code snippet
12067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12068$as_echo_n "checking for fgrep... " >&6; }
12069if ${ac_cv_path_FGREP+:} false; then :
12070  $as_echo_n "(cached) " >&6
12071else
12072  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12073   then ac_cv_path_FGREP="$GREP -F"
12074   else
12075     if test -z "$FGREP"; then
12076  ac_path_FGREP_found=false
12077  # Loop through the user's path and test for each of PROGNAME-LIST
12078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12079for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12080do
12081  IFS=$as_save_IFS
12082  test -z "$as_dir" && as_dir=.
12083    for ac_prog in fgrep; do
12084    for ac_exec_ext in '' $ac_executable_extensions; do
12085      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12086      as_fn_executable_p "$ac_path_FGREP" || continue
12087# Check for GNU ac_path_FGREP and select it if it is found.
12088  # Check for GNU $ac_path_FGREP
12089case `"$ac_path_FGREP" --version 2>&1` in
12090*GNU*)
12091  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12092*)
12093  ac_count=0
12094  $as_echo_n 0123456789 >"conftest.in"
12095  while :
12096  do
12097    cat "conftest.in" "conftest.in" >"conftest.tmp"
12098    mv "conftest.tmp" "conftest.in"
12099    cp "conftest.in" "conftest.nl"
12100    $as_echo 'FGREP' >> "conftest.nl"
12101    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12102    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12103    as_fn_arith $ac_count + 1 && ac_count=$as_val
12104    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12105      # Best one so far, save it but keep looking for a better one
12106      ac_cv_path_FGREP="$ac_path_FGREP"
12107      ac_path_FGREP_max=$ac_count
12108    fi
12109    # 10*(2^10) chars as input seems more than enough
12110    test $ac_count -gt 10 && break
12111  done
12112  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12113esac
12114
12115      $ac_path_FGREP_found && break 3
12116    done
12117  done
12118  done
12119IFS=$as_save_IFS
12120  if test -z "$ac_cv_path_FGREP"; then
12121    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12122  fi
12123else
12124  ac_cv_path_FGREP=$FGREP
12125fi
12126
12127   fi
12128fi
12129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12130$as_echo "$ac_cv_path_FGREP" >&6; }
12131 FGREP="$ac_cv_path_FGREP"
12132
12133
12134  else
12135    # The variable is set, but is it from the command line or the environment?
12136
12137    # Try to remove the string !FGREP! from our list.
12138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12140      # If it failed, the variable was not from the command line. Ignore it,
12141      # but warn the user (except for BASH, which is always set by the calling BASH).
12142      if test "xFGREP" != xBASH; then
12143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12144$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12145      fi
12146      # Try to locate tool using the code snippet
12147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12148$as_echo_n "checking for fgrep... " >&6; }
12149if ${ac_cv_path_FGREP+:} false; then :
12150  $as_echo_n "(cached) " >&6
12151else
12152  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12153   then ac_cv_path_FGREP="$GREP -F"
12154   else
12155     if test -z "$FGREP"; then
12156  ac_path_FGREP_found=false
12157  # Loop through the user's path and test for each of PROGNAME-LIST
12158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12160do
12161  IFS=$as_save_IFS
12162  test -z "$as_dir" && as_dir=.
12163    for ac_prog in fgrep; do
12164    for ac_exec_ext in '' $ac_executable_extensions; do
12165      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12166      as_fn_executable_p "$ac_path_FGREP" || continue
12167# Check for GNU ac_path_FGREP and select it if it is found.
12168  # Check for GNU $ac_path_FGREP
12169case `"$ac_path_FGREP" --version 2>&1` in
12170*GNU*)
12171  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12172*)
12173  ac_count=0
12174  $as_echo_n 0123456789 >"conftest.in"
12175  while :
12176  do
12177    cat "conftest.in" "conftest.in" >"conftest.tmp"
12178    mv "conftest.tmp" "conftest.in"
12179    cp "conftest.in" "conftest.nl"
12180    $as_echo 'FGREP' >> "conftest.nl"
12181    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12182    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12183    as_fn_arith $ac_count + 1 && ac_count=$as_val
12184    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12185      # Best one so far, save it but keep looking for a better one
12186      ac_cv_path_FGREP="$ac_path_FGREP"
12187      ac_path_FGREP_max=$ac_count
12188    fi
12189    # 10*(2^10) chars as input seems more than enough
12190    test $ac_count -gt 10 && break
12191  done
12192  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12193esac
12194
12195      $ac_path_FGREP_found && break 3
12196    done
12197  done
12198  done
12199IFS=$as_save_IFS
12200  if test -z "$ac_cv_path_FGREP"; then
12201    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12202  fi
12203else
12204  ac_cv_path_FGREP=$FGREP
12205fi
12206
12207   fi
12208fi
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12210$as_echo "$ac_cv_path_FGREP" >&6; }
12211 FGREP="$ac_cv_path_FGREP"
12212
12213
12214    else
12215      # If it succeeded, then it was overridden by the user. We will use it
12216      # for the tool.
12217
12218      # First remove it from the list of overridden variables, so we can test
12219      # for unknown variables in the end.
12220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12221
12222      # Check if the provided tool contains a complete path.
12223      tool_specified="$FGREP"
12224      tool_basename="${tool_specified##*/}"
12225      if test "x$tool_basename" = "x$tool_specified"; then
12226        # A command without a complete path is provided, search $PATH.
12227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12228$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12229        # Extract the first word of "$tool_basename", so it can be a program name with args.
12230set dummy $tool_basename; ac_word=$2
12231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12232$as_echo_n "checking for $ac_word... " >&6; }
12233if ${ac_cv_path_FGREP+:} false; then :
12234  $as_echo_n "(cached) " >&6
12235else
12236  case $FGREP in
12237  [\\/]* | ?:[\\/]*)
12238  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12239  ;;
12240  *)
12241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12242for as_dir in $PATH
12243do
12244  IFS=$as_save_IFS
12245  test -z "$as_dir" && as_dir=.
12246    for ac_exec_ext in '' $ac_executable_extensions; do
12247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12248    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12250    break 2
12251  fi
12252done
12253  done
12254IFS=$as_save_IFS
12255
12256  ;;
12257esac
12258fi
12259FGREP=$ac_cv_path_FGREP
12260if test -n "$FGREP"; then
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12262$as_echo "$FGREP" >&6; }
12263else
12264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
12266fi
12267
12268
12269        if test "x$FGREP" = x; then
12270          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12271        fi
12272      else
12273        # Otherwise we believe it is a complete path. Use it as it is.
12274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12275$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12277$as_echo_n "checking for FGREP... " >&6; }
12278        if test ! -x "$tool_specified"; then
12279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12280$as_echo "not found" >&6; }
12281          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12282        fi
12283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12284$as_echo "$tool_specified" >&6; }
12285      fi
12286    fi
12287  fi
12288
12289
12290  if test "x$FGREP" = x; then
12291    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12292  fi
12293
12294
12295
12296
12297  # Publish this variable in the help.
12298
12299
12300  if test "x$SED" = x; then
12301    # The variable is not set by user, try to locate tool using the code snippet
12302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12303$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12304if ${ac_cv_path_SED+:} false; then :
12305  $as_echo_n "(cached) " >&6
12306else
12307            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12308     for ac_i in 1 2 3 4 5 6 7; do
12309       ac_script="$ac_script$as_nl$ac_script"
12310     done
12311     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12312     { ac_script=; unset ac_script;}
12313     if test -z "$SED"; then
12314  ac_path_SED_found=false
12315  # Loop through the user's path and test for each of PROGNAME-LIST
12316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_prog in sed gsed; do
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12324      as_fn_executable_p "$ac_path_SED" || continue
12325# Check for GNU ac_path_SED and select it if it is found.
12326  # Check for GNU $ac_path_SED
12327case `"$ac_path_SED" --version 2>&1` in
12328*GNU*)
12329  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12330*)
12331  ac_count=0
12332  $as_echo_n 0123456789 >"conftest.in"
12333  while :
12334  do
12335    cat "conftest.in" "conftest.in" >"conftest.tmp"
12336    mv "conftest.tmp" "conftest.in"
12337    cp "conftest.in" "conftest.nl"
12338    $as_echo '' >> "conftest.nl"
12339    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12340    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12341    as_fn_arith $ac_count + 1 && ac_count=$as_val
12342    if test $ac_count -gt ${ac_path_SED_max-0}; then
12343      # Best one so far, save it but keep looking for a better one
12344      ac_cv_path_SED="$ac_path_SED"
12345      ac_path_SED_max=$ac_count
12346    fi
12347    # 10*(2^10) chars as input seems more than enough
12348    test $ac_count -gt 10 && break
12349  done
12350  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12351esac
12352
12353      $ac_path_SED_found && break 3
12354    done
12355  done
12356  done
12357IFS=$as_save_IFS
12358  if test -z "$ac_cv_path_SED"; then
12359    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12360  fi
12361else
12362  ac_cv_path_SED=$SED
12363fi
12364
12365fi
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12367$as_echo "$ac_cv_path_SED" >&6; }
12368 SED="$ac_cv_path_SED"
12369  rm -f conftest.sed
12370
12371  else
12372    # The variable is set, but is it from the command line or the environment?
12373
12374    # Try to remove the string !SED! from our list.
12375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12377      # If it failed, the variable was not from the command line. Ignore it,
12378      # but warn the user (except for BASH, which is always set by the calling BASH).
12379      if test "xSED" != xBASH; then
12380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12381$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12382      fi
12383      # Try to locate tool using the code snippet
12384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12385$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12386if ${ac_cv_path_SED+:} false; then :
12387  $as_echo_n "(cached) " >&6
12388else
12389            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12390     for ac_i in 1 2 3 4 5 6 7; do
12391       ac_script="$ac_script$as_nl$ac_script"
12392     done
12393     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12394     { ac_script=; unset ac_script;}
12395     if test -z "$SED"; then
12396  ac_path_SED_found=false
12397  # Loop through the user's path and test for each of PROGNAME-LIST
12398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399for as_dir in $PATH
12400do
12401  IFS=$as_save_IFS
12402  test -z "$as_dir" && as_dir=.
12403    for ac_prog in sed gsed; do
12404    for ac_exec_ext in '' $ac_executable_extensions; do
12405      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12406      as_fn_executable_p "$ac_path_SED" || continue
12407# Check for GNU ac_path_SED and select it if it is found.
12408  # Check for GNU $ac_path_SED
12409case `"$ac_path_SED" --version 2>&1` in
12410*GNU*)
12411  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12412*)
12413  ac_count=0
12414  $as_echo_n 0123456789 >"conftest.in"
12415  while :
12416  do
12417    cat "conftest.in" "conftest.in" >"conftest.tmp"
12418    mv "conftest.tmp" "conftest.in"
12419    cp "conftest.in" "conftest.nl"
12420    $as_echo '' >> "conftest.nl"
12421    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12422    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12423    as_fn_arith $ac_count + 1 && ac_count=$as_val
12424    if test $ac_count -gt ${ac_path_SED_max-0}; then
12425      # Best one so far, save it but keep looking for a better one
12426      ac_cv_path_SED="$ac_path_SED"
12427      ac_path_SED_max=$ac_count
12428    fi
12429    # 10*(2^10) chars as input seems more than enough
12430    test $ac_count -gt 10 && break
12431  done
12432  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12433esac
12434
12435      $ac_path_SED_found && break 3
12436    done
12437  done
12438  done
12439IFS=$as_save_IFS
12440  if test -z "$ac_cv_path_SED"; then
12441    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12442  fi
12443else
12444  ac_cv_path_SED=$SED
12445fi
12446
12447fi
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12449$as_echo "$ac_cv_path_SED" >&6; }
12450 SED="$ac_cv_path_SED"
12451  rm -f conftest.sed
12452
12453    else
12454      # If it succeeded, then it was overridden by the user. We will use it
12455      # for the tool.
12456
12457      # First remove it from the list of overridden variables, so we can test
12458      # for unknown variables in the end.
12459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12460
12461      # Check if the provided tool contains a complete path.
12462      tool_specified="$SED"
12463      tool_basename="${tool_specified##*/}"
12464      if test "x$tool_basename" = "x$tool_specified"; then
12465        # A command without a complete path is provided, search $PATH.
12466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12467$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12468        # Extract the first word of "$tool_basename", so it can be a program name with args.
12469set dummy $tool_basename; ac_word=$2
12470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12471$as_echo_n "checking for $ac_word... " >&6; }
12472if ${ac_cv_path_SED+:} false; then :
12473  $as_echo_n "(cached) " >&6
12474else
12475  case $SED in
12476  [\\/]* | ?:[\\/]*)
12477  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12478  ;;
12479  *)
12480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481for as_dir in $PATH
12482do
12483  IFS=$as_save_IFS
12484  test -z "$as_dir" && as_dir=.
12485    for ac_exec_ext in '' $ac_executable_extensions; do
12486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12487    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12489    break 2
12490  fi
12491done
12492  done
12493IFS=$as_save_IFS
12494
12495  ;;
12496esac
12497fi
12498SED=$ac_cv_path_SED
12499if test -n "$SED"; then
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12501$as_echo "$SED" >&6; }
12502else
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504$as_echo "no" >&6; }
12505fi
12506
12507
12508        if test "x$SED" = x; then
12509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12510        fi
12511      else
12512        # Otherwise we believe it is a complete path. Use it as it is.
12513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12514$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12516$as_echo_n "checking for SED... " >&6; }
12517        if test ! -x "$tool_specified"; then
12518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12519$as_echo "not found" >&6; }
12520          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12521        fi
12522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12523$as_echo "$tool_specified" >&6; }
12524      fi
12525    fi
12526  fi
12527
12528
12529  if test "x$SED" = x; then
12530    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12531  fi
12532
12533
12534
12535  # Always force rm.
12536  RM="$RM -f"
12537
12538  # pwd behaves differently on various platforms and some don't support the -L flag.
12539  # Always use the bash builtin pwd to get uniform behavior.
12540  THEPWDCMD=pwd
12541
12542  # These are not required on all platforms
12543
12544
12545  # Publish this variable in the help.
12546
12547
12548  if test "x$CYGPATH" = x; then
12549    # The variable is not set by user, try to locate tool using the code snippet
12550    for ac_prog in cygpath
12551do
12552  # Extract the first word of "$ac_prog", so it can be a program name with args.
12553set dummy $ac_prog; ac_word=$2
12554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12555$as_echo_n "checking for $ac_word... " >&6; }
12556if ${ac_cv_path_CYGPATH+:} false; then :
12557  $as_echo_n "(cached) " >&6
12558else
12559  case $CYGPATH in
12560  [\\/]* | ?:[\\/]*)
12561  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12562  ;;
12563  *)
12564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12565for as_dir in $PATH
12566do
12567  IFS=$as_save_IFS
12568  test -z "$as_dir" && as_dir=.
12569    for ac_exec_ext in '' $ac_executable_extensions; do
12570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12571    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12573    break 2
12574  fi
12575done
12576  done
12577IFS=$as_save_IFS
12578
12579  ;;
12580esac
12581fi
12582CYGPATH=$ac_cv_path_CYGPATH
12583if test -n "$CYGPATH"; then
12584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12585$as_echo "$CYGPATH" >&6; }
12586else
12587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12588$as_echo "no" >&6; }
12589fi
12590
12591
12592  test -n "$CYGPATH" && break
12593done
12594
12595  else
12596    # The variable is set, but is it from the command line or the environment?
12597
12598    # Try to remove the string !CYGPATH! from our list.
12599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12601      # If it failed, the variable was not from the command line. Ignore it,
12602      # but warn the user (except for BASH, which is always set by the calling BASH).
12603      if test "xCYGPATH" != xBASH; then
12604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12605$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12606      fi
12607      # Try to locate tool using the code snippet
12608      for ac_prog in cygpath
12609do
12610  # Extract the first word of "$ac_prog", so it can be a program name with args.
12611set dummy $ac_prog; ac_word=$2
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12613$as_echo_n "checking for $ac_word... " >&6; }
12614if ${ac_cv_path_CYGPATH+:} false; then :
12615  $as_echo_n "(cached) " >&6
12616else
12617  case $CYGPATH in
12618  [\\/]* | ?:[\\/]*)
12619  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12620  ;;
12621  *)
12622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12623for as_dir in $PATH
12624do
12625  IFS=$as_save_IFS
12626  test -z "$as_dir" && as_dir=.
12627    for ac_exec_ext in '' $ac_executable_extensions; do
12628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12629    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12631    break 2
12632  fi
12633done
12634  done
12635IFS=$as_save_IFS
12636
12637  ;;
12638esac
12639fi
12640CYGPATH=$ac_cv_path_CYGPATH
12641if test -n "$CYGPATH"; then
12642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12643$as_echo "$CYGPATH" >&6; }
12644else
12645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646$as_echo "no" >&6; }
12647fi
12648
12649
12650  test -n "$CYGPATH" && break
12651done
12652
12653    else
12654      # If it succeeded, then it was overridden by the user. We will use it
12655      # for the tool.
12656
12657      # First remove it from the list of overridden variables, so we can test
12658      # for unknown variables in the end.
12659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12660
12661      # Check if the provided tool contains a complete path.
12662      tool_specified="$CYGPATH"
12663      tool_basename="${tool_specified##*/}"
12664      if test "x$tool_basename" = "x$tool_specified"; then
12665        # A command without a complete path is provided, search $PATH.
12666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12667$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12668        # Extract the first word of "$tool_basename", so it can be a program name with args.
12669set dummy $tool_basename; ac_word=$2
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12671$as_echo_n "checking for $ac_word... " >&6; }
12672if ${ac_cv_path_CYGPATH+:} false; then :
12673  $as_echo_n "(cached) " >&6
12674else
12675  case $CYGPATH in
12676  [\\/]* | ?:[\\/]*)
12677  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12678  ;;
12679  *)
12680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12681for as_dir in $PATH
12682do
12683  IFS=$as_save_IFS
12684  test -z "$as_dir" && as_dir=.
12685    for ac_exec_ext in '' $ac_executable_extensions; do
12686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12687    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12689    break 2
12690  fi
12691done
12692  done
12693IFS=$as_save_IFS
12694
12695  ;;
12696esac
12697fi
12698CYGPATH=$ac_cv_path_CYGPATH
12699if test -n "$CYGPATH"; then
12700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12701$as_echo "$CYGPATH" >&6; }
12702else
12703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12704$as_echo "no" >&6; }
12705fi
12706
12707
12708        if test "x$CYGPATH" = x; then
12709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12710        fi
12711      else
12712        # Otherwise we believe it is a complete path. Use it as it is.
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12714$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12716$as_echo_n "checking for CYGPATH... " >&6; }
12717        if test ! -x "$tool_specified"; then
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12719$as_echo "not found" >&6; }
12720          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12721        fi
12722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12723$as_echo "$tool_specified" >&6; }
12724      fi
12725    fi
12726  fi
12727
12728
12729
12730
12731  # Publish this variable in the help.
12732
12733
12734  if test "x$READLINK" = x; then
12735    # The variable is not set by user, try to locate tool using the code snippet
12736    for ac_prog in greadlink readlink
12737do
12738  # Extract the first word of "$ac_prog", so it can be a program name with args.
12739set dummy $ac_prog; ac_word=$2
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12741$as_echo_n "checking for $ac_word... " >&6; }
12742if ${ac_cv_path_READLINK+:} false; then :
12743  $as_echo_n "(cached) " >&6
12744else
12745  case $READLINK in
12746  [\\/]* | ?:[\\/]*)
12747  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12748  ;;
12749  *)
12750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12751for as_dir in $PATH
12752do
12753  IFS=$as_save_IFS
12754  test -z "$as_dir" && as_dir=.
12755    for ac_exec_ext in '' $ac_executable_extensions; do
12756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12757    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12759    break 2
12760  fi
12761done
12762  done
12763IFS=$as_save_IFS
12764
12765  ;;
12766esac
12767fi
12768READLINK=$ac_cv_path_READLINK
12769if test -n "$READLINK"; then
12770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12771$as_echo "$READLINK" >&6; }
12772else
12773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12774$as_echo "no" >&6; }
12775fi
12776
12777
12778  test -n "$READLINK" && break
12779done
12780
12781  else
12782    # The variable is set, but is it from the command line or the environment?
12783
12784    # Try to remove the string !READLINK! from our list.
12785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12787      # If it failed, the variable was not from the command line. Ignore it,
12788      # but warn the user (except for BASH, which is always set by the calling BASH).
12789      if test "xREADLINK" != xBASH; then
12790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12791$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12792      fi
12793      # Try to locate tool using the code snippet
12794      for ac_prog in greadlink readlink
12795do
12796  # Extract the first word of "$ac_prog", so it can be a program name with args.
12797set dummy $ac_prog; ac_word=$2
12798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12799$as_echo_n "checking for $ac_word... " >&6; }
12800if ${ac_cv_path_READLINK+:} false; then :
12801  $as_echo_n "(cached) " >&6
12802else
12803  case $READLINK in
12804  [\\/]* | ?:[\\/]*)
12805  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12806  ;;
12807  *)
12808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12809for as_dir in $PATH
12810do
12811  IFS=$as_save_IFS
12812  test -z "$as_dir" && as_dir=.
12813    for ac_exec_ext in '' $ac_executable_extensions; do
12814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12815    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12817    break 2
12818  fi
12819done
12820  done
12821IFS=$as_save_IFS
12822
12823  ;;
12824esac
12825fi
12826READLINK=$ac_cv_path_READLINK
12827if test -n "$READLINK"; then
12828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12829$as_echo "$READLINK" >&6; }
12830else
12831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12832$as_echo "no" >&6; }
12833fi
12834
12835
12836  test -n "$READLINK" && break
12837done
12838
12839    else
12840      # If it succeeded, then it was overridden by the user. We will use it
12841      # for the tool.
12842
12843      # First remove it from the list of overridden variables, so we can test
12844      # for unknown variables in the end.
12845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12846
12847      # Check if the provided tool contains a complete path.
12848      tool_specified="$READLINK"
12849      tool_basename="${tool_specified##*/}"
12850      if test "x$tool_basename" = "x$tool_specified"; then
12851        # A command without a complete path is provided, search $PATH.
12852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12853$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12854        # Extract the first word of "$tool_basename", so it can be a program name with args.
12855set dummy $tool_basename; ac_word=$2
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12857$as_echo_n "checking for $ac_word... " >&6; }
12858if ${ac_cv_path_READLINK+:} false; then :
12859  $as_echo_n "(cached) " >&6
12860else
12861  case $READLINK in
12862  [\\/]* | ?:[\\/]*)
12863  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12864  ;;
12865  *)
12866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12867for as_dir in $PATH
12868do
12869  IFS=$as_save_IFS
12870  test -z "$as_dir" && as_dir=.
12871    for ac_exec_ext in '' $ac_executable_extensions; do
12872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12873    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12875    break 2
12876  fi
12877done
12878  done
12879IFS=$as_save_IFS
12880
12881  ;;
12882esac
12883fi
12884READLINK=$ac_cv_path_READLINK
12885if test -n "$READLINK"; then
12886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12887$as_echo "$READLINK" >&6; }
12888else
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12890$as_echo "no" >&6; }
12891fi
12892
12893
12894        if test "x$READLINK" = x; then
12895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12896        fi
12897      else
12898        # Otherwise we believe it is a complete path. Use it as it is.
12899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12900$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12902$as_echo_n "checking for READLINK... " >&6; }
12903        if test ! -x "$tool_specified"; then
12904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12905$as_echo "not found" >&6; }
12906          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12907        fi
12908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12909$as_echo "$tool_specified" >&6; }
12910      fi
12911    fi
12912  fi
12913
12914
12915
12916
12917  # Publish this variable in the help.
12918
12919
12920  if test "x$DF" = x; then
12921    # The variable is not set by user, try to locate tool using the code snippet
12922    for ac_prog in df
12923do
12924  # Extract the first word of "$ac_prog", so it can be a program name with args.
12925set dummy $ac_prog; ac_word=$2
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12927$as_echo_n "checking for $ac_word... " >&6; }
12928if ${ac_cv_path_DF+:} false; then :
12929  $as_echo_n "(cached) " >&6
12930else
12931  case $DF in
12932  [\\/]* | ?:[\\/]*)
12933  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12934  ;;
12935  *)
12936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12937for as_dir in $PATH
12938do
12939  IFS=$as_save_IFS
12940  test -z "$as_dir" && as_dir=.
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12943    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12945    break 2
12946  fi
12947done
12948  done
12949IFS=$as_save_IFS
12950
12951  ;;
12952esac
12953fi
12954DF=$ac_cv_path_DF
12955if test -n "$DF"; then
12956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12957$as_echo "$DF" >&6; }
12958else
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12960$as_echo "no" >&6; }
12961fi
12962
12963
12964  test -n "$DF" && break
12965done
12966
12967  else
12968    # The variable is set, but is it from the command line or the environment?
12969
12970    # Try to remove the string !DF! from our list.
12971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12973      # If it failed, the variable was not from the command line. Ignore it,
12974      # but warn the user (except for BASH, which is always set by the calling BASH).
12975      if test "xDF" != xBASH; then
12976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12977$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12978      fi
12979      # Try to locate tool using the code snippet
12980      for ac_prog in df
12981do
12982  # Extract the first word of "$ac_prog", so it can be a program name with args.
12983set dummy $ac_prog; ac_word=$2
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12985$as_echo_n "checking for $ac_word... " >&6; }
12986if ${ac_cv_path_DF+:} false; then :
12987  $as_echo_n "(cached) " >&6
12988else
12989  case $DF in
12990  [\\/]* | ?:[\\/]*)
12991  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12992  ;;
12993  *)
12994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12995for as_dir in $PATH
12996do
12997  IFS=$as_save_IFS
12998  test -z "$as_dir" && as_dir=.
12999    for ac_exec_ext in '' $ac_executable_extensions; do
13000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13001    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13003    break 2
13004  fi
13005done
13006  done
13007IFS=$as_save_IFS
13008
13009  ;;
13010esac
13011fi
13012DF=$ac_cv_path_DF
13013if test -n "$DF"; then
13014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13015$as_echo "$DF" >&6; }
13016else
13017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13018$as_echo "no" >&6; }
13019fi
13020
13021
13022  test -n "$DF" && break
13023done
13024
13025    else
13026      # If it succeeded, then it was overridden by the user. We will use it
13027      # for the tool.
13028
13029      # First remove it from the list of overridden variables, so we can test
13030      # for unknown variables in the end.
13031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13032
13033      # Check if the provided tool contains a complete path.
13034      tool_specified="$DF"
13035      tool_basename="${tool_specified##*/}"
13036      if test "x$tool_basename" = "x$tool_specified"; then
13037        # A command without a complete path is provided, search $PATH.
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13039$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13040        # Extract the first word of "$tool_basename", so it can be a program name with args.
13041set dummy $tool_basename; ac_word=$2
13042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13043$as_echo_n "checking for $ac_word... " >&6; }
13044if ${ac_cv_path_DF+:} false; then :
13045  $as_echo_n "(cached) " >&6
13046else
13047  case $DF in
13048  [\\/]* | ?:[\\/]*)
13049  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13050  ;;
13051  *)
13052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13053for as_dir in $PATH
13054do
13055  IFS=$as_save_IFS
13056  test -z "$as_dir" && as_dir=.
13057    for ac_exec_ext in '' $ac_executable_extensions; do
13058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13059    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13061    break 2
13062  fi
13063done
13064  done
13065IFS=$as_save_IFS
13066
13067  ;;
13068esac
13069fi
13070DF=$ac_cv_path_DF
13071if test -n "$DF"; then
13072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13073$as_echo "$DF" >&6; }
13074else
13075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13076$as_echo "no" >&6; }
13077fi
13078
13079
13080        if test "x$DF" = x; then
13081          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13082        fi
13083      else
13084        # Otherwise we believe it is a complete path. Use it as it is.
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13086$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13088$as_echo_n "checking for DF... " >&6; }
13089        if test ! -x "$tool_specified"; then
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13091$as_echo "not found" >&6; }
13092          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13093        fi
13094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13095$as_echo "$tool_specified" >&6; }
13096      fi
13097    fi
13098  fi
13099
13100
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if test "x$SETFILE" = x; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    for ac_prog in SetFile
13109do
13110  # Extract the first word of "$ac_prog", so it can be a program name with args.
13111set dummy $ac_prog; ac_word=$2
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113$as_echo_n "checking for $ac_word... " >&6; }
13114if ${ac_cv_path_SETFILE+:} false; then :
13115  $as_echo_n "(cached) " >&6
13116else
13117  case $SETFILE in
13118  [\\/]* | ?:[\\/]*)
13119  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13120  ;;
13121  *)
13122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13123for as_dir in $PATH
13124do
13125  IFS=$as_save_IFS
13126  test -z "$as_dir" && as_dir=.
13127    for ac_exec_ext in '' $ac_executable_extensions; do
13128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13129    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13131    break 2
13132  fi
13133done
13134  done
13135IFS=$as_save_IFS
13136
13137  ;;
13138esac
13139fi
13140SETFILE=$ac_cv_path_SETFILE
13141if test -n "$SETFILE"; then
13142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13143$as_echo "$SETFILE" >&6; }
13144else
13145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13146$as_echo "no" >&6; }
13147fi
13148
13149
13150  test -n "$SETFILE" && break
13151done
13152
13153  else
13154    # The variable is set, but is it from the command line or the environment?
13155
13156    # Try to remove the string !SETFILE! from our list.
13157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13159      # If it failed, the variable was not from the command line. Ignore it,
13160      # but warn the user (except for BASH, which is always set by the calling BASH).
13161      if test "xSETFILE" != xBASH; then
13162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13163$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13164      fi
13165      # Try to locate tool using the code snippet
13166      for ac_prog in SetFile
13167do
13168  # Extract the first word of "$ac_prog", so it can be a program name with args.
13169set dummy $ac_prog; ac_word=$2
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13171$as_echo_n "checking for $ac_word... " >&6; }
13172if ${ac_cv_path_SETFILE+:} false; then :
13173  $as_echo_n "(cached) " >&6
13174else
13175  case $SETFILE in
13176  [\\/]* | ?:[\\/]*)
13177  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13178  ;;
13179  *)
13180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13181for as_dir in $PATH
13182do
13183  IFS=$as_save_IFS
13184  test -z "$as_dir" && as_dir=.
13185    for ac_exec_ext in '' $ac_executable_extensions; do
13186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13187    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13189    break 2
13190  fi
13191done
13192  done
13193IFS=$as_save_IFS
13194
13195  ;;
13196esac
13197fi
13198SETFILE=$ac_cv_path_SETFILE
13199if test -n "$SETFILE"; then
13200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13201$as_echo "$SETFILE" >&6; }
13202else
13203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13204$as_echo "no" >&6; }
13205fi
13206
13207
13208  test -n "$SETFILE" && break
13209done
13210
13211    else
13212      # If it succeeded, then it was overridden by the user. We will use it
13213      # for the tool.
13214
13215      # First remove it from the list of overridden variables, so we can test
13216      # for unknown variables in the end.
13217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13218
13219      # Check if the provided tool contains a complete path.
13220      tool_specified="$SETFILE"
13221      tool_basename="${tool_specified##*/}"
13222      if test "x$tool_basename" = "x$tool_specified"; then
13223        # A command without a complete path is provided, search $PATH.
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13225$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13226        # Extract the first word of "$tool_basename", so it can be a program name with args.
13227set dummy $tool_basename; ac_word=$2
13228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13229$as_echo_n "checking for $ac_word... " >&6; }
13230if ${ac_cv_path_SETFILE+:} false; then :
13231  $as_echo_n "(cached) " >&6
13232else
13233  case $SETFILE in
13234  [\\/]* | ?:[\\/]*)
13235  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13236  ;;
13237  *)
13238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13239for as_dir in $PATH
13240do
13241  IFS=$as_save_IFS
13242  test -z "$as_dir" && as_dir=.
13243    for ac_exec_ext in '' $ac_executable_extensions; do
13244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13245    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13247    break 2
13248  fi
13249done
13250  done
13251IFS=$as_save_IFS
13252
13253  ;;
13254esac
13255fi
13256SETFILE=$ac_cv_path_SETFILE
13257if test -n "$SETFILE"; then
13258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13259$as_echo "$SETFILE" >&6; }
13260else
13261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13262$as_echo "no" >&6; }
13263fi
13264
13265
13266        if test "x$SETFILE" = x; then
13267          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13268        fi
13269      else
13270        # Otherwise we believe it is a complete path. Use it as it is.
13271        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13272$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13274$as_echo_n "checking for SETFILE... " >&6; }
13275        if test ! -x "$tool_specified"; then
13276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13277$as_echo "not found" >&6; }
13278          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13279        fi
13280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13281$as_echo "$tool_specified" >&6; }
13282      fi
13283    fi
13284  fi
13285
13286
13287
13288
13289  # Publish this variable in the help.
13290
13291
13292  if test "x$CPIO" = x; then
13293    # The variable is not set by user, try to locate tool using the code snippet
13294    for ac_prog in cpio bsdcpio
13295do
13296  # Extract the first word of "$ac_prog", so it can be a program name with args.
13297set dummy $ac_prog; ac_word=$2
13298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13299$as_echo_n "checking for $ac_word... " >&6; }
13300if ${ac_cv_path_CPIO+:} false; then :
13301  $as_echo_n "(cached) " >&6
13302else
13303  case $CPIO in
13304  [\\/]* | ?:[\\/]*)
13305  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13306  ;;
13307  *)
13308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13309for as_dir in $PATH
13310do
13311  IFS=$as_save_IFS
13312  test -z "$as_dir" && as_dir=.
13313    for ac_exec_ext in '' $ac_executable_extensions; do
13314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13315    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13317    break 2
13318  fi
13319done
13320  done
13321IFS=$as_save_IFS
13322
13323  ;;
13324esac
13325fi
13326CPIO=$ac_cv_path_CPIO
13327if test -n "$CPIO"; then
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13329$as_echo "$CPIO" >&6; }
13330else
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332$as_echo "no" >&6; }
13333fi
13334
13335
13336  test -n "$CPIO" && break
13337done
13338
13339  else
13340    # The variable is set, but is it from the command line or the environment?
13341
13342    # Try to remove the string !CPIO! from our list.
13343    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13344    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13345      # If it failed, the variable was not from the command line. Ignore it,
13346      # but warn the user (except for BASH, which is always set by the calling BASH).
13347      if test "xCPIO" != xBASH; then
13348        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13349$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13350      fi
13351      # Try to locate tool using the code snippet
13352      for ac_prog in cpio bsdcpio
13353do
13354  # Extract the first word of "$ac_prog", so it can be a program name with args.
13355set dummy $ac_prog; ac_word=$2
13356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13357$as_echo_n "checking for $ac_word... " >&6; }
13358if ${ac_cv_path_CPIO+:} false; then :
13359  $as_echo_n "(cached) " >&6
13360else
13361  case $CPIO in
13362  [\\/]* | ?:[\\/]*)
13363  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13364  ;;
13365  *)
13366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13367for as_dir in $PATH
13368do
13369  IFS=$as_save_IFS
13370  test -z "$as_dir" && as_dir=.
13371    for ac_exec_ext in '' $ac_executable_extensions; do
13372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13373    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13375    break 2
13376  fi
13377done
13378  done
13379IFS=$as_save_IFS
13380
13381  ;;
13382esac
13383fi
13384CPIO=$ac_cv_path_CPIO
13385if test -n "$CPIO"; then
13386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13387$as_echo "$CPIO" >&6; }
13388else
13389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13390$as_echo "no" >&6; }
13391fi
13392
13393
13394  test -n "$CPIO" && break
13395done
13396
13397    else
13398      # If it succeeded, then it was overridden by the user. We will use it
13399      # for the tool.
13400
13401      # First remove it from the list of overridden variables, so we can test
13402      # for unknown variables in the end.
13403      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13404
13405      # Check if the provided tool contains a complete path.
13406      tool_specified="$CPIO"
13407      tool_basename="${tool_specified##*/}"
13408      if test "x$tool_basename" = "x$tool_specified"; then
13409        # A command without a complete path is provided, search $PATH.
13410        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13411$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13412        # Extract the first word of "$tool_basename", so it can be a program name with args.
13413set dummy $tool_basename; ac_word=$2
13414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13415$as_echo_n "checking for $ac_word... " >&6; }
13416if ${ac_cv_path_CPIO+:} false; then :
13417  $as_echo_n "(cached) " >&6
13418else
13419  case $CPIO in
13420  [\\/]* | ?:[\\/]*)
13421  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13422  ;;
13423  *)
13424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13425for as_dir in $PATH
13426do
13427  IFS=$as_save_IFS
13428  test -z "$as_dir" && as_dir=.
13429    for ac_exec_ext in '' $ac_executable_extensions; do
13430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13431    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13433    break 2
13434  fi
13435done
13436  done
13437IFS=$as_save_IFS
13438
13439  ;;
13440esac
13441fi
13442CPIO=$ac_cv_path_CPIO
13443if test -n "$CPIO"; then
13444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13445$as_echo "$CPIO" >&6; }
13446else
13447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448$as_echo "no" >&6; }
13449fi
13450
13451
13452        if test "x$CPIO" = x; then
13453          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13454        fi
13455      else
13456        # Otherwise we believe it is a complete path. Use it as it is.
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13458$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13460$as_echo_n "checking for CPIO... " >&6; }
13461        if test ! -x "$tool_specified"; then
13462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13463$as_echo "not found" >&6; }
13464          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13465        fi
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13467$as_echo "$tool_specified" >&6; }
13468      fi
13469    fi
13470  fi
13471
13472
13473
13474
13475# Now we can determine OpenJDK build and target platforms. This is required to
13476# have early on.
13477# Make sure we can run config.sub.
13478$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13479  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13480
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13482$as_echo_n "checking build system type... " >&6; }
13483if ${ac_cv_build+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  ac_build_alias=$build_alias
13487test "x$ac_build_alias" = x &&
13488  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13489test "x$ac_build_alias" = x &&
13490  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13491ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13492  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13493
13494fi
13495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13496$as_echo "$ac_cv_build" >&6; }
13497case $ac_cv_build in
13498*-*-*) ;;
13499*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13500esac
13501build=$ac_cv_build
13502ac_save_IFS=$IFS; IFS='-'
13503set x $ac_cv_build
13504shift
13505build_cpu=$1
13506build_vendor=$2
13507shift; shift
13508# Remember, the first character of IFS is used to create $*,
13509# except with old shells:
13510build_os=$*
13511IFS=$ac_save_IFS
13512case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13513
13514
13515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13516$as_echo_n "checking host system type... " >&6; }
13517if ${ac_cv_host+:} false; then :
13518  $as_echo_n "(cached) " >&6
13519else
13520  if test "x$host_alias" = x; then
13521  ac_cv_host=$ac_cv_build
13522else
13523  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13524    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13525fi
13526
13527fi
13528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13529$as_echo "$ac_cv_host" >&6; }
13530case $ac_cv_host in
13531*-*-*) ;;
13532*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13533esac
13534host=$ac_cv_host
13535ac_save_IFS=$IFS; IFS='-'
13536set x $ac_cv_host
13537shift
13538host_cpu=$1
13539host_vendor=$2
13540shift; shift
13541# Remember, the first character of IFS is used to create $*,
13542# except with old shells:
13543host_os=$*
13544IFS=$ac_save_IFS
13545case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13546
13547
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13549$as_echo_n "checking target system type... " >&6; }
13550if ${ac_cv_target+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  if test "x$target_alias" = x; then
13554  ac_cv_target=$ac_cv_host
13555else
13556  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13557    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13558fi
13559
13560fi
13561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13562$as_echo "$ac_cv_target" >&6; }
13563case $ac_cv_target in
13564*-*-*) ;;
13565*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13566esac
13567target=$ac_cv_target
13568ac_save_IFS=$IFS; IFS='-'
13569set x $ac_cv_target
13570shift
13571target_cpu=$1
13572target_vendor=$2
13573shift; shift
13574# Remember, the first character of IFS is used to create $*,
13575# except with old shells:
13576target_os=$*
13577IFS=$ac_save_IFS
13578case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13579
13580
13581# The aliases save the names the user supplied, while $host etc.
13582# will get canonicalized.
13583test -n "$target_alias" &&
13584  test "$program_prefix$program_suffix$program_transform_name" = \
13585    NONENONEs,x,x, &&
13586  program_prefix=${target_alias}-
13587
13588  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13589  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13590  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13591  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13592  # to use the configure naming style.
13593
13594
13595
13596
13597
13598  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13599  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13600  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13601  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13602  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13603  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13604
13605
13606
13607  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13608
13609  case "$build_os" in
13610    *linux*)
13611      VAR_OS=linux
13612      VAR_OS_API=posix
13613      VAR_OS_ENV=linux
13614      ;;
13615    *solaris*)
13616      VAR_OS=solaris
13617      VAR_OS_API=posix
13618      VAR_OS_ENV=solaris
13619      ;;
13620    *darwin*)
13621      VAR_OS=macosx
13622      VAR_OS_API=posix
13623      VAR_OS_ENV=macosx
13624      ;;
13625    *bsd*|*dragonfly*)
13626      VAR_OS=bsd
13627      VAR_OS_API=posix
13628      VAR_OS_ENV=bsd
13629      ;;
13630    *cygwin*)
13631      VAR_OS=windows
13632      VAR_OS_API=winapi
13633      VAR_OS_ENV=windows.cygwin
13634      ;;
13635    *mingw*)
13636      VAR_OS=windows
13637      VAR_OS_API=winapi
13638      VAR_OS_ENV=windows.msys
13639      ;;
13640    *aix*)
13641      VAR_OS=aix
13642      VAR_OS_API=posix
13643      VAR_OS_ENV=aix
13644      ;;
13645    *)
13646      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13647      ;;
13648  esac
13649  # The BSD's have slight differences so determine which one we are building on.
13650  # For the rest set VAR_OS_VENDOR to VAR_OS
13651  case "$build_os" in
13652    *openbsd*)
13653      VAR_OS_VENDOR=openbsd
13654      ;;
13655    *netbsd*)
13656      VAR_OS_VENDOR=netbsd
13657      ;;
13658    *freebsd*|*dragonfly*)
13659      VAR_OS_VENDOR=freebsd
13660      ;;
13661    *)
13662      VAR_OS_VENDOR="$VAR_OS"
13663      ;;
13664  esac
13665
13666
13667  # First argument is the cpu name from the trip/quad
13668  case "$build_cpu" in
13669    amd64|x86_64)
13670      VAR_CPU=x86_64
13671      VAR_CPU_ARCH=x86
13672      VAR_CPU_BITS=64
13673      VAR_CPU_ENDIAN=little
13674      ;;
13675    i?86)
13676      VAR_CPU=x86
13677      VAR_CPU_ARCH=x86
13678      VAR_CPU_BITS=32
13679      VAR_CPU_ENDIAN=little
13680      ;;
13681    arm*)
13682      VAR_CPU=arm
13683      VAR_CPU_ARCH=arm
13684      VAR_CPU_BITS=32
13685      VAR_CPU_ENDIAN=little
13686      ;;
13687    aarch64)
13688      VAR_CPU=aarch64
13689      VAR_CPU_ARCH=aarch64
13690      VAR_CPU_BITS=64
13691      VAR_CPU_ENDIAN=little
13692      ;;
13693    powerpc)
13694      VAR_CPU=ppc
13695      VAR_CPU_ARCH=ppc
13696      VAR_CPU_BITS=32
13697      VAR_CPU_ENDIAN=big
13698      ;;
13699    powerpc64)
13700      VAR_CPU=ppc64
13701      VAR_CPU_ARCH=ppc
13702      VAR_CPU_BITS=64
13703      VAR_CPU_ENDIAN=big
13704      ;;
13705    powerpc64le)
13706      VAR_CPU=ppc64le
13707      VAR_CPU_ARCH=ppc
13708      VAR_CPU_BITS=64
13709      VAR_CPU_ENDIAN=little
13710      ;;
13711    s390)
13712      VAR_CPU=s390
13713      VAR_CPU_ARCH=s390
13714      VAR_CPU_BITS=32
13715      VAR_CPU_ENDIAN=big
13716      ;;
13717    s390x)
13718      VAR_CPU=s390x
13719      VAR_CPU_ARCH=s390
13720      VAR_CPU_BITS=64
13721      VAR_CPU_ENDIAN=big
13722      ;;
13723    sparc)
13724      VAR_CPU=sparc
13725      VAR_CPU_ARCH=sparc
13726      VAR_CPU_BITS=32
13727      VAR_CPU_ENDIAN=big
13728      ;;
13729    sparcv9|sparc64)
13730      VAR_CPU=sparcv9
13731      VAR_CPU_ARCH=sparc
13732      VAR_CPU_BITS=64
13733      VAR_CPU_ENDIAN=big
13734      ;;
13735    *)
13736      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13737      ;;
13738  esac
13739
13740  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13741  OPENJDK_BUILD_OS="$VAR_OS"
13742  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13743  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13744  OPENJDK_BUILD_CPU="$VAR_CPU"
13745  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13746  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13747  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13748
13749
13750
13751
13752
13753
13754
13755
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13757$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13759$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13760
13761  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13762
13763  case "$host_os" in
13764    *linux*)
13765      VAR_OS=linux
13766      VAR_OS_API=posix
13767      VAR_OS_ENV=linux
13768      ;;
13769    *solaris*)
13770      VAR_OS=solaris
13771      VAR_OS_API=posix
13772      VAR_OS_ENV=solaris
13773      ;;
13774    *darwin*)
13775      VAR_OS=macosx
13776      VAR_OS_API=posix
13777      VAR_OS_ENV=macosx
13778      ;;
13779    *bsd*|*dragonfly*)
13780      VAR_OS=bsd
13781      VAR_OS_API=posix
13782      VAR_OS_ENV=bsd
13783      ;;
13784    *cygwin*)
13785      VAR_OS=windows
13786      VAR_OS_API=winapi
13787      VAR_OS_ENV=windows.cygwin
13788      ;;
13789    *mingw*)
13790      VAR_OS=windows
13791      VAR_OS_API=winapi
13792      VAR_OS_ENV=windows.msys
13793      ;;
13794    *aix*)
13795      VAR_OS=aix
13796      VAR_OS_API=posix
13797      VAR_OS_ENV=aix
13798      ;;
13799    *)
13800      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13801      ;;
13802  esac
13803  # The BSD's have slight differences so determine which one we are building on.
13804  # For the rest set VAR_OS_VENDOR to VAR_OS
13805  case "$host_os" in
13806    *openbsd*)
13807      VAR_OS_VENDOR=openbsd
13808      ;;
13809    *netbsd*)
13810      VAR_OS_VENDOR=netbsd
13811      ;;
13812    *freebsd*|*dragonfly*)
13813      VAR_OS_VENDOR=freebsd
13814      ;;
13815    *)
13816      VAR_OS_VENDOR="$VAR_OS"
13817      ;;
13818  esac
13819
13820
13821  # First argument is the cpu name from the trip/quad
13822  case "$host_cpu" in
13823    amd64|x86_64)
13824      VAR_CPU=x86_64
13825      VAR_CPU_ARCH=x86
13826      VAR_CPU_BITS=64
13827      VAR_CPU_ENDIAN=little
13828      ;;
13829    i?86)
13830      VAR_CPU=x86
13831      VAR_CPU_ARCH=x86
13832      VAR_CPU_BITS=32
13833      VAR_CPU_ENDIAN=little
13834      ;;
13835    arm*)
13836      VAR_CPU=arm
13837      VAR_CPU_ARCH=arm
13838      VAR_CPU_BITS=32
13839      VAR_CPU_ENDIAN=little
13840      ;;
13841    aarch64)
13842      VAR_CPU=aarch64
13843      VAR_CPU_ARCH=aarch64
13844      VAR_CPU_BITS=64
13845      VAR_CPU_ENDIAN=little
13846      ;;
13847    powerpc)
13848      VAR_CPU=ppc
13849      VAR_CPU_ARCH=ppc
13850      VAR_CPU_BITS=32
13851      VAR_CPU_ENDIAN=big
13852      ;;
13853    powerpc64)
13854      VAR_CPU=ppc64
13855      VAR_CPU_ARCH=ppc
13856      VAR_CPU_BITS=64
13857      VAR_CPU_ENDIAN=big
13858      ;;
13859    powerpc64le)
13860      VAR_CPU=ppc64le
13861      VAR_CPU_ARCH=ppc
13862      VAR_CPU_BITS=64
13863      VAR_CPU_ENDIAN=little
13864      ;;
13865    s390)
13866      VAR_CPU=s390
13867      VAR_CPU_ARCH=s390
13868      VAR_CPU_BITS=32
13869      VAR_CPU_ENDIAN=big
13870      ;;
13871    s390x)
13872      VAR_CPU=s390x
13873      VAR_CPU_ARCH=s390
13874      VAR_CPU_BITS=64
13875      VAR_CPU_ENDIAN=big
13876      ;;
13877    sparc)
13878      VAR_CPU=sparc
13879      VAR_CPU_ARCH=sparc
13880      VAR_CPU_BITS=32
13881      VAR_CPU_ENDIAN=big
13882      ;;
13883    sparcv9|sparc64)
13884      VAR_CPU=sparcv9
13885      VAR_CPU_ARCH=sparc
13886      VAR_CPU_BITS=64
13887      VAR_CPU_ENDIAN=big
13888      ;;
13889    *)
13890      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13891      ;;
13892  esac
13893
13894  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13895  OPENJDK_TARGET_OS="$VAR_OS"
13896  OPENJDK_TARGET_OS_VENDOR="$VAR_OS_VENDOR"
13897  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13898  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13899  OPENJDK_TARGET_CPU="$VAR_CPU"
13900  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13901  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13902  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13913$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13915$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13916
13917
13918
13919# Check whether --with-target-bits was given.
13920if test "${with_target_bits+set}" = set; then :
13921  withval=$with_target_bits;
13922fi
13923
13924
13925  # We have three types of compiles:
13926  # native  == normal compilation, target system == build system
13927  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13928  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13929  #
13930  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13931    # We're doing a proper cross-compilation
13932    COMPILE_TYPE="cross"
13933  else
13934    COMPILE_TYPE="native"
13935  fi
13936
13937  if test "x$with_target_bits" != x; then
13938    if test "x$COMPILE_TYPE" = "xcross"; then
13939      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13940    fi
13941
13942    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13943      # A reduced build is requested
13944      COMPILE_TYPE="reduced"
13945      OPENJDK_TARGET_CPU_BITS=32
13946      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13947        OPENJDK_TARGET_CPU=x86
13948      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13949        OPENJDK_TARGET_CPU=sparc
13950      else
13951        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13952      fi
13953    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13954      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
13955    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13956      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13957$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13958    else
13959      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13960    fi
13961  fi
13962
13963
13964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13965$as_echo_n "checking compilation type... " >&6; }
13966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13967$as_echo "$COMPILE_TYPE" >&6; }
13968
13969
13970  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13971    REQUIRED_OS_NAME=SunOS
13972    REQUIRED_OS_VERSION=5.10
13973  fi
13974  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13975    REQUIRED_OS_NAME=Linux
13976    REQUIRED_OS_VERSION=2.6
13977  fi
13978  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13979    REQUIRED_OS_NAME=Windows
13980    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13981      REQUIRED_OS_VERSION=5.2
13982    else
13983      REQUIRED_OS_VERSION=5.1
13984    fi
13985  fi
13986  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13987    REQUIRED_OS_NAME=Darwin
13988    REQUIRED_OS_VERSION=11.2
13989  fi
13990
13991
13992
13993
13994
13995  # Also store the legacy naming of the cpu.
13996  # Ie i586 and amd64 instead of x86 and x86_64
13997  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13998  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13999    OPENJDK_TARGET_CPU_LEGACY="i586"
14000  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14001    # On all platforms except MacOSX replace x86_64 with amd64.
14002    OPENJDK_TARGET_CPU_LEGACY="amd64"
14003  fi
14004
14005
14006  # And the second legacy naming of the cpu.
14007  # Ie i386 and amd64 instead of x86 and x86_64.
14008  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14009  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14010    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14011  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14012    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14013  fi
14014
14015
14016  # This is the name of the cpu (but using i386 and amd64 instead of
14017  # x86 and x86_64, respectively), preceeded by a /, to be used when
14018  # locating libraries. On macosx, it's empty, though.
14019  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14020  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14021    OPENJDK_TARGET_CPU_LIBDIR=""
14022  fi
14023
14024
14025  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14026  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14027  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14028  OPENJDK_TARGET_CPU_ISADIR=""
14029  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14030    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14031      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14032    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14033      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14034    fi
14035  fi
14036
14037
14038  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14039  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14040  if test "x$OPENJDK_TARGET_OS" = xbsd -o "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14041    # On Linux and BSD, we replace x86 with i386.
14042    OPENJDK_TARGET_CPU_OSARCH="i386"
14043  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14044    # On all platforms except macosx, we replace x86_64 with amd64.
14045    OPENJDK_TARGET_CPU_OSARCH="amd64"
14046  fi
14047
14048
14049  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14050  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14051    OPENJDK_TARGET_CPU_JLI="i386"
14052  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14053    # On all platforms except macosx, we replace x86_64 with amd64.
14054    OPENJDK_TARGET_CPU_JLI="amd64"
14055  fi
14056  # Now setup the -D flags for building libjli.
14057  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14058  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14059    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14060      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14061    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14062      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14063    fi
14064  elif test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang ; then
14065    OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -stdlib=libc++ -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
14066  fi
14067
14068  # The company name, if any
14069
14070# Check whether --with-company-name was given.
14071if test "${with_company_name+set}" = set; then :
14072  withval=$with_company_name;
14073fi
14074
14075  if test "x$with_company_name" = xyes; then
14076    as_fn_error $? "--with-company-name must have a value" "$LINENO" 5
14077  elif  ! [[ $with_company_name =~ ^[[:print:]]*$ ]] ; then
14078    as_fn_error $? "--with-company-name contains non-printing characters: $with_company_name" "$LINENO" 5
14079  elif test "x$with_company_name" != x; then
14080    COMPANY_NAME="$with_company_name"
14081  fi
14082
14083
14084  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
14085  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
14086    OPENJDK_TARGET_OS_API_DIR="solaris"
14087  fi
14088  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
14089    OPENJDK_TARGET_OS_API_DIR="windows"
14090  fi
14091
14092
14093  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14094      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14095  else
14096      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
14097  fi
14098
14099
14100  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14101    A_LP64="LP64:="
14102    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14103    # unpack200.exe
14104    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14105      ADD_LP64="-D_LP64=1"
14106    fi
14107  fi
14108  LP64=$A_LP64
14109
14110
14111  if test "x$COMPILE_TYPE" = "xcross"; then
14112    # FIXME: ... or should this include reduced builds..?
14113    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14114  else
14115    DEFINE_CROSS_COMPILE_ARCH=""
14116  fi
14117
14118
14119  # ZERO_ARCHDEF is used to enable architecture-specific code
14120  case "${OPENJDK_TARGET_CPU}" in
14121    ppc)     ZERO_ARCHDEF=PPC32 ;;
14122    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14123    s390*)   ZERO_ARCHDEF=S390  ;;
14124    sparc*)  ZERO_ARCHDEF=SPARC ;;
14125    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14126    x86)     ZERO_ARCHDEF=IA32  ;;
14127    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14128  esac
14129
14130
14131
14132
14133# Continue setting up basic stuff. Most remaining code require fundamental tools.
14134
14135  # Save the current directory this script was started from
14136  CURDIR="$PWD"
14137
14138  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14139    PATH_SEP=";"
14140
14141  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14142  if test $SRC_ROOT_LENGTH -gt 100; then
14143    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14144  fi
14145
14146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14148$as_echo_n "checking cygwin release... " >&6; }
14149    CYGWIN_VERSION=`$UNAME -r`
14150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14151$as_echo "$CYGWIN_VERSION" >&6; }
14152    WINDOWS_ENV_VENDOR='cygwin'
14153    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14154
14155    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14156    if test "x$CYGWIN_VERSION_OLD" != x; then
14157      { $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
14158$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;}
14159      as_fn_error $? "Cannot continue" "$LINENO" 5
14160    fi
14161    if test "x$CYGPATH" = x; then
14162      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14163    fi
14164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14165$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14166    # The cmd output ends with Windows line endings (CR/LF)
14167    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
14168    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14169    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14171$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14172    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14173    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14174    if test "x$test_cygdrive_prefix" = x; then
14175      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14176    fi
14177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14179$as_echo_n "checking msys release... " >&6; }
14180    MSYS_VERSION=`$UNAME -r`
14181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14182$as_echo "$MSYS_VERSION" >&6; }
14183
14184    WINDOWS_ENV_VENDOR='msys'
14185    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14186
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14188$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14189    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14190    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14191
14192  windows_path="$MSYS_ROOT_PATH"
14193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194    unix_path=`$CYGPATH -u "$windows_path"`
14195    MSYS_ROOT_PATH="$unix_path"
14196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14198    MSYS_ROOT_PATH="$unix_path"
14199  fi
14200
14201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14202$as_echo "$MSYS_ROOT_PATH" >&6; }
14203    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14204  else
14205    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14206  fi
14207
14208  # Test if windows or unix (cygwin/msys) find is first in path.
14209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14210$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14211  FIND_BINARY_OUTPUT=`find --version 2>&1`
14212  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14214$as_echo "unix style" >&6; }
14215  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14217$as_echo "Windows" >&6; }
14218    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14219$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14220    { $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
14221$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14222    as_fn_error $? "Cannot continue" "$LINENO" 5
14223  else
14224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14225$as_echo "unknown" >&6; }
14226    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14227$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14228  fi
14229
14230  else
14231    PATH_SEP=":"
14232  fi
14233
14234
14235  # We get the top-level directory from the supporting wrappers.
14236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14237$as_echo_n "checking for top-level directory... " >&6; }
14238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14239$as_echo "$TOPDIR" >&6; }
14240
14241
14242  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14243
14244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14245
14246  # Input might be given as Windows format, start by converting to
14247  # unix format.
14248  path="$CURDIR"
14249  new_path=`$CYGPATH -u "$path"`
14250
14251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14254  # "foo.exe" is OK but "foo" is an error.
14255  #
14256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14257  # It is also a way to make sure we got the proper file name for the real test later on.
14258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14259  if test "x$test_shortpath" = x; then
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14261$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14262    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14263  fi
14264
14265  # Call helper function which possibly converts this using DOS-style short mode.
14266  # If so, the updated path is stored in $new_path.
14267
14268  input_path="$new_path"
14269  # Check if we need to convert this using DOS-style short mode. If the path
14270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14271  # take no chances and rewrite it.
14272  # Note: m4 eats our [], so we need to use [ and ] instead.
14273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14274  if test "x$has_forbidden_chars" != x; then
14275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14279      # Going to short mode and back again did indeed matter. Since short mode is
14280      # case insensitive, let's make it lowercase to improve readability.
14281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14282      # Now convert it back to Unix-style (cygpath)
14283      input_path=`$CYGPATH -u "$shortmode_path"`
14284      new_path="$input_path"
14285    fi
14286  fi
14287
14288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14289  if test "x$test_cygdrive_prefix" = x; then
14290    # As a simple fix, exclude /usr/bin since it's not a real path.
14291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14293      # a path prefixed by /cygdrive for fixpath to work.
14294      new_path="$CYGWIN_ROOT_PATH$input_path"
14295    fi
14296  fi
14297
14298
14299  if test "x$path" != "x$new_path"; then
14300    CURDIR="$new_path"
14301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14302$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14303  fi
14304
14305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14306
14307  path="$CURDIR"
14308  has_colon=`$ECHO $path | $GREP ^.:`
14309  new_path="$path"
14310  if test "x$has_colon" = x; then
14311    # Not in mixed or Windows style, start by that.
14312    new_path=`cmd //c echo $path`
14313  fi
14314
14315
14316  input_path="$new_path"
14317  # Check if we need to convert this using DOS-style short mode. If the path
14318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14319  # take no chances and rewrite it.
14320  # Note: m4 eats our [], so we need to use [ and ] instead.
14321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14322  if test "x$has_forbidden_chars" != x; then
14323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14325  fi
14326
14327
14328  windows_path="$new_path"
14329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14330    unix_path=`$CYGPATH -u "$windows_path"`
14331    new_path="$unix_path"
14332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14334    new_path="$unix_path"
14335  fi
14336
14337  if test "x$path" != "x$new_path"; then
14338    CURDIR="$new_path"
14339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14340$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14341  fi
14342
14343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14345
14346  else
14347    # We're on a posix platform. Hooray! :)
14348    path="$CURDIR"
14349    has_space=`$ECHO "$path" | $GREP " "`
14350    if test "x$has_space" != x; then
14351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14352$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14353      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14354    fi
14355
14356    # Use eval to expand a potential ~
14357    eval path="$path"
14358    if test ! -f "$path" && test ! -d "$path"; then
14359      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14360    fi
14361
14362    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14363  fi
14364
14365
14366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14367
14368  # Input might be given as Windows format, start by converting to
14369  # unix format.
14370  path="$TOPDIR"
14371  new_path=`$CYGPATH -u "$path"`
14372
14373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14376  # "foo.exe" is OK but "foo" is an error.
14377  #
14378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14379  # It is also a way to make sure we got the proper file name for the real test later on.
14380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14381  if test "x$test_shortpath" = x; then
14382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14384    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14385  fi
14386
14387  # Call helper function which possibly converts this using DOS-style short mode.
14388  # If so, the updated path is stored in $new_path.
14389
14390  input_path="$new_path"
14391  # Check if we need to convert this using DOS-style short mode. If the path
14392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14393  # take no chances and rewrite it.
14394  # Note: m4 eats our [], so we need to use [ and ] instead.
14395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14396  if test "x$has_forbidden_chars" != x; then
14397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14401      # Going to short mode and back again did indeed matter. Since short mode is
14402      # case insensitive, let's make it lowercase to improve readability.
14403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14404      # Now convert it back to Unix-style (cygpath)
14405      input_path=`$CYGPATH -u "$shortmode_path"`
14406      new_path="$input_path"
14407    fi
14408  fi
14409
14410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14411  if test "x$test_cygdrive_prefix" = x; then
14412    # As a simple fix, exclude /usr/bin since it's not a real path.
14413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14415      # a path prefixed by /cygdrive for fixpath to work.
14416      new_path="$CYGWIN_ROOT_PATH$input_path"
14417    fi
14418  fi
14419
14420
14421  if test "x$path" != "x$new_path"; then
14422    TOPDIR="$new_path"
14423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14424$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14425  fi
14426
14427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14428
14429  path="$TOPDIR"
14430  has_colon=`$ECHO $path | $GREP ^.:`
14431  new_path="$path"
14432  if test "x$has_colon" = x; then
14433    # Not in mixed or Windows style, start by that.
14434    new_path=`cmd //c echo $path`
14435  fi
14436
14437
14438  input_path="$new_path"
14439  # Check if we need to convert this using DOS-style short mode. If the path
14440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14441  # take no chances and rewrite it.
14442  # Note: m4 eats our [], so we need to use [ and ] instead.
14443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14444  if test "x$has_forbidden_chars" != x; then
14445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14447  fi
14448
14449
14450  windows_path="$new_path"
14451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14452    unix_path=`$CYGPATH -u "$windows_path"`
14453    new_path="$unix_path"
14454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14456    new_path="$unix_path"
14457  fi
14458
14459  if test "x$path" != "x$new_path"; then
14460    TOPDIR="$new_path"
14461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14462$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14463  fi
14464
14465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14467
14468  else
14469    # We're on a posix platform. Hooray! :)
14470    path="$TOPDIR"
14471    has_space=`$ECHO "$path" | $GREP " "`
14472    if test "x$has_space" != x; then
14473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14474$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14475      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14476    fi
14477
14478    # Use eval to expand a potential ~
14479    eval path="$path"
14480    if test ! -f "$path" && test ! -d "$path"; then
14481      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14482    fi
14483
14484    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14485  fi
14486
14487  # SRC_ROOT is a traditional alias for TOPDIR.
14488  SRC_ROOT=$TOPDIR
14489
14490  # Locate the directory of this script.
14491  AUTOCONF_DIR=$TOPDIR/common/autoconf
14492
14493
14494  # Setup default logging of stdout and stderr to build.log in the output root.
14495  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14496  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14497  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14498
14499
14500
14501
14502
14503# Check if it's a pure open build or if custom sources are to be used.
14504
14505  # Check whether --enable-openjdk-only was given.
14506if test "${enable_openjdk_only+set}" = set; then :
14507  enableval=$enable_openjdk_only;
14508else
14509  enable_openjdk_only="no"
14510fi
14511
14512
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14514$as_echo_n "checking for presence of closed sources... " >&6; }
14515  if test -d "$SRC_ROOT/jdk/src/closed"; then
14516    CLOSED_SOURCE_PRESENT=yes
14517  else
14518    CLOSED_SOURCE_PRESENT=no
14519  fi
14520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14521$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14522
14523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14524$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14525  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14527$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14528
14529  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14530    OPENJDK=true
14531    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14532      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14533$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14534    fi
14535  else
14536    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14537      OPENJDK=true
14538    else
14539      OPENJDK=false
14540    fi
14541  fi
14542
14543  if test "x$OPENJDK" = "xtrue"; then
14544    SET_OPENJDK="OPENJDK=true"
14545  fi
14546
14547
14548
14549
14550# These are needed to be able to create a configuration name (and thus the output directory)
14551
14552  ###############################################################################
14553  #
14554  # Check which variant of the JDK that we want to build.
14555  # Currently we have:
14556  #    normal:   standard edition
14557  # but the custom make system may add other variants
14558  #
14559  # Effectively the JDK variant gives a name to a specific set of
14560  # modules to compile into the JDK. In the future, these modules
14561  # might even be Jigsaw modules.
14562  #
14563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14564$as_echo_n "checking which variant of the JDK to build... " >&6; }
14565
14566# Check whether --with-jdk-variant was given.
14567if test "${with_jdk_variant+set}" = set; then :
14568  withval=$with_jdk_variant;
14569fi
14570
14571
14572  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14573    JDK_VARIANT="normal"
14574  else
14575    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14576  fi
14577
14578
14579
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14581$as_echo "$JDK_VARIANT" >&6; }
14582
14583
14584###############################################################################
14585#
14586# Check which interpreter of the JVM we want to build.
14587# Currently we have:
14588#    template: Template interpreter (the default)
14589#    cpp     : C++ interpreter
14590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14591$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14592
14593# Check whether --with-jvm-interpreter was given.
14594if test "${with_jvm_interpreter+set}" = set; then :
14595  withval=$with_jvm_interpreter;
14596fi
14597
14598
14599if test "x$with_jvm_interpreter" = x; then
14600     with_jvm_interpreter="template"
14601fi
14602
14603JVM_INTERPRETER="$with_jvm_interpreter"
14604
14605if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14606   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14607fi
14608
14609
14610
14611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14612$as_echo "$with_jvm_interpreter" >&6; }
14613
14614
14615
14616  ###############################################################################
14617  #
14618  # Check which variants of the JVM that we want to build.
14619  # Currently we have:
14620  #    server: normal interpreter and a tiered C1/C2 compiler
14621  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14622  #    minimal1: reduced form of client with optional VM services and features stripped out
14623  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14624  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14625  #    zero: no machine code interpreter, no compiler
14626  #    zeroshark: zero interpreter and shark/llvm compiler backend
14627#    core: interpreter only, no compiler (only works on some platforms)
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14629$as_echo_n "checking which variants of the JVM to build... " >&6; }
14630
14631# Check whether --with-jvm-variants was given.
14632if test "${with_jvm_variants+set}" = set; then :
14633  withval=$with_jvm_variants;
14634fi
14635
14636
14637  if test "x$with_jvm_variants" = x; then
14638    with_jvm_variants="server"
14639  fi
14640
14641  JVM_VARIANTS=",$with_jvm_variants,"
14642  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,//'`
14643
14644  if test "x$TEST_VARIANTS" != "x,"; then
14645     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14646  fi
14647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14648$as_echo "$with_jvm_variants" >&6; }
14649
14650  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14651  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14652  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14653  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14654  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14655  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14656  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14657
14658  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14659    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14660      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14661    fi
14662  fi
14663  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14664    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14665      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14666    fi
14667  fi
14668  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14669    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14670      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14671    fi
14672  fi
14673
14674  # Replace the commas with AND for use in the build directory name.
14675  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14676  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/'`
14677  if test "x$COUNT_VARIANTS" != "x,1"; then
14678    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14679  else
14680    BUILDING_MULTIPLE_JVM_VARIANTS=no
14681  fi
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692  INCLUDE_SA=true
14693  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14694    INCLUDE_SA=false
14695  fi
14696  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14697    INCLUDE_SA=false
14698  fi
14699  if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
14700    INCLUDE_SA=true
14701  fi
14702
14703
14704  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14705    MACOSX_UNIVERSAL="false"
14706  fi
14707
14708
14709
14710
14711  ###############################################################################
14712  #
14713  # Set the debug level
14714  #    release: no debug information, all optimizations, no asserts.
14715  #    fastdebug: debug information (-g), all optimizations, all asserts
14716  #    slowdebug: debug information (-g), no optimizations, all asserts
14717  #
14718  DEBUG_LEVEL="release"
14719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14720$as_echo_n "checking which debug level to use... " >&6; }
14721  # Check whether --enable-debug was given.
14722if test "${enable_debug+set}" = set; then :
14723  enableval=$enable_debug;
14724        ENABLE_DEBUG="${enableval}"
14725        DEBUG_LEVEL="fastdebug"
14726
14727else
14728  ENABLE_DEBUG="no"
14729fi
14730
14731
14732
14733# Check whether --with-debug-level was given.
14734if test "${with_debug_level+set}" = set; then :
14735  withval=$with_debug_level;
14736        DEBUG_LEVEL="${withval}"
14737        if test "x$ENABLE_DEBUG" = xyes; then
14738          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14739        fi
14740
14741fi
14742
14743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14744$as_echo "$DEBUG_LEVEL" >&6; }
14745
14746  if test "x$DEBUG_LEVEL" != xrelease && \
14747      test "x$DEBUG_LEVEL" != xfastdebug && \
14748      test "x$DEBUG_LEVEL" != xslowdebug; then
14749    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14750  fi
14751
14752
14753  ###############################################################################
14754  #
14755  # Setup legacy vars/targets and new vars to deal with different debug levels.
14756  #
14757
14758  case $DEBUG_LEVEL in
14759    release )
14760      VARIANT="OPT"
14761      FASTDEBUG="false"
14762      DEBUG_CLASSFILES="false"
14763      BUILD_VARIANT_RELEASE=""
14764      HOTSPOT_DEBUG_LEVEL="product"
14765      HOTSPOT_EXPORT="product"
14766      ;;
14767    fastdebug )
14768      VARIANT="DBG"
14769      FASTDEBUG="true"
14770      DEBUG_CLASSFILES="true"
14771      BUILD_VARIANT_RELEASE="-fastdebug"
14772      HOTSPOT_DEBUG_LEVEL="fastdebug"
14773      HOTSPOT_EXPORT="fastdebug"
14774      ;;
14775    slowdebug )
14776      VARIANT="DBG"
14777      FASTDEBUG="false"
14778      DEBUG_CLASSFILES="true"
14779      BUILD_VARIANT_RELEASE="-debug"
14780      HOTSPOT_DEBUG_LEVEL="jvmg"
14781      HOTSPOT_EXPORT="debug"
14782      ;;
14783  esac
14784
14785  #####
14786  # Generate the legacy makefile targets for hotspot.
14787  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14788  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14789  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14790  # But until then ...
14791  HOTSPOT_TARGET=""
14792
14793  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14794    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14795  fi
14796
14797  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14798    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14799  fi
14800
14801  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14802    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14803  fi
14804
14805  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14806    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14807  fi
14808
14809  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14810    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14811  fi
14812
14813  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14814    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14815  fi
14816
14817  if test "x$JVM_VARIANT_CORE" = xtrue; then
14818    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14819  fi
14820
14821  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14822
14823  # On Macosx universal binaries are produced, but they only contain
14824  # 64 bit intel. This invalidates control of which jvms are built
14825  # from configure, but only server is valid anyway. Fix this
14826  # when hotspot makefiles are rewritten.
14827  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14828    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14829  fi
14830
14831  #####
14832
14833
14834
14835
14836
14837
14838
14839
14840# With basic setup done, call the custom early hook.
14841
14842
14843# Check if we have devkits, extra paths or sysroot set.
14844
14845
14846# Check whether --with-devkit was given.
14847if test "${with_devkit+set}" = set; then :
14848  withval=$with_devkit;
14849fi
14850
14851
14852  if test "x$with_devkit" = xyes; then
14853    as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
14854  elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
14855
14856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14857
14858  # Input might be given as Windows format, start by converting to
14859  # unix format.
14860  path="$with_devkit"
14861  new_path=`$CYGPATH -u "$path"`
14862
14863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14866  # "foo.exe" is OK but "foo" is an error.
14867  #
14868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14869  # It is also a way to make sure we got the proper file name for the real test later on.
14870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14871  if test "x$test_shortpath" = x; then
14872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14873$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14874    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14875  fi
14876
14877  # Call helper function which possibly converts this using DOS-style short mode.
14878  # If so, the updated path is stored in $new_path.
14879
14880  input_path="$new_path"
14881  # Check if we need to convert this using DOS-style short mode. If the path
14882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14883  # take no chances and rewrite it.
14884  # Note: m4 eats our [], so we need to use [ and ] instead.
14885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14886  if test "x$has_forbidden_chars" != x; then
14887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14891      # Going to short mode and back again did indeed matter. Since short mode is
14892      # case insensitive, let's make it lowercase to improve readability.
14893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14894      # Now convert it back to Unix-style (cygpath)
14895      input_path=`$CYGPATH -u "$shortmode_path"`
14896      new_path="$input_path"
14897    fi
14898  fi
14899
14900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14901  if test "x$test_cygdrive_prefix" = x; then
14902    # As a simple fix, exclude /usr/bin since it's not a real path.
14903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14905      # a path prefixed by /cygdrive for fixpath to work.
14906      new_path="$CYGWIN_ROOT_PATH$input_path"
14907    fi
14908  fi
14909
14910
14911  if test "x$path" != "x$new_path"; then
14912    with_devkit="$new_path"
14913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14914$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14915  fi
14916
14917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14918
14919  path="$with_devkit"
14920  has_colon=`$ECHO $path | $GREP ^.:`
14921  new_path="$path"
14922  if test "x$has_colon" = x; then
14923    # Not in mixed or Windows style, start by that.
14924    new_path=`cmd //c echo $path`
14925  fi
14926
14927
14928  input_path="$new_path"
14929  # Check if we need to convert this using DOS-style short mode. If the path
14930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14931  # take no chances and rewrite it.
14932  # Note: m4 eats our [], so we need to use [ and ] instead.
14933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14934  if test "x$has_forbidden_chars" != x; then
14935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14937  fi
14938
14939
14940  windows_path="$new_path"
14941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14942    unix_path=`$CYGPATH -u "$windows_path"`
14943    new_path="$unix_path"
14944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14946    new_path="$unix_path"
14947  fi
14948
14949  if test "x$path" != "x$new_path"; then
14950    with_devkit="$new_path"
14951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14952$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14953  fi
14954
14955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14957
14958  else
14959    # We're on a posix platform. Hooray! :)
14960    path="$with_devkit"
14961    has_space=`$ECHO "$path" | $GREP " "`
14962    if test "x$has_space" != x; then
14963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14964$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14965      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14966    fi
14967
14968    # Use eval to expand a potential ~
14969    eval path="$path"
14970    if test ! -f "$path" && test ! -d "$path"; then
14971      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14972    fi
14973
14974    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14975  fi
14976
14977    DEVKIT_ROOT="$with_devkit"
14978    # Check for a meta data info file in the root of the devkit
14979    if test -f "$DEVKIT_ROOT/devkit.info"; then
14980      . $DEVKIT_ROOT/devkit.info
14981      # This potentially sets the following:
14982      # A descriptive name of the devkit
14983
14984  if test "x$DEVKIT_NAME" = x; then
14985    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14986  fi
14987
14988      # Corresponds to --with-extra-path
14989
14990  if test "x$DEVKIT_EXTRA_PATH" = x; then
14991    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14992  fi
14993
14994      # Corresponds to --with-toolchain-path
14995
14996  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14997    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14998  fi
14999
15000      # Corresponds to --with-sysroot
15001
15002  if test "x$DEVKIT_SYSROOT" = x; then
15003    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15004  fi
15005
15006
15007      # Identifies the Visual Studio version in the devkit
15008
15009  if test "x$DEVKIT_VS_VERSION" = x; then
15010    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15011  fi
15012
15013      # The Visual Studio include environment variable
15014
15015  if test "x$DEVKIT_VS_INCLUDE" = x; then
15016    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15017  fi
15018
15019      # The Visual Studio lib environment variable
15020
15021  if test "x$DEVKIT_VS_LIB" = x; then
15022    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15023  fi
15024
15025      # Corresponds to --with-msvcr-dll
15026
15027  if test "x$DEVKIT_MSVCR_DLL" = x; then
15028    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15029  fi
15030
15031      # Corresponds to --with-msvcp-dll
15032
15033  if test "x$DEVKIT_MSVCP_DLL" = x; then
15034    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15035  fi
15036
15037      # Corresponds to --with-ucrt-dll-dir
15038
15039  if test "x$DEVKIT_UCRT_DLL_DIR" = x; then
15040    eval DEVKIT_UCRT_DLL_DIR="\${DEVKIT_UCRT_DLL_DIR_${OPENJDK_TARGET_CPU}}"
15041  fi
15042
15043    fi
15044
15045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15046$as_echo_n "checking for devkit... " >&6; }
15047    if test "x$DEVKIT_NAME" != x; then
15048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15049$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15050    else
15051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15052$as_echo "$DEVKIT_ROOT" >&6; }
15053    fi
15054
15055
15056  if test "x$DEVKIT_EXTRA_PATH" != x; then
15057    if test "x$EXTRA_PATH" = x; then
15058      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15059    else
15060      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15061    fi
15062  fi
15063
15064
15065    # Fallback default of just /bin if DEVKIT_PATH is not defined
15066    if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15067      DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15068    fi
15069
15070  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15071    if test "x$TOOLCHAIN_PATH" = x; then
15072      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15073    else
15074      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15075    fi
15076  fi
15077
15078
15079    # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15080    # places for backwards compatiblity.
15081    if test "x$DEVKIT_SYSROOT" != x; then
15082      SYSROOT="$DEVKIT_SYSROOT"
15083    elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15084      SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15085    elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15086      SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15087    fi
15088
15089    if test "x$DEVKIT_ROOT" != x; then
15090      DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
15091      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15092        DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
15093      fi
15094
15095    fi
15096  fi
15097
15098  # You can force the sysroot if the sysroot encoded into the compiler tools
15099  # is not correct.
15100
15101# Check whether --with-sys-root was given.
15102if test "${with_sys_root+set}" = set; then :
15103  withval=$with_sys_root; SYSROOT=$with_sys_root
15104
15105fi
15106
15107
15108
15109# Check whether --with-sysroot was given.
15110if test "${with_sysroot+set}" = set; then :
15111  withval=$with_sysroot; SYSROOT=$with_sysroot
15112
15113fi
15114
15115
15116
15117# Check whether --with-tools-dir was given.
15118if test "${with_tools_dir+set}" = set; then :
15119  withval=$with_tools_dir;
15120  if test "x$with_tools_dir" != x; then
15121    if test "x$TOOLCHAIN_PATH" = x; then
15122      TOOLCHAIN_PATH="$with_tools_dir"
15123    else
15124      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15125    fi
15126  fi
15127
15128
15129fi
15130
15131
15132
15133# Check whether --with-toolchain-path was given.
15134if test "${with_toolchain_path+set}" = set; then :
15135  withval=$with_toolchain_path;
15136  if test "x$with_toolchain_path" != x; then
15137    if test "x$TOOLCHAIN_PATH" = x; then
15138      TOOLCHAIN_PATH="$with_toolchain_path"
15139    else
15140      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15141    fi
15142  fi
15143
15144
15145fi
15146
15147
15148
15149# Check whether --with-extra-path was given.
15150if test "${with_extra_path+set}" = set; then :
15151  withval=$with_extra_path;
15152  if test "x$with_extra_path" != x; then
15153    if test "x$EXTRA_PATH" = x; then
15154      EXTRA_PATH="$with_extra_path"
15155    else
15156      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15157    fi
15158  fi
15159
15160
15161fi
15162
15163
15164  # Prepend the extra path to the global path
15165
15166  if test "x$EXTRA_PATH" != x; then
15167    if test "x$PATH" = x; then
15168      PATH="$EXTRA_PATH"
15169    else
15170      PATH="$EXTRA_PATH:$PATH"
15171    fi
15172  fi
15173
15174
15175  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15176    # Add extra search paths on solaris for utilities like ar and as etc...
15177    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15178  fi
15179
15180  # Xcode version will be validated later
15181
15182# Check whether --with-xcode-path was given.
15183if test "${with_xcode_path+set}" = set; then :
15184  withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
15185
15186fi
15187
15188
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15190$as_echo_n "checking for sysroot... " >&6; }
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15192$as_echo "$SYSROOT" >&6; }
15193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15194$as_echo_n "checking for toolchain path... " >&6; }
15195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15196$as_echo "$TOOLCHAIN_PATH" >&6; }
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15198$as_echo_n "checking for extra path... " >&6; }
15199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15200$as_echo "$EXTRA_PATH" >&6; }
15201
15202
15203# To properly create a configuration name, we need to have the OpenJDK target
15204# and options (variants and debug level) parsed.
15205
15206
15207
15208# Check whether --with-conf-name was given.
15209if test "${with_conf_name+set}" = set; then :
15210  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15211fi
15212
15213
15214  # Test from where we are running configure, in or outside of src root.
15215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15216$as_echo_n "checking where to store configuration... " >&6; }
15217  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15218      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15219      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15220    # We are running configure from the src root.
15221    # Create a default ./build/target-variant-debuglevel output root.
15222    if test "x${CONF_NAME}" = x; then
15223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15224$as_echo "in default location" >&6; }
15225      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15226    else
15227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15228$as_echo "in build directory with custom name" >&6; }
15229    fi
15230    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15231    $MKDIR -p "$OUTPUT_ROOT"
15232    if test ! -d "$OUTPUT_ROOT"; then
15233      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15234    fi
15235  else
15236    # We are running configure from outside of the src dir.
15237    # Then use the current directory as output dir!
15238    # If configuration is situated in normal build directory, just use the build
15239    # directory name as configuration name, otherwise use the complete path.
15240    if test "x${CONF_NAME}" = x; then
15241      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15242    fi
15243    OUTPUT_ROOT="$CURDIR"
15244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15245$as_echo "in current directory" >&6; }
15246
15247    # WARNING: This might be a bad thing to do. You need to be sure you want to
15248    # have a configuration in this directory. Do some sanity checks!
15249
15250    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15251      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15252      # other files
15253      files_present=`$LS $OUTPUT_ROOT`
15254      # Configure has already touched config.log and confdefs.h in the current dir when this check
15255      # is performed.
15256      filtered_files=`$ECHO "$files_present" \
15257          | $SED -e 's/config.log//g' \
15258              -e 's/configure.log//g' \
15259              -e 's/confdefs.h//g' \
15260              -e 's/ //g' \
15261          | $TR -d '\n'`
15262      if test "x$filtered_files" != x; then
15263        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15264$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15265        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15266$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15268$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15269        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15270$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15271        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15272$as_echo "$as_me: seriously mess up just about everything." >&6;}
15273        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15274$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15275        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15276$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15277        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15278      fi
15279    fi
15280  fi
15281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15282$as_echo_n "checking what configuration name to use... " >&6; }
15283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15284$as_echo "$CONF_NAME" >&6; }
15285
15286
15287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15288
15289  # Input might be given as Windows format, start by converting to
15290  # unix format.
15291  path="$OUTPUT_ROOT"
15292  new_path=`$CYGPATH -u "$path"`
15293
15294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15297  # "foo.exe" is OK but "foo" is an error.
15298  #
15299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15300  # It is also a way to make sure we got the proper file name for the real test later on.
15301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15302  if test "x$test_shortpath" = x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15304$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15305    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15306  fi
15307
15308  # Call helper function which possibly converts this using DOS-style short mode.
15309  # If so, the updated path is stored in $new_path.
15310
15311  input_path="$new_path"
15312  # Check if we need to convert this using DOS-style short mode. If the path
15313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15314  # take no chances and rewrite it.
15315  # Note: m4 eats our [], so we need to use [ and ] instead.
15316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15317  if test "x$has_forbidden_chars" != x; then
15318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15322      # Going to short mode and back again did indeed matter. Since short mode is
15323      # case insensitive, let's make it lowercase to improve readability.
15324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15325      # Now convert it back to Unix-style (cygpath)
15326      input_path=`$CYGPATH -u "$shortmode_path"`
15327      new_path="$input_path"
15328    fi
15329  fi
15330
15331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15332  if test "x$test_cygdrive_prefix" = x; then
15333    # As a simple fix, exclude /usr/bin since it's not a real path.
15334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15336      # a path prefixed by /cygdrive for fixpath to work.
15337      new_path="$CYGWIN_ROOT_PATH$input_path"
15338    fi
15339  fi
15340
15341
15342  if test "x$path" != "x$new_path"; then
15343    OUTPUT_ROOT="$new_path"
15344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15345$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15346  fi
15347
15348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15349
15350  path="$OUTPUT_ROOT"
15351  has_colon=`$ECHO $path | $GREP ^.:`
15352  new_path="$path"
15353  if test "x$has_colon" = x; then
15354    # Not in mixed or Windows style, start by that.
15355    new_path=`cmd //c echo $path`
15356  fi
15357
15358
15359  input_path="$new_path"
15360  # Check if we need to convert this using DOS-style short mode. If the path
15361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15362  # take no chances and rewrite it.
15363  # Note: m4 eats our [], so we need to use [ and ] instead.
15364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15365  if test "x$has_forbidden_chars" != x; then
15366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15368  fi
15369
15370
15371  windows_path="$new_path"
15372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15373    unix_path=`$CYGPATH -u "$windows_path"`
15374    new_path="$unix_path"
15375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15377    new_path="$unix_path"
15378  fi
15379
15380  if test "x$path" != "x$new_path"; then
15381    OUTPUT_ROOT="$new_path"
15382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15383$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15384  fi
15385
15386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15388
15389  else
15390    # We're on a posix platform. Hooray! :)
15391    path="$OUTPUT_ROOT"
15392    has_space=`$ECHO "$path" | $GREP " "`
15393    if test "x$has_space" != x; then
15394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15395$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15396      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15397    fi
15398
15399    # Use eval to expand a potential ~
15400    eval path="$path"
15401    if test ! -f "$path" && test ! -d "$path"; then
15402      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15403    fi
15404
15405    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15406  fi
15407
15408
15409  SPEC=$OUTPUT_ROOT/spec.gmk
15410
15411  CONF_NAME=$CONF_NAME
15412
15413  OUTPUT_ROOT=$OUTPUT_ROOT
15414
15415
15416  # Most of the probed defines are put into config.h
15417  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15418
15419  # The spec.gmk file contains all variables for the make system.
15420  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15421
15422  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15423  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15424
15425  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15426  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15427
15428  # The compare.sh is used to compare the build output to other builds.
15429  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15430
15431  # Spec.sh is currently used by compare-objects.sh
15432  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15433
15434  # The generated Makefile knows where the spec.gmk is and where the source is.
15435  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15436  # which will look for generated configurations
15437  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15438
15439
15440
15441# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15442
15443  for ac_prog in apt-get yum port pkgutil pkgadd
15444do
15445  # Extract the first word of "$ac_prog", so it can be a program name with args.
15446set dummy $ac_prog; ac_word=$2
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15448$as_echo_n "checking for $ac_word... " >&6; }
15449if ${ac_cv_prog_PKGHANDLER+:} false; then :
15450  $as_echo_n "(cached) " >&6
15451else
15452  if test -n "$PKGHANDLER"; then
15453  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15454else
15455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15456for as_dir in $PATH
15457do
15458  IFS=$as_save_IFS
15459  test -z "$as_dir" && as_dir=.
15460    for ac_exec_ext in '' $ac_executable_extensions; do
15461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15462    ac_cv_prog_PKGHANDLER="$ac_prog"
15463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15464    break 2
15465  fi
15466done
15467  done
15468IFS=$as_save_IFS
15469
15470fi
15471fi
15472PKGHANDLER=$ac_cv_prog_PKGHANDLER
15473if test -n "$PKGHANDLER"; then
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15475$as_echo "$PKGHANDLER" >&6; }
15476else
15477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15478$as_echo "no" >&6; }
15479fi
15480
15481
15482  test -n "$PKGHANDLER" && break
15483done
15484
15485
15486
15487# Setup tools that requires more complex handling, or that is not needed by the configure script.
15488
15489
15490  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15491  if test "x$MAKE" != x; then
15492    # User has supplied a make, test it.
15493    if test ! -f "$MAKE"; then
15494      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15495    fi
15496
15497  MAKE_CANDIDATE=""$MAKE""
15498  DESCRIPTION="user supplied MAKE=$MAKE"
15499  if test "x$MAKE_CANDIDATE" != x; then
15500    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15501$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15502    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15503    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15504    if test "x$IS_GNU_MAKE" = x; then
15505      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15506$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15507    else
15508      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15509      if test "x$IS_MODERN_MAKE" = x; then
15510        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15511$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15512      else
15513        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15514          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15515            MAKE_EXPECTED_ENV='cygwin'
15516          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15517            MAKE_EXPECTED_ENV='msys'
15518          else
15519            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15520          fi
15521          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15522          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15523        else
15524          # Not relevant for non-Windows
15525          IS_MAKE_CORRECT_ENV=true
15526        fi
15527        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15528          { $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
15529$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;}
15530        else
15531          FOUND_MAKE=$MAKE_CANDIDATE
15532
15533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15534
15535  # First separate the path from the arguments. This will split at the first
15536  # space.
15537  complete="$FOUND_MAKE"
15538  path="${complete%% *}"
15539  tmp="$complete EOL"
15540  arguments="${tmp#* }"
15541
15542  # Input might be given as Windows format, start by converting to
15543  # unix format.
15544  new_path=`$CYGPATH -u "$path"`
15545
15546  # Now try to locate executable using which
15547  new_path=`$WHICH "$new_path" 2> /dev/null`
15548  # bat and cmd files are not always considered executable in cygwin causing which
15549  # to not find them
15550  if test "x$new_path" = x \
15551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15553    new_path=`$CYGPATH -u "$path"`
15554  fi
15555  if test "x$new_path" = x; then
15556    # Oops. Which didn't find the executable.
15557    # The splitting of arguments from the executable at a space might have been incorrect,
15558    # since paths with space are more likely in Windows. Give it another try with the whole
15559    # argument.
15560    path="$complete"
15561    arguments="EOL"
15562    new_path=`$CYGPATH -u "$path"`
15563    new_path=`$WHICH "$new_path" 2> /dev/null`
15564    # bat and cmd files are not always considered executable in cygwin causing which
15565    # to not find them
15566    if test "x$new_path" = x \
15567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15569      new_path=`$CYGPATH -u "$path"`
15570    fi
15571    if test "x$new_path" = x; then
15572      # It's still not found. Now this is an unrecoverable error.
15573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15575      has_space=`$ECHO "$complete" | $GREP " "`
15576      if test "x$has_space" != x; then
15577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15579      fi
15580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15581    fi
15582  fi
15583
15584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15587  # "foo.exe" is OK but "foo" is an error.
15588  #
15589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15590  # It is also a way to make sure we got the proper file name for the real test later on.
15591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15592  if test "x$test_shortpath" = x; then
15593    # Short path failed, file does not exist as specified.
15594    # Try adding .exe or .cmd
15595    if test -f "${new_path}.exe"; then
15596      input_to_shortpath="${new_path}.exe"
15597    elif test -f "${new_path}.cmd"; then
15598      input_to_shortpath="${new_path}.cmd"
15599    else
15600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15605    fi
15606  else
15607    input_to_shortpath="$new_path"
15608  fi
15609
15610  # Call helper function which possibly converts this using DOS-style short mode.
15611  # If so, the updated path is stored in $new_path.
15612  new_path="$input_to_shortpath"
15613
15614  input_path="$input_to_shortpath"
15615  # Check if we need to convert this using DOS-style short mode. If the path
15616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15617  # take no chances and rewrite it.
15618  # Note: m4 eats our [], so we need to use [ and ] instead.
15619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15620  if test "x$has_forbidden_chars" != x; then
15621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15625      # Going to short mode and back again did indeed matter. Since short mode is
15626      # case insensitive, let's make it lowercase to improve readability.
15627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15628      # Now convert it back to Unix-style (cygpath)
15629      input_path=`$CYGPATH -u "$shortmode_path"`
15630      new_path="$input_path"
15631    fi
15632  fi
15633
15634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15635  if test "x$test_cygdrive_prefix" = x; then
15636    # As a simple fix, exclude /usr/bin since it's not a real path.
15637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15639      # a path prefixed by /cygdrive for fixpath to work.
15640      new_path="$CYGWIN_ROOT_PATH$input_path"
15641    fi
15642  fi
15643
15644  # remove trailing .exe if any
15645  new_path="${new_path/%.exe/}"
15646
15647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15648
15649  # First separate the path from the arguments. This will split at the first
15650  # space.
15651  complete="$FOUND_MAKE"
15652  path="${complete%% *}"
15653  tmp="$complete EOL"
15654  arguments="${tmp#* }"
15655
15656  # Input might be given as Windows format, start by converting to
15657  # unix format.
15658  new_path="$path"
15659
15660  windows_path="$new_path"
15661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15662    unix_path=`$CYGPATH -u "$windows_path"`
15663    new_path="$unix_path"
15664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15666    new_path="$unix_path"
15667  fi
15668
15669
15670  # Now try to locate executable using which
15671  new_path=`$WHICH "$new_path" 2> /dev/null`
15672
15673  if test "x$new_path" = x; then
15674    # Oops. Which didn't find the executable.
15675    # The splitting of arguments from the executable at a space might have been incorrect,
15676    # since paths with space are more likely in Windows. Give it another try with the whole
15677    # argument.
15678    path="$complete"
15679    arguments="EOL"
15680    new_path="$path"
15681
15682  windows_path="$new_path"
15683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684    unix_path=`$CYGPATH -u "$windows_path"`
15685    new_path="$unix_path"
15686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15688    new_path="$unix_path"
15689  fi
15690
15691
15692    new_path=`$WHICH "$new_path" 2> /dev/null`
15693    # bat and cmd files are not always considered executable in MSYS causing which
15694    # to not find them
15695    if test "x$new_path" = x \
15696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15698      new_path="$path"
15699
15700  windows_path="$new_path"
15701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15702    unix_path=`$CYGPATH -u "$windows_path"`
15703    new_path="$unix_path"
15704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15706    new_path="$unix_path"
15707  fi
15708
15709    fi
15710
15711    if test "x$new_path" = x; then
15712      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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 new_path has a complete unix path to the binary
15725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15726    # Keep paths in /bin as-is, but remove trailing .exe if any
15727    new_path="${new_path/%.exe/}"
15728    # Do not save /bin paths to all_fixpath_prefixes!
15729  else
15730    # Not in mixed or Windows style, start by that.
15731    new_path=`cmd //c echo $new_path`
15732
15733  input_path="$new_path"
15734  # Check if we need to convert this using DOS-style short mode. If the path
15735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15736  # take no chances and rewrite it.
15737  # Note: m4 eats our [], so we need to use [ and ] instead.
15738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15739  if test "x$has_forbidden_chars" != x; then
15740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15742  fi
15743
15744    # Output is in $new_path
15745
15746  windows_path="$new_path"
15747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15748    unix_path=`$CYGPATH -u "$windows_path"`
15749    new_path="$unix_path"
15750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15752    new_path="$unix_path"
15753  fi
15754
15755    # remove trailing .exe if any
15756    new_path="${new_path/%.exe/}"
15757
15758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15760  fi
15761
15762  else
15763    # We're on a posix platform. Hooray! :)
15764    # First separate the path from the arguments. This will split at the first
15765    # space.
15766    complete="$FOUND_MAKE"
15767    path="${complete%% *}"
15768    tmp="$complete EOL"
15769    arguments="${tmp#* }"
15770
15771    # Cannot rely on the command "which" here since it doesn't always work.
15772    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15773    if test -z "$is_absolute_path"; then
15774      # Path to executable is not absolute. Find it.
15775      IFS_save="$IFS"
15776      IFS=:
15777      for p in $PATH; do
15778        if test -f "$p/$path" && test -x "$p/$path"; then
15779          new_path="$p/$path"
15780          break
15781        fi
15782      done
15783      IFS="$IFS_save"
15784    else
15785      # This is an absolute path, we can use it without further modifications.
15786      new_path="$path"
15787    fi
15788
15789    if test "x$new_path" = x; then
15790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15791$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15792      has_space=`$ECHO "$complete" | $GREP " "`
15793      if test "x$has_space" != x; then
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15796      fi
15797      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15798    fi
15799  fi
15800
15801  # Now join together the path and the arguments once again
15802  if test "x$arguments" != xEOL; then
15803    new_complete="$new_path ${arguments% *}"
15804  else
15805    new_complete="$new_path"
15806  fi
15807
15808  if test "x$complete" != "x$new_complete"; then
15809    FOUND_MAKE="$new_complete"
15810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15811$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15812  fi
15813
15814        fi
15815      fi
15816    fi
15817  fi
15818
15819    if test "x$FOUND_MAKE" = x; then
15820      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15821    fi
15822  else
15823    # Try our hardest to locate a correct version of GNU make
15824    for ac_prog in gmake
15825do
15826  # Extract the first word of "$ac_prog", so it can be a program name with args.
15827set dummy $ac_prog; ac_word=$2
15828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15829$as_echo_n "checking for $ac_word... " >&6; }
15830if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15831  $as_echo_n "(cached) " >&6
15832else
15833  case $CHECK_GMAKE in
15834  [\\/]* | ?:[\\/]*)
15835  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15836  ;;
15837  *)
15838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15839for as_dir in $PATH
15840do
15841  IFS=$as_save_IFS
15842  test -z "$as_dir" && as_dir=.
15843    for ac_exec_ext in '' $ac_executable_extensions; do
15844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15845    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15847    break 2
15848  fi
15849done
15850  done
15851IFS=$as_save_IFS
15852
15853  ;;
15854esac
15855fi
15856CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15857if test -n "$CHECK_GMAKE"; then
15858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15859$as_echo "$CHECK_GMAKE" >&6; }
15860else
15861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15862$as_echo "no" >&6; }
15863fi
15864
15865
15866  test -n "$CHECK_GMAKE" && break
15867done
15868
15869
15870  MAKE_CANDIDATE=""$CHECK_GMAKE""
15871  DESCRIPTION="gmake in PATH"
15872  if test "x$MAKE_CANDIDATE" != x; then
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15874$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15875    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15876    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15877    if test "x$IS_GNU_MAKE" = x; then
15878      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15879$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15880    else
15881      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15882      if test "x$IS_MODERN_MAKE" = x; then
15883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15884$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15885      else
15886        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15887          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15888            MAKE_EXPECTED_ENV='cygwin'
15889          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15890            MAKE_EXPECTED_ENV='msys'
15891          else
15892            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15893          fi
15894          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15895          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15896        else
15897          # Not relevant for non-Windows
15898          IS_MAKE_CORRECT_ENV=true
15899        fi
15900        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15901          { $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
15902$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;}
15903        else
15904          FOUND_MAKE=$MAKE_CANDIDATE
15905
15906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15907
15908  # First separate the path from the arguments. This will split at the first
15909  # space.
15910  complete="$FOUND_MAKE"
15911  path="${complete%% *}"
15912  tmp="$complete EOL"
15913  arguments="${tmp#* }"
15914
15915  # Input might be given as Windows format, start by converting to
15916  # unix format.
15917  new_path=`$CYGPATH -u "$path"`
15918
15919  # Now try to locate executable using which
15920  new_path=`$WHICH "$new_path" 2> /dev/null`
15921  # bat and cmd files are not always considered executable in cygwin causing which
15922  # to not find them
15923  if test "x$new_path" = x \
15924      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15925      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15926    new_path=`$CYGPATH -u "$path"`
15927  fi
15928  if test "x$new_path" = x; then
15929    # Oops. Which didn't find the executable.
15930    # The splitting of arguments from the executable at a space might have been incorrect,
15931    # since paths with space are more likely in Windows. Give it another try with the whole
15932    # argument.
15933    path="$complete"
15934    arguments="EOL"
15935    new_path=`$CYGPATH -u "$path"`
15936    new_path=`$WHICH "$new_path" 2> /dev/null`
15937    # bat and cmd files are not always considered executable in cygwin causing which
15938    # to not find them
15939    if test "x$new_path" = x \
15940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15942      new_path=`$CYGPATH -u "$path"`
15943    fi
15944    if test "x$new_path" = x; then
15945      # It's still not found. Now this is an unrecoverable error.
15946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15947$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15948      has_space=`$ECHO "$complete" | $GREP " "`
15949      if test "x$has_space" != x; then
15950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15952      fi
15953      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15954    fi
15955  fi
15956
15957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15960  # "foo.exe" is OK but "foo" is an error.
15961  #
15962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15963  # It is also a way to make sure we got the proper file name for the real test later on.
15964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15965  if test "x$test_shortpath" = x; then
15966    # Short path failed, file does not exist as specified.
15967    # Try adding .exe or .cmd
15968    if test -f "${new_path}.exe"; then
15969      input_to_shortpath="${new_path}.exe"
15970    elif test -f "${new_path}.cmd"; then
15971      input_to_shortpath="${new_path}.cmd"
15972    else
15973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15977      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15978    fi
15979  else
15980    input_to_shortpath="$new_path"
15981  fi
15982
15983  # Call helper function which possibly converts this using DOS-style short mode.
15984  # If so, the updated path is stored in $new_path.
15985  new_path="$input_to_shortpath"
15986
15987  input_path="$input_to_shortpath"
15988  # Check if we need to convert this using DOS-style short mode. If the path
15989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15990  # take no chances and rewrite it.
15991  # Note: m4 eats our [], so we need to use [ and ] instead.
15992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15993  if test "x$has_forbidden_chars" != x; then
15994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15998      # Going to short mode and back again did indeed matter. Since short mode is
15999      # case insensitive, let's make it lowercase to improve readability.
16000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16001      # Now convert it back to Unix-style (cygpath)
16002      input_path=`$CYGPATH -u "$shortmode_path"`
16003      new_path="$input_path"
16004    fi
16005  fi
16006
16007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16008  if test "x$test_cygdrive_prefix" = x; then
16009    # As a simple fix, exclude /usr/bin since it's not a real path.
16010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16012      # a path prefixed by /cygdrive for fixpath to work.
16013      new_path="$CYGWIN_ROOT_PATH$input_path"
16014    fi
16015  fi
16016
16017  # remove trailing .exe if any
16018  new_path="${new_path/%.exe/}"
16019
16020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16021
16022  # First separate the path from the arguments. This will split at the first
16023  # space.
16024  complete="$FOUND_MAKE"
16025  path="${complete%% *}"
16026  tmp="$complete EOL"
16027  arguments="${tmp#* }"
16028
16029  # Input might be given as Windows format, start by converting to
16030  # unix format.
16031  new_path="$path"
16032
16033  windows_path="$new_path"
16034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16035    unix_path=`$CYGPATH -u "$windows_path"`
16036    new_path="$unix_path"
16037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16039    new_path="$unix_path"
16040  fi
16041
16042
16043  # Now try to locate executable using which
16044  new_path=`$WHICH "$new_path" 2> /dev/null`
16045
16046  if test "x$new_path" = x; then
16047    # Oops. Which didn't find the executable.
16048    # The splitting of arguments from the executable at a space might have been incorrect,
16049    # since paths with space are more likely in Windows. Give it another try with the whole
16050    # argument.
16051    path="$complete"
16052    arguments="EOL"
16053    new_path="$path"
16054
16055  windows_path="$new_path"
16056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16057    unix_path=`$CYGPATH -u "$windows_path"`
16058    new_path="$unix_path"
16059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16061    new_path="$unix_path"
16062  fi
16063
16064
16065    new_path=`$WHICH "$new_path" 2> /dev/null`
16066    # bat and cmd files are not always considered executable in MSYS causing which
16067    # to not find them
16068    if test "x$new_path" = x \
16069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16071      new_path="$path"
16072
16073  windows_path="$new_path"
16074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16075    unix_path=`$CYGPATH -u "$windows_path"`
16076    new_path="$unix_path"
16077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16079    new_path="$unix_path"
16080  fi
16081
16082    fi
16083
16084    if test "x$new_path" = x; then
16085      # It's still not found. Now this is an unrecoverable error.
16086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16088      has_space=`$ECHO "$complete" | $GREP " "`
16089      if test "x$has_space" != x; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16092      fi
16093      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16094    fi
16095  fi
16096
16097  # Now new_path has a complete unix path to the binary
16098  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16099    # Keep paths in /bin as-is, but remove trailing .exe if any
16100    new_path="${new_path/%.exe/}"
16101    # Do not save /bin paths to all_fixpath_prefixes!
16102  else
16103    # Not in mixed or Windows style, start by that.
16104    new_path=`cmd //c echo $new_path`
16105
16106  input_path="$new_path"
16107  # Check if we need to convert this using DOS-style short mode. If the path
16108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16109  # take no chances and rewrite it.
16110  # Note: m4 eats our [], so we need to use [ and ] instead.
16111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16112  if test "x$has_forbidden_chars" != x; then
16113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16115  fi
16116
16117    # Output is in $new_path
16118
16119  windows_path="$new_path"
16120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16121    unix_path=`$CYGPATH -u "$windows_path"`
16122    new_path="$unix_path"
16123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16125    new_path="$unix_path"
16126  fi
16127
16128    # remove trailing .exe if any
16129    new_path="${new_path/%.exe/}"
16130
16131    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16132    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16133  fi
16134
16135  else
16136    # We're on a posix platform. Hooray! :)
16137    # First separate the path from the arguments. This will split at the first
16138    # space.
16139    complete="$FOUND_MAKE"
16140    path="${complete%% *}"
16141    tmp="$complete EOL"
16142    arguments="${tmp#* }"
16143
16144    # Cannot rely on the command "which" here since it doesn't always work.
16145    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16146    if test -z "$is_absolute_path"; then
16147      # Path to executable is not absolute. Find it.
16148      IFS_save="$IFS"
16149      IFS=:
16150      for p in $PATH; do
16151        if test -f "$p/$path" && test -x "$p/$path"; then
16152          new_path="$p/$path"
16153          break
16154        fi
16155      done
16156      IFS="$IFS_save"
16157    else
16158      # This is an absolute path, we can use it without further modifications.
16159      new_path="$path"
16160    fi
16161
16162    if test "x$new_path" = x; then
16163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16164$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16165      has_space=`$ECHO "$complete" | $GREP " "`
16166      if test "x$has_space" != x; then
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16169      fi
16170      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16171    fi
16172  fi
16173
16174  # Now join together the path and the arguments once again
16175  if test "x$arguments" != xEOL; then
16176    new_complete="$new_path ${arguments% *}"
16177  else
16178    new_complete="$new_path"
16179  fi
16180
16181  if test "x$complete" != "x$new_complete"; then
16182    FOUND_MAKE="$new_complete"
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16184$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16185  fi
16186
16187        fi
16188      fi
16189    fi
16190  fi
16191
16192
16193    if test "x$FOUND_MAKE" = x; then
16194      for ac_prog in make
16195do
16196  # Extract the first word of "$ac_prog", so it can be a program name with args.
16197set dummy $ac_prog; ac_word=$2
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16199$as_echo_n "checking for $ac_word... " >&6; }
16200if ${ac_cv_path_CHECK_MAKE+:} false; then :
16201  $as_echo_n "(cached) " >&6
16202else
16203  case $CHECK_MAKE in
16204  [\\/]* | ?:[\\/]*)
16205  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16206  ;;
16207  *)
16208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16209for as_dir in $PATH
16210do
16211  IFS=$as_save_IFS
16212  test -z "$as_dir" && as_dir=.
16213    for ac_exec_ext in '' $ac_executable_extensions; do
16214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16215    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16217    break 2
16218  fi
16219done
16220  done
16221IFS=$as_save_IFS
16222
16223  ;;
16224esac
16225fi
16226CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16227if test -n "$CHECK_MAKE"; then
16228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16229$as_echo "$CHECK_MAKE" >&6; }
16230else
16231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16232$as_echo "no" >&6; }
16233fi
16234
16235
16236  test -n "$CHECK_MAKE" && break
16237done
16238
16239
16240  MAKE_CANDIDATE=""$CHECK_MAKE""
16241  DESCRIPTION="make in PATH"
16242  if test "x$MAKE_CANDIDATE" != x; then
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16244$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16245    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16246    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16247    if test "x$IS_GNU_MAKE" = x; then
16248      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16249$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16250    else
16251      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16252      if test "x$IS_MODERN_MAKE" = x; then
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16254$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16255      else
16256        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16257          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16258            MAKE_EXPECTED_ENV='cygwin'
16259          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16260            MAKE_EXPECTED_ENV='msys'
16261          else
16262            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16263          fi
16264          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16265          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16266        else
16267          # Not relevant for non-Windows
16268          IS_MAKE_CORRECT_ENV=true
16269        fi
16270        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16271          { $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
16272$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;}
16273        else
16274          FOUND_MAKE=$MAKE_CANDIDATE
16275
16276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16277
16278  # First separate the path from the arguments. This will split at the first
16279  # space.
16280  complete="$FOUND_MAKE"
16281  path="${complete%% *}"
16282  tmp="$complete EOL"
16283  arguments="${tmp#* }"
16284
16285  # Input might be given as Windows format, start by converting to
16286  # unix format.
16287  new_path=`$CYGPATH -u "$path"`
16288
16289  # Now try to locate executable using which
16290  new_path=`$WHICH "$new_path" 2> /dev/null`
16291  # bat and cmd files are not always considered executable in cygwin causing which
16292  # to not find them
16293  if test "x$new_path" = x \
16294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16296    new_path=`$CYGPATH -u "$path"`
16297  fi
16298  if test "x$new_path" = x; then
16299    # Oops. Which didn't find the executable.
16300    # The splitting of arguments from the executable at a space might have been incorrect,
16301    # since paths with space are more likely in Windows. Give it another try with the whole
16302    # argument.
16303    path="$complete"
16304    arguments="EOL"
16305    new_path=`$CYGPATH -u "$path"`
16306    new_path=`$WHICH "$new_path" 2> /dev/null`
16307    # bat and cmd files are not always considered executable in cygwin causing which
16308    # to not find them
16309    if test "x$new_path" = x \
16310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16312      new_path=`$CYGPATH -u "$path"`
16313    fi
16314    if test "x$new_path" = x; then
16315      # It's still not found. Now this is an unrecoverable error.
16316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16318      has_space=`$ECHO "$complete" | $GREP " "`
16319      if test "x$has_space" != x; then
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16322      fi
16323      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16324    fi
16325  fi
16326
16327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16330  # "foo.exe" is OK but "foo" is an error.
16331  #
16332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16333  # It is also a way to make sure we got the proper file name for the real test later on.
16334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16335  if test "x$test_shortpath" = x; then
16336    # Short path failed, file does not exist as specified.
16337    # Try adding .exe or .cmd
16338    if test -f "${new_path}.exe"; then
16339      input_to_shortpath="${new_path}.exe"
16340    elif test -f "${new_path}.cmd"; then
16341      input_to_shortpath="${new_path}.cmd"
16342    else
16343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16347      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16348    fi
16349  else
16350    input_to_shortpath="$new_path"
16351  fi
16352
16353  # Call helper function which possibly converts this using DOS-style short mode.
16354  # If so, the updated path is stored in $new_path.
16355  new_path="$input_to_shortpath"
16356
16357  input_path="$input_to_shortpath"
16358  # Check if we need to convert this using DOS-style short mode. If the path
16359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16360  # take no chances and rewrite it.
16361  # Note: m4 eats our [], so we need to use [ and ] instead.
16362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16363  if test "x$has_forbidden_chars" != x; then
16364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16368      # Going to short mode and back again did indeed matter. Since short mode is
16369      # case insensitive, let's make it lowercase to improve readability.
16370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16371      # Now convert it back to Unix-style (cygpath)
16372      input_path=`$CYGPATH -u "$shortmode_path"`
16373      new_path="$input_path"
16374    fi
16375  fi
16376
16377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16378  if test "x$test_cygdrive_prefix" = x; then
16379    # As a simple fix, exclude /usr/bin since it's not a real path.
16380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16382      # a path prefixed by /cygdrive for fixpath to work.
16383      new_path="$CYGWIN_ROOT_PATH$input_path"
16384    fi
16385  fi
16386
16387  # remove trailing .exe if any
16388  new_path="${new_path/%.exe/}"
16389
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391
16392  # First separate the path from the arguments. This will split at the first
16393  # space.
16394  complete="$FOUND_MAKE"
16395  path="${complete%% *}"
16396  tmp="$complete EOL"
16397  arguments="${tmp#* }"
16398
16399  # Input might be given as Windows format, start by converting to
16400  # unix format.
16401  new_path="$path"
16402
16403  windows_path="$new_path"
16404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405    unix_path=`$CYGPATH -u "$windows_path"`
16406    new_path="$unix_path"
16407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16409    new_path="$unix_path"
16410  fi
16411
16412
16413  # Now try to locate executable using which
16414  new_path=`$WHICH "$new_path" 2> /dev/null`
16415
16416  if test "x$new_path" = x; then
16417    # Oops. Which didn't find the executable.
16418    # The splitting of arguments from the executable at a space might have been incorrect,
16419    # since paths with space are more likely in Windows. Give it another try with the whole
16420    # argument.
16421    path="$complete"
16422    arguments="EOL"
16423    new_path="$path"
16424
16425  windows_path="$new_path"
16426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16427    unix_path=`$CYGPATH -u "$windows_path"`
16428    new_path="$unix_path"
16429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16431    new_path="$unix_path"
16432  fi
16433
16434
16435    new_path=`$WHICH "$new_path" 2> /dev/null`
16436    # bat and cmd files are not always considered executable in MSYS causing which
16437    # to not find them
16438    if test "x$new_path" = x \
16439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16441      new_path="$path"
16442
16443  windows_path="$new_path"
16444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445    unix_path=`$CYGPATH -u "$windows_path"`
16446    new_path="$unix_path"
16447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16449    new_path="$unix_path"
16450  fi
16451
16452    fi
16453
16454    if test "x$new_path" = x; then
16455      # It's still not found. Now this is an unrecoverable error.
16456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16457$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16458      has_space=`$ECHO "$complete" | $GREP " "`
16459      if test "x$has_space" != x; then
16460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16462      fi
16463      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16464    fi
16465  fi
16466
16467  # Now new_path has a complete unix path to the binary
16468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16469    # Keep paths in /bin as-is, but remove trailing .exe if any
16470    new_path="${new_path/%.exe/}"
16471    # Do not save /bin paths to all_fixpath_prefixes!
16472  else
16473    # Not in mixed or Windows style, start by that.
16474    new_path=`cmd //c echo $new_path`
16475
16476  input_path="$new_path"
16477  # Check if we need to convert this using DOS-style short mode. If the path
16478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16479  # take no chances and rewrite it.
16480  # Note: m4 eats our [], so we need to use [ and ] instead.
16481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16482  if test "x$has_forbidden_chars" != x; then
16483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16485  fi
16486
16487    # Output is in $new_path
16488
16489  windows_path="$new_path"
16490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16491    unix_path=`$CYGPATH -u "$windows_path"`
16492    new_path="$unix_path"
16493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16495    new_path="$unix_path"
16496  fi
16497
16498    # remove trailing .exe if any
16499    new_path="${new_path/%.exe/}"
16500
16501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16503  fi
16504
16505  else
16506    # We're on a posix platform. Hooray! :)
16507    # First separate the path from the arguments. This will split at the first
16508    # space.
16509    complete="$FOUND_MAKE"
16510    path="${complete%% *}"
16511    tmp="$complete EOL"
16512    arguments="${tmp#* }"
16513
16514    # Cannot rely on the command "which" here since it doesn't always work.
16515    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16516    if test -z "$is_absolute_path"; then
16517      # Path to executable is not absolute. Find it.
16518      IFS_save="$IFS"
16519      IFS=:
16520      for p in $PATH; do
16521        if test -f "$p/$path" && test -x "$p/$path"; then
16522          new_path="$p/$path"
16523          break
16524        fi
16525      done
16526      IFS="$IFS_save"
16527    else
16528      # This is an absolute path, we can use it without further modifications.
16529      new_path="$path"
16530    fi
16531
16532    if test "x$new_path" = x; then
16533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16535      has_space=`$ECHO "$complete" | $GREP " "`
16536      if test "x$has_space" != x; then
16537        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16539      fi
16540      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16541    fi
16542  fi
16543
16544  # Now join together the path and the arguments once again
16545  if test "x$arguments" != xEOL; then
16546    new_complete="$new_path ${arguments% *}"
16547  else
16548    new_complete="$new_path"
16549  fi
16550
16551  if test "x$complete" != "x$new_complete"; then
16552    FOUND_MAKE="$new_complete"
16553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16554$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16555  fi
16556
16557        fi
16558      fi
16559    fi
16560  fi
16561
16562    fi
16563
16564    if test "x$FOUND_MAKE" = x; then
16565      if test "x$TOOLCHAIN_PATH" != x; then
16566        # We have a toolchain path, check that as well before giving up.
16567        OLD_PATH=$PATH
16568        PATH=$TOOLCHAIN_PATH:$PATH
16569        for ac_prog in gmake
16570do
16571  # Extract the first word of "$ac_prog", so it can be a program name with args.
16572set dummy $ac_prog; ac_word=$2
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16574$as_echo_n "checking for $ac_word... " >&6; }
16575if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16576  $as_echo_n "(cached) " >&6
16577else
16578  case $CHECK_TOOLSDIR_GMAKE in
16579  [\\/]* | ?:[\\/]*)
16580  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16581  ;;
16582  *)
16583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16584for as_dir in $PATH
16585do
16586  IFS=$as_save_IFS
16587  test -z "$as_dir" && as_dir=.
16588    for ac_exec_ext in '' $ac_executable_extensions; do
16589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16590    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16592    break 2
16593  fi
16594done
16595  done
16596IFS=$as_save_IFS
16597
16598  ;;
16599esac
16600fi
16601CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16602if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16604$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16605else
16606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16607$as_echo "no" >&6; }
16608fi
16609
16610
16611  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16612done
16613
16614
16615  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16616  DESCRIPTION="gmake in tools-dir"
16617  if test "x$MAKE_CANDIDATE" != x; then
16618    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16619$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16620    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16621    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16622    if test "x$IS_GNU_MAKE" = x; then
16623      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16624$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16625    else
16626      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16627      if test "x$IS_MODERN_MAKE" = x; then
16628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16629$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16630      else
16631        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16632          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633            MAKE_EXPECTED_ENV='cygwin'
16634          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16635            MAKE_EXPECTED_ENV='msys'
16636          else
16637            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16638          fi
16639          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16640          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16641        else
16642          # Not relevant for non-Windows
16643          IS_MAKE_CORRECT_ENV=true
16644        fi
16645        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16646          { $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
16647$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;}
16648        else
16649          FOUND_MAKE=$MAKE_CANDIDATE
16650
16651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16652
16653  # First separate the path from the arguments. This will split at the first
16654  # space.
16655  complete="$FOUND_MAKE"
16656  path="${complete%% *}"
16657  tmp="$complete EOL"
16658  arguments="${tmp#* }"
16659
16660  # Input might be given as Windows format, start by converting to
16661  # unix format.
16662  new_path=`$CYGPATH -u "$path"`
16663
16664  # Now try to locate executable using which
16665  new_path=`$WHICH "$new_path" 2> /dev/null`
16666  # bat and cmd files are not always considered executable in cygwin causing which
16667  # to not find them
16668  if test "x$new_path" = x \
16669      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16670      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16671    new_path=`$CYGPATH -u "$path"`
16672  fi
16673  if test "x$new_path" = x; then
16674    # Oops. Which didn't find the executable.
16675    # The splitting of arguments from the executable at a space might have been incorrect,
16676    # since paths with space are more likely in Windows. Give it another try with the whole
16677    # argument.
16678    path="$complete"
16679    arguments="EOL"
16680    new_path=`$CYGPATH -u "$path"`
16681    new_path=`$WHICH "$new_path" 2> /dev/null`
16682    # bat and cmd files are not always considered executable in cygwin causing which
16683    # to not find them
16684    if test "x$new_path" = x \
16685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16687      new_path=`$CYGPATH -u "$path"`
16688    fi
16689    if test "x$new_path" = x; then
16690      # It's still not found. Now this is an unrecoverable error.
16691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16692$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16693      has_space=`$ECHO "$complete" | $GREP " "`
16694      if test "x$has_space" != x; then
16695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16697      fi
16698      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16699    fi
16700  fi
16701
16702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16705  # "foo.exe" is OK but "foo" is an error.
16706  #
16707  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16708  # It is also a way to make sure we got the proper file name for the real test later on.
16709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16710  if test "x$test_shortpath" = x; then
16711    # Short path failed, file does not exist as specified.
16712    # Try adding .exe or .cmd
16713    if test -f "${new_path}.exe"; then
16714      input_to_shortpath="${new_path}.exe"
16715    elif test -f "${new_path}.cmd"; then
16716      input_to_shortpath="${new_path}.cmd"
16717    else
16718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16720      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16721$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16723    fi
16724  else
16725    input_to_shortpath="$new_path"
16726  fi
16727
16728  # Call helper function which possibly converts this using DOS-style short mode.
16729  # If so, the updated path is stored in $new_path.
16730  new_path="$input_to_shortpath"
16731
16732  input_path="$input_to_shortpath"
16733  # Check if we need to convert this using DOS-style short mode. If the path
16734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16735  # take no chances and rewrite it.
16736  # Note: m4 eats our [], so we need to use [ and ] instead.
16737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16738  if test "x$has_forbidden_chars" != x; then
16739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16743      # Going to short mode and back again did indeed matter. Since short mode is
16744      # case insensitive, let's make it lowercase to improve readability.
16745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16746      # Now convert it back to Unix-style (cygpath)
16747      input_path=`$CYGPATH -u "$shortmode_path"`
16748      new_path="$input_path"
16749    fi
16750  fi
16751
16752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16753  if test "x$test_cygdrive_prefix" = x; then
16754    # As a simple fix, exclude /usr/bin since it's not a real path.
16755    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16757      # a path prefixed by /cygdrive for fixpath to work.
16758      new_path="$CYGWIN_ROOT_PATH$input_path"
16759    fi
16760  fi
16761
16762  # remove trailing .exe if any
16763  new_path="${new_path/%.exe/}"
16764
16765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16766
16767  # First separate the path from the arguments. This will split at the first
16768  # space.
16769  complete="$FOUND_MAKE"
16770  path="${complete%% *}"
16771  tmp="$complete EOL"
16772  arguments="${tmp#* }"
16773
16774  # Input might be given as Windows format, start by converting to
16775  # unix format.
16776  new_path="$path"
16777
16778  windows_path="$new_path"
16779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780    unix_path=`$CYGPATH -u "$windows_path"`
16781    new_path="$unix_path"
16782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16784    new_path="$unix_path"
16785  fi
16786
16787
16788  # Now try to locate executable using which
16789  new_path=`$WHICH "$new_path" 2> /dev/null`
16790
16791  if test "x$new_path" = x; then
16792    # Oops. Which didn't find the executable.
16793    # The splitting of arguments from the executable at a space might have been incorrect,
16794    # since paths with space are more likely in Windows. Give it another try with the whole
16795    # argument.
16796    path="$complete"
16797    arguments="EOL"
16798    new_path="$path"
16799
16800  windows_path="$new_path"
16801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16802    unix_path=`$CYGPATH -u "$windows_path"`
16803    new_path="$unix_path"
16804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16806    new_path="$unix_path"
16807  fi
16808
16809
16810    new_path=`$WHICH "$new_path" 2> /dev/null`
16811    # bat and cmd files are not always considered executable in MSYS causing which
16812    # to not find them
16813    if test "x$new_path" = x \
16814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16816      new_path="$path"
16817
16818  windows_path="$new_path"
16819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16820    unix_path=`$CYGPATH -u "$windows_path"`
16821    new_path="$unix_path"
16822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16824    new_path="$unix_path"
16825  fi
16826
16827    fi
16828
16829    if test "x$new_path" = x; then
16830      # It's still not found. Now this is an unrecoverable error.
16831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16833      has_space=`$ECHO "$complete" | $GREP " "`
16834      if test "x$has_space" != x; then
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16837      fi
16838      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16839    fi
16840  fi
16841
16842  # Now new_path has a complete unix path to the binary
16843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16844    # Keep paths in /bin as-is, but remove trailing .exe if any
16845    new_path="${new_path/%.exe/}"
16846    # Do not save /bin paths to all_fixpath_prefixes!
16847  else
16848    # Not in mixed or Windows style, start by that.
16849    new_path=`cmd //c echo $new_path`
16850
16851  input_path="$new_path"
16852  # Check if we need to convert this using DOS-style short mode. If the path
16853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16854  # take no chances and rewrite it.
16855  # Note: m4 eats our [], so we need to use [ and ] instead.
16856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16857  if test "x$has_forbidden_chars" != x; then
16858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16860  fi
16861
16862    # Output is in $new_path
16863
16864  windows_path="$new_path"
16865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866    unix_path=`$CYGPATH -u "$windows_path"`
16867    new_path="$unix_path"
16868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870    new_path="$unix_path"
16871  fi
16872
16873    # remove trailing .exe if any
16874    new_path="${new_path/%.exe/}"
16875
16876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16878  fi
16879
16880  else
16881    # We're on a posix platform. Hooray! :)
16882    # First separate the path from the arguments. This will split at the first
16883    # space.
16884    complete="$FOUND_MAKE"
16885    path="${complete%% *}"
16886    tmp="$complete EOL"
16887    arguments="${tmp#* }"
16888
16889    # Cannot rely on the command "which" here since it doesn't always work.
16890    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16891    if test -z "$is_absolute_path"; then
16892      # Path to executable is not absolute. Find it.
16893      IFS_save="$IFS"
16894      IFS=:
16895      for p in $PATH; do
16896        if test -f "$p/$path" && test -x "$p/$path"; then
16897          new_path="$p/$path"
16898          break
16899        fi
16900      done
16901      IFS="$IFS_save"
16902    else
16903      # This is an absolute path, we can use it without further modifications.
16904      new_path="$path"
16905    fi
16906
16907    if test "x$new_path" = x; then
16908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16909$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16910      has_space=`$ECHO "$complete" | $GREP " "`
16911      if test "x$has_space" != x; then
16912        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16914      fi
16915      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16916    fi
16917  fi
16918
16919  # Now join together the path and the arguments once again
16920  if test "x$arguments" != xEOL; then
16921    new_complete="$new_path ${arguments% *}"
16922  else
16923    new_complete="$new_path"
16924  fi
16925
16926  if test "x$complete" != "x$new_complete"; then
16927    FOUND_MAKE="$new_complete"
16928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16929$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16930  fi
16931
16932        fi
16933      fi
16934    fi
16935  fi
16936
16937        if test "x$FOUND_MAKE" = x; then
16938          for ac_prog in make
16939do
16940  # Extract the first word of "$ac_prog", so it can be a program name with args.
16941set dummy $ac_prog; ac_word=$2
16942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16943$as_echo_n "checking for $ac_word... " >&6; }
16944if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16945  $as_echo_n "(cached) " >&6
16946else
16947  case $CHECK_TOOLSDIR_MAKE in
16948  [\\/]* | ?:[\\/]*)
16949  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16950  ;;
16951  *)
16952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16953for as_dir in $PATH
16954do
16955  IFS=$as_save_IFS
16956  test -z "$as_dir" && as_dir=.
16957    for ac_exec_ext in '' $ac_executable_extensions; do
16958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16959    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16961    break 2
16962  fi
16963done
16964  done
16965IFS=$as_save_IFS
16966
16967  ;;
16968esac
16969fi
16970CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16971if test -n "$CHECK_TOOLSDIR_MAKE"; then
16972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16973$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16974else
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16976$as_echo "no" >&6; }
16977fi
16978
16979
16980  test -n "$CHECK_TOOLSDIR_MAKE" && break
16981done
16982
16983
16984  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16985  DESCRIPTION="make in tools-dir"
16986  if test "x$MAKE_CANDIDATE" != x; then
16987    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16988$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16989    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16990    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16991    if test "x$IS_GNU_MAKE" = x; then
16992      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16993$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16994    else
16995      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16996      if test "x$IS_MODERN_MAKE" = x; then
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16998$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16999      else
17000        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17001          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17002            MAKE_EXPECTED_ENV='cygwin'
17003          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17004            MAKE_EXPECTED_ENV='msys'
17005          else
17006            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17007          fi
17008          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17009          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17010        else
17011          # Not relevant for non-Windows
17012          IS_MAKE_CORRECT_ENV=true
17013        fi
17014        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17015          { $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
17016$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;}
17017        else
17018          FOUND_MAKE=$MAKE_CANDIDATE
17019
17020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17021
17022  # First separate the path from the arguments. This will split at the first
17023  # space.
17024  complete="$FOUND_MAKE"
17025  path="${complete%% *}"
17026  tmp="$complete EOL"
17027  arguments="${tmp#* }"
17028
17029  # Input might be given as Windows format, start by converting to
17030  # unix format.
17031  new_path=`$CYGPATH -u "$path"`
17032
17033  # Now try to locate executable using which
17034  new_path=`$WHICH "$new_path" 2> /dev/null`
17035  # bat and cmd files are not always considered executable in cygwin causing which
17036  # to not find them
17037  if test "x$new_path" = x \
17038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17040    new_path=`$CYGPATH -u "$path"`
17041  fi
17042  if test "x$new_path" = x; then
17043    # Oops. Which didn't find the executable.
17044    # The splitting of arguments from the executable at a space might have been incorrect,
17045    # since paths with space are more likely in Windows. Give it another try with the whole
17046    # argument.
17047    path="$complete"
17048    arguments="EOL"
17049    new_path=`$CYGPATH -u "$path"`
17050    new_path=`$WHICH "$new_path" 2> /dev/null`
17051    # bat and cmd files are not always considered executable in cygwin causing which
17052    # to not find them
17053    if test "x$new_path" = x \
17054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17056      new_path=`$CYGPATH -u "$path"`
17057    fi
17058    if test "x$new_path" = x; then
17059      # It's still not found. Now this is an unrecoverable error.
17060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17062      has_space=`$ECHO "$complete" | $GREP " "`
17063      if test "x$has_space" != x; then
17064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17066      fi
17067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17068    fi
17069  fi
17070
17071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17074  # "foo.exe" is OK but "foo" is an error.
17075  #
17076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17077  # It is also a way to make sure we got the proper file name for the real test later on.
17078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17079  if test "x$test_shortpath" = x; then
17080    # Short path failed, file does not exist as specified.
17081    # Try adding .exe or .cmd
17082    if test -f "${new_path}.exe"; then
17083      input_to_shortpath="${new_path}.exe"
17084    elif test -f "${new_path}.cmd"; then
17085      input_to_shortpath="${new_path}.cmd"
17086    else
17087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17092    fi
17093  else
17094    input_to_shortpath="$new_path"
17095  fi
17096
17097  # Call helper function which possibly converts this using DOS-style short mode.
17098  # If so, the updated path is stored in $new_path.
17099  new_path="$input_to_shortpath"
17100
17101  input_path="$input_to_shortpath"
17102  # Check if we need to convert this using DOS-style short mode. If the path
17103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17104  # take no chances and rewrite it.
17105  # Note: m4 eats our [], so we need to use [ and ] instead.
17106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17107  if test "x$has_forbidden_chars" != x; then
17108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17112      # Going to short mode and back again did indeed matter. Since short mode is
17113      # case insensitive, let's make it lowercase to improve readability.
17114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17115      # Now convert it back to Unix-style (cygpath)
17116      input_path=`$CYGPATH -u "$shortmode_path"`
17117      new_path="$input_path"
17118    fi
17119  fi
17120
17121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17122  if test "x$test_cygdrive_prefix" = x; then
17123    # As a simple fix, exclude /usr/bin since it's not a real path.
17124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17126      # a path prefixed by /cygdrive for fixpath to work.
17127      new_path="$CYGWIN_ROOT_PATH$input_path"
17128    fi
17129  fi
17130
17131  # remove trailing .exe if any
17132  new_path="${new_path/%.exe/}"
17133
17134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17135
17136  # First separate the path from the arguments. This will split at the first
17137  # space.
17138  complete="$FOUND_MAKE"
17139  path="${complete%% *}"
17140  tmp="$complete EOL"
17141  arguments="${tmp#* }"
17142
17143  # Input might be given as Windows format, start by converting to
17144  # unix format.
17145  new_path="$path"
17146
17147  windows_path="$new_path"
17148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149    unix_path=`$CYGPATH -u "$windows_path"`
17150    new_path="$unix_path"
17151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17153    new_path="$unix_path"
17154  fi
17155
17156
17157  # Now try to locate executable using which
17158  new_path=`$WHICH "$new_path" 2> /dev/null`
17159
17160  if test "x$new_path" = x; then
17161    # Oops. Which didn't find the executable.
17162    # The splitting of arguments from the executable at a space might have been incorrect,
17163    # since paths with space are more likely in Windows. Give it another try with the whole
17164    # argument.
17165    path="$complete"
17166    arguments="EOL"
17167    new_path="$path"
17168
17169  windows_path="$new_path"
17170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171    unix_path=`$CYGPATH -u "$windows_path"`
17172    new_path="$unix_path"
17173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17175    new_path="$unix_path"
17176  fi
17177
17178
17179    new_path=`$WHICH "$new_path" 2> /dev/null`
17180    # bat and cmd files are not always considered executable in MSYS causing which
17181    # to not find them
17182    if test "x$new_path" = x \
17183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17185      new_path="$path"
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196    fi
17197
17198    if test "x$new_path" = x; then
17199      # It's still not found. Now this is an unrecoverable error.
17200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17202      has_space=`$ECHO "$complete" | $GREP " "`
17203      if test "x$has_space" != x; then
17204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17206      fi
17207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17208    fi
17209  fi
17210
17211  # Now new_path has a complete unix path to the binary
17212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17213    # Keep paths in /bin as-is, but remove trailing .exe if any
17214    new_path="${new_path/%.exe/}"
17215    # Do not save /bin paths to all_fixpath_prefixes!
17216  else
17217    # Not in mixed or Windows style, start by that.
17218    new_path=`cmd //c echo $new_path`
17219
17220  input_path="$new_path"
17221  # Check if we need to convert this using DOS-style short mode. If the path
17222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17223  # take no chances and rewrite it.
17224  # Note: m4 eats our [], so we need to use [ and ] instead.
17225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17226  if test "x$has_forbidden_chars" != x; then
17227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17229  fi
17230
17231    # Output is in $new_path
17232
17233  windows_path="$new_path"
17234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17235    unix_path=`$CYGPATH -u "$windows_path"`
17236    new_path="$unix_path"
17237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17239    new_path="$unix_path"
17240  fi
17241
17242    # remove trailing .exe if any
17243    new_path="${new_path/%.exe/}"
17244
17245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17247  fi
17248
17249  else
17250    # We're on a posix platform. Hooray! :)
17251    # First separate the path from the arguments. This will split at the first
17252    # space.
17253    complete="$FOUND_MAKE"
17254    path="${complete%% *}"
17255    tmp="$complete EOL"
17256    arguments="${tmp#* }"
17257
17258    # Cannot rely on the command "which" here since it doesn't always work.
17259    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17260    if test -z "$is_absolute_path"; then
17261      # Path to executable is not absolute. Find it.
17262      IFS_save="$IFS"
17263      IFS=:
17264      for p in $PATH; do
17265        if test -f "$p/$path" && test -x "$p/$path"; then
17266          new_path="$p/$path"
17267          break
17268        fi
17269      done
17270      IFS="$IFS_save"
17271    else
17272      # This is an absolute path, we can use it without further modifications.
17273      new_path="$path"
17274    fi
17275
17276    if test "x$new_path" = x; then
17277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17279      has_space=`$ECHO "$complete" | $GREP " "`
17280      if test "x$has_space" != x; then
17281        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17283      fi
17284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17285    fi
17286  fi
17287
17288  # Now join together the path and the arguments once again
17289  if test "x$arguments" != xEOL; then
17290    new_complete="$new_path ${arguments% *}"
17291  else
17292    new_complete="$new_path"
17293  fi
17294
17295  if test "x$complete" != "x$new_complete"; then
17296    FOUND_MAKE="$new_complete"
17297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17298$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17299  fi
17300
17301        fi
17302      fi
17303    fi
17304  fi
17305
17306        fi
17307        PATH=$OLD_PATH
17308      fi
17309    fi
17310
17311    if test "x$FOUND_MAKE" = x; then
17312      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17313    fi
17314  fi
17315
17316  MAKE=$FOUND_MAKE
17317
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17319$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17320
17321
17322
17323  # Test if find supports -delete
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17325$as_echo_n "checking if find supports -delete... " >&6; }
17326  FIND_DELETE="-delete"
17327
17328  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17329
17330  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17331
17332  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17333  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17334    # No, it does not.
17335    rm $DELETEDIR/TestIfFindSupportsDelete
17336    FIND_DELETE="-exec rm \{\} \+"
17337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17338$as_echo "no" >&6; }
17339  else
17340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17341$as_echo "yes" >&6; }
17342  fi
17343  rmdir $DELETEDIR
17344
17345
17346
17347  # These tools might not be installed by default,
17348  # need hint on how to install them.
17349
17350
17351
17352  # Publish this variable in the help.
17353
17354
17355  if test "x$UNZIP" = x; then
17356    # The variable is not set by user, try to locate tool using the code snippet
17357    for ac_prog in unzip
17358do
17359  # Extract the first word of "$ac_prog", so it can be a program name with args.
17360set dummy $ac_prog; ac_word=$2
17361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17362$as_echo_n "checking for $ac_word... " >&6; }
17363if ${ac_cv_path_UNZIP+:} false; then :
17364  $as_echo_n "(cached) " >&6
17365else
17366  case $UNZIP in
17367  [\\/]* | ?:[\\/]*)
17368  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17369  ;;
17370  *)
17371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17372for as_dir in $PATH
17373do
17374  IFS=$as_save_IFS
17375  test -z "$as_dir" && as_dir=.
17376    for ac_exec_ext in '' $ac_executable_extensions; do
17377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17378    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17380    break 2
17381  fi
17382done
17383  done
17384IFS=$as_save_IFS
17385
17386  ;;
17387esac
17388fi
17389UNZIP=$ac_cv_path_UNZIP
17390if test -n "$UNZIP"; then
17391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17392$as_echo "$UNZIP" >&6; }
17393else
17394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17395$as_echo "no" >&6; }
17396fi
17397
17398
17399  test -n "$UNZIP" && break
17400done
17401
17402  else
17403    # The variable is set, but is it from the command line or the environment?
17404
17405    # Try to remove the string !UNZIP! from our list.
17406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17408      # If it failed, the variable was not from the command line. Ignore it,
17409      # but warn the user (except for BASH, which is always set by the calling BASH).
17410      if test "xUNZIP" != xBASH; then
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17412$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17413      fi
17414      # Try to locate tool using the code snippet
17415      for ac_prog in unzip
17416do
17417  # Extract the first word of "$ac_prog", so it can be a program name with args.
17418set dummy $ac_prog; ac_word=$2
17419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17420$as_echo_n "checking for $ac_word... " >&6; }
17421if ${ac_cv_path_UNZIP+:} false; then :
17422  $as_echo_n "(cached) " >&6
17423else
17424  case $UNZIP in
17425  [\\/]* | ?:[\\/]*)
17426  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17427  ;;
17428  *)
17429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17430for as_dir in $PATH
17431do
17432  IFS=$as_save_IFS
17433  test -z "$as_dir" && as_dir=.
17434    for ac_exec_ext in '' $ac_executable_extensions; do
17435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17436    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17438    break 2
17439  fi
17440done
17441  done
17442IFS=$as_save_IFS
17443
17444  ;;
17445esac
17446fi
17447UNZIP=$ac_cv_path_UNZIP
17448if test -n "$UNZIP"; then
17449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17450$as_echo "$UNZIP" >&6; }
17451else
17452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17453$as_echo "no" >&6; }
17454fi
17455
17456
17457  test -n "$UNZIP" && break
17458done
17459
17460    else
17461      # If it succeeded, then it was overridden by the user. We will use it
17462      # for the tool.
17463
17464      # First remove it from the list of overridden variables, so we can test
17465      # for unknown variables in the end.
17466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17467
17468      # Check if the provided tool contains a complete path.
17469      tool_specified="$UNZIP"
17470      tool_basename="${tool_specified##*/}"
17471      if test "x$tool_basename" = "x$tool_specified"; then
17472        # A command without a complete path is provided, search $PATH.
17473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17474$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17475        # Extract the first word of "$tool_basename", so it can be a program name with args.
17476set dummy $tool_basename; ac_word=$2
17477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17478$as_echo_n "checking for $ac_word... " >&6; }
17479if ${ac_cv_path_UNZIP+:} false; then :
17480  $as_echo_n "(cached) " >&6
17481else
17482  case $UNZIP in
17483  [\\/]* | ?:[\\/]*)
17484  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17485  ;;
17486  *)
17487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17488for as_dir in $PATH
17489do
17490  IFS=$as_save_IFS
17491  test -z "$as_dir" && as_dir=.
17492    for ac_exec_ext in '' $ac_executable_extensions; do
17493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17494    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17496    break 2
17497  fi
17498done
17499  done
17500IFS=$as_save_IFS
17501
17502  ;;
17503esac
17504fi
17505UNZIP=$ac_cv_path_UNZIP
17506if test -n "$UNZIP"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17508$as_echo "$UNZIP" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515        if test "x$UNZIP" = x; then
17516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17517        fi
17518      else
17519        # Otherwise we believe it is a complete path. Use it as it is.
17520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17521$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17523$as_echo_n "checking for UNZIP... " >&6; }
17524        if test ! -x "$tool_specified"; then
17525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17526$as_echo "not found" >&6; }
17527          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17528        fi
17529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17530$as_echo "$tool_specified" >&6; }
17531      fi
17532    fi
17533  fi
17534
17535
17536
17537  if test "x$UNZIP" = x; then
17538    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17539  fi
17540
17541
17542
17543
17544
17545  # Publish this variable in the help.
17546
17547
17548  if test "x$ZIP" = x; then
17549    # The variable is not set by user, try to locate tool using the code snippet
17550    for ac_prog in zip
17551do
17552  # Extract the first word of "$ac_prog", so it can be a program name with args.
17553set dummy $ac_prog; ac_word=$2
17554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555$as_echo_n "checking for $ac_word... " >&6; }
17556if ${ac_cv_path_ZIP+:} false; then :
17557  $as_echo_n "(cached) " >&6
17558else
17559  case $ZIP in
17560  [\\/]* | ?:[\\/]*)
17561  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17562  ;;
17563  *)
17564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17565for as_dir in $PATH
17566do
17567  IFS=$as_save_IFS
17568  test -z "$as_dir" && as_dir=.
17569    for ac_exec_ext in '' $ac_executable_extensions; do
17570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17571    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17573    break 2
17574  fi
17575done
17576  done
17577IFS=$as_save_IFS
17578
17579  ;;
17580esac
17581fi
17582ZIP=$ac_cv_path_ZIP
17583if test -n "$ZIP"; then
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17585$as_echo "$ZIP" >&6; }
17586else
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588$as_echo "no" >&6; }
17589fi
17590
17591
17592  test -n "$ZIP" && break
17593done
17594
17595  else
17596    # The variable is set, but is it from the command line or the environment?
17597
17598    # Try to remove the string !ZIP! from our list.
17599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17601      # If it failed, the variable was not from the command line. Ignore it,
17602      # but warn the user (except for BASH, which is always set by the calling BASH).
17603      if test "xZIP" != xBASH; then
17604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17605$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17606      fi
17607      # Try to locate tool using the code snippet
17608      for ac_prog in zip
17609do
17610  # Extract the first word of "$ac_prog", so it can be a program name with args.
17611set dummy $ac_prog; ac_word=$2
17612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17613$as_echo_n "checking for $ac_word... " >&6; }
17614if ${ac_cv_path_ZIP+:} false; then :
17615  $as_echo_n "(cached) " >&6
17616else
17617  case $ZIP in
17618  [\\/]* | ?:[\\/]*)
17619  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17620  ;;
17621  *)
17622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17623for as_dir in $PATH
17624do
17625  IFS=$as_save_IFS
17626  test -z "$as_dir" && as_dir=.
17627    for ac_exec_ext in '' $ac_executable_extensions; do
17628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17629    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17631    break 2
17632  fi
17633done
17634  done
17635IFS=$as_save_IFS
17636
17637  ;;
17638esac
17639fi
17640ZIP=$ac_cv_path_ZIP
17641if test -n "$ZIP"; then
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17643$as_echo "$ZIP" >&6; }
17644else
17645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17646$as_echo "no" >&6; }
17647fi
17648
17649
17650  test -n "$ZIP" && break
17651done
17652
17653    else
17654      # If it succeeded, then it was overridden by the user. We will use it
17655      # for the tool.
17656
17657      # First remove it from the list of overridden variables, so we can test
17658      # for unknown variables in the end.
17659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17660
17661      # Check if the provided tool contains a complete path.
17662      tool_specified="$ZIP"
17663      tool_basename="${tool_specified##*/}"
17664      if test "x$tool_basename" = "x$tool_specified"; then
17665        # A command without a complete path is provided, search $PATH.
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17667$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17668        # Extract the first word of "$tool_basename", so it can be a program name with args.
17669set dummy $tool_basename; ac_word=$2
17670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17671$as_echo_n "checking for $ac_word... " >&6; }
17672if ${ac_cv_path_ZIP+:} false; then :
17673  $as_echo_n "(cached) " >&6
17674else
17675  case $ZIP in
17676  [\\/]* | ?:[\\/]*)
17677  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17678  ;;
17679  *)
17680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17681for as_dir in $PATH
17682do
17683  IFS=$as_save_IFS
17684  test -z "$as_dir" && as_dir=.
17685    for ac_exec_ext in '' $ac_executable_extensions; do
17686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17687    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17689    break 2
17690  fi
17691done
17692  done
17693IFS=$as_save_IFS
17694
17695  ;;
17696esac
17697fi
17698ZIP=$ac_cv_path_ZIP
17699if test -n "$ZIP"; then
17700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17701$as_echo "$ZIP" >&6; }
17702else
17703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17704$as_echo "no" >&6; }
17705fi
17706
17707
17708        if test "x$ZIP" = x; then
17709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17710        fi
17711      else
17712        # Otherwise we believe it is a complete path. Use it as it is.
17713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17714$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17716$as_echo_n "checking for ZIP... " >&6; }
17717        if test ! -x "$tool_specified"; then
17718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17719$as_echo "not found" >&6; }
17720          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17721        fi
17722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17723$as_echo "$tool_specified" >&6; }
17724      fi
17725    fi
17726  fi
17727
17728
17729
17730  if test "x$ZIP" = x; then
17731    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17732  fi
17733
17734
17735
17736  # Non-required basic tools
17737
17738
17739
17740  # Publish this variable in the help.
17741
17742
17743  if test "x$LDD" = x; then
17744    # The variable is not set by user, try to locate tool using the code snippet
17745    for ac_prog in ldd
17746do
17747  # Extract the first word of "$ac_prog", so it can be a program name with args.
17748set dummy $ac_prog; ac_word=$2
17749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17750$as_echo_n "checking for $ac_word... " >&6; }
17751if ${ac_cv_path_LDD+:} false; then :
17752  $as_echo_n "(cached) " >&6
17753else
17754  case $LDD in
17755  [\\/]* | ?:[\\/]*)
17756  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17757  ;;
17758  *)
17759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17760for as_dir in $PATH
17761do
17762  IFS=$as_save_IFS
17763  test -z "$as_dir" && as_dir=.
17764    for ac_exec_ext in '' $ac_executable_extensions; do
17765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17766    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17768    break 2
17769  fi
17770done
17771  done
17772IFS=$as_save_IFS
17773
17774  ;;
17775esac
17776fi
17777LDD=$ac_cv_path_LDD
17778if test -n "$LDD"; then
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17780$as_echo "$LDD" >&6; }
17781else
17782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17783$as_echo "no" >&6; }
17784fi
17785
17786
17787  test -n "$LDD" && break
17788done
17789
17790  else
17791    # The variable is set, but is it from the command line or the environment?
17792
17793    # Try to remove the string !LDD! from our list.
17794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17796      # If it failed, the variable was not from the command line. Ignore it,
17797      # but warn the user (except for BASH, which is always set by the calling BASH).
17798      if test "xLDD" != xBASH; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17800$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17801      fi
17802      # Try to locate tool using the code snippet
17803      for ac_prog in ldd
17804do
17805  # Extract the first word of "$ac_prog", so it can be a program name with args.
17806set dummy $ac_prog; ac_word=$2
17807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17808$as_echo_n "checking for $ac_word... " >&6; }
17809if ${ac_cv_path_LDD+:} false; then :
17810  $as_echo_n "(cached) " >&6
17811else
17812  case $LDD in
17813  [\\/]* | ?:[\\/]*)
17814  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17815  ;;
17816  *)
17817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17818for as_dir in $PATH
17819do
17820  IFS=$as_save_IFS
17821  test -z "$as_dir" && as_dir=.
17822    for ac_exec_ext in '' $ac_executable_extensions; do
17823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17824    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17826    break 2
17827  fi
17828done
17829  done
17830IFS=$as_save_IFS
17831
17832  ;;
17833esac
17834fi
17835LDD=$ac_cv_path_LDD
17836if test -n "$LDD"; then
17837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17838$as_echo "$LDD" >&6; }
17839else
17840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17841$as_echo "no" >&6; }
17842fi
17843
17844
17845  test -n "$LDD" && break
17846done
17847
17848    else
17849      # If it succeeded, then it was overridden by the user. We will use it
17850      # for the tool.
17851
17852      # First remove it from the list of overridden variables, so we can test
17853      # for unknown variables in the end.
17854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17855
17856      # Check if the provided tool contains a complete path.
17857      tool_specified="$LDD"
17858      tool_basename="${tool_specified##*/}"
17859      if test "x$tool_basename" = "x$tool_specified"; then
17860        # A command without a complete path is provided, search $PATH.
17861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17862$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17863        # Extract the first word of "$tool_basename", so it can be a program name with args.
17864set dummy $tool_basename; ac_word=$2
17865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17866$as_echo_n "checking for $ac_word... " >&6; }
17867if ${ac_cv_path_LDD+:} false; then :
17868  $as_echo_n "(cached) " >&6
17869else
17870  case $LDD in
17871  [\\/]* | ?:[\\/]*)
17872  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17873  ;;
17874  *)
17875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17876for as_dir in $PATH
17877do
17878  IFS=$as_save_IFS
17879  test -z "$as_dir" && as_dir=.
17880    for ac_exec_ext in '' $ac_executable_extensions; do
17881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17882    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17884    break 2
17885  fi
17886done
17887  done
17888IFS=$as_save_IFS
17889
17890  ;;
17891esac
17892fi
17893LDD=$ac_cv_path_LDD
17894if test -n "$LDD"; then
17895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17896$as_echo "$LDD" >&6; }
17897else
17898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17899$as_echo "no" >&6; }
17900fi
17901
17902
17903        if test "x$LDD" = x; then
17904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17905        fi
17906      else
17907        # Otherwise we believe it is a complete path. Use it as it is.
17908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17909$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17911$as_echo_n "checking for LDD... " >&6; }
17912        if test ! -x "$tool_specified"; then
17913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17914$as_echo "not found" >&6; }
17915          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17916        fi
17917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17918$as_echo "$tool_specified" >&6; }
17919      fi
17920    fi
17921  fi
17922
17923
17924  if test "x$LDD" = "x"; then
17925    # List shared lib dependencies is used for
17926    # debug output and checking for forbidden dependencies.
17927    # We can build without it.
17928    LDD="true"
17929  fi
17930
17931
17932  # Publish this variable in the help.
17933
17934
17935  if test "x$READELF" = x; then
17936    # The variable is not set by user, try to locate tool using the code snippet
17937    for ac_prog in readelf greadelf
17938do
17939  # Extract the first word of "$ac_prog", so it can be a program name with args.
17940set dummy $ac_prog; ac_word=$2
17941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17942$as_echo_n "checking for $ac_word... " >&6; }
17943if ${ac_cv_path_READELF+:} false; then :
17944  $as_echo_n "(cached) " >&6
17945else
17946  case $READELF in
17947  [\\/]* | ?:[\\/]*)
17948  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17949  ;;
17950  *)
17951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17952for as_dir in $PATH
17953do
17954  IFS=$as_save_IFS
17955  test -z "$as_dir" && as_dir=.
17956    for ac_exec_ext in '' $ac_executable_extensions; do
17957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17958    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17960    break 2
17961  fi
17962done
17963  done
17964IFS=$as_save_IFS
17965
17966  ;;
17967esac
17968fi
17969READELF=$ac_cv_path_READELF
17970if test -n "$READELF"; then
17971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17972$as_echo "$READELF" >&6; }
17973else
17974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17975$as_echo "no" >&6; }
17976fi
17977
17978
17979  test -n "$READELF" && break
17980done
17981
17982  else
17983    # The variable is set, but is it from the command line or the environment?
17984
17985    # Try to remove the string !READELF! from our list.
17986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17988      # If it failed, the variable was not from the command line. Ignore it,
17989      # but warn the user (except for BASH, which is always set by the calling BASH).
17990      if test "xREADELF" != xBASH; then
17991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17992$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17993      fi
17994      # Try to locate tool using the code snippet
17995      for ac_prog in readelf greadelf
17996do
17997  # Extract the first word of "$ac_prog", so it can be a program name with args.
17998set dummy $ac_prog; ac_word=$2
17999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18000$as_echo_n "checking for $ac_word... " >&6; }
18001if ${ac_cv_path_READELF+:} false; then :
18002  $as_echo_n "(cached) " >&6
18003else
18004  case $READELF in
18005  [\\/]* | ?:[\\/]*)
18006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18007  ;;
18008  *)
18009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18010for as_dir in $PATH
18011do
18012  IFS=$as_save_IFS
18013  test -z "$as_dir" && as_dir=.
18014    for ac_exec_ext in '' $ac_executable_extensions; do
18015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18018    break 2
18019  fi
18020done
18021  done
18022IFS=$as_save_IFS
18023
18024  ;;
18025esac
18026fi
18027READELF=$ac_cv_path_READELF
18028if test -n "$READELF"; then
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18030$as_echo "$READELF" >&6; }
18031else
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18033$as_echo "no" >&6; }
18034fi
18035
18036
18037  test -n "$READELF" && break
18038done
18039
18040    else
18041      # If it succeeded, then it was overridden by the user. We will use it
18042      # for the tool.
18043
18044      # First remove it from the list of overridden variables, so we can test
18045      # for unknown variables in the end.
18046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18047
18048      # Check if the provided tool contains a complete path.
18049      tool_specified="$READELF"
18050      tool_basename="${tool_specified##*/}"
18051      if test "x$tool_basename" = "x$tool_specified"; then
18052        # A command without a complete path is provided, search $PATH.
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18054$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18055        # Extract the first word of "$tool_basename", so it can be a program name with args.
18056set dummy $tool_basename; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if ${ac_cv_path_READELF+:} false; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $READELF in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085READELF=$ac_cv_path_READELF
18086if test -n "$READELF"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18088$as_echo "$READELF" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095        if test "x$READELF" = x; then
18096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18097        fi
18098      else
18099        # Otherwise we believe it is a complete path. Use it as it is.
18100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18101$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18103$as_echo_n "checking for READELF... " >&6; }
18104        if test ! -x "$tool_specified"; then
18105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18106$as_echo "not found" >&6; }
18107          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18108        fi
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18110$as_echo "$tool_specified" >&6; }
18111      fi
18112    fi
18113  fi
18114
18115
18116
18117
18118  # Publish this variable in the help.
18119
18120
18121  if test "x$HG" = x; then
18122    # The variable is not set by user, try to locate tool using the code snippet
18123    for ac_prog in hg
18124do
18125  # Extract the first word of "$ac_prog", so it can be a program name with args.
18126set dummy $ac_prog; ac_word=$2
18127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18128$as_echo_n "checking for $ac_word... " >&6; }
18129if ${ac_cv_path_HG+:} false; then :
18130  $as_echo_n "(cached) " >&6
18131else
18132  case $HG in
18133  [\\/]* | ?:[\\/]*)
18134  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18135  ;;
18136  *)
18137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18138for as_dir in $PATH
18139do
18140  IFS=$as_save_IFS
18141  test -z "$as_dir" && as_dir=.
18142    for ac_exec_ext in '' $ac_executable_extensions; do
18143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18144    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18146    break 2
18147  fi
18148done
18149  done
18150IFS=$as_save_IFS
18151
18152  ;;
18153esac
18154fi
18155HG=$ac_cv_path_HG
18156if test -n "$HG"; then
18157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18158$as_echo "$HG" >&6; }
18159else
18160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18161$as_echo "no" >&6; }
18162fi
18163
18164
18165  test -n "$HG" && break
18166done
18167
18168  else
18169    # The variable is set, but is it from the command line or the environment?
18170
18171    # Try to remove the string !HG! from our list.
18172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18174      # If it failed, the variable was not from the command line. Ignore it,
18175      # but warn the user (except for BASH, which is always set by the calling BASH).
18176      if test "xHG" != xBASH; then
18177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18178$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18179      fi
18180      # Try to locate tool using the code snippet
18181      for ac_prog in hg
18182do
18183  # Extract the first word of "$ac_prog", so it can be a program name with args.
18184set dummy $ac_prog; ac_word=$2
18185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186$as_echo_n "checking for $ac_word... " >&6; }
18187if ${ac_cv_path_HG+:} false; then :
18188  $as_echo_n "(cached) " >&6
18189else
18190  case $HG in
18191  [\\/]* | ?:[\\/]*)
18192  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18193  ;;
18194  *)
18195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196for as_dir in $PATH
18197do
18198  IFS=$as_save_IFS
18199  test -z "$as_dir" && as_dir=.
18200    for ac_exec_ext in '' $ac_executable_extensions; do
18201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18204    break 2
18205  fi
18206done
18207  done
18208IFS=$as_save_IFS
18209
18210  ;;
18211esac
18212fi
18213HG=$ac_cv_path_HG
18214if test -n "$HG"; then
18215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18216$as_echo "$HG" >&6; }
18217else
18218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220fi
18221
18222
18223  test -n "$HG" && break
18224done
18225
18226    else
18227      # If it succeeded, then it was overridden by the user. We will use it
18228      # for the tool.
18229
18230      # First remove it from the list of overridden variables, so we can test
18231      # for unknown variables in the end.
18232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18233
18234      # Check if the provided tool contains a complete path.
18235      tool_specified="$HG"
18236      tool_basename="${tool_specified##*/}"
18237      if test "x$tool_basename" = "x$tool_specified"; then
18238        # A command without a complete path is provided, search $PATH.
18239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18240$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18241        # Extract the first word of "$tool_basename", so it can be a program name with args.
18242set dummy $tool_basename; ac_word=$2
18243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18244$as_echo_n "checking for $ac_word... " >&6; }
18245if ${ac_cv_path_HG+:} false; then :
18246  $as_echo_n "(cached) " >&6
18247else
18248  case $HG in
18249  [\\/]* | ?:[\\/]*)
18250  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18251  ;;
18252  *)
18253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254for as_dir in $PATH
18255do
18256  IFS=$as_save_IFS
18257  test -z "$as_dir" && as_dir=.
18258    for ac_exec_ext in '' $ac_executable_extensions; do
18259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18260    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18262    break 2
18263  fi
18264done
18265  done
18266IFS=$as_save_IFS
18267
18268  ;;
18269esac
18270fi
18271HG=$ac_cv_path_HG
18272if test -n "$HG"; then
18273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18274$as_echo "$HG" >&6; }
18275else
18276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18277$as_echo "no" >&6; }
18278fi
18279
18280
18281        if test "x$HG" = x; then
18282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18283        fi
18284      else
18285        # Otherwise we believe it is a complete path. Use it as it is.
18286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18287$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18289$as_echo_n "checking for HG... " >&6; }
18290        if test ! -x "$tool_specified"; then
18291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18292$as_echo "not found" >&6; }
18293          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18294        fi
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18296$as_echo "$tool_specified" >&6; }
18297      fi
18298    fi
18299  fi
18300
18301
18302
18303
18304  # Publish this variable in the help.
18305
18306
18307  if test "x$STAT" = x; then
18308    # The variable is not set by user, try to locate tool using the code snippet
18309    for ac_prog in stat
18310do
18311  # Extract the first word of "$ac_prog", so it can be a program name with args.
18312set dummy $ac_prog; ac_word=$2
18313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18314$as_echo_n "checking for $ac_word... " >&6; }
18315if ${ac_cv_path_STAT+:} false; then :
18316  $as_echo_n "(cached) " >&6
18317else
18318  case $STAT in
18319  [\\/]* | ?:[\\/]*)
18320  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18321  ;;
18322  *)
18323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18324for as_dir in $PATH
18325do
18326  IFS=$as_save_IFS
18327  test -z "$as_dir" && as_dir=.
18328    for ac_exec_ext in '' $ac_executable_extensions; do
18329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18330    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18332    break 2
18333  fi
18334done
18335  done
18336IFS=$as_save_IFS
18337
18338  ;;
18339esac
18340fi
18341STAT=$ac_cv_path_STAT
18342if test -n "$STAT"; then
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18344$as_echo "$STAT" >&6; }
18345else
18346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18347$as_echo "no" >&6; }
18348fi
18349
18350
18351  test -n "$STAT" && break
18352done
18353
18354  else
18355    # The variable is set, but is it from the command line or the environment?
18356
18357    # Try to remove the string !STAT! from our list.
18358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18360      # If it failed, the variable was not from the command line. Ignore it,
18361      # but warn the user (except for BASH, which is always set by the calling BASH).
18362      if test "xSTAT" != xBASH; then
18363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18364$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18365      fi
18366      # Try to locate tool using the code snippet
18367      for ac_prog in stat
18368do
18369  # Extract the first word of "$ac_prog", so it can be a program name with args.
18370set dummy $ac_prog; ac_word=$2
18371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372$as_echo_n "checking for $ac_word... " >&6; }
18373if ${ac_cv_path_STAT+:} false; then :
18374  $as_echo_n "(cached) " >&6
18375else
18376  case $STAT in
18377  [\\/]* | ?:[\\/]*)
18378  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18379  ;;
18380  *)
18381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382for as_dir in $PATH
18383do
18384  IFS=$as_save_IFS
18385  test -z "$as_dir" && as_dir=.
18386    for ac_exec_ext in '' $ac_executable_extensions; do
18387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390    break 2
18391  fi
18392done
18393  done
18394IFS=$as_save_IFS
18395
18396  ;;
18397esac
18398fi
18399STAT=$ac_cv_path_STAT
18400if test -n "$STAT"; then
18401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18402$as_echo "$STAT" >&6; }
18403else
18404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405$as_echo "no" >&6; }
18406fi
18407
18408
18409  test -n "$STAT" && break
18410done
18411
18412    else
18413      # If it succeeded, then it was overridden by the user. We will use it
18414      # for the tool.
18415
18416      # First remove it from the list of overridden variables, so we can test
18417      # for unknown variables in the end.
18418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18419
18420      # Check if the provided tool contains a complete path.
18421      tool_specified="$STAT"
18422      tool_basename="${tool_specified##*/}"
18423      if test "x$tool_basename" = "x$tool_specified"; then
18424        # A command without a complete path is provided, search $PATH.
18425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18426$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18427        # Extract the first word of "$tool_basename", so it can be a program name with args.
18428set dummy $tool_basename; ac_word=$2
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18430$as_echo_n "checking for $ac_word... " >&6; }
18431if ${ac_cv_path_STAT+:} false; then :
18432  $as_echo_n "(cached) " >&6
18433else
18434  case $STAT in
18435  [\\/]* | ?:[\\/]*)
18436  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18437  ;;
18438  *)
18439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18440for as_dir in $PATH
18441do
18442  IFS=$as_save_IFS
18443  test -z "$as_dir" && as_dir=.
18444    for ac_exec_ext in '' $ac_executable_extensions; do
18445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18446    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18448    break 2
18449  fi
18450done
18451  done
18452IFS=$as_save_IFS
18453
18454  ;;
18455esac
18456fi
18457STAT=$ac_cv_path_STAT
18458if test -n "$STAT"; then
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18460$as_echo "$STAT" >&6; }
18461else
18462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18463$as_echo "no" >&6; }
18464fi
18465
18466
18467        if test "x$STAT" = x; then
18468          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18469        fi
18470      else
18471        # Otherwise we believe it is a complete path. Use it as it is.
18472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18473$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18475$as_echo_n "checking for STAT... " >&6; }
18476        if test ! -x "$tool_specified"; then
18477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18478$as_echo "not found" >&6; }
18479          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18480        fi
18481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18482$as_echo "$tool_specified" >&6; }
18483      fi
18484    fi
18485  fi
18486
18487
18488
18489
18490  # Publish this variable in the help.
18491
18492
18493  if test "x$TIME" = x; then
18494    # The variable is not set by user, try to locate tool using the code snippet
18495    for ac_prog in time
18496do
18497  # Extract the first word of "$ac_prog", so it can be a program name with args.
18498set dummy $ac_prog; ac_word=$2
18499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18500$as_echo_n "checking for $ac_word... " >&6; }
18501if ${ac_cv_path_TIME+:} false; then :
18502  $as_echo_n "(cached) " >&6
18503else
18504  case $TIME in
18505  [\\/]* | ?:[\\/]*)
18506  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18507  ;;
18508  *)
18509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18510for as_dir in $PATH
18511do
18512  IFS=$as_save_IFS
18513  test -z "$as_dir" && as_dir=.
18514    for ac_exec_ext in '' $ac_executable_extensions; do
18515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18516    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18518    break 2
18519  fi
18520done
18521  done
18522IFS=$as_save_IFS
18523
18524  ;;
18525esac
18526fi
18527TIME=$ac_cv_path_TIME
18528if test -n "$TIME"; then
18529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18530$as_echo "$TIME" >&6; }
18531else
18532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18533$as_echo "no" >&6; }
18534fi
18535
18536
18537  test -n "$TIME" && break
18538done
18539
18540  else
18541    # The variable is set, but is it from the command line or the environment?
18542
18543    # Try to remove the string !TIME! from our list.
18544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18546      # If it failed, the variable was not from the command line. Ignore it,
18547      # but warn the user (except for BASH, which is always set by the calling BASH).
18548      if test "xTIME" != xBASH; then
18549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18550$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18551      fi
18552      # Try to locate tool using the code snippet
18553      for ac_prog in time
18554do
18555  # Extract the first word of "$ac_prog", so it can be a program name with args.
18556set dummy $ac_prog; ac_word=$2
18557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18558$as_echo_n "checking for $ac_word... " >&6; }
18559if ${ac_cv_path_TIME+:} false; then :
18560  $as_echo_n "(cached) " >&6
18561else
18562  case $TIME in
18563  [\\/]* | ?:[\\/]*)
18564  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18565  ;;
18566  *)
18567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18568for as_dir in $PATH
18569do
18570  IFS=$as_save_IFS
18571  test -z "$as_dir" && as_dir=.
18572    for ac_exec_ext in '' $ac_executable_extensions; do
18573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18574    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18576    break 2
18577  fi
18578done
18579  done
18580IFS=$as_save_IFS
18581
18582  ;;
18583esac
18584fi
18585TIME=$ac_cv_path_TIME
18586if test -n "$TIME"; then
18587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18588$as_echo "$TIME" >&6; }
18589else
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591$as_echo "no" >&6; }
18592fi
18593
18594
18595  test -n "$TIME" && break
18596done
18597
18598    else
18599      # If it succeeded, then it was overridden by the user. We will use it
18600      # for the tool.
18601
18602      # First remove it from the list of overridden variables, so we can test
18603      # for unknown variables in the end.
18604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18605
18606      # Check if the provided tool contains a complete path.
18607      tool_specified="$TIME"
18608      tool_basename="${tool_specified##*/}"
18609      if test "x$tool_basename" = "x$tool_specified"; then
18610        # A command without a complete path is provided, search $PATH.
18611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18612$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18613        # Extract the first word of "$tool_basename", so it can be a program name with args.
18614set dummy $tool_basename; ac_word=$2
18615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18616$as_echo_n "checking for $ac_word... " >&6; }
18617if ${ac_cv_path_TIME+:} false; then :
18618  $as_echo_n "(cached) " >&6
18619else
18620  case $TIME in
18621  [\\/]* | ?:[\\/]*)
18622  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18623  ;;
18624  *)
18625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18626for as_dir in $PATH
18627do
18628  IFS=$as_save_IFS
18629  test -z "$as_dir" && as_dir=.
18630    for ac_exec_ext in '' $ac_executable_extensions; do
18631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18632    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18634    break 2
18635  fi
18636done
18637  done
18638IFS=$as_save_IFS
18639
18640  ;;
18641esac
18642fi
18643TIME=$ac_cv_path_TIME
18644if test -n "$TIME"; then
18645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18646$as_echo "$TIME" >&6; }
18647else
18648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18649$as_echo "no" >&6; }
18650fi
18651
18652
18653        if test "x$TIME" = x; then
18654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18655        fi
18656      else
18657        # Otherwise we believe it is a complete path. Use it as it is.
18658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18659$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18661$as_echo_n "checking for TIME... " >&6; }
18662        if test ! -x "$tool_specified"; then
18663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18664$as_echo "not found" >&6; }
18665          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18666        fi
18667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18668$as_echo "$tool_specified" >&6; }
18669      fi
18670    fi
18671  fi
18672
18673
18674  # Check if it's GNU time
18675  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18676  if test "x$IS_GNU_TIME" != x; then
18677    IS_GNU_TIME=yes
18678  else
18679    IS_GNU_TIME=no
18680  fi
18681
18682
18683  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18684
18685
18686
18687  # Publish this variable in the help.
18688
18689
18690  if test "x$COMM" = x; then
18691    # The variable is not set by user, try to locate tool using the code snippet
18692    for ac_prog in comm
18693do
18694  # Extract the first word of "$ac_prog", so it can be a program name with args.
18695set dummy $ac_prog; ac_word=$2
18696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18697$as_echo_n "checking for $ac_word... " >&6; }
18698if ${ac_cv_path_COMM+:} false; then :
18699  $as_echo_n "(cached) " >&6
18700else
18701  case $COMM in
18702  [\\/]* | ?:[\\/]*)
18703  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18704  ;;
18705  *)
18706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18707for as_dir in $PATH
18708do
18709  IFS=$as_save_IFS
18710  test -z "$as_dir" && as_dir=.
18711    for ac_exec_ext in '' $ac_executable_extensions; do
18712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18713    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18715    break 2
18716  fi
18717done
18718  done
18719IFS=$as_save_IFS
18720
18721  ;;
18722esac
18723fi
18724COMM=$ac_cv_path_COMM
18725if test -n "$COMM"; then
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18727$as_echo "$COMM" >&6; }
18728else
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730$as_echo "no" >&6; }
18731fi
18732
18733
18734  test -n "$COMM" && break
18735done
18736
18737  else
18738    # The variable is set, but is it from the command line or the environment?
18739
18740    # Try to remove the string !COMM! from our list.
18741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18743      # If it failed, the variable was not from the command line. Ignore it,
18744      # but warn the user (except for BASH, which is always set by the calling BASH).
18745      if test "xCOMM" != xBASH; then
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18747$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18748      fi
18749      # Try to locate tool using the code snippet
18750      for ac_prog in comm
18751do
18752  # Extract the first word of "$ac_prog", so it can be a program name with args.
18753set dummy $ac_prog; ac_word=$2
18754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18755$as_echo_n "checking for $ac_word... " >&6; }
18756if ${ac_cv_path_COMM+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  case $COMM in
18760  [\\/]* | ?:[\\/]*)
18761  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18762  ;;
18763  *)
18764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18765for as_dir in $PATH
18766do
18767  IFS=$as_save_IFS
18768  test -z "$as_dir" && as_dir=.
18769    for ac_exec_ext in '' $ac_executable_extensions; do
18770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18771    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18773    break 2
18774  fi
18775done
18776  done
18777IFS=$as_save_IFS
18778
18779  ;;
18780esac
18781fi
18782COMM=$ac_cv_path_COMM
18783if test -n "$COMM"; then
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18785$as_echo "$COMM" >&6; }
18786else
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788$as_echo "no" >&6; }
18789fi
18790
18791
18792  test -n "$COMM" && break
18793done
18794
18795    else
18796      # If it succeeded, then it was overridden by the user. We will use it
18797      # for the tool.
18798
18799      # First remove it from the list of overridden variables, so we can test
18800      # for unknown variables in the end.
18801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18802
18803      # Check if the provided tool contains a complete path.
18804      tool_specified="$COMM"
18805      tool_basename="${tool_specified##*/}"
18806      if test "x$tool_basename" = "x$tool_specified"; then
18807        # A command without a complete path is provided, search $PATH.
18808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18809$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18810        # Extract the first word of "$tool_basename", so it can be a program name with args.
18811set dummy $tool_basename; ac_word=$2
18812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18813$as_echo_n "checking for $ac_word... " >&6; }
18814if ${ac_cv_path_COMM+:} false; then :
18815  $as_echo_n "(cached) " >&6
18816else
18817  case $COMM in
18818  [\\/]* | ?:[\\/]*)
18819  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18820  ;;
18821  *)
18822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18823for as_dir in $PATH
18824do
18825  IFS=$as_save_IFS
18826  test -z "$as_dir" && as_dir=.
18827    for ac_exec_ext in '' $ac_executable_extensions; do
18828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18829    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18831    break 2
18832  fi
18833done
18834  done
18835IFS=$as_save_IFS
18836
18837  ;;
18838esac
18839fi
18840COMM=$ac_cv_path_COMM
18841if test -n "$COMM"; then
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18843$as_echo "$COMM" >&6; }
18844else
18845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18846$as_echo "no" >&6; }
18847fi
18848
18849
18850        if test "x$COMM" = x; then
18851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18852        fi
18853      else
18854        # Otherwise we believe it is a complete path. Use it as it is.
18855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18856$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18858$as_echo_n "checking for COMM... " >&6; }
18859        if test ! -x "$tool_specified"; then
18860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18861$as_echo "not found" >&6; }
18862          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18863        fi
18864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18865$as_echo "$tool_specified" >&6; }
18866      fi
18867    fi
18868  fi
18869
18870
18871
18872  if test "x$COMM" = x; then
18873    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18874  fi
18875
18876
18877  fi
18878
18879  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18880
18881
18882
18883  # Publish this variable in the help.
18884
18885
18886  if test "x$DSYMUTIL" = x; then
18887    # The variable is not set by user, try to locate tool using the code snippet
18888    for ac_prog in dsymutil
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_DSYMUTIL+:} false; then :
18895  $as_echo_n "(cached) " >&6
18896else
18897  case $DSYMUTIL in
18898  [\\/]* | ?:[\\/]*)
18899  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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
18920DSYMUTIL=$ac_cv_path_DSYMUTIL
18921if test -n "$DSYMUTIL"; then
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18923$as_echo "$DSYMUTIL" >&6; }
18924else
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926$as_echo "no" >&6; }
18927fi
18928
18929
18930  test -n "$DSYMUTIL" && 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 !DSYMUTIL! from our list.
18937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
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 "xDSYMUTIL" != xBASH; then
18942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18943$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL 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 dsymutil
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_DSYMUTIL+:} false; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  case $DSYMUTIL in
18956  [\\/]* | ?:[\\/]*)
18957  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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
18978DSYMUTIL=$ac_cv_path_DSYMUTIL
18979if test -n "$DSYMUTIL"; then
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18981$as_echo "$DSYMUTIL" >&6; }
18982else
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984$as_echo "no" >&6; }
18985fi
18986
18987
18988  test -n "$DSYMUTIL" && 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="$DSYMUTIL"
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 DSYMUTIL=$tool_basename" >&5
19005$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$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_DSYMUTIL+:} false; then :
19011  $as_echo_n "(cached) " >&6
19012else
19013  case $DSYMUTIL in
19014  [\\/]* | ?:[\\/]*)
19015  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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
19036DSYMUTIL=$ac_cv_path_DSYMUTIL
19037if test -n "$DSYMUTIL"; then
19038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19039$as_echo "$DSYMUTIL" >&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$DSYMUTIL" = 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 DSYMUTIL=$tool_specified" >&5
19052$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19054$as_echo_n "checking for DSYMUTIL... " >&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 DSYMUTIL=$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
19068  if test "x$DSYMUTIL" = x; then
19069    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19070  fi
19071
19072
19073
19074
19075
19076  # Publish this variable in the help.
19077
19078
19079  if test "x$XATTR" = x; then
19080    # The variable is not set by user, try to locate tool using the code snippet
19081    for ac_prog in xattr
19082do
19083  # Extract the first word of "$ac_prog", so it can be a program name with args.
19084set dummy $ac_prog; ac_word=$2
19085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19086$as_echo_n "checking for $ac_word... " >&6; }
19087if ${ac_cv_path_XATTR+:} false; then :
19088  $as_echo_n "(cached) " >&6
19089else
19090  case $XATTR in
19091  [\\/]* | ?:[\\/]*)
19092  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19093  ;;
19094  *)
19095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19096for as_dir in $PATH
19097do
19098  IFS=$as_save_IFS
19099  test -z "$as_dir" && as_dir=.
19100    for ac_exec_ext in '' $ac_executable_extensions; do
19101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19102    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19104    break 2
19105  fi
19106done
19107  done
19108IFS=$as_save_IFS
19109
19110  ;;
19111esac
19112fi
19113XATTR=$ac_cv_path_XATTR
19114if test -n "$XATTR"; then
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19116$as_echo "$XATTR" >&6; }
19117else
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19119$as_echo "no" >&6; }
19120fi
19121
19122
19123  test -n "$XATTR" && break
19124done
19125
19126  else
19127    # The variable is set, but is it from the command line or the environment?
19128
19129    # Try to remove the string !XATTR! from our list.
19130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19132      # If it failed, the variable was not from the command line. Ignore it,
19133      # but warn the user (except for BASH, which is always set by the calling BASH).
19134      if test "xXATTR" != xBASH; then
19135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19136$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19137      fi
19138      # Try to locate tool using the code snippet
19139      for ac_prog in xattr
19140do
19141  # Extract the first word of "$ac_prog", so it can be a program name with args.
19142set dummy $ac_prog; ac_word=$2
19143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19144$as_echo_n "checking for $ac_word... " >&6; }
19145if ${ac_cv_path_XATTR+:} false; then :
19146  $as_echo_n "(cached) " >&6
19147else
19148  case $XATTR in
19149  [\\/]* | ?:[\\/]*)
19150  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19151  ;;
19152  *)
19153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19154for as_dir in $PATH
19155do
19156  IFS=$as_save_IFS
19157  test -z "$as_dir" && as_dir=.
19158    for ac_exec_ext in '' $ac_executable_extensions; do
19159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19160    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19162    break 2
19163  fi
19164done
19165  done
19166IFS=$as_save_IFS
19167
19168  ;;
19169esac
19170fi
19171XATTR=$ac_cv_path_XATTR
19172if test -n "$XATTR"; then
19173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19174$as_echo "$XATTR" >&6; }
19175else
19176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19177$as_echo "no" >&6; }
19178fi
19179
19180
19181  test -n "$XATTR" && break
19182done
19183
19184    else
19185      # If it succeeded, then it was overridden by the user. We will use it
19186      # for the tool.
19187
19188      # First remove it from the list of overridden variables, so we can test
19189      # for unknown variables in the end.
19190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19191
19192      # Check if the provided tool contains a complete path.
19193      tool_specified="$XATTR"
19194      tool_basename="${tool_specified##*/}"
19195      if test "x$tool_basename" = "x$tool_specified"; then
19196        # A command without a complete path is provided, search $PATH.
19197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19198$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19199        # Extract the first word of "$tool_basename", so it can be a program name with args.
19200set dummy $tool_basename; ac_word=$2
19201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19202$as_echo_n "checking for $ac_word... " >&6; }
19203if ${ac_cv_path_XATTR+:} false; then :
19204  $as_echo_n "(cached) " >&6
19205else
19206  case $XATTR in
19207  [\\/]* | ?:[\\/]*)
19208  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19209  ;;
19210  *)
19211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19212for as_dir in $PATH
19213do
19214  IFS=$as_save_IFS
19215  test -z "$as_dir" && as_dir=.
19216    for ac_exec_ext in '' $ac_executable_extensions; do
19217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19218    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19220    break 2
19221  fi
19222done
19223  done
19224IFS=$as_save_IFS
19225
19226  ;;
19227esac
19228fi
19229XATTR=$ac_cv_path_XATTR
19230if test -n "$XATTR"; then
19231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19232$as_echo "$XATTR" >&6; }
19233else
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19235$as_echo "no" >&6; }
19236fi
19237
19238
19239        if test "x$XATTR" = x; then
19240          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19241        fi
19242      else
19243        # Otherwise we believe it is a complete path. Use it as it is.
19244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19245$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19247$as_echo_n "checking for XATTR... " >&6; }
19248        if test ! -x "$tool_specified"; then
19249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19250$as_echo "not found" >&6; }
19251          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19252        fi
19253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19254$as_echo "$tool_specified" >&6; }
19255      fi
19256    fi
19257  fi
19258
19259
19260
19261  if test "x$XATTR" = x; then
19262    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19263  fi
19264
19265
19266
19267
19268  # Publish this variable in the help.
19269
19270
19271  if test "x$CODESIGN" = x; then
19272    # The variable is not set by user, try to locate tool using the code snippet
19273    for ac_prog in codesign
19274do
19275  # Extract the first word of "$ac_prog", so it can be a program name with args.
19276set dummy $ac_prog; ac_word=$2
19277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19278$as_echo_n "checking for $ac_word... " >&6; }
19279if ${ac_cv_path_CODESIGN+:} false; then :
19280  $as_echo_n "(cached) " >&6
19281else
19282  case $CODESIGN in
19283  [\\/]* | ?:[\\/]*)
19284  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19285  ;;
19286  *)
19287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19288for as_dir in $PATH
19289do
19290  IFS=$as_save_IFS
19291  test -z "$as_dir" && as_dir=.
19292    for ac_exec_ext in '' $ac_executable_extensions; do
19293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19294    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19296    break 2
19297  fi
19298done
19299  done
19300IFS=$as_save_IFS
19301
19302  ;;
19303esac
19304fi
19305CODESIGN=$ac_cv_path_CODESIGN
19306if test -n "$CODESIGN"; then
19307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19308$as_echo "$CODESIGN" >&6; }
19309else
19310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19311$as_echo "no" >&6; }
19312fi
19313
19314
19315  test -n "$CODESIGN" && break
19316done
19317
19318  else
19319    # The variable is set, but is it from the command line or the environment?
19320
19321    # Try to remove the string !CODESIGN! from our list.
19322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19324      # If it failed, the variable was not from the command line. Ignore it,
19325      # but warn the user (except for BASH, which is always set by the calling BASH).
19326      if test "xCODESIGN" != xBASH; then
19327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19328$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19329      fi
19330      # Try to locate tool using the code snippet
19331      for ac_prog in codesign
19332do
19333  # Extract the first word of "$ac_prog", so it can be a program name with args.
19334set dummy $ac_prog; ac_word=$2
19335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19336$as_echo_n "checking for $ac_word... " >&6; }
19337if ${ac_cv_path_CODESIGN+:} false; then :
19338  $as_echo_n "(cached) " >&6
19339else
19340  case $CODESIGN in
19341  [\\/]* | ?:[\\/]*)
19342  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19343  ;;
19344  *)
19345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19346for as_dir in $PATH
19347do
19348  IFS=$as_save_IFS
19349  test -z "$as_dir" && as_dir=.
19350    for ac_exec_ext in '' $ac_executable_extensions; do
19351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19352    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19354    break 2
19355  fi
19356done
19357  done
19358IFS=$as_save_IFS
19359
19360  ;;
19361esac
19362fi
19363CODESIGN=$ac_cv_path_CODESIGN
19364if test -n "$CODESIGN"; then
19365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19366$as_echo "$CODESIGN" >&6; }
19367else
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369$as_echo "no" >&6; }
19370fi
19371
19372
19373  test -n "$CODESIGN" && break
19374done
19375
19376    else
19377      # If it succeeded, then it was overridden by the user. We will use it
19378      # for the tool.
19379
19380      # First remove it from the list of overridden variables, so we can test
19381      # for unknown variables in the end.
19382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19383
19384      # Check if the provided tool contains a complete path.
19385      tool_specified="$CODESIGN"
19386      tool_basename="${tool_specified##*/}"
19387      if test "x$tool_basename" = "x$tool_specified"; then
19388        # A command without a complete path is provided, search $PATH.
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19390$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19391        # Extract the first word of "$tool_basename", so it can be a program name with args.
19392set dummy $tool_basename; ac_word=$2
19393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19394$as_echo_n "checking for $ac_word... " >&6; }
19395if ${ac_cv_path_CODESIGN+:} false; then :
19396  $as_echo_n "(cached) " >&6
19397else
19398  case $CODESIGN in
19399  [\\/]* | ?:[\\/]*)
19400  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19401  ;;
19402  *)
19403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19404for as_dir in $PATH
19405do
19406  IFS=$as_save_IFS
19407  test -z "$as_dir" && as_dir=.
19408    for ac_exec_ext in '' $ac_executable_extensions; do
19409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19410    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19412    break 2
19413  fi
19414done
19415  done
19416IFS=$as_save_IFS
19417
19418  ;;
19419esac
19420fi
19421CODESIGN=$ac_cv_path_CODESIGN
19422if test -n "$CODESIGN"; then
19423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19424$as_echo "$CODESIGN" >&6; }
19425else
19426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19427$as_echo "no" >&6; }
19428fi
19429
19430
19431        if test "x$CODESIGN" = x; then
19432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19433        fi
19434      else
19435        # Otherwise we believe it is a complete path. Use it as it is.
19436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19437$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19439$as_echo_n "checking for CODESIGN... " >&6; }
19440        if test ! -x "$tool_specified"; then
19441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19442$as_echo "not found" >&6; }
19443          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19444        fi
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19446$as_echo "$tool_specified" >&6; }
19447      fi
19448    fi
19449  fi
19450
19451
19452    if test "x$CODESIGN" != "x"; then
19453      # Verify that the openjdk_codesign certificate is present
19454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19455$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19456      rm -f codesign-testfile
19457      touch codesign-testfile
19458      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19459      rm -f codesign-testfile
19460      if test "x$CODESIGN" = x; then
19461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19462$as_echo "no" >&6; }
19463      else
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19465$as_echo "yes" >&6; }
19466      fi
19467    fi
19468  fi
19469
19470
19471# Check if pkg-config is available.
19472
19473
19474if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19475	if test -n "$ac_tool_prefix"; then
19476  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19477set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19479$as_echo_n "checking for $ac_word... " >&6; }
19480if ${ac_cv_path_PKG_CONFIG+:} false; then :
19481  $as_echo_n "(cached) " >&6
19482else
19483  case $PKG_CONFIG in
19484  [\\/]* | ?:[\\/]*)
19485  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19486  ;;
19487  *)
19488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19489for as_dir in $PATH
19490do
19491  IFS=$as_save_IFS
19492  test -z "$as_dir" && as_dir=.
19493    for ac_exec_ext in '' $ac_executable_extensions; do
19494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19495    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19497    break 2
19498  fi
19499done
19500  done
19501IFS=$as_save_IFS
19502
19503  ;;
19504esac
19505fi
19506PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19507if test -n "$PKG_CONFIG"; then
19508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19509$as_echo "$PKG_CONFIG" >&6; }
19510else
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19512$as_echo "no" >&6; }
19513fi
19514
19515
19516fi
19517if test -z "$ac_cv_path_PKG_CONFIG"; then
19518  ac_pt_PKG_CONFIG=$PKG_CONFIG
19519  # Extract the first word of "pkg-config", so it can be a program name with args.
19520set dummy pkg-config; ac_word=$2
19521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19522$as_echo_n "checking for $ac_word... " >&6; }
19523if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19524  $as_echo_n "(cached) " >&6
19525else
19526  case $ac_pt_PKG_CONFIG in
19527  [\\/]* | ?:[\\/]*)
19528  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19529  ;;
19530  *)
19531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19532for as_dir in $PATH
19533do
19534  IFS=$as_save_IFS
19535  test -z "$as_dir" && as_dir=.
19536    for ac_exec_ext in '' $ac_executable_extensions; do
19537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19538    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19540    break 2
19541  fi
19542done
19543  done
19544IFS=$as_save_IFS
19545
19546  ;;
19547esac
19548fi
19549ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19550if test -n "$ac_pt_PKG_CONFIG"; then
19551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19552$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19553else
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19555$as_echo "no" >&6; }
19556fi
19557
19558  if test "x$ac_pt_PKG_CONFIG" = x; then
19559    PKG_CONFIG=""
19560  else
19561    case $cross_compiling:$ac_tool_warned in
19562yes:)
19563{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19564$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19565ac_tool_warned=yes ;;
19566esac
19567    PKG_CONFIG=$ac_pt_PKG_CONFIG
19568  fi
19569else
19570  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19571fi
19572
19573fi
19574if test -n "$PKG_CONFIG"; then
19575	_pkg_min_version=0.9.0
19576	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19577$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19578	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19579		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19580$as_echo "yes" >&6; }
19581	else
19582		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19583$as_echo "no" >&6; }
19584		PKG_CONFIG=""
19585	fi
19586
19587fi
19588
19589# After basic tools have been setup, we can check build os specific details.
19590
19591  ###############################################################################
19592
19593  # Note that this is the build platform OS version!
19594
19595  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19596  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19597  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19598  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19599
19600
19601
19602
19603
19604# Setup builddeps, for automatic downloading of tools we need.
19605# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19606# boot-jdk setup, but we need to have basic tools setup first.
19607
19608
19609# Check whether --with-builddeps-conf was given.
19610if test "${with_builddeps_conf+set}" = set; then :
19611  withval=$with_builddeps_conf;
19612fi
19613
19614
19615
19616# Check whether --with-builddeps-server was given.
19617if test "${with_builddeps_server+set}" = set; then :
19618  withval=$with_builddeps_server;
19619fi
19620
19621
19622
19623# Check whether --with-builddeps-dir was given.
19624if test "${with_builddeps_dir+set}" = set; then :
19625  withval=$with_builddeps_dir;
19626else
19627  with_builddeps_dir=/localhome/builddeps
19628fi
19629
19630
19631
19632# Check whether --with-builddeps-group was given.
19633if test "${with_builddeps_group+set}" = set; then :
19634  withval=$with_builddeps_group;
19635fi
19636
19637
19638
19639
19640  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19641    if test "x$with_builddeps_conf" != x; then
19642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19643$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19644      builddepsfile=$with_builddeps_conf
19645      if test -s $builddepsfile; then
19646        . $builddepsfile
19647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19648$as_echo "loaded!" >&6; }
19649      else
19650        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19651      fi
19652    else
19653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19654$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19655      builddepsfile=`mktemp`
19656      touch $builddepsfile
19657      # Put all found confs into a single file.
19658      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19659      # Source the file to acquire the variables
19660      if test -s $builddepsfile; then
19661        . $builddepsfile
19662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19663$as_echo "found at least one!" >&6; }
19664      else
19665        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19666      fi
19667    fi
19668    # Create build and target names that use _ instead of "-" and ".".
19669    # This is necessary to use them in variable names.
19670    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19671    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19672    # Extract rewrite information for build and target
19673    eval rewritten_build=\${REWRITE_${build_var}}
19674    if test "x$rewritten_build" = x; then
19675      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19676      echo Build stays the same $rewritten_build
19677    else
19678      echo Rewriting build for builddeps into $rewritten_build
19679    fi
19680    eval rewritten_target=\${REWRITE_${target_var}}
19681    if test "x$rewritten_target" = x; then
19682      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19683      echo Target stays the same $rewritten_target
19684    else
19685      echo Rewriting target for builddeps into $rewritten_target
19686    fi
19687    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19688    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19689  fi
19690  for ac_prog in 7z unzip
19691do
19692  # Extract the first word of "$ac_prog", so it can be a program name with args.
19693set dummy $ac_prog; ac_word=$2
19694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19695$as_echo_n "checking for $ac_word... " >&6; }
19696if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19697  $as_echo_n "(cached) " >&6
19698else
19699  if test -n "$BDEPS_UNZIP"; then
19700  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19701else
19702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19709    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717fi
19718fi
19719BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19720if test -n "$BDEPS_UNZIP"; then
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19722$as_echo "$BDEPS_UNZIP" >&6; }
19723else
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725$as_echo "no" >&6; }
19726fi
19727
19728
19729  test -n "$BDEPS_UNZIP" && break
19730done
19731
19732  if test "x$BDEPS_UNZIP" = x7z; then
19733    BDEPS_UNZIP="7z x"
19734  fi
19735
19736  for ac_prog in wget lftp ftp
19737do
19738  # Extract the first word of "$ac_prog", so it can be a program name with args.
19739set dummy $ac_prog; ac_word=$2
19740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19741$as_echo_n "checking for $ac_word... " >&6; }
19742if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19743  $as_echo_n "(cached) " >&6
19744else
19745  if test -n "$BDEPS_FTP"; then
19746  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19747else
19748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19749for as_dir in $PATH
19750do
19751  IFS=$as_save_IFS
19752  test -z "$as_dir" && as_dir=.
19753    for ac_exec_ext in '' $ac_executable_extensions; do
19754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19755    ac_cv_prog_BDEPS_FTP="$ac_prog"
19756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19757    break 2
19758  fi
19759done
19760  done
19761IFS=$as_save_IFS
19762
19763fi
19764fi
19765BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19766if test -n "$BDEPS_FTP"; then
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19768$as_echo "$BDEPS_FTP" >&6; }
19769else
19770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19771$as_echo "no" >&6; }
19772fi
19773
19774
19775  test -n "$BDEPS_FTP" && break
19776done
19777
19778
19779
19780###############################################################################
19781#
19782# Determine OpenJDK variants, options and version numbers.
19783#
19784###############################################################################
19785
19786# We need build & target for this.
19787
19788
19789  ###############################################################################
19790  #
19791  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19792  # We always build headless support.
19793  #
19794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19795$as_echo_n "checking headful support... " >&6; }
19796  # Check whether --enable-headful was given.
19797if test "${enable_headful+set}" = set; then :
19798  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19799else
19800  SUPPORT_HEADFUL=yes
19801fi
19802
19803
19804  SUPPORT_HEADLESS=yes
19805  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19806
19807  if test "x$SUPPORT_HEADFUL" = xyes; then
19808    # We are building both headful and headless.
19809    headful_msg="include support for both headful and headless"
19810  fi
19811
19812  if test "x$SUPPORT_HEADFUL" = xno; then
19813    # Thus we are building headless only.
19814    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19815    headful_msg="headless only"
19816  fi
19817
19818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19819$as_echo "$headful_msg" >&6; }
19820
19821
19822
19823
19824
19825  # Control wether Hotspot runs Queens test after build.
19826  # Check whether --enable-hotspot-test-in-build was given.
19827if test "${enable_hotspot_test_in_build+set}" = set; then :
19828  enableval=$enable_hotspot_test_in_build;
19829else
19830  enable_hotspot_test_in_build=no
19831fi
19832
19833  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19834    TEST_IN_BUILD=true
19835  else
19836    TEST_IN_BUILD=false
19837  fi
19838
19839
19840  ###############################################################################
19841  #
19842  # Choose cacerts source file
19843  #
19844
19845# Check whether --with-cacerts-file was given.
19846if test "${with_cacerts_file+set}" = set; then :
19847  withval=$with_cacerts_file;
19848fi
19849
19850  if test "x$with_cacerts_file" != x; then
19851    CACERTS_FILE=$with_cacerts_file
19852  fi
19853
19854
19855  ###############################################################################
19856  #
19857  # Enable or disable unlimited crypto
19858  #
19859  # Check whether --enable-unlimited-crypto was given.
19860if test "${enable_unlimited_crypto+set}" = set; then :
19861  enableval=$enable_unlimited_crypto;
19862else
19863  enable_unlimited_crypto=no
19864fi
19865
19866  if test "x$enable_unlimited_crypto" = "xyes"; then
19867    UNLIMITED_CRYPTO=true
19868  else
19869    UNLIMITED_CRYPTO=false
19870  fi
19871
19872
19873  ###############################################################################
19874  #
19875  # Enable or disable static linking of libjli on bsd only
19876  #
19877  # Check whether --enable-static-libjli was given.
19878if test "${enable_static_libjli+set}" = set; then :
19879  enableval=$enable_static_libjli;
19880else
19881  enable_static_libjli=no
19882fi
19883
19884  if test "x$OPENJDK_TARGET_OS" = "xbsd" && test "x$enable_static_libjli" = "xyes"; then
19885    BSD_STATIC_LIBJLI=bsd
19886  else
19887    BSD_STATIC_LIBJLI=
19888  fi
19889
19890
19891  ###############################################################################
19892  #
19893  # Enable or disable the elliptic curve crypto implementation
19894  #
19895
19896
19897  ###############################################################################
19898  #
19899  # Compress jars
19900  #
19901  COMPRESS_JARS=false
19902
19903
19904
19905  ###############################################################################
19906  #
19907  # Enable or disable JFR
19908  #
19909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build JFR" >&5
19910$as_echo_n "checking whether to build JFR... " >&6; }
19911  # Check whether --enable-jfr was given.
19912if test "${enable_jfr+set}" = set; then :
19913  enableval=$enable_jfr;
19914else
19915  enable_jfr=auto
19916fi
19917
19918  if test "x$enable_jfr" = "xno"; then
19919    ENABLE_JFR=false
19920  elif test "x$enable_jfr" = "xyes" -o "x$enable_jfr" = "xauto"; then
19921    if test "x$JVM_VARIANT_MINIMAL1" = "xtrue" -o "x$JVM_VARIANT_ZERO" = "xtrue"; then
19922      if test "x$enable_jfr" = "xyes"; then
19923        as_fn_error $? "cannot enable JFR on minimal1 VM or zero build" "$LINENO" 5
19924      else
19925        ENABLE_JFR=false
19926      fi
19927    elif test "x$OPENJDK_TARGET_OS" = xaix; then
19928      if test "x$enable_jfr" = "xyes"; then
19929        as_fn_error $? "AIX does not support JFR" "$LINENO" 5
19930      else
19931        ENABLE_JFR=false
19932      fi
19933    else
19934      ENABLE_JFR=true
19935    fi
19936  else
19937    as_fn_error $? "--enable-jfr must be set to either yes or no" "$LINENO" 5
19938  fi
19939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JFR" >&5
19940$as_echo "$ENABLE_JFR" >&6; }
19941
19942
19943
19944  # Source the version numbers
19945  . $AUTOCONF_DIR/version-numbers
19946
19947  # Get the settings from parameters
19948
19949# Check whether --with-milestone was given.
19950if test "${with_milestone+set}" = set; then :
19951  withval=$with_milestone;
19952fi
19953
19954  if test "x$with_milestone" = xyes; then
19955    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19956  elif test "x$with_milestone" != x; then
19957    MILESTONE="$with_milestone"
19958  fi
19959  if test "x$MILESTONE" = x; then
19960    MILESTONE=internal
19961  fi
19962
19963
19964# Check whether --with-update-version was given.
19965if test "${with_update_version+set}" = set; then :
19966  withval=$with_update_version;
19967fi
19968
19969  if test "x$with_update_version" = xyes; then
19970    as_fn_error $? "Update version must have a value" "$LINENO" 5
19971  elif test "x$with_update_version" != x; then
19972    JDK_UPDATE_VERSION="$with_update_version"
19973    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19974    # to a bug in expr (which reduces it to just X). To work around this, we
19975    # always add a 0 to one digit update versions.
19976    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19977      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19978    fi
19979  fi
19980
19981
19982# Check whether --with-user-release-suffix was given.
19983if test "${with_user_release_suffix+set}" = set; then :
19984  withval=$with_user_release_suffix;
19985fi
19986
19987  if test "x$with_user_release_suffix" = xyes; then
19988    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19989  elif test "x$with_user_release_suffix" != x; then
19990    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19991  fi
19992
19993
19994# Check whether --with-build-number was given.
19995if test "${with_build_number+set}" = set; then :
19996  withval=$with_build_number;
19997fi
19998
19999  if test "x$with_build_number" = xyes; then
20000    as_fn_error $? "Build number must have a value" "$LINENO" 5
20001  elif test "x$with_build_number" != x; then
20002    JDK_BUILD_NUMBER="$with_build_number"
20003  fi
20004  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20005  if test "x$JDK_BUILD_NUMBER" = x; then
20006    JDK_BUILD_NUMBER=b00
20007    if test "x$USER_RELEASE_SUFFIX" = x; then
20008      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20009      # Avoid [:alnum:] since it depends on the locale.
20010      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20011      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20012    fi
20013  fi
20014
20015  # Now set the JDK version, milestone, build number etc.
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030  # The vendor name, if any
20031
20032# Check whether --with-vendor-name was given.
20033if test "${with_vendor_name+set}" = set; then :
20034  withval=$with_vendor_name;
20035fi
20036
20037  if test "x$with_vendor_name" = xyes; then
20038    as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
20039  elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
20040    as_fn_error $? "--with-vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
20041  elif test "x$with_vendor_name" != x; then
20042    # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
20043    # Otherwise we will use the value from "version-numbers" included above.
20044    COMPANY_NAME="$with_vendor_name"
20045  fi
20046
20047
20048  # The vendor URL, if any
20049
20050# Check whether --with-vendor-url was given.
20051if test "${with_vendor_url+set}" = set; then :
20052  withval=$with_vendor_url;
20053fi
20054
20055  if test "x$with_vendor_url" = xyes; then
20056    as_fn_error $? "--with-vendor-url must have a value" "$LINENO" 5
20057  elif  ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ; then
20058    as_fn_error $? "--with-vendor-url contains non-printing characters: $with_vendor_url" "$LINENO" 5
20059  else
20060    VENDOR_URL="$with_vendor_url"
20061  fi
20062
20063
20064  # The vendor bug URL, if any
20065
20066# Check whether --with-vendor-bug-url was given.
20067if test "${with_vendor_bug_url+set}" = set; then :
20068  withval=$with_vendor_bug_url;
20069fi
20070
20071  if test "x$with_vendor_bug_url" = xyes; then
20072    as_fn_error $? "--with-vendor-bug-url must have a value" "$LINENO" 5
20073  elif  ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ; then
20074    as_fn_error $? "--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url" "$LINENO" 5
20075  else
20076    VENDOR_URL_BUG="$with_vendor_bug_url"
20077  fi
20078
20079
20080  # The vendor VM bug URL, if any
20081
20082# Check whether --with-vendor-vm-bug-url was given.
20083if test "${with_vendor_vm_bug_url+set}" = set; then :
20084  withval=$with_vendor_vm_bug_url;
20085fi
20086
20087  if test "x$with_vendor_vm_bug_url" = xyes; then
20088    as_fn_error $? "--with-vendor-vm-bug-url must have a value" "$LINENO" 5
20089  elif  ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ; then
20090    as_fn_error $? "--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url" "$LINENO" 5
20091  else
20092    VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
20093  fi
20094
20095
20096
20097# Check whether --with-copyright-year was given.
20098if test "${with_copyright_year+set}" = set; then :
20099  withval=$with_copyright_year;
20100fi
20101
20102  if test "x$with_copyright_year" = xyes; then
20103    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20104  elif test "x$with_copyright_year" != x; then
20105    COPYRIGHT_YEAR="$with_copyright_year"
20106  else
20107    COPYRIGHT_YEAR=`date +'%Y'`
20108  fi
20109
20110
20111  if test "x$JDK_UPDATE_VERSION" != x; then
20112    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20113  else
20114    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20115  fi
20116
20117
20118  # The cooked update version used to encode trailing letters in the update
20119  # version into a trailing number. That is no longer needed, but need to
20120  # keep the format in 8u for compatibility.
20121  COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
20122
20123
20124  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20125
20126
20127
20128###############################################################################
20129#
20130# Setup BootJDK, used to bootstrap the build.
20131#
20132###############################################################################
20133
20134
20135  BOOT_JDK_FOUND=no
20136
20137# Check whether --with-boot-jdk was given.
20138if test "${with_boot_jdk+set}" = set; then :
20139  withval=$with_boot_jdk;
20140fi
20141
20142
20143  # We look for the Boot JDK through various means, going from more certain to
20144  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20145  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20146  # must check if this is indeed valid; otherwise we'll continue looking.
20147
20148  # Test: Is bootjdk explicitely set by command line arguments?
20149
20150  if test "x$BOOT_JDK_FOUND" = xno; then
20151    # Now execute the test
20152
20153  if test "x$with_boot_jdk" != x; then
20154    BOOT_JDK=$with_boot_jdk
20155    BOOT_JDK_FOUND=maybe
20156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20157$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20158  fi
20159
20160
20161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20163      # Do we have a bin/java?
20164      if test ! -x "$BOOT_JDK/bin/java"; then
20165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20167        BOOT_JDK_FOUND=no
20168      else
20169        # Do we have a bin/javac?
20170        if test ! -x "$BOOT_JDK/bin/javac"; then
20171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20175          BOOT_JDK_FOUND=no
20176        else
20177          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20178          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20181            BOOT_JDK_FOUND=no
20182          else
20183            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20185
20186            # Extra M4 quote needed to protect [] in grep expression.
20187            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20188            if test "x$FOUND_VERSION_78" = x; then
20189              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20191              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20192$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20193              BOOT_JDK_FOUND=no
20194            else
20195              # We're done! :-)
20196              BOOT_JDK_FOUND=yes
20197
20198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20199
20200  # Input might be given as Windows format, start by converting to
20201  # unix format.
20202  path="$BOOT_JDK"
20203  new_path=`$CYGPATH -u "$path"`
20204
20205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20208  # "foo.exe" is OK but "foo" is an error.
20209  #
20210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20211  # It is also a way to make sure we got the proper file name for the real test later on.
20212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20213  if test "x$test_shortpath" = x; then
20214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20217  fi
20218
20219  # Call helper function which possibly converts this using DOS-style short mode.
20220  # If so, the updated path is stored in $new_path.
20221
20222  input_path="$new_path"
20223  # Check if we need to convert this using DOS-style short mode. If the path
20224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20225  # take no chances and rewrite it.
20226  # Note: m4 eats our [], so we need to use [ and ] instead.
20227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20228  if test "x$has_forbidden_chars" != x; then
20229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20233      # Going to short mode and back again did indeed matter. Since short mode is
20234      # case insensitive, let's make it lowercase to improve readability.
20235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20236      # Now convert it back to Unix-style (cygpath)
20237      input_path=`$CYGPATH -u "$shortmode_path"`
20238      new_path="$input_path"
20239    fi
20240  fi
20241
20242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20243  if test "x$test_cygdrive_prefix" = x; then
20244    # As a simple fix, exclude /usr/bin since it's not a real path.
20245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20247      # a path prefixed by /cygdrive for fixpath to work.
20248      new_path="$CYGWIN_ROOT_PATH$input_path"
20249    fi
20250  fi
20251
20252
20253  if test "x$path" != "x$new_path"; then
20254    BOOT_JDK="$new_path"
20255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20257  fi
20258
20259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20260
20261  path="$BOOT_JDK"
20262  has_colon=`$ECHO $path | $GREP ^.:`
20263  new_path="$path"
20264  if test "x$has_colon" = x; then
20265    # Not in mixed or Windows style, start by that.
20266    new_path=`cmd //c echo $path`
20267  fi
20268
20269
20270  input_path="$new_path"
20271  # Check if we need to convert this using DOS-style short mode. If the path
20272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20273  # take no chances and rewrite it.
20274  # Note: m4 eats our [], so we need to use [ and ] instead.
20275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20276  if test "x$has_forbidden_chars" != x; then
20277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20279  fi
20280
20281
20282  windows_path="$new_path"
20283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20284    unix_path=`$CYGPATH -u "$windows_path"`
20285    new_path="$unix_path"
20286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20288    new_path="$unix_path"
20289  fi
20290
20291  if test "x$path" != "x$new_path"; then
20292    BOOT_JDK="$new_path"
20293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20295  fi
20296
20297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20299
20300  else
20301    # We're on a posix platform. Hooray! :)
20302    path="$BOOT_JDK"
20303    has_space=`$ECHO "$path" | $GREP " "`
20304    if test "x$has_space" != x; then
20305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20307      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20308    fi
20309
20310    # Use eval to expand a potential ~
20311    eval path="$path"
20312    if test ! -f "$path" && test ! -d "$path"; then
20313      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20314    fi
20315
20316    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20317  fi
20318
20319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20320$as_echo_n "checking for Boot JDK... " >&6; }
20321              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20322$as_echo "$BOOT_JDK" >&6; }
20323              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20324$as_echo_n "checking Boot JDK version... " >&6; }
20325              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20326              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20327$as_echo "$BOOT_JDK_VERSION" >&6; }
20328            fi # end check jdk version
20329          fi # end check rt.jar
20330        fi # end check javac
20331      fi # end check java
20332    fi # end check boot jdk found
20333  fi
20334
20335  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20336    # Having specified an argument which is incorrect will produce an instant failure;
20337    # we should not go on looking
20338    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20339  fi
20340
20341  # Test: Is bootjdk available from builddeps?
20342
20343  if test "x$BOOT_JDK_FOUND" = xno; then
20344    # Now execute the test
20345
20346
20347
20348  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20349    # Source the builddeps file again, to make sure it uses the latest variables!
20350    . $builddepsfile
20351    # Look for a target and build machine specific resource!
20352    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20353    if test "x$resource" = x; then
20354      # Ok, lets instead look for a target specific resource
20355      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20356    fi
20357    if test "x$resource" = x; then
20358      # Ok, lets instead look for a build specific resource
20359      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20360    fi
20361    if test "x$resource" = x; then
20362      # Ok, lets instead look for a generic resource
20363      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20364      resource=${builddep_bootjdk}
20365    fi
20366    if test "x$resource" != x; then
20367      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20368$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20369      # If the resource in the builddeps.conf file is an existing directory,
20370      # for example /java/linux/cups
20371      if test -d ${resource}; then
20372        depdir=${resource}
20373      else
20374
20375  # bootjdk is for example mymodule
20376  # $resource is for example libs/general/libmymod_1_2_3.zip
20377  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20378  # $with_builddeps_dir is for example /localhome/builddeps
20379  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20380  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20381  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20382  filename=`basename $resource`
20383  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20384  filebase=${filename%%.*}
20385  extension=${filename#*.}
20386  installdir=$with_builddeps_dir/$filebase
20387  if test ! -f $installdir/$filename.unpacked; then
20388    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20389$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20390    if test ! -d $installdir; then
20391      mkdir -p $installdir
20392    fi
20393    if test ! -d $installdir; then
20394      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20395    fi
20396    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20397    touch $tmpfile
20398    if test ! -f $tmpfile; then
20399      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20400    fi
20401
20402  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20403  # $tmpfile is the local file name for the downloaded file.
20404  VALID_TOOL=no
20405  if test "x$BDEPS_FTP" = xwget; then
20406    VALID_TOOL=yes
20407    wget -O $tmpfile $with_builddeps_server/$resource
20408  fi
20409  if test "x$BDEPS_FTP" = xlftp; then
20410    VALID_TOOL=yes
20411    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20412  fi
20413  if test "x$BDEPS_FTP" = xftp; then
20414    VALID_TOOL=yes
20415    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20416    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20417    FTPUSERPWD=${FTPSERVER%%@*}
20418    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20419      FTPUSER=${userpwd%%:*}
20420      FTPPWD=${userpwd#*@}
20421      FTPSERVER=${FTPSERVER#*@}
20422    else
20423      FTPUSER=ftp
20424      FTPPWD=ftp
20425    fi
20426    # the "pass" command does not work on some
20427    # ftp clients (read ftp.exe) but if it works,
20428    # passive mode is better!
20429    ( \
20430        echo "user $FTPUSER $FTPPWD"        ; \
20431        echo "pass"                         ; \
20432        echo "bin"                          ; \
20433        echo "get $FTPPATH $tmpfile"              ; \
20434    ) | ftp -in $FTPSERVER
20435  fi
20436  if test "x$VALID_TOOL" != xyes; then
20437    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20438  fi
20439
20440    mv $tmpfile $installdir/$filename
20441    if test ! -s $installdir/$filename; then
20442      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20443    fi
20444    case "$extension" in
20445      zip)  echo "Unzipping $installdir/$filename..."
20446        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20447        ;;
20448      tar.gz) echo "Untaring $installdir/$filename..."
20449        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20450        ;;
20451      tgz) echo "Untaring $installdir/$filename..."
20452        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20453        ;;
20454      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20455        ;;
20456    esac
20457  fi
20458  if test -f $installdir/$filename.unpacked; then
20459    depdir=$installdir
20460  fi
20461
20462      fi
20463      # Source the builddeps file again, because in the previous command, the depdir
20464      # was updated to point at the current build dependency install directory.
20465      . $builddepsfile
20466      # Now extract variables from the builddeps.conf files.
20467      theroot=${builddep_bootjdk_ROOT}
20468      thecflags=${builddep_bootjdk_CFLAGS}
20469      thelibs=${builddep_bootjdk_LIBS}
20470      if test "x$depdir" = x; then
20471        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20472      fi
20473      BOOT_JDK=$depdir
20474      if test "x$theroot" != x; then
20475        BOOT_JDK="$theroot"
20476      fi
20477      if test "x$thecflags" != x; then
20478        BOOT_JDK_CFLAGS="$thecflags"
20479      fi
20480      if test "x$thelibs" != x; then
20481        BOOT_JDK_LIBS="$thelibs"
20482      fi
20483      BOOT_JDK_FOUND=maybe
20484      else BOOT_JDK_FOUND=no
20485
20486    fi
20487    else BOOT_JDK_FOUND=no
20488
20489  fi
20490
20491
20492
20493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20495      # Do we have a bin/java?
20496      if test ! -x "$BOOT_JDK/bin/java"; then
20497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20499        BOOT_JDK_FOUND=no
20500      else
20501        # Do we have a bin/javac?
20502        if test ! -x "$BOOT_JDK/bin/javac"; then
20503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20507          BOOT_JDK_FOUND=no
20508        else
20509          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20510          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20513            BOOT_JDK_FOUND=no
20514          else
20515            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20517
20518            # Extra M4 quote needed to protect [] in grep expression.
20519            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20520            if test "x$FOUND_VERSION_78" = x; then
20521              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20523              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20524$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20525              BOOT_JDK_FOUND=no
20526            else
20527              # We're done! :-)
20528              BOOT_JDK_FOUND=yes
20529
20530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20531
20532  # Input might be given as Windows format, start by converting to
20533  # unix format.
20534  path="$BOOT_JDK"
20535  new_path=`$CYGPATH -u "$path"`
20536
20537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20540  # "foo.exe" is OK but "foo" is an error.
20541  #
20542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20543  # It is also a way to make sure we got the proper file name for the real test later on.
20544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20545  if test "x$test_shortpath" = x; then
20546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20549  fi
20550
20551  # Call helper function which possibly converts this using DOS-style short mode.
20552  # If so, the updated path is stored in $new_path.
20553
20554  input_path="$new_path"
20555  # Check if we need to convert this using DOS-style short mode. If the path
20556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20557  # take no chances and rewrite it.
20558  # Note: m4 eats our [], so we need to use [ and ] instead.
20559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20560  if test "x$has_forbidden_chars" != x; then
20561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20565      # Going to short mode and back again did indeed matter. Since short mode is
20566      # case insensitive, let's make it lowercase to improve readability.
20567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20568      # Now convert it back to Unix-style (cygpath)
20569      input_path=`$CYGPATH -u "$shortmode_path"`
20570      new_path="$input_path"
20571    fi
20572  fi
20573
20574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20575  if test "x$test_cygdrive_prefix" = x; then
20576    # As a simple fix, exclude /usr/bin since it's not a real path.
20577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20579      # a path prefixed by /cygdrive for fixpath to work.
20580      new_path="$CYGWIN_ROOT_PATH$input_path"
20581    fi
20582  fi
20583
20584
20585  if test "x$path" != "x$new_path"; then
20586    BOOT_JDK="$new_path"
20587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20589  fi
20590
20591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20592
20593  path="$BOOT_JDK"
20594  has_colon=`$ECHO $path | $GREP ^.:`
20595  new_path="$path"
20596  if test "x$has_colon" = x; then
20597    # Not in mixed or Windows style, start by that.
20598    new_path=`cmd //c echo $path`
20599  fi
20600
20601
20602  input_path="$new_path"
20603  # Check if we need to convert this using DOS-style short mode. If the path
20604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20605  # take no chances and rewrite it.
20606  # Note: m4 eats our [], so we need to use [ and ] instead.
20607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20608  if test "x$has_forbidden_chars" != x; then
20609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20611  fi
20612
20613
20614  windows_path="$new_path"
20615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20616    unix_path=`$CYGPATH -u "$windows_path"`
20617    new_path="$unix_path"
20618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20620    new_path="$unix_path"
20621  fi
20622
20623  if test "x$path" != "x$new_path"; then
20624    BOOT_JDK="$new_path"
20625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20627  fi
20628
20629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20631
20632  else
20633    # We're on a posix platform. Hooray! :)
20634    path="$BOOT_JDK"
20635    has_space=`$ECHO "$path" | $GREP " "`
20636    if test "x$has_space" != x; then
20637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20639      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20640    fi
20641
20642    # Use eval to expand a potential ~
20643    eval path="$path"
20644    if test ! -f "$path" && test ! -d "$path"; then
20645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20646    fi
20647
20648    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20649  fi
20650
20651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20652$as_echo_n "checking for Boot JDK... " >&6; }
20653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20654$as_echo "$BOOT_JDK" >&6; }
20655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20656$as_echo_n "checking Boot JDK version... " >&6; }
20657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20659$as_echo "$BOOT_JDK_VERSION" >&6; }
20660            fi # end check jdk version
20661          fi # end check rt.jar
20662        fi # end check javac
20663      fi # end check java
20664    fi # end check boot jdk found
20665  fi
20666
20667
20668  # Test: Is $JAVA_HOME set?
20669
20670  if test "x$BOOT_JDK_FOUND" = xno; then
20671    # Now execute the test
20672
20673  if test "x$JAVA_HOME" != x; then
20674    JAVA_HOME_PROCESSED="$JAVA_HOME"
20675
20676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20677
20678  # Input might be given as Windows format, start by converting to
20679  # unix format.
20680  path="$JAVA_HOME_PROCESSED"
20681  new_path=`$CYGPATH -u "$path"`
20682
20683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20686  # "foo.exe" is OK but "foo" is an error.
20687  #
20688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20689  # It is also a way to make sure we got the proper file name for the real test later on.
20690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20691  if test "x$test_shortpath" = x; then
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20693$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20694    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20695  fi
20696
20697  # Call helper function which possibly converts this using DOS-style short mode.
20698  # If so, the updated path is stored in $new_path.
20699
20700  input_path="$new_path"
20701  # Check if we need to convert this using DOS-style short mode. If the path
20702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20703  # take no chances and rewrite it.
20704  # Note: m4 eats our [], so we need to use [ and ] instead.
20705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20706  if test "x$has_forbidden_chars" != x; then
20707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20711      # Going to short mode and back again did indeed matter. Since short mode is
20712      # case insensitive, let's make it lowercase to improve readability.
20713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20714      # Now convert it back to Unix-style (cygpath)
20715      input_path=`$CYGPATH -u "$shortmode_path"`
20716      new_path="$input_path"
20717    fi
20718  fi
20719
20720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20721  if test "x$test_cygdrive_prefix" = x; then
20722    # As a simple fix, exclude /usr/bin since it's not a real path.
20723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20725      # a path prefixed by /cygdrive for fixpath to work.
20726      new_path="$CYGWIN_ROOT_PATH$input_path"
20727    fi
20728  fi
20729
20730
20731  if test "x$path" != "x$new_path"; then
20732    JAVA_HOME_PROCESSED="$new_path"
20733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20734$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20735  fi
20736
20737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738
20739  path="$JAVA_HOME_PROCESSED"
20740  has_colon=`$ECHO $path | $GREP ^.:`
20741  new_path="$path"
20742  if test "x$has_colon" = x; then
20743    # Not in mixed or Windows style, start by that.
20744    new_path=`cmd //c echo $path`
20745  fi
20746
20747
20748  input_path="$new_path"
20749  # Check if we need to convert this using DOS-style short mode. If the path
20750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20751  # take no chances and rewrite it.
20752  # Note: m4 eats our [], so we need to use [ and ] instead.
20753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20754  if test "x$has_forbidden_chars" != x; then
20755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20757  fi
20758
20759
20760  windows_path="$new_path"
20761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762    unix_path=`$CYGPATH -u "$windows_path"`
20763    new_path="$unix_path"
20764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20766    new_path="$unix_path"
20767  fi
20768
20769  if test "x$path" != "x$new_path"; then
20770    JAVA_HOME_PROCESSED="$new_path"
20771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20772$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20773  fi
20774
20775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20777
20778  else
20779    # We're on a posix platform. Hooray! :)
20780    path="$JAVA_HOME_PROCESSED"
20781    has_space=`$ECHO "$path" | $GREP " "`
20782    if test "x$has_space" != x; then
20783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20784$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20786    fi
20787
20788    # Use eval to expand a potential ~
20789    eval path="$path"
20790    if test ! -f "$path" && test ! -d "$path"; then
20791      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20792    fi
20793
20794    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20795  fi
20796
20797    if test ! -d "$JAVA_HOME_PROCESSED"; then
20798      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20799$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20800    else
20801      # Aha, the user has set a JAVA_HOME
20802      # let us use that as the Boot JDK.
20803      BOOT_JDK="$JAVA_HOME_PROCESSED"
20804      BOOT_JDK_FOUND=maybe
20805      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20806$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20807    fi
20808  fi
20809
20810
20811    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20812    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20813      # Do we have a bin/java?
20814      if test ! -x "$BOOT_JDK/bin/java"; then
20815        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20817        BOOT_JDK_FOUND=no
20818      else
20819        # Do we have a bin/javac?
20820        if test ! -x "$BOOT_JDK/bin/javac"; then
20821          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20823          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20824$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20825          BOOT_JDK_FOUND=no
20826        else
20827          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20828          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20829            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20831            BOOT_JDK_FOUND=no
20832          else
20833            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20835
20836            # Extra M4 quote needed to protect [] in grep expression.
20837            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20838            if test "x$FOUND_VERSION_78" = x; then
20839              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20841              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20842$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20843              BOOT_JDK_FOUND=no
20844            else
20845              # We're done! :-)
20846              BOOT_JDK_FOUND=yes
20847
20848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20849
20850  # Input might be given as Windows format, start by converting to
20851  # unix format.
20852  path="$BOOT_JDK"
20853  new_path=`$CYGPATH -u "$path"`
20854
20855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20858  # "foo.exe" is OK but "foo" is an error.
20859  #
20860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20861  # It is also a way to make sure we got the proper file name for the real test later on.
20862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20863  if test "x$test_shortpath" = x; then
20864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20867  fi
20868
20869  # Call helper function which possibly converts this using DOS-style short mode.
20870  # If so, the updated path is stored in $new_path.
20871
20872  input_path="$new_path"
20873  # Check if we need to convert this using DOS-style short mode. If the path
20874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20875  # take no chances and rewrite it.
20876  # Note: m4 eats our [], so we need to use [ and ] instead.
20877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20878  if test "x$has_forbidden_chars" != x; then
20879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20883      # Going to short mode and back again did indeed matter. Since short mode is
20884      # case insensitive, let's make it lowercase to improve readability.
20885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20886      # Now convert it back to Unix-style (cygpath)
20887      input_path=`$CYGPATH -u "$shortmode_path"`
20888      new_path="$input_path"
20889    fi
20890  fi
20891
20892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20893  if test "x$test_cygdrive_prefix" = x; then
20894    # As a simple fix, exclude /usr/bin since it's not a real path.
20895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20897      # a path prefixed by /cygdrive for fixpath to work.
20898      new_path="$CYGWIN_ROOT_PATH$input_path"
20899    fi
20900  fi
20901
20902
20903  if test "x$path" != "x$new_path"; then
20904    BOOT_JDK="$new_path"
20905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20907  fi
20908
20909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20910
20911  path="$BOOT_JDK"
20912  has_colon=`$ECHO $path | $GREP ^.:`
20913  new_path="$path"
20914  if test "x$has_colon" = x; then
20915    # Not in mixed or Windows style, start by that.
20916    new_path=`cmd //c echo $path`
20917  fi
20918
20919
20920  input_path="$new_path"
20921  # Check if we need to convert this using DOS-style short mode. If the path
20922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20923  # take no chances and rewrite it.
20924  # Note: m4 eats our [], so we need to use [ and ] instead.
20925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20926  if test "x$has_forbidden_chars" != x; then
20927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20929  fi
20930
20931
20932  windows_path="$new_path"
20933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20934    unix_path=`$CYGPATH -u "$windows_path"`
20935    new_path="$unix_path"
20936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20938    new_path="$unix_path"
20939  fi
20940
20941  if test "x$path" != "x$new_path"; then
20942    BOOT_JDK="$new_path"
20943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20945  fi
20946
20947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20949
20950  else
20951    # We're on a posix platform. Hooray! :)
20952    path="$BOOT_JDK"
20953    has_space=`$ECHO "$path" | $GREP " "`
20954    if test "x$has_space" != x; then
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20958    fi
20959
20960    # Use eval to expand a potential ~
20961    eval path="$path"
20962    if test ! -f "$path" && test ! -d "$path"; then
20963      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20964    fi
20965
20966    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20967  fi
20968
20969              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20970$as_echo_n "checking for Boot JDK... " >&6; }
20971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20972$as_echo "$BOOT_JDK" >&6; }
20973              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20974$as_echo_n "checking Boot JDK version... " >&6; }
20975              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20976              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20977$as_echo "$BOOT_JDK_VERSION" >&6; }
20978            fi # end check jdk version
20979          fi # end check rt.jar
20980        fi # end check javac
20981      fi # end check java
20982    fi # end check boot jdk found
20983  fi
20984
20985
20986  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20987
20988  if test "x$BOOT_JDK_FOUND" = xno; then
20989    # Now execute the test
20990
20991  if test -x /usr/libexec/java_home; then
20992    BOOT_JDK=`/usr/libexec/java_home`
20993    BOOT_JDK_FOUND=maybe
20994    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20995$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20996  fi
20997
20998
20999    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21000    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21001      # Do we have a bin/java?
21002      if test ! -x "$BOOT_JDK/bin/java"; then
21003        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21005        BOOT_JDK_FOUND=no
21006      else
21007        # Do we have a bin/javac?
21008        if test ! -x "$BOOT_JDK/bin/javac"; then
21009          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21011          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21012$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21013          BOOT_JDK_FOUND=no
21014        else
21015          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21016          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21017            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21019            BOOT_JDK_FOUND=no
21020          else
21021            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21022            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21023
21024            # Extra M4 quote needed to protect [] in grep expression.
21025            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21026            if test "x$FOUND_VERSION_78" = x; then
21027              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21029              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21030$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21031              BOOT_JDK_FOUND=no
21032            else
21033              # We're done! :-)
21034              BOOT_JDK_FOUND=yes
21035
21036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21037
21038  # Input might be given as Windows format, start by converting to
21039  # unix format.
21040  path="$BOOT_JDK"
21041  new_path=`$CYGPATH -u "$path"`
21042
21043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21046  # "foo.exe" is OK but "foo" is an error.
21047  #
21048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21049  # It is also a way to make sure we got the proper file name for the real test later on.
21050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21051  if test "x$test_shortpath" = x; then
21052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21055  fi
21056
21057  # Call helper function which possibly converts this using DOS-style short mode.
21058  # If so, the updated path is stored in $new_path.
21059
21060  input_path="$new_path"
21061  # Check if we need to convert this using DOS-style short mode. If the path
21062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21063  # take no chances and rewrite it.
21064  # Note: m4 eats our [], so we need to use [ and ] instead.
21065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21066  if test "x$has_forbidden_chars" != x; then
21067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21071      # Going to short mode and back again did indeed matter. Since short mode is
21072      # case insensitive, let's make it lowercase to improve readability.
21073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21074      # Now convert it back to Unix-style (cygpath)
21075      input_path=`$CYGPATH -u "$shortmode_path"`
21076      new_path="$input_path"
21077    fi
21078  fi
21079
21080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21081  if test "x$test_cygdrive_prefix" = x; then
21082    # As a simple fix, exclude /usr/bin since it's not a real path.
21083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21085      # a path prefixed by /cygdrive for fixpath to work.
21086      new_path="$CYGWIN_ROOT_PATH$input_path"
21087    fi
21088  fi
21089
21090
21091  if test "x$path" != "x$new_path"; then
21092    BOOT_JDK="$new_path"
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21095  fi
21096
21097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21098
21099  path="$BOOT_JDK"
21100  has_colon=`$ECHO $path | $GREP ^.:`
21101  new_path="$path"
21102  if test "x$has_colon" = x; then
21103    # Not in mixed or Windows style, start by that.
21104    new_path=`cmd //c echo $path`
21105  fi
21106
21107
21108  input_path="$new_path"
21109  # Check if we need to convert this using DOS-style short mode. If the path
21110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21111  # take no chances and rewrite it.
21112  # Note: m4 eats our [], so we need to use [ and ] instead.
21113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21114  if test "x$has_forbidden_chars" != x; then
21115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21117  fi
21118
21119
21120  windows_path="$new_path"
21121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21122    unix_path=`$CYGPATH -u "$windows_path"`
21123    new_path="$unix_path"
21124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21126    new_path="$unix_path"
21127  fi
21128
21129  if test "x$path" != "x$new_path"; then
21130    BOOT_JDK="$new_path"
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21133  fi
21134
21135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21137
21138  else
21139    # We're on a posix platform. Hooray! :)
21140    path="$BOOT_JDK"
21141    has_space=`$ECHO "$path" | $GREP " "`
21142    if test "x$has_space" != x; then
21143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21145      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21146    fi
21147
21148    # Use eval to expand a potential ~
21149    eval path="$path"
21150    if test ! -f "$path" && test ! -d "$path"; then
21151      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21152    fi
21153
21154    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21155  fi
21156
21157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21158$as_echo_n "checking for Boot JDK... " >&6; }
21159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21160$as_echo "$BOOT_JDK" >&6; }
21161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21162$as_echo_n "checking Boot JDK version... " >&6; }
21163              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21165$as_echo "$BOOT_JDK_VERSION" >&6; }
21166            fi # end check jdk version
21167          fi # end check rt.jar
21168        fi # end check javac
21169      fi # end check java
21170    fi # end check boot jdk found
21171  fi
21172
21173
21174  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21175
21176  if test "x$BOOT_JDK_FOUND" = xno; then
21177    # Now execute the test
21178
21179  # Extract the first word of "javac", so it can be a program name with args.
21180set dummy javac; ac_word=$2
21181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21182$as_echo_n "checking for $ac_word... " >&6; }
21183if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21184  $as_echo_n "(cached) " >&6
21185else
21186  case $JAVAC_CHECK in
21187  [\\/]* | ?:[\\/]*)
21188  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21189  ;;
21190  *)
21191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21192for as_dir in $PATH
21193do
21194  IFS=$as_save_IFS
21195  test -z "$as_dir" && as_dir=.
21196    for ac_exec_ext in '' $ac_executable_extensions; do
21197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21198    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21200    break 2
21201  fi
21202done
21203  done
21204IFS=$as_save_IFS
21205
21206  ;;
21207esac
21208fi
21209JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21210if test -n "$JAVAC_CHECK"; then
21211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21212$as_echo "$JAVAC_CHECK" >&6; }
21213else
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21215$as_echo "no" >&6; }
21216fi
21217
21218
21219  # Extract the first word of "java", so it can be a program name with args.
21220set dummy java; ac_word=$2
21221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21222$as_echo_n "checking for $ac_word... " >&6; }
21223if ${ac_cv_path_JAVA_CHECK+:} false; then :
21224  $as_echo_n "(cached) " >&6
21225else
21226  case $JAVA_CHECK in
21227  [\\/]* | ?:[\\/]*)
21228  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21229  ;;
21230  *)
21231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21232for as_dir in $PATH
21233do
21234  IFS=$as_save_IFS
21235  test -z "$as_dir" && as_dir=.
21236    for ac_exec_ext in '' $ac_executable_extensions; do
21237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21238    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21240    break 2
21241  fi
21242done
21243  done
21244IFS=$as_save_IFS
21245
21246  ;;
21247esac
21248fi
21249JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21250if test -n "$JAVA_CHECK"; then
21251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21252$as_echo "$JAVA_CHECK" >&6; }
21253else
21254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21255$as_echo "no" >&6; }
21256fi
21257
21258
21259  BINARY="$JAVAC_CHECK"
21260  if test "x$JAVAC_CHECK" = x; then
21261    BINARY="$JAVA_CHECK"
21262  fi
21263  if test "x$BINARY" != x; then
21264    # So there is a java(c) binary, it might be part of a JDK.
21265    # Lets find the JDK/JRE directory by following symbolic links.
21266    # Linux/GNU systems often have links from /usr/bin/java to
21267    # /etc/alternatives/java to the real JDK binary.
21268
21269  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21270    # Follow a chain of symbolic links. Use readlink
21271    # where it exists, else fall back to horribly
21272    # complicated shell code.
21273    if test "x$READLINK_TESTED" != yes; then
21274      # On MacOSX there is a readlink tool with a different
21275      # purpose than the GNU readlink tool. Check the found readlink.
21276      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21277      if test "x$ISGNU" = x; then
21278        # A readlink that we do not know how to use.
21279        # Are there other non-GNU readlinks out there?
21280        READLINK_TESTED=yes
21281        READLINK=
21282      fi
21283    fi
21284
21285    if test "x$READLINK" != x; then
21286      BINARY=`$READLINK -f $BINARY`
21287    else
21288      # Save the current directory for restoring afterwards
21289      STARTDIR=$PWD
21290      COUNTER=0
21291      sym_link_dir=`$DIRNAME $BINARY`
21292      sym_link_file=`$BASENAME $BINARY`
21293      cd $sym_link_dir
21294      # Use -P flag to resolve symlinks in directories.
21295      cd `$THEPWDCMD -P`
21296      sym_link_dir=`$THEPWDCMD -P`
21297      # Resolve file symlinks
21298      while test $COUNTER -lt 20; do
21299        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21300        if test "x$ISLINK" == x; then
21301          # This is not a symbolic link! We are done!
21302          break
21303        fi
21304        # Again resolve directory symlinks since the target of the just found
21305        # link could be in a different directory
21306        cd `$DIRNAME $ISLINK`
21307        sym_link_dir=`$THEPWDCMD -P`
21308        sym_link_file=`$BASENAME $ISLINK`
21309        let COUNTER=COUNTER+1
21310      done
21311      cd $STARTDIR
21312      BINARY=$sym_link_dir/$sym_link_file
21313    fi
21314  fi
21315
21316    BOOT_JDK=`dirname "$BINARY"`
21317    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21318    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21319      # Looks like we found ourselves an JDK
21320      BOOT_JDK_FOUND=maybe
21321      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21322$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21323    fi
21324  fi
21325
21326
21327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21329      # Do we have a bin/java?
21330      if test ! -x "$BOOT_JDK/bin/java"; then
21331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21333        BOOT_JDK_FOUND=no
21334      else
21335        # Do we have a bin/javac?
21336        if test ! -x "$BOOT_JDK/bin/javac"; then
21337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21341          BOOT_JDK_FOUND=no
21342        else
21343          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21344          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21347            BOOT_JDK_FOUND=no
21348          else
21349            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21351
21352            # Extra M4 quote needed to protect [] in grep expression.
21353            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21354            if test "x$FOUND_VERSION_78" = x; then
21355              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21357              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21358$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21359              BOOT_JDK_FOUND=no
21360            else
21361              # We're done! :-)
21362              BOOT_JDK_FOUND=yes
21363
21364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21365
21366  # Input might be given as Windows format, start by converting to
21367  # unix format.
21368  path="$BOOT_JDK"
21369  new_path=`$CYGPATH -u "$path"`
21370
21371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21374  # "foo.exe" is OK but "foo" is an error.
21375  #
21376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21377  # It is also a way to make sure we got the proper file name for the real test later on.
21378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21379  if test "x$test_shortpath" = x; then
21380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21383  fi
21384
21385  # Call helper function which possibly converts this using DOS-style short mode.
21386  # If so, the updated path is stored in $new_path.
21387
21388  input_path="$new_path"
21389  # Check if we need to convert this using DOS-style short mode. If the path
21390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21391  # take no chances and rewrite it.
21392  # Note: m4 eats our [], so we need to use [ and ] instead.
21393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21394  if test "x$has_forbidden_chars" != x; then
21395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21399      # Going to short mode and back again did indeed matter. Since short mode is
21400      # case insensitive, let's make it lowercase to improve readability.
21401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21402      # Now convert it back to Unix-style (cygpath)
21403      input_path=`$CYGPATH -u "$shortmode_path"`
21404      new_path="$input_path"
21405    fi
21406  fi
21407
21408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21409  if test "x$test_cygdrive_prefix" = x; then
21410    # As a simple fix, exclude /usr/bin since it's not a real path.
21411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21413      # a path prefixed by /cygdrive for fixpath to work.
21414      new_path="$CYGWIN_ROOT_PATH$input_path"
21415    fi
21416  fi
21417
21418
21419  if test "x$path" != "x$new_path"; then
21420    BOOT_JDK="$new_path"
21421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21423  fi
21424
21425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21426
21427  path="$BOOT_JDK"
21428  has_colon=`$ECHO $path | $GREP ^.:`
21429  new_path="$path"
21430  if test "x$has_colon" = x; then
21431    # Not in mixed or Windows style, start by that.
21432    new_path=`cmd //c echo $path`
21433  fi
21434
21435
21436  input_path="$new_path"
21437  # Check if we need to convert this using DOS-style short mode. If the path
21438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21439  # take no chances and rewrite it.
21440  # Note: m4 eats our [], so we need to use [ and ] instead.
21441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21442  if test "x$has_forbidden_chars" != x; then
21443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21445  fi
21446
21447
21448  windows_path="$new_path"
21449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21450    unix_path=`$CYGPATH -u "$windows_path"`
21451    new_path="$unix_path"
21452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21454    new_path="$unix_path"
21455  fi
21456
21457  if test "x$path" != "x$new_path"; then
21458    BOOT_JDK="$new_path"
21459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21461  fi
21462
21463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21465
21466  else
21467    # We're on a posix platform. Hooray! :)
21468    path="$BOOT_JDK"
21469    has_space=`$ECHO "$path" | $GREP " "`
21470    if test "x$has_space" != x; then
21471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21474    fi
21475
21476    # Use eval to expand a potential ~
21477    eval path="$path"
21478    if test ! -f "$path" && test ! -d "$path"; then
21479      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21480    fi
21481
21482    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21483  fi
21484
21485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21486$as_echo_n "checking for Boot JDK... " >&6; }
21487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21488$as_echo "$BOOT_JDK" >&6; }
21489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21490$as_echo_n "checking Boot JDK version... " >&6; }
21491              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21493$as_echo "$BOOT_JDK_VERSION" >&6; }
21494            fi # end check jdk version
21495          fi # end check rt.jar
21496        fi # end check javac
21497      fi # end check java
21498    fi # end check boot jdk found
21499  fi
21500
21501
21502  # Test: Is there a JDK installed in default, well-known locations?
21503
21504  if test "x$BOOT_JDK_FOUND" = xno; then
21505    # Now execute the test
21506
21507  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21508
21509  if test "x$BOOT_JDK_FOUND" = xno; then
21510    # Now execute the test
21511
21512  if test "x$ProgramW6432" != x; then
21513    VIRTUAL_DIR="$ProgramW6432/Java"
21514
21515  windows_path="$VIRTUAL_DIR"
21516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21517    unix_path=`$CYGPATH -u "$windows_path"`
21518    VIRTUAL_DIR="$unix_path"
21519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21521    VIRTUAL_DIR="$unix_path"
21522  fi
21523
21524
21525  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21526  BOOT_JDK_SUFFIX=""
21527  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21528  if test "x$ALL_JDKS_FOUND" != x; then
21529    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21530
21531  if test "x$BOOT_JDK_FOUND" = xno; then
21532    # Now execute the test
21533
21534        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21535        if test -d "$BOOT_JDK"; then
21536          BOOT_JDK_FOUND=maybe
21537          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21538$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21539        fi
21540
21541
21542    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21543    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21544      # Do we have a bin/java?
21545      if test ! -x "$BOOT_JDK/bin/java"; then
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21548        BOOT_JDK_FOUND=no
21549      else
21550        # Do we have a bin/javac?
21551        if test ! -x "$BOOT_JDK/bin/javac"; then
21552          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21554          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21555$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21556          BOOT_JDK_FOUND=no
21557        else
21558          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21559          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21562            BOOT_JDK_FOUND=no
21563          else
21564            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21566
21567            # Extra M4 quote needed to protect [] in grep expression.
21568            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21569            if test "x$FOUND_VERSION_78" = x; then
21570              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21572              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21573$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21574              BOOT_JDK_FOUND=no
21575            else
21576              # We're done! :-)
21577              BOOT_JDK_FOUND=yes
21578
21579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21580
21581  # Input might be given as Windows format, start by converting to
21582  # unix format.
21583  path="$BOOT_JDK"
21584  new_path=`$CYGPATH -u "$path"`
21585
21586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21589  # "foo.exe" is OK but "foo" is an error.
21590  #
21591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21592  # It is also a way to make sure we got the proper file name for the real test later on.
21593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21594  if test "x$test_shortpath" = x; then
21595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21598  fi
21599
21600  # Call helper function which possibly converts this using DOS-style short mode.
21601  # If so, the updated path is stored in $new_path.
21602
21603  input_path="$new_path"
21604  # Check if we need to convert this using DOS-style short mode. If the path
21605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21606  # take no chances and rewrite it.
21607  # Note: m4 eats our [], so we need to use [ and ] instead.
21608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21609  if test "x$has_forbidden_chars" != x; then
21610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21614      # Going to short mode and back again did indeed matter. Since short mode is
21615      # case insensitive, let's make it lowercase to improve readability.
21616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21617      # Now convert it back to Unix-style (cygpath)
21618      input_path=`$CYGPATH -u "$shortmode_path"`
21619      new_path="$input_path"
21620    fi
21621  fi
21622
21623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21624  if test "x$test_cygdrive_prefix" = x; then
21625    # As a simple fix, exclude /usr/bin since it's not a real path.
21626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21628      # a path prefixed by /cygdrive for fixpath to work.
21629      new_path="$CYGWIN_ROOT_PATH$input_path"
21630    fi
21631  fi
21632
21633
21634  if test "x$path" != "x$new_path"; then
21635    BOOT_JDK="$new_path"
21636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21638  fi
21639
21640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21641
21642  path="$BOOT_JDK"
21643  has_colon=`$ECHO $path | $GREP ^.:`
21644  new_path="$path"
21645  if test "x$has_colon" = x; then
21646    # Not in mixed or Windows style, start by that.
21647    new_path=`cmd //c echo $path`
21648  fi
21649
21650
21651  input_path="$new_path"
21652  # Check if we need to convert this using DOS-style short mode. If the path
21653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21654  # take no chances and rewrite it.
21655  # Note: m4 eats our [], so we need to use [ and ] instead.
21656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21657  if test "x$has_forbidden_chars" != x; then
21658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21660  fi
21661
21662
21663  windows_path="$new_path"
21664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21665    unix_path=`$CYGPATH -u "$windows_path"`
21666    new_path="$unix_path"
21667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21669    new_path="$unix_path"
21670  fi
21671
21672  if test "x$path" != "x$new_path"; then
21673    BOOT_JDK="$new_path"
21674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21676  fi
21677
21678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21680
21681  else
21682    # We're on a posix platform. Hooray! :)
21683    path="$BOOT_JDK"
21684    has_space=`$ECHO "$path" | $GREP " "`
21685    if test "x$has_space" != x; then
21686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21688      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21689    fi
21690
21691    # Use eval to expand a potential ~
21692    eval path="$path"
21693    if test ! -f "$path" && test ! -d "$path"; then
21694      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21695    fi
21696
21697    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21698  fi
21699
21700              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21701$as_echo_n "checking for Boot JDK... " >&6; }
21702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21703$as_echo "$BOOT_JDK" >&6; }
21704              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21705$as_echo_n "checking Boot JDK version... " >&6; }
21706              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21707              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21708$as_echo "$BOOT_JDK_VERSION" >&6; }
21709            fi # end check jdk version
21710          fi # end check rt.jar
21711        fi # end check javac
21712      fi # end check java
21713    fi # end check boot jdk found
21714  fi
21715
21716    done
21717  fi
21718
21719  fi
21720
21721
21722    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21723    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21724      # Do we have a bin/java?
21725      if test ! -x "$BOOT_JDK/bin/java"; then
21726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21728        BOOT_JDK_FOUND=no
21729      else
21730        # Do we have a bin/javac?
21731        if test ! -x "$BOOT_JDK/bin/javac"; then
21732          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21734          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21735$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21736          BOOT_JDK_FOUND=no
21737        else
21738          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21739          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21742            BOOT_JDK_FOUND=no
21743          else
21744            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21746
21747            # Extra M4 quote needed to protect [] in grep expression.
21748            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21749            if test "x$FOUND_VERSION_78" = x; then
21750              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21752              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21753$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21754              BOOT_JDK_FOUND=no
21755            else
21756              # We're done! :-)
21757              BOOT_JDK_FOUND=yes
21758
21759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21760
21761  # Input might be given as Windows format, start by converting to
21762  # unix format.
21763  path="$BOOT_JDK"
21764  new_path=`$CYGPATH -u "$path"`
21765
21766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21769  # "foo.exe" is OK but "foo" is an error.
21770  #
21771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21772  # It is also a way to make sure we got the proper file name for the real test later on.
21773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21774  if test "x$test_shortpath" = x; then
21775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21777    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21778  fi
21779
21780  # Call helper function which possibly converts this using DOS-style short mode.
21781  # If so, the updated path is stored in $new_path.
21782
21783  input_path="$new_path"
21784  # Check if we need to convert this using DOS-style short mode. If the path
21785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21786  # take no chances and rewrite it.
21787  # Note: m4 eats our [], so we need to use [ and ] instead.
21788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21789  if test "x$has_forbidden_chars" != x; then
21790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21794      # Going to short mode and back again did indeed matter. Since short mode is
21795      # case insensitive, let's make it lowercase to improve readability.
21796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21797      # Now convert it back to Unix-style (cygpath)
21798      input_path=`$CYGPATH -u "$shortmode_path"`
21799      new_path="$input_path"
21800    fi
21801  fi
21802
21803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21804  if test "x$test_cygdrive_prefix" = x; then
21805    # As a simple fix, exclude /usr/bin since it's not a real path.
21806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21808      # a path prefixed by /cygdrive for fixpath to work.
21809      new_path="$CYGWIN_ROOT_PATH$input_path"
21810    fi
21811  fi
21812
21813
21814  if test "x$path" != "x$new_path"; then
21815    BOOT_JDK="$new_path"
21816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21818  fi
21819
21820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21821
21822  path="$BOOT_JDK"
21823  has_colon=`$ECHO $path | $GREP ^.:`
21824  new_path="$path"
21825  if test "x$has_colon" = x; then
21826    # Not in mixed or Windows style, start by that.
21827    new_path=`cmd //c echo $path`
21828  fi
21829
21830
21831  input_path="$new_path"
21832  # Check if we need to convert this using DOS-style short mode. If the path
21833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21834  # take no chances and rewrite it.
21835  # Note: m4 eats our [], so we need to use [ and ] instead.
21836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21837  if test "x$has_forbidden_chars" != x; then
21838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21840  fi
21841
21842
21843  windows_path="$new_path"
21844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21845    unix_path=`$CYGPATH -u "$windows_path"`
21846    new_path="$unix_path"
21847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21849    new_path="$unix_path"
21850  fi
21851
21852  if test "x$path" != "x$new_path"; then
21853    BOOT_JDK="$new_path"
21854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21856  fi
21857
21858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21860
21861  else
21862    # We're on a posix platform. Hooray! :)
21863    path="$BOOT_JDK"
21864    has_space=`$ECHO "$path" | $GREP " "`
21865    if test "x$has_space" != x; then
21866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21868      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21869    fi
21870
21871    # Use eval to expand a potential ~
21872    eval path="$path"
21873    if test ! -f "$path" && test ! -d "$path"; then
21874      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21875    fi
21876
21877    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21878  fi
21879
21880              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21881$as_echo_n "checking for Boot JDK... " >&6; }
21882              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21883$as_echo "$BOOT_JDK" >&6; }
21884              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21885$as_echo_n "checking Boot JDK version... " >&6; }
21886              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21887              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21888$as_echo "$BOOT_JDK_VERSION" >&6; }
21889            fi # end check jdk version
21890          fi # end check rt.jar
21891        fi # end check javac
21892      fi # end check java
21893    fi # end check boot jdk found
21894  fi
21895
21896
21897  if test "x$BOOT_JDK_FOUND" = xno; then
21898    # Now execute the test
21899
21900  if test "x$PROGRAMW6432" != x; then
21901    VIRTUAL_DIR="$PROGRAMW6432/Java"
21902
21903  windows_path="$VIRTUAL_DIR"
21904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21905    unix_path=`$CYGPATH -u "$windows_path"`
21906    VIRTUAL_DIR="$unix_path"
21907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21909    VIRTUAL_DIR="$unix_path"
21910  fi
21911
21912
21913  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21914  BOOT_JDK_SUFFIX=""
21915  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21916  if test "x$ALL_JDKS_FOUND" != x; then
21917    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21918
21919  if test "x$BOOT_JDK_FOUND" = xno; then
21920    # Now execute the test
21921
21922        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21923        if test -d "$BOOT_JDK"; then
21924          BOOT_JDK_FOUND=maybe
21925          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21926$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21927        fi
21928
21929
21930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21932      # Do we have a bin/java?
21933      if test ! -x "$BOOT_JDK/bin/java"; then
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21936        BOOT_JDK_FOUND=no
21937      else
21938        # Do we have a bin/javac?
21939        if test ! -x "$BOOT_JDK/bin/javac"; then
21940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21944          BOOT_JDK_FOUND=no
21945        else
21946          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21947          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21948            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21950            BOOT_JDK_FOUND=no
21951          else
21952            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21953            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21954
21955            # Extra M4 quote needed to protect [] in grep expression.
21956            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21957            if test "x$FOUND_VERSION_78" = x; then
21958              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21960              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21961$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21962              BOOT_JDK_FOUND=no
21963            else
21964              # We're done! :-)
21965              BOOT_JDK_FOUND=yes
21966
21967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21968
21969  # Input might be given as Windows format, start by converting to
21970  # unix format.
21971  path="$BOOT_JDK"
21972  new_path=`$CYGPATH -u "$path"`
21973
21974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21977  # "foo.exe" is OK but "foo" is an error.
21978  #
21979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21980  # It is also a way to make sure we got the proper file name for the real test later on.
21981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21982  if test "x$test_shortpath" = x; then
21983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21985    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21986  fi
21987
21988  # Call helper function which possibly converts this using DOS-style short mode.
21989  # If so, the updated path is stored in $new_path.
21990
21991  input_path="$new_path"
21992  # Check if we need to convert this using DOS-style short mode. If the path
21993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21994  # take no chances and rewrite it.
21995  # Note: m4 eats our [], so we need to use [ and ] instead.
21996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21997  if test "x$has_forbidden_chars" != x; then
21998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22002      # Going to short mode and back again did indeed matter. Since short mode is
22003      # case insensitive, let's make it lowercase to improve readability.
22004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22005      # Now convert it back to Unix-style (cygpath)
22006      input_path=`$CYGPATH -u "$shortmode_path"`
22007      new_path="$input_path"
22008    fi
22009  fi
22010
22011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22012  if test "x$test_cygdrive_prefix" = x; then
22013    # As a simple fix, exclude /usr/bin since it's not a real path.
22014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22016      # a path prefixed by /cygdrive for fixpath to work.
22017      new_path="$CYGWIN_ROOT_PATH$input_path"
22018    fi
22019  fi
22020
22021
22022  if test "x$path" != "x$new_path"; then
22023    BOOT_JDK="$new_path"
22024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22026  fi
22027
22028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22029
22030  path="$BOOT_JDK"
22031  has_colon=`$ECHO $path | $GREP ^.:`
22032  new_path="$path"
22033  if test "x$has_colon" = x; then
22034    # Not in mixed or Windows style, start by that.
22035    new_path=`cmd //c echo $path`
22036  fi
22037
22038
22039  input_path="$new_path"
22040  # Check if we need to convert this using DOS-style short mode. If the path
22041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22042  # take no chances and rewrite it.
22043  # Note: m4 eats our [], so we need to use [ and ] instead.
22044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22045  if test "x$has_forbidden_chars" != x; then
22046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22048  fi
22049
22050
22051  windows_path="$new_path"
22052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22053    unix_path=`$CYGPATH -u "$windows_path"`
22054    new_path="$unix_path"
22055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22057    new_path="$unix_path"
22058  fi
22059
22060  if test "x$path" != "x$new_path"; then
22061    BOOT_JDK="$new_path"
22062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22064  fi
22065
22066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22068
22069  else
22070    # We're on a posix platform. Hooray! :)
22071    path="$BOOT_JDK"
22072    has_space=`$ECHO "$path" | $GREP " "`
22073    if test "x$has_space" != x; then
22074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22076      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22077    fi
22078
22079    # Use eval to expand a potential ~
22080    eval path="$path"
22081    if test ! -f "$path" && test ! -d "$path"; then
22082      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22083    fi
22084
22085    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22086  fi
22087
22088              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22089$as_echo_n "checking for Boot JDK... " >&6; }
22090              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22091$as_echo "$BOOT_JDK" >&6; }
22092              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22093$as_echo_n "checking Boot JDK version... " >&6; }
22094              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22095              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22096$as_echo "$BOOT_JDK_VERSION" >&6; }
22097            fi # end check jdk version
22098          fi # end check rt.jar
22099        fi # end check javac
22100      fi # end check java
22101    fi # end check boot jdk found
22102  fi
22103
22104    done
22105  fi
22106
22107  fi
22108
22109
22110    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22111    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22112      # Do we have a bin/java?
22113      if test ! -x "$BOOT_JDK/bin/java"; then
22114        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22116        BOOT_JDK_FOUND=no
22117      else
22118        # Do we have a bin/javac?
22119        if test ! -x "$BOOT_JDK/bin/javac"; then
22120          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22122          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22123$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22124          BOOT_JDK_FOUND=no
22125        else
22126          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22127          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22128            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22130            BOOT_JDK_FOUND=no
22131          else
22132            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22133            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22134
22135            # Extra M4 quote needed to protect [] in grep expression.
22136            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22137            if test "x$FOUND_VERSION_78" = x; then
22138              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22140              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22141$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22142              BOOT_JDK_FOUND=no
22143            else
22144              # We're done! :-)
22145              BOOT_JDK_FOUND=yes
22146
22147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148
22149  # Input might be given as Windows format, start by converting to
22150  # unix format.
22151  path="$BOOT_JDK"
22152  new_path=`$CYGPATH -u "$path"`
22153
22154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22157  # "foo.exe" is OK but "foo" is an error.
22158  #
22159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22160  # It is also a way to make sure we got the proper file name for the real test later on.
22161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22162  if test "x$test_shortpath" = x; then
22163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22165    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22166  fi
22167
22168  # Call helper function which possibly converts this using DOS-style short mode.
22169  # If so, the updated path is stored in $new_path.
22170
22171  input_path="$new_path"
22172  # Check if we need to convert this using DOS-style short mode. If the path
22173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22174  # take no chances and rewrite it.
22175  # Note: m4 eats our [], so we need to use [ and ] instead.
22176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22177  if test "x$has_forbidden_chars" != x; then
22178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22182      # Going to short mode and back again did indeed matter. Since short mode is
22183      # case insensitive, let's make it lowercase to improve readability.
22184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22185      # Now convert it back to Unix-style (cygpath)
22186      input_path=`$CYGPATH -u "$shortmode_path"`
22187      new_path="$input_path"
22188    fi
22189  fi
22190
22191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22192  if test "x$test_cygdrive_prefix" = x; then
22193    # As a simple fix, exclude /usr/bin since it's not a real path.
22194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22196      # a path prefixed by /cygdrive for fixpath to work.
22197      new_path="$CYGWIN_ROOT_PATH$input_path"
22198    fi
22199  fi
22200
22201
22202  if test "x$path" != "x$new_path"; then
22203    BOOT_JDK="$new_path"
22204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22205$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22206  fi
22207
22208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22209
22210  path="$BOOT_JDK"
22211  has_colon=`$ECHO $path | $GREP ^.:`
22212  new_path="$path"
22213  if test "x$has_colon" = x; then
22214    # Not in mixed or Windows style, start by that.
22215    new_path=`cmd //c echo $path`
22216  fi
22217
22218
22219  input_path="$new_path"
22220  # Check if we need to convert this using DOS-style short mode. If the path
22221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22222  # take no chances and rewrite it.
22223  # Note: m4 eats our [], so we need to use [ and ] instead.
22224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22225  if test "x$has_forbidden_chars" != x; then
22226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22228  fi
22229
22230
22231  windows_path="$new_path"
22232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22233    unix_path=`$CYGPATH -u "$windows_path"`
22234    new_path="$unix_path"
22235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22237    new_path="$unix_path"
22238  fi
22239
22240  if test "x$path" != "x$new_path"; then
22241    BOOT_JDK="$new_path"
22242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22244  fi
22245
22246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22248
22249  else
22250    # We're on a posix platform. Hooray! :)
22251    path="$BOOT_JDK"
22252    has_space=`$ECHO "$path" | $GREP " "`
22253    if test "x$has_space" != x; then
22254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22255$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22256      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22257    fi
22258
22259    # Use eval to expand a potential ~
22260    eval path="$path"
22261    if test ! -f "$path" && test ! -d "$path"; then
22262      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22263    fi
22264
22265    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22266  fi
22267
22268              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22269$as_echo_n "checking for Boot JDK... " >&6; }
22270              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22271$as_echo "$BOOT_JDK" >&6; }
22272              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22273$as_echo_n "checking Boot JDK version... " >&6; }
22274              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22275              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22276$as_echo "$BOOT_JDK_VERSION" >&6; }
22277            fi # end check jdk version
22278          fi # end check rt.jar
22279        fi # end check javac
22280      fi # end check java
22281    fi # end check boot jdk found
22282  fi
22283
22284
22285  if test "x$BOOT_JDK_FOUND" = xno; then
22286    # Now execute the test
22287
22288  if test "x$PROGRAMFILES" != x; then
22289    VIRTUAL_DIR="$PROGRAMFILES/Java"
22290
22291  windows_path="$VIRTUAL_DIR"
22292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22293    unix_path=`$CYGPATH -u "$windows_path"`
22294    VIRTUAL_DIR="$unix_path"
22295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22297    VIRTUAL_DIR="$unix_path"
22298  fi
22299
22300
22301  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22302  BOOT_JDK_SUFFIX=""
22303  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22304  if test "x$ALL_JDKS_FOUND" != x; then
22305    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22306
22307  if test "x$BOOT_JDK_FOUND" = xno; then
22308    # Now execute the test
22309
22310        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22311        if test -d "$BOOT_JDK"; then
22312          BOOT_JDK_FOUND=maybe
22313          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22314$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22315        fi
22316
22317
22318    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22319    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22320      # Do we have a bin/java?
22321      if test ! -x "$BOOT_JDK/bin/java"; then
22322        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22324        BOOT_JDK_FOUND=no
22325      else
22326        # Do we have a bin/javac?
22327        if test ! -x "$BOOT_JDK/bin/javac"; then
22328          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22330          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22331$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22332          BOOT_JDK_FOUND=no
22333        else
22334          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22335          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22338            BOOT_JDK_FOUND=no
22339          else
22340            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22341            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22342
22343            # Extra M4 quote needed to protect [] in grep expression.
22344            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22345            if test "x$FOUND_VERSION_78" = x; then
22346              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22348              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22349$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22350              BOOT_JDK_FOUND=no
22351            else
22352              # We're done! :-)
22353              BOOT_JDK_FOUND=yes
22354
22355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22356
22357  # Input might be given as Windows format, start by converting to
22358  # unix format.
22359  path="$BOOT_JDK"
22360  new_path=`$CYGPATH -u "$path"`
22361
22362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22365  # "foo.exe" is OK but "foo" is an error.
22366  #
22367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22368  # It is also a way to make sure we got the proper file name for the real test later on.
22369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22370  if test "x$test_shortpath" = x; then
22371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22374  fi
22375
22376  # Call helper function which possibly converts this using DOS-style short mode.
22377  # If so, the updated path is stored in $new_path.
22378
22379  input_path="$new_path"
22380  # Check if we need to convert this using DOS-style short mode. If the path
22381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22382  # take no chances and rewrite it.
22383  # Note: m4 eats our [], so we need to use [ and ] instead.
22384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22385  if test "x$has_forbidden_chars" != x; then
22386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22390      # Going to short mode and back again did indeed matter. Since short mode is
22391      # case insensitive, let's make it lowercase to improve readability.
22392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22393      # Now convert it back to Unix-style (cygpath)
22394      input_path=`$CYGPATH -u "$shortmode_path"`
22395      new_path="$input_path"
22396    fi
22397  fi
22398
22399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22400  if test "x$test_cygdrive_prefix" = x; then
22401    # As a simple fix, exclude /usr/bin since it's not a real path.
22402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22404      # a path prefixed by /cygdrive for fixpath to work.
22405      new_path="$CYGWIN_ROOT_PATH$input_path"
22406    fi
22407  fi
22408
22409
22410  if test "x$path" != "x$new_path"; then
22411    BOOT_JDK="$new_path"
22412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22414  fi
22415
22416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22417
22418  path="$BOOT_JDK"
22419  has_colon=`$ECHO $path | $GREP ^.:`
22420  new_path="$path"
22421  if test "x$has_colon" = x; then
22422    # Not in mixed or Windows style, start by that.
22423    new_path=`cmd //c echo $path`
22424  fi
22425
22426
22427  input_path="$new_path"
22428  # Check if we need to convert this using DOS-style short mode. If the path
22429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22430  # take no chances and rewrite it.
22431  # Note: m4 eats our [], so we need to use [ and ] instead.
22432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22433  if test "x$has_forbidden_chars" != x; then
22434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22436  fi
22437
22438
22439  windows_path="$new_path"
22440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22441    unix_path=`$CYGPATH -u "$windows_path"`
22442    new_path="$unix_path"
22443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22445    new_path="$unix_path"
22446  fi
22447
22448  if test "x$path" != "x$new_path"; then
22449    BOOT_JDK="$new_path"
22450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22452  fi
22453
22454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22456
22457  else
22458    # We're on a posix platform. Hooray! :)
22459    path="$BOOT_JDK"
22460    has_space=`$ECHO "$path" | $GREP " "`
22461    if test "x$has_space" != x; then
22462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22464      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22465    fi
22466
22467    # Use eval to expand a potential ~
22468    eval path="$path"
22469    if test ! -f "$path" && test ! -d "$path"; then
22470      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22471    fi
22472
22473    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22474  fi
22475
22476              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22477$as_echo_n "checking for Boot JDK... " >&6; }
22478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22479$as_echo "$BOOT_JDK" >&6; }
22480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22481$as_echo_n "checking Boot JDK version... " >&6; }
22482              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22483              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22484$as_echo "$BOOT_JDK_VERSION" >&6; }
22485            fi # end check jdk version
22486          fi # end check rt.jar
22487        fi # end check javac
22488      fi # end check java
22489    fi # end check boot jdk found
22490  fi
22491
22492    done
22493  fi
22494
22495  fi
22496
22497
22498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22500      # Do we have a bin/java?
22501      if test ! -x "$BOOT_JDK/bin/java"; then
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22504        BOOT_JDK_FOUND=no
22505      else
22506        # Do we have a bin/javac?
22507        if test ! -x "$BOOT_JDK/bin/javac"; then
22508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22512          BOOT_JDK_FOUND=no
22513        else
22514          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22515          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22518            BOOT_JDK_FOUND=no
22519          else
22520            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22522
22523            # Extra M4 quote needed to protect [] in grep expression.
22524            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22525            if test "x$FOUND_VERSION_78" = x; then
22526              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22528              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22529$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22530              BOOT_JDK_FOUND=no
22531            else
22532              # We're done! :-)
22533              BOOT_JDK_FOUND=yes
22534
22535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22536
22537  # Input might be given as Windows format, start by converting to
22538  # unix format.
22539  path="$BOOT_JDK"
22540  new_path=`$CYGPATH -u "$path"`
22541
22542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22545  # "foo.exe" is OK but "foo" is an error.
22546  #
22547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22548  # It is also a way to make sure we got the proper file name for the real test later on.
22549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22550  if test "x$test_shortpath" = x; then
22551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22554  fi
22555
22556  # Call helper function which possibly converts this using DOS-style short mode.
22557  # If so, the updated path is stored in $new_path.
22558
22559  input_path="$new_path"
22560  # Check if we need to convert this using DOS-style short mode. If the path
22561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22562  # take no chances and rewrite it.
22563  # Note: m4 eats our [], so we need to use [ and ] instead.
22564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22565  if test "x$has_forbidden_chars" != x; then
22566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22570      # Going to short mode and back again did indeed matter. Since short mode is
22571      # case insensitive, let's make it lowercase to improve readability.
22572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22573      # Now convert it back to Unix-style (cygpath)
22574      input_path=`$CYGPATH -u "$shortmode_path"`
22575      new_path="$input_path"
22576    fi
22577  fi
22578
22579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22580  if test "x$test_cygdrive_prefix" = x; then
22581    # As a simple fix, exclude /usr/bin since it's not a real path.
22582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22584      # a path prefixed by /cygdrive for fixpath to work.
22585      new_path="$CYGWIN_ROOT_PATH$input_path"
22586    fi
22587  fi
22588
22589
22590  if test "x$path" != "x$new_path"; then
22591    BOOT_JDK="$new_path"
22592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22594  fi
22595
22596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22597
22598  path="$BOOT_JDK"
22599  has_colon=`$ECHO $path | $GREP ^.:`
22600  new_path="$path"
22601  if test "x$has_colon" = x; then
22602    # Not in mixed or Windows style, start by that.
22603    new_path=`cmd //c echo $path`
22604  fi
22605
22606
22607  input_path="$new_path"
22608  # Check if we need to convert this using DOS-style short mode. If the path
22609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22610  # take no chances and rewrite it.
22611  # Note: m4 eats our [], so we need to use [ and ] instead.
22612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22613  if test "x$has_forbidden_chars" != x; then
22614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22616  fi
22617
22618
22619  windows_path="$new_path"
22620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22621    unix_path=`$CYGPATH -u "$windows_path"`
22622    new_path="$unix_path"
22623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22625    new_path="$unix_path"
22626  fi
22627
22628  if test "x$path" != "x$new_path"; then
22629    BOOT_JDK="$new_path"
22630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22632  fi
22633
22634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22636
22637  else
22638    # We're on a posix platform. Hooray! :)
22639    path="$BOOT_JDK"
22640    has_space=`$ECHO "$path" | $GREP " "`
22641    if test "x$has_space" != x; then
22642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22645    fi
22646
22647    # Use eval to expand a potential ~
22648    eval path="$path"
22649    if test ! -f "$path" && test ! -d "$path"; then
22650      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22651    fi
22652
22653    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22654  fi
22655
22656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22657$as_echo_n "checking for Boot JDK... " >&6; }
22658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22659$as_echo "$BOOT_JDK" >&6; }
22660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22661$as_echo_n "checking Boot JDK version... " >&6; }
22662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22664$as_echo "$BOOT_JDK_VERSION" >&6; }
22665            fi # end check jdk version
22666          fi # end check rt.jar
22667        fi # end check javac
22668      fi # end check java
22669    fi # end check boot jdk found
22670  fi
22671
22672
22673  if test "x$BOOT_JDK_FOUND" = xno; then
22674    # Now execute the test
22675
22676  if test "x$ProgramFiles" != x; then
22677    VIRTUAL_DIR="$ProgramFiles/Java"
22678
22679  windows_path="$VIRTUAL_DIR"
22680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22681    unix_path=`$CYGPATH -u "$windows_path"`
22682    VIRTUAL_DIR="$unix_path"
22683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22685    VIRTUAL_DIR="$unix_path"
22686  fi
22687
22688
22689  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22690  BOOT_JDK_SUFFIX=""
22691  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22692  if test "x$ALL_JDKS_FOUND" != x; then
22693    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22694
22695  if test "x$BOOT_JDK_FOUND" = xno; then
22696    # Now execute the test
22697
22698        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22699        if test -d "$BOOT_JDK"; then
22700          BOOT_JDK_FOUND=maybe
22701          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22702$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22703        fi
22704
22705
22706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22708      # Do we have a bin/java?
22709      if test ! -x "$BOOT_JDK/bin/java"; then
22710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22712        BOOT_JDK_FOUND=no
22713      else
22714        # Do we have a bin/javac?
22715        if test ! -x "$BOOT_JDK/bin/javac"; then
22716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22720          BOOT_JDK_FOUND=no
22721        else
22722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22726            BOOT_JDK_FOUND=no
22727          else
22728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22730
22731            # Extra M4 quote needed to protect [] in grep expression.
22732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22733            if test "x$FOUND_VERSION_78" = x; then
22734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22738              BOOT_JDK_FOUND=no
22739            else
22740              # We're done! :-)
22741              BOOT_JDK_FOUND=yes
22742
22743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22744
22745  # Input might be given as Windows format, start by converting to
22746  # unix format.
22747  path="$BOOT_JDK"
22748  new_path=`$CYGPATH -u "$path"`
22749
22750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22753  # "foo.exe" is OK but "foo" is an error.
22754  #
22755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22756  # It is also a way to make sure we got the proper file name for the real test later on.
22757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22758  if test "x$test_shortpath" = x; then
22759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22762  fi
22763
22764  # Call helper function which possibly converts this using DOS-style short mode.
22765  # If so, the updated path is stored in $new_path.
22766
22767  input_path="$new_path"
22768  # Check if we need to convert this using DOS-style short mode. If the path
22769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22770  # take no chances and rewrite it.
22771  # Note: m4 eats our [], so we need to use [ and ] instead.
22772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22773  if test "x$has_forbidden_chars" != x; then
22774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22778      # Going to short mode and back again did indeed matter. Since short mode is
22779      # case insensitive, let's make it lowercase to improve readability.
22780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22781      # Now convert it back to Unix-style (cygpath)
22782      input_path=`$CYGPATH -u "$shortmode_path"`
22783      new_path="$input_path"
22784    fi
22785  fi
22786
22787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22788  if test "x$test_cygdrive_prefix" = x; then
22789    # As a simple fix, exclude /usr/bin since it's not a real path.
22790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22792      # a path prefixed by /cygdrive for fixpath to work.
22793      new_path="$CYGWIN_ROOT_PATH$input_path"
22794    fi
22795  fi
22796
22797
22798  if test "x$path" != "x$new_path"; then
22799    BOOT_JDK="$new_path"
22800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22802  fi
22803
22804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22805
22806  path="$BOOT_JDK"
22807  has_colon=`$ECHO $path | $GREP ^.:`
22808  new_path="$path"
22809  if test "x$has_colon" = x; then
22810    # Not in mixed or Windows style, start by that.
22811    new_path=`cmd //c echo $path`
22812  fi
22813
22814
22815  input_path="$new_path"
22816  # Check if we need to convert this using DOS-style short mode. If the path
22817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22818  # take no chances and rewrite it.
22819  # Note: m4 eats our [], so we need to use [ and ] instead.
22820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22821  if test "x$has_forbidden_chars" != x; then
22822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22824  fi
22825
22826
22827  windows_path="$new_path"
22828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22829    unix_path=`$CYGPATH -u "$windows_path"`
22830    new_path="$unix_path"
22831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22833    new_path="$unix_path"
22834  fi
22835
22836  if test "x$path" != "x$new_path"; then
22837    BOOT_JDK="$new_path"
22838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22840  fi
22841
22842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22844
22845  else
22846    # We're on a posix platform. Hooray! :)
22847    path="$BOOT_JDK"
22848    has_space=`$ECHO "$path" | $GREP " "`
22849    if test "x$has_space" != x; then
22850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22853    fi
22854
22855    # Use eval to expand a potential ~
22856    eval path="$path"
22857    if test ! -f "$path" && test ! -d "$path"; then
22858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22859    fi
22860
22861    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22862  fi
22863
22864              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22865$as_echo_n "checking for Boot JDK... " >&6; }
22866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22867$as_echo "$BOOT_JDK" >&6; }
22868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22869$as_echo_n "checking Boot JDK version... " >&6; }
22870              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22872$as_echo "$BOOT_JDK_VERSION" >&6; }
22873            fi # end check jdk version
22874          fi # end check rt.jar
22875        fi # end check javac
22876      fi # end check java
22877    fi # end check boot jdk found
22878  fi
22879
22880    done
22881  fi
22882
22883  fi
22884
22885
22886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22888      # Do we have a bin/java?
22889      if test ! -x "$BOOT_JDK/bin/java"; then
22890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22892        BOOT_JDK_FOUND=no
22893      else
22894        # Do we have a bin/javac?
22895        if test ! -x "$BOOT_JDK/bin/javac"; then
22896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22900          BOOT_JDK_FOUND=no
22901        else
22902          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22903          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22904            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22906            BOOT_JDK_FOUND=no
22907          else
22908            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22910
22911            # Extra M4 quote needed to protect [] in grep expression.
22912            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22913            if test "x$FOUND_VERSION_78" = x; then
22914              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22916              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22917$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22918              BOOT_JDK_FOUND=no
22919            else
22920              # We're done! :-)
22921              BOOT_JDK_FOUND=yes
22922
22923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22924
22925  # Input might be given as Windows format, start by converting to
22926  # unix format.
22927  path="$BOOT_JDK"
22928  new_path=`$CYGPATH -u "$path"`
22929
22930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22933  # "foo.exe" is OK but "foo" is an error.
22934  #
22935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22936  # It is also a way to make sure we got the proper file name for the real test later on.
22937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22938  if test "x$test_shortpath" = x; then
22939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22941    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22942  fi
22943
22944  # Call helper function which possibly converts this using DOS-style short mode.
22945  # If so, the updated path is stored in $new_path.
22946
22947  input_path="$new_path"
22948  # Check if we need to convert this using DOS-style short mode. If the path
22949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22950  # take no chances and rewrite it.
22951  # Note: m4 eats our [], so we need to use [ and ] instead.
22952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22953  if test "x$has_forbidden_chars" != x; then
22954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22958      # Going to short mode and back again did indeed matter. Since short mode is
22959      # case insensitive, let's make it lowercase to improve readability.
22960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22961      # Now convert it back to Unix-style (cygpath)
22962      input_path=`$CYGPATH -u "$shortmode_path"`
22963      new_path="$input_path"
22964    fi
22965  fi
22966
22967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22968  if test "x$test_cygdrive_prefix" = x; then
22969    # As a simple fix, exclude /usr/bin since it's not a real path.
22970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22972      # a path prefixed by /cygdrive for fixpath to work.
22973      new_path="$CYGWIN_ROOT_PATH$input_path"
22974    fi
22975  fi
22976
22977
22978  if test "x$path" != "x$new_path"; then
22979    BOOT_JDK="$new_path"
22980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22982  fi
22983
22984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22985
22986  path="$BOOT_JDK"
22987  has_colon=`$ECHO $path | $GREP ^.:`
22988  new_path="$path"
22989  if test "x$has_colon" = x; then
22990    # Not in mixed or Windows style, start by that.
22991    new_path=`cmd //c echo $path`
22992  fi
22993
22994
22995  input_path="$new_path"
22996  # Check if we need to convert this using DOS-style short mode. If the path
22997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22998  # take no chances and rewrite it.
22999  # Note: m4 eats our [], so we need to use [ and ] instead.
23000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23001  if test "x$has_forbidden_chars" != x; then
23002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23004  fi
23005
23006
23007  windows_path="$new_path"
23008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009    unix_path=`$CYGPATH -u "$windows_path"`
23010    new_path="$unix_path"
23011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23013    new_path="$unix_path"
23014  fi
23015
23016  if test "x$path" != "x$new_path"; then
23017    BOOT_JDK="$new_path"
23018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23020  fi
23021
23022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23024
23025  else
23026    # We're on a posix platform. Hooray! :)
23027    path="$BOOT_JDK"
23028    has_space=`$ECHO "$path" | $GREP " "`
23029    if test "x$has_space" != x; then
23030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23033    fi
23034
23035    # Use eval to expand a potential ~
23036    eval path="$path"
23037    if test ! -f "$path" && test ! -d "$path"; then
23038      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23039    fi
23040
23041    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23042  fi
23043
23044              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23045$as_echo_n "checking for Boot JDK... " >&6; }
23046              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23047$as_echo "$BOOT_JDK" >&6; }
23048              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23049$as_echo_n "checking Boot JDK version... " >&6; }
23050              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23051              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23052$as_echo "$BOOT_JDK_VERSION" >&6; }
23053            fi # end check jdk version
23054          fi # end check rt.jar
23055        fi # end check javac
23056      fi # end check java
23057    fi # end check boot jdk found
23058  fi
23059
23060
23061  if test "x$BOOT_JDK_FOUND" = xno; then
23062    # Now execute the test
23063
23064  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23065  BOOT_JDK_SUFFIX=""
23066  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23067  if test "x$ALL_JDKS_FOUND" != x; then
23068    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23069
23070  if test "x$BOOT_JDK_FOUND" = xno; then
23071    # Now execute the test
23072
23073        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23074        if test -d "$BOOT_JDK"; then
23075          BOOT_JDK_FOUND=maybe
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23077$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23078        fi
23079
23080
23081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23083      # Do we have a bin/java?
23084      if test ! -x "$BOOT_JDK/bin/java"; then
23085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23087        BOOT_JDK_FOUND=no
23088      else
23089        # Do we have a bin/javac?
23090        if test ! -x "$BOOT_JDK/bin/javac"; then
23091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23095          BOOT_JDK_FOUND=no
23096        else
23097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23101            BOOT_JDK_FOUND=no
23102          else
23103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23105
23106            # Extra M4 quote needed to protect [] in grep expression.
23107            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23108            if test "x$FOUND_VERSION_78" = x; then
23109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23112$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23113              BOOT_JDK_FOUND=no
23114            else
23115              # We're done! :-)
23116              BOOT_JDK_FOUND=yes
23117
23118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23119
23120  # Input might be given as Windows format, start by converting to
23121  # unix format.
23122  path="$BOOT_JDK"
23123  new_path=`$CYGPATH -u "$path"`
23124
23125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23128  # "foo.exe" is OK but "foo" is an error.
23129  #
23130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23131  # It is also a way to make sure we got the proper file name for the real test later on.
23132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23133  if test "x$test_shortpath" = x; then
23134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23137  fi
23138
23139  # Call helper function which possibly converts this using DOS-style short mode.
23140  # If so, the updated path is stored in $new_path.
23141
23142  input_path="$new_path"
23143  # Check if we need to convert this using DOS-style short mode. If the path
23144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23145  # take no chances and rewrite it.
23146  # Note: m4 eats our [], so we need to use [ and ] instead.
23147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23148  if test "x$has_forbidden_chars" != x; then
23149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23153      # Going to short mode and back again did indeed matter. Since short mode is
23154      # case insensitive, let's make it lowercase to improve readability.
23155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23156      # Now convert it back to Unix-style (cygpath)
23157      input_path=`$CYGPATH -u "$shortmode_path"`
23158      new_path="$input_path"
23159    fi
23160  fi
23161
23162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23163  if test "x$test_cygdrive_prefix" = x; then
23164    # As a simple fix, exclude /usr/bin since it's not a real path.
23165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23167      # a path prefixed by /cygdrive for fixpath to work.
23168      new_path="$CYGWIN_ROOT_PATH$input_path"
23169    fi
23170  fi
23171
23172
23173  if test "x$path" != "x$new_path"; then
23174    BOOT_JDK="$new_path"
23175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23177  fi
23178
23179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23180
23181  path="$BOOT_JDK"
23182  has_colon=`$ECHO $path | $GREP ^.:`
23183  new_path="$path"
23184  if test "x$has_colon" = x; then
23185    # Not in mixed or Windows style, start by that.
23186    new_path=`cmd //c echo $path`
23187  fi
23188
23189
23190  input_path="$new_path"
23191  # Check if we need to convert this using DOS-style short mode. If the path
23192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23193  # take no chances and rewrite it.
23194  # Note: m4 eats our [], so we need to use [ and ] instead.
23195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23196  if test "x$has_forbidden_chars" != x; then
23197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23199  fi
23200
23201
23202  windows_path="$new_path"
23203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23204    unix_path=`$CYGPATH -u "$windows_path"`
23205    new_path="$unix_path"
23206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23208    new_path="$unix_path"
23209  fi
23210
23211  if test "x$path" != "x$new_path"; then
23212    BOOT_JDK="$new_path"
23213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23215  fi
23216
23217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23219
23220  else
23221    # We're on a posix platform. Hooray! :)
23222    path="$BOOT_JDK"
23223    has_space=`$ECHO "$path" | $GREP " "`
23224    if test "x$has_space" != x; then
23225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23228    fi
23229
23230    # Use eval to expand a potential ~
23231    eval path="$path"
23232    if test ! -f "$path" && test ! -d "$path"; then
23233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23234    fi
23235
23236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23237  fi
23238
23239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23240$as_echo_n "checking for Boot JDK... " >&6; }
23241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23242$as_echo "$BOOT_JDK" >&6; }
23243              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23244$as_echo_n "checking Boot JDK version... " >&6; }
23245              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23247$as_echo "$BOOT_JDK_VERSION" >&6; }
23248            fi # end check jdk version
23249          fi # end check rt.jar
23250        fi # end check javac
23251      fi # end check java
23252    fi # end check boot jdk found
23253  fi
23254
23255    done
23256  fi
23257
23258
23259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23261      # Do we have a bin/java?
23262      if test ! -x "$BOOT_JDK/bin/java"; then
23263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23265        BOOT_JDK_FOUND=no
23266      else
23267        # Do we have a bin/javac?
23268        if test ! -x "$BOOT_JDK/bin/javac"; then
23269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23273          BOOT_JDK_FOUND=no
23274        else
23275          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23276          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23279            BOOT_JDK_FOUND=no
23280          else
23281            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23283
23284            # Extra M4 quote needed to protect [] in grep expression.
23285            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23286            if test "x$FOUND_VERSION_78" = x; then
23287              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23289              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23290$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23291              BOOT_JDK_FOUND=no
23292            else
23293              # We're done! :-)
23294              BOOT_JDK_FOUND=yes
23295
23296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297
23298  # Input might be given as Windows format, start by converting to
23299  # unix format.
23300  path="$BOOT_JDK"
23301  new_path=`$CYGPATH -u "$path"`
23302
23303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23306  # "foo.exe" is OK but "foo" is an error.
23307  #
23308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23309  # It is also a way to make sure we got the proper file name for the real test later on.
23310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23311  if test "x$test_shortpath" = x; then
23312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23314    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23315  fi
23316
23317  # Call helper function which possibly converts this using DOS-style short mode.
23318  # If so, the updated path is stored in $new_path.
23319
23320  input_path="$new_path"
23321  # Check if we need to convert this using DOS-style short mode. If the path
23322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23323  # take no chances and rewrite it.
23324  # Note: m4 eats our [], so we need to use [ and ] instead.
23325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23326  if test "x$has_forbidden_chars" != x; then
23327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23331      # Going to short mode and back again did indeed matter. Since short mode is
23332      # case insensitive, let's make it lowercase to improve readability.
23333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23334      # Now convert it back to Unix-style (cygpath)
23335      input_path=`$CYGPATH -u "$shortmode_path"`
23336      new_path="$input_path"
23337    fi
23338  fi
23339
23340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23341  if test "x$test_cygdrive_prefix" = x; then
23342    # As a simple fix, exclude /usr/bin since it's not a real path.
23343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23345      # a path prefixed by /cygdrive for fixpath to work.
23346      new_path="$CYGWIN_ROOT_PATH$input_path"
23347    fi
23348  fi
23349
23350
23351  if test "x$path" != "x$new_path"; then
23352    BOOT_JDK="$new_path"
23353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23355  fi
23356
23357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23358
23359  path="$BOOT_JDK"
23360  has_colon=`$ECHO $path | $GREP ^.:`
23361  new_path="$path"
23362  if test "x$has_colon" = x; then
23363    # Not in mixed or Windows style, start by that.
23364    new_path=`cmd //c echo $path`
23365  fi
23366
23367
23368  input_path="$new_path"
23369  # Check if we need to convert this using DOS-style short mode. If the path
23370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23371  # take no chances and rewrite it.
23372  # Note: m4 eats our [], so we need to use [ and ] instead.
23373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23374  if test "x$has_forbidden_chars" != x; then
23375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23377  fi
23378
23379
23380  windows_path="$new_path"
23381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23382    unix_path=`$CYGPATH -u "$windows_path"`
23383    new_path="$unix_path"
23384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23386    new_path="$unix_path"
23387  fi
23388
23389  if test "x$path" != "x$new_path"; then
23390    BOOT_JDK="$new_path"
23391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23393  fi
23394
23395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23397
23398  else
23399    # We're on a posix platform. Hooray! :)
23400    path="$BOOT_JDK"
23401    has_space=`$ECHO "$path" | $GREP " "`
23402    if test "x$has_space" != x; then
23403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23406    fi
23407
23408    # Use eval to expand a potential ~
23409    eval path="$path"
23410    if test ! -f "$path" && test ! -d "$path"; then
23411      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23412    fi
23413
23414    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23415  fi
23416
23417              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23418$as_echo_n "checking for Boot JDK... " >&6; }
23419              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23420$as_echo "$BOOT_JDK" >&6; }
23421              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23422$as_echo_n "checking Boot JDK version... " >&6; }
23423              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23424              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23425$as_echo "$BOOT_JDK_VERSION" >&6; }
23426            fi # end check jdk version
23427          fi # end check rt.jar
23428        fi # end check javac
23429      fi # end check java
23430    fi # end check boot jdk found
23431  fi
23432
23433  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23434
23435  if test "x$BOOT_JDK_FOUND" = xno; then
23436    # Now execute the test
23437
23438  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23439  BOOT_JDK_SUFFIX="/Contents/Home"
23440  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23441  if test "x$ALL_JDKS_FOUND" != x; then
23442    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23443
23444  if test "x$BOOT_JDK_FOUND" = xno; then
23445    # Now execute the test
23446
23447        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23448        if test -d "$BOOT_JDK"; then
23449          BOOT_JDK_FOUND=maybe
23450          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23451$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23452        fi
23453
23454
23455    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23456    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23457      # Do we have a bin/java?
23458      if test ! -x "$BOOT_JDK/bin/java"; then
23459        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23461        BOOT_JDK_FOUND=no
23462      else
23463        # Do we have a bin/javac?
23464        if test ! -x "$BOOT_JDK/bin/javac"; then
23465          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23467          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23468$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23469          BOOT_JDK_FOUND=no
23470        else
23471          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23472          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23473            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23475            BOOT_JDK_FOUND=no
23476          else
23477            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23478            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23479
23480            # Extra M4 quote needed to protect [] in grep expression.
23481            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23482            if test "x$FOUND_VERSION_78" = x; then
23483              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23485              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23486$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23487              BOOT_JDK_FOUND=no
23488            else
23489              # We're done! :-)
23490              BOOT_JDK_FOUND=yes
23491
23492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493
23494  # Input might be given as Windows format, start by converting to
23495  # unix format.
23496  path="$BOOT_JDK"
23497  new_path=`$CYGPATH -u "$path"`
23498
23499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23502  # "foo.exe" is OK but "foo" is an error.
23503  #
23504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23505  # It is also a way to make sure we got the proper file name for the real test later on.
23506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23507  if test "x$test_shortpath" = x; then
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23510    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23511  fi
23512
23513  # Call helper function which possibly converts this using DOS-style short mode.
23514  # If so, the updated path is stored in $new_path.
23515
23516  input_path="$new_path"
23517  # Check if we need to convert this using DOS-style short mode. If the path
23518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23519  # take no chances and rewrite it.
23520  # Note: m4 eats our [], so we need to use [ and ] instead.
23521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23522  if test "x$has_forbidden_chars" != x; then
23523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23527      # Going to short mode and back again did indeed matter. Since short mode is
23528      # case insensitive, let's make it lowercase to improve readability.
23529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23530      # Now convert it back to Unix-style (cygpath)
23531      input_path=`$CYGPATH -u "$shortmode_path"`
23532      new_path="$input_path"
23533    fi
23534  fi
23535
23536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23537  if test "x$test_cygdrive_prefix" = x; then
23538    # As a simple fix, exclude /usr/bin since it's not a real path.
23539    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23541      # a path prefixed by /cygdrive for fixpath to work.
23542      new_path="$CYGWIN_ROOT_PATH$input_path"
23543    fi
23544  fi
23545
23546
23547  if test "x$path" != "x$new_path"; then
23548    BOOT_JDK="$new_path"
23549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23551  fi
23552
23553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23554
23555  path="$BOOT_JDK"
23556  has_colon=`$ECHO $path | $GREP ^.:`
23557  new_path="$path"
23558  if test "x$has_colon" = x; then
23559    # Not in mixed or Windows style, start by that.
23560    new_path=`cmd //c echo $path`
23561  fi
23562
23563
23564  input_path="$new_path"
23565  # Check if we need to convert this using DOS-style short mode. If the path
23566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23567  # take no chances and rewrite it.
23568  # Note: m4 eats our [], so we need to use [ and ] instead.
23569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23570  if test "x$has_forbidden_chars" != x; then
23571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23573  fi
23574
23575
23576  windows_path="$new_path"
23577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578    unix_path=`$CYGPATH -u "$windows_path"`
23579    new_path="$unix_path"
23580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23582    new_path="$unix_path"
23583  fi
23584
23585  if test "x$path" != "x$new_path"; then
23586    BOOT_JDK="$new_path"
23587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23589  fi
23590
23591  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23592  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23593
23594  else
23595    # We're on a posix platform. Hooray! :)
23596    path="$BOOT_JDK"
23597    has_space=`$ECHO "$path" | $GREP " "`
23598    if test "x$has_space" != x; then
23599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23601      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23602    fi
23603
23604    # Use eval to expand a potential ~
23605    eval path="$path"
23606    if test ! -f "$path" && test ! -d "$path"; then
23607      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23608    fi
23609
23610    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23611  fi
23612
23613              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23614$as_echo_n "checking for Boot JDK... " >&6; }
23615              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23616$as_echo "$BOOT_JDK" >&6; }
23617              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23618$as_echo_n "checking Boot JDK version... " >&6; }
23619              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23620              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23621$as_echo "$BOOT_JDK_VERSION" >&6; }
23622            fi # end check jdk version
23623          fi # end check rt.jar
23624        fi # end check javac
23625      fi # end check java
23626    fi # end check boot jdk found
23627  fi
23628
23629    done
23630  fi
23631
23632
23633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23635      # Do we have a bin/java?
23636      if test ! -x "$BOOT_JDK/bin/java"; then
23637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23639        BOOT_JDK_FOUND=no
23640      else
23641        # Do we have a bin/javac?
23642        if test ! -x "$BOOT_JDK/bin/javac"; then
23643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23647          BOOT_JDK_FOUND=no
23648        else
23649          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23650          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23653            BOOT_JDK_FOUND=no
23654          else
23655            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23657
23658            # Extra M4 quote needed to protect [] in grep expression.
23659            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23660            if test "x$FOUND_VERSION_78" = x; then
23661              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23663              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23664$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23665              BOOT_JDK_FOUND=no
23666            else
23667              # We're done! :-)
23668              BOOT_JDK_FOUND=yes
23669
23670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23671
23672  # Input might be given as Windows format, start by converting to
23673  # unix format.
23674  path="$BOOT_JDK"
23675  new_path=`$CYGPATH -u "$path"`
23676
23677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23680  # "foo.exe" is OK but "foo" is an error.
23681  #
23682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23683  # It is also a way to make sure we got the proper file name for the real test later on.
23684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23685  if test "x$test_shortpath" = x; then
23686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23689  fi
23690
23691  # Call helper function which possibly converts this using DOS-style short mode.
23692  # If so, the updated path is stored in $new_path.
23693
23694  input_path="$new_path"
23695  # Check if we need to convert this using DOS-style short mode. If the path
23696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23697  # take no chances and rewrite it.
23698  # Note: m4 eats our [], so we need to use [ and ] instead.
23699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23700  if test "x$has_forbidden_chars" != x; then
23701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23705      # Going to short mode and back again did indeed matter. Since short mode is
23706      # case insensitive, let's make it lowercase to improve readability.
23707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23708      # Now convert it back to Unix-style (cygpath)
23709      input_path=`$CYGPATH -u "$shortmode_path"`
23710      new_path="$input_path"
23711    fi
23712  fi
23713
23714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23715  if test "x$test_cygdrive_prefix" = x; then
23716    # As a simple fix, exclude /usr/bin since it's not a real path.
23717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23719      # a path prefixed by /cygdrive for fixpath to work.
23720      new_path="$CYGWIN_ROOT_PATH$input_path"
23721    fi
23722  fi
23723
23724
23725  if test "x$path" != "x$new_path"; then
23726    BOOT_JDK="$new_path"
23727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23729  fi
23730
23731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23732
23733  path="$BOOT_JDK"
23734  has_colon=`$ECHO $path | $GREP ^.:`
23735  new_path="$path"
23736  if test "x$has_colon" = x; then
23737    # Not in mixed or Windows style, start by that.
23738    new_path=`cmd //c echo $path`
23739  fi
23740
23741
23742  input_path="$new_path"
23743  # Check if we need to convert this using DOS-style short mode. If the path
23744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23745  # take no chances and rewrite it.
23746  # Note: m4 eats our [], so we need to use [ and ] instead.
23747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23748  if test "x$has_forbidden_chars" != x; then
23749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23751  fi
23752
23753
23754  windows_path="$new_path"
23755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23756    unix_path=`$CYGPATH -u "$windows_path"`
23757    new_path="$unix_path"
23758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23760    new_path="$unix_path"
23761  fi
23762
23763  if test "x$path" != "x$new_path"; then
23764    BOOT_JDK="$new_path"
23765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23767  fi
23768
23769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23771
23772  else
23773    # We're on a posix platform. Hooray! :)
23774    path="$BOOT_JDK"
23775    has_space=`$ECHO "$path" | $GREP " "`
23776    if test "x$has_space" != x; then
23777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23780    fi
23781
23782    # Use eval to expand a potential ~
23783    eval path="$path"
23784    if test ! -f "$path" && test ! -d "$path"; then
23785      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23786    fi
23787
23788    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23789  fi
23790
23791              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23792$as_echo_n "checking for Boot JDK... " >&6; }
23793              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23794$as_echo "$BOOT_JDK" >&6; }
23795              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23796$as_echo_n "checking Boot JDK version... " >&6; }
23797              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23798              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23799$as_echo "$BOOT_JDK_VERSION" >&6; }
23800            fi # end check jdk version
23801          fi # end check rt.jar
23802        fi # end check javac
23803      fi # end check java
23804    fi # end check boot jdk found
23805  fi
23806
23807
23808  if test "x$BOOT_JDK_FOUND" = xno; then
23809    # Now execute the test
23810
23811  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23812  BOOT_JDK_SUFFIX="/Contents/Home"
23813  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23814  if test "x$ALL_JDKS_FOUND" != x; then
23815    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23816
23817  if test "x$BOOT_JDK_FOUND" = xno; then
23818    # Now execute the test
23819
23820        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23821        if test -d "$BOOT_JDK"; then
23822          BOOT_JDK_FOUND=maybe
23823          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23824$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23825        fi
23826
23827
23828    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23829    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23830      # Do we have a bin/java?
23831      if test ! -x "$BOOT_JDK/bin/java"; then
23832        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23834        BOOT_JDK_FOUND=no
23835      else
23836        # Do we have a bin/javac?
23837        if test ! -x "$BOOT_JDK/bin/javac"; then
23838          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23840          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23841$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23842          BOOT_JDK_FOUND=no
23843        else
23844          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23845          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23846            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23848            BOOT_JDK_FOUND=no
23849          else
23850            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23851            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23852
23853            # Extra M4 quote needed to protect [] in grep expression.
23854            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23855            if test "x$FOUND_VERSION_78" = x; then
23856              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23858              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23859$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23860              BOOT_JDK_FOUND=no
23861            else
23862              # We're done! :-)
23863              BOOT_JDK_FOUND=yes
23864
23865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23866
23867  # Input might be given as Windows format, start by converting to
23868  # unix format.
23869  path="$BOOT_JDK"
23870  new_path=`$CYGPATH -u "$path"`
23871
23872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23875  # "foo.exe" is OK but "foo" is an error.
23876  #
23877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23878  # It is also a way to make sure we got the proper file name for the real test later on.
23879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23880  if test "x$test_shortpath" = x; then
23881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23883    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23884  fi
23885
23886  # Call helper function which possibly converts this using DOS-style short mode.
23887  # If so, the updated path is stored in $new_path.
23888
23889  input_path="$new_path"
23890  # Check if we need to convert this using DOS-style short mode. If the path
23891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23892  # take no chances and rewrite it.
23893  # Note: m4 eats our [], so we need to use [ and ] instead.
23894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23895  if test "x$has_forbidden_chars" != x; then
23896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23900      # Going to short mode and back again did indeed matter. Since short mode is
23901      # case insensitive, let's make it lowercase to improve readability.
23902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23903      # Now convert it back to Unix-style (cygpath)
23904      input_path=`$CYGPATH -u "$shortmode_path"`
23905      new_path="$input_path"
23906    fi
23907  fi
23908
23909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23910  if test "x$test_cygdrive_prefix" = x; then
23911    # As a simple fix, exclude /usr/bin since it's not a real path.
23912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23914      # a path prefixed by /cygdrive for fixpath to work.
23915      new_path="$CYGWIN_ROOT_PATH$input_path"
23916    fi
23917  fi
23918
23919
23920  if test "x$path" != "x$new_path"; then
23921    BOOT_JDK="$new_path"
23922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23924  fi
23925
23926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23927
23928  path="$BOOT_JDK"
23929  has_colon=`$ECHO $path | $GREP ^.:`
23930  new_path="$path"
23931  if test "x$has_colon" = x; then
23932    # Not in mixed or Windows style, start by that.
23933    new_path=`cmd //c echo $path`
23934  fi
23935
23936
23937  input_path="$new_path"
23938  # Check if we need to convert this using DOS-style short mode. If the path
23939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23940  # take no chances and rewrite it.
23941  # Note: m4 eats our [], so we need to use [ and ] instead.
23942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23943  if test "x$has_forbidden_chars" != x; then
23944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23946  fi
23947
23948
23949  windows_path="$new_path"
23950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23951    unix_path=`$CYGPATH -u "$windows_path"`
23952    new_path="$unix_path"
23953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23955    new_path="$unix_path"
23956  fi
23957
23958  if test "x$path" != "x$new_path"; then
23959    BOOT_JDK="$new_path"
23960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23962  fi
23963
23964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23966
23967  else
23968    # We're on a posix platform. Hooray! :)
23969    path="$BOOT_JDK"
23970    has_space=`$ECHO "$path" | $GREP " "`
23971    if test "x$has_space" != x; then
23972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23974      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23975    fi
23976
23977    # Use eval to expand a potential ~
23978    eval path="$path"
23979    if test ! -f "$path" && test ! -d "$path"; then
23980      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23981    fi
23982
23983    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23984  fi
23985
23986              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23987$as_echo_n "checking for Boot JDK... " >&6; }
23988              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23989$as_echo "$BOOT_JDK" >&6; }
23990              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23991$as_echo_n "checking Boot JDK version... " >&6; }
23992              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23993              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23994$as_echo "$BOOT_JDK_VERSION" >&6; }
23995            fi # end check jdk version
23996          fi # end check rt.jar
23997        fi # end check javac
23998      fi # end check java
23999    fi # end check boot jdk found
24000  fi
24001
24002    done
24003  fi
24004
24005
24006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24008      # Do we have a bin/java?
24009      if test ! -x "$BOOT_JDK/bin/java"; then
24010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24012        BOOT_JDK_FOUND=no
24013      else
24014        # Do we have a bin/javac?
24015        if test ! -x "$BOOT_JDK/bin/javac"; then
24016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24020          BOOT_JDK_FOUND=no
24021        else
24022          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24023          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24026            BOOT_JDK_FOUND=no
24027          else
24028            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24030
24031            # Extra M4 quote needed to protect [] in grep expression.
24032            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24033            if test "x$FOUND_VERSION_78" = x; then
24034              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24036              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24037$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24038              BOOT_JDK_FOUND=no
24039            else
24040              # We're done! :-)
24041              BOOT_JDK_FOUND=yes
24042
24043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24044
24045  # Input might be given as Windows format, start by converting to
24046  # unix format.
24047  path="$BOOT_JDK"
24048  new_path=`$CYGPATH -u "$path"`
24049
24050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24053  # "foo.exe" is OK but "foo" is an error.
24054  #
24055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24056  # It is also a way to make sure we got the proper file name for the real test later on.
24057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24058  if test "x$test_shortpath" = x; then
24059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24062  fi
24063
24064  # Call helper function which possibly converts this using DOS-style short mode.
24065  # If so, the updated path is stored in $new_path.
24066
24067  input_path="$new_path"
24068  # Check if we need to convert this using DOS-style short mode. If the path
24069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24070  # take no chances and rewrite it.
24071  # Note: m4 eats our [], so we need to use [ and ] instead.
24072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24073  if test "x$has_forbidden_chars" != x; then
24074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24078      # Going to short mode and back again did indeed matter. Since short mode is
24079      # case insensitive, let's make it lowercase to improve readability.
24080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24081      # Now convert it back to Unix-style (cygpath)
24082      input_path=`$CYGPATH -u "$shortmode_path"`
24083      new_path="$input_path"
24084    fi
24085  fi
24086
24087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24088  if test "x$test_cygdrive_prefix" = x; then
24089    # As a simple fix, exclude /usr/bin since it's not a real path.
24090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24092      # a path prefixed by /cygdrive for fixpath to work.
24093      new_path="$CYGWIN_ROOT_PATH$input_path"
24094    fi
24095  fi
24096
24097
24098  if test "x$path" != "x$new_path"; then
24099    BOOT_JDK="$new_path"
24100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24102  fi
24103
24104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24105
24106  path="$BOOT_JDK"
24107  has_colon=`$ECHO $path | $GREP ^.:`
24108  new_path="$path"
24109  if test "x$has_colon" = x; then
24110    # Not in mixed or Windows style, start by that.
24111    new_path=`cmd //c echo $path`
24112  fi
24113
24114
24115  input_path="$new_path"
24116  # Check if we need to convert this using DOS-style short mode. If the path
24117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24118  # take no chances and rewrite it.
24119  # Note: m4 eats our [], so we need to use [ and ] instead.
24120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24121  if test "x$has_forbidden_chars" != x; then
24122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24124  fi
24125
24126
24127  windows_path="$new_path"
24128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24129    unix_path=`$CYGPATH -u "$windows_path"`
24130    new_path="$unix_path"
24131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24133    new_path="$unix_path"
24134  fi
24135
24136  if test "x$path" != "x$new_path"; then
24137    BOOT_JDK="$new_path"
24138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24140  fi
24141
24142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24144
24145  else
24146    # We're on a posix platform. Hooray! :)
24147    path="$BOOT_JDK"
24148    has_space=`$ECHO "$path" | $GREP " "`
24149    if test "x$has_space" != x; then
24150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24153    fi
24154
24155    # Use eval to expand a potential ~
24156    eval path="$path"
24157    if test ! -f "$path" && test ! -d "$path"; then
24158      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24159    fi
24160
24161    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24162  fi
24163
24164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24165$as_echo_n "checking for Boot JDK... " >&6; }
24166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24167$as_echo "$BOOT_JDK" >&6; }
24168              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24169$as_echo_n "checking Boot JDK version... " >&6; }
24170              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24172$as_echo "$BOOT_JDK_VERSION" >&6; }
24173            fi # end check jdk version
24174          fi # end check rt.jar
24175        fi # end check javac
24176      fi # end check java
24177    fi # end check boot jdk found
24178  fi
24179
24180  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24181
24182  if test "x$BOOT_JDK_FOUND" = xno; then
24183    # Now execute the test
24184
24185  BOOT_JDK_PREFIX="/usr/lib/jvm"
24186  BOOT_JDK_SUFFIX=""
24187  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24188  if test "x$ALL_JDKS_FOUND" != x; then
24189    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24190
24191  if test "x$BOOT_JDK_FOUND" = xno; then
24192    # Now execute the test
24193
24194        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24195        if test -d "$BOOT_JDK"; then
24196          BOOT_JDK_FOUND=maybe
24197          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24198$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24199        fi
24200
24201
24202    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24203    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24204      # Do we have a bin/java?
24205      if test ! -x "$BOOT_JDK/bin/java"; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24208        BOOT_JDK_FOUND=no
24209      else
24210        # Do we have a bin/javac?
24211        if test ! -x "$BOOT_JDK/bin/javac"; then
24212          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24214          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24215$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24216          BOOT_JDK_FOUND=no
24217        else
24218          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24219          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24220            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24222            BOOT_JDK_FOUND=no
24223          else
24224            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24226
24227            # Extra M4 quote needed to protect [] in grep expression.
24228            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24229            if test "x$FOUND_VERSION_78" = x; then
24230              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24232              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24233$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24234              BOOT_JDK_FOUND=no
24235            else
24236              # We're done! :-)
24237              BOOT_JDK_FOUND=yes
24238
24239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24240
24241  # Input might be given as Windows format, start by converting to
24242  # unix format.
24243  path="$BOOT_JDK"
24244  new_path=`$CYGPATH -u "$path"`
24245
24246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24249  # "foo.exe" is OK but "foo" is an error.
24250  #
24251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24252  # It is also a way to make sure we got the proper file name for the real test later on.
24253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24254  if test "x$test_shortpath" = x; then
24255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24257    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24258  fi
24259
24260  # Call helper function which possibly converts this using DOS-style short mode.
24261  # If so, the updated path is stored in $new_path.
24262
24263  input_path="$new_path"
24264  # Check if we need to convert this using DOS-style short mode. If the path
24265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24266  # take no chances and rewrite it.
24267  # Note: m4 eats our [], so we need to use [ and ] instead.
24268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24269  if test "x$has_forbidden_chars" != x; then
24270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24274      # Going to short mode and back again did indeed matter. Since short mode is
24275      # case insensitive, let's make it lowercase to improve readability.
24276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24277      # Now convert it back to Unix-style (cygpath)
24278      input_path=`$CYGPATH -u "$shortmode_path"`
24279      new_path="$input_path"
24280    fi
24281  fi
24282
24283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24284  if test "x$test_cygdrive_prefix" = x; then
24285    # As a simple fix, exclude /usr/bin since it's not a real path.
24286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24288      # a path prefixed by /cygdrive for fixpath to work.
24289      new_path="$CYGWIN_ROOT_PATH$input_path"
24290    fi
24291  fi
24292
24293
24294  if test "x$path" != "x$new_path"; then
24295    BOOT_JDK="$new_path"
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24298  fi
24299
24300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24301
24302  path="$BOOT_JDK"
24303  has_colon=`$ECHO $path | $GREP ^.:`
24304  new_path="$path"
24305  if test "x$has_colon" = x; then
24306    # Not in mixed or Windows style, start by that.
24307    new_path=`cmd //c echo $path`
24308  fi
24309
24310
24311  input_path="$new_path"
24312  # Check if we need to convert this using DOS-style short mode. If the path
24313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24314  # take no chances and rewrite it.
24315  # Note: m4 eats our [], so we need to use [ and ] instead.
24316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24317  if test "x$has_forbidden_chars" != x; then
24318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24320  fi
24321
24322
24323  windows_path="$new_path"
24324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24325    unix_path=`$CYGPATH -u "$windows_path"`
24326    new_path="$unix_path"
24327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24329    new_path="$unix_path"
24330  fi
24331
24332  if test "x$path" != "x$new_path"; then
24333    BOOT_JDK="$new_path"
24334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24336  fi
24337
24338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24340
24341  else
24342    # We're on a posix platform. Hooray! :)
24343    path="$BOOT_JDK"
24344    has_space=`$ECHO "$path" | $GREP " "`
24345    if test "x$has_space" != x; then
24346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24349    fi
24350
24351    # Use eval to expand a potential ~
24352    eval path="$path"
24353    if test ! -f "$path" && test ! -d "$path"; then
24354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24355    fi
24356
24357    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24358  fi
24359
24360              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24361$as_echo_n "checking for Boot JDK... " >&6; }
24362              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24363$as_echo "$BOOT_JDK" >&6; }
24364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24365$as_echo_n "checking Boot JDK version... " >&6; }
24366              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24368$as_echo "$BOOT_JDK_VERSION" >&6; }
24369            fi # end check jdk version
24370          fi # end check rt.jar
24371        fi # end check javac
24372      fi # end check java
24373    fi # end check boot jdk found
24374  fi
24375
24376    done
24377  fi
24378
24379
24380    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24381    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24382      # Do we have a bin/java?
24383      if test ! -x "$BOOT_JDK/bin/java"; then
24384        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24386        BOOT_JDK_FOUND=no
24387      else
24388        # Do we have a bin/javac?
24389        if test ! -x "$BOOT_JDK/bin/javac"; then
24390          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24392          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24393$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24394          BOOT_JDK_FOUND=no
24395        else
24396          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24397          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24400            BOOT_JDK_FOUND=no
24401          else
24402            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24403            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24404
24405            # Extra M4 quote needed to protect [] in grep expression.
24406            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24407            if test "x$FOUND_VERSION_78" = x; then
24408              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24410              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24411$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24412              BOOT_JDK_FOUND=no
24413            else
24414              # We're done! :-)
24415              BOOT_JDK_FOUND=yes
24416
24417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24418
24419  # Input might be given as Windows format, start by converting to
24420  # unix format.
24421  path="$BOOT_JDK"
24422  new_path=`$CYGPATH -u "$path"`
24423
24424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24427  # "foo.exe" is OK but "foo" is an error.
24428  #
24429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24430  # It is also a way to make sure we got the proper file name for the real test later on.
24431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24432  if test "x$test_shortpath" = x; then
24433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24436  fi
24437
24438  # Call helper function which possibly converts this using DOS-style short mode.
24439  # If so, the updated path is stored in $new_path.
24440
24441  input_path="$new_path"
24442  # Check if we need to convert this using DOS-style short mode. If the path
24443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24444  # take no chances and rewrite it.
24445  # Note: m4 eats our [], so we need to use [ and ] instead.
24446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24447  if test "x$has_forbidden_chars" != x; then
24448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24452      # Going to short mode and back again did indeed matter. Since short mode is
24453      # case insensitive, let's make it lowercase to improve readability.
24454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24455      # Now convert it back to Unix-style (cygpath)
24456      input_path=`$CYGPATH -u "$shortmode_path"`
24457      new_path="$input_path"
24458    fi
24459  fi
24460
24461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24462  if test "x$test_cygdrive_prefix" = x; then
24463    # As a simple fix, exclude /usr/bin since it's not a real path.
24464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24466      # a path prefixed by /cygdrive for fixpath to work.
24467      new_path="$CYGWIN_ROOT_PATH$input_path"
24468    fi
24469  fi
24470
24471
24472  if test "x$path" != "x$new_path"; then
24473    BOOT_JDK="$new_path"
24474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24476  fi
24477
24478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24479
24480  path="$BOOT_JDK"
24481  has_colon=`$ECHO $path | $GREP ^.:`
24482  new_path="$path"
24483  if test "x$has_colon" = x; then
24484    # Not in mixed or Windows style, start by that.
24485    new_path=`cmd //c echo $path`
24486  fi
24487
24488
24489  input_path="$new_path"
24490  # Check if we need to convert this using DOS-style short mode. If the path
24491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24492  # take no chances and rewrite it.
24493  # Note: m4 eats our [], so we need to use [ and ] instead.
24494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24495  if test "x$has_forbidden_chars" != x; then
24496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24498  fi
24499
24500
24501  windows_path="$new_path"
24502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24503    unix_path=`$CYGPATH -u "$windows_path"`
24504    new_path="$unix_path"
24505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24507    new_path="$unix_path"
24508  fi
24509
24510  if test "x$path" != "x$new_path"; then
24511    BOOT_JDK="$new_path"
24512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24514  fi
24515
24516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24518
24519  else
24520    # We're on a posix platform. Hooray! :)
24521    path="$BOOT_JDK"
24522    has_space=`$ECHO "$path" | $GREP " "`
24523    if test "x$has_space" != x; then
24524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24526      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24527    fi
24528
24529    # Use eval to expand a potential ~
24530    eval path="$path"
24531    if test ! -f "$path" && test ! -d "$path"; then
24532      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24533    fi
24534
24535    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24536  fi
24537
24538              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24539$as_echo_n "checking for Boot JDK... " >&6; }
24540              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24541$as_echo "$BOOT_JDK" >&6; }
24542              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24543$as_echo_n "checking Boot JDK version... " >&6; }
24544              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24545              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24546$as_echo "$BOOT_JDK_VERSION" >&6; }
24547            fi # end check jdk version
24548          fi # end check rt.jar
24549        fi # end check javac
24550      fi # end check java
24551    fi # end check boot jdk found
24552  fi
24553
24554  fi
24555
24556
24557    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24558    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24559      # Do we have a bin/java?
24560      if test ! -x "$BOOT_JDK/bin/java"; then
24561        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24563        BOOT_JDK_FOUND=no
24564      else
24565        # Do we have a bin/javac?
24566        if test ! -x "$BOOT_JDK/bin/javac"; then
24567          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24569          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24570$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24571          BOOT_JDK_FOUND=no
24572        else
24573          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24574          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24577            BOOT_JDK_FOUND=no
24578          else
24579            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24580            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24581
24582            # Extra M4 quote needed to protect [] in grep expression.
24583            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24584            if test "x$FOUND_VERSION_78" = x; then
24585              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24587              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24588$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24589              BOOT_JDK_FOUND=no
24590            else
24591              # We're done! :-)
24592              BOOT_JDK_FOUND=yes
24593
24594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24595
24596  # Input might be given as Windows format, start by converting to
24597  # unix format.
24598  path="$BOOT_JDK"
24599  new_path=`$CYGPATH -u "$path"`
24600
24601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24604  # "foo.exe" is OK but "foo" is an error.
24605  #
24606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24607  # It is also a way to make sure we got the proper file name for the real test later on.
24608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24609  if test "x$test_shortpath" = x; then
24610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24612    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24613  fi
24614
24615  # Call helper function which possibly converts this using DOS-style short mode.
24616  # If so, the updated path is stored in $new_path.
24617
24618  input_path="$new_path"
24619  # Check if we need to convert this using DOS-style short mode. If the path
24620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24621  # take no chances and rewrite it.
24622  # Note: m4 eats our [], so we need to use [ and ] instead.
24623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24624  if test "x$has_forbidden_chars" != x; then
24625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24629      # Going to short mode and back again did indeed matter. Since short mode is
24630      # case insensitive, let's make it lowercase to improve readability.
24631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24632      # Now convert it back to Unix-style (cygpath)
24633      input_path=`$CYGPATH -u "$shortmode_path"`
24634      new_path="$input_path"
24635    fi
24636  fi
24637
24638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24639  if test "x$test_cygdrive_prefix" = x; then
24640    # As a simple fix, exclude /usr/bin since it's not a real path.
24641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24643      # a path prefixed by /cygdrive for fixpath to work.
24644      new_path="$CYGWIN_ROOT_PATH$input_path"
24645    fi
24646  fi
24647
24648
24649  if test "x$path" != "x$new_path"; then
24650    BOOT_JDK="$new_path"
24651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24653  fi
24654
24655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24656
24657  path="$BOOT_JDK"
24658  has_colon=`$ECHO $path | $GREP ^.:`
24659  new_path="$path"
24660  if test "x$has_colon" = x; then
24661    # Not in mixed or Windows style, start by that.
24662    new_path=`cmd //c echo $path`
24663  fi
24664
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24675  fi
24676
24677
24678  windows_path="$new_path"
24679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24680    unix_path=`$CYGPATH -u "$windows_path"`
24681    new_path="$unix_path"
24682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24684    new_path="$unix_path"
24685  fi
24686
24687  if test "x$path" != "x$new_path"; then
24688    BOOT_JDK="$new_path"
24689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24691  fi
24692
24693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24695
24696  else
24697    # We're on a posix platform. Hooray! :)
24698    path="$BOOT_JDK"
24699    has_space=`$ECHO "$path" | $GREP " "`
24700    if test "x$has_space" != x; then
24701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24703      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24704    fi
24705
24706    # Use eval to expand a potential ~
24707    eval path="$path"
24708    if test ! -f "$path" && test ! -d "$path"; then
24709      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24710    fi
24711
24712    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24713  fi
24714
24715              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24716$as_echo_n "checking for Boot JDK... " >&6; }
24717              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24718$as_echo "$BOOT_JDK" >&6; }
24719              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24720$as_echo_n "checking Boot JDK version... " >&6; }
24721              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24722              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24723$as_echo "$BOOT_JDK_VERSION" >&6; }
24724            fi # end check jdk version
24725          fi # end check rt.jar
24726        fi # end check javac
24727      fi # end check java
24728    fi # end check boot jdk found
24729  fi
24730
24731
24732  # If we haven't found anything yet, we've truly lost. Give up.
24733  if test "x$BOOT_JDK_FOUND" = xno; then
24734
24735  # Print a helpful message on how to acquire the necessary build dependency.
24736  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24737  MISSING_DEPENDENCY=openjdk
24738
24739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740    cygwin_help $MISSING_DEPENDENCY
24741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24742    msys_help $MISSING_DEPENDENCY
24743  else
24744    PKGHANDLER_COMMAND=
24745
24746    case $PKGHANDLER in
24747      apt-get)
24748        apt_help     $MISSING_DEPENDENCY ;;
24749      yum)
24750        yum_help     $MISSING_DEPENDENCY ;;
24751      port)
24752        port_help    $MISSING_DEPENDENCY ;;
24753      pkgutil)
24754        pkgutil_help $MISSING_DEPENDENCY ;;
24755      pkgadd)
24756        pkgadd_help  $MISSING_DEPENDENCY ;;
24757    esac
24758
24759    if test "x$PKGHANDLER_COMMAND" != x; then
24760      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24761    fi
24762  fi
24763
24764    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24765$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24766    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24767$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24768    as_fn_error $? "Cannot continue" "$LINENO" 5
24769  fi
24770
24771  # Setup proper paths for what we found
24772  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24773  if test ! -f "$BOOT_RTJAR"; then
24774    # On MacOSX it is called classes.jar
24775    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24776    if test -f "$BOOT_RTJAR"; then
24777      # Remove the ..
24778      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24779    fi
24780  fi
24781  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24782  BOOT_JDK="$BOOT_JDK"
24783
24784
24785
24786
24787  # Setup tools from the Boot JDK.
24788
24789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24790$as_echo_n "checking for java in Boot JDK... " >&6; }
24791  JAVA=$BOOT_JDK/bin/java
24792  if test ! -x $JAVA; then
24793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24794$as_echo "not found" >&6; }
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24796$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24797    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24798  fi
24799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24800$as_echo "ok" >&6; }
24801
24802
24803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24804$as_echo_n "checking for javac in Boot JDK... " >&6; }
24805  JAVAC=$BOOT_JDK/bin/javac
24806  if test ! -x $JAVAC; then
24807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24808$as_echo "not found" >&6; }
24809    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24810$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24811    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24812  fi
24813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24814$as_echo "ok" >&6; }
24815
24816
24817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24818$as_echo_n "checking for javah in Boot JDK... " >&6; }
24819  JAVAH=$BOOT_JDK/bin/javah
24820  if test ! -x $JAVAH; then
24821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24822$as_echo "not found" >&6; }
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24824$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24825    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24826  fi
24827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24828$as_echo "ok" >&6; }
24829
24830
24831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24832$as_echo_n "checking for javap in Boot JDK... " >&6; }
24833  JAVAP=$BOOT_JDK/bin/javap
24834  if test ! -x $JAVAP; then
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24836$as_echo "not found" >&6; }
24837    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24838$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24839    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24840  fi
24841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24842$as_echo "ok" >&6; }
24843
24844
24845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24846$as_echo_n "checking for jar in Boot JDK... " >&6; }
24847  JAR=$BOOT_JDK/bin/jar
24848  if test ! -x $JAR; then
24849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24850$as_echo "not found" >&6; }
24851    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24852$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24853    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24854  fi
24855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24856$as_echo "ok" >&6; }
24857
24858
24859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24860$as_echo_n "checking for rmic in Boot JDK... " >&6; }
24861  RMIC=$BOOT_JDK/bin/rmic
24862  if test ! -x $RMIC; then
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24864$as_echo "not found" >&6; }
24865    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24866$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24867    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24868  fi
24869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24870$as_echo "ok" >&6; }
24871
24872
24873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24874$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24875  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24876  if test ! -x $NATIVE2ASCII; then
24877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24878$as_echo "not found" >&6; }
24879    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24880$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24881    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24882  fi
24883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24884$as_echo "ok" >&6; }
24885
24886
24887  # Finally, set some other options...
24888
24889  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24890  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24891
24892
24893
24894  # Check if the boot jdk is 32 or 64 bit
24895  if "$JAVA" -d64 -version > /dev/null 2>&1; then
24896    BOOT_JDK_BITS="64"
24897  else
24898    BOOT_JDK_BITS="32"
24899  fi
24900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
24901$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
24902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
24903$as_echo "$BOOT_JDK_BITS" >&6; }
24904
24905
24906
24907  ##############################################################################
24908  #
24909  # Specify options for anything that is run with the Boot JDK.
24910  #
24911
24912# Check whether --with-boot-jdk-jvmargs was given.
24913if test "${with_boot_jdk_jvmargs+set}" = set; then :
24914  withval=$with_boot_jdk_jvmargs;
24915fi
24916
24917
24918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
24919$as_echo_n "checking flags for boot jdk java command ... " >&6; }
24920
24921  # Disable special log output when a debug build is used as Boot JDK...
24922
24923  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24924  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24925  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24929    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24930    JVM_ARG_OK=true
24931  else
24932    $ECHO "Arg failed:" >&5
24933    $ECHO "$OUTPUT" >&5
24934    JVM_ARG_OK=false
24935  fi
24936
24937
24938  # Apply user provided options.
24939
24940  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
24941  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
24942  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
24943  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24944  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24945  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24946    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
24947    JVM_ARG_OK=true
24948  else
24949    $ECHO "Arg failed:" >&5
24950    $ECHO "$OUTPUT" >&5
24951    JVM_ARG_OK=false
24952  fi
24953
24954
24955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
24956$as_echo "$boot_jdk_jvmargs" >&6; }
24957
24958  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
24959  JAVA_FLAGS=$boot_jdk_jvmargs
24960
24961
24962
24963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
24964$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
24965
24966  # Starting amount of heap memory.
24967
24968  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24969  $ECHO "Command: $JAVA -Xms64M -version" >&5
24970  OUTPUT=`$JAVA -Xms64M -version 2>&1`
24971  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24972  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24973  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24974    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
24975    JVM_ARG_OK=true
24976  else
24977    $ECHO "Arg failed:" >&5
24978    $ECHO "$OUTPUT" >&5
24979    JVM_ARG_OK=false
24980  fi
24981
24982
24983  # Maximum amount of heap memory.
24984  # Maximum stack size.
24985  if test "x$BOOT_JDK_BITS" = x32; then
24986    JVM_MAX_HEAP=768M
24987    STACK_SIZE=768
24988  else
24989    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
24990    # pointers are used. Apparently, we need to increase the heap and stack
24991    # space for the jvm. More specifically, when running javac to build huge
24992    # jdk batch
24993    JVM_MAX_HEAP=1600M
24994    STACK_SIZE=1536
24995  fi
24996
24997  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
24998  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
24999  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25000  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25001  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25002  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25003    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
25004    JVM_ARG_OK=true
25005  else
25006    $ECHO "Arg failed:" >&5
25007    $ECHO "$OUTPUT" >&5
25008    JVM_ARG_OK=false
25009  fi
25010
25011
25012  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25013  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25014  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25015  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25016  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25017  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25018    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
25019    JVM_ARG_OK=true
25020  else
25021    $ECHO "Arg failed:" >&5
25022    $ECHO "$OUTPUT" >&5
25023    JVM_ARG_OK=false
25024  fi
25025
25026
25027  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
25028  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
25029  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
25030  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25031  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25032  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25033    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
25034    JVM_ARG_OK=true
25035  else
25036    $ECHO "Arg failed:" >&5
25037    $ECHO "$OUTPUT" >&5
25038    JVM_ARG_OK=false
25039  fi
25040
25041
25042  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
25043  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
25044  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
25045  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25046  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25047  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25048    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
25049    JVM_ARG_OK=true
25050  else
25051    $ECHO "Arg failed:" >&5
25052    $ECHO "$OUTPUT" >&5
25053    JVM_ARG_OK=false
25054  fi
25055
25056
25057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
25058$as_echo "$boot_jdk_jvmargs_big" >&6; }
25059
25060  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
25061
25062
25063
25064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
25065$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
25066
25067  # Use serial gc for small short lived tools if possible
25068
25069  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
25070  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
25071  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
25072  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25073  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25074  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25075    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
25076    JVM_ARG_OK=true
25077  else
25078    $ECHO "Arg failed:" >&5
25079    $ECHO "$OUTPUT" >&5
25080    JVM_ARG_OK=false
25081  fi
25082
25083
25084  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
25085  $ECHO "Command: $JAVA -Xms32M -version" >&5
25086  OUTPUT=`$JAVA -Xms32M -version 2>&1`
25087  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25088  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25089  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25090    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
25091    JVM_ARG_OK=true
25092  else
25093    $ECHO "Arg failed:" >&5
25094    $ECHO "$OUTPUT" >&5
25095    JVM_ARG_OK=false
25096  fi
25097
25098
25099  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
25100  $ECHO "Command: $JAVA -Xmx512M -version" >&5
25101  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
25102  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25103  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25104  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25105    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
25106    JVM_ARG_OK=true
25107  else
25108    $ECHO "Arg failed:" >&5
25109    $ECHO "$OUTPUT" >&5
25110    JVM_ARG_OK=false
25111  fi
25112
25113
25114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
25115$as_echo "$boot_jdk_jvmargs_small" >&6; }
25116
25117  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
25118
25119
25120
25121###############################################################################
25122#
25123# Configure the sources to use. We can add or override individual directories.
25124#
25125###############################################################################
25126
25127
25128  # Where are the sources. Any of these can be overridden
25129  # using --with-override-corba and the likes.
25130  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25131  CORBA_TOPDIR="$SRC_ROOT/corba"
25132  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25133  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25134  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25135  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25136  JDK_TOPDIR="$SRC_ROOT/jdk"
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147  ###############################################################################
25148  #
25149  # Pickup additional source for a component from outside of the source root
25150  # or override source for a component.
25151  #
25152
25153# Check whether --with-add-source-root was given.
25154if test "${with_add_source_root+set}" = set; then :
25155  withval=$with_add_source_root;
25156fi
25157
25158
25159
25160# Check whether --with-override-source-root was given.
25161if test "${with_override_source_root+set}" = set; then :
25162  withval=$with_override_source_root;
25163fi
25164
25165
25166
25167# Check whether --with-adds-and-overrides was given.
25168if test "${with_adds_and_overrides+set}" = set; then :
25169  withval=$with_adds_and_overrides;
25170fi
25171
25172
25173  if test "x$with_adds_and_overrides" != x; then
25174    with_add_source_root="$with_adds_and_overrides/adds"
25175    with_override_source_root="$with_adds_and_overrides/overrides"
25176  fi
25177
25178  if test "x$with_add_source_root" != x; then
25179    if ! test -d $with_add_source_root; then
25180      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25181    fi
25182    CURDIR="$PWD"
25183    cd "$with_add_source_root"
25184    ADD_SRC_ROOT="`pwd`"
25185    cd "$CURDIR"
25186    # Verify that the addon source root does not have any root makefiles.
25187    # If it does, then it is usually an error, prevent this.
25188    if test -f $with_add_source_root/langtools/make/Makefile; then
25189      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
25190    fi
25191    if test -f $with_add_source_root/corba/make/Makefile; then
25192      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
25193    fi
25194    if test -f $with_add_source_root/jaxp/make/Makefile; then
25195      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
25196    fi
25197    if test -f $with_add_source_root/jaxws/make/Makefile; then
25198      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
25199    fi
25200    if test -f $with_add_source_root/hotspot/make/Makefile; then
25201      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
25202    fi
25203    if test -f $with_add_source_root/nashorn/make/Makefile; then
25204      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
25205    fi
25206    if test -f $with_add_source_root/jdk/make/Makefile; then
25207      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
25208    fi
25209  fi
25210
25211
25212  if test "x$with_override_source_root" != x; then
25213    if ! test -d $with_override_source_root; then
25214      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25215    fi
25216    CURDIR="$PWD"
25217    cd "$with_override_source_root"
25218    OVERRIDE_SRC_ROOT="`pwd`"
25219    cd "$CURDIR"
25220    if test -f $with_override_source_root/langtools/make/Makefile; then
25221      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
25222    fi
25223    if test -f $with_override_source_root/corba/make/Makefile; then
25224      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
25225    fi
25226    if test -f $with_override_source_root/jaxp/make/Makefile; then
25227      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
25228    fi
25229    if test -f $with_override_source_root/jaxws/make/Makefile; then
25230      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
25231    fi
25232    if test -f $with_override_source_root/hotspot/make/Makefile; then
25233      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
25234    fi
25235    if test -f $with_override_source_root/nashorn/make/Makefile; then
25236      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
25237    fi
25238    if test -f $with_override_source_root/jdk/make/Makefile; then
25239      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
25240    fi
25241  fi
25242
25243
25244  ###############################################################################
25245  #
25246  # Override a repo completely, this is used for example when you have 3 small
25247  # development sandboxes of the langtools sources and want to avoid having 3 full
25248  # OpenJDK sources checked out on disk.
25249  #
25250  # Assuming that the 3 langtools sandboxes are located here:
25251  # /home/fredrik/sandbox1/langtools
25252  # /home/fredrik/sandbox2/langtools
25253  # /home/fredrik/sandbox3/langtools
25254  #
25255  # From the source root you create build subdirs manually:
25256  #     mkdir -p build1 build2 build3
25257  # in each build directory run:
25258  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25259  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25260  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25261  #
25262
25263
25264# Check whether --with-override-langtools was given.
25265if test "${with_override_langtools+set}" = set; then :
25266  withval=$with_override_langtools;
25267fi
25268
25269
25270
25271# Check whether --with-override-corba was given.
25272if test "${with_override_corba+set}" = set; then :
25273  withval=$with_override_corba;
25274fi
25275
25276
25277
25278# Check whether --with-override-jaxp was given.
25279if test "${with_override_jaxp+set}" = set; then :
25280  withval=$with_override_jaxp;
25281fi
25282
25283
25284
25285# Check whether --with-override-jaxws was given.
25286if test "${with_override_jaxws+set}" = set; then :
25287  withval=$with_override_jaxws;
25288fi
25289
25290
25291
25292# Check whether --with-override-hotspot was given.
25293if test "${with_override_hotspot+set}" = set; then :
25294  withval=$with_override_hotspot;
25295fi
25296
25297
25298
25299# Check whether --with-override-nashorn was given.
25300if test "${with_override_nashorn+set}" = set; then :
25301  withval=$with_override_nashorn;
25302fi
25303
25304
25305
25306# Check whether --with-override-jdk was given.
25307if test "${with_override_jdk+set}" = set; then :
25308  withval=$with_override_jdk;
25309fi
25310
25311
25312  if test "x$with_override_langtools" != x; then
25313    CURDIR="$PWD"
25314    cd "$with_override_langtools"
25315    LANGTOOLS_TOPDIR="`pwd`"
25316    cd "$CURDIR"
25317    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25318      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25319    fi
25320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25321$as_echo_n "checking if langtools should be overridden... " >&6; }
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25323$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25324  fi
25325  if test "x$with_override_corba" != x; then
25326    CURDIR="$PWD"
25327    cd "$with_override_corba"
25328    CORBA_TOPDIR="`pwd`"
25329    cd "$CURDIR"
25330    if ! test -f $CORBA_TOPDIR/make/Makefile; then
25331      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
25332    fi
25333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
25334$as_echo_n "checking if corba should be overridden... " >&6; }
25335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
25336$as_echo "yes with $CORBA_TOPDIR" >&6; }
25337  fi
25338  if test "x$with_override_jaxp" != x; then
25339    CURDIR="$PWD"
25340    cd "$with_override_jaxp"
25341    JAXP_TOPDIR="`pwd`"
25342    cd "$CURDIR"
25343    if ! test -f $JAXP_TOPDIR/make/Makefile; then
25344      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
25345    fi
25346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
25347$as_echo_n "checking if jaxp should be overridden... " >&6; }
25348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
25349$as_echo "yes with $JAXP_TOPDIR" >&6; }
25350  fi
25351  if test "x$with_override_jaxws" != x; then
25352    CURDIR="$PWD"
25353    cd "$with_override_jaxws"
25354    JAXWS_TOPDIR="`pwd`"
25355    cd "$CURDIR"
25356    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
25357      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
25358    fi
25359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
25360$as_echo_n "checking if jaxws should be overridden... " >&6; }
25361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
25362$as_echo "yes with $JAXWS_TOPDIR" >&6; }
25363  fi
25364  if test "x$with_override_hotspot" != x; then
25365    CURDIR="$PWD"
25366    cd "$with_override_hotspot"
25367    HOTSPOT_TOPDIR="`pwd`"
25368    cd "$CURDIR"
25369    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
25370      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
25371    fi
25372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
25373$as_echo_n "checking if hotspot should be overridden... " >&6; }
25374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
25375$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
25376  fi
25377  if test "x$with_override_nashorn" != x; then
25378    CURDIR="$PWD"
25379    cd "$with_override_nashorn"
25380    NASHORN_TOPDIR="`pwd`"
25381    cd "$CURDIR"
25382    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
25383      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
25384    fi
25385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
25386$as_echo_n "checking if nashorn should be overridden... " >&6; }
25387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
25388$as_echo "yes with $NASHORN_TOPDIR" >&6; }
25389  fi
25390  if test "x$with_override_jdk" != x; then
25391    CURDIR="$PWD"
25392    cd "$with_override_jdk"
25393    JDK_TOPDIR="`pwd`"
25394    cd "$CURDIR"
25395    if ! test -f $JDK_TOPDIR/make/Makefile; then
25396      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
25397    fi
25398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
25399$as_echo_n "checking if JDK should be overridden... " >&6; }
25400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
25401$as_echo "yes with $JDK_TOPDIR" >&6; }
25402  fi
25403
25404
25405  BUILD_OUTPUT="$OUTPUT_ROOT"
25406
25407
25408  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
25409  BUILD_HOTSPOT=true
25410
25411
25412
25413# Check whether --with-import-hotspot was given.
25414if test "${with_import_hotspot+set}" = set; then :
25415  withval=$with_import_hotspot;
25416fi
25417
25418  if test "x$with_import_hotspot" != x; then
25419    CURDIR="$PWD"
25420    cd "$with_import_hotspot"
25421    HOTSPOT_DIST="`pwd`"
25422    cd "$CURDIR"
25423    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
25424      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
25425    fi
25426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
25427$as_echo_n "checking if hotspot should be imported... " >&6; }
25428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
25429$as_echo "yes from $HOTSPOT_DIST" >&6; }
25430    BUILD_HOTSPOT=false
25431  fi
25432
25433  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
25434
25435
25436###############################################################################
25437#
25438# Setup the toolchain (compilers etc), i.e. tools used to compile and process
25439# native code.
25440#
25441###############################################################################
25442
25443# First determine the toolchain type (compiler family)
25444
25445
25446# Check whether --with-toolchain-type was given.
25447if test "${with_toolchain_type+set}" = set; then :
25448  withval=$with_toolchain_type;
25449fi
25450
25451
25452  # Use indirect variable referencing
25453  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
25454  VALID_TOOLCHAINS=${!toolchain_var_name}
25455
25456  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25457    # On Mac OS X, default toolchain to clang after Xcode 5
25458    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
25459    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
25460    if test $? -ne 0; then
25461      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
25462    fi
25463    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
25464        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
25465        $CUT -f 1 -d .`
25466    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
25467$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
25468    if test $XCODE_MAJOR_VERSION -ge 5; then
25469        DEFAULT_TOOLCHAIN="clang"
25470    else
25471        DEFAULT_TOOLCHAIN="gcc"
25472    fi
25473  else
25474    # First toolchain type in the list is the default
25475    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
25476  fi
25477
25478  if test "x$with_toolchain_type" = xlist; then
25479    # List all toolchains
25480    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
25481$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
25482    for toolchain in $VALID_TOOLCHAINS; do
25483      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
25484      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25485      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
25486    done
25487
25488    exit 0
25489  elif test "x$with_toolchain_type" != x; then
25490    # User override; check that it is valid
25491    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
25492      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
25493$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
25494      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
25495$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
25496      as_fn_error $? "Cannot continue." "$LINENO" 5
25497    fi
25498    TOOLCHAIN_TYPE=$with_toolchain_type
25499  else
25500    # No flag given, use default
25501    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
25502  fi
25503
25504
25505  TOOLCHAIN_CC_BINARY_clang="clang"
25506  TOOLCHAIN_CC_BINARY_gcc="gcc"
25507  TOOLCHAIN_CC_BINARY_microsoft="cl"
25508  TOOLCHAIN_CC_BINARY_solstudio="cc"
25509  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
25510
25511  TOOLCHAIN_CXX_BINARY_clang="clang++"
25512  TOOLCHAIN_CXX_BINARY_gcc="g++"
25513  TOOLCHAIN_CXX_BINARY_microsoft="cl"
25514  TOOLCHAIN_CXX_BINARY_solstudio="CC"
25515  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
25516
25517  # Use indirect variable referencing
25518  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
25519  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25520  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
25521  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
25522  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
25523  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
25524
25525
25526  # Define filename patterns
25527  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25528    LIBRARY_PREFIX=
25529    SHARED_LIBRARY_SUFFIX='.dll'
25530    STATIC_LIBRARY_SUFFIX='.lib'
25531    SHARED_LIBRARY='$1.dll'
25532    STATIC_LIBRARY='$1.lib'
25533    OBJ_SUFFIX='.obj'
25534    EXE_SUFFIX='.exe'
25535  else
25536    LIBRARY_PREFIX=lib
25537    SHARED_LIBRARY_SUFFIX='.so'
25538    STATIC_LIBRARY_SUFFIX='.a'
25539    SHARED_LIBRARY='lib$1.so'
25540    STATIC_LIBRARY='lib$1.a'
25541    OBJ_SUFFIX='.o'
25542    EXE_SUFFIX=''
25543    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25544      SHARED_LIBRARY='lib$1.dylib'
25545      SHARED_LIBRARY_SUFFIX='.dylib'
25546    fi
25547  fi
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
25560$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
25561  else
25562    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
25563$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
25564  fi
25565
25566
25567# Then detect the actual binaries needed
25568
25569  # FIXME: Is this needed?
25570  ac_ext=cpp
25571ac_cpp='$CXXCPP $CPPFLAGS'
25572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25575
25576
25577  # Store the CFLAGS etal passed to the configure script.
25578  ORG_CFLAGS="$CFLAGS"
25579  ORG_CXXFLAGS="$CXXFLAGS"
25580  ORG_OBJCFLAGS="$OBJCFLAGS"
25581
25582  # autoconf magic only relies on PATH, so update it if tools dir is specified
25583  OLD_PATH="$PATH"
25584
25585  # On Windows, we need to detect the visual studio installation first.
25586  # This will change the PATH, but we need to keep that new PATH even
25587  # after toolchain detection is done, since the compiler (on x86) uses
25588  # it for DLL resolution in runtime.
25589  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
25590      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
25591
25592  # Store path to cygwin link.exe to help excluding it when searching for
25593  # VS linker. This must be done before changing the PATH when looking for VS.
25594  # Extract the first word of "link", so it can be a program name with args.
25595set dummy link; ac_word=$2
25596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25597$as_echo_n "checking for $ac_word... " >&6; }
25598if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25599  $as_echo_n "(cached) " >&6
25600else
25601  case $CYGWIN_LINK in
25602  [\\/]* | ?:[\\/]*)
25603  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25604  ;;
25605  *)
25606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25607for as_dir in $PATH
25608do
25609  IFS=$as_save_IFS
25610  test -z "$as_dir" && as_dir=.
25611    for ac_exec_ext in '' $ac_executable_extensions; do
25612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25613    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25615    break 2
25616  fi
25617done
25618  done
25619IFS=$as_save_IFS
25620
25621  ;;
25622esac
25623fi
25624CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25625if test -n "$CYGWIN_LINK"; then
25626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25627$as_echo "$CYGWIN_LINK" >&6; }
25628else
25629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25630$as_echo "no" >&6; }
25631fi
25632
25633
25634  if test "x$CYGWIN_LINK" != x; then
25635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25636$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25637    "$CYGWIN_LINK" --version > /dev/null
25638    if test $? -eq 0 ; then
25639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25640$as_echo "yes" >&6; }
25641    else
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25643$as_echo "no" >&6; }
25644      # This might be the VS linker. Don't exclude it later on.
25645      CYGWIN_LINK=""
25646    fi
25647  fi
25648
25649  # First-hand choice is to locate and run the vsvars bat file.
25650
25651
25652# Check whether --with-toolchain-version was given.
25653if test "${with_toolchain_version+set}" = set; then :
25654  withval=$with_toolchain_version;
25655fi
25656
25657
25658  if test "x$with_toolchain_version" = xlist; then
25659    # List all toolchains
25660    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
25661$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
25662    for version in $VALID_VS_VERSIONS; do
25663      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
25664      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
25665    done
25666
25667    exit 0
25668  elif test "x$DEVKIT_VS_VERSION" != x; then
25669    VS_VERSION=$DEVKIT_VS_VERSION
25670    TOOLCHAIN_VERSION=$VS_VERSION
25671    # If the devkit has a name, use that as description
25672    VS_DESCRIPTION="$DEVKIT_NAME"
25673    if test "x$VS_DESCRIPTION" = x; then
25674      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25675    fi
25676    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25677    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25678    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25679    eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
25680    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25681    VS_PATH="$TOOLCHAIN_PATH:$PATH"
25682
25683    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
25684    # can still be exported as INCLUDE for compiler invocations without
25685    # SYSROOT_CFLAGS
25686    OLDIFS="$IFS"
25687    IFS=";"
25688    for i in $DEVKIT_VS_INCLUDE; do
25689      ipath=$i
25690
25691  unix_path="$ipath"
25692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25693    windows_path=`$CYGPATH -m "$unix_path"`
25694    ipath="$windows_path"
25695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25696    windows_path=`cmd //c echo $unix_path`
25697    ipath="$windows_path"
25698  fi
25699
25700      VS_INCLUDE="$VS_INCLUDE;$ipath"
25701    done
25702    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
25703    # as LIB for compiler invocations without SYSROOT_LDFLAGS
25704    for i in $DEVKIT_VS_LIB; do
25705      libpath=$i
25706
25707  unix_path="$libpath"
25708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25709    windows_path=`$CYGPATH -m "$unix_path"`
25710    libpath="$windows_path"
25711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25712    windows_path=`cmd //c echo $unix_path`
25713    libpath="$windows_path"
25714  fi
25715
25716      VS_LIB="$VS_LIB;$libpath"
25717    done
25718    IFS="$OLDIFS"
25719
25720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
25721$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
25722
25723  elif test "x$with_toolchain_version" != x; then
25724    # User override; check that it is valid
25725    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
25727$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
25728      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
25729$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
25730      as_fn_error $? "Cannot continue." "$LINENO" 5
25731    fi
25732    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
25733  else
25734    # No flag given, use default
25735    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
25736  fi
25737
25738  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
25739
25740  VS_VERSION="$VS_VERSION"
25741  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
25742  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
25743  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
25744  eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
25745  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
25746  eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
25747
25748  # When using --with-tools-dir, assume it points to the correct and default
25749  # version of Visual Studio or that --with-toolchain-version was also set.
25750  if test "x$with_tools_dir" != x; then
25751
25752  if test "x$VS_ENV_CMD" = x; then
25753    VS_VERSION="${VS_VERSION}"
25754    VS_BASE="$with_tools_dir/../.."
25755    METHOD="--with-tools-dir"
25756
25757
25758  windows_path="$VS_BASE"
25759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25760    unix_path=`$CYGPATH -u "$windows_path"`
25761    VS_BASE="$unix_path"
25762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25764    VS_BASE="$unix_path"
25765  fi
25766
25767    # In VS 2017, the default installation is in a subdir named after the edition.
25768    # Find the first one present and use that.
25769    if test "x$VS_EDITIONS" != x; then
25770      for edition in $VS_EDITIONS; do
25771        if test -d "$VS_BASE/$edition"; then
25772          VS_BASE="$VS_BASE/$edition"
25773          break
25774        fi
25775      done
25776    fi
25777
25778    if test -d "$VS_BASE"; then
25779      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25780$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25781      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25782        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25783      else
25784        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25785            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25786      fi
25787
25788      for VCVARSFILE in $VCVARSFILES; do
25789        if test -f "$VS_BASE/$VCVARSFILE"; then
25790          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25791          break
25792        fi
25793      done
25794
25795      if test "x$VS_ENV_CMD" = x; then
25796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25797$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25798      else
25799        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25800        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25801        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25802        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25803
25804      fi
25805    fi
25806  fi
25807
25808
25809  if test "x$VS_ENV_CMD" = x; then
25810    VS_VERSION="${VS_VERSION}"
25811    VS_BASE="$with_tools_dir/../../.."
25812    METHOD="--with-tools-dir"
25813
25814
25815  windows_path="$VS_BASE"
25816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25817    unix_path=`$CYGPATH -u "$windows_path"`
25818    VS_BASE="$unix_path"
25819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25821    VS_BASE="$unix_path"
25822  fi
25823
25824    # In VS 2017, the default installation is in a subdir named after the edition.
25825    # Find the first one present and use that.
25826    if test "x$VS_EDITIONS" != x; then
25827      for edition in $VS_EDITIONS; do
25828        if test -d "$VS_BASE/$edition"; then
25829          VS_BASE="$VS_BASE/$edition"
25830          break
25831        fi
25832      done
25833    fi
25834
25835    if test -d "$VS_BASE"; then
25836      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25837$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25839        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25840      else
25841        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25842            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25843      fi
25844
25845      for VCVARSFILE in $VCVARSFILES; do
25846        if test -f "$VS_BASE/$VCVARSFILE"; then
25847          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25848          break
25849        fi
25850      done
25851
25852      if test "x$VS_ENV_CMD" = x; then
25853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25854$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25855      else
25856        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25857        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25858        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25859        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25860
25861      fi
25862    fi
25863  fi
25864
25865    if test "x$VS_ENV_CMD" = x; then
25866      # Having specified an argument which is incorrect will produce an instant failure;
25867      # we should not go on looking
25868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
25869$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
25870      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
25871$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
25872      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
25873$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
25874      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25875    fi
25876  fi
25877
25878  VS_ENV_CMD=""
25879
25880  if test "x$VS_COMNTOOLS" != x; then
25881
25882  if test "x$VS_ENV_CMD" = x; then
25883    VS_VERSION="${VS_VERSION}"
25884    VS_BASE="$VS_COMNTOOLS/../.."
25885    METHOD="$VS_COMNTOOLS_VAR variable"
25886
25887
25888  windows_path="$VS_BASE"
25889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25890    unix_path=`$CYGPATH -u "$windows_path"`
25891    VS_BASE="$unix_path"
25892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25894    VS_BASE="$unix_path"
25895  fi
25896
25897    # In VS 2017, the default installation is in a subdir named after the edition.
25898    # Find the first one present and use that.
25899    if test "x$VS_EDITIONS" != x; then
25900      for edition in $VS_EDITIONS; do
25901        if test -d "$VS_BASE/$edition"; then
25902          VS_BASE="$VS_BASE/$edition"
25903          break
25904        fi
25905      done
25906    fi
25907
25908    if test -d "$VS_BASE"; then
25909      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25910$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25911      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25912        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25913      else
25914        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25915            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25916      fi
25917
25918      for VCVARSFILE in $VCVARSFILES; do
25919        if test -f "$VS_BASE/$VCVARSFILE"; then
25920          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25921          break
25922        fi
25923      done
25924
25925      if test "x$VS_ENV_CMD" = x; then
25926        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25927$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25928      else
25929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25930        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25931        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25932        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25933
25934      fi
25935    fi
25936  fi
25937
25938  fi
25939  if test "x$PROGRAMFILES" != x; then
25940
25941  if test "x$VS_ENV_CMD" = x; then
25942    VS_VERSION="${VS_VERSION}"
25943    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
25944    METHOD="well-known name"
25945
25946
25947  windows_path="$VS_BASE"
25948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949    unix_path=`$CYGPATH -u "$windows_path"`
25950    VS_BASE="$unix_path"
25951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25953    VS_BASE="$unix_path"
25954  fi
25955
25956    # In VS 2017, the default installation is in a subdir named after the edition.
25957    # Find the first one present and use that.
25958    if test "x$VS_EDITIONS" != x; then
25959      for edition in $VS_EDITIONS; do
25960        if test -d "$VS_BASE/$edition"; then
25961          VS_BASE="$VS_BASE/$edition"
25962          break
25963        fi
25964      done
25965    fi
25966
25967    if test -d "$VS_BASE"; then
25968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25969$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25970      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25971        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25972      else
25973        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25974            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25975      fi
25976
25977      for VCVARSFILE in $VCVARSFILES; do
25978        if test -f "$VS_BASE/$VCVARSFILE"; then
25979          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25980          break
25981        fi
25982      done
25983
25984      if test "x$VS_ENV_CMD" = x; then
25985        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25986$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25987      else
25988        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25989        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25990        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25991        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25992
25993      fi
25994    fi
25995  fi
25996
25997  fi
25998  # Work around the insanely named ProgramFiles(x86) env variable
25999  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26000  if test "x$PROGRAMFILES_X86" != x; then
26001
26002  if test "x$VS_ENV_CMD" = x; then
26003    VS_VERSION="${VS_VERSION}"
26004    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26005    METHOD="well-known name"
26006
26007
26008  windows_path="$VS_BASE"
26009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010    unix_path=`$CYGPATH -u "$windows_path"`
26011    VS_BASE="$unix_path"
26012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26014    VS_BASE="$unix_path"
26015  fi
26016
26017    # In VS 2017, the default installation is in a subdir named after the edition.
26018    # Find the first one present and use that.
26019    if test "x$VS_EDITIONS" != x; then
26020      for edition in $VS_EDITIONS; do
26021        if test -d "$VS_BASE/$edition"; then
26022          VS_BASE="$VS_BASE/$edition"
26023          break
26024        fi
26025      done
26026    fi
26027
26028    if test -d "$VS_BASE"; then
26029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26030$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26031      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26032        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
26033      else
26034        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
26035            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
26036      fi
26037
26038      for VCVARSFILE in $VCVARSFILES; do
26039        if test -f "$VS_BASE/$VCVARSFILE"; then
26040          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26041          break
26042        fi
26043      done
26044
26045      if test "x$VS_ENV_CMD" = x; then
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
26047$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
26048      else
26049        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
26050        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
26051        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
26052        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26053
26054      fi
26055    fi
26056  fi
26057
26058  fi
26059
26060  if test "x$VS_ENV_CMD" = x; then
26061    VS_VERSION="${VS_VERSION}"
26062    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26063    METHOD="well-known name"
26064
26065
26066  windows_path="$VS_BASE"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    VS_BASE="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    VS_BASE="$unix_path"
26073  fi
26074
26075    # In VS 2017, the default installation is in a subdir named after the edition.
26076    # Find the first one present and use that.
26077    if test "x$VS_EDITIONS" != x; then
26078      for edition in $VS_EDITIONS; do
26079        if test -d "$VS_BASE/$edition"; then
26080          VS_BASE="$VS_BASE/$edition"
26081          break
26082        fi
26083      done
26084    fi
26085
26086    if test -d "$VS_BASE"; then
26087      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26088$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26089      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26090        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
26091      else
26092        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
26093            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
26094      fi
26095
26096      for VCVARSFILE in $VCVARSFILES; do
26097        if test -f "$VS_BASE/$VCVARSFILE"; then
26098          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26099          break
26100        fi
26101      done
26102
26103      if test "x$VS_ENV_CMD" = x; then
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
26105$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
26106      else
26107        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
26108        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
26109        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
26110        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26111
26112      fi
26113    fi
26114  fi
26115
26116
26117  if test "x$VS_ENV_CMD" = x; then
26118    VS_VERSION="${VS_VERSION}"
26119    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26120    METHOD="well-known name"
26121
26122
26123  windows_path="$VS_BASE"
26124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26125    unix_path=`$CYGPATH -u "$windows_path"`
26126    VS_BASE="$unix_path"
26127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26129    VS_BASE="$unix_path"
26130  fi
26131
26132    # In VS 2017, the default installation is in a subdir named after the edition.
26133    # Find the first one present and use that.
26134    if test "x$VS_EDITIONS" != x; then
26135      for edition in $VS_EDITIONS; do
26136        if test -d "$VS_BASE/$edition"; then
26137          VS_BASE="$VS_BASE/$edition"
26138          break
26139        fi
26140      done
26141    fi
26142
26143    if test -d "$VS_BASE"; then
26144      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26145$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26146      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26147        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
26148      else
26149        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
26150            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
26151      fi
26152
26153      for VCVARSFILE in $VCVARSFILES; do
26154        if test -f "$VS_BASE/$VCVARSFILE"; then
26155          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26156          break
26157        fi
26158      done
26159
26160      if test "x$VS_ENV_CMD" = x; then
26161        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
26162$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
26163      else
26164        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
26165        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
26166        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
26167        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26168
26169      fi
26170    fi
26171  fi
26172
26173
26174  if test "x$SDK_INSTALL_DIR" != x; then
26175    if test "x$ProgramW6432" != x; then
26176
26177  if test "x$VS_ENV_CMD" = x; then
26178    VS_VERSION="${VS_VERSION}"
26179    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26180    METHOD="well-known name"
26181
26182  windows_path="$WIN_SDK_BASE"
26183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184    unix_path=`$CYGPATH -u "$windows_path"`
26185    WIN_SDK_BASE="$unix_path"
26186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26188    WIN_SDK_BASE="$unix_path"
26189  fi
26190
26191    if test -d "$WIN_SDK_BASE"; then
26192      # There have been cases of partial or broken SDK installations. A missing
26193      # lib dir is not going to work.
26194      if test ! -d "$WIN_SDK_BASE/lib"; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26196$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26197        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26198$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26199      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26202        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26203        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26204          VS_ENV_ARGS="/x86"
26205        else
26206          VS_ENV_ARGS="/x64"
26207        fi
26208        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26209        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26210        # TODO: improve detection for other versions of SDK
26211        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26212      else
26213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26214$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26215        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26216$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26217      fi
26218    fi
26219  fi
26220
26221    fi
26222    if test "x$PROGRAMW6432" != x; then
26223
26224  if test "x$VS_ENV_CMD" = x; then
26225    VS_VERSION="${VS_VERSION}"
26226    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26227    METHOD="well-known name"
26228
26229  windows_path="$WIN_SDK_BASE"
26230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26231    unix_path=`$CYGPATH -u "$windows_path"`
26232    WIN_SDK_BASE="$unix_path"
26233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26235    WIN_SDK_BASE="$unix_path"
26236  fi
26237
26238    if test -d "$WIN_SDK_BASE"; then
26239      # There have been cases of partial or broken SDK installations. A missing
26240      # lib dir is not going to work.
26241      if test ! -d "$WIN_SDK_BASE/lib"; then
26242        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26243$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26245$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26246      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26248$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26249        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26250        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26251          VS_ENV_ARGS="/x86"
26252        else
26253          VS_ENV_ARGS="/x64"
26254        fi
26255        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26256        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26257        # TODO: improve detection for other versions of SDK
26258        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26259      else
26260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26261$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26262        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26263$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26264      fi
26265    fi
26266  fi
26267
26268    fi
26269    if test "x$PROGRAMFILES" != x; then
26270
26271  if test "x$VS_ENV_CMD" = x; then
26272    VS_VERSION="${VS_VERSION}"
26273    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
26274    METHOD="well-known name"
26275
26276  windows_path="$WIN_SDK_BASE"
26277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26278    unix_path=`$CYGPATH -u "$windows_path"`
26279    WIN_SDK_BASE="$unix_path"
26280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26282    WIN_SDK_BASE="$unix_path"
26283  fi
26284
26285    if test -d "$WIN_SDK_BASE"; then
26286      # There have been cases of partial or broken SDK installations. A missing
26287      # lib dir is not going to work.
26288      if test ! -d "$WIN_SDK_BASE/lib"; then
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26290$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26291        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26292$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26293      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26295$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26296        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26297        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26298          VS_ENV_ARGS="/x86"
26299        else
26300          VS_ENV_ARGS="/x64"
26301        fi
26302        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26303        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26304        # TODO: improve detection for other versions of SDK
26305        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26306      else
26307        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26308$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26309        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26310$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26311      fi
26312    fi
26313  fi
26314
26315    fi
26316
26317  if test "x$VS_ENV_CMD" = x; then
26318    VS_VERSION="${VS_VERSION}"
26319    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
26320    METHOD="well-known name"
26321
26322  windows_path="$WIN_SDK_BASE"
26323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26324    unix_path=`$CYGPATH -u "$windows_path"`
26325    WIN_SDK_BASE="$unix_path"
26326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26328    WIN_SDK_BASE="$unix_path"
26329  fi
26330
26331    if test -d "$WIN_SDK_BASE"; then
26332      # There have been cases of partial or broken SDK installations. A missing
26333      # lib dir is not going to work.
26334      if test ! -d "$WIN_SDK_BASE/lib"; then
26335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26336$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26338$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26339      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26340        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26341$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26342        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26343        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26344          VS_ENV_ARGS="/x86"
26345        else
26346          VS_ENV_ARGS="/x64"
26347        fi
26348        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26349        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26350        # TODO: improve detection for other versions of SDK
26351        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26352      else
26353        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26354$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26355        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26356$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26357      fi
26358    fi
26359  fi
26360
26361
26362  if test "x$VS_ENV_CMD" = x; then
26363    VS_VERSION="${VS_VERSION}"
26364    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
26365    METHOD="well-known name"
26366
26367  windows_path="$WIN_SDK_BASE"
26368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26369    unix_path=`$CYGPATH -u "$windows_path"`
26370    WIN_SDK_BASE="$unix_path"
26371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26373    WIN_SDK_BASE="$unix_path"
26374  fi
26375
26376    if test -d "$WIN_SDK_BASE"; then
26377      # There have been cases of partial or broken SDK installations. A missing
26378      # lib dir is not going to work.
26379      if test ! -d "$WIN_SDK_BASE/lib"; then
26380        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26381$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26382        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26383$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26384      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26385        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26386$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26387        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26388        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26389          VS_ENV_ARGS="/x86"
26390        else
26391          VS_ENV_ARGS="/x64"
26392        fi
26393        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26394        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26395        # TODO: improve detection for other versions of SDK
26396        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26397      else
26398        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26399$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26400        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26401$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26402      fi
26403    fi
26404  fi
26405
26406  fi
26407
26408    if test "x$VS_ENV_CMD" != x; then
26409      TOOLCHAIN_VERSION=$VS_VERSION
26410      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26411      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26412      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26413      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26414      eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
26415      # The rest of the variables are already evaled while probing
26416      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
26417$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
26418      break
26419    fi
26420  done
26421
26422  TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
26423  if test "$TOOLCHAIN_VERSION" -gt 2013; then
26424    UNSUPPORTED_TOOLCHAIN_VERSION=yes
26425  fi
26426
26427
26428  # If we have a devkit, skip all of the below.
26429  if test "x$DEVKIT_VS_VERSION" = x; then
26430    if test "x$VS_ENV_CMD" != x; then
26431      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26432
26433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434
26435  # First separate the path from the arguments. This will split at the first
26436  # space.
26437  complete="$VS_ENV_CMD"
26438  path="${complete%% *}"
26439  tmp="$complete EOL"
26440  arguments="${tmp#* }"
26441
26442  # Input might be given as Windows format, start by converting to
26443  # unix format.
26444  new_path=`$CYGPATH -u "$path"`
26445
26446  # Now try to locate executable using which
26447  new_path=`$WHICH "$new_path" 2> /dev/null`
26448  # bat and cmd files are not always considered executable in cygwin causing which
26449  # to not find them
26450  if test "x$new_path" = x \
26451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26453    new_path=`$CYGPATH -u "$path"`
26454  fi
26455  if test "x$new_path" = x; then
26456    # Oops. Which didn't find the executable.
26457    # The splitting of arguments from the executable at a space might have been incorrect,
26458    # since paths with space are more likely in Windows. Give it another try with the whole
26459    # argument.
26460    path="$complete"
26461    arguments="EOL"
26462    new_path=`$CYGPATH -u "$path"`
26463    new_path=`$WHICH "$new_path" 2> /dev/null`
26464    # bat and cmd files are not always considered executable in cygwin causing which
26465    # to not find them
26466    if test "x$new_path" = x \
26467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26469      new_path=`$CYGPATH -u "$path"`
26470    fi
26471    if test "x$new_path" = x; then
26472      # It's still not found. Now this is an unrecoverable error.
26473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26474$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26475      has_space=`$ECHO "$complete" | $GREP " "`
26476      if test "x$has_space" != x; then
26477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26479      fi
26480      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26481    fi
26482  fi
26483
26484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26487  # "foo.exe" is OK but "foo" is an error.
26488  #
26489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26490  # It is also a way to make sure we got the proper file name for the real test later on.
26491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26492  if test "x$test_shortpath" = x; then
26493    # Short path failed, file does not exist as specified.
26494    # Try adding .exe or .cmd
26495    if test -f "${new_path}.exe"; then
26496      input_to_shortpath="${new_path}.exe"
26497    elif test -f "${new_path}.cmd"; then
26498      input_to_shortpath="${new_path}.cmd"
26499    else
26500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26501$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26504      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26505    fi
26506  else
26507    input_to_shortpath="$new_path"
26508  fi
26509
26510  # Call helper function which possibly converts this using DOS-style short mode.
26511  # If so, the updated path is stored in $new_path.
26512  new_path="$input_to_shortpath"
26513
26514  input_path="$input_to_shortpath"
26515  # Check if we need to convert this using DOS-style short mode. If the path
26516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26517  # take no chances and rewrite it.
26518  # Note: m4 eats our [], so we need to use [ and ] instead.
26519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26520  if test "x$has_forbidden_chars" != x; then
26521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26525      # Going to short mode and back again did indeed matter. Since short mode is
26526      # case insensitive, let's make it lowercase to improve readability.
26527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26528      # Now convert it back to Unix-style (cygpath)
26529      input_path=`$CYGPATH -u "$shortmode_path"`
26530      new_path="$input_path"
26531    fi
26532  fi
26533
26534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26535  if test "x$test_cygdrive_prefix" = x; then
26536    # As a simple fix, exclude /usr/bin since it's not a real path.
26537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26539      # a path prefixed by /cygdrive for fixpath to work.
26540      new_path="$CYGWIN_ROOT_PATH$input_path"
26541    fi
26542  fi
26543
26544  # remove trailing .exe if any
26545  new_path="${new_path/%.exe/}"
26546
26547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26548
26549  # First separate the path from the arguments. This will split at the first
26550  # space.
26551  complete="$VS_ENV_CMD"
26552  path="${complete%% *}"
26553  tmp="$complete EOL"
26554  arguments="${tmp#* }"
26555
26556  # Input might be given as Windows format, start by converting to
26557  # unix format.
26558  new_path="$path"
26559
26560  windows_path="$new_path"
26561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26562    unix_path=`$CYGPATH -u "$windows_path"`
26563    new_path="$unix_path"
26564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26566    new_path="$unix_path"
26567  fi
26568
26569
26570  # Now try to locate executable using which
26571  new_path=`$WHICH "$new_path" 2> /dev/null`
26572
26573  if test "x$new_path" = x; then
26574    # Oops. Which didn't find the executable.
26575    # The splitting of arguments from the executable at a space might have been incorrect,
26576    # since paths with space are more likely in Windows. Give it another try with the whole
26577    # argument.
26578    path="$complete"
26579    arguments="EOL"
26580    new_path="$path"
26581
26582  windows_path="$new_path"
26583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26584    unix_path=`$CYGPATH -u "$windows_path"`
26585    new_path="$unix_path"
26586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26588    new_path="$unix_path"
26589  fi
26590
26591
26592    new_path=`$WHICH "$new_path" 2> /dev/null`
26593    # bat and cmd files are not always considered executable in MSYS causing which
26594    # to not find them
26595    if test "x$new_path" = x \
26596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26598      new_path="$path"
26599
26600  windows_path="$new_path"
26601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26602    unix_path=`$CYGPATH -u "$windows_path"`
26603    new_path="$unix_path"
26604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26606    new_path="$unix_path"
26607  fi
26608
26609    fi
26610
26611    if test "x$new_path" = x; then
26612      # It's still not found. Now this is an unrecoverable error.
26613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26614$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26615      has_space=`$ECHO "$complete" | $GREP " "`
26616      if test "x$has_space" != x; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26619      fi
26620      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26621    fi
26622  fi
26623
26624  # Now new_path has a complete unix path to the binary
26625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26626    # Keep paths in /bin as-is, but remove trailing .exe if any
26627    new_path="${new_path/%.exe/}"
26628    # Do not save /bin paths to all_fixpath_prefixes!
26629  else
26630    # Not in mixed or Windows style, start by that.
26631    new_path=`cmd //c echo $new_path`
26632
26633  input_path="$new_path"
26634  # Check if we need to convert this using DOS-style short mode. If the path
26635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26636  # take no chances and rewrite it.
26637  # Note: m4 eats our [], so we need to use [ and ] instead.
26638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26639  if test "x$has_forbidden_chars" != x; then
26640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26642  fi
26643
26644    # Output is in $new_path
26645
26646  windows_path="$new_path"
26647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648    unix_path=`$CYGPATH -u "$windows_path"`
26649    new_path="$unix_path"
26650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652    new_path="$unix_path"
26653  fi
26654
26655    # remove trailing .exe if any
26656    new_path="${new_path/%.exe/}"
26657
26658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26660  fi
26661
26662  else
26663    # We're on a posix platform. Hooray! :)
26664    # First separate the path from the arguments. This will split at the first
26665    # space.
26666    complete="$VS_ENV_CMD"
26667    path="${complete%% *}"
26668    tmp="$complete EOL"
26669    arguments="${tmp#* }"
26670
26671    # Cannot rely on the command "which" here since it doesn't always work.
26672    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26673    if test -z "$is_absolute_path"; then
26674      # Path to executable is not absolute. Find it.
26675      IFS_save="$IFS"
26676      IFS=:
26677      for p in $PATH; do
26678        if test -f "$p/$path" && test -x "$p/$path"; then
26679          new_path="$p/$path"
26680          break
26681        fi
26682      done
26683      IFS="$IFS_save"
26684    else
26685      # This is an absolute path, we can use it without further modifications.
26686      new_path="$path"
26687    fi
26688
26689    if test "x$new_path" = x; then
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26691$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26692      has_space=`$ECHO "$complete" | $GREP " "`
26693      if test "x$has_space" != x; then
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26696      fi
26697      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26698    fi
26699  fi
26700
26701  # Now join together the path and the arguments once again
26702  if test "x$arguments" != xEOL; then
26703    new_complete="$new_path ${arguments% *}"
26704  else
26705    new_complete="$new_path"
26706  fi
26707
26708  if test "x$complete" != "x$new_complete"; then
26709    VS_ENV_CMD="$new_complete"
26710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
26711$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
26712  fi
26713
26714
26715      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
26716      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
26717$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
26718
26719      # We need to create a couple of temporary files.
26720      VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
26721      $MKDIR -p $VS_ENV_TMP_DIR
26722
26723      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
26724      # Instead create a shell script which will set the relevant variables when run.
26725      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
26726
26727  unix_path="$WINPATH_VS_ENV_CMD"
26728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26729    windows_path=`$CYGPATH -m "$unix_path"`
26730    WINPATH_VS_ENV_CMD="$windows_path"
26731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26732    windows_path=`cmd //c echo $unix_path`
26733    WINPATH_VS_ENV_CMD="$windows_path"
26734  fi
26735
26736      WINPATH_BASH="$BASH"
26737
26738  unix_path="$WINPATH_BASH"
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740    windows_path=`$CYGPATH -m "$unix_path"`
26741    WINPATH_BASH="$windows_path"
26742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743    windows_path=`cmd //c echo $unix_path`
26744    WINPATH_BASH="$windows_path"
26745  fi
26746
26747
26748      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
26749      # script (executable by bash) that will setup the important variables.
26750      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
26751      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
26752      # This will end up something like:
26753      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
26754      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
26755      # In some cases, the VS_ENV_CMD will change directory, change back so
26756      # the set-vs-env.sh ends up in the right place.
26757      $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
26758      # These will end up something like:
26759      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
26760      # The trailing space for everyone except PATH is no typo, but is needed due
26761      # to trailing \ in the Windows paths. These will be stripped later.
26762      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
26763          >> $EXTRACT_VC_ENV_BAT_FILE
26764      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' \
26765          >> $EXTRACT_VC_ENV_BAT_FILE
26766      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' \
26767          >> $EXTRACT_VC_ENV_BAT_FILE
26768      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
26769          >> $EXTRACT_VC_ENV_BAT_FILE
26770      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
26771          >> $EXTRACT_VC_ENV_BAT_FILE
26772      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
26773          >> $EXTRACT_VC_ENV_BAT_FILE
26774
26775      # Now execute the newly created bat file.
26776      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
26777      # Change directory so we don't need to mess with Windows paths in redirects.
26778      cd $VS_ENV_TMP_DIR
26779      cmd /c extract-vs-env.bat | $CAT
26780      cd $CURDIR
26781
26782      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
26783        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
26784$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26786$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26788$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26789        as_fn_error $? "Cannot continue" "$LINENO" 5
26790      fi
26791
26792      # Now set all paths and other env variables. This will allow the rest of
26793      # the configure script to find and run the compiler in the proper way.
26794      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
26795$as_echo "$as_me: Setting extracted environment variables" >&6;}
26796      . $VS_ENV_TMP_DIR/set-vs-env.sh
26797      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
26798      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
26799    else
26800      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
26801     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
26802$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
26803    fi
26804  fi
26805
26806  # At this point, we should have correct variables in the environment, or we can't continue.
26807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
26808$as_echo_n "checking for Visual Studio variables... " >&6; }
26809
26810  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
26811      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
26812    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
26813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
26814$as_echo "present but broken" >&6; }
26815      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
26816    else
26817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26818$as_echo "ok" >&6; }
26819      # Remove any trailing "\" and " " from the variables.
26820      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
26821      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
26822      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
26823      WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
26824      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
26825      if test -z "$WINDOWSSDKDIR"; then
26826        WINDOWSSDKDIR="$WindowsSdkDir"
26827      fi
26828      # Remove any paths containing # (typically F#) as that messes up make. This
26829      # is needed if visual studio was installed with F# support.
26830      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
26831
26832
26833
26834
26835    fi
26836  else
26837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26838$as_echo "not found" >&6; }
26839
26840    if test "x$VS_ENV_CMD" = x; then
26841      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
26842$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
26843      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
26844$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
26845    else
26846      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
26847$as_echo "$as_me: Running the extraction script failed." >&6;}
26848    fi
26849    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26850$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26851    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26852$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26853    as_fn_error $? "Cannot continue" "$LINENO" 5
26854  fi
26855
26856    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
26857    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
26858    PATH="$VS_PATH"
26859    # The microsoft toolchain also requires INCLUDE and LIB to be set.
26860    export INCLUDE="$VS_INCLUDE"
26861    export LIB="$VS_LIB"
26862  fi
26863
26864  # Before we locate the compilers, we need to sanitize the Xcode build environment
26865  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26866    # determine path to Xcode developer directory
26867    # can be empty in which case all the tools will rely on a sane Xcode installation
26868    SET_DEVELOPER_DIR=
26869
26870    if test -n "$XCODE_PATH"; then
26871      DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26872    fi
26873
26874    # DEVELOPER_DIR could also be provided directly
26875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
26876$as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
26877    if test -n "$DEVELOPER_DIR"; then
26878      if test ! -d "$DEVELOPER_DIR"; then
26879        as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode application bundle using --with-xcode-path" "$LINENO" 5
26880      fi
26881      if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
26882        as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
26883      fi
26884      # make it visible to all the tools immediately
26885      export DEVELOPER_DIR
26886      SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
26887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
26888$as_echo "yes ($DEVELOPER_DIR)" >&6; }
26889    else
26890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26891$as_echo "no" >&6; }
26892    fi
26893
26894
26895    # Extract the first word of "xcodebuild", so it can be a program name with args.
26896set dummy xcodebuild; ac_word=$2
26897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26898$as_echo_n "checking for $ac_word... " >&6; }
26899if ${ac_cv_path_XCODEBUILD+:} false; then :
26900  $as_echo_n "(cached) " >&6
26901else
26902  case $XCODEBUILD in
26903  [\\/]* | ?:[\\/]*)
26904  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
26905  ;;
26906  *)
26907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26908for as_dir in $PATH
26909do
26910  IFS=$as_save_IFS
26911  test -z "$as_dir" && as_dir=.
26912    for ac_exec_ext in '' $ac_executable_extensions; do
26913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26914    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
26915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26916    break 2
26917  fi
26918done
26919  done
26920IFS=$as_save_IFS
26921
26922  ;;
26923esac
26924fi
26925XCODEBUILD=$ac_cv_path_XCODEBUILD
26926if test -n "$XCODEBUILD"; then
26927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
26928$as_echo "$XCODEBUILD" >&6; }
26929else
26930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26931$as_echo "no" >&6; }
26932fi
26933
26934
26935    if test -z "$XCODEBUILD"; then
26936      as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
26937    fi
26938
26939    # Fail-fast: verify we're building on a supported Xcode version
26940    XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
26941    XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
26942    if test "${XC_VERSION_PARTS[0]}" != "6" -a "${XC_VERSION_PARTS[0]}" != "9" -a "${XC_VERSION_PARTS[0]}" != "10" -a "${XC_VERSION_PARTS[0]}" != "11" -a "${XC_VERSION_PARTS[0]}" != "12" ; then
26943      as_fn_error $? "Xcode 6, 9-12 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select." "$LINENO" 5
26944    fi
26945
26946    # Some versions of Xcode command line tools install gcc and g++ as symlinks to
26947    # clang and clang++, which will break the build. So handle that here if we need to.
26948    if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
26949      # use xcrun to find the real gcc and add it's directory to PATH
26950      # then autoconf magic will find it
26951      { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
26952$as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
26953      XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
26954      PATH="$XCODE_BIN_PATH":$PATH
26955    fi
26956
26957    # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
26958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
26959$as_echo_n "checking Determining Xcode SDK path... " >&6; }
26960    # allow SDKNAME to be set to override the default SDK selection
26961    SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
26962    if test -n "$SDKPATH"; then
26963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
26964$as_echo "$SDKPATH" >&6; }
26965    else
26966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
26967$as_echo "(none, will use system headers and frameworks)" >&6; }
26968    fi
26969
26970
26971    # Perform a basic sanity test
26972    if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
26973      as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode using --with-xcode-path" "$LINENO" 5
26974    fi
26975
26976    # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
26977    if test -n "$SDKPATH"; then
26978      # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
26979      CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26980      CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26981      LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26982    fi
26983
26984    if test -d "$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks" ; then
26985      # These always need to be set on macOS 10.X, or we can't find the frameworks embedded in JavaVM.framework
26986      # set this here so it doesn't have to be peppered throughout the forest
26987      CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26988      CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26989      LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26990    fi
26991  fi
26992
26993  # For solaris we really need solaris tools, and not the GNU equivalent.
26994  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26995  # so add that to path before starting to probe.
26996  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26997  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26998    PATH="/usr/ccs/bin:$PATH"
26999  fi
27000
27001  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27002  # override all other locations.
27003  if test "x$TOOLCHAIN_PATH" != x; then
27004    PATH=$TOOLCHAIN_PATH:$PATH
27005  fi
27006
27007
27008  #
27009  # Setup the compilers (CC and CXX)
27010  #
27011
27012  COMPILER_NAME=C
27013  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27014
27015  if test "x$CC" != x; then
27016    # User has supplied compiler name already, always let that override.
27017    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27018$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27019    if test "x`basename $CC`" = "x$CC"; then
27020      # A command without a complete path is provided, search $PATH.
27021
27022      for ac_prog in $CC
27023do
27024  # Extract the first word of "$ac_prog", so it can be a program name with args.
27025set dummy $ac_prog; ac_word=$2
27026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27027$as_echo_n "checking for $ac_word... " >&6; }
27028if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27029  $as_echo_n "(cached) " >&6
27030else
27031  case $POTENTIAL_CC in
27032  [\\/]* | ?:[\\/]*)
27033  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27034  ;;
27035  *)
27036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27037for as_dir in $PATH
27038do
27039  IFS=$as_save_IFS
27040  test -z "$as_dir" && as_dir=.
27041    for ac_exec_ext in '' $ac_executable_extensions; do
27042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27043    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27045    break 2
27046  fi
27047done
27048  done
27049IFS=$as_save_IFS
27050
27051  ;;
27052esac
27053fi
27054POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27055if test -n "$POTENTIAL_CC"; then
27056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27057$as_echo "$POTENTIAL_CC" >&6; }
27058else
27059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27060$as_echo "no" >&6; }
27061fi
27062
27063
27064  test -n "$POTENTIAL_CC" && break
27065done
27066
27067      if test "x$POTENTIAL_CC" != x; then
27068        CC=$POTENTIAL_CC
27069      else
27070        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27071      fi
27072    else
27073      # Otherwise it might already be a complete path
27074      if test ! -x "$CC"; then
27075        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27076      fi
27077    fi
27078  else
27079    # No user supplied value. Locate compiler ourselves.
27080
27081    # If we are cross compiling, assume cross compilation tools follows the
27082    # cross compilation standard where they are prefixed with the autoconf
27083    # standard name for the target. For example the binary
27084    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27085    # If we are not cross compiling, then the default compiler name will be
27086    # used.
27087
27088    CC=
27089    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27090    # before checking the rest of the PATH.
27091    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27092    # step, this should not be necessary.
27093    if test -n "$TOOLCHAIN_PATH"; then
27094      PATH_save="$PATH"
27095      PATH="$TOOLCHAIN_PATH"
27096      for ac_prog in $SEARCH_LIST
27097do
27098  # Extract the first word of "$ac_prog", so it can be a program name with args.
27099set dummy $ac_prog; ac_word=$2
27100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27101$as_echo_n "checking for $ac_word... " >&6; }
27102if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27103  $as_echo_n "(cached) " >&6
27104else
27105  case $TOOLCHAIN_PATH_CC in
27106  [\\/]* | ?:[\\/]*)
27107  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27108  ;;
27109  *)
27110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27111for as_dir in $PATH
27112do
27113  IFS=$as_save_IFS
27114  test -z "$as_dir" && as_dir=.
27115    for ac_exec_ext in '' $ac_executable_extensions; do
27116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27117    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27119    break 2
27120  fi
27121done
27122  done
27123IFS=$as_save_IFS
27124
27125  ;;
27126esac
27127fi
27128TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27129if test -n "$TOOLCHAIN_PATH_CC"; then
27130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27131$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27132else
27133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27134$as_echo "no" >&6; }
27135fi
27136
27137
27138  test -n "$TOOLCHAIN_PATH_CC" && break
27139done
27140
27141      CC=$TOOLCHAIN_PATH_CC
27142      PATH="$PATH_save"
27143    fi
27144
27145    # AC_PATH_PROGS can't be run multiple times with the same variable,
27146    # so create a new name for this run.
27147    if test "x$CC" = x; then
27148      for ac_prog in $TOOLCHAIN_CC_BINARY
27149do
27150  # Extract the first word of "$ac_prog", so it can be a program name with args.
27151set dummy $ac_prog; ac_word=$2
27152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27153$as_echo_n "checking for $ac_word... " >&6; }
27154if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27155  $as_echo_n "(cached) " >&6
27156else
27157  case $POTENTIAL_CC in
27158  [\\/]* | ?:[\\/]*)
27159  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27160  ;;
27161  *)
27162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27163for as_dir in $PATH
27164do
27165  IFS=$as_save_IFS
27166  test -z "$as_dir" && as_dir=.
27167    for ac_exec_ext in '' $ac_executable_extensions; do
27168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27169    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27171    break 2
27172  fi
27173done
27174  done
27175IFS=$as_save_IFS
27176
27177  ;;
27178esac
27179fi
27180POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27181if test -n "$POTENTIAL_CC"; then
27182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27183$as_echo "$POTENTIAL_CC" >&6; }
27184else
27185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27186$as_echo "no" >&6; }
27187fi
27188
27189
27190  test -n "$POTENTIAL_CC" && break
27191done
27192
27193      CC=$POTENTIAL_CC
27194    fi
27195
27196    if test "x$CC" = x; then
27197
27198  # Print a helpful message on how to acquire the necessary build dependency.
27199  # devkit is the help tag: freetype, cups, pulse, alsa etc
27200  MISSING_DEPENDENCY=devkit
27201
27202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27203    cygwin_help $MISSING_DEPENDENCY
27204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205    msys_help $MISSING_DEPENDENCY
27206  else
27207    PKGHANDLER_COMMAND=
27208
27209    case $PKGHANDLER in
27210      apt-get)
27211        apt_help     $MISSING_DEPENDENCY ;;
27212      yum)
27213        yum_help     $MISSING_DEPENDENCY ;;
27214      port)
27215        port_help    $MISSING_DEPENDENCY ;;
27216      pkgutil)
27217        pkgutil_help $MISSING_DEPENDENCY ;;
27218      pkgadd)
27219        pkgadd_help  $MISSING_DEPENDENCY ;;
27220    esac
27221
27222    if test "x$PKGHANDLER_COMMAND" != x; then
27223      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27224    fi
27225  fi
27226
27227      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27228    fi
27229  fi
27230
27231  # Now we have a compiler binary in CC. Make sure it's okay.
27232
27233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234
27235  # First separate the path from the arguments. This will split at the first
27236  # space.
27237  complete="$CC"
27238  path="${complete%% *}"
27239  tmp="$complete EOL"
27240  arguments="${tmp#* }"
27241
27242  # Input might be given as Windows format, start by converting to
27243  # unix format.
27244  new_path=`$CYGPATH -u "$path"`
27245
27246  # Now try to locate executable using which
27247  new_path=`$WHICH "$new_path" 2> /dev/null`
27248  # bat and cmd files are not always considered executable in cygwin causing which
27249  # to not find them
27250  if test "x$new_path" = x \
27251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27253    new_path=`$CYGPATH -u "$path"`
27254  fi
27255  if test "x$new_path" = x; then
27256    # Oops. Which didn't find the executable.
27257    # The splitting of arguments from the executable at a space might have been incorrect,
27258    # since paths with space are more likely in Windows. Give it another try with the whole
27259    # argument.
27260    path="$complete"
27261    arguments="EOL"
27262    new_path=`$CYGPATH -u "$path"`
27263    new_path=`$WHICH "$new_path" 2> /dev/null`
27264    # bat and cmd files are not always considered executable in cygwin causing which
27265    # to not find them
27266    if test "x$new_path" = x \
27267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27269      new_path=`$CYGPATH -u "$path"`
27270    fi
27271    if test "x$new_path" = x; then
27272      # It's still not found. Now this is an unrecoverable error.
27273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27274$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27275      has_space=`$ECHO "$complete" | $GREP " "`
27276      if test "x$has_space" != x; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27279      fi
27280      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27281    fi
27282  fi
27283
27284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27287  # "foo.exe" is OK but "foo" is an error.
27288  #
27289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27290  # It is also a way to make sure we got the proper file name for the real test later on.
27291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27292  if test "x$test_shortpath" = x; then
27293    # Short path failed, file does not exist as specified.
27294    # Try adding .exe or .cmd
27295    if test -f "${new_path}.exe"; then
27296      input_to_shortpath="${new_path}.exe"
27297    elif test -f "${new_path}.cmd"; then
27298      input_to_shortpath="${new_path}.cmd"
27299    else
27300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27301$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27305    fi
27306  else
27307    input_to_shortpath="$new_path"
27308  fi
27309
27310  # Call helper function which possibly converts this using DOS-style short mode.
27311  # If so, the updated path is stored in $new_path.
27312  new_path="$input_to_shortpath"
27313
27314  input_path="$input_to_shortpath"
27315  # Check if we need to convert this using DOS-style short mode. If the path
27316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27317  # take no chances and rewrite it.
27318  # Note: m4 eats our [], so we need to use [ and ] instead.
27319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27320  if test "x$has_forbidden_chars" != x; then
27321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27325      # Going to short mode and back again did indeed matter. Since short mode is
27326      # case insensitive, let's make it lowercase to improve readability.
27327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27328      # Now convert it back to Unix-style (cygpath)
27329      input_path=`$CYGPATH -u "$shortmode_path"`
27330      new_path="$input_path"
27331    fi
27332  fi
27333
27334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27335  if test "x$test_cygdrive_prefix" = x; then
27336    # As a simple fix, exclude /usr/bin since it's not a real path.
27337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27339      # a path prefixed by /cygdrive for fixpath to work.
27340      new_path="$CYGWIN_ROOT_PATH$input_path"
27341    fi
27342  fi
27343
27344  # remove trailing .exe if any
27345  new_path="${new_path/%.exe/}"
27346
27347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27348
27349  # First separate the path from the arguments. This will split at the first
27350  # space.
27351  complete="$CC"
27352  path="${complete%% *}"
27353  tmp="$complete EOL"
27354  arguments="${tmp#* }"
27355
27356  # Input might be given as Windows format, start by converting to
27357  # unix format.
27358  new_path="$path"
27359
27360  windows_path="$new_path"
27361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27362    unix_path=`$CYGPATH -u "$windows_path"`
27363    new_path="$unix_path"
27364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27366    new_path="$unix_path"
27367  fi
27368
27369
27370  # Now try to locate executable using which
27371  new_path=`$WHICH "$new_path" 2> /dev/null`
27372
27373  if test "x$new_path" = x; then
27374    # Oops. Which didn't find the executable.
27375    # The splitting of arguments from the executable at a space might have been incorrect,
27376    # since paths with space are more likely in Windows. Give it another try with the whole
27377    # argument.
27378    path="$complete"
27379    arguments="EOL"
27380    new_path="$path"
27381
27382  windows_path="$new_path"
27383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27384    unix_path=`$CYGPATH -u "$windows_path"`
27385    new_path="$unix_path"
27386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27388    new_path="$unix_path"
27389  fi
27390
27391
27392    new_path=`$WHICH "$new_path" 2> /dev/null`
27393    # bat and cmd files are not always considered executable in MSYS causing which
27394    # to not find them
27395    if test "x$new_path" = x \
27396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27398      new_path="$path"
27399
27400  windows_path="$new_path"
27401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27402    unix_path=`$CYGPATH -u "$windows_path"`
27403    new_path="$unix_path"
27404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27406    new_path="$unix_path"
27407  fi
27408
27409    fi
27410
27411    if test "x$new_path" = x; then
27412      # It's still not found. Now this is an unrecoverable error.
27413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27414$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27415      has_space=`$ECHO "$complete" | $GREP " "`
27416      if test "x$has_space" != x; then
27417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27419      fi
27420      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27421    fi
27422  fi
27423
27424  # Now new_path has a complete unix path to the binary
27425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27426    # Keep paths in /bin as-is, but remove trailing .exe if any
27427    new_path="${new_path/%.exe/}"
27428    # Do not save /bin paths to all_fixpath_prefixes!
27429  else
27430    # Not in mixed or Windows style, start by that.
27431    new_path=`cmd //c echo $new_path`
27432
27433  input_path="$new_path"
27434  # Check if we need to convert this using DOS-style short mode. If the path
27435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27436  # take no chances and rewrite it.
27437  # Note: m4 eats our [], so we need to use [ and ] instead.
27438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27439  if test "x$has_forbidden_chars" != x; then
27440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27442  fi
27443
27444    # Output is in $new_path
27445
27446  windows_path="$new_path"
27447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448    unix_path=`$CYGPATH -u "$windows_path"`
27449    new_path="$unix_path"
27450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452    new_path="$unix_path"
27453  fi
27454
27455    # remove trailing .exe if any
27456    new_path="${new_path/%.exe/}"
27457
27458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27460  fi
27461
27462  else
27463    # We're on a posix platform. Hooray! :)
27464    # First separate the path from the arguments. This will split at the first
27465    # space.
27466    complete="$CC"
27467    path="${complete%% *}"
27468    tmp="$complete EOL"
27469    arguments="${tmp#* }"
27470
27471    # Cannot rely on the command "which" here since it doesn't always work.
27472    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27473    if test -z "$is_absolute_path"; then
27474      # Path to executable is not absolute. Find it.
27475      IFS_save="$IFS"
27476      IFS=:
27477      for p in $PATH; do
27478        if test -f "$p/$path" && test -x "$p/$path"; then
27479          new_path="$p/$path"
27480          break
27481        fi
27482      done
27483      IFS="$IFS_save"
27484    else
27485      # This is an absolute path, we can use it without further modifications.
27486      new_path="$path"
27487    fi
27488
27489    if test "x$new_path" = x; then
27490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27491$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27492      has_space=`$ECHO "$complete" | $GREP " "`
27493      if test "x$has_space" != x; then
27494        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27496      fi
27497      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27498    fi
27499  fi
27500
27501  # Now join together the path and the arguments once again
27502  if test "x$arguments" != xEOL; then
27503    new_complete="$new_path ${arguments% *}"
27504  else
27505    new_complete="$new_path"
27506  fi
27507
27508  if test "x$complete" != "x$new_complete"; then
27509    CC="$new_complete"
27510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27511$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27512  fi
27513
27514  TEST_COMPILER="$CC"
27515
27516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27517$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27518  SYMLINK_ORIGINAL="$TEST_COMPILER"
27519
27520  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27521    # Follow a chain of symbolic links. Use readlink
27522    # where it exists, else fall back to horribly
27523    # complicated shell code.
27524    if test "x$READLINK_TESTED" != yes; then
27525      # On MacOSX there is a readlink tool with a different
27526      # purpose than the GNU readlink tool. Check the found readlink.
27527      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27528      if test "x$ISGNU" = x; then
27529        # A readlink that we do not know how to use.
27530        # Are there other non-GNU readlinks out there?
27531        READLINK_TESTED=yes
27532        READLINK=
27533      fi
27534    fi
27535
27536    if test "x$READLINK" != x; then
27537      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
27538    else
27539      # Save the current directory for restoring afterwards
27540      STARTDIR=$PWD
27541      COUNTER=0
27542      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
27543      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
27544      cd $sym_link_dir
27545      # Use -P flag to resolve symlinks in directories.
27546      cd `$THEPWDCMD -P`
27547      sym_link_dir=`$THEPWDCMD -P`
27548      # Resolve file symlinks
27549      while test $COUNTER -lt 20; do
27550        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27551        if test "x$ISLINK" == x; then
27552          # This is not a symbolic link! We are done!
27553          break
27554        fi
27555        # Again resolve directory symlinks since the target of the just found
27556        # link could be in a different directory
27557        cd `$DIRNAME $ISLINK`
27558        sym_link_dir=`$THEPWDCMD -P`
27559        sym_link_file=`$BASENAME $ISLINK`
27560        let COUNTER=COUNTER+1
27561      done
27562      cd $STARTDIR
27563      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
27564    fi
27565  fi
27566
27567  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
27568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
27569$as_echo "no symlink" >&6; }
27570  else
27571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
27572$as_echo "$SYMLINK_ORIGINAL" >&6; }
27573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27574$as_echo_n "checking if CC is disguised ccache... " >&6; }
27575    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
27576    if test "x$COMPILER_BASENAME" = "xccache"; then
27577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27578$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27579      # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27580      # We want to control ccache invocation ourselves, so ignore this cc and try
27581      # searching again.
27582
27583      # Remove the path to the fake ccache cc from the PATH
27584      RETRY_COMPILER_SAVED_PATH="$PATH"
27585      COMPILER_DIRNAME=`$DIRNAME $CC`
27586      PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27587      # Try again looking for our compiler
27588      if test -n "$ac_tool_prefix"; then
27589  for ac_prog in $TOOLCHAIN_CC_BINARY
27590  do
27591    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27592set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27594$as_echo_n "checking for $ac_word... " >&6; }
27595if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27596  $as_echo_n "(cached) " >&6
27597else
27598  if test -n "$PROPER_COMPILER_CC"; then
27599  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27600else
27601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27602for as_dir in $PATH
27603do
27604  IFS=$as_save_IFS
27605  test -z "$as_dir" && as_dir=.
27606    for ac_exec_ext in '' $ac_executable_extensions; do
27607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27608    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27610    break 2
27611  fi
27612done
27613  done
27614IFS=$as_save_IFS
27615
27616fi
27617fi
27618PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27619if test -n "$PROPER_COMPILER_CC"; then
27620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27621$as_echo "$PROPER_COMPILER_CC" >&6; }
27622else
27623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27624$as_echo "no" >&6; }
27625fi
27626
27627
27628    test -n "$PROPER_COMPILER_CC" && break
27629  done
27630fi
27631if test -z "$PROPER_COMPILER_CC"; then
27632  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27633  for ac_prog in $TOOLCHAIN_CC_BINARY
27634do
27635  # Extract the first word of "$ac_prog", so it can be a program name with args.
27636set dummy $ac_prog; ac_word=$2
27637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27638$as_echo_n "checking for $ac_word... " >&6; }
27639if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27640  $as_echo_n "(cached) " >&6
27641else
27642  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27643  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27644else
27645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27646for as_dir in $PATH
27647do
27648  IFS=$as_save_IFS
27649  test -z "$as_dir" && as_dir=.
27650    for ac_exec_ext in '' $ac_executable_extensions; do
27651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27652    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27654    break 2
27655  fi
27656done
27657  done
27658IFS=$as_save_IFS
27659
27660fi
27661fi
27662ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27663if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27665$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27666else
27667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27668$as_echo "no" >&6; }
27669fi
27670
27671
27672  test -n "$ac_ct_PROPER_COMPILER_CC" && break
27673done
27674
27675  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27676    PROPER_COMPILER_CC=""
27677  else
27678    case $cross_compiling:$ac_tool_warned in
27679yes:)
27680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27682ac_tool_warned=yes ;;
27683esac
27684    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
27685  fi
27686fi
27687
27688
27689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27690
27691  # First separate the path from the arguments. This will split at the first
27692  # space.
27693  complete="$PROPER_COMPILER_CC"
27694  path="${complete%% *}"
27695  tmp="$complete EOL"
27696  arguments="${tmp#* }"
27697
27698  # Input might be given as Windows format, start by converting to
27699  # unix format.
27700  new_path=`$CYGPATH -u "$path"`
27701
27702  # Now try to locate executable using which
27703  new_path=`$WHICH "$new_path" 2> /dev/null`
27704  # bat and cmd files are not always considered executable in cygwin causing which
27705  # to not find them
27706  if test "x$new_path" = x \
27707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27709    new_path=`$CYGPATH -u "$path"`
27710  fi
27711  if test "x$new_path" = x; then
27712    # Oops. Which didn't find the executable.
27713    # The splitting of arguments from the executable at a space might have been incorrect,
27714    # since paths with space are more likely in Windows. Give it another try with the whole
27715    # argument.
27716    path="$complete"
27717    arguments="EOL"
27718    new_path=`$CYGPATH -u "$path"`
27719    new_path=`$WHICH "$new_path" 2> /dev/null`
27720    # bat and cmd files are not always considered executable in cygwin causing which
27721    # to not find them
27722    if test "x$new_path" = x \
27723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27725      new_path=`$CYGPATH -u "$path"`
27726    fi
27727    if test "x$new_path" = x; then
27728      # It's still not found. Now this is an unrecoverable error.
27729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27730$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27731      has_space=`$ECHO "$complete" | $GREP " "`
27732      if test "x$has_space" != x; then
27733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27735      fi
27736      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27737    fi
27738  fi
27739
27740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27743  # "foo.exe" is OK but "foo" is an error.
27744  #
27745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27746  # It is also a way to make sure we got the proper file name for the real test later on.
27747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27748  if test "x$test_shortpath" = x; then
27749    # Short path failed, file does not exist as specified.
27750    # Try adding .exe or .cmd
27751    if test -f "${new_path}.exe"; then
27752      input_to_shortpath="${new_path}.exe"
27753    elif test -f "${new_path}.cmd"; then
27754      input_to_shortpath="${new_path}.cmd"
27755    else
27756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
27757$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
27758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27760      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27761    fi
27762  else
27763    input_to_shortpath="$new_path"
27764  fi
27765
27766  # Call helper function which possibly converts this using DOS-style short mode.
27767  # If so, the updated path is stored in $new_path.
27768  new_path="$input_to_shortpath"
27769
27770  input_path="$input_to_shortpath"
27771  # Check if we need to convert this using DOS-style short mode. If the path
27772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27773  # take no chances and rewrite it.
27774  # Note: m4 eats our [], so we need to use [ and ] instead.
27775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27776  if test "x$has_forbidden_chars" != x; then
27777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27781      # Going to short mode and back again did indeed matter. Since short mode is
27782      # case insensitive, let's make it lowercase to improve readability.
27783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27784      # Now convert it back to Unix-style (cygpath)
27785      input_path=`$CYGPATH -u "$shortmode_path"`
27786      new_path="$input_path"
27787    fi
27788  fi
27789
27790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27791  if test "x$test_cygdrive_prefix" = x; then
27792    # As a simple fix, exclude /usr/bin since it's not a real path.
27793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27795      # a path prefixed by /cygdrive for fixpath to work.
27796      new_path="$CYGWIN_ROOT_PATH$input_path"
27797    fi
27798  fi
27799
27800  # remove trailing .exe if any
27801  new_path="${new_path/%.exe/}"
27802
27803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27804
27805  # First separate the path from the arguments. This will split at the first
27806  # space.
27807  complete="$PROPER_COMPILER_CC"
27808  path="${complete%% *}"
27809  tmp="$complete EOL"
27810  arguments="${tmp#* }"
27811
27812  # Input might be given as Windows format, start by converting to
27813  # unix format.
27814  new_path="$path"
27815
27816  windows_path="$new_path"
27817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27818    unix_path=`$CYGPATH -u "$windows_path"`
27819    new_path="$unix_path"
27820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27822    new_path="$unix_path"
27823  fi
27824
27825
27826  # Now try to locate executable using which
27827  new_path=`$WHICH "$new_path" 2> /dev/null`
27828
27829  if test "x$new_path" = x; then
27830    # Oops. Which didn't find the executable.
27831    # The splitting of arguments from the executable at a space might have been incorrect,
27832    # since paths with space are more likely in Windows. Give it another try with the whole
27833    # argument.
27834    path="$complete"
27835    arguments="EOL"
27836    new_path="$path"
27837
27838  windows_path="$new_path"
27839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27840    unix_path=`$CYGPATH -u "$windows_path"`
27841    new_path="$unix_path"
27842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27844    new_path="$unix_path"
27845  fi
27846
27847
27848    new_path=`$WHICH "$new_path" 2> /dev/null`
27849    # bat and cmd files are not always considered executable in MSYS causing which
27850    # to not find them
27851    if test "x$new_path" = x \
27852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27854      new_path="$path"
27855
27856  windows_path="$new_path"
27857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27858    unix_path=`$CYGPATH -u "$windows_path"`
27859    new_path="$unix_path"
27860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27862    new_path="$unix_path"
27863  fi
27864
27865    fi
27866
27867    if test "x$new_path" = x; then
27868      # It's still not found. Now this is an unrecoverable error.
27869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27870$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27871      has_space=`$ECHO "$complete" | $GREP " "`
27872      if test "x$has_space" != x; then
27873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27875      fi
27876      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27877    fi
27878  fi
27879
27880  # Now new_path has a complete unix path to the binary
27881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27882    # Keep paths in /bin as-is, but remove trailing .exe if any
27883    new_path="${new_path/%.exe/}"
27884    # Do not save /bin paths to all_fixpath_prefixes!
27885  else
27886    # Not in mixed or Windows style, start by that.
27887    new_path=`cmd //c echo $new_path`
27888
27889  input_path="$new_path"
27890  # Check if we need to convert this using DOS-style short mode. If the path
27891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27892  # take no chances and rewrite it.
27893  # Note: m4 eats our [], so we need to use [ and ] instead.
27894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27895  if test "x$has_forbidden_chars" != x; then
27896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27898  fi
27899
27900    # Output is in $new_path
27901
27902  windows_path="$new_path"
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    unix_path=`$CYGPATH -u "$windows_path"`
27905    new_path="$unix_path"
27906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27908    new_path="$unix_path"
27909  fi
27910
27911    # remove trailing .exe if any
27912    new_path="${new_path/%.exe/}"
27913
27914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27916  fi
27917
27918  else
27919    # We're on a posix platform. Hooray! :)
27920    # First separate the path from the arguments. This will split at the first
27921    # space.
27922    complete="$PROPER_COMPILER_CC"
27923    path="${complete%% *}"
27924    tmp="$complete EOL"
27925    arguments="${tmp#* }"
27926
27927    # Cannot rely on the command "which" here since it doesn't always work.
27928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27929    if test -z "$is_absolute_path"; then
27930      # Path to executable is not absolute. Find it.
27931      IFS_save="$IFS"
27932      IFS=:
27933      for p in $PATH; do
27934        if test -f "$p/$path" && test -x "$p/$path"; then
27935          new_path="$p/$path"
27936          break
27937        fi
27938      done
27939      IFS="$IFS_save"
27940    else
27941      # This is an absolute path, we can use it without further modifications.
27942      new_path="$path"
27943    fi
27944
27945    if test "x$new_path" = x; then
27946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27947$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27948      has_space=`$ECHO "$complete" | $GREP " "`
27949      if test "x$has_space" != x; then
27950        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27952      fi
27953      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27954    fi
27955  fi
27956
27957  # Now join together the path and the arguments once again
27958  if test "x$arguments" != xEOL; then
27959    new_complete="$new_path ${arguments% *}"
27960  else
27961    new_complete="$new_path"
27962  fi
27963
27964  if test "x$complete" != "x$new_complete"; then
27965    PROPER_COMPILER_CC="$new_complete"
27966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
27967$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
27968  fi
27969
27970      PATH="$RETRY_COMPILER_SAVED_PATH"
27971
27972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
27973$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
27974
27975  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27976    # Follow a chain of symbolic links. Use readlink
27977    # where it exists, else fall back to horribly
27978    # complicated shell code.
27979    if test "x$READLINK_TESTED" != yes; then
27980      # On MacOSX there is a readlink tool with a different
27981      # purpose than the GNU readlink tool. Check the found readlink.
27982      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27983      if test "x$ISGNU" = x; then
27984        # A readlink that we do not know how to use.
27985        # Are there other non-GNU readlinks out there?
27986        READLINK_TESTED=yes
27987        READLINK=
27988      fi
27989    fi
27990
27991    if test "x$READLINK" != x; then
27992      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
27993    else
27994      # Save the current directory for restoring afterwards
27995      STARTDIR=$PWD
27996      COUNTER=0
27997      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
27998      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
27999      cd $sym_link_dir
28000      # Use -P flag to resolve symlinks in directories.
28001      cd `$THEPWDCMD -P`
28002      sym_link_dir=`$THEPWDCMD -P`
28003      # Resolve file symlinks
28004      while test $COUNTER -lt 20; do
28005        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28006        if test "x$ISLINK" == x; then
28007          # This is not a symbolic link! We are done!
28008          break
28009        fi
28010        # Again resolve directory symlinks since the target of the just found
28011        # link could be in a different directory
28012        cd `$DIRNAME $ISLINK`
28013        sym_link_dir=`$THEPWDCMD -P`
28014        sym_link_file=`$BASENAME $ISLINK`
28015        let COUNTER=COUNTER+1
28016      done
28017      cd $STARTDIR
28018      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28019    fi
28020  fi
28021
28022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28023$as_echo "$PROPER_COMPILER_CC" >&6; }
28024      CC="$PROPER_COMPILER_CC"
28025    else
28026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28027$as_echo "no, keeping CC" >&6; }
28028    fi
28029  fi
28030
28031
28032  COMPILER=$CC
28033  COMPILER_NAME=$COMPILER_NAME
28034
28035  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28036    # cc -V output typically looks like
28037    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28038    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28039    # Check that this is likely to be the Solaris Studio cc.
28040    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28041    if test $? -ne 0; then
28042      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28043      { $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
28044$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28045      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28046$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28047      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28048$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28049      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28050    fi
28051    # Remove usage instructions (if present), and
28052    # collapse compiler output into a single line
28053    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28054        $SED -e 's/ *[Uu]sage:.*//'`
28055    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28056        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28057  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28058    # xlc -qversion output typically looks like
28059    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28060    #     Version: 11.01.0000.0015
28061    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28062    # Check that this is likely to be the IBM XL C compiler.
28063    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28064    if test $? -ne 0; then
28065      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28066      { $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
28067$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28068      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28069$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28070      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28071$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28072      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28073    fi
28074    # Collapse compiler output into a single line
28075    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28076    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28077        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28078  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28079    # There is no specific version flag, but all output starts with a version string.
28080    # First line typically looks something like:
28081    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28082    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28083    # Check that this is likely to be Microsoft CL.EXE.
28084    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28085    if test $? -ne 0; then
28086      { $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
28087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28089$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28091    fi
28092    # Collapse compiler output into a single line
28093    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28094    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28095        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28096  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28097    # gcc --version output typically looks like
28098    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28099    #     Copyright (C) 2013 Free Software Foundation, Inc.
28100    #     This is free software; see the source for copying conditions.  There is NO
28101    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28102    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28103    # Check that this is likely to be GCC.
28104    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28105    if test $? -ne 0; then
28106      { $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
28107$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28108      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28109$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28110      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28111    fi
28112    # Remove Copyright and legalese from version string, and
28113    # collapse into a single line
28114    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28115        $SED -e 's/ *Copyright .*//'`
28116    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28117        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
28118  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28119    # clang --version output typically looks like
28120    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28121    #    clang version 3.3 (tags/RELEASE_33/final)
28122    # or
28123    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28124    #    Target: x86_64-pc-linux-gnu
28125    #    Thread model: posix
28126    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28127    # Check that this is likely to be clang
28128    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28129    if test $? -ne 0; then
28130      { $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
28131$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28132      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28133$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28134      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28135    fi
28136    # Collapse compiler output into a single line
28137    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28138    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28139        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28140
28141  else
28142      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28143  fi
28144  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28145  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28146  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28147  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28148
28149  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28150$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28151
28152
28153  # Now that we have resolved CC ourself, let autoconf have its go at it
28154  ac_ext=c
28155ac_cpp='$CPP $CPPFLAGS'
28156ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28157ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28158ac_compiler_gnu=$ac_cv_c_compiler_gnu
28159if test -n "$ac_tool_prefix"; then
28160  for ac_prog in $CC
28161  do
28162    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28163set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28165$as_echo_n "checking for $ac_word... " >&6; }
28166if ${ac_cv_prog_CC+:} false; then :
28167  $as_echo_n "(cached) " >&6
28168else
28169  if test -n "$CC"; then
28170  ac_cv_prog_CC="$CC" # Let the user override the test.
28171else
28172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28173for as_dir in $PATH
28174do
28175  IFS=$as_save_IFS
28176  test -z "$as_dir" && as_dir=.
28177    for ac_exec_ext in '' $ac_executable_extensions; do
28178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28179    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28181    break 2
28182  fi
28183done
28184  done
28185IFS=$as_save_IFS
28186
28187fi
28188fi
28189CC=$ac_cv_prog_CC
28190if test -n "$CC"; then
28191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28192$as_echo "$CC" >&6; }
28193else
28194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28195$as_echo "no" >&6; }
28196fi
28197
28198
28199    test -n "$CC" && break
28200  done
28201fi
28202if test -z "$CC"; then
28203  ac_ct_CC=$CC
28204  for ac_prog in $CC
28205do
28206  # Extract the first word of "$ac_prog", so it can be a program name with args.
28207set dummy $ac_prog; ac_word=$2
28208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28209$as_echo_n "checking for $ac_word... " >&6; }
28210if ${ac_cv_prog_ac_ct_CC+:} false; then :
28211  $as_echo_n "(cached) " >&6
28212else
28213  if test -n "$ac_ct_CC"; then
28214  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28215else
28216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28217for as_dir in $PATH
28218do
28219  IFS=$as_save_IFS
28220  test -z "$as_dir" && as_dir=.
28221    for ac_exec_ext in '' $ac_executable_extensions; do
28222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28223    ac_cv_prog_ac_ct_CC="$ac_prog"
28224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28225    break 2
28226  fi
28227done
28228  done
28229IFS=$as_save_IFS
28230
28231fi
28232fi
28233ac_ct_CC=$ac_cv_prog_ac_ct_CC
28234if test -n "$ac_ct_CC"; then
28235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28236$as_echo "$ac_ct_CC" >&6; }
28237else
28238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28239$as_echo "no" >&6; }
28240fi
28241
28242
28243  test -n "$ac_ct_CC" && break
28244done
28245
28246  if test "x$ac_ct_CC" = x; then
28247    CC=""
28248  else
28249    case $cross_compiling:$ac_tool_warned in
28250yes:)
28251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28253ac_tool_warned=yes ;;
28254esac
28255    CC=$ac_ct_CC
28256  fi
28257fi
28258
28259
28260test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28262as_fn_error $? "no acceptable C compiler found in \$PATH
28263See \`config.log' for more details" "$LINENO" 5; }
28264
28265# Provide some information about the compiler.
28266$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28267set X $ac_compile
28268ac_compiler=$2
28269for ac_option in --version -v -V -qversion; do
28270  { { ac_try="$ac_compiler $ac_option >&5"
28271case "(($ac_try" in
28272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28273  *) ac_try_echo=$ac_try;;
28274esac
28275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28276$as_echo "$ac_try_echo"; } >&5
28277  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28278  ac_status=$?
28279  if test -s conftest.err; then
28280    sed '10a\
28281... rest of stderr output deleted ...
28282         10q' conftest.err >conftest.er1
28283    cat conftest.er1 >&5
28284  fi
28285  rm -f conftest.er1 conftest.err
28286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28287  test $ac_status = 0; }
28288done
28289
28290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28291/* end confdefs.h.  */
28292
28293int
28294main ()
28295{
28296
28297  ;
28298  return 0;
28299}
28300_ACEOF
28301ac_clean_files_save=$ac_clean_files
28302ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28303# Try to create an executable without -o first, disregard a.out.
28304# It will help us diagnose broken compilers, and finding out an intuition
28305# of exeext.
28306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28307$as_echo_n "checking whether the C compiler works... " >&6; }
28308ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28309
28310# The possible output files:
28311ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28312
28313ac_rmfiles=
28314for ac_file in $ac_files
28315do
28316  case $ac_file in
28317    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28318    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28319  esac
28320done
28321rm -f $ac_rmfiles
28322
28323if { { ac_try="$ac_link_default"
28324case "(($ac_try" in
28325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28326  *) ac_try_echo=$ac_try;;
28327esac
28328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28329$as_echo "$ac_try_echo"; } >&5
28330  (eval "$ac_link_default") 2>&5
28331  ac_status=$?
28332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28333  test $ac_status = 0; }; then :
28334  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28335# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28336# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28337# so that the user can short-circuit this test for compilers unknown to
28338# Autoconf.
28339for ac_file in $ac_files ''
28340do
28341  test -f "$ac_file" || continue
28342  case $ac_file in
28343    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28344	;;
28345    [ab].out )
28346	# We found the default executable, but exeext='' is most
28347	# certainly right.
28348	break;;
28349    *.* )
28350	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28351	then :; else
28352	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28353	fi
28354	# We set ac_cv_exeext here because the later test for it is not
28355	# safe: cross compilers may not add the suffix if given an `-o'
28356	# argument, so we may need to know it at that point already.
28357	# Even if this section looks crufty: it has the advantage of
28358	# actually working.
28359	break;;
28360    * )
28361	break;;
28362  esac
28363done
28364test "$ac_cv_exeext" = no && ac_cv_exeext=
28365
28366else
28367  ac_file=''
28368fi
28369if test -z "$ac_file"; then :
28370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28371$as_echo "no" >&6; }
28372$as_echo "$as_me: failed program was:" >&5
28373sed 's/^/| /' conftest.$ac_ext >&5
28374
28375{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28377as_fn_error 77 "C compiler cannot create executables
28378See \`config.log' for more details" "$LINENO" 5; }
28379else
28380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28381$as_echo "yes" >&6; }
28382fi
28383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28384$as_echo_n "checking for C compiler default output file name... " >&6; }
28385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28386$as_echo "$ac_file" >&6; }
28387ac_exeext=$ac_cv_exeext
28388
28389rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28390ac_clean_files=$ac_clean_files_save
28391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28392$as_echo_n "checking for suffix of executables... " >&6; }
28393if { { ac_try="$ac_link"
28394case "(($ac_try" in
28395  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28396  *) ac_try_echo=$ac_try;;
28397esac
28398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28399$as_echo "$ac_try_echo"; } >&5
28400  (eval "$ac_link") 2>&5
28401  ac_status=$?
28402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28403  test $ac_status = 0; }; then :
28404  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28405# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28406# work properly (i.e., refer to `conftest.exe'), while it won't with
28407# `rm'.
28408for ac_file in conftest.exe conftest conftest.*; do
28409  test -f "$ac_file" || continue
28410  case $ac_file in
28411    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28412    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28413	  break;;
28414    * ) break;;
28415  esac
28416done
28417else
28418  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28420as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28421See \`config.log' for more details" "$LINENO" 5; }
28422fi
28423rm -f conftest conftest$ac_cv_exeext
28424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28425$as_echo "$ac_cv_exeext" >&6; }
28426
28427rm -f conftest.$ac_ext
28428EXEEXT=$ac_cv_exeext
28429ac_exeext=$EXEEXT
28430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28431/* end confdefs.h.  */
28432#include <stdio.h>
28433int
28434main ()
28435{
28436FILE *f = fopen ("conftest.out", "w");
28437 return ferror (f) || fclose (f) != 0;
28438
28439  ;
28440  return 0;
28441}
28442_ACEOF
28443ac_clean_files="$ac_clean_files conftest.out"
28444# Check that the compiler produces executables we can run.  If not, either
28445# the compiler is broken, or we cross compile.
28446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28447$as_echo_n "checking whether we are cross compiling... " >&6; }
28448if test "$cross_compiling" != yes; then
28449  { { ac_try="$ac_link"
28450case "(($ac_try" in
28451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28452  *) ac_try_echo=$ac_try;;
28453esac
28454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28455$as_echo "$ac_try_echo"; } >&5
28456  (eval "$ac_link") 2>&5
28457  ac_status=$?
28458  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28459  test $ac_status = 0; }
28460  if { ac_try='./conftest$ac_cv_exeext'
28461  { { case "(($ac_try" in
28462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28463  *) ac_try_echo=$ac_try;;
28464esac
28465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28466$as_echo "$ac_try_echo"; } >&5
28467  (eval "$ac_try") 2>&5
28468  ac_status=$?
28469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28470  test $ac_status = 0; }; }; then
28471    cross_compiling=no
28472  else
28473    if test "$cross_compiling" = maybe; then
28474	cross_compiling=yes
28475    else
28476	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28478as_fn_error $? "cannot run C compiled programs.
28479If you meant to cross compile, use \`--host'.
28480See \`config.log' for more details" "$LINENO" 5; }
28481    fi
28482  fi
28483fi
28484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28485$as_echo "$cross_compiling" >&6; }
28486
28487rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28488ac_clean_files=$ac_clean_files_save
28489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28490$as_echo_n "checking for suffix of object files... " >&6; }
28491if ${ac_cv_objext+:} false; then :
28492  $as_echo_n "(cached) " >&6
28493else
28494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28495/* end confdefs.h.  */
28496
28497int
28498main ()
28499{
28500
28501  ;
28502  return 0;
28503}
28504_ACEOF
28505rm -f conftest.o conftest.obj
28506if { { ac_try="$ac_compile"
28507case "(($ac_try" in
28508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28509  *) ac_try_echo=$ac_try;;
28510esac
28511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28512$as_echo "$ac_try_echo"; } >&5
28513  (eval "$ac_compile") 2>&5
28514  ac_status=$?
28515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28516  test $ac_status = 0; }; then :
28517  for ac_file in conftest.o conftest.obj conftest.*; do
28518  test -f "$ac_file" || continue;
28519  case $ac_file in
28520    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28521    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28522       break;;
28523  esac
28524done
28525else
28526  $as_echo "$as_me: failed program was:" >&5
28527sed 's/^/| /' conftest.$ac_ext >&5
28528
28529{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28531as_fn_error $? "cannot compute suffix of object files: cannot compile
28532See \`config.log' for more details" "$LINENO" 5; }
28533fi
28534rm -f conftest.$ac_cv_objext conftest.$ac_ext
28535fi
28536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28537$as_echo "$ac_cv_objext" >&6; }
28538OBJEXT=$ac_cv_objext
28539ac_objext=$OBJEXT
28540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28541$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28542if ${ac_cv_c_compiler_gnu+:} false; then :
28543  $as_echo_n "(cached) " >&6
28544else
28545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28546/* end confdefs.h.  */
28547
28548int
28549main ()
28550{
28551#ifndef __GNUC__
28552       choke me
28553#endif
28554
28555  ;
28556  return 0;
28557}
28558_ACEOF
28559if ac_fn_c_try_compile "$LINENO"; then :
28560  ac_compiler_gnu=yes
28561else
28562  ac_compiler_gnu=no
28563fi
28564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28565ac_cv_c_compiler_gnu=$ac_compiler_gnu
28566
28567fi
28568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28569$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28570if test $ac_compiler_gnu = yes; then
28571  GCC=yes
28572else
28573  GCC=
28574fi
28575ac_test_CFLAGS=${CFLAGS+set}
28576ac_save_CFLAGS=$CFLAGS
28577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28578$as_echo_n "checking whether $CC accepts -g... " >&6; }
28579if ${ac_cv_prog_cc_g+:} false; then :
28580  $as_echo_n "(cached) " >&6
28581else
28582  ac_save_c_werror_flag=$ac_c_werror_flag
28583   ac_c_werror_flag=yes
28584   ac_cv_prog_cc_g=no
28585   CFLAGS="-g"
28586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28587/* end confdefs.h.  */
28588
28589int
28590main ()
28591{
28592
28593  ;
28594  return 0;
28595}
28596_ACEOF
28597if ac_fn_c_try_compile "$LINENO"; then :
28598  ac_cv_prog_cc_g=yes
28599else
28600  CFLAGS=""
28601      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28602/* end confdefs.h.  */
28603
28604int
28605main ()
28606{
28607
28608  ;
28609  return 0;
28610}
28611_ACEOF
28612if ac_fn_c_try_compile "$LINENO"; then :
28613
28614else
28615  ac_c_werror_flag=$ac_save_c_werror_flag
28616	 CFLAGS="-g"
28617	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28618/* end confdefs.h.  */
28619
28620int
28621main ()
28622{
28623
28624  ;
28625  return 0;
28626}
28627_ACEOF
28628if ac_fn_c_try_compile "$LINENO"; then :
28629  ac_cv_prog_cc_g=yes
28630fi
28631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28632fi
28633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28634fi
28635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28636   ac_c_werror_flag=$ac_save_c_werror_flag
28637fi
28638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28639$as_echo "$ac_cv_prog_cc_g" >&6; }
28640if test "$ac_test_CFLAGS" = set; then
28641  CFLAGS=$ac_save_CFLAGS
28642elif test $ac_cv_prog_cc_g = yes; then
28643  if test "$GCC" = yes; then
28644    CFLAGS="-g -O2"
28645  else
28646    CFLAGS="-g"
28647  fi
28648else
28649  if test "$GCC" = yes; then
28650    CFLAGS="-O2"
28651  else
28652    CFLAGS=
28653  fi
28654fi
28655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28656$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28657if ${ac_cv_prog_cc_c89+:} false; then :
28658  $as_echo_n "(cached) " >&6
28659else
28660  ac_cv_prog_cc_c89=no
28661ac_save_CC=$CC
28662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28663/* end confdefs.h.  */
28664#include <stdarg.h>
28665#include <stdio.h>
28666struct stat;
28667/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28668struct buf { int x; };
28669FILE * (*rcsopen) (struct buf *, struct stat *, int);
28670static char *e (p, i)
28671     char **p;
28672     int i;
28673{
28674  return p[i];
28675}
28676static char *f (char * (*g) (char **, int), char **p, ...)
28677{
28678  char *s;
28679  va_list v;
28680  va_start (v,p);
28681  s = g (p, va_arg (v,int));
28682  va_end (v);
28683  return s;
28684}
28685
28686/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
28687   function prototypes and stuff, but not '\xHH' hex character constants.
28688   These don't provoke an error unfortunately, instead are silently treated
28689   as 'x'.  The following induces an error, until -std is added to get
28690   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
28691   array size at least.  It's necessary to write '\x00'==0 to get something
28692   that's true only with -std.  */
28693int osf4_cc_array ['\x00' == 0 ? 1 : -1];
28694
28695/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
28696   inside strings and character constants.  */
28697#define FOO(x) 'x'
28698int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
28699
28700int test (int i, double x);
28701struct s1 {int (*f) (int a);};
28702struct s2 {int (*f) (double a);};
28703int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
28704int argc;
28705char **argv;
28706int
28707main ()
28708{
28709return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
28710  ;
28711  return 0;
28712}
28713_ACEOF
28714for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
28715	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
28716do
28717  CC="$ac_save_CC $ac_arg"
28718  if ac_fn_c_try_compile "$LINENO"; then :
28719  ac_cv_prog_cc_c89=$ac_arg
28720fi
28721rm -f core conftest.err conftest.$ac_objext
28722  test "x$ac_cv_prog_cc_c89" != "xno" && break
28723done
28724rm -f conftest.$ac_ext
28725CC=$ac_save_CC
28726
28727fi
28728# AC_CACHE_VAL
28729case "x$ac_cv_prog_cc_c89" in
28730  x)
28731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
28732$as_echo "none needed" >&6; } ;;
28733  xno)
28734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
28735$as_echo "unsupported" >&6; } ;;
28736  *)
28737    CC="$CC $ac_cv_prog_cc_c89"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
28739$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
28740esac
28741if test "x$ac_cv_prog_cc_c89" != xno; then :
28742
28743fi
28744
28745ac_ext=cpp
28746ac_cpp='$CXXCPP $CPPFLAGS'
28747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28750
28751
28752
28753  COMPILER_NAME=C++
28754  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
28755
28756  if test "x$CXX" != x; then
28757    # User has supplied compiler name already, always let that override.
28758    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
28759$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
28760    if test "x`basename $CXX`" = "x$CXX"; then
28761      # A command without a complete path is provided, search $PATH.
28762
28763      for ac_prog in $CXX
28764do
28765  # Extract the first word of "$ac_prog", so it can be a program name with args.
28766set dummy $ac_prog; ac_word=$2
28767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28768$as_echo_n "checking for $ac_word... " >&6; }
28769if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28770  $as_echo_n "(cached) " >&6
28771else
28772  case $POTENTIAL_CXX in
28773  [\\/]* | ?:[\\/]*)
28774  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28775  ;;
28776  *)
28777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28778for as_dir in $PATH
28779do
28780  IFS=$as_save_IFS
28781  test -z "$as_dir" && as_dir=.
28782    for ac_exec_ext in '' $ac_executable_extensions; do
28783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28784    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28786    break 2
28787  fi
28788done
28789  done
28790IFS=$as_save_IFS
28791
28792  ;;
28793esac
28794fi
28795POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28796if test -n "$POTENTIAL_CXX"; then
28797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28798$as_echo "$POTENTIAL_CXX" >&6; }
28799else
28800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28801$as_echo "no" >&6; }
28802fi
28803
28804
28805  test -n "$POTENTIAL_CXX" && break
28806done
28807
28808      if test "x$POTENTIAL_CXX" != x; then
28809        CXX=$POTENTIAL_CXX
28810      else
28811        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
28812      fi
28813    else
28814      # Otherwise it might already be a complete path
28815      if test ! -x "$CXX"; then
28816        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
28817      fi
28818    fi
28819  else
28820    # No user supplied value. Locate compiler ourselves.
28821
28822    # If we are cross compiling, assume cross compilation tools follows the
28823    # cross compilation standard where they are prefixed with the autoconf
28824    # standard name for the target. For example the binary
28825    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28826    # If we are not cross compiling, then the default compiler name will be
28827    # used.
28828
28829    CXX=
28830    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28831    # before checking the rest of the PATH.
28832    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28833    # step, this should not be necessary.
28834    if test -n "$TOOLCHAIN_PATH"; then
28835      PATH_save="$PATH"
28836      PATH="$TOOLCHAIN_PATH"
28837      for ac_prog in $SEARCH_LIST
28838do
28839  # Extract the first word of "$ac_prog", so it can be a program name with args.
28840set dummy $ac_prog; ac_word=$2
28841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28842$as_echo_n "checking for $ac_word... " >&6; }
28843if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
28844  $as_echo_n "(cached) " >&6
28845else
28846  case $TOOLCHAIN_PATH_CXX in
28847  [\\/]* | ?:[\\/]*)
28848  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
28849  ;;
28850  *)
28851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28852for as_dir in $PATH
28853do
28854  IFS=$as_save_IFS
28855  test -z "$as_dir" && as_dir=.
28856    for ac_exec_ext in '' $ac_executable_extensions; do
28857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28858    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
28859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28860    break 2
28861  fi
28862done
28863  done
28864IFS=$as_save_IFS
28865
28866  ;;
28867esac
28868fi
28869TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
28870if test -n "$TOOLCHAIN_PATH_CXX"; then
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
28872$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
28873else
28874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28875$as_echo "no" >&6; }
28876fi
28877
28878
28879  test -n "$TOOLCHAIN_PATH_CXX" && break
28880done
28881
28882      CXX=$TOOLCHAIN_PATH_CXX
28883      PATH="$PATH_save"
28884    fi
28885
28886    # AC_PATH_PROGS can't be run multiple times with the same variable,
28887    # so create a new name for this run.
28888    if test "x$CXX" = x; then
28889      for ac_prog in $TOOLCHAIN_CXX_BINARY
28890do
28891  # Extract the first word of "$ac_prog", so it can be a program name with args.
28892set dummy $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_path_POTENTIAL_CXX+:} false; then :
28896  $as_echo_n "(cached) " >&6
28897else
28898  case $POTENTIAL_CXX in
28899  [\\/]* | ?:[\\/]*)
28900  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28901  ;;
28902  *)
28903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28904for as_dir in $PATH
28905do
28906  IFS=$as_save_IFS
28907  test -z "$as_dir" && as_dir=.
28908    for ac_exec_ext in '' $ac_executable_extensions; do
28909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28910    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28912    break 2
28913  fi
28914done
28915  done
28916IFS=$as_save_IFS
28917
28918  ;;
28919esac
28920fi
28921POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28922if test -n "$POTENTIAL_CXX"; then
28923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28924$as_echo "$POTENTIAL_CXX" >&6; }
28925else
28926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28927$as_echo "no" >&6; }
28928fi
28929
28930
28931  test -n "$POTENTIAL_CXX" && break
28932done
28933
28934      CXX=$POTENTIAL_CXX
28935    fi
28936
28937    if test "x$CXX" = x; then
28938
28939  # Print a helpful message on how to acquire the necessary build dependency.
28940  # devkit is the help tag: freetype, cups, pulse, alsa etc
28941  MISSING_DEPENDENCY=devkit
28942
28943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28944    cygwin_help $MISSING_DEPENDENCY
28945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28946    msys_help $MISSING_DEPENDENCY
28947  else
28948    PKGHANDLER_COMMAND=
28949
28950    case $PKGHANDLER in
28951      apt-get)
28952        apt_help     $MISSING_DEPENDENCY ;;
28953      yum)
28954        yum_help     $MISSING_DEPENDENCY ;;
28955      port)
28956        port_help    $MISSING_DEPENDENCY ;;
28957      pkgutil)
28958        pkgutil_help $MISSING_DEPENDENCY ;;
28959      pkgadd)
28960        pkgadd_help  $MISSING_DEPENDENCY ;;
28961    esac
28962
28963    if test "x$PKGHANDLER_COMMAND" != x; then
28964      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28965    fi
28966  fi
28967
28968      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28969    fi
28970  fi
28971
28972  # Now we have a compiler binary in CXX. Make sure it's okay.
28973
28974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975
28976  # First separate the path from the arguments. This will split at the first
28977  # space.
28978  complete="$CXX"
28979  path="${complete%% *}"
28980  tmp="$complete EOL"
28981  arguments="${tmp#* }"
28982
28983  # Input might be given as Windows format, start by converting to
28984  # unix format.
28985  new_path=`$CYGPATH -u "$path"`
28986
28987  # Now try to locate executable using which
28988  new_path=`$WHICH "$new_path" 2> /dev/null`
28989  # bat and cmd files are not always considered executable in cygwin causing which
28990  # to not find them
28991  if test "x$new_path" = x \
28992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28994    new_path=`$CYGPATH -u "$path"`
28995  fi
28996  if test "x$new_path" = x; then
28997    # Oops. Which didn't find the executable.
28998    # The splitting of arguments from the executable at a space might have been incorrect,
28999    # since paths with space are more likely in Windows. Give it another try with the whole
29000    # argument.
29001    path="$complete"
29002    arguments="EOL"
29003    new_path=`$CYGPATH -u "$path"`
29004    new_path=`$WHICH "$new_path" 2> /dev/null`
29005    # bat and cmd files are not always considered executable in cygwin causing which
29006    # to not find them
29007    if test "x$new_path" = x \
29008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29010      new_path=`$CYGPATH -u "$path"`
29011    fi
29012    if test "x$new_path" = x; then
29013      # It's still not found. Now this is an unrecoverable error.
29014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29015$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29016      has_space=`$ECHO "$complete" | $GREP " "`
29017      if test "x$has_space" != x; then
29018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29020      fi
29021      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29022    fi
29023  fi
29024
29025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29028  # "foo.exe" is OK but "foo" is an error.
29029  #
29030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29031  # It is also a way to make sure we got the proper file name for the real test later on.
29032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29033  if test "x$test_shortpath" = x; then
29034    # Short path failed, file does not exist as specified.
29035    # Try adding .exe or .cmd
29036    if test -f "${new_path}.exe"; then
29037      input_to_shortpath="${new_path}.exe"
29038    elif test -f "${new_path}.cmd"; then
29039      input_to_shortpath="${new_path}.cmd"
29040    else
29041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29042$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29045      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29046    fi
29047  else
29048    input_to_shortpath="$new_path"
29049  fi
29050
29051  # Call helper function which possibly converts this using DOS-style short mode.
29052  # If so, the updated path is stored in $new_path.
29053  new_path="$input_to_shortpath"
29054
29055  input_path="$input_to_shortpath"
29056  # Check if we need to convert this using DOS-style short mode. If the path
29057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29058  # take no chances and rewrite it.
29059  # Note: m4 eats our [], so we need to use [ and ] instead.
29060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29061  if test "x$has_forbidden_chars" != x; then
29062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29066      # Going to short mode and back again did indeed matter. Since short mode is
29067      # case insensitive, let's make it lowercase to improve readability.
29068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29069      # Now convert it back to Unix-style (cygpath)
29070      input_path=`$CYGPATH -u "$shortmode_path"`
29071      new_path="$input_path"
29072    fi
29073  fi
29074
29075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29076  if test "x$test_cygdrive_prefix" = x; then
29077    # As a simple fix, exclude /usr/bin since it's not a real path.
29078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29080      # a path prefixed by /cygdrive for fixpath to work.
29081      new_path="$CYGWIN_ROOT_PATH$input_path"
29082    fi
29083  fi
29084
29085  # remove trailing .exe if any
29086  new_path="${new_path/%.exe/}"
29087
29088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29089
29090  # First separate the path from the arguments. This will split at the first
29091  # space.
29092  complete="$CXX"
29093  path="${complete%% *}"
29094  tmp="$complete EOL"
29095  arguments="${tmp#* }"
29096
29097  # Input might be given as Windows format, start by converting to
29098  # unix format.
29099  new_path="$path"
29100
29101  windows_path="$new_path"
29102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29103    unix_path=`$CYGPATH -u "$windows_path"`
29104    new_path="$unix_path"
29105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29107    new_path="$unix_path"
29108  fi
29109
29110
29111  # Now try to locate executable using which
29112  new_path=`$WHICH "$new_path" 2> /dev/null`
29113
29114  if test "x$new_path" = x; then
29115    # Oops. Which didn't find the executable.
29116    # The splitting of arguments from the executable at a space might have been incorrect,
29117    # since paths with space are more likely in Windows. Give it another try with the whole
29118    # argument.
29119    path="$complete"
29120    arguments="EOL"
29121    new_path="$path"
29122
29123  windows_path="$new_path"
29124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29125    unix_path=`$CYGPATH -u "$windows_path"`
29126    new_path="$unix_path"
29127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29129    new_path="$unix_path"
29130  fi
29131
29132
29133    new_path=`$WHICH "$new_path" 2> /dev/null`
29134    # bat and cmd files are not always considered executable in MSYS causing which
29135    # to not find them
29136    if test "x$new_path" = x \
29137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
29151
29152    if test "x$new_path" = x; then
29153      # It's still not found. Now this is an unrecoverable error.
29154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29155$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29156      has_space=`$ECHO "$complete" | $GREP " "`
29157      if test "x$has_space" != x; then
29158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29160      fi
29161      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29162    fi
29163  fi
29164
29165  # Now new_path has a complete unix path to the binary
29166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29167    # Keep paths in /bin as-is, but remove trailing .exe if any
29168    new_path="${new_path/%.exe/}"
29169    # Do not save /bin paths to all_fixpath_prefixes!
29170  else
29171    # Not in mixed or Windows style, start by that.
29172    new_path=`cmd //c echo $new_path`
29173
29174  input_path="$new_path"
29175  # Check if we need to convert this using DOS-style short mode. If the path
29176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29177  # take no chances and rewrite it.
29178  # Note: m4 eats our [], so we need to use [ and ] instead.
29179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29180  if test "x$has_forbidden_chars" != x; then
29181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29183  fi
29184
29185    # Output is in $new_path
29186
29187  windows_path="$new_path"
29188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29189    unix_path=`$CYGPATH -u "$windows_path"`
29190    new_path="$unix_path"
29191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29193    new_path="$unix_path"
29194  fi
29195
29196    # remove trailing .exe if any
29197    new_path="${new_path/%.exe/}"
29198
29199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29201  fi
29202
29203  else
29204    # We're on a posix platform. Hooray! :)
29205    # First separate the path from the arguments. This will split at the first
29206    # space.
29207    complete="$CXX"
29208    path="${complete%% *}"
29209    tmp="$complete EOL"
29210    arguments="${tmp#* }"
29211
29212    # Cannot rely on the command "which" here since it doesn't always work.
29213    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29214    if test -z "$is_absolute_path"; then
29215      # Path to executable is not absolute. Find it.
29216      IFS_save="$IFS"
29217      IFS=:
29218      for p in $PATH; do
29219        if test -f "$p/$path" && test -x "$p/$path"; then
29220          new_path="$p/$path"
29221          break
29222        fi
29223      done
29224      IFS="$IFS_save"
29225    else
29226      # This is an absolute path, we can use it without further modifications.
29227      new_path="$path"
29228    fi
29229
29230    if test "x$new_path" = x; then
29231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29232$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29233      has_space=`$ECHO "$complete" | $GREP " "`
29234      if test "x$has_space" != x; then
29235        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29237      fi
29238      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29239    fi
29240  fi
29241
29242  # Now join together the path and the arguments once again
29243  if test "x$arguments" != xEOL; then
29244    new_complete="$new_path ${arguments% *}"
29245  else
29246    new_complete="$new_path"
29247  fi
29248
29249  if test "x$complete" != "x$new_complete"; then
29250    CXX="$new_complete"
29251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29252$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29253  fi
29254
29255  TEST_COMPILER="$CXX"
29256
29257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29258$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29259  SYMLINK_ORIGINAL="$TEST_COMPILER"
29260
29261  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29262    # Follow a chain of symbolic links. Use readlink
29263    # where it exists, else fall back to horribly
29264    # complicated shell code.
29265    if test "x$READLINK_TESTED" != yes; then
29266      # On MacOSX there is a readlink tool with a different
29267      # purpose than the GNU readlink tool. Check the found readlink.
29268      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29269      if test "x$ISGNU" = x; then
29270        # A readlink that we do not know how to use.
29271        # Are there other non-GNU readlinks out there?
29272        READLINK_TESTED=yes
29273        READLINK=
29274      fi
29275    fi
29276
29277    if test "x$READLINK" != x; then
29278      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
29279    else
29280      # Save the current directory for restoring afterwards
29281      STARTDIR=$PWD
29282      COUNTER=0
29283      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
29284      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
29285      cd $sym_link_dir
29286      # Use -P flag to resolve symlinks in directories.
29287      cd `$THEPWDCMD -P`
29288      sym_link_dir=`$THEPWDCMD -P`
29289      # Resolve file symlinks
29290      while test $COUNTER -lt 20; do
29291        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29292        if test "x$ISLINK" == x; then
29293          # This is not a symbolic link! We are done!
29294          break
29295        fi
29296        # Again resolve directory symlinks since the target of the just found
29297        # link could be in a different directory
29298        cd `$DIRNAME $ISLINK`
29299        sym_link_dir=`$THEPWDCMD -P`
29300        sym_link_file=`$BASENAME $ISLINK`
29301        let COUNTER=COUNTER+1
29302      done
29303      cd $STARTDIR
29304      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
29305    fi
29306  fi
29307
29308  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
29309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
29310$as_echo "no symlink" >&6; }
29311  else
29312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
29313$as_echo "$SYMLINK_ORIGINAL" >&6; }
29314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29315$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29316    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
29317    if test "x$COMPILER_BASENAME" = "xccache"; then
29318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29319$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29320      # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29321      # We want to control ccache invocation ourselves, so ignore this cc and try
29322      # searching again.
29323
29324      # Remove the path to the fake ccache cc from the PATH
29325      RETRY_COMPILER_SAVED_PATH="$PATH"
29326      COMPILER_DIRNAME=`$DIRNAME $CXX`
29327      PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29328      # Try again looking for our compiler
29329      if test -n "$ac_tool_prefix"; then
29330  for ac_prog in $TOOLCHAIN_CXX_BINARY
29331  do
29332    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29333set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29335$as_echo_n "checking for $ac_word... " >&6; }
29336if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29337  $as_echo_n "(cached) " >&6
29338else
29339  if test -n "$PROPER_COMPILER_CXX"; then
29340  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29341else
29342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29343for as_dir in $PATH
29344do
29345  IFS=$as_save_IFS
29346  test -z "$as_dir" && as_dir=.
29347    for ac_exec_ext in '' $ac_executable_extensions; do
29348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29349    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29351    break 2
29352  fi
29353done
29354  done
29355IFS=$as_save_IFS
29356
29357fi
29358fi
29359PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29360if test -n "$PROPER_COMPILER_CXX"; then
29361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29362$as_echo "$PROPER_COMPILER_CXX" >&6; }
29363else
29364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29365$as_echo "no" >&6; }
29366fi
29367
29368
29369    test -n "$PROPER_COMPILER_CXX" && break
29370  done
29371fi
29372if test -z "$PROPER_COMPILER_CXX"; then
29373  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29374  for ac_prog in $TOOLCHAIN_CXX_BINARY
29375do
29376  # Extract the first word of "$ac_prog", so it can be a program name with args.
29377set dummy $ac_prog; ac_word=$2
29378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29379$as_echo_n "checking for $ac_word... " >&6; }
29380if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29381  $as_echo_n "(cached) " >&6
29382else
29383  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29384  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29385else
29386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29387for as_dir in $PATH
29388do
29389  IFS=$as_save_IFS
29390  test -z "$as_dir" && as_dir=.
29391    for ac_exec_ext in '' $ac_executable_extensions; do
29392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29393    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29395    break 2
29396  fi
29397done
29398  done
29399IFS=$as_save_IFS
29400
29401fi
29402fi
29403ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29404if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29406$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29407else
29408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29409$as_echo "no" >&6; }
29410fi
29411
29412
29413  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29414done
29415
29416  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29417    PROPER_COMPILER_CXX=""
29418  else
29419    case $cross_compiling:$ac_tool_warned in
29420yes:)
29421{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29422$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29423ac_tool_warned=yes ;;
29424esac
29425    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29426  fi
29427fi
29428
29429
29430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29431
29432  # First separate the path from the arguments. This will split at the first
29433  # space.
29434  complete="$PROPER_COMPILER_CXX"
29435  path="${complete%% *}"
29436  tmp="$complete EOL"
29437  arguments="${tmp#* }"
29438
29439  # Input might be given as Windows format, start by converting to
29440  # unix format.
29441  new_path=`$CYGPATH -u "$path"`
29442
29443  # Now try to locate executable using which
29444  new_path=`$WHICH "$new_path" 2> /dev/null`
29445  # bat and cmd files are not always considered executable in cygwin causing which
29446  # to not find them
29447  if test "x$new_path" = x \
29448      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29449      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29450    new_path=`$CYGPATH -u "$path"`
29451  fi
29452  if test "x$new_path" = x; then
29453    # Oops. Which didn't find the executable.
29454    # The splitting of arguments from the executable at a space might have been incorrect,
29455    # since paths with space are more likely in Windows. Give it another try with the whole
29456    # argument.
29457    path="$complete"
29458    arguments="EOL"
29459    new_path=`$CYGPATH -u "$path"`
29460    new_path=`$WHICH "$new_path" 2> /dev/null`
29461    # bat and cmd files are not always considered executable in cygwin causing which
29462    # to not find them
29463    if test "x$new_path" = x \
29464        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29465        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29466      new_path=`$CYGPATH -u "$path"`
29467    fi
29468    if test "x$new_path" = x; then
29469      # It's still not found. Now this is an unrecoverable error.
29470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29471$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29472      has_space=`$ECHO "$complete" | $GREP " "`
29473      if test "x$has_space" != x; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29476      fi
29477      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29478    fi
29479  fi
29480
29481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29484  # "foo.exe" is OK but "foo" is an error.
29485  #
29486  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29487  # It is also a way to make sure we got the proper file name for the real test later on.
29488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29489  if test "x$test_shortpath" = x; then
29490    # Short path failed, file does not exist as specified.
29491    # Try adding .exe or .cmd
29492    if test -f "${new_path}.exe"; then
29493      input_to_shortpath="${new_path}.exe"
29494    elif test -f "${new_path}.cmd"; then
29495      input_to_shortpath="${new_path}.cmd"
29496    else
29497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29498$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29499      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29500$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29501      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29502    fi
29503  else
29504    input_to_shortpath="$new_path"
29505  fi
29506
29507  # Call helper function which possibly converts this using DOS-style short mode.
29508  # If so, the updated path is stored in $new_path.
29509  new_path="$input_to_shortpath"
29510
29511  input_path="$input_to_shortpath"
29512  # Check if we need to convert this using DOS-style short mode. If the path
29513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29514  # take no chances and rewrite it.
29515  # Note: m4 eats our [], so we need to use [ and ] instead.
29516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29517  if test "x$has_forbidden_chars" != x; then
29518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29522      # Going to short mode and back again did indeed matter. Since short mode is
29523      # case insensitive, let's make it lowercase to improve readability.
29524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29525      # Now convert it back to Unix-style (cygpath)
29526      input_path=`$CYGPATH -u "$shortmode_path"`
29527      new_path="$input_path"
29528    fi
29529  fi
29530
29531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29532  if test "x$test_cygdrive_prefix" = x; then
29533    # As a simple fix, exclude /usr/bin since it's not a real path.
29534    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29536      # a path prefixed by /cygdrive for fixpath to work.
29537      new_path="$CYGWIN_ROOT_PATH$input_path"
29538    fi
29539  fi
29540
29541  # remove trailing .exe if any
29542  new_path="${new_path/%.exe/}"
29543
29544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29545
29546  # First separate the path from the arguments. This will split at the first
29547  # space.
29548  complete="$PROPER_COMPILER_CXX"
29549  path="${complete%% *}"
29550  tmp="$complete EOL"
29551  arguments="${tmp#* }"
29552
29553  # Input might be given as Windows format, start by converting to
29554  # unix format.
29555  new_path="$path"
29556
29557  windows_path="$new_path"
29558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29559    unix_path=`$CYGPATH -u "$windows_path"`
29560    new_path="$unix_path"
29561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29563    new_path="$unix_path"
29564  fi
29565
29566
29567  # Now try to locate executable using which
29568  new_path=`$WHICH "$new_path" 2> /dev/null`
29569
29570  if test "x$new_path" = x; then
29571    # Oops. Which didn't find the executable.
29572    # The splitting of arguments from the executable at a space might have been incorrect,
29573    # since paths with space are more likely in Windows. Give it another try with the whole
29574    # argument.
29575    path="$complete"
29576    arguments="EOL"
29577    new_path="$path"
29578
29579  windows_path="$new_path"
29580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29581    unix_path=`$CYGPATH -u "$windows_path"`
29582    new_path="$unix_path"
29583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29585    new_path="$unix_path"
29586  fi
29587
29588
29589    new_path=`$WHICH "$new_path" 2> /dev/null`
29590    # bat and cmd files are not always considered executable in MSYS causing which
29591    # to not find them
29592    if test "x$new_path" = x \
29593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29595      new_path="$path"
29596
29597  windows_path="$new_path"
29598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29599    unix_path=`$CYGPATH -u "$windows_path"`
29600    new_path="$unix_path"
29601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29603    new_path="$unix_path"
29604  fi
29605
29606    fi
29607
29608    if test "x$new_path" = x; then
29609      # It's still not found. Now this is an unrecoverable error.
29610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29611$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29612      has_space=`$ECHO "$complete" | $GREP " "`
29613      if test "x$has_space" != x; then
29614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29616      fi
29617      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29618    fi
29619  fi
29620
29621  # Now new_path has a complete unix path to the binary
29622  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29623    # Keep paths in /bin as-is, but remove trailing .exe if any
29624    new_path="${new_path/%.exe/}"
29625    # Do not save /bin paths to all_fixpath_prefixes!
29626  else
29627    # Not in mixed or Windows style, start by that.
29628    new_path=`cmd //c echo $new_path`
29629
29630  input_path="$new_path"
29631  # Check if we need to convert this using DOS-style short mode. If the path
29632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29633  # take no chances and rewrite it.
29634  # Note: m4 eats our [], so we need to use [ and ] instead.
29635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29636  if test "x$has_forbidden_chars" != x; then
29637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29639  fi
29640
29641    # Output is in $new_path
29642
29643  windows_path="$new_path"
29644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29645    unix_path=`$CYGPATH -u "$windows_path"`
29646    new_path="$unix_path"
29647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29649    new_path="$unix_path"
29650  fi
29651
29652    # remove trailing .exe if any
29653    new_path="${new_path/%.exe/}"
29654
29655    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29656    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29657  fi
29658
29659  else
29660    # We're on a posix platform. Hooray! :)
29661    # First separate the path from the arguments. This will split at the first
29662    # space.
29663    complete="$PROPER_COMPILER_CXX"
29664    path="${complete%% *}"
29665    tmp="$complete EOL"
29666    arguments="${tmp#* }"
29667
29668    # Cannot rely on the command "which" here since it doesn't always work.
29669    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29670    if test -z "$is_absolute_path"; then
29671      # Path to executable is not absolute. Find it.
29672      IFS_save="$IFS"
29673      IFS=:
29674      for p in $PATH; do
29675        if test -f "$p/$path" && test -x "$p/$path"; then
29676          new_path="$p/$path"
29677          break
29678        fi
29679      done
29680      IFS="$IFS_save"
29681    else
29682      # This is an absolute path, we can use it without further modifications.
29683      new_path="$path"
29684    fi
29685
29686    if test "x$new_path" = x; then
29687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29688$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29689      has_space=`$ECHO "$complete" | $GREP " "`
29690      if test "x$has_space" != x; then
29691        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29692$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29693      fi
29694      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29695    fi
29696  fi
29697
29698  # Now join together the path and the arguments once again
29699  if test "x$arguments" != xEOL; then
29700    new_complete="$new_path ${arguments% *}"
29701  else
29702    new_complete="$new_path"
29703  fi
29704
29705  if test "x$complete" != "x$new_complete"; then
29706    PROPER_COMPILER_CXX="$new_complete"
29707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29708$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29709  fi
29710
29711      PATH="$RETRY_COMPILER_SAVED_PATH"
29712
29713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
29714$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
29715
29716  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29717    # Follow a chain of symbolic links. Use readlink
29718    # where it exists, else fall back to horribly
29719    # complicated shell code.
29720    if test "x$READLINK_TESTED" != yes; then
29721      # On MacOSX there is a readlink tool with a different
29722      # purpose than the GNU readlink tool. Check the found readlink.
29723      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29724      if test "x$ISGNU" = x; then
29725        # A readlink that we do not know how to use.
29726        # Are there other non-GNU readlinks out there?
29727        READLINK_TESTED=yes
29728        READLINK=
29729      fi
29730    fi
29731
29732    if test "x$READLINK" != x; then
29733      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
29734    else
29735      # Save the current directory for restoring afterwards
29736      STARTDIR=$PWD
29737      COUNTER=0
29738      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
29739      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
29740      cd $sym_link_dir
29741      # Use -P flag to resolve symlinks in directories.
29742      cd `$THEPWDCMD -P`
29743      sym_link_dir=`$THEPWDCMD -P`
29744      # Resolve file symlinks
29745      while test $COUNTER -lt 20; do
29746        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29747        if test "x$ISLINK" == x; then
29748          # This is not a symbolic link! We are done!
29749          break
29750        fi
29751        # Again resolve directory symlinks since the target of the just found
29752        # link could be in a different directory
29753        cd `$DIRNAME $ISLINK`
29754        sym_link_dir=`$THEPWDCMD -P`
29755        sym_link_file=`$BASENAME $ISLINK`
29756        let COUNTER=COUNTER+1
29757      done
29758      cd $STARTDIR
29759      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
29760    fi
29761  fi
29762
29763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29764$as_echo "$PROPER_COMPILER_CXX" >&6; }
29765      CXX="$PROPER_COMPILER_CXX"
29766    else
29767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
29768$as_echo "no, keeping CXX" >&6; }
29769    fi
29770  fi
29771
29772
29773  COMPILER=$CXX
29774  COMPILER_NAME=$COMPILER_NAME
29775
29776  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29777    # cc -V output typically looks like
29778    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29779    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29780    # Check that this is likely to be the Solaris Studio cc.
29781    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29782    if test $? -ne 0; then
29783      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29784      { $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
29785$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29786      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29787$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29788      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29789$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29790      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29791    fi
29792    # Remove usage instructions (if present), and
29793    # collapse compiler output into a single line
29794    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29795        $SED -e 's/ *[Uu]sage:.*//'`
29796    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29797        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29798  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29799    # xlc -qversion output typically looks like
29800    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29801    #     Version: 11.01.0000.0015
29802    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29803    # Check that this is likely to be the IBM XL C compiler.
29804    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29805    if test $? -ne 0; then
29806      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29807      { $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
29808$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29809      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29810$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29811      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29812$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29813      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29814    fi
29815    # Collapse compiler output into a single line
29816    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29817    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29818        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29819  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29820    # There is no specific version flag, but all output starts with a version string.
29821    # First line typically looks something like:
29822    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29823    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29824    # Check that this is likely to be Microsoft CL.EXE.
29825    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29826    if test $? -ne 0; then
29827      { $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
29828$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29829      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29830$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29831      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29832    fi
29833    # Collapse compiler output into a single line
29834    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29835    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29836        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29837  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29838    # gcc --version output typically looks like
29839    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29840    #     Copyright (C) 2013 Free Software Foundation, Inc.
29841    #     This is free software; see the source for copying conditions.  There is NO
29842    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29843    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29844    # Check that this is likely to be GCC.
29845    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29846    if test $? -ne 0; then
29847      { $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
29848$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29849      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29850$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29851      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29852    fi
29853    # Remove Copyright and legalese from version string, and
29854    # collapse into a single line
29855    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29856        $SED -e 's/ *Copyright .*//'`
29857    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29858        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
29859  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29860    # clang --version output typically looks like
29861    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29862    #    clang version 3.3 (tags/RELEASE_33/final)
29863    # or
29864    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29865    #    Target: x86_64-pc-linux-gnu
29866    #    Thread model: posix
29867    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29868    # Check that this is likely to be clang
29869    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29870    if test $? -ne 0; then
29871      { $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
29872$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29873      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29874$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29875      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29876    fi
29877    # Collapse compiler output into a single line
29878    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29879    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29880        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29881
29882  else
29883      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29884  fi
29885  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29886  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29887  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29888  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
29889
29890  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29891$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29892
29893
29894  # Now that we have resolved CXX ourself, let autoconf have its go at it
29895  ac_ext=cpp
29896ac_cpp='$CXXCPP $CPPFLAGS'
29897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29900if test -z "$CXX"; then
29901  if test -n "$CCC"; then
29902    CXX=$CCC
29903  else
29904    if test -n "$ac_tool_prefix"; then
29905  for ac_prog in $CXX
29906  do
29907    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29908set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29910$as_echo_n "checking for $ac_word... " >&6; }
29911if ${ac_cv_prog_CXX+:} false; then :
29912  $as_echo_n "(cached) " >&6
29913else
29914  if test -n "$CXX"; then
29915  ac_cv_prog_CXX="$CXX" # Let the user override the test.
29916else
29917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29918for as_dir in $PATH
29919do
29920  IFS=$as_save_IFS
29921  test -z "$as_dir" && as_dir=.
29922    for ac_exec_ext in '' $ac_executable_extensions; do
29923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29924    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29926    break 2
29927  fi
29928done
29929  done
29930IFS=$as_save_IFS
29931
29932fi
29933fi
29934CXX=$ac_cv_prog_CXX
29935if test -n "$CXX"; then
29936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29937$as_echo "$CXX" >&6; }
29938else
29939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29940$as_echo "no" >&6; }
29941fi
29942
29943
29944    test -n "$CXX" && break
29945  done
29946fi
29947if test -z "$CXX"; then
29948  ac_ct_CXX=$CXX
29949  for ac_prog in $CXX
29950do
29951  # Extract the first word of "$ac_prog", so it can be a program name with args.
29952set dummy $ac_prog; ac_word=$2
29953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29954$as_echo_n "checking for $ac_word... " >&6; }
29955if ${ac_cv_prog_ac_ct_CXX+:} false; then :
29956  $as_echo_n "(cached) " >&6
29957else
29958  if test -n "$ac_ct_CXX"; then
29959  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29960else
29961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29962for as_dir in $PATH
29963do
29964  IFS=$as_save_IFS
29965  test -z "$as_dir" && as_dir=.
29966    for ac_exec_ext in '' $ac_executable_extensions; do
29967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29968    ac_cv_prog_ac_ct_CXX="$ac_prog"
29969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29970    break 2
29971  fi
29972done
29973  done
29974IFS=$as_save_IFS
29975
29976fi
29977fi
29978ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29979if test -n "$ac_ct_CXX"; then
29980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29981$as_echo "$ac_ct_CXX" >&6; }
29982else
29983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29984$as_echo "no" >&6; }
29985fi
29986
29987
29988  test -n "$ac_ct_CXX" && break
29989done
29990
29991  if test "x$ac_ct_CXX" = x; then
29992    CXX="g++"
29993  else
29994    case $cross_compiling:$ac_tool_warned in
29995yes:)
29996{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29997$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29998ac_tool_warned=yes ;;
29999esac
30000    CXX=$ac_ct_CXX
30001  fi
30002fi
30003
30004  fi
30005fi
30006# Provide some information about the compiler.
30007$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30008set X $ac_compile
30009ac_compiler=$2
30010for ac_option in --version -v -V -qversion; do
30011  { { ac_try="$ac_compiler $ac_option >&5"
30012case "(($ac_try" in
30013  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30014  *) ac_try_echo=$ac_try;;
30015esac
30016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30017$as_echo "$ac_try_echo"; } >&5
30018  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30019  ac_status=$?
30020  if test -s conftest.err; then
30021    sed '10a\
30022... rest of stderr output deleted ...
30023         10q' conftest.err >conftest.er1
30024    cat conftest.er1 >&5
30025  fi
30026  rm -f conftest.er1 conftest.err
30027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30028  test $ac_status = 0; }
30029done
30030
30031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30032$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30033if ${ac_cv_cxx_compiler_gnu+:} false; then :
30034  $as_echo_n "(cached) " >&6
30035else
30036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30037/* end confdefs.h.  */
30038
30039int
30040main ()
30041{
30042#ifndef __GNUC__
30043       choke me
30044#endif
30045
30046  ;
30047  return 0;
30048}
30049_ACEOF
30050if ac_fn_cxx_try_compile "$LINENO"; then :
30051  ac_compiler_gnu=yes
30052else
30053  ac_compiler_gnu=no
30054fi
30055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30056ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30057
30058fi
30059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30060$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30061if test $ac_compiler_gnu = yes; then
30062  GXX=yes
30063else
30064  GXX=
30065fi
30066ac_test_CXXFLAGS=${CXXFLAGS+set}
30067ac_save_CXXFLAGS=$CXXFLAGS
30068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30069$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30070if ${ac_cv_prog_cxx_g+:} false; then :
30071  $as_echo_n "(cached) " >&6
30072else
30073  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30074   ac_cxx_werror_flag=yes
30075   ac_cv_prog_cxx_g=no
30076   CXXFLAGS="-g"
30077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30078/* end confdefs.h.  */
30079
30080int
30081main ()
30082{
30083
30084  ;
30085  return 0;
30086}
30087_ACEOF
30088if ac_fn_cxx_try_compile "$LINENO"; then :
30089  ac_cv_prog_cxx_g=yes
30090else
30091  CXXFLAGS=""
30092      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30093/* end confdefs.h.  */
30094
30095int
30096main ()
30097{
30098
30099  ;
30100  return 0;
30101}
30102_ACEOF
30103if ac_fn_cxx_try_compile "$LINENO"; then :
30104
30105else
30106  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30107	 CXXFLAGS="-g"
30108	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30109/* end confdefs.h.  */
30110
30111int
30112main ()
30113{
30114
30115  ;
30116  return 0;
30117}
30118_ACEOF
30119if ac_fn_cxx_try_compile "$LINENO"; then :
30120  ac_cv_prog_cxx_g=yes
30121fi
30122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30123fi
30124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30125fi
30126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30127   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30128fi
30129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30130$as_echo "$ac_cv_prog_cxx_g" >&6; }
30131if test "$ac_test_CXXFLAGS" = set; then
30132  CXXFLAGS=$ac_save_CXXFLAGS
30133elif test $ac_cv_prog_cxx_g = yes; then
30134  if test "$GXX" = yes; then
30135    CXXFLAGS="-g -O2"
30136  else
30137    CXXFLAGS="-g"
30138  fi
30139else
30140  if test "$GXX" = yes; then
30141    CXXFLAGS="-O2"
30142  else
30143    CXXFLAGS=
30144  fi
30145fi
30146ac_ext=cpp
30147ac_cpp='$CXXCPP $CPPFLAGS'
30148ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30149ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30150ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30151
30152
30153  # This is the compiler version number on the form X.Y[.Z]
30154
30155
30156
30157
30158  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
30159    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
30160$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
30161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
30162$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
30163  fi
30164
30165  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
30166  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
30167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
30168$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
30169  fi
30170
30171  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
30172    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
30173$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
30174  fi
30175
30176  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
30177
30178
30179  #
30180  # Setup the preprocessor (CPP and CXXCPP)
30181  #
30182  ac_ext=c
30183ac_cpp='$CPP $CPPFLAGS'
30184ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30185ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30186ac_compiler_gnu=$ac_cv_c_compiler_gnu
30187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30188$as_echo_n "checking how to run the C preprocessor... " >&6; }
30189# On Suns, sometimes $CPP names a directory.
30190if test -n "$CPP" && test -d "$CPP"; then
30191  CPP=
30192fi
30193if test -z "$CPP"; then
30194  if ${ac_cv_prog_CPP+:} false; then :
30195  $as_echo_n "(cached) " >&6
30196else
30197      # Double quotes because CPP needs to be expanded
30198    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30199    do
30200      ac_preproc_ok=false
30201for ac_c_preproc_warn_flag in '' yes
30202do
30203  # Use a header file that comes with gcc, so configuring glibc
30204  # with a fresh cross-compiler works.
30205  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30206  # <limits.h> exists even on freestanding compilers.
30207  # On the NeXT, cc -E runs the code through the compiler's parser,
30208  # not just through cpp. "Syntax error" is here to catch this case.
30209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30210/* end confdefs.h.  */
30211#ifdef __STDC__
30212# include <limits.h>
30213#else
30214# include <assert.h>
30215#endif
30216		     Syntax error
30217_ACEOF
30218if ac_fn_c_try_cpp "$LINENO"; then :
30219
30220else
30221  # Broken: fails on valid input.
30222continue
30223fi
30224rm -f conftest.err conftest.i conftest.$ac_ext
30225
30226  # OK, works on sane cases.  Now check whether nonexistent headers
30227  # can be detected and how.
30228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30229/* end confdefs.h.  */
30230#include <ac_nonexistent.h>
30231_ACEOF
30232if ac_fn_c_try_cpp "$LINENO"; then :
30233  # Broken: success on invalid input.
30234continue
30235else
30236  # Passes both tests.
30237ac_preproc_ok=:
30238break
30239fi
30240rm -f conftest.err conftest.i conftest.$ac_ext
30241
30242done
30243# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30244rm -f conftest.i conftest.err conftest.$ac_ext
30245if $ac_preproc_ok; then :
30246  break
30247fi
30248
30249    done
30250    ac_cv_prog_CPP=$CPP
30251
30252fi
30253  CPP=$ac_cv_prog_CPP
30254else
30255  ac_cv_prog_CPP=$CPP
30256fi
30257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30258$as_echo "$CPP" >&6; }
30259ac_preproc_ok=false
30260for ac_c_preproc_warn_flag in '' yes
30261do
30262  # Use a header file that comes with gcc, so configuring glibc
30263  # with a fresh cross-compiler works.
30264  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30265  # <limits.h> exists even on freestanding compilers.
30266  # On the NeXT, cc -E runs the code through the compiler's parser,
30267  # not just through cpp. "Syntax error" is here to catch this case.
30268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30269/* end confdefs.h.  */
30270#ifdef __STDC__
30271# include <limits.h>
30272#else
30273# include <assert.h>
30274#endif
30275		     Syntax error
30276_ACEOF
30277if ac_fn_c_try_cpp "$LINENO"; then :
30278
30279else
30280  # Broken: fails on valid input.
30281continue
30282fi
30283rm -f conftest.err conftest.i conftest.$ac_ext
30284
30285  # OK, works on sane cases.  Now check whether nonexistent headers
30286  # can be detected and how.
30287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30288/* end confdefs.h.  */
30289#include <ac_nonexistent.h>
30290_ACEOF
30291if ac_fn_c_try_cpp "$LINENO"; then :
30292  # Broken: success on invalid input.
30293continue
30294else
30295  # Passes both tests.
30296ac_preproc_ok=:
30297break
30298fi
30299rm -f conftest.err conftest.i conftest.$ac_ext
30300
30301done
30302# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30303rm -f conftest.i conftest.err conftest.$ac_ext
30304if $ac_preproc_ok; then :
30305
30306else
30307  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30309as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30310See \`config.log' for more details" "$LINENO" 5; }
30311fi
30312
30313ac_ext=cpp
30314ac_cpp='$CXXCPP $CPPFLAGS'
30315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30318
30319
30320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30321
30322  # First separate the path from the arguments. This will split at the first
30323  # space.
30324  complete="$CPP"
30325  path="${complete%% *}"
30326  tmp="$complete EOL"
30327  arguments="${tmp#* }"
30328
30329  # Input might be given as Windows format, start by converting to
30330  # unix format.
30331  new_path=`$CYGPATH -u "$path"`
30332
30333  # Now try to locate executable using which
30334  new_path=`$WHICH "$new_path" 2> /dev/null`
30335  # bat and cmd files are not always considered executable in cygwin causing which
30336  # to not find them
30337  if test "x$new_path" = x \
30338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30340    new_path=`$CYGPATH -u "$path"`
30341  fi
30342  if test "x$new_path" = x; then
30343    # Oops. Which didn't find the executable.
30344    # The splitting of arguments from the executable at a space might have been incorrect,
30345    # since paths with space are more likely in Windows. Give it another try with the whole
30346    # argument.
30347    path="$complete"
30348    arguments="EOL"
30349    new_path=`$CYGPATH -u "$path"`
30350    new_path=`$WHICH "$new_path" 2> /dev/null`
30351    # bat and cmd files are not always considered executable in cygwin causing which
30352    # to not find them
30353    if test "x$new_path" = x \
30354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30356      new_path=`$CYGPATH -u "$path"`
30357    fi
30358    if test "x$new_path" = x; then
30359      # It's still not found. Now this is an unrecoverable error.
30360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30361$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30362      has_space=`$ECHO "$complete" | $GREP " "`
30363      if test "x$has_space" != x; then
30364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30366      fi
30367      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30368    fi
30369  fi
30370
30371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30374  # "foo.exe" is OK but "foo" is an error.
30375  #
30376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30377  # It is also a way to make sure we got the proper file name for the real test later on.
30378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30379  if test "x$test_shortpath" = x; then
30380    # Short path failed, file does not exist as specified.
30381    # Try adding .exe or .cmd
30382    if test -f "${new_path}.exe"; then
30383      input_to_shortpath="${new_path}.exe"
30384    elif test -f "${new_path}.cmd"; then
30385      input_to_shortpath="${new_path}.cmd"
30386    else
30387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30388$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30391      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30392    fi
30393  else
30394    input_to_shortpath="$new_path"
30395  fi
30396
30397  # Call helper function which possibly converts this using DOS-style short mode.
30398  # If so, the updated path is stored in $new_path.
30399  new_path="$input_to_shortpath"
30400
30401  input_path="$input_to_shortpath"
30402  # Check if we need to convert this using DOS-style short mode. If the path
30403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30404  # take no chances and rewrite it.
30405  # Note: m4 eats our [], so we need to use [ and ] instead.
30406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30407  if test "x$has_forbidden_chars" != x; then
30408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30412      # Going to short mode and back again did indeed matter. Since short mode is
30413      # case insensitive, let's make it lowercase to improve readability.
30414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30415      # Now convert it back to Unix-style (cygpath)
30416      input_path=`$CYGPATH -u "$shortmode_path"`
30417      new_path="$input_path"
30418    fi
30419  fi
30420
30421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30422  if test "x$test_cygdrive_prefix" = x; then
30423    # As a simple fix, exclude /usr/bin since it's not a real path.
30424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30426      # a path prefixed by /cygdrive for fixpath to work.
30427      new_path="$CYGWIN_ROOT_PATH$input_path"
30428    fi
30429  fi
30430
30431  # remove trailing .exe if any
30432  new_path="${new_path/%.exe/}"
30433
30434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30435
30436  # First separate the path from the arguments. This will split at the first
30437  # space.
30438  complete="$CPP"
30439  path="${complete%% *}"
30440  tmp="$complete EOL"
30441  arguments="${tmp#* }"
30442
30443  # Input might be given as Windows format, start by converting to
30444  # unix format.
30445  new_path="$path"
30446
30447  windows_path="$new_path"
30448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30449    unix_path=`$CYGPATH -u "$windows_path"`
30450    new_path="$unix_path"
30451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30453    new_path="$unix_path"
30454  fi
30455
30456
30457  # Now try to locate executable using which
30458  new_path=`$WHICH "$new_path" 2> /dev/null`
30459
30460  if test "x$new_path" = x; then
30461    # Oops. Which didn't find the executable.
30462    # The splitting of arguments from the executable at a space might have been incorrect,
30463    # since paths with space are more likely in Windows. Give it another try with the whole
30464    # argument.
30465    path="$complete"
30466    arguments="EOL"
30467    new_path="$path"
30468
30469  windows_path="$new_path"
30470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30471    unix_path=`$CYGPATH -u "$windows_path"`
30472    new_path="$unix_path"
30473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30475    new_path="$unix_path"
30476  fi
30477
30478
30479    new_path=`$WHICH "$new_path" 2> /dev/null`
30480    # bat and cmd files are not always considered executable in MSYS causing which
30481    # to not find them
30482    if test "x$new_path" = x \
30483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30485      new_path="$path"
30486
30487  windows_path="$new_path"
30488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30489    unix_path=`$CYGPATH -u "$windows_path"`
30490    new_path="$unix_path"
30491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30493    new_path="$unix_path"
30494  fi
30495
30496    fi
30497
30498    if test "x$new_path" = x; then
30499      # It's still not found. Now this is an unrecoverable error.
30500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30501$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30502      has_space=`$ECHO "$complete" | $GREP " "`
30503      if test "x$has_space" != x; then
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30506      fi
30507      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30508    fi
30509  fi
30510
30511  # Now new_path has a complete unix path to the binary
30512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30513    # Keep paths in /bin as-is, but remove trailing .exe if any
30514    new_path="${new_path/%.exe/}"
30515    # Do not save /bin paths to all_fixpath_prefixes!
30516  else
30517    # Not in mixed or Windows style, start by that.
30518    new_path=`cmd //c echo $new_path`
30519
30520  input_path="$new_path"
30521  # Check if we need to convert this using DOS-style short mode. If the path
30522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30523  # take no chances and rewrite it.
30524  # Note: m4 eats our [], so we need to use [ and ] instead.
30525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30526  if test "x$has_forbidden_chars" != x; then
30527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30529  fi
30530
30531    # Output is in $new_path
30532
30533  windows_path="$new_path"
30534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30535    unix_path=`$CYGPATH -u "$windows_path"`
30536    new_path="$unix_path"
30537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30539    new_path="$unix_path"
30540  fi
30541
30542    # remove trailing .exe if any
30543    new_path="${new_path/%.exe/}"
30544
30545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30547  fi
30548
30549  else
30550    # We're on a posix platform. Hooray! :)
30551    # First separate the path from the arguments. This will split at the first
30552    # space.
30553    complete="$CPP"
30554    path="${complete%% *}"
30555    tmp="$complete EOL"
30556    arguments="${tmp#* }"
30557
30558    # Cannot rely on the command "which" here since it doesn't always work.
30559    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30560    if test -z "$is_absolute_path"; then
30561      # Path to executable is not absolute. Find it.
30562      IFS_save="$IFS"
30563      IFS=:
30564      for p in $PATH; do
30565        if test -f "$p/$path" && test -x "$p/$path"; then
30566          new_path="$p/$path"
30567          break
30568        fi
30569      done
30570      IFS="$IFS_save"
30571    else
30572      # This is an absolute path, we can use it without further modifications.
30573      new_path="$path"
30574    fi
30575
30576    if test "x$new_path" = x; then
30577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30578$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30579      has_space=`$ECHO "$complete" | $GREP " "`
30580      if test "x$has_space" != x; then
30581        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30583      fi
30584      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30585    fi
30586  fi
30587
30588  # Now join together the path and the arguments once again
30589  if test "x$arguments" != xEOL; then
30590    new_complete="$new_path ${arguments% *}"
30591  else
30592    new_complete="$new_path"
30593  fi
30594
30595  if test "x$complete" != "x$new_complete"; then
30596    CPP="$new_complete"
30597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30598$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30599  fi
30600
30601  ac_ext=cpp
30602ac_cpp='$CXXCPP $CPPFLAGS'
30603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30607$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30608if test -z "$CXXCPP"; then
30609  if ${ac_cv_prog_CXXCPP+:} false; then :
30610  $as_echo_n "(cached) " >&6
30611else
30612      # Double quotes because CXXCPP needs to be expanded
30613    for CXXCPP in "$CXX -E" "/lib/cpp"
30614    do
30615      ac_preproc_ok=false
30616for ac_cxx_preproc_warn_flag in '' yes
30617do
30618  # Use a header file that comes with gcc, so configuring glibc
30619  # with a fresh cross-compiler works.
30620  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30621  # <limits.h> exists even on freestanding compilers.
30622  # On the NeXT, cc -E runs the code through the compiler's parser,
30623  # not just through cpp. "Syntax error" is here to catch this case.
30624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30625/* end confdefs.h.  */
30626#ifdef __STDC__
30627# include <limits.h>
30628#else
30629# include <assert.h>
30630#endif
30631		     Syntax error
30632_ACEOF
30633if ac_fn_cxx_try_cpp "$LINENO"; then :
30634
30635else
30636  # Broken: fails on valid input.
30637continue
30638fi
30639rm -f conftest.err conftest.i conftest.$ac_ext
30640
30641  # OK, works on sane cases.  Now check whether nonexistent headers
30642  # can be detected and how.
30643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30644/* end confdefs.h.  */
30645#include <ac_nonexistent.h>
30646_ACEOF
30647if ac_fn_cxx_try_cpp "$LINENO"; then :
30648  # Broken: success on invalid input.
30649continue
30650else
30651  # Passes both tests.
30652ac_preproc_ok=:
30653break
30654fi
30655rm -f conftest.err conftest.i conftest.$ac_ext
30656
30657done
30658# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30659rm -f conftest.i conftest.err conftest.$ac_ext
30660if $ac_preproc_ok; then :
30661  break
30662fi
30663
30664    done
30665    ac_cv_prog_CXXCPP=$CXXCPP
30666
30667fi
30668  CXXCPP=$ac_cv_prog_CXXCPP
30669else
30670  ac_cv_prog_CXXCPP=$CXXCPP
30671fi
30672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30673$as_echo "$CXXCPP" >&6; }
30674ac_preproc_ok=false
30675for ac_cxx_preproc_warn_flag in '' yes
30676do
30677  # Use a header file that comes with gcc, so configuring glibc
30678  # with a fresh cross-compiler works.
30679  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30680  # <limits.h> exists even on freestanding compilers.
30681  # On the NeXT, cc -E runs the code through the compiler's parser,
30682  # not just through cpp. "Syntax error" is here to catch this case.
30683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30684/* end confdefs.h.  */
30685#ifdef __STDC__
30686# include <limits.h>
30687#else
30688# include <assert.h>
30689#endif
30690		     Syntax error
30691_ACEOF
30692if ac_fn_cxx_try_cpp "$LINENO"; then :
30693
30694else
30695  # Broken: fails on valid input.
30696continue
30697fi
30698rm -f conftest.err conftest.i conftest.$ac_ext
30699
30700  # OK, works on sane cases.  Now check whether nonexistent headers
30701  # can be detected and how.
30702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30703/* end confdefs.h.  */
30704#include <ac_nonexistent.h>
30705_ACEOF
30706if ac_fn_cxx_try_cpp "$LINENO"; then :
30707  # Broken: success on invalid input.
30708continue
30709else
30710  # Passes both tests.
30711ac_preproc_ok=:
30712break
30713fi
30714rm -f conftest.err conftest.i conftest.$ac_ext
30715
30716done
30717# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30718rm -f conftest.i conftest.err conftest.$ac_ext
30719if $ac_preproc_ok; then :
30720
30721else
30722  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30724as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30725See \`config.log' for more details" "$LINENO" 5; }
30726fi
30727
30728ac_ext=cpp
30729ac_cpp='$CXXCPP $CPPFLAGS'
30730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30733
30734
30735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30736
30737  # First separate the path from the arguments. This will split at the first
30738  # space.
30739  complete="$CXXCPP"
30740  path="${complete%% *}"
30741  tmp="$complete EOL"
30742  arguments="${tmp#* }"
30743
30744  # Input might be given as Windows format, start by converting to
30745  # unix format.
30746  new_path=`$CYGPATH -u "$path"`
30747
30748  # Now try to locate executable using which
30749  new_path=`$WHICH "$new_path" 2> /dev/null`
30750  # bat and cmd files are not always considered executable in cygwin causing which
30751  # to not find them
30752  if test "x$new_path" = x \
30753      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30754      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30755    new_path=`$CYGPATH -u "$path"`
30756  fi
30757  if test "x$new_path" = x; then
30758    # Oops. Which didn't find the executable.
30759    # The splitting of arguments from the executable at a space might have been incorrect,
30760    # since paths with space are more likely in Windows. Give it another try with the whole
30761    # argument.
30762    path="$complete"
30763    arguments="EOL"
30764    new_path=`$CYGPATH -u "$path"`
30765    new_path=`$WHICH "$new_path" 2> /dev/null`
30766    # bat and cmd files are not always considered executable in cygwin causing which
30767    # to not find them
30768    if test "x$new_path" = x \
30769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30771      new_path=`$CYGPATH -u "$path"`
30772    fi
30773    if test "x$new_path" = x; then
30774      # It's still not found. Now this is an unrecoverable error.
30775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30776$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30777      has_space=`$ECHO "$complete" | $GREP " "`
30778      if test "x$has_space" != x; then
30779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30781      fi
30782      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30783    fi
30784  fi
30785
30786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30789  # "foo.exe" is OK but "foo" is an error.
30790  #
30791  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30792  # It is also a way to make sure we got the proper file name for the real test later on.
30793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30794  if test "x$test_shortpath" = x; then
30795    # Short path failed, file does not exist as specified.
30796    # Try adding .exe or .cmd
30797    if test -f "${new_path}.exe"; then
30798      input_to_shortpath="${new_path}.exe"
30799    elif test -f "${new_path}.cmd"; then
30800      input_to_shortpath="${new_path}.cmd"
30801    else
30802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
30803$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
30804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30806      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30807    fi
30808  else
30809    input_to_shortpath="$new_path"
30810  fi
30811
30812  # Call helper function which possibly converts this using DOS-style short mode.
30813  # If so, the updated path is stored in $new_path.
30814  new_path="$input_to_shortpath"
30815
30816  input_path="$input_to_shortpath"
30817  # Check if we need to convert this using DOS-style short mode. If the path
30818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30819  # take no chances and rewrite it.
30820  # Note: m4 eats our [], so we need to use [ and ] instead.
30821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30822  if test "x$has_forbidden_chars" != x; then
30823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30827      # Going to short mode and back again did indeed matter. Since short mode is
30828      # case insensitive, let's make it lowercase to improve readability.
30829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30830      # Now convert it back to Unix-style (cygpath)
30831      input_path=`$CYGPATH -u "$shortmode_path"`
30832      new_path="$input_path"
30833    fi
30834  fi
30835
30836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30837  if test "x$test_cygdrive_prefix" = x; then
30838    # As a simple fix, exclude /usr/bin since it's not a real path.
30839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30841      # a path prefixed by /cygdrive for fixpath to work.
30842      new_path="$CYGWIN_ROOT_PATH$input_path"
30843    fi
30844  fi
30845
30846  # remove trailing .exe if any
30847  new_path="${new_path/%.exe/}"
30848
30849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30850
30851  # First separate the path from the arguments. This will split at the first
30852  # space.
30853  complete="$CXXCPP"
30854  path="${complete%% *}"
30855  tmp="$complete EOL"
30856  arguments="${tmp#* }"
30857
30858  # Input might be given as Windows format, start by converting to
30859  # unix format.
30860  new_path="$path"
30861
30862  windows_path="$new_path"
30863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30864    unix_path=`$CYGPATH -u "$windows_path"`
30865    new_path="$unix_path"
30866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30868    new_path="$unix_path"
30869  fi
30870
30871
30872  # Now try to locate executable using which
30873  new_path=`$WHICH "$new_path" 2> /dev/null`
30874
30875  if test "x$new_path" = x; then
30876    # Oops. Which didn't find the executable.
30877    # The splitting of arguments from the executable at a space might have been incorrect,
30878    # since paths with space are more likely in Windows. Give it another try with the whole
30879    # argument.
30880    path="$complete"
30881    arguments="EOL"
30882    new_path="$path"
30883
30884  windows_path="$new_path"
30885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30886    unix_path=`$CYGPATH -u "$windows_path"`
30887    new_path="$unix_path"
30888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30890    new_path="$unix_path"
30891  fi
30892
30893
30894    new_path=`$WHICH "$new_path" 2> /dev/null`
30895    # bat and cmd files are not always considered executable in MSYS causing which
30896    # to not find them
30897    if test "x$new_path" = x \
30898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30900      new_path="$path"
30901
30902  windows_path="$new_path"
30903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30904    unix_path=`$CYGPATH -u "$windows_path"`
30905    new_path="$unix_path"
30906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30908    new_path="$unix_path"
30909  fi
30910
30911    fi
30912
30913    if test "x$new_path" = x; then
30914      # It's still not found. Now this is an unrecoverable error.
30915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30916$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30917      has_space=`$ECHO "$complete" | $GREP " "`
30918      if test "x$has_space" != x; then
30919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30921      fi
30922      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30923    fi
30924  fi
30925
30926  # Now new_path has a complete unix path to the binary
30927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30928    # Keep paths in /bin as-is, but remove trailing .exe if any
30929    new_path="${new_path/%.exe/}"
30930    # Do not save /bin paths to all_fixpath_prefixes!
30931  else
30932    # Not in mixed or Windows style, start by that.
30933    new_path=`cmd //c echo $new_path`
30934
30935  input_path="$new_path"
30936  # Check if we need to convert this using DOS-style short mode. If the path
30937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30938  # take no chances and rewrite it.
30939  # Note: m4 eats our [], so we need to use [ and ] instead.
30940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30941  if test "x$has_forbidden_chars" != x; then
30942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30944  fi
30945
30946    # Output is in $new_path
30947
30948  windows_path="$new_path"
30949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30950    unix_path=`$CYGPATH -u "$windows_path"`
30951    new_path="$unix_path"
30952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30954    new_path="$unix_path"
30955  fi
30956
30957    # remove trailing .exe if any
30958    new_path="${new_path/%.exe/}"
30959
30960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30962  fi
30963
30964  else
30965    # We're on a posix platform. Hooray! :)
30966    # First separate the path from the arguments. This will split at the first
30967    # space.
30968    complete="$CXXCPP"
30969    path="${complete%% *}"
30970    tmp="$complete EOL"
30971    arguments="${tmp#* }"
30972
30973    # Cannot rely on the command "which" here since it doesn't always work.
30974    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30975    if test -z "$is_absolute_path"; then
30976      # Path to executable is not absolute. Find it.
30977      IFS_save="$IFS"
30978      IFS=:
30979      for p in $PATH; do
30980        if test -f "$p/$path" && test -x "$p/$path"; then
30981          new_path="$p/$path"
30982          break
30983        fi
30984      done
30985      IFS="$IFS_save"
30986    else
30987      # This is an absolute path, we can use it without further modifications.
30988      new_path="$path"
30989    fi
30990
30991    if test "x$new_path" = x; then
30992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30993$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30994      has_space=`$ECHO "$complete" | $GREP " "`
30995      if test "x$has_space" != x; then
30996        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30998      fi
30999      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31000    fi
31001  fi
31002
31003  # Now join together the path and the arguments once again
31004  if test "x$arguments" != xEOL; then
31005    new_complete="$new_path ${arguments% *}"
31006  else
31007    new_complete="$new_path"
31008  fi
31009
31010  if test "x$complete" != "x$new_complete"; then
31011    CXXCPP="$new_complete"
31012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31013$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31014  fi
31015
31016
31017  #
31018  # Setup the linker (LD)
31019  #
31020  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31021    # In the Microsoft toolchain we have a separate LD command "link".
31022    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31023    # a cygwin program for something completely different.
31024    # Extract the first word of "link", so it can be a program name with args.
31025set dummy link; ac_word=$2
31026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31027$as_echo_n "checking for $ac_word... " >&6; }
31028if ${ac_cv_prog_LD+:} false; then :
31029  $as_echo_n "(cached) " >&6
31030else
31031  if test -n "$LD"; then
31032  ac_cv_prog_LD="$LD" # Let the user override the test.
31033else
31034  ac_prog_rejected=no
31035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31036for as_dir in $PATH
31037do
31038  IFS=$as_save_IFS
31039  test -z "$as_dir" && as_dir=.
31040    for ac_exec_ext in '' $ac_executable_extensions; do
31041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31042    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31043       ac_prog_rejected=yes
31044       continue
31045     fi
31046    ac_cv_prog_LD="link"
31047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31048    break 2
31049  fi
31050done
31051  done
31052IFS=$as_save_IFS
31053
31054if test $ac_prog_rejected = yes; then
31055  # We found a bogon in the path, so make sure we never use it.
31056  set dummy $ac_cv_prog_LD
31057  shift
31058  if test $# != 0; then
31059    # We chose a different compiler from the bogus one.
31060    # However, it has the same basename, so the bogon will be chosen
31061    # first if we set LD to just the basename; use the full file name.
31062    shift
31063    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31064  fi
31065fi
31066fi
31067fi
31068LD=$ac_cv_prog_LD
31069if test -n "$LD"; then
31070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31071$as_echo "$LD" >&6; }
31072else
31073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31074$as_echo "no" >&6; }
31075fi
31076
31077
31078
31079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31080
31081  # First separate the path from the arguments. This will split at the first
31082  # space.
31083  complete="$LD"
31084  path="${complete%% *}"
31085  tmp="$complete EOL"
31086  arguments="${tmp#* }"
31087
31088  # Input might be given as Windows format, start by converting to
31089  # unix format.
31090  new_path=`$CYGPATH -u "$path"`
31091
31092  # Now try to locate executable using which
31093  new_path=`$WHICH "$new_path" 2> /dev/null`
31094  # bat and cmd files are not always considered executable in cygwin causing which
31095  # to not find them
31096  if test "x$new_path" = x \
31097      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31098      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31099    new_path=`$CYGPATH -u "$path"`
31100  fi
31101  if test "x$new_path" = x; then
31102    # Oops. Which didn't find the executable.
31103    # The splitting of arguments from the executable at a space might have been incorrect,
31104    # since paths with space are more likely in Windows. Give it another try with the whole
31105    # argument.
31106    path="$complete"
31107    arguments="EOL"
31108    new_path=`$CYGPATH -u "$path"`
31109    new_path=`$WHICH "$new_path" 2> /dev/null`
31110    # bat and cmd files are not always considered executable in cygwin causing which
31111    # to not find them
31112    if test "x$new_path" = x \
31113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31115      new_path=`$CYGPATH -u "$path"`
31116    fi
31117    if test "x$new_path" = x; then
31118      # It's still not found. Now this is an unrecoverable error.
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31120$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31121      has_space=`$ECHO "$complete" | $GREP " "`
31122      if test "x$has_space" != x; then
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31125      fi
31126      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31127    fi
31128  fi
31129
31130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31133  # "foo.exe" is OK but "foo" is an error.
31134  #
31135  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31136  # It is also a way to make sure we got the proper file name for the real test later on.
31137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31138  if test "x$test_shortpath" = x; then
31139    # Short path failed, file does not exist as specified.
31140    # Try adding .exe or .cmd
31141    if test -f "${new_path}.exe"; then
31142      input_to_shortpath="${new_path}.exe"
31143    elif test -f "${new_path}.cmd"; then
31144      input_to_shortpath="${new_path}.cmd"
31145    else
31146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31147$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31148      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31149$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31150      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31151    fi
31152  else
31153    input_to_shortpath="$new_path"
31154  fi
31155
31156  # Call helper function which possibly converts this using DOS-style short mode.
31157  # If so, the updated path is stored in $new_path.
31158  new_path="$input_to_shortpath"
31159
31160  input_path="$input_to_shortpath"
31161  # Check if we need to convert this using DOS-style short mode. If the path
31162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31163  # take no chances and rewrite it.
31164  # Note: m4 eats our [], so we need to use [ and ] instead.
31165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31166  if test "x$has_forbidden_chars" != x; then
31167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31171      # Going to short mode and back again did indeed matter. Since short mode is
31172      # case insensitive, let's make it lowercase to improve readability.
31173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31174      # Now convert it back to Unix-style (cygpath)
31175      input_path=`$CYGPATH -u "$shortmode_path"`
31176      new_path="$input_path"
31177    fi
31178  fi
31179
31180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31181  if test "x$test_cygdrive_prefix" = x; then
31182    # As a simple fix, exclude /usr/bin since it's not a real path.
31183    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31185      # a path prefixed by /cygdrive for fixpath to work.
31186      new_path="$CYGWIN_ROOT_PATH$input_path"
31187    fi
31188  fi
31189
31190  # remove trailing .exe if any
31191  new_path="${new_path/%.exe/}"
31192
31193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31194
31195  # First separate the path from the arguments. This will split at the first
31196  # space.
31197  complete="$LD"
31198  path="${complete%% *}"
31199  tmp="$complete EOL"
31200  arguments="${tmp#* }"
31201
31202  # Input might be given as Windows format, start by converting to
31203  # unix format.
31204  new_path="$path"
31205
31206  windows_path="$new_path"
31207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31208    unix_path=`$CYGPATH -u "$windows_path"`
31209    new_path="$unix_path"
31210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31212    new_path="$unix_path"
31213  fi
31214
31215
31216  # Now try to locate executable using which
31217  new_path=`$WHICH "$new_path" 2> /dev/null`
31218
31219  if test "x$new_path" = x; then
31220    # Oops. Which didn't find the executable.
31221    # The splitting of arguments from the executable at a space might have been incorrect,
31222    # since paths with space are more likely in Windows. Give it another try with the whole
31223    # argument.
31224    path="$complete"
31225    arguments="EOL"
31226    new_path="$path"
31227
31228  windows_path="$new_path"
31229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31230    unix_path=`$CYGPATH -u "$windows_path"`
31231    new_path="$unix_path"
31232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31234    new_path="$unix_path"
31235  fi
31236
31237
31238    new_path=`$WHICH "$new_path" 2> /dev/null`
31239    # bat and cmd files are not always considered executable in MSYS causing which
31240    # to not find them
31241    if test "x$new_path" = x \
31242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31244      new_path="$path"
31245
31246  windows_path="$new_path"
31247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31248    unix_path=`$CYGPATH -u "$windows_path"`
31249    new_path="$unix_path"
31250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31252    new_path="$unix_path"
31253  fi
31254
31255    fi
31256
31257    if test "x$new_path" = x; then
31258      # It's still not found. Now this is an unrecoverable error.
31259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31260$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31261      has_space=`$ECHO "$complete" | $GREP " "`
31262      if test "x$has_space" != x; then
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31265      fi
31266      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31267    fi
31268  fi
31269
31270  # Now new_path has a complete unix path to the binary
31271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31272    # Keep paths in /bin as-is, but remove trailing .exe if any
31273    new_path="${new_path/%.exe/}"
31274    # Do not save /bin paths to all_fixpath_prefixes!
31275  else
31276    # Not in mixed or Windows style, start by that.
31277    new_path=`cmd //c echo $new_path`
31278
31279  input_path="$new_path"
31280  # Check if we need to convert this using DOS-style short mode. If the path
31281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31282  # take no chances and rewrite it.
31283  # Note: m4 eats our [], so we need to use [ and ] instead.
31284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31285  if test "x$has_forbidden_chars" != x; then
31286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31288  fi
31289
31290    # Output is in $new_path
31291
31292  windows_path="$new_path"
31293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31294    unix_path=`$CYGPATH -u "$windows_path"`
31295    new_path="$unix_path"
31296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31298    new_path="$unix_path"
31299  fi
31300
31301    # remove trailing .exe if any
31302    new_path="${new_path/%.exe/}"
31303
31304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31306  fi
31307
31308  else
31309    # We're on a posix platform. Hooray! :)
31310    # First separate the path from the arguments. This will split at the first
31311    # space.
31312    complete="$LD"
31313    path="${complete%% *}"
31314    tmp="$complete EOL"
31315    arguments="${tmp#* }"
31316
31317    # Cannot rely on the command "which" here since it doesn't always work.
31318    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31319    if test -z "$is_absolute_path"; then
31320      # Path to executable is not absolute. Find it.
31321      IFS_save="$IFS"
31322      IFS=:
31323      for p in $PATH; do
31324        if test -f "$p/$path" && test -x "$p/$path"; then
31325          new_path="$p/$path"
31326          break
31327        fi
31328      done
31329      IFS="$IFS_save"
31330    else
31331      # This is an absolute path, we can use it without further modifications.
31332      new_path="$path"
31333    fi
31334
31335    if test "x$new_path" = x; then
31336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31337$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31338      has_space=`$ECHO "$complete" | $GREP " "`
31339      if test "x$has_space" != x; then
31340        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31341$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31342      fi
31343      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31344    fi
31345  fi
31346
31347  # Now join together the path and the arguments once again
31348  if test "x$arguments" != xEOL; then
31349    new_complete="$new_path ${arguments% *}"
31350  else
31351    new_complete="$new_path"
31352  fi
31353
31354  if test "x$complete" != "x$new_complete"; then
31355    LD="$new_complete"
31356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31357$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31358  fi
31359
31360    # Verify that we indeed succeeded with this trick.
31361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31362$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31363    "$LD" --version > /dev/null
31364    if test $? -eq 0 ; then
31365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31366$as_echo "no" >&6; }
31367      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31368    else
31369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31370$as_echo "yes" >&6; }
31371    fi
31372    LDCXX="$LD"
31373  else
31374    # All other toolchains use the compiler to link.
31375    LD="$CC"
31376    LDCXX="$CXX"
31377  fi
31378
31379  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31380
31381
31382  #
31383  # Setup the assembler (AS)
31384  #
31385  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31386    # FIXME: should this really be solaris, or solstudio?
31387
31388
31389  # Publish this variable in the help.
31390
31391
31392  if test "x$AS" = x; then
31393    # The variable is not set by user, try to locate tool using the code snippet
31394    for ac_prog in as
31395do
31396  # Extract the first word of "$ac_prog", so it can be a program name with args.
31397set dummy $ac_prog; ac_word=$2
31398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31399$as_echo_n "checking for $ac_word... " >&6; }
31400if ${ac_cv_path_AS+:} false; then :
31401  $as_echo_n "(cached) " >&6
31402else
31403  case $AS in
31404  [\\/]* | ?:[\\/]*)
31405  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31406  ;;
31407  *)
31408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31409for as_dir in $PATH
31410do
31411  IFS=$as_save_IFS
31412  test -z "$as_dir" && as_dir=.
31413    for ac_exec_ext in '' $ac_executable_extensions; do
31414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31415    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31417    break 2
31418  fi
31419done
31420  done
31421IFS=$as_save_IFS
31422
31423  ;;
31424esac
31425fi
31426AS=$ac_cv_path_AS
31427if test -n "$AS"; then
31428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31429$as_echo "$AS" >&6; }
31430else
31431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31432$as_echo "no" >&6; }
31433fi
31434
31435
31436  test -n "$AS" && break
31437done
31438
31439  else
31440    # The variable is set, but is it from the command line or the environment?
31441
31442    # Try to remove the string !AS! from our list.
31443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31445      # If it failed, the variable was not from the command line. Ignore it,
31446      # but warn the user (except for BASH, which is always set by the calling BASH).
31447      if test "xAS" != xBASH; then
31448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31449$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31450      fi
31451      # Try to locate tool using the code snippet
31452      for ac_prog in as
31453do
31454  # Extract the first word of "$ac_prog", so it can be a program name with args.
31455set dummy $ac_prog; ac_word=$2
31456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31457$as_echo_n "checking for $ac_word... " >&6; }
31458if ${ac_cv_path_AS+:} false; then :
31459  $as_echo_n "(cached) " >&6
31460else
31461  case $AS in
31462  [\\/]* | ?:[\\/]*)
31463  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31464  ;;
31465  *)
31466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31467for as_dir in $PATH
31468do
31469  IFS=$as_save_IFS
31470  test -z "$as_dir" && as_dir=.
31471    for ac_exec_ext in '' $ac_executable_extensions; do
31472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31473    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31475    break 2
31476  fi
31477done
31478  done
31479IFS=$as_save_IFS
31480
31481  ;;
31482esac
31483fi
31484AS=$ac_cv_path_AS
31485if test -n "$AS"; then
31486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31487$as_echo "$AS" >&6; }
31488else
31489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31490$as_echo "no" >&6; }
31491fi
31492
31493
31494  test -n "$AS" && break
31495done
31496
31497    else
31498      # If it succeeded, then it was overridden by the user. We will use it
31499      # for the tool.
31500
31501      # First remove it from the list of overridden variables, so we can test
31502      # for unknown variables in the end.
31503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31504
31505      # Check if the provided tool contains a complete path.
31506      tool_specified="$AS"
31507      tool_basename="${tool_specified##*/}"
31508      if test "x$tool_basename" = "x$tool_specified"; then
31509        # A command without a complete path is provided, search $PATH.
31510        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31511$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31512        # Extract the first word of "$tool_basename", so it can be a program name with args.
31513set dummy $tool_basename; ac_word=$2
31514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31515$as_echo_n "checking for $ac_word... " >&6; }
31516if ${ac_cv_path_AS+:} false; then :
31517  $as_echo_n "(cached) " >&6
31518else
31519  case $AS in
31520  [\\/]* | ?:[\\/]*)
31521  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31522  ;;
31523  *)
31524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31525for as_dir in $PATH
31526do
31527  IFS=$as_save_IFS
31528  test -z "$as_dir" && as_dir=.
31529    for ac_exec_ext in '' $ac_executable_extensions; do
31530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31531    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31533    break 2
31534  fi
31535done
31536  done
31537IFS=$as_save_IFS
31538
31539  ;;
31540esac
31541fi
31542AS=$ac_cv_path_AS
31543if test -n "$AS"; then
31544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31545$as_echo "$AS" >&6; }
31546else
31547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31548$as_echo "no" >&6; }
31549fi
31550
31551
31552        if test "x$AS" = x; then
31553          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31554        fi
31555      else
31556        # Otherwise we believe it is a complete path. Use it as it is.
31557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31558$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31560$as_echo_n "checking for AS... " >&6; }
31561        if test ! -x "$tool_specified"; then
31562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31563$as_echo "not found" >&6; }
31564          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31565        fi
31566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31567$as_echo "$tool_specified" >&6; }
31568      fi
31569    fi
31570  fi
31571
31572
31573
31574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31575
31576  # First separate the path from the arguments. This will split at the first
31577  # space.
31578  complete="$AS"
31579  path="${complete%% *}"
31580  tmp="$complete EOL"
31581  arguments="${tmp#* }"
31582
31583  # Input might be given as Windows format, start by converting to
31584  # unix format.
31585  new_path=`$CYGPATH -u "$path"`
31586
31587  # Now try to locate executable using which
31588  new_path=`$WHICH "$new_path" 2> /dev/null`
31589  # bat and cmd files are not always considered executable in cygwin causing which
31590  # to not find them
31591  if test "x$new_path" = x \
31592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31594    new_path=`$CYGPATH -u "$path"`
31595  fi
31596  if test "x$new_path" = x; then
31597    # Oops. Which didn't find the executable.
31598    # The splitting of arguments from the executable at a space might have been incorrect,
31599    # since paths with space are more likely in Windows. Give it another try with the whole
31600    # argument.
31601    path="$complete"
31602    arguments="EOL"
31603    new_path=`$CYGPATH -u "$path"`
31604    new_path=`$WHICH "$new_path" 2> /dev/null`
31605    # bat and cmd files are not always considered executable in cygwin causing which
31606    # to not find them
31607    if test "x$new_path" = x \
31608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31610      new_path=`$CYGPATH -u "$path"`
31611    fi
31612    if test "x$new_path" = x; then
31613      # It's still not found. Now this is an unrecoverable error.
31614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31615$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31616      has_space=`$ECHO "$complete" | $GREP " "`
31617      if test "x$has_space" != x; then
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31620      fi
31621      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31622    fi
31623  fi
31624
31625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31628  # "foo.exe" is OK but "foo" is an error.
31629  #
31630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31631  # It is also a way to make sure we got the proper file name for the real test later on.
31632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31633  if test "x$test_shortpath" = x; then
31634    # Short path failed, file does not exist as specified.
31635    # Try adding .exe or .cmd
31636    if test -f "${new_path}.exe"; then
31637      input_to_shortpath="${new_path}.exe"
31638    elif test -f "${new_path}.cmd"; then
31639      input_to_shortpath="${new_path}.cmd"
31640    else
31641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31642$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31645      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31646    fi
31647  else
31648    input_to_shortpath="$new_path"
31649  fi
31650
31651  # Call helper function which possibly converts this using DOS-style short mode.
31652  # If so, the updated path is stored in $new_path.
31653  new_path="$input_to_shortpath"
31654
31655  input_path="$input_to_shortpath"
31656  # Check if we need to convert this using DOS-style short mode. If the path
31657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31658  # take no chances and rewrite it.
31659  # Note: m4 eats our [], so we need to use [ and ] instead.
31660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31661  if test "x$has_forbidden_chars" != x; then
31662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31666      # Going to short mode and back again did indeed matter. Since short mode is
31667      # case insensitive, let's make it lowercase to improve readability.
31668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31669      # Now convert it back to Unix-style (cygpath)
31670      input_path=`$CYGPATH -u "$shortmode_path"`
31671      new_path="$input_path"
31672    fi
31673  fi
31674
31675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31676  if test "x$test_cygdrive_prefix" = x; then
31677    # As a simple fix, exclude /usr/bin since it's not a real path.
31678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31680      # a path prefixed by /cygdrive for fixpath to work.
31681      new_path="$CYGWIN_ROOT_PATH$input_path"
31682    fi
31683  fi
31684
31685  # remove trailing .exe if any
31686  new_path="${new_path/%.exe/}"
31687
31688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31689
31690  # First separate the path from the arguments. This will split at the first
31691  # space.
31692  complete="$AS"
31693  path="${complete%% *}"
31694  tmp="$complete EOL"
31695  arguments="${tmp#* }"
31696
31697  # Input might be given as Windows format, start by converting to
31698  # unix format.
31699  new_path="$path"
31700
31701  windows_path="$new_path"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    unix_path=`$CYGPATH -u "$windows_path"`
31704    new_path="$unix_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31707    new_path="$unix_path"
31708  fi
31709
31710
31711  # Now try to locate executable using which
31712  new_path=`$WHICH "$new_path" 2> /dev/null`
31713
31714  if test "x$new_path" = x; then
31715    # Oops. Which didn't find the executable.
31716    # The splitting of arguments from the executable at a space might have been incorrect,
31717    # since paths with space are more likely in Windows. Give it another try with the whole
31718    # argument.
31719    path="$complete"
31720    arguments="EOL"
31721    new_path="$path"
31722
31723  windows_path="$new_path"
31724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31725    unix_path=`$CYGPATH -u "$windows_path"`
31726    new_path="$unix_path"
31727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31729    new_path="$unix_path"
31730  fi
31731
31732
31733    new_path=`$WHICH "$new_path" 2> /dev/null`
31734    # bat and cmd files are not always considered executable in MSYS causing which
31735    # to not find them
31736    if test "x$new_path" = x \
31737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31739      new_path="$path"
31740
31741  windows_path="$new_path"
31742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31743    unix_path=`$CYGPATH -u "$windows_path"`
31744    new_path="$unix_path"
31745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31747    new_path="$unix_path"
31748  fi
31749
31750    fi
31751
31752    if test "x$new_path" = x; then
31753      # It's still not found. Now this is an unrecoverable error.
31754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31755$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31756      has_space=`$ECHO "$complete" | $GREP " "`
31757      if test "x$has_space" != x; then
31758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31760      fi
31761      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31762    fi
31763  fi
31764
31765  # Now new_path has a complete unix path to the binary
31766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31767    # Keep paths in /bin as-is, but remove trailing .exe if any
31768    new_path="${new_path/%.exe/}"
31769    # Do not save /bin paths to all_fixpath_prefixes!
31770  else
31771    # Not in mixed or Windows style, start by that.
31772    new_path=`cmd //c echo $new_path`
31773
31774  input_path="$new_path"
31775  # Check if we need to convert this using DOS-style short mode. If the path
31776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31777  # take no chances and rewrite it.
31778  # Note: m4 eats our [], so we need to use [ and ] instead.
31779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31780  if test "x$has_forbidden_chars" != x; then
31781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31783  fi
31784
31785    # Output is in $new_path
31786
31787  windows_path="$new_path"
31788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31789    unix_path=`$CYGPATH -u "$windows_path"`
31790    new_path="$unix_path"
31791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31793    new_path="$unix_path"
31794  fi
31795
31796    # remove trailing .exe if any
31797    new_path="${new_path/%.exe/}"
31798
31799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31801  fi
31802
31803  else
31804    # We're on a posix platform. Hooray! :)
31805    # First separate the path from the arguments. This will split at the first
31806    # space.
31807    complete="$AS"
31808    path="${complete%% *}"
31809    tmp="$complete EOL"
31810    arguments="${tmp#* }"
31811
31812    # Cannot rely on the command "which" here since it doesn't always work.
31813    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31814    if test -z "$is_absolute_path"; then
31815      # Path to executable is not absolute. Find it.
31816      IFS_save="$IFS"
31817      IFS=:
31818      for p in $PATH; do
31819        if test -f "$p/$path" && test -x "$p/$path"; then
31820          new_path="$p/$path"
31821          break
31822        fi
31823      done
31824      IFS="$IFS_save"
31825    else
31826      # This is an absolute path, we can use it without further modifications.
31827      new_path="$path"
31828    fi
31829
31830    if test "x$new_path" = x; then
31831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31832$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31833      has_space=`$ECHO "$complete" | $GREP " "`
31834      if test "x$has_space" != x; then
31835        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31837      fi
31838      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31839    fi
31840  fi
31841
31842  # Now join together the path and the arguments once again
31843  if test "x$arguments" != xEOL; then
31844    new_complete="$new_path ${arguments% *}"
31845  else
31846    new_complete="$new_path"
31847  fi
31848
31849  if test "x$complete" != "x$new_complete"; then
31850    AS="$new_complete"
31851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
31852$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
31853  fi
31854
31855  else
31856    # FIXME: is this correct for microsoft?
31857    AS="$CC -c"
31858  fi
31859
31860
31861  #
31862  # Setup the archiver (AR)
31863  #
31864  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31865    # The corresponding ar tool is lib.exe (used to create static libraries)
31866    # Extract the first word of "lib", so it can be a program name with args.
31867set dummy lib; ac_word=$2
31868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31869$as_echo_n "checking for $ac_word... " >&6; }
31870if ${ac_cv_prog_AR+:} false; then :
31871  $as_echo_n "(cached) " >&6
31872else
31873  if test -n "$AR"; then
31874  ac_cv_prog_AR="$AR" # Let the user override the test.
31875else
31876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31877for as_dir in $PATH
31878do
31879  IFS=$as_save_IFS
31880  test -z "$as_dir" && as_dir=.
31881    for ac_exec_ext in '' $ac_executable_extensions; do
31882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31883    ac_cv_prog_AR="lib"
31884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31885    break 2
31886  fi
31887done
31888  done
31889IFS=$as_save_IFS
31890
31891fi
31892fi
31893AR=$ac_cv_prog_AR
31894if test -n "$AR"; then
31895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31896$as_echo "$AR" >&6; }
31897else
31898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31899$as_echo "no" >&6; }
31900fi
31901
31902
31903  else
31904
31905
31906  # Publish this variable in the help.
31907
31908
31909  if test "x$AR" = x; then
31910    # The variable is not set by user, try to locate tool using the code snippet
31911    if test -n "$ac_tool_prefix"; then
31912  for ac_prog in ar
31913  do
31914    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31915set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31917$as_echo_n "checking for $ac_word... " >&6; }
31918if ${ac_cv_prog_AR+:} false; then :
31919  $as_echo_n "(cached) " >&6
31920else
31921  if test -n "$AR"; then
31922  ac_cv_prog_AR="$AR" # Let the user override the test.
31923else
31924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31925for as_dir in $PATH
31926do
31927  IFS=$as_save_IFS
31928  test -z "$as_dir" && as_dir=.
31929    for ac_exec_ext in '' $ac_executable_extensions; do
31930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31931    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31933    break 2
31934  fi
31935done
31936  done
31937IFS=$as_save_IFS
31938
31939fi
31940fi
31941AR=$ac_cv_prog_AR
31942if test -n "$AR"; then
31943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31944$as_echo "$AR" >&6; }
31945else
31946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31947$as_echo "no" >&6; }
31948fi
31949
31950
31951    test -n "$AR" && break
31952  done
31953fi
31954if test -z "$AR"; then
31955  ac_ct_AR=$AR
31956  for ac_prog in ar
31957do
31958  # Extract the first word of "$ac_prog", so it can be a program name with args.
31959set dummy $ac_prog; ac_word=$2
31960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31961$as_echo_n "checking for $ac_word... " >&6; }
31962if ${ac_cv_prog_ac_ct_AR+:} false; then :
31963  $as_echo_n "(cached) " >&6
31964else
31965  if test -n "$ac_ct_AR"; then
31966  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31967else
31968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31969for as_dir in $PATH
31970do
31971  IFS=$as_save_IFS
31972  test -z "$as_dir" && as_dir=.
31973    for ac_exec_ext in '' $ac_executable_extensions; do
31974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31975    ac_cv_prog_ac_ct_AR="$ac_prog"
31976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31977    break 2
31978  fi
31979done
31980  done
31981IFS=$as_save_IFS
31982
31983fi
31984fi
31985ac_ct_AR=$ac_cv_prog_ac_ct_AR
31986if test -n "$ac_ct_AR"; then
31987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31988$as_echo "$ac_ct_AR" >&6; }
31989else
31990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31991$as_echo "no" >&6; }
31992fi
31993
31994
31995  test -n "$ac_ct_AR" && break
31996done
31997
31998  if test "x$ac_ct_AR" = x; then
31999    AR=""
32000  else
32001    case $cross_compiling:$ac_tool_warned in
32002yes:)
32003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32005ac_tool_warned=yes ;;
32006esac
32007    AR=$ac_ct_AR
32008  fi
32009fi
32010
32011  else
32012    # The variable is set, but is it from the command line or the environment?
32013
32014    # Try to remove the string !AR! from our list.
32015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32017      # If it failed, the variable was not from the command line. Ignore it,
32018      # but warn the user (except for BASH, which is always set by the calling BASH).
32019      if test "xAR" != xBASH; then
32020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32021$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32022      fi
32023      # Try to locate tool using the code snippet
32024      if test -n "$ac_tool_prefix"; then
32025  for ac_prog in ar
32026  do
32027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32030$as_echo_n "checking for $ac_word... " >&6; }
32031if ${ac_cv_prog_AR+:} false; then :
32032  $as_echo_n "(cached) " >&6
32033else
32034  if test -n "$AR"; then
32035  ac_cv_prog_AR="$AR" # Let the user override the test.
32036else
32037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32038for as_dir in $PATH
32039do
32040  IFS=$as_save_IFS
32041  test -z "$as_dir" && as_dir=.
32042    for ac_exec_ext in '' $ac_executable_extensions; do
32043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32044    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32046    break 2
32047  fi
32048done
32049  done
32050IFS=$as_save_IFS
32051
32052fi
32053fi
32054AR=$ac_cv_prog_AR
32055if test -n "$AR"; then
32056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32057$as_echo "$AR" >&6; }
32058else
32059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32060$as_echo "no" >&6; }
32061fi
32062
32063
32064    test -n "$AR" && break
32065  done
32066fi
32067if test -z "$AR"; then
32068  ac_ct_AR=$AR
32069  for ac_prog in ar
32070do
32071  # Extract the first word of "$ac_prog", so it can be a program name with args.
32072set dummy $ac_prog; ac_word=$2
32073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32074$as_echo_n "checking for $ac_word... " >&6; }
32075if ${ac_cv_prog_ac_ct_AR+:} false; then :
32076  $as_echo_n "(cached) " >&6
32077else
32078  if test -n "$ac_ct_AR"; then
32079  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32080else
32081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32082for as_dir in $PATH
32083do
32084  IFS=$as_save_IFS
32085  test -z "$as_dir" && as_dir=.
32086    for ac_exec_ext in '' $ac_executable_extensions; do
32087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32088    ac_cv_prog_ac_ct_AR="$ac_prog"
32089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32090    break 2
32091  fi
32092done
32093  done
32094IFS=$as_save_IFS
32095
32096fi
32097fi
32098ac_ct_AR=$ac_cv_prog_ac_ct_AR
32099if test -n "$ac_ct_AR"; then
32100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32101$as_echo "$ac_ct_AR" >&6; }
32102else
32103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32104$as_echo "no" >&6; }
32105fi
32106
32107
32108  test -n "$ac_ct_AR" && break
32109done
32110
32111  if test "x$ac_ct_AR" = x; then
32112    AR=""
32113  else
32114    case $cross_compiling:$ac_tool_warned in
32115yes:)
32116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32118ac_tool_warned=yes ;;
32119esac
32120    AR=$ac_ct_AR
32121  fi
32122fi
32123
32124    else
32125      # If it succeeded, then it was overridden by the user. We will use it
32126      # for the tool.
32127
32128      # First remove it from the list of overridden variables, so we can test
32129      # for unknown variables in the end.
32130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32131
32132      # Check if the provided tool contains a complete path.
32133      tool_specified="$AR"
32134      tool_basename="${tool_specified##*/}"
32135      if test "x$tool_basename" = "x$tool_specified"; then
32136        # A command without a complete path is provided, search $PATH.
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32138$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32139        # Extract the first word of "$tool_basename", so it can be a program name with args.
32140set dummy $tool_basename; ac_word=$2
32141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32142$as_echo_n "checking for $ac_word... " >&6; }
32143if ${ac_cv_path_AR+:} false; then :
32144  $as_echo_n "(cached) " >&6
32145else
32146  case $AR in
32147  [\\/]* | ?:[\\/]*)
32148  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32149  ;;
32150  *)
32151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32152for as_dir in $PATH
32153do
32154  IFS=$as_save_IFS
32155  test -z "$as_dir" && as_dir=.
32156    for ac_exec_ext in '' $ac_executable_extensions; do
32157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32158    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32160    break 2
32161  fi
32162done
32163  done
32164IFS=$as_save_IFS
32165
32166  ;;
32167esac
32168fi
32169AR=$ac_cv_path_AR
32170if test -n "$AR"; then
32171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32172$as_echo "$AR" >&6; }
32173else
32174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32175$as_echo "no" >&6; }
32176fi
32177
32178
32179        if test "x$AR" = x; then
32180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32181        fi
32182      else
32183        # Otherwise we believe it is a complete path. Use it as it is.
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32185$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32187$as_echo_n "checking for AR... " >&6; }
32188        if test ! -x "$tool_specified"; then
32189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32190$as_echo "not found" >&6; }
32191          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32192        fi
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32194$as_echo "$tool_specified" >&6; }
32195      fi
32196    fi
32197  fi
32198
32199
32200  fi
32201
32202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32203
32204  # First separate the path from the arguments. This will split at the first
32205  # space.
32206  complete="$AR"
32207  path="${complete%% *}"
32208  tmp="$complete EOL"
32209  arguments="${tmp#* }"
32210
32211  # Input might be given as Windows format, start by converting to
32212  # unix format.
32213  new_path=`$CYGPATH -u "$path"`
32214
32215  # Now try to locate executable using which
32216  new_path=`$WHICH "$new_path" 2> /dev/null`
32217  # bat and cmd files are not always considered executable in cygwin causing which
32218  # to not find them
32219  if test "x$new_path" = x \
32220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32222    new_path=`$CYGPATH -u "$path"`
32223  fi
32224  if test "x$new_path" = x; then
32225    # Oops. Which didn't find the executable.
32226    # The splitting of arguments from the executable at a space might have been incorrect,
32227    # since paths with space are more likely in Windows. Give it another try with the whole
32228    # argument.
32229    path="$complete"
32230    arguments="EOL"
32231    new_path=`$CYGPATH -u "$path"`
32232    new_path=`$WHICH "$new_path" 2> /dev/null`
32233    # bat and cmd files are not always considered executable in cygwin causing which
32234    # to not find them
32235    if test "x$new_path" = x \
32236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32238      new_path=`$CYGPATH -u "$path"`
32239    fi
32240    if test "x$new_path" = x; then
32241      # It's still not found. Now this is an unrecoverable error.
32242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32243$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32244      has_space=`$ECHO "$complete" | $GREP " "`
32245      if test "x$has_space" != x; then
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32248      fi
32249      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32250    fi
32251  fi
32252
32253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32256  # "foo.exe" is OK but "foo" is an error.
32257  #
32258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32259  # It is also a way to make sure we got the proper file name for the real test later on.
32260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32261  if test "x$test_shortpath" = x; then
32262    # Short path failed, file does not exist as specified.
32263    # Try adding .exe or .cmd
32264    if test -f "${new_path}.exe"; then
32265      input_to_shortpath="${new_path}.exe"
32266    elif test -f "${new_path}.cmd"; then
32267      input_to_shortpath="${new_path}.cmd"
32268    else
32269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32270$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32273      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32274    fi
32275  else
32276    input_to_shortpath="$new_path"
32277  fi
32278
32279  # Call helper function which possibly converts this using DOS-style short mode.
32280  # If so, the updated path is stored in $new_path.
32281  new_path="$input_to_shortpath"
32282
32283  input_path="$input_to_shortpath"
32284  # Check if we need to convert this using DOS-style short mode. If the path
32285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32286  # take no chances and rewrite it.
32287  # Note: m4 eats our [], so we need to use [ and ] instead.
32288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32289  if test "x$has_forbidden_chars" != x; then
32290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32294      # Going to short mode and back again did indeed matter. Since short mode is
32295      # case insensitive, let's make it lowercase to improve readability.
32296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32297      # Now convert it back to Unix-style (cygpath)
32298      input_path=`$CYGPATH -u "$shortmode_path"`
32299      new_path="$input_path"
32300    fi
32301  fi
32302
32303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32304  if test "x$test_cygdrive_prefix" = x; then
32305    # As a simple fix, exclude /usr/bin since it's not a real path.
32306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32308      # a path prefixed by /cygdrive for fixpath to work.
32309      new_path="$CYGWIN_ROOT_PATH$input_path"
32310    fi
32311  fi
32312
32313  # remove trailing .exe if any
32314  new_path="${new_path/%.exe/}"
32315
32316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32317
32318  # First separate the path from the arguments. This will split at the first
32319  # space.
32320  complete="$AR"
32321  path="${complete%% *}"
32322  tmp="$complete EOL"
32323  arguments="${tmp#* }"
32324
32325  # Input might be given as Windows format, start by converting to
32326  # unix format.
32327  new_path="$path"
32328
32329  windows_path="$new_path"
32330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32331    unix_path=`$CYGPATH -u "$windows_path"`
32332    new_path="$unix_path"
32333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32335    new_path="$unix_path"
32336  fi
32337
32338
32339  # Now try to locate executable using which
32340  new_path=`$WHICH "$new_path" 2> /dev/null`
32341
32342  if test "x$new_path" = x; then
32343    # Oops. Which didn't find the executable.
32344    # The splitting of arguments from the executable at a space might have been incorrect,
32345    # since paths with space are more likely in Windows. Give it another try with the whole
32346    # argument.
32347    path="$complete"
32348    arguments="EOL"
32349    new_path="$path"
32350
32351  windows_path="$new_path"
32352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32353    unix_path=`$CYGPATH -u "$windows_path"`
32354    new_path="$unix_path"
32355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32357    new_path="$unix_path"
32358  fi
32359
32360
32361    new_path=`$WHICH "$new_path" 2> /dev/null`
32362    # bat and cmd files are not always considered executable in MSYS causing which
32363    # to not find them
32364    if test "x$new_path" = x \
32365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32367      new_path="$path"
32368
32369  windows_path="$new_path"
32370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32371    unix_path=`$CYGPATH -u "$windows_path"`
32372    new_path="$unix_path"
32373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32375    new_path="$unix_path"
32376  fi
32377
32378    fi
32379
32380    if test "x$new_path" = x; then
32381      # It's still not found. Now this is an unrecoverable error.
32382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32383$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32384      has_space=`$ECHO "$complete" | $GREP " "`
32385      if test "x$has_space" != x; then
32386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32388      fi
32389      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32390    fi
32391  fi
32392
32393  # Now new_path has a complete unix path to the binary
32394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32395    # Keep paths in /bin as-is, but remove trailing .exe if any
32396    new_path="${new_path/%.exe/}"
32397    # Do not save /bin paths to all_fixpath_prefixes!
32398  else
32399    # Not in mixed or Windows style, start by that.
32400    new_path=`cmd //c echo $new_path`
32401
32402  input_path="$new_path"
32403  # Check if we need to convert this using DOS-style short mode. If the path
32404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32405  # take no chances and rewrite it.
32406  # Note: m4 eats our [], so we need to use [ and ] instead.
32407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32408  if test "x$has_forbidden_chars" != x; then
32409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32411  fi
32412
32413    # Output is in $new_path
32414
32415  windows_path="$new_path"
32416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32417    unix_path=`$CYGPATH -u "$windows_path"`
32418    new_path="$unix_path"
32419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32421    new_path="$unix_path"
32422  fi
32423
32424    # remove trailing .exe if any
32425    new_path="${new_path/%.exe/}"
32426
32427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32429  fi
32430
32431  else
32432    # We're on a posix platform. Hooray! :)
32433    # First separate the path from the arguments. This will split at the first
32434    # space.
32435    complete="$AR"
32436    path="${complete%% *}"
32437    tmp="$complete EOL"
32438    arguments="${tmp#* }"
32439
32440    # Cannot rely on the command "which" here since it doesn't always work.
32441    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32442    if test -z "$is_absolute_path"; then
32443      # Path to executable is not absolute. Find it.
32444      IFS_save="$IFS"
32445      IFS=:
32446      for p in $PATH; do
32447        if test -f "$p/$path" && test -x "$p/$path"; then
32448          new_path="$p/$path"
32449          break
32450        fi
32451      done
32452      IFS="$IFS_save"
32453    else
32454      # This is an absolute path, we can use it without further modifications.
32455      new_path="$path"
32456    fi
32457
32458    if test "x$new_path" = x; then
32459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32460$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32461      has_space=`$ECHO "$complete" | $GREP " "`
32462      if test "x$has_space" != x; then
32463        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32465      fi
32466      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32467    fi
32468  fi
32469
32470  # Now join together the path and the arguments once again
32471  if test "x$arguments" != xEOL; then
32472    new_complete="$new_path ${arguments% *}"
32473  else
32474    new_complete="$new_path"
32475  fi
32476
32477  if test "x$complete" != "x$new_complete"; then
32478    AR="$new_complete"
32479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32480$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32481  fi
32482
32483
32484
32485  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32486    ac_ext=m
32487ac_cpp='$OBJCPP $CPPFLAGS'
32488ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32489ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32490ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32491if test -n "$ac_tool_prefix"; then
32492  for ac_prog in gcc objcc objc cc CC
32493  do
32494    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32495set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32497$as_echo_n "checking for $ac_word... " >&6; }
32498if ${ac_cv_prog_OBJC+:} false; then :
32499  $as_echo_n "(cached) " >&6
32500else
32501  if test -n "$OBJC"; then
32502  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32503else
32504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32505for as_dir in $PATH
32506do
32507  IFS=$as_save_IFS
32508  test -z "$as_dir" && as_dir=.
32509    for ac_exec_ext in '' $ac_executable_extensions; do
32510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32511    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32513    break 2
32514  fi
32515done
32516  done
32517IFS=$as_save_IFS
32518
32519fi
32520fi
32521OBJC=$ac_cv_prog_OBJC
32522if test -n "$OBJC"; then
32523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32524$as_echo "$OBJC" >&6; }
32525else
32526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32527$as_echo "no" >&6; }
32528fi
32529
32530
32531    test -n "$OBJC" && break
32532  done
32533fi
32534if test -z "$OBJC"; then
32535  ac_ct_OBJC=$OBJC
32536  for ac_prog in gcc objcc objc cc CC
32537do
32538  # Extract the first word of "$ac_prog", so it can be a program name with args.
32539set dummy $ac_prog; ac_word=$2
32540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32541$as_echo_n "checking for $ac_word... " >&6; }
32542if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32543  $as_echo_n "(cached) " >&6
32544else
32545  if test -n "$ac_ct_OBJC"; then
32546  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32547else
32548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32549for as_dir in $PATH
32550do
32551  IFS=$as_save_IFS
32552  test -z "$as_dir" && as_dir=.
32553    for ac_exec_ext in '' $ac_executable_extensions; do
32554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32555    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32557    break 2
32558  fi
32559done
32560  done
32561IFS=$as_save_IFS
32562
32563fi
32564fi
32565ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32566if test -n "$ac_ct_OBJC"; then
32567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32568$as_echo "$ac_ct_OBJC" >&6; }
32569else
32570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32571$as_echo "no" >&6; }
32572fi
32573
32574
32575  test -n "$ac_ct_OBJC" && break
32576done
32577
32578  if test "x$ac_ct_OBJC" = x; then
32579    OBJC="gcc"
32580  else
32581    case $cross_compiling:$ac_tool_warned in
32582yes:)
32583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32585ac_tool_warned=yes ;;
32586esac
32587    OBJC=$ac_ct_OBJC
32588  fi
32589fi
32590
32591# Provide some information about the compiler.
32592$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32593set X $ac_compile
32594ac_compiler=$2
32595for ac_option in --version -v -V -qversion; do
32596  { { ac_try="$ac_compiler $ac_option >&5"
32597case "(($ac_try" in
32598  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32599  *) ac_try_echo=$ac_try;;
32600esac
32601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32602$as_echo "$ac_try_echo"; } >&5
32603  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32604  ac_status=$?
32605  if test -s conftest.err; then
32606    sed '10a\
32607... rest of stderr output deleted ...
32608         10q' conftest.err >conftest.er1
32609    cat conftest.er1 >&5
32610  fi
32611  rm -f conftest.er1 conftest.err
32612  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32613  test $ac_status = 0; }
32614done
32615
32616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32617$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32618if ${ac_cv_objc_compiler_gnu+:} false; then :
32619  $as_echo_n "(cached) " >&6
32620else
32621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32622/* end confdefs.h.  */
32623
32624int
32625main ()
32626{
32627#ifndef __GNUC__
32628       choke me
32629#endif
32630
32631  ;
32632  return 0;
32633}
32634_ACEOF
32635if ac_fn_objc_try_compile "$LINENO"; then :
32636  ac_compiler_gnu=yes
32637else
32638  ac_compiler_gnu=no
32639fi
32640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32641ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32642
32643fi
32644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32645$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32646if test $ac_compiler_gnu = yes; then
32647  GOBJC=yes
32648else
32649  GOBJC=
32650fi
32651ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32652ac_save_OBJCFLAGS=$OBJCFLAGS
32653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32654$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32655if ${ac_cv_prog_objc_g+:} false; then :
32656  $as_echo_n "(cached) " >&6
32657else
32658  ac_save_objc_werror_flag=$ac_objc_werror_flag
32659   ac_objc_werror_flag=yes
32660   ac_cv_prog_objc_g=no
32661   OBJCFLAGS="-g"
32662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32663/* end confdefs.h.  */
32664
32665int
32666main ()
32667{
32668
32669  ;
32670  return 0;
32671}
32672_ACEOF
32673if ac_fn_objc_try_compile "$LINENO"; then :
32674  ac_cv_prog_objc_g=yes
32675else
32676  OBJCFLAGS=""
32677      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32678/* end confdefs.h.  */
32679
32680int
32681main ()
32682{
32683
32684  ;
32685  return 0;
32686}
32687_ACEOF
32688if ac_fn_objc_try_compile "$LINENO"; then :
32689
32690else
32691  ac_objc_werror_flag=$ac_save_objc_werror_flag
32692	 OBJCFLAGS="-g"
32693	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32694/* end confdefs.h.  */
32695
32696int
32697main ()
32698{
32699
32700  ;
32701  return 0;
32702}
32703_ACEOF
32704if ac_fn_objc_try_compile "$LINENO"; then :
32705  ac_cv_prog_objc_g=yes
32706fi
32707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32708fi
32709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32710fi
32711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32712   ac_objc_werror_flag=$ac_save_objc_werror_flag
32713fi
32714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32715$as_echo "$ac_cv_prog_objc_g" >&6; }
32716if test "$ac_test_OBJCFLAGS" = set; then
32717  OBJCFLAGS=$ac_save_OBJCFLAGS
32718elif test $ac_cv_prog_objc_g = yes; then
32719  if test "$GOBJC" = yes; then
32720    OBJCFLAGS="-g -O2"
32721  else
32722    OBJCFLAGS="-g"
32723  fi
32724else
32725  if test "$GOBJC" = yes; then
32726    OBJCFLAGS="-O2"
32727  else
32728    OBJCFLAGS=
32729  fi
32730fi
32731ac_ext=cpp
32732ac_cpp='$CXXCPP $CPPFLAGS'
32733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32736
32737
32738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32739
32740  # First separate the path from the arguments. This will split at the first
32741  # space.
32742  complete="$OBJC"
32743  path="${complete%% *}"
32744  tmp="$complete EOL"
32745  arguments="${tmp#* }"
32746
32747  # Input might be given as Windows format, start by converting to
32748  # unix format.
32749  new_path=`$CYGPATH -u "$path"`
32750
32751  # Now try to locate executable using which
32752  new_path=`$WHICH "$new_path" 2> /dev/null`
32753  # bat and cmd files are not always considered executable in cygwin causing which
32754  # to not find them
32755  if test "x$new_path" = x \
32756      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32757      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32758    new_path=`$CYGPATH -u "$path"`
32759  fi
32760  if test "x$new_path" = x; then
32761    # Oops. Which didn't find the executable.
32762    # The splitting of arguments from the executable at a space might have been incorrect,
32763    # since paths with space are more likely in Windows. Give it another try with the whole
32764    # argument.
32765    path="$complete"
32766    arguments="EOL"
32767    new_path=`$CYGPATH -u "$path"`
32768    new_path=`$WHICH "$new_path" 2> /dev/null`
32769    # bat and cmd files are not always considered executable in cygwin causing which
32770    # to not find them
32771    if test "x$new_path" = x \
32772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32774      new_path=`$CYGPATH -u "$path"`
32775    fi
32776    if test "x$new_path" = x; then
32777      # It's still not found. Now this is an unrecoverable error.
32778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32779$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32780      has_space=`$ECHO "$complete" | $GREP " "`
32781      if test "x$has_space" != x; then
32782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32784      fi
32785      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32786    fi
32787  fi
32788
32789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32792  # "foo.exe" is OK but "foo" is an error.
32793  #
32794  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32795  # It is also a way to make sure we got the proper file name for the real test later on.
32796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32797  if test "x$test_shortpath" = x; then
32798    # Short path failed, file does not exist as specified.
32799    # Try adding .exe or .cmd
32800    if test -f "${new_path}.exe"; then
32801      input_to_shortpath="${new_path}.exe"
32802    elif test -f "${new_path}.cmd"; then
32803      input_to_shortpath="${new_path}.cmd"
32804    else
32805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32806$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32807      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32808$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32809      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32810    fi
32811  else
32812    input_to_shortpath="$new_path"
32813  fi
32814
32815  # Call helper function which possibly converts this using DOS-style short mode.
32816  # If so, the updated path is stored in $new_path.
32817  new_path="$input_to_shortpath"
32818
32819  input_path="$input_to_shortpath"
32820  # Check if we need to convert this using DOS-style short mode. If the path
32821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32822  # take no chances and rewrite it.
32823  # Note: m4 eats our [], so we need to use [ and ] instead.
32824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32825  if test "x$has_forbidden_chars" != x; then
32826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32830      # Going to short mode and back again did indeed matter. Since short mode is
32831      # case insensitive, let's make it lowercase to improve readability.
32832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32833      # Now convert it back to Unix-style (cygpath)
32834      input_path=`$CYGPATH -u "$shortmode_path"`
32835      new_path="$input_path"
32836    fi
32837  fi
32838
32839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32840  if test "x$test_cygdrive_prefix" = x; then
32841    # As a simple fix, exclude /usr/bin since it's not a real path.
32842    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32844      # a path prefixed by /cygdrive for fixpath to work.
32845      new_path="$CYGWIN_ROOT_PATH$input_path"
32846    fi
32847  fi
32848
32849  # remove trailing .exe if any
32850  new_path="${new_path/%.exe/}"
32851
32852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32853
32854  # First separate the path from the arguments. This will split at the first
32855  # space.
32856  complete="$OBJC"
32857  path="${complete%% *}"
32858  tmp="$complete EOL"
32859  arguments="${tmp#* }"
32860
32861  # Input might be given as Windows format, start by converting to
32862  # unix format.
32863  new_path="$path"
32864
32865  windows_path="$new_path"
32866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32867    unix_path=`$CYGPATH -u "$windows_path"`
32868    new_path="$unix_path"
32869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32871    new_path="$unix_path"
32872  fi
32873
32874
32875  # Now try to locate executable using which
32876  new_path=`$WHICH "$new_path" 2> /dev/null`
32877
32878  if test "x$new_path" = x; then
32879    # Oops. Which didn't find the executable.
32880    # The splitting of arguments from the executable at a space might have been incorrect,
32881    # since paths with space are more likely in Windows. Give it another try with the whole
32882    # argument.
32883    path="$complete"
32884    arguments="EOL"
32885    new_path="$path"
32886
32887  windows_path="$new_path"
32888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32889    unix_path=`$CYGPATH -u "$windows_path"`
32890    new_path="$unix_path"
32891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32893    new_path="$unix_path"
32894  fi
32895
32896
32897    new_path=`$WHICH "$new_path" 2> /dev/null`
32898    # bat and cmd files are not always considered executable in MSYS causing which
32899    # to not find them
32900    if test "x$new_path" = x \
32901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32903      new_path="$path"
32904
32905  windows_path="$new_path"
32906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32907    unix_path=`$CYGPATH -u "$windows_path"`
32908    new_path="$unix_path"
32909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32911    new_path="$unix_path"
32912  fi
32913
32914    fi
32915
32916    if test "x$new_path" = x; then
32917      # It's still not found. Now this is an unrecoverable error.
32918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32919$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32920      has_space=`$ECHO "$complete" | $GREP " "`
32921      if test "x$has_space" != x; then
32922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32924      fi
32925      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32926    fi
32927  fi
32928
32929  # Now new_path has a complete unix path to the binary
32930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32931    # Keep paths in /bin as-is, but remove trailing .exe if any
32932    new_path="${new_path/%.exe/}"
32933    # Do not save /bin paths to all_fixpath_prefixes!
32934  else
32935    # Not in mixed or Windows style, start by that.
32936    new_path=`cmd //c echo $new_path`
32937
32938  input_path="$new_path"
32939  # Check if we need to convert this using DOS-style short mode. If the path
32940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32941  # take no chances and rewrite it.
32942  # Note: m4 eats our [], so we need to use [ and ] instead.
32943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32944  if test "x$has_forbidden_chars" != x; then
32945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32947  fi
32948
32949    # Output is in $new_path
32950
32951  windows_path="$new_path"
32952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32953    unix_path=`$CYGPATH -u "$windows_path"`
32954    new_path="$unix_path"
32955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32957    new_path="$unix_path"
32958  fi
32959
32960    # remove trailing .exe if any
32961    new_path="${new_path/%.exe/}"
32962
32963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32965  fi
32966
32967  else
32968    # We're on a posix platform. Hooray! :)
32969    # First separate the path from the arguments. This will split at the first
32970    # space.
32971    complete="$OBJC"
32972    path="${complete%% *}"
32973    tmp="$complete EOL"
32974    arguments="${tmp#* }"
32975
32976    # Cannot rely on the command "which" here since it doesn't always work.
32977    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32978    if test -z "$is_absolute_path"; then
32979      # Path to executable is not absolute. Find it.
32980      IFS_save="$IFS"
32981      IFS=:
32982      for p in $PATH; do
32983        if test -f "$p/$path" && test -x "$p/$path"; then
32984          new_path="$p/$path"
32985          break
32986        fi
32987      done
32988      IFS="$IFS_save"
32989    else
32990      # This is an absolute path, we can use it without further modifications.
32991      new_path="$path"
32992    fi
32993
32994    if test "x$new_path" = x; then
32995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32996$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32997      has_space=`$ECHO "$complete" | $GREP " "`
32998      if test "x$has_space" != x; then
32999        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33000$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33001      fi
33002      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33003    fi
33004  fi
33005
33006  # Now join together the path and the arguments once again
33007  if test "x$arguments" != xEOL; then
33008    new_complete="$new_path ${arguments% *}"
33009  else
33010    new_complete="$new_path"
33011  fi
33012
33013  if test "x$complete" != "x$new_complete"; then
33014    OBJC="$new_complete"
33015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33016$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33017  fi
33018
33019
33020
33021  # Publish this variable in the help.
33022
33023
33024  if test "x$LIPO" = x; then
33025    # The variable is not set by user, try to locate tool using the code snippet
33026    for ac_prog in lipo
33027do
33028  # Extract the first word of "$ac_prog", so it can be a program name with args.
33029set dummy $ac_prog; ac_word=$2
33030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33031$as_echo_n "checking for $ac_word... " >&6; }
33032if ${ac_cv_path_LIPO+:} false; then :
33033  $as_echo_n "(cached) " >&6
33034else
33035  case $LIPO in
33036  [\\/]* | ?:[\\/]*)
33037  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33038  ;;
33039  *)
33040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33041for as_dir in $PATH
33042do
33043  IFS=$as_save_IFS
33044  test -z "$as_dir" && as_dir=.
33045    for ac_exec_ext in '' $ac_executable_extensions; do
33046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33047    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33049    break 2
33050  fi
33051done
33052  done
33053IFS=$as_save_IFS
33054
33055  ;;
33056esac
33057fi
33058LIPO=$ac_cv_path_LIPO
33059if test -n "$LIPO"; then
33060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33061$as_echo "$LIPO" >&6; }
33062else
33063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33064$as_echo "no" >&6; }
33065fi
33066
33067
33068  test -n "$LIPO" && break
33069done
33070
33071  else
33072    # The variable is set, but is it from the command line or the environment?
33073
33074    # Try to remove the string !LIPO! from our list.
33075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33077      # If it failed, the variable was not from the command line. Ignore it,
33078      # but warn the user (except for BASH, which is always set by the calling BASH).
33079      if test "xLIPO" != xBASH; then
33080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33081$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33082      fi
33083      # Try to locate tool using the code snippet
33084      for ac_prog in lipo
33085do
33086  # Extract the first word of "$ac_prog", so it can be a program name with args.
33087set dummy $ac_prog; ac_word=$2
33088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33089$as_echo_n "checking for $ac_word... " >&6; }
33090if ${ac_cv_path_LIPO+:} false; then :
33091  $as_echo_n "(cached) " >&6
33092else
33093  case $LIPO in
33094  [\\/]* | ?:[\\/]*)
33095  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33096  ;;
33097  *)
33098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33099for as_dir in $PATH
33100do
33101  IFS=$as_save_IFS
33102  test -z "$as_dir" && as_dir=.
33103    for ac_exec_ext in '' $ac_executable_extensions; do
33104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33105    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33107    break 2
33108  fi
33109done
33110  done
33111IFS=$as_save_IFS
33112
33113  ;;
33114esac
33115fi
33116LIPO=$ac_cv_path_LIPO
33117if test -n "$LIPO"; then
33118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33119$as_echo "$LIPO" >&6; }
33120else
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33122$as_echo "no" >&6; }
33123fi
33124
33125
33126  test -n "$LIPO" && break
33127done
33128
33129    else
33130      # If it succeeded, then it was overridden by the user. We will use it
33131      # for the tool.
33132
33133      # First remove it from the list of overridden variables, so we can test
33134      # for unknown variables in the end.
33135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33136
33137      # Check if the provided tool contains a complete path.
33138      tool_specified="$LIPO"
33139      tool_basename="${tool_specified##*/}"
33140      if test "x$tool_basename" = "x$tool_specified"; then
33141        # A command without a complete path is provided, search $PATH.
33142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33143$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33144        # Extract the first word of "$tool_basename", so it can be a program name with args.
33145set dummy $tool_basename; ac_word=$2
33146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33147$as_echo_n "checking for $ac_word... " >&6; }
33148if ${ac_cv_path_LIPO+:} false; then :
33149  $as_echo_n "(cached) " >&6
33150else
33151  case $LIPO in
33152  [\\/]* | ?:[\\/]*)
33153  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33154  ;;
33155  *)
33156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33157for as_dir in $PATH
33158do
33159  IFS=$as_save_IFS
33160  test -z "$as_dir" && as_dir=.
33161    for ac_exec_ext in '' $ac_executable_extensions; do
33162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33163    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33165    break 2
33166  fi
33167done
33168  done
33169IFS=$as_save_IFS
33170
33171  ;;
33172esac
33173fi
33174LIPO=$ac_cv_path_LIPO
33175if test -n "$LIPO"; then
33176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33177$as_echo "$LIPO" >&6; }
33178else
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33180$as_echo "no" >&6; }
33181fi
33182
33183
33184        if test "x$LIPO" = x; then
33185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33186        fi
33187      else
33188        # Otherwise we believe it is a complete path. Use it as it is.
33189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33190$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33192$as_echo_n "checking for LIPO... " >&6; }
33193        if test ! -x "$tool_specified"; then
33194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33195$as_echo "not found" >&6; }
33196          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33197        fi
33198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33199$as_echo "$tool_specified" >&6; }
33200      fi
33201    fi
33202  fi
33203
33204
33205
33206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33207
33208  # First separate the path from the arguments. This will split at the first
33209  # space.
33210  complete="$LIPO"
33211  path="${complete%% *}"
33212  tmp="$complete EOL"
33213  arguments="${tmp#* }"
33214
33215  # Input might be given as Windows format, start by converting to
33216  # unix format.
33217  new_path=`$CYGPATH -u "$path"`
33218
33219  # Now try to locate executable using which
33220  new_path=`$WHICH "$new_path" 2> /dev/null`
33221  # bat and cmd files are not always considered executable in cygwin causing which
33222  # to not find them
33223  if test "x$new_path" = x \
33224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33226    new_path=`$CYGPATH -u "$path"`
33227  fi
33228  if test "x$new_path" = x; then
33229    # Oops. Which didn't find the executable.
33230    # The splitting of arguments from the executable at a space might have been incorrect,
33231    # since paths with space are more likely in Windows. Give it another try with the whole
33232    # argument.
33233    path="$complete"
33234    arguments="EOL"
33235    new_path=`$CYGPATH -u "$path"`
33236    new_path=`$WHICH "$new_path" 2> /dev/null`
33237    # bat and cmd files are not always considered executable in cygwin causing which
33238    # to not find them
33239    if test "x$new_path" = x \
33240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33242      new_path=`$CYGPATH -u "$path"`
33243    fi
33244    if test "x$new_path" = x; then
33245      # It's still not found. Now this is an unrecoverable error.
33246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33247$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33248      has_space=`$ECHO "$complete" | $GREP " "`
33249      if test "x$has_space" != x; then
33250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33252      fi
33253      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33254    fi
33255  fi
33256
33257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33260  # "foo.exe" is OK but "foo" is an error.
33261  #
33262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33263  # It is also a way to make sure we got the proper file name for the real test later on.
33264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33265  if test "x$test_shortpath" = x; then
33266    # Short path failed, file does not exist as specified.
33267    # Try adding .exe or .cmd
33268    if test -f "${new_path}.exe"; then
33269      input_to_shortpath="${new_path}.exe"
33270    elif test -f "${new_path}.cmd"; then
33271      input_to_shortpath="${new_path}.cmd"
33272    else
33273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33274$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33277      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33278    fi
33279  else
33280    input_to_shortpath="$new_path"
33281  fi
33282
33283  # Call helper function which possibly converts this using DOS-style short mode.
33284  # If so, the updated path is stored in $new_path.
33285  new_path="$input_to_shortpath"
33286
33287  input_path="$input_to_shortpath"
33288  # Check if we need to convert this using DOS-style short mode. If the path
33289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33290  # take no chances and rewrite it.
33291  # Note: m4 eats our [], so we need to use [ and ] instead.
33292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33293  if test "x$has_forbidden_chars" != x; then
33294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33298      # Going to short mode and back again did indeed matter. Since short mode is
33299      # case insensitive, let's make it lowercase to improve readability.
33300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33301      # Now convert it back to Unix-style (cygpath)
33302      input_path=`$CYGPATH -u "$shortmode_path"`
33303      new_path="$input_path"
33304    fi
33305  fi
33306
33307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33308  if test "x$test_cygdrive_prefix" = x; then
33309    # As a simple fix, exclude /usr/bin since it's not a real path.
33310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33312      # a path prefixed by /cygdrive for fixpath to work.
33313      new_path="$CYGWIN_ROOT_PATH$input_path"
33314    fi
33315  fi
33316
33317  # remove trailing .exe if any
33318  new_path="${new_path/%.exe/}"
33319
33320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33321
33322  # First separate the path from the arguments. This will split at the first
33323  # space.
33324  complete="$LIPO"
33325  path="${complete%% *}"
33326  tmp="$complete EOL"
33327  arguments="${tmp#* }"
33328
33329  # Input might be given as Windows format, start by converting to
33330  # unix format.
33331  new_path="$path"
33332
33333  windows_path="$new_path"
33334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33335    unix_path=`$CYGPATH -u "$windows_path"`
33336    new_path="$unix_path"
33337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33339    new_path="$unix_path"
33340  fi
33341
33342
33343  # Now try to locate executable using which
33344  new_path=`$WHICH "$new_path" 2> /dev/null`
33345
33346  if test "x$new_path" = x; then
33347    # Oops. Which didn't find the executable.
33348    # The splitting of arguments from the executable at a space might have been incorrect,
33349    # since paths with space are more likely in Windows. Give it another try with the whole
33350    # argument.
33351    path="$complete"
33352    arguments="EOL"
33353    new_path="$path"
33354
33355  windows_path="$new_path"
33356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357    unix_path=`$CYGPATH -u "$windows_path"`
33358    new_path="$unix_path"
33359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33361    new_path="$unix_path"
33362  fi
33363
33364
33365    new_path=`$WHICH "$new_path" 2> /dev/null`
33366    # bat and cmd files are not always considered executable in MSYS causing which
33367    # to not find them
33368    if test "x$new_path" = x \
33369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33371      new_path="$path"
33372
33373  windows_path="$new_path"
33374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33375    unix_path=`$CYGPATH -u "$windows_path"`
33376    new_path="$unix_path"
33377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33379    new_path="$unix_path"
33380  fi
33381
33382    fi
33383
33384    if test "x$new_path" = x; then
33385      # It's still not found. Now this is an unrecoverable error.
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33387$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33388      has_space=`$ECHO "$complete" | $GREP " "`
33389      if test "x$has_space" != x; then
33390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33392      fi
33393      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33394    fi
33395  fi
33396
33397  # Now new_path has a complete unix path to the binary
33398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33399    # Keep paths in /bin as-is, but remove trailing .exe if any
33400    new_path="${new_path/%.exe/}"
33401    # Do not save /bin paths to all_fixpath_prefixes!
33402  else
33403    # Not in mixed or Windows style, start by that.
33404    new_path=`cmd //c echo $new_path`
33405
33406  input_path="$new_path"
33407  # Check if we need to convert this using DOS-style short mode. If the path
33408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33409  # take no chances and rewrite it.
33410  # Note: m4 eats our [], so we need to use [ and ] instead.
33411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33412  if test "x$has_forbidden_chars" != x; then
33413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33415  fi
33416
33417    # Output is in $new_path
33418
33419  windows_path="$new_path"
33420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33421    unix_path=`$CYGPATH -u "$windows_path"`
33422    new_path="$unix_path"
33423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33425    new_path="$unix_path"
33426  fi
33427
33428    # remove trailing .exe if any
33429    new_path="${new_path/%.exe/}"
33430
33431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33433  fi
33434
33435  else
33436    # We're on a posix platform. Hooray! :)
33437    # First separate the path from the arguments. This will split at the first
33438    # space.
33439    complete="$LIPO"
33440    path="${complete%% *}"
33441    tmp="$complete EOL"
33442    arguments="${tmp#* }"
33443
33444    # Cannot rely on the command "which" here since it doesn't always work.
33445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33446    if test -z "$is_absolute_path"; then
33447      # Path to executable is not absolute. Find it.
33448      IFS_save="$IFS"
33449      IFS=:
33450      for p in $PATH; do
33451        if test -f "$p/$path" && test -x "$p/$path"; then
33452          new_path="$p/$path"
33453          break
33454        fi
33455      done
33456      IFS="$IFS_save"
33457    else
33458      # This is an absolute path, we can use it without further modifications.
33459      new_path="$path"
33460    fi
33461
33462    if test "x$new_path" = x; then
33463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33464$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33465      has_space=`$ECHO "$complete" | $GREP " "`
33466      if test "x$has_space" != x; then
33467        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33469      fi
33470      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33471    fi
33472  fi
33473
33474  # Now join together the path and the arguments once again
33475  if test "x$arguments" != xEOL; then
33476    new_complete="$new_path ${arguments% *}"
33477  else
33478    new_complete="$new_path"
33479  fi
33480
33481  if test "x$complete" != "x$new_complete"; then
33482    LIPO="$new_complete"
33483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33484$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33485  fi
33486
33487  else
33488    OBJC=
33489  fi
33490
33491  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33492    # Extract the first word of "mt", so it can be a program name with args.
33493set dummy mt; ac_word=$2
33494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33495$as_echo_n "checking for $ac_word... " >&6; }
33496if ${ac_cv_prog_MT+:} false; then :
33497  $as_echo_n "(cached) " >&6
33498else
33499  if test -n "$MT"; then
33500  ac_cv_prog_MT="$MT" # Let the user override the test.
33501else
33502  ac_prog_rejected=no
33503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33504for as_dir in $PATH
33505do
33506  IFS=$as_save_IFS
33507  test -z "$as_dir" && as_dir=.
33508    for ac_exec_ext in '' $ac_executable_extensions; do
33509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33510    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33511       ac_prog_rejected=yes
33512       continue
33513     fi
33514    ac_cv_prog_MT="mt"
33515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33516    break 2
33517  fi
33518done
33519  done
33520IFS=$as_save_IFS
33521
33522if test $ac_prog_rejected = yes; then
33523  # We found a bogon in the path, so make sure we never use it.
33524  set dummy $ac_cv_prog_MT
33525  shift
33526  if test $# != 0; then
33527    # We chose a different compiler from the bogus one.
33528    # However, it has the same basename, so the bogon will be chosen
33529    # first if we set MT to just the basename; use the full file name.
33530    shift
33531    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33532  fi
33533fi
33534fi
33535fi
33536MT=$ac_cv_prog_MT
33537if test -n "$MT"; then
33538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33539$as_echo "$MT" >&6; }
33540else
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33542$as_echo "no" >&6; }
33543fi
33544
33545
33546
33547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33548
33549  # First separate the path from the arguments. This will split at the first
33550  # space.
33551  complete="$MT"
33552  path="${complete%% *}"
33553  tmp="$complete EOL"
33554  arguments="${tmp#* }"
33555
33556  # Input might be given as Windows format, start by converting to
33557  # unix format.
33558  new_path=`$CYGPATH -u "$path"`
33559
33560  # Now try to locate executable using which
33561  new_path=`$WHICH "$new_path" 2> /dev/null`
33562  # bat and cmd files are not always considered executable in cygwin causing which
33563  # to not find them
33564  if test "x$new_path" = x \
33565      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33566      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33567    new_path=`$CYGPATH -u "$path"`
33568  fi
33569  if test "x$new_path" = x; then
33570    # Oops. Which didn't find the executable.
33571    # The splitting of arguments from the executable at a space might have been incorrect,
33572    # since paths with space are more likely in Windows. Give it another try with the whole
33573    # argument.
33574    path="$complete"
33575    arguments="EOL"
33576    new_path=`$CYGPATH -u "$path"`
33577    new_path=`$WHICH "$new_path" 2> /dev/null`
33578    # bat and cmd files are not always considered executable in cygwin causing which
33579    # to not find them
33580    if test "x$new_path" = x \
33581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33583      new_path=`$CYGPATH -u "$path"`
33584    fi
33585    if test "x$new_path" = x; then
33586      # It's still not found. Now this is an unrecoverable error.
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33588$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33589      has_space=`$ECHO "$complete" | $GREP " "`
33590      if test "x$has_space" != x; then
33591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33593      fi
33594      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33595    fi
33596  fi
33597
33598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33601  # "foo.exe" is OK but "foo" is an error.
33602  #
33603  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33604  # It is also a way to make sure we got the proper file name for the real test later on.
33605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33606  if test "x$test_shortpath" = x; then
33607    # Short path failed, file does not exist as specified.
33608    # Try adding .exe or .cmd
33609    if test -f "${new_path}.exe"; then
33610      input_to_shortpath="${new_path}.exe"
33611    elif test -f "${new_path}.cmd"; then
33612      input_to_shortpath="${new_path}.cmd"
33613    else
33614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33615$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33616      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33618      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33619    fi
33620  else
33621    input_to_shortpath="$new_path"
33622  fi
33623
33624  # Call helper function which possibly converts this using DOS-style short mode.
33625  # If so, the updated path is stored in $new_path.
33626  new_path="$input_to_shortpath"
33627
33628  input_path="$input_to_shortpath"
33629  # Check if we need to convert this using DOS-style short mode. If the path
33630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33631  # take no chances and rewrite it.
33632  # Note: m4 eats our [], so we need to use [ and ] instead.
33633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33634  if test "x$has_forbidden_chars" != x; then
33635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33639      # Going to short mode and back again did indeed matter. Since short mode is
33640      # case insensitive, let's make it lowercase to improve readability.
33641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33642      # Now convert it back to Unix-style (cygpath)
33643      input_path=`$CYGPATH -u "$shortmode_path"`
33644      new_path="$input_path"
33645    fi
33646  fi
33647
33648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33649  if test "x$test_cygdrive_prefix" = x; then
33650    # As a simple fix, exclude /usr/bin since it's not a real path.
33651    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33653      # a path prefixed by /cygdrive for fixpath to work.
33654      new_path="$CYGWIN_ROOT_PATH$input_path"
33655    fi
33656  fi
33657
33658  # remove trailing .exe if any
33659  new_path="${new_path/%.exe/}"
33660
33661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33662
33663  # First separate the path from the arguments. This will split at the first
33664  # space.
33665  complete="$MT"
33666  path="${complete%% *}"
33667  tmp="$complete EOL"
33668  arguments="${tmp#* }"
33669
33670  # Input might be given as Windows format, start by converting to
33671  # unix format.
33672  new_path="$path"
33673
33674  windows_path="$new_path"
33675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33676    unix_path=`$CYGPATH -u "$windows_path"`
33677    new_path="$unix_path"
33678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33680    new_path="$unix_path"
33681  fi
33682
33683
33684  # Now try to locate executable using which
33685  new_path=`$WHICH "$new_path" 2> /dev/null`
33686
33687  if test "x$new_path" = x; then
33688    # Oops. Which didn't find the executable.
33689    # The splitting of arguments from the executable at a space might have been incorrect,
33690    # since paths with space are more likely in Windows. Give it another try with the whole
33691    # argument.
33692    path="$complete"
33693    arguments="EOL"
33694    new_path="$path"
33695
33696  windows_path="$new_path"
33697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33698    unix_path=`$CYGPATH -u "$windows_path"`
33699    new_path="$unix_path"
33700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33702    new_path="$unix_path"
33703  fi
33704
33705
33706    new_path=`$WHICH "$new_path" 2> /dev/null`
33707    # bat and cmd files are not always considered executable in MSYS causing which
33708    # to not find them
33709    if test "x$new_path" = x \
33710        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33711        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33712      new_path="$path"
33713
33714  windows_path="$new_path"
33715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33716    unix_path=`$CYGPATH -u "$windows_path"`
33717    new_path="$unix_path"
33718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33720    new_path="$unix_path"
33721  fi
33722
33723    fi
33724
33725    if test "x$new_path" = x; then
33726      # It's still not found. Now this is an unrecoverable error.
33727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33728$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33729      has_space=`$ECHO "$complete" | $GREP " "`
33730      if test "x$has_space" != x; then
33731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33733      fi
33734      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33735    fi
33736  fi
33737
33738  # Now new_path has a complete unix path to the binary
33739  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33740    # Keep paths in /bin as-is, but remove trailing .exe if any
33741    new_path="${new_path/%.exe/}"
33742    # Do not save /bin paths to all_fixpath_prefixes!
33743  else
33744    # Not in mixed or Windows style, start by that.
33745    new_path=`cmd //c echo $new_path`
33746
33747  input_path="$new_path"
33748  # Check if we need to convert this using DOS-style short mode. If the path
33749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33750  # take no chances and rewrite it.
33751  # Note: m4 eats our [], so we need to use [ and ] instead.
33752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33753  if test "x$has_forbidden_chars" != x; then
33754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33756  fi
33757
33758    # Output is in $new_path
33759
33760  windows_path="$new_path"
33761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33762    unix_path=`$CYGPATH -u "$windows_path"`
33763    new_path="$unix_path"
33764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33766    new_path="$unix_path"
33767  fi
33768
33769    # remove trailing .exe if any
33770    new_path="${new_path/%.exe/}"
33771
33772    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33773    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33774  fi
33775
33776  else
33777    # We're on a posix platform. Hooray! :)
33778    # First separate the path from the arguments. This will split at the first
33779    # space.
33780    complete="$MT"
33781    path="${complete%% *}"
33782    tmp="$complete EOL"
33783    arguments="${tmp#* }"
33784
33785    # Cannot rely on the command "which" here since it doesn't always work.
33786    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33787    if test -z "$is_absolute_path"; then
33788      # Path to executable is not absolute. Find it.
33789      IFS_save="$IFS"
33790      IFS=:
33791      for p in $PATH; do
33792        if test -f "$p/$path" && test -x "$p/$path"; then
33793          new_path="$p/$path"
33794          break
33795        fi
33796      done
33797      IFS="$IFS_save"
33798    else
33799      # This is an absolute path, we can use it without further modifications.
33800      new_path="$path"
33801    fi
33802
33803    if test "x$new_path" = x; then
33804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33805$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33806      has_space=`$ECHO "$complete" | $GREP " "`
33807      if test "x$has_space" != x; then
33808        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33809$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33810      fi
33811      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33812    fi
33813  fi
33814
33815  # Now join together the path and the arguments once again
33816  if test "x$arguments" != xEOL; then
33817    new_complete="$new_path ${arguments% *}"
33818  else
33819    new_complete="$new_path"
33820  fi
33821
33822  if test "x$complete" != "x$new_complete"; then
33823    MT="$new_complete"
33824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33825$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33826  fi
33827
33828    # Setup the resource compiler (RC)
33829    # Extract the first word of "rc", so it can be a program name with args.
33830set dummy rc; ac_word=$2
33831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33832$as_echo_n "checking for $ac_word... " >&6; }
33833if ${ac_cv_prog_RC+:} false; then :
33834  $as_echo_n "(cached) " >&6
33835else
33836  if test -n "$RC"; then
33837  ac_cv_prog_RC="$RC" # Let the user override the test.
33838else
33839  ac_prog_rejected=no
33840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33841for as_dir in $PATH
33842do
33843  IFS=$as_save_IFS
33844  test -z "$as_dir" && as_dir=.
33845    for ac_exec_ext in '' $ac_executable_extensions; do
33846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33847    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33848       ac_prog_rejected=yes
33849       continue
33850     fi
33851    ac_cv_prog_RC="rc"
33852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33853    break 2
33854  fi
33855done
33856  done
33857IFS=$as_save_IFS
33858
33859if test $ac_prog_rejected = yes; then
33860  # We found a bogon in the path, so make sure we never use it.
33861  set dummy $ac_cv_prog_RC
33862  shift
33863  if test $# != 0; then
33864    # We chose a different compiler from the bogus one.
33865    # However, it has the same basename, so the bogon will be chosen
33866    # first if we set RC to just the basename; use the full file name.
33867    shift
33868    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33869  fi
33870fi
33871fi
33872fi
33873RC=$ac_cv_prog_RC
33874if test -n "$RC"; then
33875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
33876$as_echo "$RC" >&6; }
33877else
33878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33879$as_echo "no" >&6; }
33880fi
33881
33882
33883
33884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33885
33886  # First separate the path from the arguments. This will split at the first
33887  # space.
33888  complete="$RC"
33889  path="${complete%% *}"
33890  tmp="$complete EOL"
33891  arguments="${tmp#* }"
33892
33893  # Input might be given as Windows format, start by converting to
33894  # unix format.
33895  new_path=`$CYGPATH -u "$path"`
33896
33897  # Now try to locate executable using which
33898  new_path=`$WHICH "$new_path" 2> /dev/null`
33899  # bat and cmd files are not always considered executable in cygwin causing which
33900  # to not find them
33901  if test "x$new_path" = x \
33902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33904    new_path=`$CYGPATH -u "$path"`
33905  fi
33906  if test "x$new_path" = x; then
33907    # Oops. Which didn't find the executable.
33908    # The splitting of arguments from the executable at a space might have been incorrect,
33909    # since paths with space are more likely in Windows. Give it another try with the whole
33910    # argument.
33911    path="$complete"
33912    arguments="EOL"
33913    new_path=`$CYGPATH -u "$path"`
33914    new_path=`$WHICH "$new_path" 2> /dev/null`
33915    # bat and cmd files are not always considered executable in cygwin causing which
33916    # to not find them
33917    if test "x$new_path" = x \
33918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33920      new_path=`$CYGPATH -u "$path"`
33921    fi
33922    if test "x$new_path" = x; then
33923      # It's still not found. Now this is an unrecoverable error.
33924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33925$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33926      has_space=`$ECHO "$complete" | $GREP " "`
33927      if test "x$has_space" != x; then
33928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33930      fi
33931      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33932    fi
33933  fi
33934
33935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33938  # "foo.exe" is OK but "foo" is an error.
33939  #
33940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33941  # It is also a way to make sure we got the proper file name for the real test later on.
33942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33943  if test "x$test_shortpath" = x; then
33944    # Short path failed, file does not exist as specified.
33945    # Try adding .exe or .cmd
33946    if test -f "${new_path}.exe"; then
33947      input_to_shortpath="${new_path}.exe"
33948    elif test -f "${new_path}.cmd"; then
33949      input_to_shortpath="${new_path}.cmd"
33950    else
33951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
33952$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
33953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33955      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33956    fi
33957  else
33958    input_to_shortpath="$new_path"
33959  fi
33960
33961  # Call helper function which possibly converts this using DOS-style short mode.
33962  # If so, the updated path is stored in $new_path.
33963  new_path="$input_to_shortpath"
33964
33965  input_path="$input_to_shortpath"
33966  # Check if we need to convert this using DOS-style short mode. If the path
33967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33968  # take no chances and rewrite it.
33969  # Note: m4 eats our [], so we need to use [ and ] instead.
33970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33971  if test "x$has_forbidden_chars" != x; then
33972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33976      # Going to short mode and back again did indeed matter. Since short mode is
33977      # case insensitive, let's make it lowercase to improve readability.
33978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33979      # Now convert it back to Unix-style (cygpath)
33980      input_path=`$CYGPATH -u "$shortmode_path"`
33981      new_path="$input_path"
33982    fi
33983  fi
33984
33985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33986  if test "x$test_cygdrive_prefix" = x; then
33987    # As a simple fix, exclude /usr/bin since it's not a real path.
33988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33990      # a path prefixed by /cygdrive for fixpath to work.
33991      new_path="$CYGWIN_ROOT_PATH$input_path"
33992    fi
33993  fi
33994
33995  # remove trailing .exe if any
33996  new_path="${new_path/%.exe/}"
33997
33998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33999
34000  # First separate the path from the arguments. This will split at the first
34001  # space.
34002  complete="$RC"
34003  path="${complete%% *}"
34004  tmp="$complete EOL"
34005  arguments="${tmp#* }"
34006
34007  # Input might be given as Windows format, start by converting to
34008  # unix format.
34009  new_path="$path"
34010
34011  windows_path="$new_path"
34012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34013    unix_path=`$CYGPATH -u "$windows_path"`
34014    new_path="$unix_path"
34015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34017    new_path="$unix_path"
34018  fi
34019
34020
34021  # Now try to locate executable using which
34022  new_path=`$WHICH "$new_path" 2> /dev/null`
34023
34024  if test "x$new_path" = x; then
34025    # Oops. Which didn't find the executable.
34026    # The splitting of arguments from the executable at a space might have been incorrect,
34027    # since paths with space are more likely in Windows. Give it another try with the whole
34028    # argument.
34029    path="$complete"
34030    arguments="EOL"
34031    new_path="$path"
34032
34033  windows_path="$new_path"
34034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34035    unix_path=`$CYGPATH -u "$windows_path"`
34036    new_path="$unix_path"
34037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34039    new_path="$unix_path"
34040  fi
34041
34042
34043    new_path=`$WHICH "$new_path" 2> /dev/null`
34044    # bat and cmd files are not always considered executable in MSYS causing which
34045    # to not find them
34046    if test "x$new_path" = x \
34047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34049      new_path="$path"
34050
34051  windows_path="$new_path"
34052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34053    unix_path=`$CYGPATH -u "$windows_path"`
34054    new_path="$unix_path"
34055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34057    new_path="$unix_path"
34058  fi
34059
34060    fi
34061
34062    if test "x$new_path" = x; then
34063      # It's still not found. Now this is an unrecoverable error.
34064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34065$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34066      has_space=`$ECHO "$complete" | $GREP " "`
34067      if test "x$has_space" != x; then
34068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34070      fi
34071      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34072    fi
34073  fi
34074
34075  # Now new_path has a complete unix path to the binary
34076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34077    # Keep paths in /bin as-is, but remove trailing .exe if any
34078    new_path="${new_path/%.exe/}"
34079    # Do not save /bin paths to all_fixpath_prefixes!
34080  else
34081    # Not in mixed or Windows style, start by that.
34082    new_path=`cmd //c echo $new_path`
34083
34084  input_path="$new_path"
34085  # Check if we need to convert this using DOS-style short mode. If the path
34086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34087  # take no chances and rewrite it.
34088  # Note: m4 eats our [], so we need to use [ and ] instead.
34089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34090  if test "x$has_forbidden_chars" != x; then
34091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34093  fi
34094
34095    # Output is in $new_path
34096
34097  windows_path="$new_path"
34098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34099    unix_path=`$CYGPATH -u "$windows_path"`
34100    new_path="$unix_path"
34101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34103    new_path="$unix_path"
34104  fi
34105
34106    # remove trailing .exe if any
34107    new_path="${new_path/%.exe/}"
34108
34109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34111  fi
34112
34113  else
34114    # We're on a posix platform. Hooray! :)
34115    # First separate the path from the arguments. This will split at the first
34116    # space.
34117    complete="$RC"
34118    path="${complete%% *}"
34119    tmp="$complete EOL"
34120    arguments="${tmp#* }"
34121
34122    # Cannot rely on the command "which" here since it doesn't always work.
34123    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34124    if test -z "$is_absolute_path"; then
34125      # Path to executable is not absolute. Find it.
34126      IFS_save="$IFS"
34127      IFS=:
34128      for p in $PATH; do
34129        if test -f "$p/$path" && test -x "$p/$path"; then
34130          new_path="$p/$path"
34131          break
34132        fi
34133      done
34134      IFS="$IFS_save"
34135    else
34136      # This is an absolute path, we can use it without further modifications.
34137      new_path="$path"
34138    fi
34139
34140    if test "x$new_path" = x; then
34141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34142$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34143      has_space=`$ECHO "$complete" | $GREP " "`
34144      if test "x$has_space" != x; then
34145        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34147      fi
34148      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34149    fi
34150  fi
34151
34152  # Now join together the path and the arguments once again
34153  if test "x$arguments" != xEOL; then
34154    new_complete="$new_path ${arguments% *}"
34155  else
34156    new_complete="$new_path"
34157  fi
34158
34159  if test "x$complete" != "x$new_complete"; then
34160    RC="$new_complete"
34161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34162$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34163  fi
34164
34165    # Extract the first word of "dumpbin", so it can be a program name with args.
34166set dummy dumpbin; ac_word=$2
34167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34168$as_echo_n "checking for $ac_word... " >&6; }
34169if ${ac_cv_prog_DUMPBIN+:} false; then :
34170  $as_echo_n "(cached) " >&6
34171else
34172  if test -n "$DUMPBIN"; then
34173  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34174else
34175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34176for as_dir in $PATH
34177do
34178  IFS=$as_save_IFS
34179  test -z "$as_dir" && as_dir=.
34180    for ac_exec_ext in '' $ac_executable_extensions; do
34181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34182    ac_cv_prog_DUMPBIN="dumpbin"
34183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34184    break 2
34185  fi
34186done
34187  done
34188IFS=$as_save_IFS
34189
34190fi
34191fi
34192DUMPBIN=$ac_cv_prog_DUMPBIN
34193if test -n "$DUMPBIN"; then
34194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34195$as_echo "$DUMPBIN" >&6; }
34196else
34197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34198$as_echo "no" >&6; }
34199fi
34200
34201
34202
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204
34205  # First separate the path from the arguments. This will split at the first
34206  # space.
34207  complete="$DUMPBIN"
34208  path="${complete%% *}"
34209  tmp="$complete EOL"
34210  arguments="${tmp#* }"
34211
34212  # Input might be given as Windows format, start by converting to
34213  # unix format.
34214  new_path=`$CYGPATH -u "$path"`
34215
34216  # Now try to locate executable using which
34217  new_path=`$WHICH "$new_path" 2> /dev/null`
34218  # bat and cmd files are not always considered executable in cygwin causing which
34219  # to not find them
34220  if test "x$new_path" = x \
34221      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34222      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34223    new_path=`$CYGPATH -u "$path"`
34224  fi
34225  if test "x$new_path" = x; then
34226    # Oops. Which didn't find the executable.
34227    # The splitting of arguments from the executable at a space might have been incorrect,
34228    # since paths with space are more likely in Windows. Give it another try with the whole
34229    # argument.
34230    path="$complete"
34231    arguments="EOL"
34232    new_path=`$CYGPATH -u "$path"`
34233    new_path=`$WHICH "$new_path" 2> /dev/null`
34234    # bat and cmd files are not always considered executable in cygwin causing which
34235    # to not find them
34236    if test "x$new_path" = x \
34237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34239      new_path=`$CYGPATH -u "$path"`
34240    fi
34241    if test "x$new_path" = x; then
34242      # It's still not found. Now this is an unrecoverable error.
34243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34244$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34245      has_space=`$ECHO "$complete" | $GREP " "`
34246      if test "x$has_space" != x; then
34247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34249      fi
34250      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34251    fi
34252  fi
34253
34254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34257  # "foo.exe" is OK but "foo" is an error.
34258  #
34259  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34260  # It is also a way to make sure we got the proper file name for the real test later on.
34261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34262  if test "x$test_shortpath" = x; then
34263    # Short path failed, file does not exist as specified.
34264    # Try adding .exe or .cmd
34265    if test -f "${new_path}.exe"; then
34266      input_to_shortpath="${new_path}.exe"
34267    elif test -f "${new_path}.cmd"; then
34268      input_to_shortpath="${new_path}.cmd"
34269    else
34270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34271$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34274      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34275    fi
34276  else
34277    input_to_shortpath="$new_path"
34278  fi
34279
34280  # Call helper function which possibly converts this using DOS-style short mode.
34281  # If so, the updated path is stored in $new_path.
34282  new_path="$input_to_shortpath"
34283
34284  input_path="$input_to_shortpath"
34285  # Check if we need to convert this using DOS-style short mode. If the path
34286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34287  # take no chances and rewrite it.
34288  # Note: m4 eats our [], so we need to use [ and ] instead.
34289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34290  if test "x$has_forbidden_chars" != x; then
34291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34295      # Going to short mode and back again did indeed matter. Since short mode is
34296      # case insensitive, let's make it lowercase to improve readability.
34297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34298      # Now convert it back to Unix-style (cygpath)
34299      input_path=`$CYGPATH -u "$shortmode_path"`
34300      new_path="$input_path"
34301    fi
34302  fi
34303
34304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34305  if test "x$test_cygdrive_prefix" = x; then
34306    # As a simple fix, exclude /usr/bin since it's not a real path.
34307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34309      # a path prefixed by /cygdrive for fixpath to work.
34310      new_path="$CYGWIN_ROOT_PATH$input_path"
34311    fi
34312  fi
34313
34314  # remove trailing .exe if any
34315  new_path="${new_path/%.exe/}"
34316
34317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34318
34319  # First separate the path from the arguments. This will split at the first
34320  # space.
34321  complete="$DUMPBIN"
34322  path="${complete%% *}"
34323  tmp="$complete EOL"
34324  arguments="${tmp#* }"
34325
34326  # Input might be given as Windows format, start by converting to
34327  # unix format.
34328  new_path="$path"
34329
34330  windows_path="$new_path"
34331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34332    unix_path=`$CYGPATH -u "$windows_path"`
34333    new_path="$unix_path"
34334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34336    new_path="$unix_path"
34337  fi
34338
34339
34340  # Now try to locate executable using which
34341  new_path=`$WHICH "$new_path" 2> /dev/null`
34342
34343  if test "x$new_path" = x; then
34344    # Oops. Which didn't find the executable.
34345    # The splitting of arguments from the executable at a space might have been incorrect,
34346    # since paths with space are more likely in Windows. Give it another try with the whole
34347    # argument.
34348    path="$complete"
34349    arguments="EOL"
34350    new_path="$path"
34351
34352  windows_path="$new_path"
34353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34354    unix_path=`$CYGPATH -u "$windows_path"`
34355    new_path="$unix_path"
34356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34358    new_path="$unix_path"
34359  fi
34360
34361
34362    new_path=`$WHICH "$new_path" 2> /dev/null`
34363    # bat and cmd files are not always considered executable in MSYS causing which
34364    # to not find them
34365    if test "x$new_path" = x \
34366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34368      new_path="$path"
34369
34370  windows_path="$new_path"
34371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34372    unix_path=`$CYGPATH -u "$windows_path"`
34373    new_path="$unix_path"
34374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34376    new_path="$unix_path"
34377  fi
34378
34379    fi
34380
34381    if test "x$new_path" = x; then
34382      # It's still not found. Now this is an unrecoverable error.
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34384$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34385      has_space=`$ECHO "$complete" | $GREP " "`
34386      if test "x$has_space" != x; then
34387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34389      fi
34390      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34391    fi
34392  fi
34393
34394  # Now new_path has a complete unix path to the binary
34395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34396    # Keep paths in /bin as-is, but remove trailing .exe if any
34397    new_path="${new_path/%.exe/}"
34398    # Do not save /bin paths to all_fixpath_prefixes!
34399  else
34400    # Not in mixed or Windows style, start by that.
34401    new_path=`cmd //c echo $new_path`
34402
34403  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34412  fi
34413
34414    # Output is in $new_path
34415
34416  windows_path="$new_path"
34417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34418    unix_path=`$CYGPATH -u "$windows_path"`
34419    new_path="$unix_path"
34420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34422    new_path="$unix_path"
34423  fi
34424
34425    # remove trailing .exe if any
34426    new_path="${new_path/%.exe/}"
34427
34428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34430  fi
34431
34432  else
34433    # We're on a posix platform. Hooray! :)
34434    # First separate the path from the arguments. This will split at the first
34435    # space.
34436    complete="$DUMPBIN"
34437    path="${complete%% *}"
34438    tmp="$complete EOL"
34439    arguments="${tmp#* }"
34440
34441    # Cannot rely on the command "which" here since it doesn't always work.
34442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34443    if test -z "$is_absolute_path"; then
34444      # Path to executable is not absolute. Find it.
34445      IFS_save="$IFS"
34446      IFS=:
34447      for p in $PATH; do
34448        if test -f "$p/$path" && test -x "$p/$path"; then
34449          new_path="$p/$path"
34450          break
34451        fi
34452      done
34453      IFS="$IFS_save"
34454    else
34455      # This is an absolute path, we can use it without further modifications.
34456      new_path="$path"
34457    fi
34458
34459    if test "x$new_path" = x; then
34460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34461$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34462      has_space=`$ECHO "$complete" | $GREP " "`
34463      if test "x$has_space" != x; then
34464        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34466      fi
34467      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34468    fi
34469  fi
34470
34471  # Now join together the path and the arguments once again
34472  if test "x$arguments" != xEOL; then
34473    new_complete="$new_path ${arguments% *}"
34474  else
34475    new_complete="$new_path"
34476  fi
34477
34478  if test "x$complete" != "x$new_complete"; then
34479    DUMPBIN="$new_complete"
34480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34481$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34482  fi
34483
34484    # We need to check for 'msbuild.exe' because at the place where we expect to
34485    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34486    # won't find the 'msbuild.exe' executable in that case (and the
34487    # 'ac_executable_extensions' is unusable due to performance reasons).
34488    # Notice that we intentionally don't fix up the path to MSBUILD because we
34489    # will call it in a DOS shell during freetype detection on Windows (see
34490    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34491    # Extract the first word of "msbuild.exe", so it can be a program name with args.
34492set dummy msbuild.exe; ac_word=$2
34493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34494$as_echo_n "checking for $ac_word... " >&6; }
34495if ${ac_cv_prog_MSBUILD+:} false; then :
34496  $as_echo_n "(cached) " >&6
34497else
34498  if test -n "$MSBUILD"; then
34499  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34500else
34501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34502for as_dir in $PATH
34503do
34504  IFS=$as_save_IFS
34505  test -z "$as_dir" && as_dir=.
34506    for ac_exec_ext in '' $ac_executable_extensions; do
34507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34508    ac_cv_prog_MSBUILD="msbuild.exe"
34509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34510    break 2
34511  fi
34512done
34513  done
34514IFS=$as_save_IFS
34515
34516fi
34517fi
34518MSBUILD=$ac_cv_prog_MSBUILD
34519if test -n "$MSBUILD"; then
34520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34521$as_echo "$MSBUILD" >&6; }
34522else
34523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34524$as_echo "no" >&6; }
34525fi
34526
34527
34528  fi
34529
34530  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34531
34532
34533  # Publish this variable in the help.
34534
34535
34536  if test "x$STRIP" = x; then
34537    # The variable is not set by user, try to locate tool using the code snippet
34538    for ac_prog in strip
34539do
34540  # Extract the first word of "$ac_prog", so it can be a program name with args.
34541set dummy $ac_prog; ac_word=$2
34542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34543$as_echo_n "checking for $ac_word... " >&6; }
34544if ${ac_cv_path_STRIP+:} false; then :
34545  $as_echo_n "(cached) " >&6
34546else
34547  case $STRIP in
34548  [\\/]* | ?:[\\/]*)
34549  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34550  ;;
34551  *)
34552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34553for as_dir in $PATH
34554do
34555  IFS=$as_save_IFS
34556  test -z "$as_dir" && as_dir=.
34557    for ac_exec_ext in '' $ac_executable_extensions; do
34558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34559    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34561    break 2
34562  fi
34563done
34564  done
34565IFS=$as_save_IFS
34566
34567  ;;
34568esac
34569fi
34570STRIP=$ac_cv_path_STRIP
34571if test -n "$STRIP"; then
34572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34573$as_echo "$STRIP" >&6; }
34574else
34575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34576$as_echo "no" >&6; }
34577fi
34578
34579
34580  test -n "$STRIP" && break
34581done
34582
34583  else
34584    # The variable is set, but is it from the command line or the environment?
34585
34586    # Try to remove the string !STRIP! from our list.
34587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34589      # If it failed, the variable was not from the command line. Ignore it,
34590      # but warn the user (except for BASH, which is always set by the calling BASH).
34591      if test "xSTRIP" != xBASH; then
34592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34593$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34594      fi
34595      # Try to locate tool using the code snippet
34596      for ac_prog in strip
34597do
34598  # Extract the first word of "$ac_prog", so it can be a program name with args.
34599set dummy $ac_prog; ac_word=$2
34600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34601$as_echo_n "checking for $ac_word... " >&6; }
34602if ${ac_cv_path_STRIP+:} false; then :
34603  $as_echo_n "(cached) " >&6
34604else
34605  case $STRIP in
34606  [\\/]* | ?:[\\/]*)
34607  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34608  ;;
34609  *)
34610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34611for as_dir in $PATH
34612do
34613  IFS=$as_save_IFS
34614  test -z "$as_dir" && as_dir=.
34615    for ac_exec_ext in '' $ac_executable_extensions; do
34616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34617    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34619    break 2
34620  fi
34621done
34622  done
34623IFS=$as_save_IFS
34624
34625  ;;
34626esac
34627fi
34628STRIP=$ac_cv_path_STRIP
34629if test -n "$STRIP"; then
34630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34631$as_echo "$STRIP" >&6; }
34632else
34633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34634$as_echo "no" >&6; }
34635fi
34636
34637
34638  test -n "$STRIP" && break
34639done
34640
34641    else
34642      # If it succeeded, then it was overridden by the user. We will use it
34643      # for the tool.
34644
34645      # First remove it from the list of overridden variables, so we can test
34646      # for unknown variables in the end.
34647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34648
34649      # Check if the provided tool contains a complete path.
34650      tool_specified="$STRIP"
34651      tool_basename="${tool_specified##*/}"
34652      if test "x$tool_basename" = "x$tool_specified"; then
34653        # A command without a complete path is provided, search $PATH.
34654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34655$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34656        # Extract the first word of "$tool_basename", so it can be a program name with args.
34657set dummy $tool_basename; ac_word=$2
34658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34659$as_echo_n "checking for $ac_word... " >&6; }
34660if ${ac_cv_path_STRIP+:} false; then :
34661  $as_echo_n "(cached) " >&6
34662else
34663  case $STRIP in
34664  [\\/]* | ?:[\\/]*)
34665  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34666  ;;
34667  *)
34668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34669for as_dir in $PATH
34670do
34671  IFS=$as_save_IFS
34672  test -z "$as_dir" && as_dir=.
34673    for ac_exec_ext in '' $ac_executable_extensions; do
34674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34675    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34677    break 2
34678  fi
34679done
34680  done
34681IFS=$as_save_IFS
34682
34683  ;;
34684esac
34685fi
34686STRIP=$ac_cv_path_STRIP
34687if test -n "$STRIP"; then
34688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34689$as_echo "$STRIP" >&6; }
34690else
34691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34692$as_echo "no" >&6; }
34693fi
34694
34695
34696        if test "x$STRIP" = x; then
34697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34698        fi
34699      else
34700        # Otherwise we believe it is a complete path. Use it as it is.
34701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34702$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34704$as_echo_n "checking for STRIP... " >&6; }
34705        if test ! -x "$tool_specified"; then
34706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34707$as_echo "not found" >&6; }
34708          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34709        fi
34710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34711$as_echo "$tool_specified" >&6; }
34712      fi
34713    fi
34714  fi
34715
34716
34717
34718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34719
34720  # First separate the path from the arguments. This will split at the first
34721  # space.
34722  complete="$STRIP"
34723  path="${complete%% *}"
34724  tmp="$complete EOL"
34725  arguments="${tmp#* }"
34726
34727  # Input might be given as Windows format, start by converting to
34728  # unix format.
34729  new_path=`$CYGPATH -u "$path"`
34730
34731  # Now try to locate executable using which
34732  new_path=`$WHICH "$new_path" 2> /dev/null`
34733  # bat and cmd files are not always considered executable in cygwin causing which
34734  # to not find them
34735  if test "x$new_path" = x \
34736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34738    new_path=`$CYGPATH -u "$path"`
34739  fi
34740  if test "x$new_path" = x; then
34741    # Oops. Which didn't find the executable.
34742    # The splitting of arguments from the executable at a space might have been incorrect,
34743    # since paths with space are more likely in Windows. Give it another try with the whole
34744    # argument.
34745    path="$complete"
34746    arguments="EOL"
34747    new_path=`$CYGPATH -u "$path"`
34748    new_path=`$WHICH "$new_path" 2> /dev/null`
34749    # bat and cmd files are not always considered executable in cygwin causing which
34750    # to not find them
34751    if test "x$new_path" = x \
34752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34754      new_path=`$CYGPATH -u "$path"`
34755    fi
34756    if test "x$new_path" = x; then
34757      # It's still not found. Now this is an unrecoverable error.
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34759$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34760      has_space=`$ECHO "$complete" | $GREP " "`
34761      if test "x$has_space" != x; then
34762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34764      fi
34765      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34766    fi
34767  fi
34768
34769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34772  # "foo.exe" is OK but "foo" is an error.
34773  #
34774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34775  # It is also a way to make sure we got the proper file name for the real test later on.
34776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34777  if test "x$test_shortpath" = x; then
34778    # Short path failed, file does not exist as specified.
34779    # Try adding .exe or .cmd
34780    if test -f "${new_path}.exe"; then
34781      input_to_shortpath="${new_path}.exe"
34782    elif test -f "${new_path}.cmd"; then
34783      input_to_shortpath="${new_path}.cmd"
34784    else
34785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34786$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34789      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34790    fi
34791  else
34792    input_to_shortpath="$new_path"
34793  fi
34794
34795  # Call helper function which possibly converts this using DOS-style short mode.
34796  # If so, the updated path is stored in $new_path.
34797  new_path="$input_to_shortpath"
34798
34799  input_path="$input_to_shortpath"
34800  # Check if we need to convert this using DOS-style short mode. If the path
34801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34802  # take no chances and rewrite it.
34803  # Note: m4 eats our [], so we need to use [ and ] instead.
34804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34805  if test "x$has_forbidden_chars" != x; then
34806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34810      # Going to short mode and back again did indeed matter. Since short mode is
34811      # case insensitive, let's make it lowercase to improve readability.
34812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34813      # Now convert it back to Unix-style (cygpath)
34814      input_path=`$CYGPATH -u "$shortmode_path"`
34815      new_path="$input_path"
34816    fi
34817  fi
34818
34819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34820  if test "x$test_cygdrive_prefix" = x; then
34821    # As a simple fix, exclude /usr/bin since it's not a real path.
34822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34824      # a path prefixed by /cygdrive for fixpath to work.
34825      new_path="$CYGWIN_ROOT_PATH$input_path"
34826    fi
34827  fi
34828
34829  # remove trailing .exe if any
34830  new_path="${new_path/%.exe/}"
34831
34832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34833
34834  # First separate the path from the arguments. This will split at the first
34835  # space.
34836  complete="$STRIP"
34837  path="${complete%% *}"
34838  tmp="$complete EOL"
34839  arguments="${tmp#* }"
34840
34841  # Input might be given as Windows format, start by converting to
34842  # unix format.
34843  new_path="$path"
34844
34845  windows_path="$new_path"
34846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34847    unix_path=`$CYGPATH -u "$windows_path"`
34848    new_path="$unix_path"
34849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34851    new_path="$unix_path"
34852  fi
34853
34854
34855  # Now try to locate executable using which
34856  new_path=`$WHICH "$new_path" 2> /dev/null`
34857
34858  if test "x$new_path" = x; then
34859    # Oops. Which didn't find the executable.
34860    # The splitting of arguments from the executable at a space might have been incorrect,
34861    # since paths with space are more likely in Windows. Give it another try with the whole
34862    # argument.
34863    path="$complete"
34864    arguments="EOL"
34865    new_path="$path"
34866
34867  windows_path="$new_path"
34868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34869    unix_path=`$CYGPATH -u "$windows_path"`
34870    new_path="$unix_path"
34871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34873    new_path="$unix_path"
34874  fi
34875
34876
34877    new_path=`$WHICH "$new_path" 2> /dev/null`
34878    # bat and cmd files are not always considered executable in MSYS causing which
34879    # to not find them
34880    if test "x$new_path" = x \
34881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34883      new_path="$path"
34884
34885  windows_path="$new_path"
34886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34887    unix_path=`$CYGPATH -u "$windows_path"`
34888    new_path="$unix_path"
34889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34891    new_path="$unix_path"
34892  fi
34893
34894    fi
34895
34896    if test "x$new_path" = x; then
34897      # It's still not found. Now this is an unrecoverable error.
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34899$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34900      has_space=`$ECHO "$complete" | $GREP " "`
34901      if test "x$has_space" != x; then
34902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34904      fi
34905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34906    fi
34907  fi
34908
34909  # Now new_path has a complete unix path to the binary
34910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34911    # Keep paths in /bin as-is, but remove trailing .exe if any
34912    new_path="${new_path/%.exe/}"
34913    # Do not save /bin paths to all_fixpath_prefixes!
34914  else
34915    # Not in mixed or Windows style, start by that.
34916    new_path=`cmd //c echo $new_path`
34917
34918  input_path="$new_path"
34919  # Check if we need to convert this using DOS-style short mode. If the path
34920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34921  # take no chances and rewrite it.
34922  # Note: m4 eats our [], so we need to use [ and ] instead.
34923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34924  if test "x$has_forbidden_chars" != x; then
34925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34927  fi
34928
34929    # Output is in $new_path
34930
34931  windows_path="$new_path"
34932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34933    unix_path=`$CYGPATH -u "$windows_path"`
34934    new_path="$unix_path"
34935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34937    new_path="$unix_path"
34938  fi
34939
34940    # remove trailing .exe if any
34941    new_path="${new_path/%.exe/}"
34942
34943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34945  fi
34946
34947  else
34948    # We're on a posix platform. Hooray! :)
34949    # First separate the path from the arguments. This will split at the first
34950    # space.
34951    complete="$STRIP"
34952    path="${complete%% *}"
34953    tmp="$complete EOL"
34954    arguments="${tmp#* }"
34955
34956    # Cannot rely on the command "which" here since it doesn't always work.
34957    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34958    if test -z "$is_absolute_path"; then
34959      # Path to executable is not absolute. Find it.
34960      IFS_save="$IFS"
34961      IFS=:
34962      for p in $PATH; do
34963        if test -f "$p/$path" && test -x "$p/$path"; then
34964          new_path="$p/$path"
34965          break
34966        fi
34967      done
34968      IFS="$IFS_save"
34969    else
34970      # This is an absolute path, we can use it without further modifications.
34971      new_path="$path"
34972    fi
34973
34974    if test "x$new_path" = x; then
34975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34977      has_space=`$ECHO "$complete" | $GREP " "`
34978      if test "x$has_space" != x; then
34979        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34981      fi
34982      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34983    fi
34984  fi
34985
34986  # Now join together the path and the arguments once again
34987  if test "x$arguments" != xEOL; then
34988    new_complete="$new_path ${arguments% *}"
34989  else
34990    new_complete="$new_path"
34991  fi
34992
34993  if test "x$complete" != "x$new_complete"; then
34994    STRIP="$new_complete"
34995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
34996$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
34997  fi
34998
34999
35000
35001  # Publish this variable in the help.
35002
35003
35004  if test "x$NM" = x; then
35005    # The variable is not set by user, try to locate tool using the code snippet
35006    for ac_prog in nm
35007do
35008  # Extract the first word of "$ac_prog", so it can be a program name with args.
35009set dummy $ac_prog; ac_word=$2
35010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35011$as_echo_n "checking for $ac_word... " >&6; }
35012if ${ac_cv_path_NM+:} false; then :
35013  $as_echo_n "(cached) " >&6
35014else
35015  case $NM in
35016  [\\/]* | ?:[\\/]*)
35017  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35018  ;;
35019  *)
35020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35021for as_dir in $PATH
35022do
35023  IFS=$as_save_IFS
35024  test -z "$as_dir" && as_dir=.
35025    for ac_exec_ext in '' $ac_executable_extensions; do
35026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35027    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35029    break 2
35030  fi
35031done
35032  done
35033IFS=$as_save_IFS
35034
35035  ;;
35036esac
35037fi
35038NM=$ac_cv_path_NM
35039if test -n "$NM"; then
35040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35041$as_echo "$NM" >&6; }
35042else
35043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35044$as_echo "no" >&6; }
35045fi
35046
35047
35048  test -n "$NM" && break
35049done
35050
35051  else
35052    # The variable is set, but is it from the command line or the environment?
35053
35054    # Try to remove the string !NM! from our list.
35055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35057      # If it failed, the variable was not from the command line. Ignore it,
35058      # but warn the user (except for BASH, which is always set by the calling BASH).
35059      if test "xNM" != xBASH; then
35060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35061$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35062      fi
35063      # Try to locate tool using the code snippet
35064      for ac_prog in nm
35065do
35066  # Extract the first word of "$ac_prog", so it can be a program name with args.
35067set dummy $ac_prog; ac_word=$2
35068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35069$as_echo_n "checking for $ac_word... " >&6; }
35070if ${ac_cv_path_NM+:} false; then :
35071  $as_echo_n "(cached) " >&6
35072else
35073  case $NM in
35074  [\\/]* | ?:[\\/]*)
35075  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35076  ;;
35077  *)
35078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35079for as_dir in $PATH
35080do
35081  IFS=$as_save_IFS
35082  test -z "$as_dir" && as_dir=.
35083    for ac_exec_ext in '' $ac_executable_extensions; do
35084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35085    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35087    break 2
35088  fi
35089done
35090  done
35091IFS=$as_save_IFS
35092
35093  ;;
35094esac
35095fi
35096NM=$ac_cv_path_NM
35097if test -n "$NM"; then
35098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35099$as_echo "$NM" >&6; }
35100else
35101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35102$as_echo "no" >&6; }
35103fi
35104
35105
35106  test -n "$NM" && break
35107done
35108
35109    else
35110      # If it succeeded, then it was overridden by the user. We will use it
35111      # for the tool.
35112
35113      # First remove it from the list of overridden variables, so we can test
35114      # for unknown variables in the end.
35115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35116
35117      # Check if the provided tool contains a complete path.
35118      tool_specified="$NM"
35119      tool_basename="${tool_specified##*/}"
35120      if test "x$tool_basename" = "x$tool_specified"; then
35121        # A command without a complete path is provided, search $PATH.
35122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35123$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35124        # Extract the first word of "$tool_basename", so it can be a program name with args.
35125set dummy $tool_basename; ac_word=$2
35126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35127$as_echo_n "checking for $ac_word... " >&6; }
35128if ${ac_cv_path_NM+:} false; then :
35129  $as_echo_n "(cached) " >&6
35130else
35131  case $NM in
35132  [\\/]* | ?:[\\/]*)
35133  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35134  ;;
35135  *)
35136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35137for as_dir in $PATH
35138do
35139  IFS=$as_save_IFS
35140  test -z "$as_dir" && as_dir=.
35141    for ac_exec_ext in '' $ac_executable_extensions; do
35142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35143    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35145    break 2
35146  fi
35147done
35148  done
35149IFS=$as_save_IFS
35150
35151  ;;
35152esac
35153fi
35154NM=$ac_cv_path_NM
35155if test -n "$NM"; then
35156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35157$as_echo "$NM" >&6; }
35158else
35159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35160$as_echo "no" >&6; }
35161fi
35162
35163
35164        if test "x$NM" = x; then
35165          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35166        fi
35167      else
35168        # Otherwise we believe it is a complete path. Use it as it is.
35169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35170$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35172$as_echo_n "checking for NM... " >&6; }
35173        if test ! -x "$tool_specified"; then
35174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35175$as_echo "not found" >&6; }
35176          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35177        fi
35178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35179$as_echo "$tool_specified" >&6; }
35180      fi
35181    fi
35182  fi
35183
35184
35185
35186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35187
35188  # First separate the path from the arguments. This will split at the first
35189  # space.
35190  complete="$NM"
35191  path="${complete%% *}"
35192  tmp="$complete EOL"
35193  arguments="${tmp#* }"
35194
35195  # Input might be given as Windows format, start by converting to
35196  # unix format.
35197  new_path=`$CYGPATH -u "$path"`
35198
35199  # Now try to locate executable using which
35200  new_path=`$WHICH "$new_path" 2> /dev/null`
35201  # bat and cmd files are not always considered executable in cygwin causing which
35202  # to not find them
35203  if test "x$new_path" = x \
35204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35206    new_path=`$CYGPATH -u "$path"`
35207  fi
35208  if test "x$new_path" = x; then
35209    # Oops. Which didn't find the executable.
35210    # The splitting of arguments from the executable at a space might have been incorrect,
35211    # since paths with space are more likely in Windows. Give it another try with the whole
35212    # argument.
35213    path="$complete"
35214    arguments="EOL"
35215    new_path=`$CYGPATH -u "$path"`
35216    new_path=`$WHICH "$new_path" 2> /dev/null`
35217    # bat and cmd files are not always considered executable in cygwin causing which
35218    # to not find them
35219    if test "x$new_path" = x \
35220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35222      new_path=`$CYGPATH -u "$path"`
35223    fi
35224    if test "x$new_path" = x; then
35225      # It's still not found. Now this is an unrecoverable error.
35226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35227$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35228      has_space=`$ECHO "$complete" | $GREP " "`
35229      if test "x$has_space" != x; then
35230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35232      fi
35233      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35234    fi
35235  fi
35236
35237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35240  # "foo.exe" is OK but "foo" is an error.
35241  #
35242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35243  # It is also a way to make sure we got the proper file name for the real test later on.
35244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35245  if test "x$test_shortpath" = x; then
35246    # Short path failed, file does not exist as specified.
35247    # Try adding .exe or .cmd
35248    if test -f "${new_path}.exe"; then
35249      input_to_shortpath="${new_path}.exe"
35250    elif test -f "${new_path}.cmd"; then
35251      input_to_shortpath="${new_path}.cmd"
35252    else
35253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35254$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35257      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35258    fi
35259  else
35260    input_to_shortpath="$new_path"
35261  fi
35262
35263  # Call helper function which possibly converts this using DOS-style short mode.
35264  # If so, the updated path is stored in $new_path.
35265  new_path="$input_to_shortpath"
35266
35267  input_path="$input_to_shortpath"
35268  # Check if we need to convert this using DOS-style short mode. If the path
35269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35270  # take no chances and rewrite it.
35271  # Note: m4 eats our [], so we need to use [ and ] instead.
35272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35273  if test "x$has_forbidden_chars" != x; then
35274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35278      # Going to short mode and back again did indeed matter. Since short mode is
35279      # case insensitive, let's make it lowercase to improve readability.
35280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35281      # Now convert it back to Unix-style (cygpath)
35282      input_path=`$CYGPATH -u "$shortmode_path"`
35283      new_path="$input_path"
35284    fi
35285  fi
35286
35287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35288  if test "x$test_cygdrive_prefix" = x; then
35289    # As a simple fix, exclude /usr/bin since it's not a real path.
35290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35292      # a path prefixed by /cygdrive for fixpath to work.
35293      new_path="$CYGWIN_ROOT_PATH$input_path"
35294    fi
35295  fi
35296
35297  # remove trailing .exe if any
35298  new_path="${new_path/%.exe/}"
35299
35300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35301
35302  # First separate the path from the arguments. This will split at the first
35303  # space.
35304  complete="$NM"
35305  path="${complete%% *}"
35306  tmp="$complete EOL"
35307  arguments="${tmp#* }"
35308
35309  # Input might be given as Windows format, start by converting to
35310  # unix format.
35311  new_path="$path"
35312
35313  windows_path="$new_path"
35314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35315    unix_path=`$CYGPATH -u "$windows_path"`
35316    new_path="$unix_path"
35317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35319    new_path="$unix_path"
35320  fi
35321
35322
35323  # Now try to locate executable using which
35324  new_path=`$WHICH "$new_path" 2> /dev/null`
35325
35326  if test "x$new_path" = x; then
35327    # Oops. Which didn't find the executable.
35328    # The splitting of arguments from the executable at a space might have been incorrect,
35329    # since paths with space are more likely in Windows. Give it another try with the whole
35330    # argument.
35331    path="$complete"
35332    arguments="EOL"
35333    new_path="$path"
35334
35335  windows_path="$new_path"
35336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35337    unix_path=`$CYGPATH -u "$windows_path"`
35338    new_path="$unix_path"
35339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35341    new_path="$unix_path"
35342  fi
35343
35344
35345    new_path=`$WHICH "$new_path" 2> /dev/null`
35346    # bat and cmd files are not always considered executable in MSYS causing which
35347    # to not find them
35348    if test "x$new_path" = x \
35349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35351      new_path="$path"
35352
35353  windows_path="$new_path"
35354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35355    unix_path=`$CYGPATH -u "$windows_path"`
35356    new_path="$unix_path"
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35359    new_path="$unix_path"
35360  fi
35361
35362    fi
35363
35364    if test "x$new_path" = x; then
35365      # It's still not found. Now this is an unrecoverable error.
35366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35367$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35368      has_space=`$ECHO "$complete" | $GREP " "`
35369      if test "x$has_space" != x; then
35370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35372      fi
35373      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35374    fi
35375  fi
35376
35377  # Now new_path has a complete unix path to the binary
35378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35379    # Keep paths in /bin as-is, but remove trailing .exe if any
35380    new_path="${new_path/%.exe/}"
35381    # Do not save /bin paths to all_fixpath_prefixes!
35382  else
35383    # Not in mixed or Windows style, start by that.
35384    new_path=`cmd //c echo $new_path`
35385
35386  input_path="$new_path"
35387  # Check if we need to convert this using DOS-style short mode. If the path
35388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35389  # take no chances and rewrite it.
35390  # Note: m4 eats our [], so we need to use [ and ] instead.
35391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35392  if test "x$has_forbidden_chars" != x; then
35393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35395  fi
35396
35397    # Output is in $new_path
35398
35399  windows_path="$new_path"
35400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35401    unix_path=`$CYGPATH -u "$windows_path"`
35402    new_path="$unix_path"
35403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35405    new_path="$unix_path"
35406  fi
35407
35408    # remove trailing .exe if any
35409    new_path="${new_path/%.exe/}"
35410
35411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35413  fi
35414
35415  else
35416    # We're on a posix platform. Hooray! :)
35417    # First separate the path from the arguments. This will split at the first
35418    # space.
35419    complete="$NM"
35420    path="${complete%% *}"
35421    tmp="$complete EOL"
35422    arguments="${tmp#* }"
35423
35424    # Cannot rely on the command "which" here since it doesn't always work.
35425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35426    if test -z "$is_absolute_path"; then
35427      # Path to executable is not absolute. Find it.
35428      IFS_save="$IFS"
35429      IFS=:
35430      for p in $PATH; do
35431        if test -f "$p/$path" && test -x "$p/$path"; then
35432          new_path="$p/$path"
35433          break
35434        fi
35435      done
35436      IFS="$IFS_save"
35437    else
35438      # This is an absolute path, we can use it without further modifications.
35439      new_path="$path"
35440    fi
35441
35442    if test "x$new_path" = x; then
35443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35444$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35445      has_space=`$ECHO "$complete" | $GREP " "`
35446      if test "x$has_space" != x; then
35447        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35449      fi
35450      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35451    fi
35452  fi
35453
35454  # Now join together the path and the arguments once again
35455  if test "x$arguments" != xEOL; then
35456    new_complete="$new_path ${arguments% *}"
35457  else
35458    new_complete="$new_path"
35459  fi
35460
35461  if test "x$complete" != "x$new_complete"; then
35462    NM="$new_complete"
35463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35464$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35465  fi
35466
35467
35468
35469  # Publish this variable in the help.
35470
35471
35472  if test "x$GNM" = x; then
35473    # The variable is not set by user, try to locate tool using the code snippet
35474    for ac_prog in gnm
35475do
35476  # Extract the first word of "$ac_prog", so it can be a program name with args.
35477set dummy $ac_prog; ac_word=$2
35478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35479$as_echo_n "checking for $ac_word... " >&6; }
35480if ${ac_cv_path_GNM+:} false; then :
35481  $as_echo_n "(cached) " >&6
35482else
35483  case $GNM in
35484  [\\/]* | ?:[\\/]*)
35485  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35486  ;;
35487  *)
35488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35489for as_dir in $PATH
35490do
35491  IFS=$as_save_IFS
35492  test -z "$as_dir" && as_dir=.
35493    for ac_exec_ext in '' $ac_executable_extensions; do
35494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35495    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35497    break 2
35498  fi
35499done
35500  done
35501IFS=$as_save_IFS
35502
35503  ;;
35504esac
35505fi
35506GNM=$ac_cv_path_GNM
35507if test -n "$GNM"; then
35508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35509$as_echo "$GNM" >&6; }
35510else
35511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35512$as_echo "no" >&6; }
35513fi
35514
35515
35516  test -n "$GNM" && break
35517done
35518
35519  else
35520    # The variable is set, but is it from the command line or the environment?
35521
35522    # Try to remove the string !GNM! from our list.
35523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35525      # If it failed, the variable was not from the command line. Ignore it,
35526      # but warn the user (except for BASH, which is always set by the calling BASH).
35527      if test "xGNM" != xBASH; then
35528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35529$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35530      fi
35531      # Try to locate tool using the code snippet
35532      for ac_prog in gnm
35533do
35534  # Extract the first word of "$ac_prog", so it can be a program name with args.
35535set dummy $ac_prog; ac_word=$2
35536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35537$as_echo_n "checking for $ac_word... " >&6; }
35538if ${ac_cv_path_GNM+:} false; then :
35539  $as_echo_n "(cached) " >&6
35540else
35541  case $GNM in
35542  [\\/]* | ?:[\\/]*)
35543  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35544  ;;
35545  *)
35546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35547for as_dir in $PATH
35548do
35549  IFS=$as_save_IFS
35550  test -z "$as_dir" && as_dir=.
35551    for ac_exec_ext in '' $ac_executable_extensions; do
35552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35553    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35555    break 2
35556  fi
35557done
35558  done
35559IFS=$as_save_IFS
35560
35561  ;;
35562esac
35563fi
35564GNM=$ac_cv_path_GNM
35565if test -n "$GNM"; then
35566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35567$as_echo "$GNM" >&6; }
35568else
35569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35570$as_echo "no" >&6; }
35571fi
35572
35573
35574  test -n "$GNM" && break
35575done
35576
35577    else
35578      # If it succeeded, then it was overridden by the user. We will use it
35579      # for the tool.
35580
35581      # First remove it from the list of overridden variables, so we can test
35582      # for unknown variables in the end.
35583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35584
35585      # Check if the provided tool contains a complete path.
35586      tool_specified="$GNM"
35587      tool_basename="${tool_specified##*/}"
35588      if test "x$tool_basename" = "x$tool_specified"; then
35589        # A command without a complete path is provided, search $PATH.
35590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35591$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35592        # Extract the first word of "$tool_basename", so it can be a program name with args.
35593set dummy $tool_basename; ac_word=$2
35594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35595$as_echo_n "checking for $ac_word... " >&6; }
35596if ${ac_cv_path_GNM+:} false; then :
35597  $as_echo_n "(cached) " >&6
35598else
35599  case $GNM in
35600  [\\/]* | ?:[\\/]*)
35601  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35602  ;;
35603  *)
35604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35605for as_dir in $PATH
35606do
35607  IFS=$as_save_IFS
35608  test -z "$as_dir" && as_dir=.
35609    for ac_exec_ext in '' $ac_executable_extensions; do
35610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35611    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35613    break 2
35614  fi
35615done
35616  done
35617IFS=$as_save_IFS
35618
35619  ;;
35620esac
35621fi
35622GNM=$ac_cv_path_GNM
35623if test -n "$GNM"; then
35624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35625$as_echo "$GNM" >&6; }
35626else
35627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35628$as_echo "no" >&6; }
35629fi
35630
35631
35632        if test "x$GNM" = x; then
35633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35634        fi
35635      else
35636        # Otherwise we believe it is a complete path. Use it as it is.
35637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35638$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35640$as_echo_n "checking for GNM... " >&6; }
35641        if test ! -x "$tool_specified"; then
35642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35643$as_echo "not found" >&6; }
35644          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35645        fi
35646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35647$as_echo "$tool_specified" >&6; }
35648      fi
35649    fi
35650  fi
35651
35652
35653
35654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35655
35656  # First separate the path from the arguments. This will split at the first
35657  # space.
35658  complete="$GNM"
35659  path="${complete%% *}"
35660  tmp="$complete EOL"
35661  arguments="${tmp#* }"
35662
35663  # Input might be given as Windows format, start by converting to
35664  # unix format.
35665  new_path=`$CYGPATH -u "$path"`
35666
35667  # Now try to locate executable using which
35668  new_path=`$WHICH "$new_path" 2> /dev/null`
35669  # bat and cmd files are not always considered executable in cygwin causing which
35670  # to not find them
35671  if test "x$new_path" = x \
35672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35674    new_path=`$CYGPATH -u "$path"`
35675  fi
35676  if test "x$new_path" = x; then
35677    # Oops. Which didn't find the executable.
35678    # The splitting of arguments from the executable at a space might have been incorrect,
35679    # since paths with space are more likely in Windows. Give it another try with the whole
35680    # argument.
35681    path="$complete"
35682    arguments="EOL"
35683    new_path=`$CYGPATH -u "$path"`
35684    new_path=`$WHICH "$new_path" 2> /dev/null`
35685    # bat and cmd files are not always considered executable in cygwin causing which
35686    # to not find them
35687    if test "x$new_path" = x \
35688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35690      new_path=`$CYGPATH -u "$path"`
35691    fi
35692    if test "x$new_path" = x; then
35693      # It's still not found. Now this is an unrecoverable error.
35694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35695$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35696      has_space=`$ECHO "$complete" | $GREP " "`
35697      if test "x$has_space" != x; then
35698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35700      fi
35701      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35702    fi
35703  fi
35704
35705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35708  # "foo.exe" is OK but "foo" is an error.
35709  #
35710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35711  # It is also a way to make sure we got the proper file name for the real test later on.
35712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35713  if test "x$test_shortpath" = x; then
35714    # Short path failed, file does not exist as specified.
35715    # Try adding .exe or .cmd
35716    if test -f "${new_path}.exe"; then
35717      input_to_shortpath="${new_path}.exe"
35718    elif test -f "${new_path}.cmd"; then
35719      input_to_shortpath="${new_path}.cmd"
35720    else
35721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35722$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35725      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35726    fi
35727  else
35728    input_to_shortpath="$new_path"
35729  fi
35730
35731  # Call helper function which possibly converts this using DOS-style short mode.
35732  # If so, the updated path is stored in $new_path.
35733  new_path="$input_to_shortpath"
35734
35735  input_path="$input_to_shortpath"
35736  # Check if we need to convert this using DOS-style short mode. If the path
35737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35738  # take no chances and rewrite it.
35739  # Note: m4 eats our [], so we need to use [ and ] instead.
35740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35741  if test "x$has_forbidden_chars" != x; then
35742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35746      # Going to short mode and back again did indeed matter. Since short mode is
35747      # case insensitive, let's make it lowercase to improve readability.
35748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35749      # Now convert it back to Unix-style (cygpath)
35750      input_path=`$CYGPATH -u "$shortmode_path"`
35751      new_path="$input_path"
35752    fi
35753  fi
35754
35755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35756  if test "x$test_cygdrive_prefix" = x; then
35757    # As a simple fix, exclude /usr/bin since it's not a real path.
35758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35760      # a path prefixed by /cygdrive for fixpath to work.
35761      new_path="$CYGWIN_ROOT_PATH$input_path"
35762    fi
35763  fi
35764
35765  # remove trailing .exe if any
35766  new_path="${new_path/%.exe/}"
35767
35768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35769
35770  # First separate the path from the arguments. This will split at the first
35771  # space.
35772  complete="$GNM"
35773  path="${complete%% *}"
35774  tmp="$complete EOL"
35775  arguments="${tmp#* }"
35776
35777  # Input might be given as Windows format, start by converting to
35778  # unix format.
35779  new_path="$path"
35780
35781  windows_path="$new_path"
35782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35783    unix_path=`$CYGPATH -u "$windows_path"`
35784    new_path="$unix_path"
35785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35787    new_path="$unix_path"
35788  fi
35789
35790
35791  # Now try to locate executable using which
35792  new_path=`$WHICH "$new_path" 2> /dev/null`
35793
35794  if test "x$new_path" = x; then
35795    # Oops. Which didn't find the executable.
35796    # The splitting of arguments from the executable at a space might have been incorrect,
35797    # since paths with space are more likely in Windows. Give it another try with the whole
35798    # argument.
35799    path="$complete"
35800    arguments="EOL"
35801    new_path="$path"
35802
35803  windows_path="$new_path"
35804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35805    unix_path=`$CYGPATH -u "$windows_path"`
35806    new_path="$unix_path"
35807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35809    new_path="$unix_path"
35810  fi
35811
35812
35813    new_path=`$WHICH "$new_path" 2> /dev/null`
35814    # bat and cmd files are not always considered executable in MSYS causing which
35815    # to not find them
35816    if test "x$new_path" = x \
35817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35819      new_path="$path"
35820
35821  windows_path="$new_path"
35822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35823    unix_path=`$CYGPATH -u "$windows_path"`
35824    new_path="$unix_path"
35825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35827    new_path="$unix_path"
35828  fi
35829
35830    fi
35831
35832    if test "x$new_path" = x; then
35833      # It's still not found. Now this is an unrecoverable error.
35834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35835$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35836      has_space=`$ECHO "$complete" | $GREP " "`
35837      if test "x$has_space" != x; then
35838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35840      fi
35841      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35842    fi
35843  fi
35844
35845  # Now new_path has a complete unix path to the binary
35846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35847    # Keep paths in /bin as-is, but remove trailing .exe if any
35848    new_path="${new_path/%.exe/}"
35849    # Do not save /bin paths to all_fixpath_prefixes!
35850  else
35851    # Not in mixed or Windows style, start by that.
35852    new_path=`cmd //c echo $new_path`
35853
35854  input_path="$new_path"
35855  # Check if we need to convert this using DOS-style short mode. If the path
35856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35857  # take no chances and rewrite it.
35858  # Note: m4 eats our [], so we need to use [ and ] instead.
35859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35860  if test "x$has_forbidden_chars" != x; then
35861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35863  fi
35864
35865    # Output is in $new_path
35866
35867  windows_path="$new_path"
35868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35869    unix_path=`$CYGPATH -u "$windows_path"`
35870    new_path="$unix_path"
35871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35873    new_path="$unix_path"
35874  fi
35875
35876    # remove trailing .exe if any
35877    new_path="${new_path/%.exe/}"
35878
35879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35881  fi
35882
35883  else
35884    # We're on a posix platform. Hooray! :)
35885    # First separate the path from the arguments. This will split at the first
35886    # space.
35887    complete="$GNM"
35888    path="${complete%% *}"
35889    tmp="$complete EOL"
35890    arguments="${tmp#* }"
35891
35892    # Cannot rely on the command "which" here since it doesn't always work.
35893    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35894    if test -z "$is_absolute_path"; then
35895      # Path to executable is not absolute. Find it.
35896      IFS_save="$IFS"
35897      IFS=:
35898      for p in $PATH; do
35899        if test -f "$p/$path" && test -x "$p/$path"; then
35900          new_path="$p/$path"
35901          break
35902        fi
35903      done
35904      IFS="$IFS_save"
35905    else
35906      # This is an absolute path, we can use it without further modifications.
35907      new_path="$path"
35908    fi
35909
35910    if test "x$new_path" = x; then
35911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35912$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35913      has_space=`$ECHO "$complete" | $GREP " "`
35914      if test "x$has_space" != x; then
35915        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35917      fi
35918      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35919    fi
35920  fi
35921
35922  # Now join together the path and the arguments once again
35923  if test "x$arguments" != xEOL; then
35924    new_complete="$new_path ${arguments% *}"
35925  else
35926    new_complete="$new_path"
35927  fi
35928
35929  if test "x$complete" != "x$new_complete"; then
35930    GNM="$new_complete"
35931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35932$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35933  fi
35934
35935
35936
35937
35938  # Publish this variable in the help.
35939
35940
35941  if test "x$MCS" = x; then
35942    # The variable is not set by user, try to locate tool using the code snippet
35943    for ac_prog in mcs
35944do
35945  # Extract the first word of "$ac_prog", so it can be a program name with args.
35946set dummy $ac_prog; ac_word=$2
35947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35948$as_echo_n "checking for $ac_word... " >&6; }
35949if ${ac_cv_path_MCS+:} false; then :
35950  $as_echo_n "(cached) " >&6
35951else
35952  case $MCS in
35953  [\\/]* | ?:[\\/]*)
35954  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35955  ;;
35956  *)
35957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35958for as_dir in $PATH
35959do
35960  IFS=$as_save_IFS
35961  test -z "$as_dir" && as_dir=.
35962    for ac_exec_ext in '' $ac_executable_extensions; do
35963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35964    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35966    break 2
35967  fi
35968done
35969  done
35970IFS=$as_save_IFS
35971
35972  ;;
35973esac
35974fi
35975MCS=$ac_cv_path_MCS
35976if test -n "$MCS"; then
35977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35978$as_echo "$MCS" >&6; }
35979else
35980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35981$as_echo "no" >&6; }
35982fi
35983
35984
35985  test -n "$MCS" && break
35986done
35987
35988  else
35989    # The variable is set, but is it from the command line or the environment?
35990
35991    # Try to remove the string !MCS! from our list.
35992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35994      # If it failed, the variable was not from the command line. Ignore it,
35995      # but warn the user (except for BASH, which is always set by the calling BASH).
35996      if test "xMCS" != xBASH; then
35997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35998$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35999      fi
36000      # Try to locate tool using the code snippet
36001      for ac_prog in mcs
36002do
36003  # Extract the first word of "$ac_prog", so it can be a program name with args.
36004set dummy $ac_prog; ac_word=$2
36005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36006$as_echo_n "checking for $ac_word... " >&6; }
36007if ${ac_cv_path_MCS+:} false; then :
36008  $as_echo_n "(cached) " >&6
36009else
36010  case $MCS in
36011  [\\/]* | ?:[\\/]*)
36012  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36013  ;;
36014  *)
36015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36016for as_dir in $PATH
36017do
36018  IFS=$as_save_IFS
36019  test -z "$as_dir" && as_dir=.
36020    for ac_exec_ext in '' $ac_executable_extensions; do
36021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36022    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36024    break 2
36025  fi
36026done
36027  done
36028IFS=$as_save_IFS
36029
36030  ;;
36031esac
36032fi
36033MCS=$ac_cv_path_MCS
36034if test -n "$MCS"; then
36035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36036$as_echo "$MCS" >&6; }
36037else
36038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36039$as_echo "no" >&6; }
36040fi
36041
36042
36043  test -n "$MCS" && break
36044done
36045
36046    else
36047      # If it succeeded, then it was overridden by the user. We will use it
36048      # for the tool.
36049
36050      # First remove it from the list of overridden variables, so we can test
36051      # for unknown variables in the end.
36052      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36053
36054      # Check if the provided tool contains a complete path.
36055      tool_specified="$MCS"
36056      tool_basename="${tool_specified##*/}"
36057      if test "x$tool_basename" = "x$tool_specified"; then
36058        # A command without a complete path is provided, search $PATH.
36059        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36060$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36061        # Extract the first word of "$tool_basename", so it can be a program name with args.
36062set dummy $tool_basename; ac_word=$2
36063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36064$as_echo_n "checking for $ac_word... " >&6; }
36065if ${ac_cv_path_MCS+:} false; then :
36066  $as_echo_n "(cached) " >&6
36067else
36068  case $MCS in
36069  [\\/]* | ?:[\\/]*)
36070  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36071  ;;
36072  *)
36073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36074for as_dir in $PATH
36075do
36076  IFS=$as_save_IFS
36077  test -z "$as_dir" && as_dir=.
36078    for ac_exec_ext in '' $ac_executable_extensions; do
36079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36080    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36082    break 2
36083  fi
36084done
36085  done
36086IFS=$as_save_IFS
36087
36088  ;;
36089esac
36090fi
36091MCS=$ac_cv_path_MCS
36092if test -n "$MCS"; then
36093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36094$as_echo "$MCS" >&6; }
36095else
36096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36097$as_echo "no" >&6; }
36098fi
36099
36100
36101        if test "x$MCS" = x; then
36102          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36103        fi
36104      else
36105        # Otherwise we believe it is a complete path. Use it as it is.
36106        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36107$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36109$as_echo_n "checking for MCS... " >&6; }
36110        if test ! -x "$tool_specified"; then
36111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36112$as_echo "not found" >&6; }
36113          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36114        fi
36115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36116$as_echo "$tool_specified" >&6; }
36117      fi
36118    fi
36119  fi
36120
36121
36122
36123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36124
36125  # First separate the path from the arguments. This will split at the first
36126  # space.
36127  complete="$MCS"
36128  path="${complete%% *}"
36129  tmp="$complete EOL"
36130  arguments="${tmp#* }"
36131
36132  # Input might be given as Windows format, start by converting to
36133  # unix format.
36134  new_path=`$CYGPATH -u "$path"`
36135
36136  # Now try to locate executable using which
36137  new_path=`$WHICH "$new_path" 2> /dev/null`
36138  # bat and cmd files are not always considered executable in cygwin causing which
36139  # to not find them
36140  if test "x$new_path" = x \
36141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36143    new_path=`$CYGPATH -u "$path"`
36144  fi
36145  if test "x$new_path" = x; then
36146    # Oops. Which didn't find the executable.
36147    # The splitting of arguments from the executable at a space might have been incorrect,
36148    # since paths with space are more likely in Windows. Give it another try with the whole
36149    # argument.
36150    path="$complete"
36151    arguments="EOL"
36152    new_path=`$CYGPATH -u "$path"`
36153    new_path=`$WHICH "$new_path" 2> /dev/null`
36154    # bat and cmd files are not always considered executable in cygwin causing which
36155    # to not find them
36156    if test "x$new_path" = x \
36157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36159      new_path=`$CYGPATH -u "$path"`
36160    fi
36161    if test "x$new_path" = x; then
36162      # It's still not found. Now this is an unrecoverable error.
36163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36164$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36165      has_space=`$ECHO "$complete" | $GREP " "`
36166      if test "x$has_space" != x; then
36167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36169      fi
36170      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36171    fi
36172  fi
36173
36174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36177  # "foo.exe" is OK but "foo" is an error.
36178  #
36179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36180  # It is also a way to make sure we got the proper file name for the real test later on.
36181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36182  if test "x$test_shortpath" = x; then
36183    # Short path failed, file does not exist as specified.
36184    # Try adding .exe or .cmd
36185    if test -f "${new_path}.exe"; then
36186      input_to_shortpath="${new_path}.exe"
36187    elif test -f "${new_path}.cmd"; then
36188      input_to_shortpath="${new_path}.cmd"
36189    else
36190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36191$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36194      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36195    fi
36196  else
36197    input_to_shortpath="$new_path"
36198  fi
36199
36200  # Call helper function which possibly converts this using DOS-style short mode.
36201  # If so, the updated path is stored in $new_path.
36202  new_path="$input_to_shortpath"
36203
36204  input_path="$input_to_shortpath"
36205  # Check if we need to convert this using DOS-style short mode. If the path
36206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36207  # take no chances and rewrite it.
36208  # Note: m4 eats our [], so we need to use [ and ] instead.
36209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36210  if test "x$has_forbidden_chars" != x; then
36211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36215      # Going to short mode and back again did indeed matter. Since short mode is
36216      # case insensitive, let's make it lowercase to improve readability.
36217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36218      # Now convert it back to Unix-style (cygpath)
36219      input_path=`$CYGPATH -u "$shortmode_path"`
36220      new_path="$input_path"
36221    fi
36222  fi
36223
36224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36225  if test "x$test_cygdrive_prefix" = x; then
36226    # As a simple fix, exclude /usr/bin since it's not a real path.
36227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36229      # a path prefixed by /cygdrive for fixpath to work.
36230      new_path="$CYGWIN_ROOT_PATH$input_path"
36231    fi
36232  fi
36233
36234  # remove trailing .exe if any
36235  new_path="${new_path/%.exe/}"
36236
36237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36238
36239  # First separate the path from the arguments. This will split at the first
36240  # space.
36241  complete="$MCS"
36242  path="${complete%% *}"
36243  tmp="$complete EOL"
36244  arguments="${tmp#* }"
36245
36246  # Input might be given as Windows format, start by converting to
36247  # unix format.
36248  new_path="$path"
36249
36250  windows_path="$new_path"
36251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36252    unix_path=`$CYGPATH -u "$windows_path"`
36253    new_path="$unix_path"
36254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36256    new_path="$unix_path"
36257  fi
36258
36259
36260  # Now try to locate executable using which
36261  new_path=`$WHICH "$new_path" 2> /dev/null`
36262
36263  if test "x$new_path" = x; then
36264    # Oops. Which didn't find the executable.
36265    # The splitting of arguments from the executable at a space might have been incorrect,
36266    # since paths with space are more likely in Windows. Give it another try with the whole
36267    # argument.
36268    path="$complete"
36269    arguments="EOL"
36270    new_path="$path"
36271
36272  windows_path="$new_path"
36273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36274    unix_path=`$CYGPATH -u "$windows_path"`
36275    new_path="$unix_path"
36276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36278    new_path="$unix_path"
36279  fi
36280
36281
36282    new_path=`$WHICH "$new_path" 2> /dev/null`
36283    # bat and cmd files are not always considered executable in MSYS causing which
36284    # to not find them
36285    if test "x$new_path" = x \
36286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36288      new_path="$path"
36289
36290  windows_path="$new_path"
36291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36292    unix_path=`$CYGPATH -u "$windows_path"`
36293    new_path="$unix_path"
36294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36296    new_path="$unix_path"
36297  fi
36298
36299    fi
36300
36301    if test "x$new_path" = x; then
36302      # It's still not found. Now this is an unrecoverable error.
36303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36304$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36305      has_space=`$ECHO "$complete" | $GREP " "`
36306      if test "x$has_space" != x; then
36307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36309      fi
36310      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36311    fi
36312  fi
36313
36314  # Now new_path has a complete unix path to the binary
36315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36316    # Keep paths in /bin as-is, but remove trailing .exe if any
36317    new_path="${new_path/%.exe/}"
36318    # Do not save /bin paths to all_fixpath_prefixes!
36319  else
36320    # Not in mixed or Windows style, start by that.
36321    new_path=`cmd //c echo $new_path`
36322
36323  input_path="$new_path"
36324  # Check if we need to convert this using DOS-style short mode. If the path
36325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36326  # take no chances and rewrite it.
36327  # Note: m4 eats our [], so we need to use [ and ] instead.
36328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36329  if test "x$has_forbidden_chars" != x; then
36330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36332  fi
36333
36334    # Output is in $new_path
36335
36336  windows_path="$new_path"
36337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36338    unix_path=`$CYGPATH -u "$windows_path"`
36339    new_path="$unix_path"
36340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36342    new_path="$unix_path"
36343  fi
36344
36345    # remove trailing .exe if any
36346    new_path="${new_path/%.exe/}"
36347
36348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36350  fi
36351
36352  else
36353    # We're on a posix platform. Hooray! :)
36354    # First separate the path from the arguments. This will split at the first
36355    # space.
36356    complete="$MCS"
36357    path="${complete%% *}"
36358    tmp="$complete EOL"
36359    arguments="${tmp#* }"
36360
36361    # Cannot rely on the command "which" here since it doesn't always work.
36362    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36363    if test -z "$is_absolute_path"; then
36364      # Path to executable is not absolute. Find it.
36365      IFS_save="$IFS"
36366      IFS=:
36367      for p in $PATH; do
36368        if test -f "$p/$path" && test -x "$p/$path"; then
36369          new_path="$p/$path"
36370          break
36371        fi
36372      done
36373      IFS="$IFS_save"
36374    else
36375      # This is an absolute path, we can use it without further modifications.
36376      new_path="$path"
36377    fi
36378
36379    if test "x$new_path" = x; then
36380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36381$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36382      has_space=`$ECHO "$complete" | $GREP " "`
36383      if test "x$has_space" != x; then
36384        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36386      fi
36387      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36388    fi
36389  fi
36390
36391  # Now join together the path and the arguments once again
36392  if test "x$arguments" != xEOL; then
36393    new_complete="$new_path ${arguments% *}"
36394  else
36395    new_complete="$new_path"
36396  fi
36397
36398  if test "x$complete" != "x$new_complete"; then
36399    MCS="$new_complete"
36400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36401$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36402  fi
36403
36404  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36405    # FIXME: we should unify this with the solaris case above.
36406
36407
36408  # Publish this variable in the help.
36409
36410
36411  if test "x$STRIP" = x; then
36412    # The variable is not set by user, try to locate tool using the code snippet
36413    if test -n "$ac_tool_prefix"; then
36414  for ac_prog in strip
36415  do
36416    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36417set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36419$as_echo_n "checking for $ac_word... " >&6; }
36420if ${ac_cv_prog_STRIP+:} false; then :
36421  $as_echo_n "(cached) " >&6
36422else
36423  if test -n "$STRIP"; then
36424  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36425else
36426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36427for as_dir in $PATH
36428do
36429  IFS=$as_save_IFS
36430  test -z "$as_dir" && as_dir=.
36431    for ac_exec_ext in '' $ac_executable_extensions; do
36432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36433    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36435    break 2
36436  fi
36437done
36438  done
36439IFS=$as_save_IFS
36440
36441fi
36442fi
36443STRIP=$ac_cv_prog_STRIP
36444if test -n "$STRIP"; then
36445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36446$as_echo "$STRIP" >&6; }
36447else
36448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36449$as_echo "no" >&6; }
36450fi
36451
36452
36453    test -n "$STRIP" && break
36454  done
36455fi
36456if test -z "$STRIP"; then
36457  ac_ct_STRIP=$STRIP
36458  for ac_prog in strip
36459do
36460  # Extract the first word of "$ac_prog", so it can be a program name with args.
36461set dummy $ac_prog; ac_word=$2
36462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36463$as_echo_n "checking for $ac_word... " >&6; }
36464if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36465  $as_echo_n "(cached) " >&6
36466else
36467  if test -n "$ac_ct_STRIP"; then
36468  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36469else
36470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36471for as_dir in $PATH
36472do
36473  IFS=$as_save_IFS
36474  test -z "$as_dir" && as_dir=.
36475    for ac_exec_ext in '' $ac_executable_extensions; do
36476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36477    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36479    break 2
36480  fi
36481done
36482  done
36483IFS=$as_save_IFS
36484
36485fi
36486fi
36487ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36488if test -n "$ac_ct_STRIP"; then
36489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36490$as_echo "$ac_ct_STRIP" >&6; }
36491else
36492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36493$as_echo "no" >&6; }
36494fi
36495
36496
36497  test -n "$ac_ct_STRIP" && break
36498done
36499
36500  if test "x$ac_ct_STRIP" = x; then
36501    STRIP=""
36502  else
36503    case $cross_compiling:$ac_tool_warned in
36504yes:)
36505{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36506$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36507ac_tool_warned=yes ;;
36508esac
36509    STRIP=$ac_ct_STRIP
36510  fi
36511fi
36512
36513  else
36514    # The variable is set, but is it from the command line or the environment?
36515
36516    # Try to remove the string !STRIP! from our list.
36517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36519      # If it failed, the variable was not from the command line. Ignore it,
36520      # but warn the user (except for BASH, which is always set by the calling BASH).
36521      if test "xSTRIP" != xBASH; then
36522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36523$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36524      fi
36525      # Try to locate tool using the code snippet
36526      if test -n "$ac_tool_prefix"; then
36527  for ac_prog in strip
36528  do
36529    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36532$as_echo_n "checking for $ac_word... " >&6; }
36533if ${ac_cv_prog_STRIP+:} false; then :
36534  $as_echo_n "(cached) " >&6
36535else
36536  if test -n "$STRIP"; then
36537  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36538else
36539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36540for as_dir in $PATH
36541do
36542  IFS=$as_save_IFS
36543  test -z "$as_dir" && as_dir=.
36544    for ac_exec_ext in '' $ac_executable_extensions; do
36545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36546    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36548    break 2
36549  fi
36550done
36551  done
36552IFS=$as_save_IFS
36553
36554fi
36555fi
36556STRIP=$ac_cv_prog_STRIP
36557if test -n "$STRIP"; then
36558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36559$as_echo "$STRIP" >&6; }
36560else
36561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36562$as_echo "no" >&6; }
36563fi
36564
36565
36566    test -n "$STRIP" && break
36567  done
36568fi
36569if test -z "$STRIP"; then
36570  ac_ct_STRIP=$STRIP
36571  for ac_prog in strip
36572do
36573  # Extract the first word of "$ac_prog", so it can be a program name with args.
36574set dummy $ac_prog; ac_word=$2
36575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36576$as_echo_n "checking for $ac_word... " >&6; }
36577if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36578  $as_echo_n "(cached) " >&6
36579else
36580  if test -n "$ac_ct_STRIP"; then
36581  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36582else
36583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36584for as_dir in $PATH
36585do
36586  IFS=$as_save_IFS
36587  test -z "$as_dir" && as_dir=.
36588    for ac_exec_ext in '' $ac_executable_extensions; do
36589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36590    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36592    break 2
36593  fi
36594done
36595  done
36596IFS=$as_save_IFS
36597
36598fi
36599fi
36600ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36601if test -n "$ac_ct_STRIP"; then
36602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36603$as_echo "$ac_ct_STRIP" >&6; }
36604else
36605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36606$as_echo "no" >&6; }
36607fi
36608
36609
36610  test -n "$ac_ct_STRIP" && break
36611done
36612
36613  if test "x$ac_ct_STRIP" = x; then
36614    STRIP=""
36615  else
36616    case $cross_compiling:$ac_tool_warned in
36617yes:)
36618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36620ac_tool_warned=yes ;;
36621esac
36622    STRIP=$ac_ct_STRIP
36623  fi
36624fi
36625
36626    else
36627      # If it succeeded, then it was overridden by the user. We will use it
36628      # for the tool.
36629
36630      # First remove it from the list of overridden variables, so we can test
36631      # for unknown variables in the end.
36632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36633
36634      # Check if the provided tool contains a complete path.
36635      tool_specified="$STRIP"
36636      tool_basename="${tool_specified##*/}"
36637      if test "x$tool_basename" = "x$tool_specified"; then
36638        # A command without a complete path is provided, search $PATH.
36639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36640$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36641        # Extract the first word of "$tool_basename", so it can be a program name with args.
36642set dummy $tool_basename; ac_word=$2
36643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36644$as_echo_n "checking for $ac_word... " >&6; }
36645if ${ac_cv_path_STRIP+:} false; then :
36646  $as_echo_n "(cached) " >&6
36647else
36648  case $STRIP in
36649  [\\/]* | ?:[\\/]*)
36650  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36651  ;;
36652  *)
36653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36654for as_dir in $PATH
36655do
36656  IFS=$as_save_IFS
36657  test -z "$as_dir" && as_dir=.
36658    for ac_exec_ext in '' $ac_executable_extensions; do
36659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36660    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36662    break 2
36663  fi
36664done
36665  done
36666IFS=$as_save_IFS
36667
36668  ;;
36669esac
36670fi
36671STRIP=$ac_cv_path_STRIP
36672if test -n "$STRIP"; then
36673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36674$as_echo "$STRIP" >&6; }
36675else
36676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36677$as_echo "no" >&6; }
36678fi
36679
36680
36681        if test "x$STRIP" = x; then
36682          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36683        fi
36684      else
36685        # Otherwise we believe it is a complete path. Use it as it is.
36686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36687$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36689$as_echo_n "checking for STRIP... " >&6; }
36690        if test ! -x "$tool_specified"; then
36691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36692$as_echo "not found" >&6; }
36693          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36694        fi
36695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36696$as_echo "$tool_specified" >&6; }
36697      fi
36698    fi
36699  fi
36700
36701
36702
36703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36704
36705  # First separate the path from the arguments. This will split at the first
36706  # space.
36707  complete="$STRIP"
36708  path="${complete%% *}"
36709  tmp="$complete EOL"
36710  arguments="${tmp#* }"
36711
36712  # Input might be given as Windows format, start by converting to
36713  # unix format.
36714  new_path=`$CYGPATH -u "$path"`
36715
36716  # Now try to locate executable using which
36717  new_path=`$WHICH "$new_path" 2> /dev/null`
36718  # bat and cmd files are not always considered executable in cygwin causing which
36719  # to not find them
36720  if test "x$new_path" = x \
36721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36723    new_path=`$CYGPATH -u "$path"`
36724  fi
36725  if test "x$new_path" = x; then
36726    # Oops. Which didn't find the executable.
36727    # The splitting of arguments from the executable at a space might have been incorrect,
36728    # since paths with space are more likely in Windows. Give it another try with the whole
36729    # argument.
36730    path="$complete"
36731    arguments="EOL"
36732    new_path=`$CYGPATH -u "$path"`
36733    new_path=`$WHICH "$new_path" 2> /dev/null`
36734    # bat and cmd files are not always considered executable in cygwin causing which
36735    # to not find them
36736    if test "x$new_path" = x \
36737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36739      new_path=`$CYGPATH -u "$path"`
36740    fi
36741    if test "x$new_path" = x; then
36742      # It's still not found. Now this is an unrecoverable error.
36743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36744$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36745      has_space=`$ECHO "$complete" | $GREP " "`
36746      if test "x$has_space" != x; then
36747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36749      fi
36750      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36751    fi
36752  fi
36753
36754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36757  # "foo.exe" is OK but "foo" is an error.
36758  #
36759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36760  # It is also a way to make sure we got the proper file name for the real test later on.
36761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36762  if test "x$test_shortpath" = x; then
36763    # Short path failed, file does not exist as specified.
36764    # Try adding .exe or .cmd
36765    if test -f "${new_path}.exe"; then
36766      input_to_shortpath="${new_path}.exe"
36767    elif test -f "${new_path}.cmd"; then
36768      input_to_shortpath="${new_path}.cmd"
36769    else
36770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36771$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36774      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36775    fi
36776  else
36777    input_to_shortpath="$new_path"
36778  fi
36779
36780  # Call helper function which possibly converts this using DOS-style short mode.
36781  # If so, the updated path is stored in $new_path.
36782  new_path="$input_to_shortpath"
36783
36784  input_path="$input_to_shortpath"
36785  # Check if we need to convert this using DOS-style short mode. If the path
36786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36787  # take no chances and rewrite it.
36788  # Note: m4 eats our [], so we need to use [ and ] instead.
36789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36790  if test "x$has_forbidden_chars" != x; then
36791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36795      # Going to short mode and back again did indeed matter. Since short mode is
36796      # case insensitive, let's make it lowercase to improve readability.
36797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36798      # Now convert it back to Unix-style (cygpath)
36799      input_path=`$CYGPATH -u "$shortmode_path"`
36800      new_path="$input_path"
36801    fi
36802  fi
36803
36804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36805  if test "x$test_cygdrive_prefix" = x; then
36806    # As a simple fix, exclude /usr/bin since it's not a real path.
36807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36809      # a path prefixed by /cygdrive for fixpath to work.
36810      new_path="$CYGWIN_ROOT_PATH$input_path"
36811    fi
36812  fi
36813
36814  # remove trailing .exe if any
36815  new_path="${new_path/%.exe/}"
36816
36817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36818
36819  # First separate the path from the arguments. This will split at the first
36820  # space.
36821  complete="$STRIP"
36822  path="${complete%% *}"
36823  tmp="$complete EOL"
36824  arguments="${tmp#* }"
36825
36826  # Input might be given as Windows format, start by converting to
36827  # unix format.
36828  new_path="$path"
36829
36830  windows_path="$new_path"
36831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36832    unix_path=`$CYGPATH -u "$windows_path"`
36833    new_path="$unix_path"
36834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36836    new_path="$unix_path"
36837  fi
36838
36839
36840  # Now try to locate executable using which
36841  new_path=`$WHICH "$new_path" 2> /dev/null`
36842
36843  if test "x$new_path" = x; then
36844    # Oops. Which didn't find the executable.
36845    # The splitting of arguments from the executable at a space might have been incorrect,
36846    # since paths with space are more likely in Windows. Give it another try with the whole
36847    # argument.
36848    path="$complete"
36849    arguments="EOL"
36850    new_path="$path"
36851
36852  windows_path="$new_path"
36853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36854    unix_path=`$CYGPATH -u "$windows_path"`
36855    new_path="$unix_path"
36856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36858    new_path="$unix_path"
36859  fi
36860
36861
36862    new_path=`$WHICH "$new_path" 2> /dev/null`
36863    # bat and cmd files are not always considered executable in MSYS causing which
36864    # to not find them
36865    if test "x$new_path" = x \
36866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36868      new_path="$path"
36869
36870  windows_path="$new_path"
36871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36872    unix_path=`$CYGPATH -u "$windows_path"`
36873    new_path="$unix_path"
36874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36876    new_path="$unix_path"
36877  fi
36878
36879    fi
36880
36881    if test "x$new_path" = x; then
36882      # It's still not found. Now this is an unrecoverable error.
36883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36884$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36885      has_space=`$ECHO "$complete" | $GREP " "`
36886      if test "x$has_space" != x; then
36887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36889      fi
36890      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36891    fi
36892  fi
36893
36894  # Now new_path has a complete unix path to the binary
36895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36896    # Keep paths in /bin as-is, but remove trailing .exe if any
36897    new_path="${new_path/%.exe/}"
36898    # Do not save /bin paths to all_fixpath_prefixes!
36899  else
36900    # Not in mixed or Windows style, start by that.
36901    new_path=`cmd //c echo $new_path`
36902
36903  input_path="$new_path"
36904  # Check if we need to convert this using DOS-style short mode. If the path
36905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36906  # take no chances and rewrite it.
36907  # Note: m4 eats our [], so we need to use [ and ] instead.
36908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36909  if test "x$has_forbidden_chars" != x; then
36910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36912  fi
36913
36914    # Output is in $new_path
36915
36916  windows_path="$new_path"
36917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36918    unix_path=`$CYGPATH -u "$windows_path"`
36919    new_path="$unix_path"
36920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36922    new_path="$unix_path"
36923  fi
36924
36925    # remove trailing .exe if any
36926    new_path="${new_path/%.exe/}"
36927
36928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36930  fi
36931
36932  else
36933    # We're on a posix platform. Hooray! :)
36934    # First separate the path from the arguments. This will split at the first
36935    # space.
36936    complete="$STRIP"
36937    path="${complete%% *}"
36938    tmp="$complete EOL"
36939    arguments="${tmp#* }"
36940
36941    # Cannot rely on the command "which" here since it doesn't always work.
36942    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36943    if test -z "$is_absolute_path"; then
36944      # Path to executable is not absolute. Find it.
36945      IFS_save="$IFS"
36946      IFS=:
36947      for p in $PATH; do
36948        if test -f "$p/$path" && test -x "$p/$path"; then
36949          new_path="$p/$path"
36950          break
36951        fi
36952      done
36953      IFS="$IFS_save"
36954    else
36955      # This is an absolute path, we can use it without further modifications.
36956      new_path="$path"
36957    fi
36958
36959    if test "x$new_path" = x; then
36960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36961$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36962      has_space=`$ECHO "$complete" | $GREP " "`
36963      if test "x$has_space" != x; then
36964        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36966      fi
36967      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36968    fi
36969  fi
36970
36971  # Now join together the path and the arguments once again
36972  if test "x$arguments" != xEOL; then
36973    new_complete="$new_path ${arguments% *}"
36974  else
36975    new_complete="$new_path"
36976  fi
36977
36978  if test "x$complete" != "x$new_complete"; then
36979    STRIP="$new_complete"
36980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36981$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36982  fi
36983
36984    # Extract the first word of "otool", so it can be a program name with args.
36985set dummy otool; ac_word=$2
36986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36987$as_echo_n "checking for $ac_word... " >&6; }
36988if ${ac_cv_path_OTOOL+:} false; then :
36989  $as_echo_n "(cached) " >&6
36990else
36991  case $OTOOL in
36992  [\\/]* | ?:[\\/]*)
36993  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
36994  ;;
36995  *)
36996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36997for as_dir in $PATH
36998do
36999  IFS=$as_save_IFS
37000  test -z "$as_dir" && as_dir=.
37001    for ac_exec_ext in '' $ac_executable_extensions; do
37002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37003    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
37004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37005    break 2
37006  fi
37007done
37008  done
37009IFS=$as_save_IFS
37010
37011  ;;
37012esac
37013fi
37014OTOOL=$ac_cv_path_OTOOL
37015if test -n "$OTOOL"; then
37016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
37017$as_echo "$OTOOL" >&6; }
37018else
37019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37020$as_echo "no" >&6; }
37021fi
37022
37023
37024    if test "x$OTOOL" = "x"; then
37025      OTOOL="true"
37026    fi
37027
37028
37029  # Publish this variable in the help.
37030
37031
37032  if test "x$NM" = x; then
37033    # The variable is not set by user, try to locate tool using the code snippet
37034    if test -n "$ac_tool_prefix"; then
37035  for ac_prog in nm
37036  do
37037    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37040$as_echo_n "checking for $ac_word... " >&6; }
37041if ${ac_cv_prog_NM+:} false; then :
37042  $as_echo_n "(cached) " >&6
37043else
37044  if test -n "$NM"; then
37045  ac_cv_prog_NM="$NM" # Let the user override the test.
37046else
37047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37048for as_dir in $PATH
37049do
37050  IFS=$as_save_IFS
37051  test -z "$as_dir" && as_dir=.
37052    for ac_exec_ext in '' $ac_executable_extensions; do
37053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37054    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37056    break 2
37057  fi
37058done
37059  done
37060IFS=$as_save_IFS
37061
37062fi
37063fi
37064NM=$ac_cv_prog_NM
37065if test -n "$NM"; then
37066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37067$as_echo "$NM" >&6; }
37068else
37069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37070$as_echo "no" >&6; }
37071fi
37072
37073
37074    test -n "$NM" && break
37075  done
37076fi
37077if test -z "$NM"; then
37078  ac_ct_NM=$NM
37079  for ac_prog in nm
37080do
37081  # Extract the first word of "$ac_prog", so it can be a program name with args.
37082set dummy $ac_prog; ac_word=$2
37083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37084$as_echo_n "checking for $ac_word... " >&6; }
37085if ${ac_cv_prog_ac_ct_NM+:} false; then :
37086  $as_echo_n "(cached) " >&6
37087else
37088  if test -n "$ac_ct_NM"; then
37089  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37090else
37091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37092for as_dir in $PATH
37093do
37094  IFS=$as_save_IFS
37095  test -z "$as_dir" && as_dir=.
37096    for ac_exec_ext in '' $ac_executable_extensions; do
37097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37098    ac_cv_prog_ac_ct_NM="$ac_prog"
37099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37100    break 2
37101  fi
37102done
37103  done
37104IFS=$as_save_IFS
37105
37106fi
37107fi
37108ac_ct_NM=$ac_cv_prog_ac_ct_NM
37109if test -n "$ac_ct_NM"; then
37110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37111$as_echo "$ac_ct_NM" >&6; }
37112else
37113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37114$as_echo "no" >&6; }
37115fi
37116
37117
37118  test -n "$ac_ct_NM" && break
37119done
37120
37121  if test "x$ac_ct_NM" = x; then
37122    NM=""
37123  else
37124    case $cross_compiling:$ac_tool_warned in
37125yes:)
37126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37128ac_tool_warned=yes ;;
37129esac
37130    NM=$ac_ct_NM
37131  fi
37132fi
37133
37134  else
37135    # The variable is set, but is it from the command line or the environment?
37136
37137    # Try to remove the string !NM! from our list.
37138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37140      # If it failed, the variable was not from the command line. Ignore it,
37141      # but warn the user (except for BASH, which is always set by the calling BASH).
37142      if test "xNM" != xBASH; then
37143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37144$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37145      fi
37146      # Try to locate tool using the code snippet
37147      if test -n "$ac_tool_prefix"; then
37148  for ac_prog in nm
37149  do
37150    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37151set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37153$as_echo_n "checking for $ac_word... " >&6; }
37154if ${ac_cv_prog_NM+:} false; then :
37155  $as_echo_n "(cached) " >&6
37156else
37157  if test -n "$NM"; then
37158  ac_cv_prog_NM="$NM" # Let the user override the test.
37159else
37160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37161for as_dir in $PATH
37162do
37163  IFS=$as_save_IFS
37164  test -z "$as_dir" && as_dir=.
37165    for ac_exec_ext in '' $ac_executable_extensions; do
37166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37167    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37169    break 2
37170  fi
37171done
37172  done
37173IFS=$as_save_IFS
37174
37175fi
37176fi
37177NM=$ac_cv_prog_NM
37178if test -n "$NM"; then
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37180$as_echo "$NM" >&6; }
37181else
37182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37183$as_echo "no" >&6; }
37184fi
37185
37186
37187    test -n "$NM" && break
37188  done
37189fi
37190if test -z "$NM"; then
37191  ac_ct_NM=$NM
37192  for ac_prog in nm
37193do
37194  # Extract the first word of "$ac_prog", so it can be a program name with args.
37195set dummy $ac_prog; ac_word=$2
37196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37197$as_echo_n "checking for $ac_word... " >&6; }
37198if ${ac_cv_prog_ac_ct_NM+:} false; then :
37199  $as_echo_n "(cached) " >&6
37200else
37201  if test -n "$ac_ct_NM"; then
37202  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37203else
37204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_prog_ac_ct_NM="$ac_prog"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219fi
37220fi
37221ac_ct_NM=$ac_cv_prog_ac_ct_NM
37222if test -n "$ac_ct_NM"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37224$as_echo "$ac_ct_NM" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231  test -n "$ac_ct_NM" && break
37232done
37233
37234  if test "x$ac_ct_NM" = x; then
37235    NM=""
37236  else
37237    case $cross_compiling:$ac_tool_warned in
37238yes:)
37239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37241ac_tool_warned=yes ;;
37242esac
37243    NM=$ac_ct_NM
37244  fi
37245fi
37246
37247    else
37248      # If it succeeded, then it was overridden by the user. We will use it
37249      # for the tool.
37250
37251      # First remove it from the list of overridden variables, so we can test
37252      # for unknown variables in the end.
37253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37254
37255      # Check if the provided tool contains a complete path.
37256      tool_specified="$NM"
37257      tool_basename="${tool_specified##*/}"
37258      if test "x$tool_basename" = "x$tool_specified"; then
37259        # A command without a complete path is provided, search $PATH.
37260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37261$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37262        # Extract the first word of "$tool_basename", so it can be a program name with args.
37263set dummy $tool_basename; ac_word=$2
37264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37265$as_echo_n "checking for $ac_word... " >&6; }
37266if ${ac_cv_path_NM+:} false; then :
37267  $as_echo_n "(cached) " >&6
37268else
37269  case $NM in
37270  [\\/]* | ?:[\\/]*)
37271  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37272  ;;
37273  *)
37274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37275for as_dir in $PATH
37276do
37277  IFS=$as_save_IFS
37278  test -z "$as_dir" && as_dir=.
37279    for ac_exec_ext in '' $ac_executable_extensions; do
37280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37281    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37283    break 2
37284  fi
37285done
37286  done
37287IFS=$as_save_IFS
37288
37289  ;;
37290esac
37291fi
37292NM=$ac_cv_path_NM
37293if test -n "$NM"; then
37294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37295$as_echo "$NM" >&6; }
37296else
37297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37298$as_echo "no" >&6; }
37299fi
37300
37301
37302        if test "x$NM" = x; then
37303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37304        fi
37305      else
37306        # Otherwise we believe it is a complete path. Use it as it is.
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37308$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37310$as_echo_n "checking for NM... " >&6; }
37311        if test ! -x "$tool_specified"; then
37312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37313$as_echo "not found" >&6; }
37314          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37315        fi
37316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37317$as_echo "$tool_specified" >&6; }
37318      fi
37319    fi
37320  fi
37321
37322
37323
37324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37325
37326  # First separate the path from the arguments. This will split at the first
37327  # space.
37328  complete="$NM"
37329  path="${complete%% *}"
37330  tmp="$complete EOL"
37331  arguments="${tmp#* }"
37332
37333  # Input might be given as Windows format, start by converting to
37334  # unix format.
37335  new_path=`$CYGPATH -u "$path"`
37336
37337  # Now try to locate executable using which
37338  new_path=`$WHICH "$new_path" 2> /dev/null`
37339  # bat and cmd files are not always considered executable in cygwin causing which
37340  # to not find them
37341  if test "x$new_path" = x \
37342      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37343      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37344    new_path=`$CYGPATH -u "$path"`
37345  fi
37346  if test "x$new_path" = x; then
37347    # Oops. Which didn't find the executable.
37348    # The splitting of arguments from the executable at a space might have been incorrect,
37349    # since paths with space are more likely in Windows. Give it another try with the whole
37350    # argument.
37351    path="$complete"
37352    arguments="EOL"
37353    new_path=`$CYGPATH -u "$path"`
37354    new_path=`$WHICH "$new_path" 2> /dev/null`
37355    # bat and cmd files are not always considered executable in cygwin causing which
37356    # to not find them
37357    if test "x$new_path" = x \
37358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37360      new_path=`$CYGPATH -u "$path"`
37361    fi
37362    if test "x$new_path" = x; then
37363      # It's still not found. Now this is an unrecoverable error.
37364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37365$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37366      has_space=`$ECHO "$complete" | $GREP " "`
37367      if test "x$has_space" != x; then
37368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37370      fi
37371      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37372    fi
37373  fi
37374
37375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37378  # "foo.exe" is OK but "foo" is an error.
37379  #
37380  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37381  # It is also a way to make sure we got the proper file name for the real test later on.
37382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37383  if test "x$test_shortpath" = x; then
37384    # Short path failed, file does not exist as specified.
37385    # Try adding .exe or .cmd
37386    if test -f "${new_path}.exe"; then
37387      input_to_shortpath="${new_path}.exe"
37388    elif test -f "${new_path}.cmd"; then
37389      input_to_shortpath="${new_path}.cmd"
37390    else
37391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37392$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37395      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37396    fi
37397  else
37398    input_to_shortpath="$new_path"
37399  fi
37400
37401  # Call helper function which possibly converts this using DOS-style short mode.
37402  # If so, the updated path is stored in $new_path.
37403  new_path="$input_to_shortpath"
37404
37405  input_path="$input_to_shortpath"
37406  # Check if we need to convert this using DOS-style short mode. If the path
37407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37408  # take no chances and rewrite it.
37409  # Note: m4 eats our [], so we need to use [ and ] instead.
37410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37411  if test "x$has_forbidden_chars" != x; then
37412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37416      # Going to short mode and back again did indeed matter. Since short mode is
37417      # case insensitive, let's make it lowercase to improve readability.
37418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37419      # Now convert it back to Unix-style (cygpath)
37420      input_path=`$CYGPATH -u "$shortmode_path"`
37421      new_path="$input_path"
37422    fi
37423  fi
37424
37425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37426  if test "x$test_cygdrive_prefix" = x; then
37427    # As a simple fix, exclude /usr/bin since it's not a real path.
37428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37430      # a path prefixed by /cygdrive for fixpath to work.
37431      new_path="$CYGWIN_ROOT_PATH$input_path"
37432    fi
37433  fi
37434
37435  # remove trailing .exe if any
37436  new_path="${new_path/%.exe/}"
37437
37438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37439
37440  # First separate the path from the arguments. This will split at the first
37441  # space.
37442  complete="$NM"
37443  path="${complete%% *}"
37444  tmp="$complete EOL"
37445  arguments="${tmp#* }"
37446
37447  # Input might be given as Windows format, start by converting to
37448  # unix format.
37449  new_path="$path"
37450
37451  windows_path="$new_path"
37452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37453    unix_path=`$CYGPATH -u "$windows_path"`
37454    new_path="$unix_path"
37455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37457    new_path="$unix_path"
37458  fi
37459
37460
37461  # Now try to locate executable using which
37462  new_path=`$WHICH "$new_path" 2> /dev/null`
37463
37464  if test "x$new_path" = x; then
37465    # Oops. Which didn't find the executable.
37466    # The splitting of arguments from the executable at a space might have been incorrect,
37467    # since paths with space are more likely in Windows. Give it another try with the whole
37468    # argument.
37469    path="$complete"
37470    arguments="EOL"
37471    new_path="$path"
37472
37473  windows_path="$new_path"
37474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37475    unix_path=`$CYGPATH -u "$windows_path"`
37476    new_path="$unix_path"
37477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37479    new_path="$unix_path"
37480  fi
37481
37482
37483    new_path=`$WHICH "$new_path" 2> /dev/null`
37484    # bat and cmd files are not always considered executable in MSYS causing which
37485    # to not find them
37486    if test "x$new_path" = x \
37487        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37488        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37489      new_path="$path"
37490
37491  windows_path="$new_path"
37492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37493    unix_path=`$CYGPATH -u "$windows_path"`
37494    new_path="$unix_path"
37495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37497    new_path="$unix_path"
37498  fi
37499
37500    fi
37501
37502    if test "x$new_path" = x; then
37503      # It's still not found. Now this is an unrecoverable error.
37504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37505$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37506      has_space=`$ECHO "$complete" | $GREP " "`
37507      if test "x$has_space" != x; then
37508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37510      fi
37511      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37512    fi
37513  fi
37514
37515  # Now new_path has a complete unix path to the binary
37516  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37517    # Keep paths in /bin as-is, but remove trailing .exe if any
37518    new_path="${new_path/%.exe/}"
37519    # Do not save /bin paths to all_fixpath_prefixes!
37520  else
37521    # Not in mixed or Windows style, start by that.
37522    new_path=`cmd //c echo $new_path`
37523
37524  input_path="$new_path"
37525  # Check if we need to convert this using DOS-style short mode. If the path
37526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37527  # take no chances and rewrite it.
37528  # Note: m4 eats our [], so we need to use [ and ] instead.
37529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37530  if test "x$has_forbidden_chars" != x; then
37531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37533  fi
37534
37535    # Output is in $new_path
37536
37537  windows_path="$new_path"
37538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37539    unix_path=`$CYGPATH -u "$windows_path"`
37540    new_path="$unix_path"
37541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37543    new_path="$unix_path"
37544  fi
37545
37546    # remove trailing .exe if any
37547    new_path="${new_path/%.exe/}"
37548
37549    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37550    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37551  fi
37552
37553  else
37554    # We're on a posix platform. Hooray! :)
37555    # First separate the path from the arguments. This will split at the first
37556    # space.
37557    complete="$NM"
37558    path="${complete%% *}"
37559    tmp="$complete EOL"
37560    arguments="${tmp#* }"
37561
37562    # Cannot rely on the command "which" here since it doesn't always work.
37563    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37564    if test -z "$is_absolute_path"; then
37565      # Path to executable is not absolute. Find it.
37566      IFS_save="$IFS"
37567      IFS=:
37568      for p in $PATH; do
37569        if test -f "$p/$path" && test -x "$p/$path"; then
37570          new_path="$p/$path"
37571          break
37572        fi
37573      done
37574      IFS="$IFS_save"
37575    else
37576      # This is an absolute path, we can use it without further modifications.
37577      new_path="$path"
37578    fi
37579
37580    if test "x$new_path" = x; then
37581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37582$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37583      has_space=`$ECHO "$complete" | $GREP " "`
37584      if test "x$has_space" != x; then
37585        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37586$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37587      fi
37588      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37589    fi
37590  fi
37591
37592  # Now join together the path and the arguments once again
37593  if test "x$arguments" != xEOL; then
37594    new_complete="$new_path ${arguments% *}"
37595  else
37596    new_complete="$new_path"
37597  fi
37598
37599  if test "x$complete" != "x$new_complete"; then
37600    NM="$new_complete"
37601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37602$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37603  fi
37604
37605    GNM="$NM"
37606
37607  fi
37608
37609  # objcopy is used for moving debug symbols to separate files when
37610  # full debug symbols are enabled.
37611  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xbsd ; then
37612
37613
37614  # Publish this variable in the help.
37615
37616
37617  if test "x$OBJCOPY" = x; then
37618    # The variable is not set by user, try to locate tool using the code snippet
37619    if test -n "$ac_tool_prefix"; then
37620  for ac_prog in gobjcopy objcopy
37621  do
37622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37625$as_echo_n "checking for $ac_word... " >&6; }
37626if ${ac_cv_prog_OBJCOPY+:} false; then :
37627  $as_echo_n "(cached) " >&6
37628else
37629  if test -n "$OBJCOPY"; then
37630  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37631else
37632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37633for as_dir in $PATH
37634do
37635  IFS=$as_save_IFS
37636  test -z "$as_dir" && as_dir=.
37637    for ac_exec_ext in '' $ac_executable_extensions; do
37638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37639    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37641    break 2
37642  fi
37643done
37644  done
37645IFS=$as_save_IFS
37646
37647fi
37648fi
37649OBJCOPY=$ac_cv_prog_OBJCOPY
37650if test -n "$OBJCOPY"; then
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37652$as_echo "$OBJCOPY" >&6; }
37653else
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37655$as_echo "no" >&6; }
37656fi
37657
37658
37659    test -n "$OBJCOPY" && break
37660  done
37661fi
37662if test -z "$OBJCOPY"; then
37663  ac_ct_OBJCOPY=$OBJCOPY
37664  for ac_prog in gobjcopy objcopy
37665do
37666  # Extract the first word of "$ac_prog", so it can be a program name with args.
37667set dummy $ac_prog; ac_word=$2
37668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37669$as_echo_n "checking for $ac_word... " >&6; }
37670if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37671  $as_echo_n "(cached) " >&6
37672else
37673  if test -n "$ac_ct_OBJCOPY"; then
37674  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37675else
37676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37677for as_dir in $PATH
37678do
37679  IFS=$as_save_IFS
37680  test -z "$as_dir" && as_dir=.
37681    for ac_exec_ext in '' $ac_executable_extensions; do
37682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37683    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37685    break 2
37686  fi
37687done
37688  done
37689IFS=$as_save_IFS
37690
37691fi
37692fi
37693ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37694if test -n "$ac_ct_OBJCOPY"; then
37695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37696$as_echo "$ac_ct_OBJCOPY" >&6; }
37697else
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37699$as_echo "no" >&6; }
37700fi
37701
37702
37703  test -n "$ac_ct_OBJCOPY" && break
37704done
37705
37706  if test "x$ac_ct_OBJCOPY" = x; then
37707    OBJCOPY=""
37708  else
37709    case $cross_compiling:$ac_tool_warned in
37710yes:)
37711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37713ac_tool_warned=yes ;;
37714esac
37715    OBJCOPY=$ac_ct_OBJCOPY
37716  fi
37717fi
37718
37719  else
37720    # The variable is set, but is it from the command line or the environment?
37721
37722    # Try to remove the string !OBJCOPY! from our list.
37723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37725      # If it failed, the variable was not from the command line. Ignore it,
37726      # but warn the user (except for BASH, which is always set by the calling BASH).
37727      if test "xOBJCOPY" != xBASH; then
37728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37729$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37730      fi
37731      # Try to locate tool using the code snippet
37732      if test -n "$ac_tool_prefix"; then
37733  for ac_prog in gobjcopy objcopy
37734  do
37735    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37736set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37738$as_echo_n "checking for $ac_word... " >&6; }
37739if ${ac_cv_prog_OBJCOPY+:} false; then :
37740  $as_echo_n "(cached) " >&6
37741else
37742  if test -n "$OBJCOPY"; then
37743  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37744else
37745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37746for as_dir in $PATH
37747do
37748  IFS=$as_save_IFS
37749  test -z "$as_dir" && as_dir=.
37750    for ac_exec_ext in '' $ac_executable_extensions; do
37751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37752    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37754    break 2
37755  fi
37756done
37757  done
37758IFS=$as_save_IFS
37759
37760fi
37761fi
37762OBJCOPY=$ac_cv_prog_OBJCOPY
37763if test -n "$OBJCOPY"; then
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37765$as_echo "$OBJCOPY" >&6; }
37766else
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37768$as_echo "no" >&6; }
37769fi
37770
37771
37772    test -n "$OBJCOPY" && break
37773  done
37774fi
37775if test -z "$OBJCOPY"; then
37776  ac_ct_OBJCOPY=$OBJCOPY
37777  for ac_prog in gobjcopy objcopy
37778do
37779  # Extract the first word of "$ac_prog", so it can be a program name with args.
37780set dummy $ac_prog; ac_word=$2
37781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37782$as_echo_n "checking for $ac_word... " >&6; }
37783if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37784  $as_echo_n "(cached) " >&6
37785else
37786  if test -n "$ac_ct_OBJCOPY"; then
37787  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37788else
37789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37790for as_dir in $PATH
37791do
37792  IFS=$as_save_IFS
37793  test -z "$as_dir" && as_dir=.
37794    for ac_exec_ext in '' $ac_executable_extensions; do
37795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37796    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37798    break 2
37799  fi
37800done
37801  done
37802IFS=$as_save_IFS
37803
37804fi
37805fi
37806ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37807if test -n "$ac_ct_OBJCOPY"; then
37808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37809$as_echo "$ac_ct_OBJCOPY" >&6; }
37810else
37811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37812$as_echo "no" >&6; }
37813fi
37814
37815
37816  test -n "$ac_ct_OBJCOPY" && break
37817done
37818
37819  if test "x$ac_ct_OBJCOPY" = x; then
37820    OBJCOPY=""
37821  else
37822    case $cross_compiling:$ac_tool_warned in
37823yes:)
37824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37826ac_tool_warned=yes ;;
37827esac
37828    OBJCOPY=$ac_ct_OBJCOPY
37829  fi
37830fi
37831
37832    else
37833      # If it succeeded, then it was overridden by the user. We will use it
37834      # for the tool.
37835
37836      # First remove it from the list of overridden variables, so we can test
37837      # for unknown variables in the end.
37838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37839
37840      # Check if the provided tool contains a complete path.
37841      tool_specified="$OBJCOPY"
37842      tool_basename="${tool_specified##*/}"
37843      if test "x$tool_basename" = "x$tool_specified"; then
37844        # A command without a complete path is provided, search $PATH.
37845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37846$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37847        # Extract the first word of "$tool_basename", so it can be a program name with args.
37848set dummy $tool_basename; ac_word=$2
37849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37850$as_echo_n "checking for $ac_word... " >&6; }
37851if ${ac_cv_path_OBJCOPY+:} false; then :
37852  $as_echo_n "(cached) " >&6
37853else
37854  case $OBJCOPY in
37855  [\\/]* | ?:[\\/]*)
37856  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37857  ;;
37858  *)
37859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37860for as_dir in $PATH
37861do
37862  IFS=$as_save_IFS
37863  test -z "$as_dir" && as_dir=.
37864    for ac_exec_ext in '' $ac_executable_extensions; do
37865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37866    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37868    break 2
37869  fi
37870done
37871  done
37872IFS=$as_save_IFS
37873
37874  ;;
37875esac
37876fi
37877OBJCOPY=$ac_cv_path_OBJCOPY
37878if test -n "$OBJCOPY"; then
37879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37880$as_echo "$OBJCOPY" >&6; }
37881else
37882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37883$as_echo "no" >&6; }
37884fi
37885
37886
37887        if test "x$OBJCOPY" = x; then
37888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37889        fi
37890      else
37891        # Otherwise we believe it is a complete path. Use it as it is.
37892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37893$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37895$as_echo_n "checking for OBJCOPY... " >&6; }
37896        if test ! -x "$tool_specified"; then
37897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37898$as_echo "not found" >&6; }
37899          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37900        fi
37901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37902$as_echo "$tool_specified" >&6; }
37903      fi
37904    fi
37905  fi
37906
37907
37908    # Only call fixup if objcopy was found.
37909    if test -n "$OBJCOPY"; then
37910
37911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37912
37913  # First separate the path from the arguments. This will split at the first
37914  # space.
37915  complete="$OBJCOPY"
37916  path="${complete%% *}"
37917  tmp="$complete EOL"
37918  arguments="${tmp#* }"
37919
37920  # Input might be given as Windows format, start by converting to
37921  # unix format.
37922  new_path=`$CYGPATH -u "$path"`
37923
37924  # Now try to locate executable using which
37925  new_path=`$WHICH "$new_path" 2> /dev/null`
37926  # bat and cmd files are not always considered executable in cygwin causing which
37927  # to not find them
37928  if test "x$new_path" = x \
37929      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37930      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37931    new_path=`$CYGPATH -u "$path"`
37932  fi
37933  if test "x$new_path" = x; then
37934    # Oops. Which didn't find the executable.
37935    # The splitting of arguments from the executable at a space might have been incorrect,
37936    # since paths with space are more likely in Windows. Give it another try with the whole
37937    # argument.
37938    path="$complete"
37939    arguments="EOL"
37940    new_path=`$CYGPATH -u "$path"`
37941    new_path=`$WHICH "$new_path" 2> /dev/null`
37942    # bat and cmd files are not always considered executable in cygwin causing which
37943    # to not find them
37944    if test "x$new_path" = x \
37945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37947      new_path=`$CYGPATH -u "$path"`
37948    fi
37949    if test "x$new_path" = x; then
37950      # It's still not found. Now this is an unrecoverable error.
37951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37952$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37953      has_space=`$ECHO "$complete" | $GREP " "`
37954      if test "x$has_space" != x; then
37955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37957      fi
37958      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37959    fi
37960  fi
37961
37962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37965  # "foo.exe" is OK but "foo" is an error.
37966  #
37967  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37968  # It is also a way to make sure we got the proper file name for the real test later on.
37969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37970  if test "x$test_shortpath" = x; then
37971    # Short path failed, file does not exist as specified.
37972    # Try adding .exe or .cmd
37973    if test -f "${new_path}.exe"; then
37974      input_to_shortpath="${new_path}.exe"
37975    elif test -f "${new_path}.cmd"; then
37976      input_to_shortpath="${new_path}.cmd"
37977    else
37978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37979$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37980      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37981$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37982      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37983    fi
37984  else
37985    input_to_shortpath="$new_path"
37986  fi
37987
37988  # Call helper function which possibly converts this using DOS-style short mode.
37989  # If so, the updated path is stored in $new_path.
37990  new_path="$input_to_shortpath"
37991
37992  input_path="$input_to_shortpath"
37993  # Check if we need to convert this using DOS-style short mode. If the path
37994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37995  # take no chances and rewrite it.
37996  # Note: m4 eats our [], so we need to use [ and ] instead.
37997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37998  if test "x$has_forbidden_chars" != x; then
37999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38003      # Going to short mode and back again did indeed matter. Since short mode is
38004      # case insensitive, let's make it lowercase to improve readability.
38005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38006      # Now convert it back to Unix-style (cygpath)
38007      input_path=`$CYGPATH -u "$shortmode_path"`
38008      new_path="$input_path"
38009    fi
38010  fi
38011
38012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38013  if test "x$test_cygdrive_prefix" = x; then
38014    # As a simple fix, exclude /usr/bin since it's not a real path.
38015    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38017      # a path prefixed by /cygdrive for fixpath to work.
38018      new_path="$CYGWIN_ROOT_PATH$input_path"
38019    fi
38020  fi
38021
38022  # remove trailing .exe if any
38023  new_path="${new_path/%.exe/}"
38024
38025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38026
38027  # First separate the path from the arguments. This will split at the first
38028  # space.
38029  complete="$OBJCOPY"
38030  path="${complete%% *}"
38031  tmp="$complete EOL"
38032  arguments="${tmp#* }"
38033
38034  # Input might be given as Windows format, start by converting to
38035  # unix format.
38036  new_path="$path"
38037
38038  windows_path="$new_path"
38039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38040    unix_path=`$CYGPATH -u "$windows_path"`
38041    new_path="$unix_path"
38042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38044    new_path="$unix_path"
38045  fi
38046
38047
38048  # Now try to locate executable using which
38049  new_path=`$WHICH "$new_path" 2> /dev/null`
38050
38051  if test "x$new_path" = x; then
38052    # Oops. Which didn't find the executable.
38053    # The splitting of arguments from the executable at a space might have been incorrect,
38054    # since paths with space are more likely in Windows. Give it another try with the whole
38055    # argument.
38056    path="$complete"
38057    arguments="EOL"
38058    new_path="$path"
38059
38060  windows_path="$new_path"
38061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38062    unix_path=`$CYGPATH -u "$windows_path"`
38063    new_path="$unix_path"
38064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38066    new_path="$unix_path"
38067  fi
38068
38069
38070    new_path=`$WHICH "$new_path" 2> /dev/null`
38071    # bat and cmd files are not always considered executable in MSYS causing which
38072    # to not find them
38073    if test "x$new_path" = x \
38074        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38075        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38076      new_path="$path"
38077
38078  windows_path="$new_path"
38079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38080    unix_path=`$CYGPATH -u "$windows_path"`
38081    new_path="$unix_path"
38082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38084    new_path="$unix_path"
38085  fi
38086
38087    fi
38088
38089    if test "x$new_path" = x; then
38090      # It's still not found. Now this is an unrecoverable error.
38091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38092$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38093      has_space=`$ECHO "$complete" | $GREP " "`
38094      if test "x$has_space" != x; then
38095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38097      fi
38098      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38099    fi
38100  fi
38101
38102  # Now new_path has a complete unix path to the binary
38103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38104    # Keep paths in /bin as-is, but remove trailing .exe if any
38105    new_path="${new_path/%.exe/}"
38106    # Do not save /bin paths to all_fixpath_prefixes!
38107  else
38108    # Not in mixed or Windows style, start by that.
38109    new_path=`cmd //c echo $new_path`
38110
38111  input_path="$new_path"
38112  # Check if we need to convert this using DOS-style short mode. If the path
38113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38114  # take no chances and rewrite it.
38115  # Note: m4 eats our [], so we need to use [ and ] instead.
38116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38117  if test "x$has_forbidden_chars" != x; then
38118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38120  fi
38121
38122    # Output is in $new_path
38123
38124  windows_path="$new_path"
38125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38126    unix_path=`$CYGPATH -u "$windows_path"`
38127    new_path="$unix_path"
38128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38130    new_path="$unix_path"
38131  fi
38132
38133    # remove trailing .exe if any
38134    new_path="${new_path/%.exe/}"
38135
38136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38138  fi
38139
38140  else
38141    # We're on a posix platform. Hooray! :)
38142    # First separate the path from the arguments. This will split at the first
38143    # space.
38144    complete="$OBJCOPY"
38145    path="${complete%% *}"
38146    tmp="$complete EOL"
38147    arguments="${tmp#* }"
38148
38149    # Cannot rely on the command "which" here since it doesn't always work.
38150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38151    if test -z "$is_absolute_path"; then
38152      # Path to executable is not absolute. Find it.
38153      IFS_save="$IFS"
38154      IFS=:
38155      for p in $PATH; do
38156        if test -f "$p/$path" && test -x "$p/$path"; then
38157          new_path="$p/$path"
38158          break
38159        fi
38160      done
38161      IFS="$IFS_save"
38162    else
38163      # This is an absolute path, we can use it without further modifications.
38164      new_path="$path"
38165    fi
38166
38167    if test "x$new_path" = x; then
38168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38169$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38170      has_space=`$ECHO "$complete" | $GREP " "`
38171      if test "x$has_space" != x; then
38172        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38174      fi
38175      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38176    fi
38177  fi
38178
38179  # Now join together the path and the arguments once again
38180  if test "x$arguments" != xEOL; then
38181    new_complete="$new_path ${arguments% *}"
38182  else
38183    new_complete="$new_path"
38184  fi
38185
38186  if test "x$complete" != "x$new_complete"; then
38187    OBJCOPY="$new_complete"
38188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38189$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38190  fi
38191
38192    fi
38193  fi
38194
38195
38196
38197  # Publish this variable in the help.
38198
38199
38200  if test "x$OBJDUMP" = x; then
38201    # The variable is not set by user, try to locate tool using the code snippet
38202    if test -n "$ac_tool_prefix"; then
38203  for ac_prog in gobjdump objdump
38204  do
38205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208$as_echo_n "checking for $ac_word... " >&6; }
38209if ${ac_cv_prog_OBJDUMP+:} false; then :
38210  $as_echo_n "(cached) " >&6
38211else
38212  if test -n "$OBJDUMP"; then
38213  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38214else
38215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38216for as_dir in $PATH
38217do
38218  IFS=$as_save_IFS
38219  test -z "$as_dir" && as_dir=.
38220    for ac_exec_ext in '' $ac_executable_extensions; do
38221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38222    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38224    break 2
38225  fi
38226done
38227  done
38228IFS=$as_save_IFS
38229
38230fi
38231fi
38232OBJDUMP=$ac_cv_prog_OBJDUMP
38233if test -n "$OBJDUMP"; then
38234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38235$as_echo "$OBJDUMP" >&6; }
38236else
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38238$as_echo "no" >&6; }
38239fi
38240
38241
38242    test -n "$OBJDUMP" && break
38243  done
38244fi
38245if test -z "$OBJDUMP"; then
38246  ac_ct_OBJDUMP=$OBJDUMP
38247  for ac_prog in gobjdump objdump
38248do
38249  # Extract the first word of "$ac_prog", so it can be a program name with args.
38250set dummy $ac_prog; ac_word=$2
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38252$as_echo_n "checking for $ac_word... " >&6; }
38253if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  if test -n "$ac_ct_OBJDUMP"; then
38257  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38258else
38259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38260for as_dir in $PATH
38261do
38262  IFS=$as_save_IFS
38263  test -z "$as_dir" && as_dir=.
38264    for ac_exec_ext in '' $ac_executable_extensions; do
38265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38266    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38268    break 2
38269  fi
38270done
38271  done
38272IFS=$as_save_IFS
38273
38274fi
38275fi
38276ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38277if test -n "$ac_ct_OBJDUMP"; then
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38279$as_echo "$ac_ct_OBJDUMP" >&6; }
38280else
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38282$as_echo "no" >&6; }
38283fi
38284
38285
38286  test -n "$ac_ct_OBJDUMP" && break
38287done
38288
38289  if test "x$ac_ct_OBJDUMP" = x; then
38290    OBJDUMP=""
38291  else
38292    case $cross_compiling:$ac_tool_warned in
38293yes:)
38294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38296ac_tool_warned=yes ;;
38297esac
38298    OBJDUMP=$ac_ct_OBJDUMP
38299  fi
38300fi
38301
38302  else
38303    # The variable is set, but is it from the command line or the environment?
38304
38305    # Try to remove the string !OBJDUMP! from our list.
38306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38308      # If it failed, the variable was not from the command line. Ignore it,
38309      # but warn the user (except for BASH, which is always set by the calling BASH).
38310      if test "xOBJDUMP" != xBASH; then
38311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38312$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38313      fi
38314      # Try to locate tool using the code snippet
38315      if test -n "$ac_tool_prefix"; then
38316  for ac_prog in gobjdump objdump
38317  do
38318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38321$as_echo_n "checking for $ac_word... " >&6; }
38322if ${ac_cv_prog_OBJDUMP+:} false; then :
38323  $as_echo_n "(cached) " >&6
38324else
38325  if test -n "$OBJDUMP"; then
38326  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38327else
38328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38329for as_dir in $PATH
38330do
38331  IFS=$as_save_IFS
38332  test -z "$as_dir" && as_dir=.
38333    for ac_exec_ext in '' $ac_executable_extensions; do
38334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38335    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38337    break 2
38338  fi
38339done
38340  done
38341IFS=$as_save_IFS
38342
38343fi
38344fi
38345OBJDUMP=$ac_cv_prog_OBJDUMP
38346if test -n "$OBJDUMP"; then
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38348$as_echo "$OBJDUMP" >&6; }
38349else
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351$as_echo "no" >&6; }
38352fi
38353
38354
38355    test -n "$OBJDUMP" && break
38356  done
38357fi
38358if test -z "$OBJDUMP"; then
38359  ac_ct_OBJDUMP=$OBJDUMP
38360  for ac_prog in gobjdump objdump
38361do
38362  # Extract the first word of "$ac_prog", so it can be a program name with args.
38363set dummy $ac_prog; ac_word=$2
38364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38365$as_echo_n "checking for $ac_word... " >&6; }
38366if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38367  $as_echo_n "(cached) " >&6
38368else
38369  if test -n "$ac_ct_OBJDUMP"; then
38370  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38371else
38372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38373for as_dir in $PATH
38374do
38375  IFS=$as_save_IFS
38376  test -z "$as_dir" && as_dir=.
38377    for ac_exec_ext in '' $ac_executable_extensions; do
38378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38379    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38381    break 2
38382  fi
38383done
38384  done
38385IFS=$as_save_IFS
38386
38387fi
38388fi
38389ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38390if test -n "$ac_ct_OBJDUMP"; then
38391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38392$as_echo "$ac_ct_OBJDUMP" >&6; }
38393else
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38395$as_echo "no" >&6; }
38396fi
38397
38398
38399  test -n "$ac_ct_OBJDUMP" && break
38400done
38401
38402  if test "x$ac_ct_OBJDUMP" = x; then
38403    OBJDUMP=""
38404  else
38405    case $cross_compiling:$ac_tool_warned in
38406yes:)
38407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38409ac_tool_warned=yes ;;
38410esac
38411    OBJDUMP=$ac_ct_OBJDUMP
38412  fi
38413fi
38414
38415    else
38416      # If it succeeded, then it was overridden by the user. We will use it
38417      # for the tool.
38418
38419      # First remove it from the list of overridden variables, so we can test
38420      # for unknown variables in the end.
38421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38422
38423      # Check if the provided tool contains a complete path.
38424      tool_specified="$OBJDUMP"
38425      tool_basename="${tool_specified##*/}"
38426      if test "x$tool_basename" = "x$tool_specified"; then
38427        # A command without a complete path is provided, search $PATH.
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38429$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38430        # Extract the first word of "$tool_basename", so it can be a program name with args.
38431set dummy $tool_basename; ac_word=$2
38432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38433$as_echo_n "checking for $ac_word... " >&6; }
38434if ${ac_cv_path_OBJDUMP+:} false; then :
38435  $as_echo_n "(cached) " >&6
38436else
38437  case $OBJDUMP in
38438  [\\/]* | ?:[\\/]*)
38439  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38440  ;;
38441  *)
38442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38443for as_dir in $PATH
38444do
38445  IFS=$as_save_IFS
38446  test -z "$as_dir" && as_dir=.
38447    for ac_exec_ext in '' $ac_executable_extensions; do
38448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38449    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38451    break 2
38452  fi
38453done
38454  done
38455IFS=$as_save_IFS
38456
38457  ;;
38458esac
38459fi
38460OBJDUMP=$ac_cv_path_OBJDUMP
38461if test -n "$OBJDUMP"; then
38462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38463$as_echo "$OBJDUMP" >&6; }
38464else
38465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38466$as_echo "no" >&6; }
38467fi
38468
38469
38470        if test "x$OBJDUMP" = x; then
38471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38472        fi
38473      else
38474        # Otherwise we believe it is a complete path. Use it as it is.
38475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38476$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38478$as_echo_n "checking for OBJDUMP... " >&6; }
38479        if test ! -x "$tool_specified"; then
38480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38481$as_echo "not found" >&6; }
38482          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38483        fi
38484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38485$as_echo "$tool_specified" >&6; }
38486      fi
38487    fi
38488  fi
38489
38490
38491  if test "x$OBJDUMP" != x; then
38492    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38493    # bails if argument is missing.
38494
38495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38496
38497  # First separate the path from the arguments. This will split at the first
38498  # space.
38499  complete="$OBJDUMP"
38500  path="${complete%% *}"
38501  tmp="$complete EOL"
38502  arguments="${tmp#* }"
38503
38504  # Input might be given as Windows format, start by converting to
38505  # unix format.
38506  new_path=`$CYGPATH -u "$path"`
38507
38508  # Now try to locate executable using which
38509  new_path=`$WHICH "$new_path" 2> /dev/null`
38510  # bat and cmd files are not always considered executable in cygwin causing which
38511  # to not find them
38512  if test "x$new_path" = x \
38513      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38514      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38515    new_path=`$CYGPATH -u "$path"`
38516  fi
38517  if test "x$new_path" = x; then
38518    # Oops. Which didn't find the executable.
38519    # The splitting of arguments from the executable at a space might have been incorrect,
38520    # since paths with space are more likely in Windows. Give it another try with the whole
38521    # argument.
38522    path="$complete"
38523    arguments="EOL"
38524    new_path=`$CYGPATH -u "$path"`
38525    new_path=`$WHICH "$new_path" 2> /dev/null`
38526    # bat and cmd files are not always considered executable in cygwin causing which
38527    # to not find them
38528    if test "x$new_path" = x \
38529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38531      new_path=`$CYGPATH -u "$path"`
38532    fi
38533    if test "x$new_path" = x; then
38534      # It's still not found. Now this is an unrecoverable error.
38535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38536$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38537      has_space=`$ECHO "$complete" | $GREP " "`
38538      if test "x$has_space" != x; then
38539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38541      fi
38542      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38543    fi
38544  fi
38545
38546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38549  # "foo.exe" is OK but "foo" is an error.
38550  #
38551  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38552  # It is also a way to make sure we got the proper file name for the real test later on.
38553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38554  if test "x$test_shortpath" = x; then
38555    # Short path failed, file does not exist as specified.
38556    # Try adding .exe or .cmd
38557    if test -f "${new_path}.exe"; then
38558      input_to_shortpath="${new_path}.exe"
38559    elif test -f "${new_path}.cmd"; then
38560      input_to_shortpath="${new_path}.cmd"
38561    else
38562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38563$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38564      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38565$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38566      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38567    fi
38568  else
38569    input_to_shortpath="$new_path"
38570  fi
38571
38572  # Call helper function which possibly converts this using DOS-style short mode.
38573  # If so, the updated path is stored in $new_path.
38574  new_path="$input_to_shortpath"
38575
38576  input_path="$input_to_shortpath"
38577  # Check if we need to convert this using DOS-style short mode. If the path
38578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38579  # take no chances and rewrite it.
38580  # Note: m4 eats our [], so we need to use [ and ] instead.
38581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38582  if test "x$has_forbidden_chars" != x; then
38583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38587      # Going to short mode and back again did indeed matter. Since short mode is
38588      # case insensitive, let's make it lowercase to improve readability.
38589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38590      # Now convert it back to Unix-style (cygpath)
38591      input_path=`$CYGPATH -u "$shortmode_path"`
38592      new_path="$input_path"
38593    fi
38594  fi
38595
38596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38597  if test "x$test_cygdrive_prefix" = x; then
38598    # As a simple fix, exclude /usr/bin since it's not a real path.
38599    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38601      # a path prefixed by /cygdrive for fixpath to work.
38602      new_path="$CYGWIN_ROOT_PATH$input_path"
38603    fi
38604  fi
38605
38606  # remove trailing .exe if any
38607  new_path="${new_path/%.exe/}"
38608
38609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38610
38611  # First separate the path from the arguments. This will split at the first
38612  # space.
38613  complete="$OBJDUMP"
38614  path="${complete%% *}"
38615  tmp="$complete EOL"
38616  arguments="${tmp#* }"
38617
38618  # Input might be given as Windows format, start by converting to
38619  # unix format.
38620  new_path="$path"
38621
38622  windows_path="$new_path"
38623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38624    unix_path=`$CYGPATH -u "$windows_path"`
38625    new_path="$unix_path"
38626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38628    new_path="$unix_path"
38629  fi
38630
38631
38632  # Now try to locate executable using which
38633  new_path=`$WHICH "$new_path" 2> /dev/null`
38634
38635  if test "x$new_path" = x; then
38636    # Oops. Which didn't find the executable.
38637    # The splitting of arguments from the executable at a space might have been incorrect,
38638    # since paths with space are more likely in Windows. Give it another try with the whole
38639    # argument.
38640    path="$complete"
38641    arguments="EOL"
38642    new_path="$path"
38643
38644  windows_path="$new_path"
38645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38646    unix_path=`$CYGPATH -u "$windows_path"`
38647    new_path="$unix_path"
38648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38650    new_path="$unix_path"
38651  fi
38652
38653
38654    new_path=`$WHICH "$new_path" 2> /dev/null`
38655    # bat and cmd files are not always considered executable in MSYS causing which
38656    # to not find them
38657    if test "x$new_path" = x \
38658        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38659        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38660      new_path="$path"
38661
38662  windows_path="$new_path"
38663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38664    unix_path=`$CYGPATH -u "$windows_path"`
38665    new_path="$unix_path"
38666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38668    new_path="$unix_path"
38669  fi
38670
38671    fi
38672
38673    if test "x$new_path" = x; then
38674      # It's still not found. Now this is an unrecoverable error.
38675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38676$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38677      has_space=`$ECHO "$complete" | $GREP " "`
38678      if test "x$has_space" != x; then
38679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38681      fi
38682      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38683    fi
38684  fi
38685
38686  # Now new_path has a complete unix path to the binary
38687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38688    # Keep paths in /bin as-is, but remove trailing .exe if any
38689    new_path="${new_path/%.exe/}"
38690    # Do not save /bin paths to all_fixpath_prefixes!
38691  else
38692    # Not in mixed or Windows style, start by that.
38693    new_path=`cmd //c echo $new_path`
38694
38695  input_path="$new_path"
38696  # Check if we need to convert this using DOS-style short mode. If the path
38697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38698  # take no chances and rewrite it.
38699  # Note: m4 eats our [], so we need to use [ and ] instead.
38700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38701  if test "x$has_forbidden_chars" != x; then
38702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38704  fi
38705
38706    # Output is in $new_path
38707
38708  windows_path="$new_path"
38709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38710    unix_path=`$CYGPATH -u "$windows_path"`
38711    new_path="$unix_path"
38712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38714    new_path="$unix_path"
38715  fi
38716
38717    # remove trailing .exe if any
38718    new_path="${new_path/%.exe/}"
38719
38720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38722  fi
38723
38724  else
38725    # We're on a posix platform. Hooray! :)
38726    # First separate the path from the arguments. This will split at the first
38727    # space.
38728    complete="$OBJDUMP"
38729    path="${complete%% *}"
38730    tmp="$complete EOL"
38731    arguments="${tmp#* }"
38732
38733    # Cannot rely on the command "which" here since it doesn't always work.
38734    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38735    if test -z "$is_absolute_path"; then
38736      # Path to executable is not absolute. Find it.
38737      IFS_save="$IFS"
38738      IFS=:
38739      for p in $PATH; do
38740        if test -f "$p/$path" && test -x "$p/$path"; then
38741          new_path="$p/$path"
38742          break
38743        fi
38744      done
38745      IFS="$IFS_save"
38746    else
38747      # This is an absolute path, we can use it without further modifications.
38748      new_path="$path"
38749    fi
38750
38751    if test "x$new_path" = x; then
38752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38753$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38754      has_space=`$ECHO "$complete" | $GREP " "`
38755      if test "x$has_space" != x; then
38756        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38757$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38758      fi
38759      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38760    fi
38761  fi
38762
38763  # Now join together the path and the arguments once again
38764  if test "x$arguments" != xEOL; then
38765    new_complete="$new_path ${arguments% *}"
38766  else
38767    new_complete="$new_path"
38768  fi
38769
38770  if test "x$complete" != "x$new_complete"; then
38771    OBJDUMP="$new_complete"
38772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38773$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38774  fi
38775
38776  fi
38777
38778
38779  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
38780  # to remain in place. Otherwise the compiler will not work in some situations
38781  # in later configure checks.
38782  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
38783    PATH="$OLD_PATH"
38784  fi
38785
38786  # Restore the flags to the user specified values.
38787  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38788  CFLAGS="$ORG_CFLAGS"
38789  CXXFLAGS="$ORG_CXXFLAGS"
38790  OBJCFLAGS="$ORG_OBJCFLAGS"
38791
38792
38793# Finally do some processing after the detection phase
38794
38795  if test "x$COMPILE_TYPE" = "xcross"; then
38796    # Now we need to find a C/C++ compiler that can build executables for the
38797    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38798    # used once. Also, we need to do this without adding a tools dir to the
38799    # path, otherwise we might pick up cross-compilers which don't use standard
38800    # naming.
38801
38802    # FIXME: we should list the discovered compilers as an exclude pattern!
38803    # If we do that, we can do this detection before POST_DETECTION, and still
38804    # find the build compilers in the tools dir, if needed.
38805    if test "x$OPENJDK_BUILD_OS" = xmacosx; then
38806
38807
38808  # Publish this variable in the help.
38809
38810
38811  if test "x$BUILD_CC" = x; then
38812    # The variable is not set by user, try to locate tool using the code snippet
38813    for ac_prog in clang cl cc gcc
38814do
38815  # Extract the first word of "$ac_prog", so it can be a program name with args.
38816set dummy $ac_prog; ac_word=$2
38817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38818$as_echo_n "checking for $ac_word... " >&6; }
38819if ${ac_cv_path_BUILD_CC+:} false; then :
38820  $as_echo_n "(cached) " >&6
38821else
38822  case $BUILD_CC in
38823  [\\/]* | ?:[\\/]*)
38824  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38825  ;;
38826  *)
38827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38828for as_dir in $PATH
38829do
38830  IFS=$as_save_IFS
38831  test -z "$as_dir" && as_dir=.
38832    for ac_exec_ext in '' $ac_executable_extensions; do
38833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38834    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38836    break 2
38837  fi
38838done
38839  done
38840IFS=$as_save_IFS
38841
38842  ;;
38843esac
38844fi
38845BUILD_CC=$ac_cv_path_BUILD_CC
38846if test -n "$BUILD_CC"; then
38847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38848$as_echo "$BUILD_CC" >&6; }
38849else
38850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38851$as_echo "no" >&6; }
38852fi
38853
38854
38855  test -n "$BUILD_CC" && break
38856done
38857
38858  else
38859    # The variable is set, but is it from the command line or the environment?
38860
38861    # Try to remove the string !BUILD_CC! from our list.
38862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38864      # If it failed, the variable was not from the command line. Ignore it,
38865      # but warn the user (except for BASH, which is always set by the calling BASH).
38866      if test "xBUILD_CC" != xBASH; then
38867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38868$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38869      fi
38870      # Try to locate tool using the code snippet
38871      for ac_prog in clang cl cc gcc
38872do
38873  # Extract the first word of "$ac_prog", so it can be a program name with args.
38874set dummy $ac_prog; ac_word=$2
38875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38876$as_echo_n "checking for $ac_word... " >&6; }
38877if ${ac_cv_path_BUILD_CC+:} false; then :
38878  $as_echo_n "(cached) " >&6
38879else
38880  case $BUILD_CC in
38881  [\\/]* | ?:[\\/]*)
38882  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38883  ;;
38884  *)
38885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38886for as_dir in $PATH
38887do
38888  IFS=$as_save_IFS
38889  test -z "$as_dir" && as_dir=.
38890    for ac_exec_ext in '' $ac_executable_extensions; do
38891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38892    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38894    break 2
38895  fi
38896done
38897  done
38898IFS=$as_save_IFS
38899
38900  ;;
38901esac
38902fi
38903BUILD_CC=$ac_cv_path_BUILD_CC
38904if test -n "$BUILD_CC"; then
38905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38906$as_echo "$BUILD_CC" >&6; }
38907else
38908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38909$as_echo "no" >&6; }
38910fi
38911
38912
38913  test -n "$BUILD_CC" && break
38914done
38915
38916    else
38917      # If it succeeded, then it was overridden by the user. We will use it
38918      # for the tool.
38919
38920      # First remove it from the list of overridden variables, so we can test
38921      # for unknown variables in the end.
38922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38923
38924      # Check if the provided tool contains a complete path.
38925      tool_specified="$BUILD_CC"
38926      tool_basename="${tool_specified##*/}"
38927      if test "x$tool_basename" = "x$tool_specified"; then
38928        # A command without a complete path is provided, search $PATH.
38929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38930$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38931        # Extract the first word of "$tool_basename", so it can be a program name with args.
38932set dummy $tool_basename; ac_word=$2
38933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38934$as_echo_n "checking for $ac_word... " >&6; }
38935if ${ac_cv_path_BUILD_CC+:} false; then :
38936  $as_echo_n "(cached) " >&6
38937else
38938  case $BUILD_CC in
38939  [\\/]* | ?:[\\/]*)
38940  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38941  ;;
38942  *)
38943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38944for as_dir in $PATH
38945do
38946  IFS=$as_save_IFS
38947  test -z "$as_dir" && as_dir=.
38948    for ac_exec_ext in '' $ac_executable_extensions; do
38949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38950    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38952    break 2
38953  fi
38954done
38955  done
38956IFS=$as_save_IFS
38957
38958  ;;
38959esac
38960fi
38961BUILD_CC=$ac_cv_path_BUILD_CC
38962if test -n "$BUILD_CC"; then
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38964$as_echo "$BUILD_CC" >&6; }
38965else
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38967$as_echo "no" >&6; }
38968fi
38969
38970
38971        if test "x$BUILD_CC" = x; then
38972          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38973        fi
38974      else
38975        # Otherwise we believe it is a complete path. Use it as it is.
38976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38977$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38979$as_echo_n "checking for BUILD_CC... " >&6; }
38980        if test ! -x "$tool_specified"; then
38981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38982$as_echo "not found" >&6; }
38983          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38984        fi
38985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38986$as_echo "$tool_specified" >&6; }
38987      fi
38988    fi
38989  fi
38990
38991
38992
38993
38994  # Publish this variable in the help.
38995
38996
38997  if test "x$BUILD_CXX" = x; then
38998    # The variable is not set by user, try to locate tool using the code snippet
38999    for ac_prog in clang++ cl CC g++
39000do
39001  # Extract the first word of "$ac_prog", so it can be a program name with args.
39002set dummy $ac_prog; ac_word=$2
39003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39004$as_echo_n "checking for $ac_word... " >&6; }
39005if ${ac_cv_path_BUILD_CXX+:} false; then :
39006  $as_echo_n "(cached) " >&6
39007else
39008  case $BUILD_CXX in
39009  [\\/]* | ?:[\\/]*)
39010  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39011  ;;
39012  *)
39013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39014for as_dir in $PATH
39015do
39016  IFS=$as_save_IFS
39017  test -z "$as_dir" && as_dir=.
39018    for ac_exec_ext in '' $ac_executable_extensions; do
39019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39020    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39022    break 2
39023  fi
39024done
39025  done
39026IFS=$as_save_IFS
39027
39028  ;;
39029esac
39030fi
39031BUILD_CXX=$ac_cv_path_BUILD_CXX
39032if test -n "$BUILD_CXX"; then
39033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39034$as_echo "$BUILD_CXX" >&6; }
39035else
39036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39037$as_echo "no" >&6; }
39038fi
39039
39040
39041  test -n "$BUILD_CXX" && break
39042done
39043
39044  else
39045    # The variable is set, but is it from the command line or the environment?
39046
39047    # Try to remove the string !BUILD_CXX! from our list.
39048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39050      # If it failed, the variable was not from the command line. Ignore it,
39051      # but warn the user (except for BASH, which is always set by the calling BASH).
39052      if test "xBUILD_CXX" != xBASH; then
39053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39054$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39055      fi
39056      # Try to locate tool using the code snippet
39057      for ac_prog in clang++ cl CC g++
39058do
39059  # Extract the first word of "$ac_prog", so it can be a program name with args.
39060set dummy $ac_prog; ac_word=$2
39061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39062$as_echo_n "checking for $ac_word... " >&6; }
39063if ${ac_cv_path_BUILD_CXX+:} false; then :
39064  $as_echo_n "(cached) " >&6
39065else
39066  case $BUILD_CXX in
39067  [\\/]* | ?:[\\/]*)
39068  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39069  ;;
39070  *)
39071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39072for as_dir in $PATH
39073do
39074  IFS=$as_save_IFS
39075  test -z "$as_dir" && as_dir=.
39076    for ac_exec_ext in '' $ac_executable_extensions; do
39077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39078    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39080    break 2
39081  fi
39082done
39083  done
39084IFS=$as_save_IFS
39085
39086  ;;
39087esac
39088fi
39089BUILD_CXX=$ac_cv_path_BUILD_CXX
39090if test -n "$BUILD_CXX"; then
39091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39092$as_echo "$BUILD_CXX" >&6; }
39093else
39094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39095$as_echo "no" >&6; }
39096fi
39097
39098
39099  test -n "$BUILD_CXX" && break
39100done
39101
39102    else
39103      # If it succeeded, then it was overridden by the user. We will use it
39104      # for the tool.
39105
39106      # First remove it from the list of overridden variables, so we can test
39107      # for unknown variables in the end.
39108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39109
39110      # Check if the provided tool contains a complete path.
39111      tool_specified="$BUILD_CXX"
39112      tool_basename="${tool_specified##*/}"
39113      if test "x$tool_basename" = "x$tool_specified"; then
39114        # A command without a complete path is provided, search $PATH.
39115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39116$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39117        # Extract the first word of "$tool_basename", so it can be a program name with args.
39118set dummy $tool_basename; ac_word=$2
39119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39120$as_echo_n "checking for $ac_word... " >&6; }
39121if ${ac_cv_path_BUILD_CXX+:} false; then :
39122  $as_echo_n "(cached) " >&6
39123else
39124  case $BUILD_CXX in
39125  [\\/]* | ?:[\\/]*)
39126  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39127  ;;
39128  *)
39129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39130for as_dir in $PATH
39131do
39132  IFS=$as_save_IFS
39133  test -z "$as_dir" && as_dir=.
39134    for ac_exec_ext in '' $ac_executable_extensions; do
39135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39136    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39138    break 2
39139  fi
39140done
39141  done
39142IFS=$as_save_IFS
39143
39144  ;;
39145esac
39146fi
39147BUILD_CXX=$ac_cv_path_BUILD_CXX
39148if test -n "$BUILD_CXX"; then
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39150$as_echo "$BUILD_CXX" >&6; }
39151else
39152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39153$as_echo "no" >&6; }
39154fi
39155
39156
39157        if test "x$BUILD_CXX" = x; then
39158          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39159        fi
39160      else
39161        # Otherwise we believe it is a complete path. Use it as it is.
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39163$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39165$as_echo_n "checking for BUILD_CXX... " >&6; }
39166        if test ! -x "$tool_specified"; then
39167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39168$as_echo "not found" >&6; }
39169          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39170        fi
39171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39172$as_echo "$tool_specified" >&6; }
39173      fi
39174    fi
39175  fi
39176
39177
39178    else
39179
39180
39181
39182  # Publish this variable in the help.
39183
39184
39185  if test "x$BUILD_CC" = x; then
39186    # The variable is not set by user, try to locate tool using the code snippet
39187    for ac_prog in cl cc gcc
39188do
39189  # Extract the first word of "$ac_prog", so it can be a program name with args.
39190set dummy $ac_prog; ac_word=$2
39191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39192$as_echo_n "checking for $ac_word... " >&6; }
39193if ${ac_cv_path_BUILD_CC+:} false; then :
39194  $as_echo_n "(cached) " >&6
39195else
39196  case $BUILD_CC in
39197  [\\/]* | ?:[\\/]*)
39198  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39199  ;;
39200  *)
39201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39202for as_dir in $PATH
39203do
39204  IFS=$as_save_IFS
39205  test -z "$as_dir" && as_dir=.
39206    for ac_exec_ext in '' $ac_executable_extensions; do
39207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39208    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39210    break 2
39211  fi
39212done
39213  done
39214IFS=$as_save_IFS
39215
39216  ;;
39217esac
39218fi
39219BUILD_CC=$ac_cv_path_BUILD_CC
39220if test -n "$BUILD_CC"; then
39221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39222$as_echo "$BUILD_CC" >&6; }
39223else
39224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39225$as_echo "no" >&6; }
39226fi
39227
39228
39229  test -n "$BUILD_CC" && break
39230done
39231
39232  else
39233    # The variable is set, but is it from the command line or the environment?
39234
39235    # Try to remove the string !BUILD_CC! from our list.
39236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39238      # If it failed, the variable was not from the command line. Ignore it,
39239      # but warn the user (except for BASH, which is always set by the calling BASH).
39240      if test "xBUILD_CC" != xBASH; then
39241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39242$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39243      fi
39244      # Try to locate tool using the code snippet
39245      for ac_prog in cl cc gcc
39246do
39247  # Extract the first word of "$ac_prog", so it can be a program name with args.
39248set dummy $ac_prog; ac_word=$2
39249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39250$as_echo_n "checking for $ac_word... " >&6; }
39251if ${ac_cv_path_BUILD_CC+:} false; then :
39252  $as_echo_n "(cached) " >&6
39253else
39254  case $BUILD_CC in
39255  [\\/]* | ?:[\\/]*)
39256  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39257  ;;
39258  *)
39259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39260for as_dir in $PATH
39261do
39262  IFS=$as_save_IFS
39263  test -z "$as_dir" && as_dir=.
39264    for ac_exec_ext in '' $ac_executable_extensions; do
39265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39266    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39268    break 2
39269  fi
39270done
39271  done
39272IFS=$as_save_IFS
39273
39274  ;;
39275esac
39276fi
39277BUILD_CC=$ac_cv_path_BUILD_CC
39278if test -n "$BUILD_CC"; then
39279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39280$as_echo "$BUILD_CC" >&6; }
39281else
39282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39283$as_echo "no" >&6; }
39284fi
39285
39286
39287  test -n "$BUILD_CC" && break
39288done
39289
39290    else
39291      # If it succeeded, then it was overridden by the user. We will use it
39292      # for the tool.
39293
39294      # First remove it from the list of overridden variables, so we can test
39295      # for unknown variables in the end.
39296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39297
39298      # Check if the provided tool contains a complete path.
39299      tool_specified="$BUILD_CC"
39300      tool_basename="${tool_specified##*/}"
39301      if test "x$tool_basename" = "x$tool_specified"; then
39302        # A command without a complete path is provided, search $PATH.
39303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39304$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39305        # Extract the first word of "$tool_basename", so it can be a program name with args.
39306set dummy $tool_basename; ac_word=$2
39307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39308$as_echo_n "checking for $ac_word... " >&6; }
39309if ${ac_cv_path_BUILD_CC+:} false; then :
39310  $as_echo_n "(cached) " >&6
39311else
39312  case $BUILD_CC in
39313  [\\/]* | ?:[\\/]*)
39314  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39315  ;;
39316  *)
39317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39318for as_dir in $PATH
39319do
39320  IFS=$as_save_IFS
39321  test -z "$as_dir" && as_dir=.
39322    for ac_exec_ext in '' $ac_executable_extensions; do
39323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39324    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39326    break 2
39327  fi
39328done
39329  done
39330IFS=$as_save_IFS
39331
39332  ;;
39333esac
39334fi
39335BUILD_CC=$ac_cv_path_BUILD_CC
39336if test -n "$BUILD_CC"; then
39337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39338$as_echo "$BUILD_CC" >&6; }
39339else
39340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39341$as_echo "no" >&6; }
39342fi
39343
39344
39345        if test "x$BUILD_CC" = x; then
39346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39347        fi
39348      else
39349        # Otherwise we believe it is a complete path. Use it as it is.
39350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39351$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39353$as_echo_n "checking for BUILD_CC... " >&6; }
39354        if test ! -x "$tool_specified"; then
39355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39356$as_echo "not found" >&6; }
39357          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39358        fi
39359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39360$as_echo "$tool_specified" >&6; }
39361      fi
39362    fi
39363  fi
39364
39365
39366
39367  if test "x$BUILD_CC" = x; then
39368    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
39369  fi
39370
39371
39372
39373
39374
39375  # Publish this variable in the help.
39376
39377
39378  if test "x$BUILD_CXX" = x; then
39379    # The variable is not set by user, try to locate tool using the code snippet
39380    for ac_prog in cl CC g++
39381do
39382  # Extract the first word of "$ac_prog", so it can be a program name with args.
39383set dummy $ac_prog; ac_word=$2
39384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39385$as_echo_n "checking for $ac_word... " >&6; }
39386if ${ac_cv_path_BUILD_CXX+:} false; then :
39387  $as_echo_n "(cached) " >&6
39388else
39389  case $BUILD_CXX in
39390  [\\/]* | ?:[\\/]*)
39391  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39392  ;;
39393  *)
39394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39395for as_dir in $PATH
39396do
39397  IFS=$as_save_IFS
39398  test -z "$as_dir" && as_dir=.
39399    for ac_exec_ext in '' $ac_executable_extensions; do
39400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39401    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39403    break 2
39404  fi
39405done
39406  done
39407IFS=$as_save_IFS
39408
39409  ;;
39410esac
39411fi
39412BUILD_CXX=$ac_cv_path_BUILD_CXX
39413if test -n "$BUILD_CXX"; then
39414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39415$as_echo "$BUILD_CXX" >&6; }
39416else
39417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39418$as_echo "no" >&6; }
39419fi
39420
39421
39422  test -n "$BUILD_CXX" && break
39423done
39424
39425  else
39426    # The variable is set, but is it from the command line or the environment?
39427
39428    # Try to remove the string !BUILD_CXX! from our list.
39429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39431      # If it failed, the variable was not from the command line. Ignore it,
39432      # but warn the user (except for BASH, which is always set by the calling BASH).
39433      if test "xBUILD_CXX" != xBASH; then
39434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39435$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39436      fi
39437      # Try to locate tool using the code snippet
39438      for ac_prog in cl CC g++
39439do
39440  # Extract the first word of "$ac_prog", so it can be a program name with args.
39441set dummy $ac_prog; ac_word=$2
39442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39443$as_echo_n "checking for $ac_word... " >&6; }
39444if ${ac_cv_path_BUILD_CXX+:} false; then :
39445  $as_echo_n "(cached) " >&6
39446else
39447  case $BUILD_CXX in
39448  [\\/]* | ?:[\\/]*)
39449  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39450  ;;
39451  *)
39452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39453for as_dir in $PATH
39454do
39455  IFS=$as_save_IFS
39456  test -z "$as_dir" && as_dir=.
39457    for ac_exec_ext in '' $ac_executable_extensions; do
39458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39459    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39461    break 2
39462  fi
39463done
39464  done
39465IFS=$as_save_IFS
39466
39467  ;;
39468esac
39469fi
39470BUILD_CXX=$ac_cv_path_BUILD_CXX
39471if test -n "$BUILD_CXX"; then
39472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39473$as_echo "$BUILD_CXX" >&6; }
39474else
39475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39476$as_echo "no" >&6; }
39477fi
39478
39479
39480  test -n "$BUILD_CXX" && break
39481done
39482
39483    else
39484      # If it succeeded, then it was overridden by the user. We will use it
39485      # for the tool.
39486
39487      # First remove it from the list of overridden variables, so we can test
39488      # for unknown variables in the end.
39489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39490
39491      # Check if the provided tool contains a complete path.
39492      tool_specified="$BUILD_CXX"
39493      tool_basename="${tool_specified##*/}"
39494      if test "x$tool_basename" = "x$tool_specified"; then
39495        # A command without a complete path is provided, search $PATH.
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39497$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39498        # Extract the first word of "$tool_basename", so it can be a program name with args.
39499set dummy $tool_basename; ac_word=$2
39500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39501$as_echo_n "checking for $ac_word... " >&6; }
39502if ${ac_cv_path_BUILD_CXX+:} false; then :
39503  $as_echo_n "(cached) " >&6
39504else
39505  case $BUILD_CXX in
39506  [\\/]* | ?:[\\/]*)
39507  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39508  ;;
39509  *)
39510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39511for as_dir in $PATH
39512do
39513  IFS=$as_save_IFS
39514  test -z "$as_dir" && as_dir=.
39515    for ac_exec_ext in '' $ac_executable_extensions; do
39516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39517    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39519    break 2
39520  fi
39521done
39522  done
39523IFS=$as_save_IFS
39524
39525  ;;
39526esac
39527fi
39528BUILD_CXX=$ac_cv_path_BUILD_CXX
39529if test -n "$BUILD_CXX"; then
39530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39531$as_echo "$BUILD_CXX" >&6; }
39532else
39533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39534$as_echo "no" >&6; }
39535fi
39536
39537
39538        if test "x$BUILD_CXX" = x; then
39539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39540        fi
39541      else
39542        # Otherwise we believe it is a complete path. Use it as it is.
39543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39544$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39546$as_echo_n "checking for BUILD_CXX... " >&6; }
39547        if test ! -x "$tool_specified"; then
39548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39549$as_echo "not found" >&6; }
39550          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39551        fi
39552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39553$as_echo "$tool_specified" >&6; }
39554      fi
39555    fi
39556  fi
39557
39558
39559
39560  if test "x$BUILD_CXX" = x; then
39561    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
39562  fi
39563
39564
39565    fi
39566
39567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39568
39569  # First separate the path from the arguments. This will split at the first
39570  # space.
39571  complete="$BUILD_CC"
39572  path="${complete%% *}"
39573  tmp="$complete EOL"
39574  arguments="${tmp#* }"
39575
39576  # Input might be given as Windows format, start by converting to
39577  # unix format.
39578  new_path=`$CYGPATH -u "$path"`
39579
39580  # Now try to locate executable using which
39581  new_path=`$WHICH "$new_path" 2> /dev/null`
39582  # bat and cmd files are not always considered executable in cygwin causing which
39583  # to not find them
39584  if test "x$new_path" = x \
39585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39587    new_path=`$CYGPATH -u "$path"`
39588  fi
39589  if test "x$new_path" = x; then
39590    # Oops. Which didn't find the executable.
39591    # The splitting of arguments from the executable at a space might have been incorrect,
39592    # since paths with space are more likely in Windows. Give it another try with the whole
39593    # argument.
39594    path="$complete"
39595    arguments="EOL"
39596    new_path=`$CYGPATH -u "$path"`
39597    new_path=`$WHICH "$new_path" 2> /dev/null`
39598    # bat and cmd files are not always considered executable in cygwin causing which
39599    # to not find them
39600    if test "x$new_path" = x \
39601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39603      new_path=`$CYGPATH -u "$path"`
39604    fi
39605    if test "x$new_path" = x; then
39606      # It's still not found. Now this is an unrecoverable error.
39607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39608$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39609      has_space=`$ECHO "$complete" | $GREP " "`
39610      if test "x$has_space" != x; then
39611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39613      fi
39614      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39615    fi
39616  fi
39617
39618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39621  # "foo.exe" is OK but "foo" is an error.
39622  #
39623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39624  # It is also a way to make sure we got the proper file name for the real test later on.
39625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39626  if test "x$test_shortpath" = x; then
39627    # Short path failed, file does not exist as specified.
39628    # Try adding .exe or .cmd
39629    if test -f "${new_path}.exe"; then
39630      input_to_shortpath="${new_path}.exe"
39631    elif test -f "${new_path}.cmd"; then
39632      input_to_shortpath="${new_path}.cmd"
39633    else
39634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39635$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39638      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39639    fi
39640  else
39641    input_to_shortpath="$new_path"
39642  fi
39643
39644  # Call helper function which possibly converts this using DOS-style short mode.
39645  # If so, the updated path is stored in $new_path.
39646  new_path="$input_to_shortpath"
39647
39648  input_path="$input_to_shortpath"
39649  # Check if we need to convert this using DOS-style short mode. If the path
39650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39651  # take no chances and rewrite it.
39652  # Note: m4 eats our [], so we need to use [ and ] instead.
39653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39654  if test "x$has_forbidden_chars" != x; then
39655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39659      # Going to short mode and back again did indeed matter. Since short mode is
39660      # case insensitive, let's make it lowercase to improve readability.
39661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39662      # Now convert it back to Unix-style (cygpath)
39663      input_path=`$CYGPATH -u "$shortmode_path"`
39664      new_path="$input_path"
39665    fi
39666  fi
39667
39668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39669  if test "x$test_cygdrive_prefix" = x; then
39670    # As a simple fix, exclude /usr/bin since it's not a real path.
39671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39673      # a path prefixed by /cygdrive for fixpath to work.
39674      new_path="$CYGWIN_ROOT_PATH$input_path"
39675    fi
39676  fi
39677
39678  # remove trailing .exe if any
39679  new_path="${new_path/%.exe/}"
39680
39681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39682
39683  # First separate the path from the arguments. This will split at the first
39684  # space.
39685  complete="$BUILD_CC"
39686  path="${complete%% *}"
39687  tmp="$complete EOL"
39688  arguments="${tmp#* }"
39689
39690  # Input might be given as Windows format, start by converting to
39691  # unix format.
39692  new_path="$path"
39693
39694  windows_path="$new_path"
39695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39696    unix_path=`$CYGPATH -u "$windows_path"`
39697    new_path="$unix_path"
39698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39700    new_path="$unix_path"
39701  fi
39702
39703
39704  # Now try to locate executable using which
39705  new_path=`$WHICH "$new_path" 2> /dev/null`
39706
39707  if test "x$new_path" = x; then
39708    # Oops. Which didn't find the executable.
39709    # The splitting of arguments from the executable at a space might have been incorrect,
39710    # since paths with space are more likely in Windows. Give it another try with the whole
39711    # argument.
39712    path="$complete"
39713    arguments="EOL"
39714    new_path="$path"
39715
39716  windows_path="$new_path"
39717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39718    unix_path=`$CYGPATH -u "$windows_path"`
39719    new_path="$unix_path"
39720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39722    new_path="$unix_path"
39723  fi
39724
39725
39726    new_path=`$WHICH "$new_path" 2> /dev/null`
39727    # bat and cmd files are not always considered executable in MSYS causing which
39728    # to not find them
39729    if test "x$new_path" = x \
39730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39732      new_path="$path"
39733
39734  windows_path="$new_path"
39735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39736    unix_path=`$CYGPATH -u "$windows_path"`
39737    new_path="$unix_path"
39738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39740    new_path="$unix_path"
39741  fi
39742
39743    fi
39744
39745    if test "x$new_path" = x; then
39746      # It's still not found. Now this is an unrecoverable error.
39747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39748$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39749      has_space=`$ECHO "$complete" | $GREP " "`
39750      if test "x$has_space" != x; then
39751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39753      fi
39754      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39755    fi
39756  fi
39757
39758  # Now new_path has a complete unix path to the binary
39759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39760    # Keep paths in /bin as-is, but remove trailing .exe if any
39761    new_path="${new_path/%.exe/}"
39762    # Do not save /bin paths to all_fixpath_prefixes!
39763  else
39764    # Not in mixed or Windows style, start by that.
39765    new_path=`cmd //c echo $new_path`
39766
39767  input_path="$new_path"
39768  # Check if we need to convert this using DOS-style short mode. If the path
39769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39770  # take no chances and rewrite it.
39771  # Note: m4 eats our [], so we need to use [ and ] instead.
39772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39773  if test "x$has_forbidden_chars" != x; then
39774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39776  fi
39777
39778    # Output is in $new_path
39779
39780  windows_path="$new_path"
39781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39782    unix_path=`$CYGPATH -u "$windows_path"`
39783    new_path="$unix_path"
39784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39786    new_path="$unix_path"
39787  fi
39788
39789    # remove trailing .exe if any
39790    new_path="${new_path/%.exe/}"
39791
39792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39794  fi
39795
39796  else
39797    # We're on a posix platform. Hooray! :)
39798    # First separate the path from the arguments. This will split at the first
39799    # space.
39800    complete="$BUILD_CC"
39801    path="${complete%% *}"
39802    tmp="$complete EOL"
39803    arguments="${tmp#* }"
39804
39805    # Cannot rely on the command "which" here since it doesn't always work.
39806    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39807    if test -z "$is_absolute_path"; then
39808      # Path to executable is not absolute. Find it.
39809      IFS_save="$IFS"
39810      IFS=:
39811      for p in $PATH; do
39812        if test -f "$p/$path" && test -x "$p/$path"; then
39813          new_path="$p/$path"
39814          break
39815        fi
39816      done
39817      IFS="$IFS_save"
39818    else
39819      # This is an absolute path, we can use it without further modifications.
39820      new_path="$path"
39821    fi
39822
39823    if test "x$new_path" = x; then
39824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39825$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39826      has_space=`$ECHO "$complete" | $GREP " "`
39827      if test "x$has_space" != x; then
39828        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39830      fi
39831      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39832    fi
39833  fi
39834
39835  # Now join together the path and the arguments once again
39836  if test "x$arguments" != xEOL; then
39837    new_complete="$new_path ${arguments% *}"
39838  else
39839    new_complete="$new_path"
39840  fi
39841
39842  if test "x$complete" != "x$new_complete"; then
39843    BUILD_CC="$new_complete"
39844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39845$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39846  fi
39847
39848
39849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39850
39851  # First separate the path from the arguments. This will split at the first
39852  # space.
39853  complete="$BUILD_CXX"
39854  path="${complete%% *}"
39855  tmp="$complete EOL"
39856  arguments="${tmp#* }"
39857
39858  # Input might be given as Windows format, start by converting to
39859  # unix format.
39860  new_path=`$CYGPATH -u "$path"`
39861
39862  # Now try to locate executable using which
39863  new_path=`$WHICH "$new_path" 2> /dev/null`
39864  # bat and cmd files are not always considered executable in cygwin causing which
39865  # to not find them
39866  if test "x$new_path" = x \
39867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39869    new_path=`$CYGPATH -u "$path"`
39870  fi
39871  if test "x$new_path" = x; then
39872    # Oops. Which didn't find the executable.
39873    # The splitting of arguments from the executable at a space might have been incorrect,
39874    # since paths with space are more likely in Windows. Give it another try with the whole
39875    # argument.
39876    path="$complete"
39877    arguments="EOL"
39878    new_path=`$CYGPATH -u "$path"`
39879    new_path=`$WHICH "$new_path" 2> /dev/null`
39880    # bat and cmd files are not always considered executable in cygwin causing which
39881    # to not find them
39882    if test "x$new_path" = x \
39883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39885      new_path=`$CYGPATH -u "$path"`
39886    fi
39887    if test "x$new_path" = x; then
39888      # It's still not found. Now this is an unrecoverable error.
39889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39890$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39891      has_space=`$ECHO "$complete" | $GREP " "`
39892      if test "x$has_space" != x; then
39893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39895      fi
39896      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39897    fi
39898  fi
39899
39900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39903  # "foo.exe" is OK but "foo" is an error.
39904  #
39905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39906  # It is also a way to make sure we got the proper file name for the real test later on.
39907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39908  if test "x$test_shortpath" = x; then
39909    # Short path failed, file does not exist as specified.
39910    # Try adding .exe or .cmd
39911    if test -f "${new_path}.exe"; then
39912      input_to_shortpath="${new_path}.exe"
39913    elif test -f "${new_path}.cmd"; then
39914      input_to_shortpath="${new_path}.cmd"
39915    else
39916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39917$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39920      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39921    fi
39922  else
39923    input_to_shortpath="$new_path"
39924  fi
39925
39926  # Call helper function which possibly converts this using DOS-style short mode.
39927  # If so, the updated path is stored in $new_path.
39928  new_path="$input_to_shortpath"
39929
39930  input_path="$input_to_shortpath"
39931  # Check if we need to convert this using DOS-style short mode. If the path
39932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39933  # take no chances and rewrite it.
39934  # Note: m4 eats our [], so we need to use [ and ] instead.
39935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39936  if test "x$has_forbidden_chars" != x; then
39937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39941      # Going to short mode and back again did indeed matter. Since short mode is
39942      # case insensitive, let's make it lowercase to improve readability.
39943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39944      # Now convert it back to Unix-style (cygpath)
39945      input_path=`$CYGPATH -u "$shortmode_path"`
39946      new_path="$input_path"
39947    fi
39948  fi
39949
39950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39951  if test "x$test_cygdrive_prefix" = x; then
39952    # As a simple fix, exclude /usr/bin since it's not a real path.
39953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39955      # a path prefixed by /cygdrive for fixpath to work.
39956      new_path="$CYGWIN_ROOT_PATH$input_path"
39957    fi
39958  fi
39959
39960  # remove trailing .exe if any
39961  new_path="${new_path/%.exe/}"
39962
39963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39964
39965  # First separate the path from the arguments. This will split at the first
39966  # space.
39967  complete="$BUILD_CXX"
39968  path="${complete%% *}"
39969  tmp="$complete EOL"
39970  arguments="${tmp#* }"
39971
39972  # Input might be given as Windows format, start by converting to
39973  # unix format.
39974  new_path="$path"
39975
39976  windows_path="$new_path"
39977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978    unix_path=`$CYGPATH -u "$windows_path"`
39979    new_path="$unix_path"
39980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982    new_path="$unix_path"
39983  fi
39984
39985
39986  # Now try to locate executable using which
39987  new_path=`$WHICH "$new_path" 2> /dev/null`
39988
39989  if test "x$new_path" = x; then
39990    # Oops. Which didn't find the executable.
39991    # The splitting of arguments from the executable at a space might have been incorrect,
39992    # since paths with space are more likely in Windows. Give it another try with the whole
39993    # argument.
39994    path="$complete"
39995    arguments="EOL"
39996    new_path="$path"
39997
39998  windows_path="$new_path"
39999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40000    unix_path=`$CYGPATH -u "$windows_path"`
40001    new_path="$unix_path"
40002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40004    new_path="$unix_path"
40005  fi
40006
40007
40008    new_path=`$WHICH "$new_path" 2> /dev/null`
40009    # bat and cmd files are not always considered executable in MSYS causing which
40010    # to not find them
40011    if test "x$new_path" = x \
40012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40014      new_path="$path"
40015
40016  windows_path="$new_path"
40017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40018    unix_path=`$CYGPATH -u "$windows_path"`
40019    new_path="$unix_path"
40020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40022    new_path="$unix_path"
40023  fi
40024
40025    fi
40026
40027    if test "x$new_path" = x; then
40028      # It's still not found. Now this is an unrecoverable error.
40029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40030$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40031      has_space=`$ECHO "$complete" | $GREP " "`
40032      if test "x$has_space" != x; then
40033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40035      fi
40036      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40037    fi
40038  fi
40039
40040  # Now new_path has a complete unix path to the binary
40041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40042    # Keep paths in /bin as-is, but remove trailing .exe if any
40043    new_path="${new_path/%.exe/}"
40044    # Do not save /bin paths to all_fixpath_prefixes!
40045  else
40046    # Not in mixed or Windows style, start by that.
40047    new_path=`cmd //c echo $new_path`
40048
40049  input_path="$new_path"
40050  # Check if we need to convert this using DOS-style short mode. If the path
40051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40052  # take no chances and rewrite it.
40053  # Note: m4 eats our [], so we need to use [ and ] instead.
40054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40055  if test "x$has_forbidden_chars" != x; then
40056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40058  fi
40059
40060    # Output is in $new_path
40061
40062  windows_path="$new_path"
40063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40064    unix_path=`$CYGPATH -u "$windows_path"`
40065    new_path="$unix_path"
40066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40068    new_path="$unix_path"
40069  fi
40070
40071    # remove trailing .exe if any
40072    new_path="${new_path/%.exe/}"
40073
40074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40076  fi
40077
40078  else
40079    # We're on a posix platform. Hooray! :)
40080    # First separate the path from the arguments. This will split at the first
40081    # space.
40082    complete="$BUILD_CXX"
40083    path="${complete%% *}"
40084    tmp="$complete EOL"
40085    arguments="${tmp#* }"
40086
40087    # Cannot rely on the command "which" here since it doesn't always work.
40088    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40089    if test -z "$is_absolute_path"; then
40090      # Path to executable is not absolute. Find it.
40091      IFS_save="$IFS"
40092      IFS=:
40093      for p in $PATH; do
40094        if test -f "$p/$path" && test -x "$p/$path"; then
40095          new_path="$p/$path"
40096          break
40097        fi
40098      done
40099      IFS="$IFS_save"
40100    else
40101      # This is an absolute path, we can use it without further modifications.
40102      new_path="$path"
40103    fi
40104
40105    if test "x$new_path" = x; then
40106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40107$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40108      has_space=`$ECHO "$complete" | $GREP " "`
40109      if test "x$has_space" != x; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40112      fi
40113      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40114    fi
40115  fi
40116
40117  # Now join together the path and the arguments once again
40118  if test "x$arguments" != xEOL; then
40119    new_complete="$new_path ${arguments% *}"
40120  else
40121    new_complete="$new_path"
40122  fi
40123
40124  if test "x$complete" != "x$new_complete"; then
40125    BUILD_CXX="$new_complete"
40126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40127$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40128  fi
40129
40130
40131
40132  # Publish this variable in the help.
40133
40134
40135  if test "x$BUILD_LD" = x; then
40136    # The variable is not set by user, try to locate tool using the code snippet
40137    for ac_prog in ld
40138do
40139  # Extract the first word of "$ac_prog", so it can be a program name with args.
40140set dummy $ac_prog; ac_word=$2
40141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40142$as_echo_n "checking for $ac_word... " >&6; }
40143if ${ac_cv_path_BUILD_LD+:} false; then :
40144  $as_echo_n "(cached) " >&6
40145else
40146  case $BUILD_LD in
40147  [\\/]* | ?:[\\/]*)
40148  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40149  ;;
40150  *)
40151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40152for as_dir in $PATH
40153do
40154  IFS=$as_save_IFS
40155  test -z "$as_dir" && as_dir=.
40156    for ac_exec_ext in '' $ac_executable_extensions; do
40157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40158    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40160    break 2
40161  fi
40162done
40163  done
40164IFS=$as_save_IFS
40165
40166  ;;
40167esac
40168fi
40169BUILD_LD=$ac_cv_path_BUILD_LD
40170if test -n "$BUILD_LD"; then
40171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40172$as_echo "$BUILD_LD" >&6; }
40173else
40174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40175$as_echo "no" >&6; }
40176fi
40177
40178
40179  test -n "$BUILD_LD" && break
40180done
40181
40182  else
40183    # The variable is set, but is it from the command line or the environment?
40184
40185    # Try to remove the string !BUILD_LD! from our list.
40186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40188      # If it failed, the variable was not from the command line. Ignore it,
40189      # but warn the user (except for BASH, which is always set by the calling BASH).
40190      if test "xBUILD_LD" != xBASH; then
40191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40192$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40193      fi
40194      # Try to locate tool using the code snippet
40195      for ac_prog in ld
40196do
40197  # Extract the first word of "$ac_prog", so it can be a program name with args.
40198set dummy $ac_prog; ac_word=$2
40199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40200$as_echo_n "checking for $ac_word... " >&6; }
40201if ${ac_cv_path_BUILD_LD+:} false; then :
40202  $as_echo_n "(cached) " >&6
40203else
40204  case $BUILD_LD in
40205  [\\/]* | ?:[\\/]*)
40206  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40207  ;;
40208  *)
40209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40210for as_dir in $PATH
40211do
40212  IFS=$as_save_IFS
40213  test -z "$as_dir" && as_dir=.
40214    for ac_exec_ext in '' $ac_executable_extensions; do
40215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40216    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40218    break 2
40219  fi
40220done
40221  done
40222IFS=$as_save_IFS
40223
40224  ;;
40225esac
40226fi
40227BUILD_LD=$ac_cv_path_BUILD_LD
40228if test -n "$BUILD_LD"; then
40229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40230$as_echo "$BUILD_LD" >&6; }
40231else
40232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40233$as_echo "no" >&6; }
40234fi
40235
40236
40237  test -n "$BUILD_LD" && break
40238done
40239
40240    else
40241      # If it succeeded, then it was overridden by the user. We will use it
40242      # for the tool.
40243
40244      # First remove it from the list of overridden variables, so we can test
40245      # for unknown variables in the end.
40246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40247
40248      # Check if the provided tool contains a complete path.
40249      tool_specified="$BUILD_LD"
40250      tool_basename="${tool_specified##*/}"
40251      if test "x$tool_basename" = "x$tool_specified"; then
40252        # A command without a complete path is provided, search $PATH.
40253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40254$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40255        # Extract the first word of "$tool_basename", so it can be a program name with args.
40256set dummy $tool_basename; ac_word=$2
40257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40258$as_echo_n "checking for $ac_word... " >&6; }
40259if ${ac_cv_path_BUILD_LD+:} false; then :
40260  $as_echo_n "(cached) " >&6
40261else
40262  case $BUILD_LD in
40263  [\\/]* | ?:[\\/]*)
40264  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40265  ;;
40266  *)
40267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40268for as_dir in $PATH
40269do
40270  IFS=$as_save_IFS
40271  test -z "$as_dir" && as_dir=.
40272    for ac_exec_ext in '' $ac_executable_extensions; do
40273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40274    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40276    break 2
40277  fi
40278done
40279  done
40280IFS=$as_save_IFS
40281
40282  ;;
40283esac
40284fi
40285BUILD_LD=$ac_cv_path_BUILD_LD
40286if test -n "$BUILD_LD"; then
40287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40288$as_echo "$BUILD_LD" >&6; }
40289else
40290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40291$as_echo "no" >&6; }
40292fi
40293
40294
40295        if test "x$BUILD_LD" = x; then
40296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40297        fi
40298      else
40299        # Otherwise we believe it is a complete path. Use it as it is.
40300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40301$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40303$as_echo_n "checking for BUILD_LD... " >&6; }
40304        if test ! -x "$tool_specified"; then
40305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40306$as_echo "not found" >&6; }
40307          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40308        fi
40309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40310$as_echo "$tool_specified" >&6; }
40311      fi
40312    fi
40313  fi
40314
40315
40316
40317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40318
40319  # First separate the path from the arguments. This will split at the first
40320  # space.
40321  complete="$BUILD_LD"
40322  path="${complete%% *}"
40323  tmp="$complete EOL"
40324  arguments="${tmp#* }"
40325
40326  # Input might be given as Windows format, start by converting to
40327  # unix format.
40328  new_path=`$CYGPATH -u "$path"`
40329
40330  # Now try to locate executable using which
40331  new_path=`$WHICH "$new_path" 2> /dev/null`
40332  # bat and cmd files are not always considered executable in cygwin causing which
40333  # to not find them
40334  if test "x$new_path" = x \
40335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40337    new_path=`$CYGPATH -u "$path"`
40338  fi
40339  if test "x$new_path" = x; then
40340    # Oops. Which didn't find the executable.
40341    # The splitting of arguments from the executable at a space might have been incorrect,
40342    # since paths with space are more likely in Windows. Give it another try with the whole
40343    # argument.
40344    path="$complete"
40345    arguments="EOL"
40346    new_path=`$CYGPATH -u "$path"`
40347    new_path=`$WHICH "$new_path" 2> /dev/null`
40348    # bat and cmd files are not always considered executable in cygwin causing which
40349    # to not find them
40350    if test "x$new_path" = x \
40351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40353      new_path=`$CYGPATH -u "$path"`
40354    fi
40355    if test "x$new_path" = x; then
40356      # It's still not found. Now this is an unrecoverable error.
40357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40358$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40359      has_space=`$ECHO "$complete" | $GREP " "`
40360      if test "x$has_space" != x; then
40361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40363      fi
40364      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40365    fi
40366  fi
40367
40368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40371  # "foo.exe" is OK but "foo" is an error.
40372  #
40373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40374  # It is also a way to make sure we got the proper file name for the real test later on.
40375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40376  if test "x$test_shortpath" = x; then
40377    # Short path failed, file does not exist as specified.
40378    # Try adding .exe or .cmd
40379    if test -f "${new_path}.exe"; then
40380      input_to_shortpath="${new_path}.exe"
40381    elif test -f "${new_path}.cmd"; then
40382      input_to_shortpath="${new_path}.cmd"
40383    else
40384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40385$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40388      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40389    fi
40390  else
40391    input_to_shortpath="$new_path"
40392  fi
40393
40394  # Call helper function which possibly converts this using DOS-style short mode.
40395  # If so, the updated path is stored in $new_path.
40396  new_path="$input_to_shortpath"
40397
40398  input_path="$input_to_shortpath"
40399  # Check if we need to convert this using DOS-style short mode. If the path
40400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40401  # take no chances and rewrite it.
40402  # Note: m4 eats our [], so we need to use [ and ] instead.
40403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40404  if test "x$has_forbidden_chars" != x; then
40405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40409      # Going to short mode and back again did indeed matter. Since short mode is
40410      # case insensitive, let's make it lowercase to improve readability.
40411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40412      # Now convert it back to Unix-style (cygpath)
40413      input_path=`$CYGPATH -u "$shortmode_path"`
40414      new_path="$input_path"
40415    fi
40416  fi
40417
40418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40419  if test "x$test_cygdrive_prefix" = x; then
40420    # As a simple fix, exclude /usr/bin since it's not a real path.
40421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40423      # a path prefixed by /cygdrive for fixpath to work.
40424      new_path="$CYGWIN_ROOT_PATH$input_path"
40425    fi
40426  fi
40427
40428  # remove trailing .exe if any
40429  new_path="${new_path/%.exe/}"
40430
40431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40432
40433  # First separate the path from the arguments. This will split at the first
40434  # space.
40435  complete="$BUILD_LD"
40436  path="${complete%% *}"
40437  tmp="$complete EOL"
40438  arguments="${tmp#* }"
40439
40440  # Input might be given as Windows format, start by converting to
40441  # unix format.
40442  new_path="$path"
40443
40444  windows_path="$new_path"
40445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40446    unix_path=`$CYGPATH -u "$windows_path"`
40447    new_path="$unix_path"
40448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40450    new_path="$unix_path"
40451  fi
40452
40453
40454  # Now try to locate executable using which
40455  new_path=`$WHICH "$new_path" 2> /dev/null`
40456
40457  if test "x$new_path" = x; then
40458    # Oops. Which didn't find the executable.
40459    # The splitting of arguments from the executable at a space might have been incorrect,
40460    # since paths with space are more likely in Windows. Give it another try with the whole
40461    # argument.
40462    path="$complete"
40463    arguments="EOL"
40464    new_path="$path"
40465
40466  windows_path="$new_path"
40467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40468    unix_path=`$CYGPATH -u "$windows_path"`
40469    new_path="$unix_path"
40470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40472    new_path="$unix_path"
40473  fi
40474
40475
40476    new_path=`$WHICH "$new_path" 2> /dev/null`
40477    # bat and cmd files are not always considered executable in MSYS causing which
40478    # to not find them
40479    if test "x$new_path" = x \
40480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40482      new_path="$path"
40483
40484  windows_path="$new_path"
40485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40486    unix_path=`$CYGPATH -u "$windows_path"`
40487    new_path="$unix_path"
40488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40490    new_path="$unix_path"
40491  fi
40492
40493    fi
40494
40495    if test "x$new_path" = x; then
40496      # It's still not found. Now this is an unrecoverable error.
40497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40498$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40499      has_space=`$ECHO "$complete" | $GREP " "`
40500      if test "x$has_space" != x; then
40501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40503      fi
40504      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40505    fi
40506  fi
40507
40508  # Now new_path has a complete unix path to the binary
40509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40510    # Keep paths in /bin as-is, but remove trailing .exe if any
40511    new_path="${new_path/%.exe/}"
40512    # Do not save /bin paths to all_fixpath_prefixes!
40513  else
40514    # Not in mixed or Windows style, start by that.
40515    new_path=`cmd //c echo $new_path`
40516
40517  input_path="$new_path"
40518  # Check if we need to convert this using DOS-style short mode. If the path
40519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40520  # take no chances and rewrite it.
40521  # Note: m4 eats our [], so we need to use [ and ] instead.
40522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40523  if test "x$has_forbidden_chars" != x; then
40524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40526  fi
40527
40528    # Output is in $new_path
40529
40530  windows_path="$new_path"
40531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40532    unix_path=`$CYGPATH -u "$windows_path"`
40533    new_path="$unix_path"
40534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40536    new_path="$unix_path"
40537  fi
40538
40539    # remove trailing .exe if any
40540    new_path="${new_path/%.exe/}"
40541
40542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40544  fi
40545
40546  else
40547    # We're on a posix platform. Hooray! :)
40548    # First separate the path from the arguments. This will split at the first
40549    # space.
40550    complete="$BUILD_LD"
40551    path="${complete%% *}"
40552    tmp="$complete EOL"
40553    arguments="${tmp#* }"
40554
40555    # Cannot rely on the command "which" here since it doesn't always work.
40556    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40557    if test -z "$is_absolute_path"; then
40558      # Path to executable is not absolute. Find it.
40559      IFS_save="$IFS"
40560      IFS=:
40561      for p in $PATH; do
40562        if test -f "$p/$path" && test -x "$p/$path"; then
40563          new_path="$p/$path"
40564          break
40565        fi
40566      done
40567      IFS="$IFS_save"
40568    else
40569      # This is an absolute path, we can use it without further modifications.
40570      new_path="$path"
40571    fi
40572
40573    if test "x$new_path" = x; then
40574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40575$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40576      has_space=`$ECHO "$complete" | $GREP " "`
40577      if test "x$has_space" != x; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40580      fi
40581      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40582    fi
40583  fi
40584
40585  # Now join together the path and the arguments once again
40586  if test "x$arguments" != xEOL; then
40587    new_complete="$new_path ${arguments% *}"
40588  else
40589    new_complete="$new_path"
40590  fi
40591
40592  if test "x$complete" != "x$new_complete"; then
40593    BUILD_LD="$new_complete"
40594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40595$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40596  fi
40597
40598  else
40599    # If we are not cross compiling, use the normal target compilers for
40600    # building the build platform executables.
40601    BUILD_CC="$CC"
40602    BUILD_CXX="$CXX"
40603    BUILD_LD="$LD"
40604  fi
40605
40606
40607  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40608    # For hotspot, we need these in Windows mixed path,
40609    # so rewrite them all. Need added .exe suffix.
40610    HOTSPOT_CXX="$CXX.exe"
40611    HOTSPOT_LD="$LD.exe"
40612    HOTSPOT_MT="$MT.exe"
40613    HOTSPOT_RC="$RC.exe"
40614
40615  unix_path="$HOTSPOT_CXX"
40616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617    windows_path=`$CYGPATH -m "$unix_path"`
40618    HOTSPOT_CXX="$windows_path"
40619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40620    windows_path=`cmd //c echo $unix_path`
40621    HOTSPOT_CXX="$windows_path"
40622  fi
40623
40624
40625  unix_path="$HOTSPOT_LD"
40626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40627    windows_path=`$CYGPATH -m "$unix_path"`
40628    HOTSPOT_LD="$windows_path"
40629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40630    windows_path=`cmd //c echo $unix_path`
40631    HOTSPOT_LD="$windows_path"
40632  fi
40633
40634
40635  unix_path="$HOTSPOT_MT"
40636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40637    windows_path=`$CYGPATH -m "$unix_path"`
40638    HOTSPOT_MT="$windows_path"
40639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40640    windows_path=`cmd //c echo $unix_path`
40641    HOTSPOT_MT="$windows_path"
40642  fi
40643
40644
40645  unix_path="$HOTSPOT_RC"
40646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40647    windows_path=`$CYGPATH -m "$unix_path"`
40648    HOTSPOT_RC="$windows_path"
40649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40650    windows_path=`cmd //c echo $unix_path`
40651    HOTSPOT_RC="$windows_path"
40652  fi
40653
40654
40655
40656  else
40657    HOTSPOT_CXX="$CXX"
40658    HOTSPOT_LD="$LD"
40659  fi
40660
40661
40662
40663  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40664    USE_CLANG=true
40665  fi
40666
40667
40668  # LDEXE is the linker to use, when creating executables. Not really used.
40669  # FIXME: These should just be removed!
40670  LDEXE="$LD"
40671  LDEXECXX="$LDCXX"
40672
40673
40674
40675
40676
40677  # The package path is used only on macosx?
40678
40679# Check whether --with-package-path was given.
40680if test "${with_package_path+set}" = set; then :
40681  withval=$with_package_path;
40682fi
40683
40684  PACKAGE_PATH="$with_package_path"
40685  if test "x$PACKAGE_PATH" = x; then
40686    if test "`uname -s`" = "Darwin"; then
40687      PACKAGE_PATH=/opt/local
40688    fi
40689
40690    if test "`uname -s`" = "FreeBSD"; then
40691      PACKAGE_PATH=/usr/local
40692    fi
40693
40694    if test "`uname -s`" = "NetBSD"; then
40695      PACKAGE_PATH=/usr/pkg
40696    fi
40697
40698    if test "`uname -s`" = "OpenBSD"; then
40699      PACKAGE_PATH=/usr/local
40700    fi
40701  fi
40702
40703
40704
40705  # On OpenBSD check to see if ld requires -z wxneeded
40706  if test "`uname -s`" = "OpenBSD"; then
40707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld requires -z wxneeded" >&5
40708$as_echo_n "checking if ld requires -z wxneeded... " >&6; }
40709    PUSHED_LDFLAGS="$LDFLAGS"
40710    LDFLAGS="$LDFLAGS -Wl,-z,wxneeded"
40711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40712/* end confdefs.h.  */
40713int main() { }
40714_ACEOF
40715if ac_fn_cxx_try_link "$LINENO"; then :
40716
40717          if $READELF -l conftest$ac_exeext | $GREP OPENBSD_WXNEED > /dev/null; then
40718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40719$as_echo "yes" >&6; }
40720            LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,wxneeded"
40721          else
40722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40723$as_echo "yes" >&6; }
40724          fi
40725
40726else
40727
40728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40729$as_echo "no" >&6; }
40730
40731fi
40732rm -f core conftest.err conftest.$ac_objext \
40733    conftest$ac_exeext conftest.$ac_ext
40734    LDFLAGS="$PUSHED_LDFLAGS"
40735  fi
40736
40737  # Check for extra potential brokenness.
40738  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40739    # On Windows, double-check that we got the right compiler.
40740    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40741    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40742    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40743      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40744        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
40745      fi
40746    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40747      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40748        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40749      fi
40750    fi
40751  fi
40752
40753  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40754    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40755    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40756    # This is later checked when setting flags.
40757  fi
40758
40759  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40760  # in executable.'
40761  USING_BROKEN_SUSE_LD=no
40762  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40764$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40765    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40766    echo "int main() { }" > main.c
40767    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40769$as_echo "no" >&6; }
40770      USING_BROKEN_SUSE_LD=no
40771    else
40772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40773$as_echo "yes" >&6; }
40774      USING_BROKEN_SUSE_LD=yes
40775    fi
40776    rm -rf version-script.map main.c
40777  fi
40778
40779
40780
40781# Setup the JTReg Regression Test Harness.
40782
40783
40784# Check whether --with-jtreg was given.
40785if test "${with_jtreg+set}" = set; then :
40786  withval=$with_jtreg;
40787else
40788  with_jtreg=no
40789fi
40790
40791
40792  if test "x$with_jtreg" = xno; then
40793    # jtreg disabled
40794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40795$as_echo_n "checking for jtreg... " >&6; }
40796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40797$as_echo "no" >&6; }
40798  else
40799    if test "x$with_jtreg" != xyes; then
40800      # with path specified.
40801      JT_HOME="$with_jtreg"
40802    fi
40803
40804    if test "x$JT_HOME" != x; then
40805      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40806$as_echo_n "checking for jtreg... " >&6; }
40807
40808      # use JT_HOME enviroment var.
40809
40810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40811
40812  # Input might be given as Windows format, start by converting to
40813  # unix format.
40814  path="$JT_HOME"
40815  new_path=`$CYGPATH -u "$path"`
40816
40817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40820  # "foo.exe" is OK but "foo" is an error.
40821  #
40822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40823  # It is also a way to make sure we got the proper file name for the real test later on.
40824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40825  if test "x$test_shortpath" = x; then
40826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40827$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40828    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40829  fi
40830
40831  # Call helper function which possibly converts this using DOS-style short mode.
40832  # If so, the updated path is stored in $new_path.
40833
40834  input_path="$new_path"
40835  # Check if we need to convert this using DOS-style short mode. If the path
40836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40837  # take no chances and rewrite it.
40838  # Note: m4 eats our [], so we need to use [ and ] instead.
40839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40840  if test "x$has_forbidden_chars" != x; then
40841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40845      # Going to short mode and back again did indeed matter. Since short mode is
40846      # case insensitive, let's make it lowercase to improve readability.
40847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40848      # Now convert it back to Unix-style (cygpath)
40849      input_path=`$CYGPATH -u "$shortmode_path"`
40850      new_path="$input_path"
40851    fi
40852  fi
40853
40854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40855  if test "x$test_cygdrive_prefix" = x; then
40856    # As a simple fix, exclude /usr/bin since it's not a real path.
40857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40859      # a path prefixed by /cygdrive for fixpath to work.
40860      new_path="$CYGWIN_ROOT_PATH$input_path"
40861    fi
40862  fi
40863
40864
40865  if test "x$path" != "x$new_path"; then
40866    JT_HOME="$new_path"
40867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40868$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40869  fi
40870
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872
40873  path="$JT_HOME"
40874  has_colon=`$ECHO $path | $GREP ^.:`
40875  new_path="$path"
40876  if test "x$has_colon" = x; then
40877    # Not in mixed or Windows style, start by that.
40878    new_path=`cmd //c echo $path`
40879  fi
40880
40881
40882  input_path="$new_path"
40883  # Check if we need to convert this using DOS-style short mode. If the path
40884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40885  # take no chances and rewrite it.
40886  # Note: m4 eats our [], so we need to use [ and ] instead.
40887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40888  if test "x$has_forbidden_chars" != x; then
40889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40891  fi
40892
40893
40894  windows_path="$new_path"
40895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40896    unix_path=`$CYGPATH -u "$windows_path"`
40897    new_path="$unix_path"
40898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40900    new_path="$unix_path"
40901  fi
40902
40903  if test "x$path" != "x$new_path"; then
40904    JT_HOME="$new_path"
40905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40906$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40907  fi
40908
40909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40911
40912  else
40913    # We're on a posix platform. Hooray! :)
40914    path="$JT_HOME"
40915    has_space=`$ECHO "$path" | $GREP " "`
40916    if test "x$has_space" != x; then
40917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40918$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40919      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40920    fi
40921
40922    # Use eval to expand a potential ~
40923    eval path="$path"
40924    if test ! -f "$path" && test ! -d "$path"; then
40925      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40926    fi
40927
40928    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40929  fi
40930
40931
40932      # jtreg win32 script works for everybody
40933      JTREGEXE="$JT_HOME/bin/jtreg"
40934
40935      if test ! -f "$JTREGEXE"; then
40936        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40937      fi
40938
40939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40940$as_echo "$JTREGEXE" >&6; }
40941    else
40942      # try to find jtreg on path
40943
40944
40945
40946  # Publish this variable in the help.
40947
40948
40949  if test "x$JTREGEXE" = x; then
40950    # The variable is not set by user, try to locate tool using the code snippet
40951    for ac_prog in jtreg
40952do
40953  # Extract the first word of "$ac_prog", so it can be a program name with args.
40954set dummy $ac_prog; ac_word=$2
40955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40956$as_echo_n "checking for $ac_word... " >&6; }
40957if ${ac_cv_path_JTREGEXE+:} false; then :
40958  $as_echo_n "(cached) " >&6
40959else
40960  case $JTREGEXE in
40961  [\\/]* | ?:[\\/]*)
40962  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40963  ;;
40964  *)
40965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40966for as_dir in $PATH
40967do
40968  IFS=$as_save_IFS
40969  test -z "$as_dir" && as_dir=.
40970    for ac_exec_ext in '' $ac_executable_extensions; do
40971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40972    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40974    break 2
40975  fi
40976done
40977  done
40978IFS=$as_save_IFS
40979
40980  ;;
40981esac
40982fi
40983JTREGEXE=$ac_cv_path_JTREGEXE
40984if test -n "$JTREGEXE"; then
40985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40986$as_echo "$JTREGEXE" >&6; }
40987else
40988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40989$as_echo "no" >&6; }
40990fi
40991
40992
40993  test -n "$JTREGEXE" && break
40994done
40995
40996  else
40997    # The variable is set, but is it from the command line or the environment?
40998
40999    # Try to remove the string !JTREGEXE! from our list.
41000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41002      # If it failed, the variable was not from the command line. Ignore it,
41003      # but warn the user (except for BASH, which is always set by the calling BASH).
41004      if test "xJTREGEXE" != xBASH; then
41005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41006$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41007      fi
41008      # Try to locate tool using the code snippet
41009      for ac_prog in jtreg
41010do
41011  # Extract the first word of "$ac_prog", so it can be a program name with args.
41012set dummy $ac_prog; ac_word=$2
41013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41014$as_echo_n "checking for $ac_word... " >&6; }
41015if ${ac_cv_path_JTREGEXE+:} false; then :
41016  $as_echo_n "(cached) " >&6
41017else
41018  case $JTREGEXE in
41019  [\\/]* | ?:[\\/]*)
41020  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41021  ;;
41022  *)
41023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41024for as_dir in $PATH
41025do
41026  IFS=$as_save_IFS
41027  test -z "$as_dir" && as_dir=.
41028    for ac_exec_ext in '' $ac_executable_extensions; do
41029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41030    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41032    break 2
41033  fi
41034done
41035  done
41036IFS=$as_save_IFS
41037
41038  ;;
41039esac
41040fi
41041JTREGEXE=$ac_cv_path_JTREGEXE
41042if test -n "$JTREGEXE"; then
41043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41044$as_echo "$JTREGEXE" >&6; }
41045else
41046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41047$as_echo "no" >&6; }
41048fi
41049
41050
41051  test -n "$JTREGEXE" && break
41052done
41053
41054    else
41055      # If it succeeded, then it was overridden by the user. We will use it
41056      # for the tool.
41057
41058      # First remove it from the list of overridden variables, so we can test
41059      # for unknown variables in the end.
41060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41061
41062      # Check if the provided tool contains a complete path.
41063      tool_specified="$JTREGEXE"
41064      tool_basename="${tool_specified##*/}"
41065      if test "x$tool_basename" = "x$tool_specified"; then
41066        # A command without a complete path is provided, search $PATH.
41067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41068$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41069        # Extract the first word of "$tool_basename", so it can be a program name with args.
41070set dummy $tool_basename; ac_word=$2
41071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072$as_echo_n "checking for $ac_word... " >&6; }
41073if ${ac_cv_path_JTREGEXE+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  case $JTREGEXE in
41077  [\\/]* | ?:[\\/]*)
41078  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41079  ;;
41080  *)
41081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41082for as_dir in $PATH
41083do
41084  IFS=$as_save_IFS
41085  test -z "$as_dir" && as_dir=.
41086    for ac_exec_ext in '' $ac_executable_extensions; do
41087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41088    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41090    break 2
41091  fi
41092done
41093  done
41094IFS=$as_save_IFS
41095
41096  ;;
41097esac
41098fi
41099JTREGEXE=$ac_cv_path_JTREGEXE
41100if test -n "$JTREGEXE"; then
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41102$as_echo "$JTREGEXE" >&6; }
41103else
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41105$as_echo "no" >&6; }
41106fi
41107
41108
41109        if test "x$JTREGEXE" = x; then
41110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41111        fi
41112      else
41113        # Otherwise we believe it is a complete path. Use it as it is.
41114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41115$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41117$as_echo_n "checking for JTREGEXE... " >&6; }
41118        if test ! -x "$tool_specified"; then
41119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41120$as_echo "not found" >&6; }
41121          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41122        fi
41123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41124$as_echo "$tool_specified" >&6; }
41125      fi
41126    fi
41127  fi
41128
41129
41130
41131  if test "x$JTREGEXE" = x; then
41132    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41133  fi
41134
41135
41136      JT_HOME="`$DIRNAME $JTREGEXE`"
41137    fi
41138  fi
41139
41140
41141
41142
41143
41144
41145  # Option used to tell the compiler whether to create 32- or 64-bit executables
41146  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41147    COMPILER_TARGET_BITS_FLAG="-q"
41148  else
41149    COMPILER_TARGET_BITS_FLAG="-m"
41150  fi
41151
41152
41153  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41154  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41155    ARFLAGS="-r"
41156  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41157    ARFLAGS="-X64"
41158  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41159    # lib.exe is used as AR to create static libraries.
41160    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41161  else
41162    ARFLAGS=""
41163  fi
41164
41165
41166  ## Setup strip.
41167  # FIXME: should this really be per platform, or should it be per toolchain type?
41168  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41169  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41170  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41171    STRIPFLAGS="-g"
41172  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41173    STRIPFLAGS="-x"
41174  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41175    STRIPFLAGS="-S"
41176  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41177    STRIPFLAGS="-X32_64"
41178  fi
41179
41180  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41181    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41182  fi
41183
41184
41185  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41186    # FIXME: break out into MCSFLAGS
41187    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41188  fi
41189
41190
41191  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41192    CC_OUT_OPTION=-Fo
41193    EXE_OUT_OPTION=-out:
41194    LD_OUT_OPTION=-out:
41195    AR_OUT_OPTION=-out:
41196  else
41197    # The option used to specify the target .o,.a or .so file.
41198    # When compiling, how to specify the to be created object file.
41199    CC_OUT_OPTION='-o$(SPACE)'
41200    # When linking, how to specify the to be created executable.
41201    EXE_OUT_OPTION='-o$(SPACE)'
41202    # When linking, how to specify the to be created dynamically linkable library.
41203    LD_OUT_OPTION='-o$(SPACE)'
41204    # When archiving, how to specify the to be create static archive for object files.
41205    AR_OUT_OPTION='rcs$(SPACE)'
41206  fi
41207
41208
41209
41210
41211
41212  # On Windows, we need to set RC flags.
41213  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41214    RC_FLAGS="-nologo -l 0x409 -r"
41215    if test "x$VARIANT" = xOPT; then
41216      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41217    fi
41218
41219    # The version variables used to create RC_FLAGS may be overridden
41220    # in a custom configure script, or possibly the command line.
41221    # Let those variables be expanded at make time in spec.gmk.
41222    # The \$ are escaped to the shell, and the $(...) variables
41223    # are evaluated by make.
41224    RC_FLAGS="$RC_FLAGS \
41225        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41226        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41227        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41228        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
41229        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41230        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41231        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(COOKED_JDK_UPDATE_VERSION),\$(COOKED_JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41232  fi
41233
41234
41235  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41236    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
41237    CCXXFLAGS="$CCXXFLAGS -nologo"
41238  fi
41239
41240  if test "x$SYSROOT" != "x"; then
41241    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41242      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41243        # Solaris Studio does not have a concept of sysroot. Instead we must
41244        # make sure the default include and lib dirs are appended to each
41245        # compile and link command line.
41246        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41247        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41248            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41249            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41250      fi
41251    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41252      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41253      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41254    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41255      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41256      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41257    fi
41258    # Propagate the sysroot args to hotspot
41259    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41260    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41261    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41262  fi
41263
41264
41265
41266
41267# FIXME: Currently we must test this after toolchain but before flags. Fix!
41268
41269# Now we can test some aspects on the target using configure macros.
41270
41271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41272$as_echo_n "checking for ANSI C header files... " >&6; }
41273if ${ac_cv_header_stdc+:} false; then :
41274  $as_echo_n "(cached) " >&6
41275else
41276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41277/* end confdefs.h.  */
41278#include <stdlib.h>
41279#include <stdarg.h>
41280#include <string.h>
41281#include <float.h>
41282
41283int
41284main ()
41285{
41286
41287  ;
41288  return 0;
41289}
41290_ACEOF
41291if ac_fn_cxx_try_compile "$LINENO"; then :
41292  ac_cv_header_stdc=yes
41293else
41294  ac_cv_header_stdc=no
41295fi
41296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41297
41298if test $ac_cv_header_stdc = yes; then
41299  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41301/* end confdefs.h.  */
41302#include <string.h>
41303
41304_ACEOF
41305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41306  $EGREP "memchr" >/dev/null 2>&1; then :
41307
41308else
41309  ac_cv_header_stdc=no
41310fi
41311rm -f conftest*
41312
41313fi
41314
41315if test $ac_cv_header_stdc = yes; then
41316  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41318/* end confdefs.h.  */
41319#include <stdlib.h>
41320
41321_ACEOF
41322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41323  $EGREP "free" >/dev/null 2>&1; then :
41324
41325else
41326  ac_cv_header_stdc=no
41327fi
41328rm -f conftest*
41329
41330fi
41331
41332if test $ac_cv_header_stdc = yes; then
41333  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41334  if test "$cross_compiling" = yes; then :
41335  :
41336else
41337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41338/* end confdefs.h.  */
41339#include <ctype.h>
41340#include <stdlib.h>
41341#if ((' ' & 0x0FF) == 0x020)
41342# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41343# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41344#else
41345# define ISLOWER(c) \
41346		   (('a' <= (c) && (c) <= 'i') \
41347		     || ('j' <= (c) && (c) <= 'r') \
41348		     || ('s' <= (c) && (c) <= 'z'))
41349# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41350#endif
41351
41352#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41353int
41354main ()
41355{
41356  int i;
41357  for (i = 0; i < 256; i++)
41358    if (XOR (islower (i), ISLOWER (i))
41359	|| toupper (i) != TOUPPER (i))
41360      return 2;
41361  return 0;
41362}
41363_ACEOF
41364if ac_fn_cxx_try_run "$LINENO"; then :
41365
41366else
41367  ac_cv_header_stdc=no
41368fi
41369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41370  conftest.$ac_objext conftest.beam conftest.$ac_ext
41371fi
41372
41373fi
41374fi
41375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41376$as_echo "$ac_cv_header_stdc" >&6; }
41377if test $ac_cv_header_stdc = yes; then
41378
41379$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41380
41381fi
41382
41383# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41384for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41385		  inttypes.h stdint.h unistd.h
41386do :
41387  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41388ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41389"
41390if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41391  cat >>confdefs.h <<_ACEOF
41392#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41393_ACEOF
41394
41395fi
41396
41397done
41398
41399
41400
41401  ###############################################################################
41402  #
41403  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41404  # (The JVM can use 32 or 64 bit Java pointers but that decision
41405  # is made at runtime.)
41406  #
41407
41408  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41409    # Always specify -m flag on Solaris
41410    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41411
41412  # When we add flags to the "official" CFLAGS etc, we need to
41413  # keep track of these additions in ADDED_CFLAGS etc. These
41414  # will later be checked to make sure only controlled additions
41415  # have been made to CFLAGS etc.
41416  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41417  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41418  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41419
41420  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41421  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41422  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41423
41424  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41425  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41426  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41427
41428  elif test "x$COMPILE_TYPE" = xreduced; then
41429    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41430      # Specify -m if running reduced on other Posix platforms
41431
41432  # When we add flags to the "official" CFLAGS etc, we need to
41433  # keep track of these additions in ADDED_CFLAGS etc. These
41434  # will later be checked to make sure only controlled additions
41435  # have been made to CFLAGS etc.
41436  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41437  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41438  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41439
41440  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41441  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41442  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41443
41444  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41445  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41446  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41447
41448    fi
41449  fi
41450
41451  # Make compilation sanity check
41452  for ac_header in stdio.h
41453do :
41454  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41455if test "x$ac_cv_header_stdio_h" = xyes; then :
41456  cat >>confdefs.h <<_ACEOF
41457#define HAVE_STDIO_H 1
41458_ACEOF
41459
41460else
41461
41462    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41463$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41464    if test "x$COMPILE_TYPE" = xreduced; then
41465      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41466$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41467    elif test "x$COMPILE_TYPE" = xcross; then
41468      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41469$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41470    fi
41471    as_fn_error $? "Cannot continue." "$LINENO" 5
41472
41473fi
41474
41475done
41476
41477
41478  # The cast to long int works around a bug in the HP C Compiler
41479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41481# This bug is HP SR number 8606223364.
41482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41483$as_echo_n "checking size of int *... " >&6; }
41484if ${ac_cv_sizeof_int_p+:} false; then :
41485  $as_echo_n "(cached) " >&6
41486else
41487  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41488
41489else
41490  if test "$ac_cv_type_int_p" = yes; then
41491     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41493as_fn_error 77 "cannot compute sizeof (int *)
41494See \`config.log' for more details" "$LINENO" 5; }
41495   else
41496     ac_cv_sizeof_int_p=0
41497   fi
41498fi
41499
41500fi
41501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41502$as_echo "$ac_cv_sizeof_int_p" >&6; }
41503
41504
41505
41506cat >>confdefs.h <<_ACEOF
41507#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41508_ACEOF
41509
41510
41511
41512  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41513  if test "x$ac_cv_sizeof_int_p" = x; then
41514    # The test failed, lets stick to the assumed value.
41515    { $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
41516$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41517  else
41518    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41519
41520    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41521      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41522      # Let's try to implicitely set the compilers target architecture and retry the test
41523      { $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
41524$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;}
41525      { $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
41526$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;}
41527
41528  # When we add flags to the "official" CFLAGS etc, we need to
41529  # keep track of these additions in ADDED_CFLAGS etc. These
41530  # will later be checked to make sure only controlled additions
41531  # have been made to CFLAGS etc.
41532  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41533  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41534  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41535
41536  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41537  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41538  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41539
41540  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41541  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41542  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41543
41544
41545      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41546      unset ac_cv_sizeof_int_p
41547      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41548      cat >>confdefs.h <<_ACEOF
41549#undef SIZEOF_INT_P
41550_ACEOF
41551
41552      # The cast to long int works around a bug in the HP C Compiler
41553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41555# This bug is HP SR number 8606223364.
41556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41557$as_echo_n "checking size of int *... " >&6; }
41558if ${ac_cv_sizeof_int_p+:} false; then :
41559  $as_echo_n "(cached) " >&6
41560else
41561  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41562
41563else
41564  if test "$ac_cv_type_int_p" = yes; then
41565     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41567as_fn_error 77 "cannot compute sizeof (int *)
41568See \`config.log' for more details" "$LINENO" 5; }
41569   else
41570     ac_cv_sizeof_int_p=0
41571   fi
41572fi
41573
41574fi
41575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41576$as_echo "$ac_cv_sizeof_int_p" >&6; }
41577
41578
41579
41580cat >>confdefs.h <<_ACEOF
41581#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41582_ACEOF
41583
41584
41585
41586      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41587
41588      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41589        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
41590      fi
41591    fi
41592  fi
41593
41594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41595$as_echo_n "checking for target address size... " >&6; }
41596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41597$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41598
41599
41600  ###############################################################################
41601  #
41602  # Is the target little of big endian?
41603  #
41604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41605$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41606if ${ac_cv_c_bigendian+:} false; then :
41607  $as_echo_n "(cached) " >&6
41608else
41609  ac_cv_c_bigendian=unknown
41610    # See if we're dealing with a universal compiler.
41611    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41612/* end confdefs.h.  */
41613#ifndef __APPLE_CC__
41614	       not a universal capable compiler
41615	     #endif
41616	     typedef int dummy;
41617
41618_ACEOF
41619if ac_fn_cxx_try_compile "$LINENO"; then :
41620
41621	# Check for potential -arch flags.  It is not universal unless
41622	# there are at least two -arch flags with different values.
41623	ac_arch=
41624	ac_prev=
41625	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41626	 if test -n "$ac_prev"; then
41627	   case $ac_word in
41628	     i?86 | x86_64 | ppc | ppc64)
41629	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41630		 ac_arch=$ac_word
41631	       else
41632		 ac_cv_c_bigendian=universal
41633		 break
41634	       fi
41635	       ;;
41636	   esac
41637	   ac_prev=
41638	 elif test "x$ac_word" = "x-arch"; then
41639	   ac_prev=arch
41640	 fi
41641       done
41642fi
41643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41644    if test $ac_cv_c_bigendian = unknown; then
41645      # See if sys/param.h defines the BYTE_ORDER macro.
41646      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41647/* end confdefs.h.  */
41648#include <sys/types.h>
41649	     #include <sys/param.h>
41650
41651int
41652main ()
41653{
41654#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41655		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41656		     && LITTLE_ENDIAN)
41657	      bogus endian macros
41658	     #endif
41659
41660  ;
41661  return 0;
41662}
41663_ACEOF
41664if ac_fn_cxx_try_compile "$LINENO"; then :
41665  # It does; now see whether it defined to BIG_ENDIAN or not.
41666	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41667/* end confdefs.h.  */
41668#include <sys/types.h>
41669		#include <sys/param.h>
41670
41671int
41672main ()
41673{
41674#if BYTE_ORDER != BIG_ENDIAN
41675		 not big endian
41676		#endif
41677
41678  ;
41679  return 0;
41680}
41681_ACEOF
41682if ac_fn_cxx_try_compile "$LINENO"; then :
41683  ac_cv_c_bigendian=yes
41684else
41685  ac_cv_c_bigendian=no
41686fi
41687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41688fi
41689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41690    fi
41691    if test $ac_cv_c_bigendian = unknown; then
41692      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41693      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41694/* end confdefs.h.  */
41695#include <limits.h>
41696
41697int
41698main ()
41699{
41700#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41701	      bogus endian macros
41702	     #endif
41703
41704  ;
41705  return 0;
41706}
41707_ACEOF
41708if ac_fn_cxx_try_compile "$LINENO"; then :
41709  # It does; now see whether it defined to _BIG_ENDIAN or not.
41710	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41711/* end confdefs.h.  */
41712#include <limits.h>
41713
41714int
41715main ()
41716{
41717#ifndef _BIG_ENDIAN
41718		 not big endian
41719		#endif
41720
41721  ;
41722  return 0;
41723}
41724_ACEOF
41725if ac_fn_cxx_try_compile "$LINENO"; then :
41726  ac_cv_c_bigendian=yes
41727else
41728  ac_cv_c_bigendian=no
41729fi
41730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41731fi
41732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41733    fi
41734    if test $ac_cv_c_bigendian = unknown; then
41735      # Compile a test program.
41736      if test "$cross_compiling" = yes; then :
41737  # Try to guess by grepping values from an object file.
41738	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41739/* end confdefs.h.  */
41740short int ascii_mm[] =
41741		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41742		short int ascii_ii[] =
41743		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41744		int use_ascii (int i) {
41745		  return ascii_mm[i] + ascii_ii[i];
41746		}
41747		short int ebcdic_ii[] =
41748		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41749		short int ebcdic_mm[] =
41750		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41751		int use_ebcdic (int i) {
41752		  return ebcdic_mm[i] + ebcdic_ii[i];
41753		}
41754		extern int foo;
41755
41756int
41757main ()
41758{
41759return use_ascii (foo) == use_ebcdic (foo);
41760  ;
41761  return 0;
41762}
41763_ACEOF
41764if ac_fn_cxx_try_compile "$LINENO"; then :
41765  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41766	      ac_cv_c_bigendian=yes
41767	    fi
41768	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41769	      if test "$ac_cv_c_bigendian" = unknown; then
41770		ac_cv_c_bigendian=no
41771	      else
41772		# finding both strings is unlikely to happen, but who knows?
41773		ac_cv_c_bigendian=unknown
41774	      fi
41775	    fi
41776fi
41777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41778else
41779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41780/* end confdefs.h.  */
41781$ac_includes_default
41782int
41783main ()
41784{
41785
41786	     /* Are we little or big endian?  From Harbison&Steele.  */
41787	     union
41788	     {
41789	       long int l;
41790	       char c[sizeof (long int)];
41791	     } u;
41792	     u.l = 1;
41793	     return u.c[sizeof (long int) - 1] == 1;
41794
41795  ;
41796  return 0;
41797}
41798_ACEOF
41799if ac_fn_cxx_try_run "$LINENO"; then :
41800  ac_cv_c_bigendian=no
41801else
41802  ac_cv_c_bigendian=yes
41803fi
41804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41805  conftest.$ac_objext conftest.beam conftest.$ac_ext
41806fi
41807
41808    fi
41809fi
41810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41811$as_echo "$ac_cv_c_bigendian" >&6; }
41812 case $ac_cv_c_bigendian in #(
41813   yes)
41814     ENDIAN="big";; #(
41815   no)
41816     ENDIAN="little" ;; #(
41817   universal)
41818     ENDIAN="universal_endianness"
41819     ;; #(
41820   *)
41821     ENDIAN="unknown" ;;
41822 esac
41823
41824
41825  if test "x$ENDIAN" = xuniversal_endianness; then
41826    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41827  fi
41828  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41829    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
41830  fi
41831
41832
41833# Configure flags for the tools
41834
41835  ###############################################################################
41836  #
41837  # How to compile shared libraries.
41838  #
41839
41840  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
41841    PICFLAG="-fPIC"
41842    PIEFLAG="-fPIE"
41843    C_FLAG_REORDER=''
41844    CXX_FLAG_REORDER=''
41845
41846    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41847      # Linking is different on MacOSX
41848      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41849      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41850      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41851      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41852      SET_SHARED_LIBRARY_MAPFILE=''
41853    else
41854      # Default works for linux, might work on other platforms as well.
41855      SHARED_LIBRARY_FLAGS='-shared'
41856      SET_EXECUTABLE_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41857      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41858      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41859      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41860    fi
41861  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41862    PICFLAG=''
41863    C_FLAG_REORDER=''
41864    CXX_FLAG_REORDER=''
41865
41866    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41867      # Linking is different on MacOSX
41868      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41869      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41870      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41871      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41872      SET_SHARED_LIBRARY_MAPFILE=''
41873    else
41874      # Default works for linux, might work on other platforms as well.
41875      SHARED_LIBRARY_FLAGS='-shared'
41876      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41877      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41878      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41879      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41880    fi
41881  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41882    PICFLAG="-KPIC"
41883    PIEFLAG=""
41884    C_FLAG_REORDER='-xF'
41885    CXX_FLAG_REORDER='-xF'
41886    SHARED_LIBRARY_FLAGS="-G"
41887    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41888    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41889    SET_SHARED_LIBRARY_NAME=''
41890    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41891  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41892    PICFLAG="-qpic=large"
41893    PIEFLAG=""
41894    C_FLAG_REORDER=''
41895    CXX_FLAG_REORDER=''
41896    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41897    SET_EXECUTABLE_ORIGIN=""
41898    SET_SHARED_LIBRARY_ORIGIN=''
41899    SET_SHARED_LIBRARY_NAME=''
41900    SET_SHARED_LIBRARY_MAPFILE=''
41901  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41902    PICFLAG=""
41903    PIEFLAG=""
41904    C_FLAG_REORDER=''
41905    CXX_FLAG_REORDER=''
41906    SHARED_LIBRARY_FLAGS="-LD"
41907    SET_EXECUTABLE_ORIGIN=''
41908    SET_SHARED_LIBRARY_ORIGIN=''
41909    SET_SHARED_LIBRARY_NAME=''
41910    SET_SHARED_LIBRARY_MAPFILE=''
41911  fi
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41922    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41923    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41924    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41925  fi
41926  # The (cross) compiler is now configured, we can now test capabilities
41927  # of the target platform.
41928
41929
41930
41931  ###############################################################################
41932  #
41933  # Setup the opt flags for different compilers
41934  # and different operating systems.
41935  #
41936
41937  # FIXME: this was indirectly the old default, but just inherited.
41938  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41939  #   C_FLAG_DEPS="-MMD -MF"
41940  # fi
41941
41942  # Generate make dependency files
41943  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
41944    C_FLAG_DEPS="-MMD -MF"
41945  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41946    C_FLAG_DEPS="-MMD -MF"
41947  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41948    C_FLAG_DEPS="-xMMD -xMF"
41949  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41950    C_FLAG_DEPS="-qmakedep=gcc -MF"
41951  fi
41952  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41953
41954
41955
41956  # Debug symbols
41957  #
41958  # By default don't set any specific assembler debug
41959  # info flags for toolchains unless we know they work.
41960  # See JDK-8207057.
41961  ASFLAGS_DEBUG_SYMBOLS=""
41962  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
41963    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41964      CFLAGS_DEBUG_SYMBOLS="-g1"
41965      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41966    else
41967      CFLAGS_DEBUG_SYMBOLS="-g"
41968      CXXFLAGS_DEBUG_SYMBOLS="-g"
41969    fi
41970    ASFLAGS_DEBUG_SYMBOLS="-g"
41971  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41972    CFLAGS_DEBUG_SYMBOLS="-g"
41973    CXXFLAGS_DEBUG_SYMBOLS="-g"
41974  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41975    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41976    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41977  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41978    CFLAGS_DEBUG_SYMBOLS="-g"
41979    CXXFLAGS_DEBUG_SYMBOLS="-g"
41980  fi
41981
41982
41983
41984
41985  # Optimization levels
41986  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41987    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41988
41989    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41990      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41991      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41992      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41993      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41994      C_O_FLAG_NONE="-xregs=no%frameptr"
41995      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41996      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41997      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41998      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41999      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42000        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42001        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42002      fi
42003    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42004      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42005      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42006      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42007      C_O_FLAG_NONE=""
42008      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42009      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42010      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42011      CXX_O_FLAG_NONE=""
42012    fi
42013  else
42014    # The remaining toolchains share opt flags between CC and CXX;
42015    # setup for C and duplicate afterwards.
42016    if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42017      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42018        # On MacOSX we optimize for size, something
42019        # we should do for all platforms?
42020        C_O_FLAG_HIGHEST="-Os"
42021        C_O_FLAG_HI="-Os"
42022        C_O_FLAG_NORM="-Os"
42023        C_O_FLAG_NONE=""
42024      else
42025        C_O_FLAG_HIGHEST="-O3"
42026        C_O_FLAG_HI="-O3"
42027        C_O_FLAG_NORM="-O2"
42028        C_O_FLAG_NONE="-O0"
42029      fi
42030    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42031      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42032        # On MacOSX we optimize for size, something
42033        # we should do for all platforms?
42034        C_O_FLAG_HIGHEST="-Os"
42035        C_O_FLAG_HI="-Os"
42036        C_O_FLAG_NORM="-Os"
42037        C_O_FLAG_NONE=""
42038      else
42039        C_O_FLAG_HIGHEST="-O3"
42040        C_O_FLAG_HI="-O3"
42041        C_O_FLAG_NORM="-O2"
42042        C_O_FLAG_NONE="-O0"
42043      fi
42044    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42045      C_O_FLAG_HIGHEST="-O3"
42046      C_O_FLAG_HI="-O3 -qstrict"
42047      C_O_FLAG_NORM="-O2"
42048      C_O_FLAG_NONE=""
42049    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42050      C_O_FLAG_HIGHEST="-O2"
42051      C_O_FLAG_HI="-O1"
42052      C_O_FLAG_NORM="-O1"
42053      C_O_FLAG_NONE="-Od"
42054    fi
42055    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42056    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42057    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42058    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42059  fi
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071  # Special extras...
42072  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42073    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42074      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42075      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42076    fi
42077  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42078    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42079    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42080    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42081  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42082    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
42083    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
42084    if test "x$OPENJDK_TARGET_OS" != xmacosx; then
42085      LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
42086      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro"
42087    fi
42088    CXXSTD_CXXFLAG="-std=gnu++98"
42089
42090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
42091$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
42092  supports=yes
42093
42094  saved_cxxflags="$CXXFLAGS"
42095  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
42096  ac_ext=cpp
42097ac_cpp='$CXXCPP $CPPFLAGS'
42098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42101
42102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42103/* end confdefs.h.  */
42104int i;
42105_ACEOF
42106if ac_fn_cxx_try_compile "$LINENO"; then :
42107
42108else
42109  supports=no
42110fi
42111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42112  ac_ext=cpp
42113ac_cpp='$CXXCPP $CPPFLAGS'
42114ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42115ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42116ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42117
42118  CXXFLAGS="$saved_cxxflags"
42119
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42121$as_echo "$supports" >&6; }
42122  if test "x$supports" = "xyes" ; then
42123    :
42124  else
42125    CXXSTD_CXXFLAG=""
42126  fi
42127
42128    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
42129    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
42130
42131  fi
42132
42133  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42135$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42136  fi
42137
42138  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42139    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42140$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42141  fi
42142
42143  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42145$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42146  fi
42147
42148
42149  if test "x$ASFLAGS" != "x"; then
42150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring ASFLAGS($ASFLAGS) found in environment. Use --with-extra-asflags" >&5
42151$as_echo "$as_me: WARNING: Ignoring ASFLAGS($ASFLAGS) found in environment. Use --with-extra-asflags" >&2;}
42152  fi
42153
42154
42155# Check whether --with-extra-cflags was given.
42156if test "${with_extra_cflags+set}" = set; then :
42157  withval=$with_extra_cflags;
42158fi
42159
42160
42161
42162# Check whether --with-extra-cxxflags was given.
42163if test "${with_extra_cxxflags+set}" = set; then :
42164  withval=$with_extra_cxxflags;
42165fi
42166
42167
42168
42169# Check whether --with-extra-ldflags was given.
42170if test "${with_extra_ldflags+set}" = set; then :
42171  withval=$with_extra_ldflags;
42172fi
42173
42174
42175
42176# Check whether --with-extra-asflags was given.
42177if test "${with_extra_asflags+set}" = set; then :
42178  withval=$with_extra_asflags;
42179fi
42180
42181
42182  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42183  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42184  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42185
42186  # Hotspot needs these set in their legacy form
42187  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42188  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42189  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42190  LEGACY_EXTRA_ASFLAGS="$with_extra_asflags"
42191
42192
42193
42194
42195
42196
42197  ###############################################################################
42198  #
42199  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42200  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42201  #
42202
42203  FDLIBM_CFLAGS=""
42204  # Setup compiler/platform specific flags to CFLAGS_JDK,
42205  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
42206  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42207    # these options are used for both C and C++ compiles
42208    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42209        -pipe -fstack-protector -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42210    case $OPENJDK_TARGET_CPU_ARCH in
42211      arm )
42212        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42213        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42214        ;;
42215      ppc )
42216        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
42217        ;;
42218      * )
42219        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
42220        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42221        ;;
42222    esac
42223
42224  REFERENCE_VERSION=6
42225
42226  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
42227    as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
42228  fi
42229
42230  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
42231    as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
42232  fi
42233
42234  # Version comparison method inspired by http://stackoverflow.com/a/24067243
42235  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
42236
42237  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
42238
42239  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
42240  # runs afoul of the more aggressive versions of these optimisations.
42241  # Notably, value range propagation now assumes that the this pointer of C++
42242  # member functions is non-null.
42243  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
42244
42245
42246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42247$as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42248  supports=yes
42249
42250  saved_cflags="$CFLAGS"
42251  CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
42252  ac_ext=c
42253ac_cpp='$CPP $CPPFLAGS'
42254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42256ac_compiler_gnu=$ac_cv_c_compiler_gnu
42257
42258
42259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42260/* end confdefs.h.  */
42261int i;
42262_ACEOF
42263if ac_fn_c_try_compile "$LINENO"; then :
42264
42265else
42266  supports=no
42267fi
42268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42269  ac_ext=cpp
42270ac_cpp='$CXXCPP $CPPFLAGS'
42271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42274
42275  CFLAGS="$saved_cflags"
42276
42277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42278$as_echo "$supports" >&6; }
42279  if test "x$supports" = "xyes" ; then
42280    C_COMP_SUPPORTS="yes"
42281  else
42282    C_COMP_SUPPORTS="no"
42283  fi
42284
42285
42286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42287$as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42288  supports=yes
42289
42290  saved_cxxflags="$CXXFLAGS"
42291  CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
42292  ac_ext=cpp
42293ac_cpp='$CXXCPP $CPPFLAGS'
42294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42297
42298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42299/* end confdefs.h.  */
42300int i;
42301_ACEOF
42302if ac_fn_cxx_try_compile "$LINENO"; then :
42303
42304else
42305  supports=no
42306fi
42307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42308  ac_ext=cpp
42309ac_cpp='$CXXCPP $CPPFLAGS'
42310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42313
42314  CXXFLAGS="$saved_cxxflags"
42315
42316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42317$as_echo "$supports" >&6; }
42318  if test "x$supports" = "xyes" ; then
42319    CXX_COMP_SUPPORTS="yes"
42320  else
42321    CXX_COMP_SUPPORTS="no"
42322  fi
42323
42324
42325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42326$as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42327  supports=no
42328  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42329
42330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42331$as_echo "$supports" >&6; }
42332  if test "x$supports" = "xyes" ; then
42333    :
42334  else
42335    NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
42336  fi
42337
42338
42339  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
42340
42341
42342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42343$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42344  supports=yes
42345
42346  saved_cflags="$CFLAGS"
42347  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
42348  ac_ext=c
42349ac_cpp='$CPP $CPPFLAGS'
42350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42352ac_compiler_gnu=$ac_cv_c_compiler_gnu
42353
42354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42355/* end confdefs.h.  */
42356int i;
42357_ACEOF
42358if ac_fn_c_try_compile "$LINENO"; then :
42359
42360else
42361  supports=no
42362fi
42363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42364  ac_ext=cpp
42365ac_cpp='$CXXCPP $CPPFLAGS'
42366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42369
42370  CFLAGS="$saved_cflags"
42371
42372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42373$as_echo "$supports" >&6; }
42374  if test "x$supports" = "xyes" ; then
42375    C_COMP_SUPPORTS="yes"
42376  else
42377    C_COMP_SUPPORTS="no"
42378  fi
42379
42380
42381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42382$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42383  supports=yes
42384
42385  saved_cxxflags="$CXXFLAGS"
42386  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
42387  ac_ext=cpp
42388ac_cpp='$CXXCPP $CPPFLAGS'
42389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42392
42393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42394/* end confdefs.h.  */
42395int i;
42396_ACEOF
42397if ac_fn_cxx_try_compile "$LINENO"; then :
42398
42399else
42400  supports=no
42401fi
42402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42403  ac_ext=cpp
42404ac_cpp='$CXXCPP $CPPFLAGS'
42405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42408
42409  CXXFLAGS="$saved_cxxflags"
42410
42411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42412$as_echo "$supports" >&6; }
42413  if test "x$supports" = "xyes" ; then
42414    CXX_COMP_SUPPORTS="yes"
42415  else
42416    CXX_COMP_SUPPORTS="no"
42417  fi
42418
42419
42420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42421$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42422  supports=no
42423  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42424
42425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42426$as_echo "$supports" >&6; }
42427  if test "x$supports" = "xyes" ; then
42428    :
42429  else
42430    NO_LIFETIME_DSE_CFLAG=""
42431  fi
42432
42433  CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
42434
42435
42436
42437  else
42438    :
42439  fi
42440
42441    # Check that the compiler supports -Wformat-overflow flag
42442    # Set USE_FORMAT_OVERFLOW to 1 if it does.
42443
42444
42445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wformat-overflow -Werror\"" >&5
42446$as_echo_n "checking if the C compiler supports \"-Wformat-overflow -Werror\"... " >&6; }
42447  supports=yes
42448
42449  saved_cflags="$CFLAGS"
42450  CFLAGS="$CFLAGS -Wformat-overflow -Werror"
42451  ac_ext=c
42452ac_cpp='$CPP $CPPFLAGS'
42453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42455ac_compiler_gnu=$ac_cv_c_compiler_gnu
42456
42457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42458/* end confdefs.h.  */
42459int i;
42460_ACEOF
42461if ac_fn_c_try_compile "$LINENO"; then :
42462
42463else
42464  supports=no
42465fi
42466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42467  ac_ext=cpp
42468ac_cpp='$CXXCPP $CPPFLAGS'
42469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42472
42473  CFLAGS="$saved_cflags"
42474
42475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42476$as_echo "$supports" >&6; }
42477  if test "x$supports" = "xyes" ; then
42478    C_COMP_SUPPORTS="yes"
42479  else
42480    C_COMP_SUPPORTS="no"
42481  fi
42482
42483
42484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wformat-overflow -Werror\"" >&5
42485$as_echo_n "checking if the C++ compiler supports \"-Wformat-overflow -Werror\"... " >&6; }
42486  supports=yes
42487
42488  saved_cxxflags="$CXXFLAGS"
42489  CXXFLAGS="$CXXFLAG -Wformat-overflow -Werror"
42490  ac_ext=cpp
42491ac_cpp='$CXXCPP $CPPFLAGS'
42492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42495
42496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42497/* end confdefs.h.  */
42498int i;
42499_ACEOF
42500if ac_fn_cxx_try_compile "$LINENO"; then :
42501
42502else
42503  supports=no
42504fi
42505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42506  ac_ext=cpp
42507ac_cpp='$CXXCPP $CPPFLAGS'
42508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42511
42512  CXXFLAGS="$saved_cxxflags"
42513
42514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42515$as_echo "$supports" >&6; }
42516  if test "x$supports" = "xyes" ; then
42517    CXX_COMP_SUPPORTS="yes"
42518  else
42519    CXX_COMP_SUPPORTS="no"
42520  fi
42521
42522
42523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wformat-overflow -Werror\"" >&5
42524$as_echo_n "checking if both compilers support \"-Wformat-overflow -Werror\"... " >&6; }
42525  supports=no
42526  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42527
42528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42529$as_echo "$supports" >&6; }
42530  if test "x$supports" = "xyes" ; then
42531    USE_FORMAT_OVERFLOW="1"
42532  else
42533    USE_FORMAT_OVERFLOW="0"
42534  fi
42535
42536
42537
42538    # Check that the compiler supports -ffp-contract=off flag
42539    # Set FDLIBM_CFLAGS to -ffp-contract=off if it does.
42540    # For GCC < 4.6, on x86, x86_64 and ppc check for
42541    # -mno-fused-madd and -fno-strict-aliasing. If they exist,
42542    # use them as a substitute for -ffp-contract=off.
42543    #
42544    # These flags are required for GCC-based builds of
42545    # fdlibm with optimization without losing precision.
42546    # Notably, -ffp-contract=off needs to be added for GCC >= 4.6,
42547    #          -mno-fused-madd -fno-strict-aliasing for GCC < 4.6
42548    COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"
42549
42550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"" >&5
42551$as_echo_n "checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"... " >&6; }
42552  supports=yes
42553
42554  saved_cxxflags="$CXXFLAGS"
42555  CXXFLAGS="$CXXFLAG $COMPILER_FP_CONTRACT_OFF_FLAG -Werror"
42556  ac_ext=cpp
42557ac_cpp='$CXXCPP $CPPFLAGS'
42558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42561
42562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42563/* end confdefs.h.  */
42564int i;
42565_ACEOF
42566if ac_fn_cxx_try_compile "$LINENO"; then :
42567
42568else
42569  supports=no
42570fi
42571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42572  ac_ext=cpp
42573ac_cpp='$CXXCPP $CPPFLAGS'
42574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42577
42578  CXXFLAGS="$saved_cxxflags"
42579
42580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42581$as_echo "$supports" >&6; }
42582  if test "x$supports" = "xyes" ; then
42583    :
42584  else
42585    COMPILER_FP_CONTRACT_OFF_FLAG=""
42586  fi
42587
42588    if test "x$COMPILER_FP_CONTRACT_OFF_FLAG" = x; then
42589      if test "$OPENJDK_TARGET_CPU_ARCH" = "x86" ||
42590         test "$OPENJDK_TARGET_CPU_ARCH" = "x86_64" ||
42591         test "$OPENJDK_TARGET_CPU_ARCH" = "ppc"; then
42592        M_NO_FUSED_ADD_FLAG="-mno-fused-madd"
42593
42594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"" >&5
42595$as_echo_n "checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"... " >&6; }
42596  supports=yes
42597
42598  saved_cxxflags="$CXXFLAGS"
42599  CXXFLAGS="$CXXFLAG $M_NO_FUSED_ADD_FLAG -Werror"
42600  ac_ext=cpp
42601ac_cpp='$CXXCPP $CPPFLAGS'
42602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42605
42606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42607/* end confdefs.h.  */
42608int i;
42609_ACEOF
42610if ac_fn_cxx_try_compile "$LINENO"; then :
42611
42612else
42613  supports=no
42614fi
42615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42616  ac_ext=cpp
42617ac_cpp='$CXXCPP $CPPFLAGS'
42618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42621
42622  CXXFLAGS="$saved_cxxflags"
42623
42624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42625$as_echo "$supports" >&6; }
42626  if test "x$supports" = "xyes" ; then
42627    :
42628  else
42629    M_NO_FUSED_ADD_FLAG=""
42630  fi
42631
42632        NO_STRICT_ALIASING_FLAG="-fno-strict-aliasing"
42633
42634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"" >&5
42635$as_echo_n "checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"... " >&6; }
42636  supports=yes
42637
42638  saved_cxxflags="$CXXFLAGS"
42639  CXXFLAGS="$CXXFLAG $NO_STRICT_ALIASING_FLAG -Werror"
42640  ac_ext=cpp
42641ac_cpp='$CXXCPP $CPPFLAGS'
42642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42645
42646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42647/* end confdefs.h.  */
42648int i;
42649_ACEOF
42650if ac_fn_cxx_try_compile "$LINENO"; then :
42651
42652else
42653  supports=no
42654fi
42655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42656  ac_ext=cpp
42657ac_cpp='$CXXCPP $CPPFLAGS'
42658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42661
42662  CXXFLAGS="$saved_cxxflags"
42663
42664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42665$as_echo "$supports" >&6; }
42666  if test "x$supports" = "xyes" ; then
42667    :
42668  else
42669    NO_STRICT_ALIASING_FLAG=""
42670  fi
42671
42672        if test "x$M_NO_FUSED_ADD_FLAG" != "x" && test "x$NO_STRICT_ALIASING_FLAG" != "x"; then
42673          FDLIBM_CFLAGS="$M_NO_FUSED_ADD_FLAG $NO_STRICT_ALIASING_FLAG"
42674        fi
42675      fi
42676    else
42677      FDLIBM_CFLAGS="$COMPILER_FP_CONTRACT_OFF_FLAG"
42678    fi
42679  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42680    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42681    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42682      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42683      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42684    fi
42685
42686    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42687    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42688  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42689    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42690    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42691  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42692    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK \
42693        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42694        -DWIN32_LEAN_AND_MEAN \
42695        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42696        -DWIN32 -DIAL"
42697    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42698      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42699    else
42700      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
42701    fi
42702    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42703    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42704    # studio.
42705    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42706      CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42707          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42708    fi
42709  fi
42710
42711
42712  ###############################################################################
42713
42714  # Adjust flags according to debug level.
42715  case $DEBUG_LEVEL in
42716    fastdebug )
42717      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
42718      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
42719      C_O_FLAG_HI="$C_O_FLAG_NORM"
42720      C_O_FLAG_NORM="$C_O_FLAG_NORM"
42721      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42722      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
42723      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42724      ;;
42725    slowdebug )
42726      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
42727      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
42728      C_O_FLAG_HI="$C_O_FLAG_NONE"
42729      C_O_FLAG_NORM="$C_O_FLAG_NONE"
42730      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
42731      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
42732      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42733      ;;
42734  esac
42735
42736  # Setup LP64
42737  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
42738
42739  # Set some common defines. These works for all compilers, but assume
42740  # -D is universally accepted.
42741
42742  # Setup endianness
42743  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42744    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42745    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42746    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42747    #   Note: -Dmacro         is the same as    #define macro 1
42748    #         -Dmacro=        is the same as    #define macro
42749    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42750      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42751    else
42752      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42753    fi
42754    if test "x$OPENJDK_TARGET_OS" = xbsd; then
42755      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_LITTLE_ENDIAN"
42756    fi
42757  else
42758    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42759    # are defined in the system?
42760    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42761      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
42762    else
42763      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
42764    fi
42765    if test "x$OPENJDK_TARGET_OS" = xbsd; then
42766      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_BIG_ENDIAN"
42767    fi
42768  fi
42769  if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
42770    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
42771  fi
42772
42773  # Setup target OS define. Use OS target name but in upper case.
42774  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42775  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42776
42777  # Setup target CPU
42778  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42779
42780  # Setup debug/release defines
42781  if test "x$DEBUG_LEVEL" = xrelease; then
42782    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42783    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42784      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42785    fi
42786  else
42787    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42788  fi
42789
42790  # Setup release name
42791  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42792
42793
42794  # Set some additional per-OS defines.
42795  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42796    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42797  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42798    # FIXME: PPC64 should not be here.
42799    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
42800  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42801    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42802  fi
42803
42804  # Additional macosx handling
42805  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42806    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42807      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
42808      # FIXME: clean this up, and/or move it elsewhere.
42809
42810      # Setting these parameters makes it an error to link to macosx APIs that are
42811      # newer than the given OS version and makes the linked binaries compatible
42812      # even if built on a newer version of the OS.
42813      # The expected format is X.Y.Z
42814      MACOSX_VERSION_MIN=10.7.0
42815
42816
42817      # The macro takes the version with no dots, ex: 1070
42818      # Let the flags variables get resolved in make for easier override on make
42819      # command line.
42820      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42821      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42822    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42823      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
42824      # FIXME: clean this up, and/or move it elsewhere.
42825
42826      # Setting these parameters makes it an error to link to macosx APIs that are
42827      # newer than the given OS version and makes the linked binaries compatible
42828      # even if built on a newer version of the OS.
42829      # The expected format is X.Y.Z
42830      MACOSX_VERSION_MIN=10.9.0
42831
42832
42833      # The macro takes the version with no dots, ex: 1070
42834      # Let the flags variables get resolved in make for easier override on make
42835      # command line.
42836      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42837      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42838    fi
42839  fi
42840
42841  # Setup some hard coded includes
42842  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42843      -I${JDK_OUTPUTDIR}/include \
42844      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42845      -I${JDK_TOPDIR}/src/share/javavm/export \
42846      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42847      -I${JDK_TOPDIR}/src/share/native/common \
42848      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42849
42850  # The shared libraries are compiled using the picflag.
42851  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42852  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42853
42854  # Executable flags
42855  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK $PIEFLAG"
42856  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PIEFLAG"
42857
42858
42859
42860
42861
42862
42863  # Setup LDFLAGS et al.
42864  #
42865  # Now this is odd. The JDK native libraries have to link against libjvm.so
42866  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42867  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42868  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42869  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42870  # libraries will link to whatever is in memory. Yuck.
42871  #
42872  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42873  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42874    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42875    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42876      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42877    fi
42878    # TODO: make -debug optional "--disable-full-debug-symbols"
42879    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42880    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42881    LDFLAGS_JDKLIB_SUFFIX=""
42882    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42883      LDFLAGS_STACK_SIZE=1048576
42884    else
42885      LDFLAGS_STACK_SIZE=327680
42886    fi
42887    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42888  else
42889    if test "x$TOOLCHAIN_TYPE" = xgcc -o "x$TOOLCHAIN_TYPE" = xclang; then
42890      # If this is a --hash-style=gnu system, use --hash-style=both, why?
42891      # We have previously set HAS_GNU_HASH if this is the case
42892      if test -n "$HAS_GNU_HASH"; then
42893        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42894      fi
42895      if test "x$OPENJDK_TARGET_OS" = xlinux; then
42896        # And since we now know that the linker is gnu, then add:
42897        #   -z defs, to forbid undefined symbols in object files
42898        #   -z noexecstack, to mark stack regions as non-executable
42899        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
42900        if test "x$DEBUG_LEVEL" = "xrelease"; then
42901          # When building release libraries, tell the linker optimize them.
42902          # Should this be supplied to the OSS linker as well?
42903          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42904        fi
42905      fi
42906    fi
42907
42908    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42909      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42910      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42911    fi
42912
42913    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42914        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42915
42916    # On some platforms (mac) the linker warns about non existing -L dirs.
42917    # Add server first if available. Linking aginst client does not always produce the same results.
42918    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42919    # Default to server for other variants.
42920    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42921      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42922    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42923      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42924    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42925      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42926    else
42927      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42928    fi
42929
42930    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42931    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42932      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42933    fi
42934
42935    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42936    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42937      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42938    fi
42939    if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42940      # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
42941      # java heap.
42942      if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
42943        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
42944      fi
42945    fi
42946  fi
42947
42948
42949
42950
42951
42952
42953
42954  # Some Zero and Shark settings.
42955  # ZERO_ARCHFLAG tells the compiler which mode to build for
42956  case "${OPENJDK_TARGET_CPU}" in
42957    s390)
42958      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42959      ;;
42960    *)
42961      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42962  esac
42963
42964
42965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
42966$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42967  supports=yes
42968
42969  saved_cflags="$CFLAGS"
42970  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42971  ac_ext=c
42972ac_cpp='$CPP $CPPFLAGS'
42973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42975ac_compiler_gnu=$ac_cv_c_compiler_gnu
42976
42977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42978/* end confdefs.h.  */
42979int i;
42980_ACEOF
42981if ac_fn_c_try_compile "$LINENO"; then :
42982
42983else
42984  supports=no
42985fi
42986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42987  ac_ext=cpp
42988ac_cpp='$CXXCPP $CPPFLAGS'
42989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42992
42993  CFLAGS="$saved_cflags"
42994
42995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42996$as_echo "$supports" >&6; }
42997  if test "x$supports" = "xyes" ; then
42998    C_COMP_SUPPORTS="yes"
42999  else
43000    C_COMP_SUPPORTS="no"
43001  fi
43002
43003
43004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
43005$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43006  supports=yes
43007
43008  saved_cxxflags="$CXXFLAGS"
43009  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43010  ac_ext=cpp
43011ac_cpp='$CXXCPP $CPPFLAGS'
43012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43015
43016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43017/* end confdefs.h.  */
43018int i;
43019_ACEOF
43020if ac_fn_cxx_try_compile "$LINENO"; then :
43021
43022else
43023  supports=no
43024fi
43025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43026  ac_ext=cpp
43027ac_cpp='$CXXCPP $CPPFLAGS'
43028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43031
43032  CXXFLAGS="$saved_cxxflags"
43033
43034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43035$as_echo "$supports" >&6; }
43036  if test "x$supports" = "xyes" ; then
43037    CXX_COMP_SUPPORTS="yes"
43038  else
43039    CXX_COMP_SUPPORTS="no"
43040  fi
43041
43042
43043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
43044$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
43045  supports=no
43046  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
43047
43048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43049$as_echo "$supports" >&6; }
43050  if test "x$supports" = "xyes" ; then
43051    :
43052  else
43053    ZERO_ARCHFLAG=""
43054  fi
43055
43056
43057
43058  # Check that the compiler supports -mX (or -qX on AIX) flags
43059  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43060
43061
43062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43063$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43064  supports=yes
43065
43066  saved_cflags="$CFLAGS"
43067  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43068  ac_ext=c
43069ac_cpp='$CPP $CPPFLAGS'
43070ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43071ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43072ac_compiler_gnu=$ac_cv_c_compiler_gnu
43073
43074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43075/* end confdefs.h.  */
43076int i;
43077_ACEOF
43078if ac_fn_c_try_compile "$LINENO"; then :
43079
43080else
43081  supports=no
43082fi
43083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43084  ac_ext=cpp
43085ac_cpp='$CXXCPP $CPPFLAGS'
43086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43089
43090  CFLAGS="$saved_cflags"
43091
43092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43093$as_echo "$supports" >&6; }
43094  if test "x$supports" = "xyes" ; then
43095    C_COMP_SUPPORTS="yes"
43096  else
43097    C_COMP_SUPPORTS="no"
43098  fi
43099
43100
43101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43102$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43103  supports=yes
43104
43105  saved_cxxflags="$CXXFLAGS"
43106  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43107  ac_ext=cpp
43108ac_cpp='$CXXCPP $CPPFLAGS'
43109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43112
43113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43114/* end confdefs.h.  */
43115int i;
43116_ACEOF
43117if ac_fn_cxx_try_compile "$LINENO"; then :
43118
43119else
43120  supports=no
43121fi
43122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43123  ac_ext=cpp
43124ac_cpp='$CXXCPP $CPPFLAGS'
43125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43128
43129  CXXFLAGS="$saved_cxxflags"
43130
43131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43132$as_echo "$supports" >&6; }
43133  if test "x$supports" = "xyes" ; then
43134    CXX_COMP_SUPPORTS="yes"
43135  else
43136    CXX_COMP_SUPPORTS="no"
43137  fi
43138
43139
43140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43141$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43142  supports=no
43143  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
43144
43145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43146$as_echo "$supports" >&6; }
43147  if test "x$supports" = "xyes" ; then
43148    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43149  else
43150    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43151  fi
43152
43153
43154
43155
43156# Setup debug symbols (need objcopy from the toolchain for that)
43157
43158  # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
43159  # but if somebody does not specify it via configure, we still want to preserve old
43160  # behaviour of --disable-debug-symbols
43161  #
43162  # ENABLE_DEBUG_SYMBOLS
43163  # This must be done after the toolchain is setup, since we're looking at objcopy.
43164  #
43165  # Check whether --enable-debug-symbols was given.
43166if test "${enable_debug_symbols+set}" = set; then :
43167  enableval=$enable_debug_symbols;
43168fi
43169
43170
43171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43172$as_echo_n "checking if we should generate debug symbols... " >&6; }
43173
43174  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43175    # explicit enabling of enable-debug-symbols and can't find objcopy
43176    #   this is an error
43177    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43178  fi
43179
43180  if test "x$enable_debug_symbols" = "xyes"; then
43181    ENABLE_DEBUG_SYMBOLS=true
43182  elif test "x$enable_debug_symbols" = "xno"; then
43183    ENABLE_DEBUG_SYMBOLS=false
43184  else
43185    # Default is on if objcopy is found
43186    if test "x$OBJCOPY" != x; then
43187      ENABLE_DEBUG_SYMBOLS=true
43188    # AIX, MacOS X and Windows don't use objcopy but default is on for those OSes
43189    elif test "x$OPENJDK_TARGET_OS" = xaix || test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43190      ENABLE_DEBUG_SYMBOLS=true
43191    else
43192      ENABLE_DEBUG_SYMBOLS=false
43193    fi
43194  fi
43195
43196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43197$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43198
43199  # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
43200  # but if somebody does not specify it via configure, we still want to preserve old
43201  # behaviour of --disable-zip-debug-info.
43202  #
43203  # ZIP_DEBUGINFO_FILES
43204  #
43205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43206$as_echo_n "checking if we should zip debug-info files... " >&6; }
43207  # Check whether --enable-zip-debug-info was given.
43208if test "${enable_zip_debug_info+set}" = set; then :
43209  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43210else
43211  enable_zip_debug_info="yes"
43212fi
43213
43214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43215$as_echo "${enable_zip_debug_info}" >&6; }
43216
43217  if test "x${enable_zip_debug_info}" = "xno"; then
43218    ZIP_DEBUGINFO_FILES=false
43219  elif test "x${enable_zip_debug_info}" = "xyes"; then
43220    ZIP_DEBUGINFO_FILES=true
43221  fi
43222
43223  #
43224  # NATIVE_DEBUG_SYMBOLS
43225  # This must be done after the toolchain is setup, since we're looking at objcopy.
43226  # In addition, this must be done after ENABLE_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES
43227  # checking in order to preserve backwards compatibility post JDK-8207234.
43228  #
43229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use (this will override previous settings)" >&5
43230$as_echo_n "checking what type of native debug symbols to use (this will override previous settings)... " >&6; }
43231
43232# Check whether --with-native-debug-symbols was given.
43233if test "${with_native_debug_symbols+set}" = set; then :
43234  withval=$with_native_debug_symbols;
43235
43236else
43237
43238        # Default to unset for backwards compatibility
43239        with_native_debug_symbols=""
43240
43241fi
43242
43243  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
43244  if test "x$NATIVE_DEBUG_SYMBOLS" = x; then
43245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specified" >&5
43246$as_echo "not specified" >&6; }
43247  else
43248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
43249$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
43250  fi
43251  # Default is empty
43252  DEBUG_BINARIES=
43253  # Default is min_strip. Possible values are min_strip, all_strip, no_strip
43254  STRIP_POLICY=min_strip
43255
43256  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
43257
43258    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43259      if test "x$OBJCOPY" = x; then
43260        # enabling of enable-debug-symbols and can't find objcopy
43261        # this is an error
43262        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
43263      fi
43264    fi
43265
43266    ENABLE_DEBUG_SYMBOLS=true
43267    STRIP_POLICY=min_strip
43268    ZIP_DEBUGINFO_FILES=true
43269  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
43270    ENABLE_DEBUG_SYMBOLS=false
43271    STRIP_POLICY=min_strip
43272    ZIP_DEBUGINFO_FILES=false
43273  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
43274    ENABLE_DEBUG_SYMBOLS=true
43275    STRIP_POLICY=no_strip
43276    ZIP_DEBUGINFO_FILES=false
43277    POST_STRIP_CMD=
43278    DEBUG_BINARIES=true
43279  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
43280
43281    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43282      if test "x$OBJCOPY" = x; then
43283        # enabling of enable-debug-symbols and can't find objcopy
43284        # this is an error
43285        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
43286      fi
43287    fi
43288
43289    ENABLE_DEBUG_SYMBOLS=true
43290    STRIP_POLICY=min_strip
43291    ZIP_DEBUGINFO_FILES=false
43292  elif test "x$NATIVE_DEBUG_SYMBOLS" != x; then
43293    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
43294  else
43295    { $as_echo "$as_me:${as_lineno-$LINENO}: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&5
43296$as_echo "$as_me: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&6;}
43297  fi
43298
43299
43300
43301
43302
43303
43304
43305
43306###############################################################################
43307#
43308# Check dependencies for external and internal libraries.
43309#
43310###############################################################################
43311
43312# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43313
43314  # When using cygwin or msys, we need a wrapper binary that renames
43315  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43316  # @files and rewrites these too! This wrapper binary is
43317  # called fixpath.
43318  FIXPATH=
43319  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43321$as_echo_n "checking if fixpath can be created... " >&6; }
43322    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43323    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43324    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43325      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43326      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43327      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43328      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43329    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43330      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43331      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43332
43333      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43334      # @ was chosen as separator to minimize risk of other tools messing around with it
43335      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43336      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43337
43338      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43339    fi
43340    rm -f $OUTPUT_ROOT/fixpath*
43341    cd $OUTPUT_ROOT
43342    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43343    cd $CURDIR
43344
43345    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43347$as_echo "no" >&6; }
43348      cat $OUTPUT_ROOT/fixpath1.log
43349      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43350    fi
43351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43352$as_echo "yes" >&6; }
43353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43354$as_echo_n "checking if fixpath.exe works... " >&6; }
43355    cd $OUTPUT_ROOT
43356    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43357    cd $CURDIR
43358    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43360$as_echo "no" >&6; }
43361      cat $OUTPUT_ROOT/fixpath2.log
43362      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43363    fi
43364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43365$as_echo "yes" >&6; }
43366    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43367  fi
43368
43369
43370
43371
43372
43373
43374  ###############################################################################
43375  #
43376  # OS specific settings that we never will need to probe.
43377  #
43378  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43380$as_echo_n "checking what is not needed on Linux?... " >&6; }
43381    PULSE_NOT_NEEDED=yes
43382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43383$as_echo "pulse" >&6; }
43384  fi
43385
43386  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43388$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43389    ALSA_NOT_NEEDED=yes
43390    PULSE_NOT_NEEDED=yes
43391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43392$as_echo "alsa pulse" >&6; }
43393  fi
43394
43395  if test "x$OPENJDK_TARGET_OS" = xaix; then
43396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43397$as_echo_n "checking what is not needed on AIX?... " >&6; }
43398    ALSA_NOT_NEEDED=yes
43399    PULSE_NOT_NEEDED=yes
43400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43401$as_echo "alsa pulse" >&6; }
43402  fi
43403
43404
43405  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43407$as_echo_n "checking what is not needed on Windows?... " >&6; }
43408    CUPS_NOT_NEEDED=yes
43409    ALSA_NOT_NEEDED=yes
43410    PULSE_NOT_NEEDED=yes
43411    X11_NOT_NEEDED=yes
43412    FONTCONFIG_NOT_NEEDED=yes
43413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43414$as_echo "alsa cups pulse x11" >&6; }
43415  fi
43416
43417  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43419$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43420    ALSA_NOT_NEEDED=yes
43421    PULSE_NOT_NEEDED=yes
43422    X11_NOT_NEEDED=yes
43423    FONTCONFIG_NOT_NEEDED=yes
43424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43425$as_echo "alsa pulse x11" >&6; }
43426  fi
43427
43428  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on BSD?" >&5
43430$as_echo_n "checking what is not needed on BSD?... " >&6; }
43431    if test "x$OPENJDK_TARGET_OS_VENDOR" = xopenbsd; then
43432      ALSA_NOT_NEEDED=yes
43433      PULSE_NOT_NEEDED=yes
43434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43435$as_echo "alsa pulse" >&6; }
43436    else
43437      PULSE_NOT_NEEDED=yes
43438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43439$as_echo "pulse" >&6; }
43440    fi
43441  fi
43442
43443  if test "x$OPENJDK" = "xfalse"; then
43444    FREETYPE_NOT_NEEDED=yes
43445  fi
43446
43447  if test "x$SUPPORT_HEADFUL" = xno; then
43448    X11_NOT_NEEDED=yes
43449  fi
43450
43451  # Deprecated and now ignored
43452
43453  # Check whether --enable-macosx-runtime-support was given.
43454if test "${enable_macosx_runtime_support+set}" = set; then :
43455  enableval=$enable_macosx_runtime_support;
43456fi
43457
43458  if test "x$enable_macosx_runtime_support" != x; then
43459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
43460$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
43461  fi
43462
43463
43464
43465
43466  ###############################################################################
43467  #
43468  # Check for X Windows
43469  #
43470
43471  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43472  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43473  # --x-libraries for the sysroot, if that seems to be correct.
43474  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43475    if test "x$SYS_ROOT" != "x/"; then
43476      if test "x$x_includes" = xNONE; then
43477        if test -f "$SYS_ROOT/usr/X11R7/include/X11/Xlib.h"; then
43478          x_includes="$SYS_ROOT/usr/X11R7/include"
43479        elif test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
43480          x_includes="$SYS_ROOT/usr/X11R6/include"
43481        elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
43482          x_includes="$SYS_ROOT/usr/include"
43483        fi
43484      fi
43485      if test "x$x_libraries" = xNONE; then
43486        if test -f "$SYS_ROOT/usr/X11R7/lib/libX11.so"; then
43487          x_libraries="$SYS_ROOT/usr/X11R7/lib"
43488        elif test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
43489          x_libraries="$SYS_ROOT/usr/X11R6/lib"
43490        elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43491          x_libraries="$SYS_ROOT/usr/lib64"
43492        elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
43493          x_libraries="$SYS_ROOT/usr/lib"
43494        fi
43495      fi
43496    fi
43497  fi
43498
43499  # Now let autoconf do it's magic
43500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43501$as_echo_n "checking for X... " >&6; }
43502
43503
43504# Check whether --with-x was given.
43505if test "${with_x+set}" = set; then :
43506  withval=$with_x;
43507fi
43508
43509# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43510if test "x$with_x" = xno; then
43511  # The user explicitly disabled X.
43512  have_x=disabled
43513else
43514  case $x_includes,$x_libraries in #(
43515    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43516    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43517  $as_echo_n "(cached) " >&6
43518else
43519  # One or both of the vars are not set, and there is no cached value.
43520ac_x_includes=no ac_x_libraries=no
43521rm -f -r conftest.dir
43522if mkdir conftest.dir; then
43523  cd conftest.dir
43524  cat >Imakefile <<'_ACEOF'
43525incroot:
43526	@echo incroot='${INCROOT}'
43527usrlibdir:
43528	@echo usrlibdir='${USRLIBDIR}'
43529libdir:
43530	@echo libdir='${LIBDIR}'
43531_ACEOF
43532  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43533    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43534    for ac_var in incroot usrlibdir libdir; do
43535      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43536    done
43537    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43538    for ac_extension in a so sl dylib la dll; do
43539      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43540	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43541	ac_im_usrlibdir=$ac_im_libdir; break
43542      fi
43543    done
43544    # Screen out bogus values from the imake configuration.  They are
43545    # bogus both because they are the default anyway, and because
43546    # using them would break gcc on systems where it needs fixed includes.
43547    case $ac_im_incroot in
43548	/usr/include) ac_x_includes= ;;
43549	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43550    esac
43551    case $ac_im_usrlibdir in
43552	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43553	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43554    esac
43555  fi
43556  cd ..
43557  rm -f -r conftest.dir
43558fi
43559
43560# Standard set of common directories for X headers.
43561# Check X11 before X11Rn because it is often a symlink to the current release.
43562ac_x_header_dirs='
43563/usr/X11/include
43564/usr/X11R7/include
43565/usr/X11R6/include
43566/usr/X11R5/include
43567/usr/X11R4/include
43568
43569/usr/include/X11
43570/usr/include/X11R7
43571/usr/include/X11R6
43572/usr/include/X11R5
43573/usr/include/X11R4
43574
43575/usr/local/X11/include
43576/usr/local/X11R7/include
43577/usr/local/X11R6/include
43578/usr/local/X11R5/include
43579/usr/local/X11R4/include
43580
43581/usr/local/include/X11
43582/usr/local/include/X11R7
43583/usr/local/include/X11R6
43584/usr/local/include/X11R5
43585/usr/local/include/X11R4
43586
43587/usr/X386/include
43588/usr/x386/include
43589/usr/XFree86/include/X11
43590
43591/usr/include
43592/usr/local/include
43593/usr/unsupported/include
43594/usr/athena/include
43595/usr/local/x11r5/include
43596/usr/lpp/Xamples/include
43597
43598/usr/openwin/include
43599/usr/openwin/share/include'
43600
43601if test "$ac_x_includes" = no; then
43602  # Guess where to find include files, by looking for Xlib.h.
43603  # First, try using that file with no special directory specified.
43604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43605/* end confdefs.h.  */
43606#include <X11/Xlib.h>
43607_ACEOF
43608if ac_fn_cxx_try_cpp "$LINENO"; then :
43609  # We can compile using X headers with no special include directory.
43610ac_x_includes=
43611else
43612  for ac_dir in $ac_x_header_dirs; do
43613  if test -r "$ac_dir/X11/Xlib.h"; then
43614    ac_x_includes=$ac_dir
43615    break
43616  fi
43617done
43618fi
43619rm -f conftest.err conftest.i conftest.$ac_ext
43620fi # $ac_x_includes = no
43621
43622if test "$ac_x_libraries" = no; then
43623  # Check for the libraries.
43624  # See if we find them without any special options.
43625  # Don't add to $LIBS permanently.
43626  ac_save_LIBS=$LIBS
43627  LIBS="-lX11 $LIBS"
43628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43629/* end confdefs.h.  */
43630#include <X11/Xlib.h>
43631int
43632main ()
43633{
43634XrmInitialize ()
43635  ;
43636  return 0;
43637}
43638_ACEOF
43639if ac_fn_cxx_try_link "$LINENO"; then :
43640  LIBS=$ac_save_LIBS
43641# We can link X programs with no special library path.
43642ac_x_libraries=
43643else
43644  LIBS=$ac_save_LIBS
43645for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43646do
43647  # Don't even attempt the hair of trying to link an X program!
43648  for ac_extension in a so sl dylib la dll; do
43649    if test -r "$ac_dir/libX11.$ac_extension"; then
43650      ac_x_libraries=$ac_dir
43651      break 2
43652    fi
43653  done
43654done
43655fi
43656rm -f core conftest.err conftest.$ac_objext \
43657    conftest$ac_exeext conftest.$ac_ext
43658fi # $ac_x_libraries = no
43659
43660case $ac_x_includes,$ac_x_libraries in #(
43661  no,* | *,no | *\'*)
43662    # Didn't find X, or a directory has "'" in its name.
43663    ac_cv_have_x="have_x=no";; #(
43664  *)
43665    # Record where we found X for the cache.
43666    ac_cv_have_x="have_x=yes\
43667	ac_x_includes='$ac_x_includes'\
43668	ac_x_libraries='$ac_x_libraries'"
43669esac
43670fi
43671;; #(
43672    *) have_x=yes;;
43673  esac
43674  eval "$ac_cv_have_x"
43675fi # $with_x != no
43676
43677if test "$have_x" != yes; then
43678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43679$as_echo "$have_x" >&6; }
43680  no_x=yes
43681else
43682  # If each of the values was on the command line, it overrides each guess.
43683  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43684  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43685  # Update the cache value to reflect the command line values.
43686  ac_cv_have_x="have_x=yes\
43687	ac_x_includes='$x_includes'\
43688	ac_x_libraries='$x_libraries'"
43689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43690$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43691fi
43692
43693  if test "$no_x" = yes; then
43694  # Not all programs may use this symbol, but it does not hurt to define it.
43695
43696$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43697
43698  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43699else
43700  if test -n "$x_includes"; then
43701    X_CFLAGS="$X_CFLAGS -I$x_includes"
43702  fi
43703
43704  # It would also be nice to do this for all -L options, not just this one.
43705  if test -n "$x_libraries"; then
43706    X_LIBS="$X_LIBS -L$x_libraries"
43707    # For Solaris; some versions of Sun CC require a space after -R and
43708    # others require no space.  Words are not sufficient . . . .
43709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43710$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43711    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43712    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43713    ac_cxx_werror_flag=yes
43714    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43715/* end confdefs.h.  */
43716
43717int
43718main ()
43719{
43720
43721  ;
43722  return 0;
43723}
43724_ACEOF
43725if ac_fn_cxx_try_link "$LINENO"; then :
43726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43727$as_echo "no" >&6; }
43728       X_LIBS="$X_LIBS -R$x_libraries"
43729else
43730  LIBS="$ac_xsave_LIBS -R $x_libraries"
43731       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43732/* end confdefs.h.  */
43733
43734int
43735main ()
43736{
43737
43738  ;
43739  return 0;
43740}
43741_ACEOF
43742if ac_fn_cxx_try_link "$LINENO"; then :
43743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43744$as_echo "yes" >&6; }
43745	  X_LIBS="$X_LIBS -R $x_libraries"
43746else
43747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43748$as_echo "neither works" >&6; }
43749fi
43750rm -f core conftest.err conftest.$ac_objext \
43751    conftest$ac_exeext conftest.$ac_ext
43752fi
43753rm -f core conftest.err conftest.$ac_objext \
43754    conftest$ac_exeext conftest.$ac_ext
43755    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43756    LIBS=$ac_xsave_LIBS
43757  fi
43758
43759  # Check for system-dependent libraries X programs must link with.
43760  # Do this before checking for the system-independent R6 libraries
43761  # (-lICE), since we may need -lsocket or whatever for X linking.
43762
43763  if test "$ISC" = yes; then
43764    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43765  else
43766    # Martyn Johnson says this is needed for Ultrix, if the X
43767    # libraries were built with DECnet support.  And Karl Berry says
43768    # the Alpha needs dnet_stub (dnet does not exist).
43769    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43770    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43771/* end confdefs.h.  */
43772
43773/* Override any GCC internal prototype to avoid an error.
43774   Use char because int might match the return type of a GCC
43775   builtin and then its argument prototype would still apply.  */
43776#ifdef __cplusplus
43777extern "C"
43778#endif
43779char XOpenDisplay ();
43780int
43781main ()
43782{
43783return XOpenDisplay ();
43784  ;
43785  return 0;
43786}
43787_ACEOF
43788if ac_fn_cxx_try_link "$LINENO"; then :
43789
43790else
43791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43792$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43793if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43794  $as_echo_n "(cached) " >&6
43795else
43796  ac_check_lib_save_LIBS=$LIBS
43797LIBS="-ldnet  $LIBS"
43798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43799/* end confdefs.h.  */
43800
43801/* Override any GCC internal prototype to avoid an error.
43802   Use char because int might match the return type of a GCC
43803   builtin and then its argument prototype would still apply.  */
43804#ifdef __cplusplus
43805extern "C"
43806#endif
43807char dnet_ntoa ();
43808int
43809main ()
43810{
43811return dnet_ntoa ();
43812  ;
43813  return 0;
43814}
43815_ACEOF
43816if ac_fn_cxx_try_link "$LINENO"; then :
43817  ac_cv_lib_dnet_dnet_ntoa=yes
43818else
43819  ac_cv_lib_dnet_dnet_ntoa=no
43820fi
43821rm -f core conftest.err conftest.$ac_objext \
43822    conftest$ac_exeext conftest.$ac_ext
43823LIBS=$ac_check_lib_save_LIBS
43824fi
43825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43826$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43827if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43828  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43829fi
43830
43831    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43833$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43834if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43835  $as_echo_n "(cached) " >&6
43836else
43837  ac_check_lib_save_LIBS=$LIBS
43838LIBS="-ldnet_stub  $LIBS"
43839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43840/* end confdefs.h.  */
43841
43842/* Override any GCC internal prototype to avoid an error.
43843   Use char because int might match the return type of a GCC
43844   builtin and then its argument prototype would still apply.  */
43845#ifdef __cplusplus
43846extern "C"
43847#endif
43848char dnet_ntoa ();
43849int
43850main ()
43851{
43852return dnet_ntoa ();
43853  ;
43854  return 0;
43855}
43856_ACEOF
43857if ac_fn_cxx_try_link "$LINENO"; then :
43858  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43859else
43860  ac_cv_lib_dnet_stub_dnet_ntoa=no
43861fi
43862rm -f core conftest.err conftest.$ac_objext \
43863    conftest$ac_exeext conftest.$ac_ext
43864LIBS=$ac_check_lib_save_LIBS
43865fi
43866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43867$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43868if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43869  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43870fi
43871
43872    fi
43873fi
43874rm -f core conftest.err conftest.$ac_objext \
43875    conftest$ac_exeext conftest.$ac_ext
43876    LIBS="$ac_xsave_LIBS"
43877
43878    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43879    # to get the SysV transport functions.
43880    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43881    # needs -lnsl.
43882    # The nsl library prevents programs from opening the X display
43883    # on Irix 5.2, according to T.E. Dickey.
43884    # The functions gethostbyname, getservbyname, and inet_addr are
43885    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43886    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43887if test "x$ac_cv_func_gethostbyname" = xyes; then :
43888
43889fi
43890
43891    if test $ac_cv_func_gethostbyname = no; then
43892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43893$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43894if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43895  $as_echo_n "(cached) " >&6
43896else
43897  ac_check_lib_save_LIBS=$LIBS
43898LIBS="-lnsl  $LIBS"
43899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900/* end confdefs.h.  */
43901
43902/* Override any GCC internal prototype to avoid an error.
43903   Use char because int might match the return type of a GCC
43904   builtin and then its argument prototype would still apply.  */
43905#ifdef __cplusplus
43906extern "C"
43907#endif
43908char gethostbyname ();
43909int
43910main ()
43911{
43912return gethostbyname ();
43913  ;
43914  return 0;
43915}
43916_ACEOF
43917if ac_fn_cxx_try_link "$LINENO"; then :
43918  ac_cv_lib_nsl_gethostbyname=yes
43919else
43920  ac_cv_lib_nsl_gethostbyname=no
43921fi
43922rm -f core conftest.err conftest.$ac_objext \
43923    conftest$ac_exeext conftest.$ac_ext
43924LIBS=$ac_check_lib_save_LIBS
43925fi
43926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43927$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43928if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43929  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43930fi
43931
43932      if test $ac_cv_lib_nsl_gethostbyname = no; then
43933	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43934$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43935if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43936  $as_echo_n "(cached) " >&6
43937else
43938  ac_check_lib_save_LIBS=$LIBS
43939LIBS="-lbsd  $LIBS"
43940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43941/* end confdefs.h.  */
43942
43943/* Override any GCC internal prototype to avoid an error.
43944   Use char because int might match the return type of a GCC
43945   builtin and then its argument prototype would still apply.  */
43946#ifdef __cplusplus
43947extern "C"
43948#endif
43949char gethostbyname ();
43950int
43951main ()
43952{
43953return gethostbyname ();
43954  ;
43955  return 0;
43956}
43957_ACEOF
43958if ac_fn_cxx_try_link "$LINENO"; then :
43959  ac_cv_lib_bsd_gethostbyname=yes
43960else
43961  ac_cv_lib_bsd_gethostbyname=no
43962fi
43963rm -f core conftest.err conftest.$ac_objext \
43964    conftest$ac_exeext conftest.$ac_ext
43965LIBS=$ac_check_lib_save_LIBS
43966fi
43967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43968$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43969if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43970  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43971fi
43972
43973      fi
43974    fi
43975
43976    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43977    # socket/setsockopt and other routines are undefined under SCO ODT
43978    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43979    # on later versions), says Simon Leinen: it contains gethostby*
43980    # variants that don't use the name server (or something).  -lsocket
43981    # must be given before -lnsl if both are needed.  We assume that
43982    # if connect needs -lnsl, so does gethostbyname.
43983    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43984if test "x$ac_cv_func_connect" = xyes; then :
43985
43986fi
43987
43988    if test $ac_cv_func_connect = no; then
43989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43990$as_echo_n "checking for connect in -lsocket... " >&6; }
43991if ${ac_cv_lib_socket_connect+:} false; then :
43992  $as_echo_n "(cached) " >&6
43993else
43994  ac_check_lib_save_LIBS=$LIBS
43995LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43997/* end confdefs.h.  */
43998
43999/* Override any GCC internal prototype to avoid an error.
44000   Use char because int might match the return type of a GCC
44001   builtin and then its argument prototype would still apply.  */
44002#ifdef __cplusplus
44003extern "C"
44004#endif
44005char connect ();
44006int
44007main ()
44008{
44009return connect ();
44010  ;
44011  return 0;
44012}
44013_ACEOF
44014if ac_fn_cxx_try_link "$LINENO"; then :
44015  ac_cv_lib_socket_connect=yes
44016else
44017  ac_cv_lib_socket_connect=no
44018fi
44019rm -f core conftest.err conftest.$ac_objext \
44020    conftest$ac_exeext conftest.$ac_ext
44021LIBS=$ac_check_lib_save_LIBS
44022fi
44023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
44024$as_echo "$ac_cv_lib_socket_connect" >&6; }
44025if test "x$ac_cv_lib_socket_connect" = xyes; then :
44026  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
44027fi
44028
44029    fi
44030
44031    # Guillermo Gomez says -lposix is necessary on A/UX.
44032    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
44033if test "x$ac_cv_func_remove" = xyes; then :
44034
44035fi
44036
44037    if test $ac_cv_func_remove = no; then
44038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
44039$as_echo_n "checking for remove in -lposix... " >&6; }
44040if ${ac_cv_lib_posix_remove+:} false; then :
44041  $as_echo_n "(cached) " >&6
44042else
44043  ac_check_lib_save_LIBS=$LIBS
44044LIBS="-lposix  $LIBS"
44045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44046/* end confdefs.h.  */
44047
44048/* Override any GCC internal prototype to avoid an error.
44049   Use char because int might match the return type of a GCC
44050   builtin and then its argument prototype would still apply.  */
44051#ifdef __cplusplus
44052extern "C"
44053#endif
44054char remove ();
44055int
44056main ()
44057{
44058return remove ();
44059  ;
44060  return 0;
44061}
44062_ACEOF
44063if ac_fn_cxx_try_link "$LINENO"; then :
44064  ac_cv_lib_posix_remove=yes
44065else
44066  ac_cv_lib_posix_remove=no
44067fi
44068rm -f core conftest.err conftest.$ac_objext \
44069    conftest$ac_exeext conftest.$ac_ext
44070LIBS=$ac_check_lib_save_LIBS
44071fi
44072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44073$as_echo "$ac_cv_lib_posix_remove" >&6; }
44074if test "x$ac_cv_lib_posix_remove" = xyes; then :
44075  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44076fi
44077
44078    fi
44079
44080    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44081    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44082if test "x$ac_cv_func_shmat" = xyes; then :
44083
44084fi
44085
44086    if test $ac_cv_func_shmat = no; then
44087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44088$as_echo_n "checking for shmat in -lipc... " >&6; }
44089if ${ac_cv_lib_ipc_shmat+:} false; then :
44090  $as_echo_n "(cached) " >&6
44091else
44092  ac_check_lib_save_LIBS=$LIBS
44093LIBS="-lipc  $LIBS"
44094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44095/* end confdefs.h.  */
44096
44097/* Override any GCC internal prototype to avoid an error.
44098   Use char because int might match the return type of a GCC
44099   builtin and then its argument prototype would still apply.  */
44100#ifdef __cplusplus
44101extern "C"
44102#endif
44103char shmat ();
44104int
44105main ()
44106{
44107return shmat ();
44108  ;
44109  return 0;
44110}
44111_ACEOF
44112if ac_fn_cxx_try_link "$LINENO"; then :
44113  ac_cv_lib_ipc_shmat=yes
44114else
44115  ac_cv_lib_ipc_shmat=no
44116fi
44117rm -f core conftest.err conftest.$ac_objext \
44118    conftest$ac_exeext conftest.$ac_ext
44119LIBS=$ac_check_lib_save_LIBS
44120fi
44121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44122$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44123if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44124  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44125fi
44126
44127    fi
44128  fi
44129
44130  # Check for libraries that X11R6 Xt/Xaw programs need.
44131  ac_save_LDFLAGS=$LDFLAGS
44132  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44133  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44134  # check for ICE first), but we must link in the order -lSM -lICE or
44135  # we get undefined symbols.  So assume we have SM if we have ICE.
44136  # These have to be linked with before -lX11, unlike the other
44137  # libraries we check for below, so use a different variable.
44138  # John Interrante, Karl Berry
44139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44140$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44141if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44142  $as_echo_n "(cached) " >&6
44143else
44144  ac_check_lib_save_LIBS=$LIBS
44145LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44147/* end confdefs.h.  */
44148
44149/* Override any GCC internal prototype to avoid an error.
44150   Use char because int might match the return type of a GCC
44151   builtin and then its argument prototype would still apply.  */
44152#ifdef __cplusplus
44153extern "C"
44154#endif
44155char IceConnectionNumber ();
44156int
44157main ()
44158{
44159return IceConnectionNumber ();
44160  ;
44161  return 0;
44162}
44163_ACEOF
44164if ac_fn_cxx_try_link "$LINENO"; then :
44165  ac_cv_lib_ICE_IceConnectionNumber=yes
44166else
44167  ac_cv_lib_ICE_IceConnectionNumber=no
44168fi
44169rm -f core conftest.err conftest.$ac_objext \
44170    conftest$ac_exeext conftest.$ac_ext
44171LIBS=$ac_check_lib_save_LIBS
44172fi
44173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44174$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44175if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44176  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44177fi
44178
44179  LDFLAGS=$ac_save_LDFLAGS
44180
44181fi
44182
44183
44184  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44185  # this doesn't make sense so we remove it.
44186  if test "x$COMPILE_TYPE" = xcross; then
44187    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44188  fi
44189
44190  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
44191
44192  # Print a helpful message on how to acquire the necessary build dependency.
44193  # x11 is the help tag: freetype, cups, pulse, alsa etc
44194  MISSING_DEPENDENCY=x11
44195
44196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44197    cygwin_help $MISSING_DEPENDENCY
44198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44199    msys_help $MISSING_DEPENDENCY
44200  else
44201    PKGHANDLER_COMMAND=
44202
44203    case $PKGHANDLER in
44204      apt-get)
44205        apt_help     $MISSING_DEPENDENCY ;;
44206      yum)
44207        yum_help     $MISSING_DEPENDENCY ;;
44208      port)
44209        port_help    $MISSING_DEPENDENCY ;;
44210      pkgutil)
44211        pkgutil_help $MISSING_DEPENDENCY ;;
44212      pkgadd)
44213        pkgadd_help  $MISSING_DEPENDENCY ;;
44214    esac
44215
44216    if test "x$PKGHANDLER_COMMAND" != x; then
44217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44218    fi
44219  fi
44220
44221    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44222  fi
44223
44224
44225  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44226    OPENWIN_HOME="/usr/openwin"
44227    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44228    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44229        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44230        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44231        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44232  fi
44233
44234  #
44235  # Weird Sol10 something check...TODO change to try compile
44236  #
44237  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
44238    if test "`uname -r`" = "5.10"; then
44239      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
44240        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
44241      fi
44242    fi
44243  fi
44244
44245  ac_ext=c
44246ac_cpp='$CPP $CPPFLAGS'
44247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44249ac_compiler_gnu=$ac_cv_c_compiler_gnu
44250
44251  OLD_CFLAGS="$CFLAGS"
44252  CFLAGS="$CFLAGS $X_CFLAGS"
44253
44254  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44255  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44256do :
44257  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44258ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44259        # include <X11/Xlib.h>
44260        # include <X11/Xutil.h>
44261
44262
44263"
44264if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44265  cat >>confdefs.h <<_ACEOF
44266#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44267_ACEOF
44268 X11_A_OK=yes
44269else
44270  X11_A_OK=no; break
44271fi
44272
44273done
44274
44275
44276  CFLAGS="$OLD_CFLAGS"
44277  ac_ext=cpp
44278ac_cpp='$CXXCPP $CPPFLAGS'
44279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44282
44283
44284  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44285
44286  # Print a helpful message on how to acquire the necessary build dependency.
44287  # x11 is the help tag: freetype, cups, pulse, alsa etc
44288  MISSING_DEPENDENCY=x11
44289
44290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44291    cygwin_help $MISSING_DEPENDENCY
44292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44293    msys_help $MISSING_DEPENDENCY
44294  else
44295    PKGHANDLER_COMMAND=
44296
44297    case $PKGHANDLER in
44298      apt-get)
44299        apt_help     $MISSING_DEPENDENCY ;;
44300      yum)
44301        yum_help     $MISSING_DEPENDENCY ;;
44302      port)
44303        port_help    $MISSING_DEPENDENCY ;;
44304      pkgutil)
44305        pkgutil_help $MISSING_DEPENDENCY ;;
44306      pkgadd)
44307        pkgadd_help  $MISSING_DEPENDENCY ;;
44308    esac
44309
44310    if test "x$PKGHANDLER_COMMAND" != x; then
44311      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44312    fi
44313  fi
44314
44315    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44316  fi
44317
44318
44319
44320
44321
44322
44323  ###############################################################################
44324  #
44325  # The common unix printing system cups is used to print from java.
44326  #
44327
44328# Check whether --with-cups was given.
44329if test "${with_cups+set}" = set; then :
44330  withval=$with_cups;
44331fi
44332
44333
44334# Check whether --with-cups-include was given.
44335if test "${with_cups_include+set}" = set; then :
44336  withval=$with_cups_include;
44337fi
44338
44339
44340  if test "x$CUPS_NOT_NEEDED" = xyes; then
44341    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44342      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44343$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44344    fi
44345    CUPS_CFLAGS=
44346  else
44347    CUPS_FOUND=no
44348
44349    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44350      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44351    fi
44352
44353    if test "x${with_cups}" != x; then
44354      CUPS_CFLAGS="-I${with_cups}/include"
44355      CUPS_FOUND=yes
44356    fi
44357    if test "x${with_cups_include}" != x; then
44358      CUPS_CFLAGS="-I${with_cups_include}"
44359      CUPS_FOUND=yes
44360    fi
44361    if test "x$CUPS_FOUND" = xno; then
44362
44363
44364  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44365    # Source the builddeps file again, to make sure it uses the latest variables!
44366    . $builddepsfile
44367    # Look for a target and build machine specific resource!
44368    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44369    if test "x$resource" = x; then
44370      # Ok, lets instead look for a target specific resource
44371      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44372    fi
44373    if test "x$resource" = x; then
44374      # Ok, lets instead look for a build specific resource
44375      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44376    fi
44377    if test "x$resource" = x; then
44378      # Ok, lets instead look for a generic resource
44379      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44380      resource=${builddep_cups}
44381    fi
44382    if test "x$resource" != x; then
44383      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44384$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44385      # If the resource in the builddeps.conf file is an existing directory,
44386      # for example /java/linux/cups
44387      if test -d ${resource}; then
44388        depdir=${resource}
44389      else
44390
44391  # cups is for example mymodule
44392  # $resource is for example libs/general/libmymod_1_2_3.zip
44393  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44394  # $with_builddeps_dir is for example /localhome/builddeps
44395  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44396  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44397  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44398  filename=`basename $resource`
44399  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44400  filebase=${filename%%.*}
44401  extension=${filename#*.}
44402  installdir=$with_builddeps_dir/$filebase
44403  if test ! -f $installdir/$filename.unpacked; then
44404    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44405$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44406    if test ! -d $installdir; then
44407      mkdir -p $installdir
44408    fi
44409    if test ! -d $installdir; then
44410      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44411    fi
44412    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44413    touch $tmpfile
44414    if test ! -f $tmpfile; then
44415      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44416    fi
44417
44418  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44419  # $tmpfile is the local file name for the downloaded file.
44420  VALID_TOOL=no
44421  if test "x$BDEPS_FTP" = xwget; then
44422    VALID_TOOL=yes
44423    wget -O $tmpfile $with_builddeps_server/$resource
44424  fi
44425  if test "x$BDEPS_FTP" = xlftp; then
44426    VALID_TOOL=yes
44427    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44428  fi
44429  if test "x$BDEPS_FTP" = xftp; then
44430    VALID_TOOL=yes
44431    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44432    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44433    FTPUSERPWD=${FTPSERVER%%@*}
44434    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44435      FTPUSER=${userpwd%%:*}
44436      FTPPWD=${userpwd#*@}
44437      FTPSERVER=${FTPSERVER#*@}
44438    else
44439      FTPUSER=ftp
44440      FTPPWD=ftp
44441    fi
44442    # the "pass" command does not work on some
44443    # ftp clients (read ftp.exe) but if it works,
44444    # passive mode is better!
44445    ( \
44446        echo "user $FTPUSER $FTPPWD"        ; \
44447        echo "pass"                         ; \
44448        echo "bin"                          ; \
44449        echo "get $FTPPATH $tmpfile"              ; \
44450    ) | ftp -in $FTPSERVER
44451  fi
44452  if test "x$VALID_TOOL" != xyes; then
44453    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44454  fi
44455
44456    mv $tmpfile $installdir/$filename
44457    if test ! -s $installdir/$filename; then
44458      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44459    fi
44460    case "$extension" in
44461      zip)  echo "Unzipping $installdir/$filename..."
44462        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44463        ;;
44464      tar.gz) echo "Untaring $installdir/$filename..."
44465        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44466        ;;
44467      tgz) echo "Untaring $installdir/$filename..."
44468        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44469        ;;
44470      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44471        ;;
44472    esac
44473  fi
44474  if test -f $installdir/$filename.unpacked; then
44475    depdir=$installdir
44476  fi
44477
44478      fi
44479      # Source the builddeps file again, because in the previous command, the depdir
44480      # was updated to point at the current build dependency install directory.
44481      . $builddepsfile
44482      # Now extract variables from the builddeps.conf files.
44483      theroot=${builddep_cups_ROOT}
44484      thecflags=${builddep_cups_CFLAGS}
44485      thelibs=${builddep_cups_LIBS}
44486      if test "x$depdir" = x; then
44487        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44488      fi
44489      CUPS=$depdir
44490      if test "x$theroot" != x; then
44491        CUPS="$theroot"
44492      fi
44493      if test "x$thecflags" != x; then
44494        CUPS_CFLAGS="$thecflags"
44495      fi
44496      if test "x$thelibs" != x; then
44497        CUPS_LIBS="$thelibs"
44498      fi
44499      CUPS_FOUND=yes
44500
44501    fi
44502
44503  fi
44504
44505    fi
44506    if test "x$CUPS_FOUND" = xno; then
44507      # Are the cups headers installed in the default /usr/include location?
44508      for ac_header in cups/cups.h cups/ppd.h
44509do :
44510  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44511ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44512if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44513  cat >>confdefs.h <<_ACEOF
44514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44515_ACEOF
44516
44517            CUPS_FOUND=yes
44518            CUPS_CFLAGS=
44519            DEFAULT_CUPS=yes
44520
44521
44522fi
44523
44524done
44525
44526    fi
44527    if test "x$CUPS_FOUND" = xno; then
44528      # Getting nervous now? Lets poke around for standard Solaris third-party
44529      # package installation locations.
44530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44531$as_echo_n "checking for cups headers... " >&6; }
44532      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44533        # An SFW package seems to be installed!
44534        CUPS_FOUND=yes
44535        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44536      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44537        # A CSW package seems to be installed!
44538        CUPS_FOUND=yes
44539        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44540      elif test -s ${PACKAGE_PATH}/include/cups/cups.h; then
44541        # Standard package location for BSD
44542        CUPS_FOUND=yes
44543        CUPS_CFLAGS="-I${PACKAGE_PATH}/include"
44544      fi
44545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44546$as_echo "$CUPS_FOUND" >&6; }
44547    fi
44548    if test "x$CUPS_FOUND" = xno; then
44549
44550  # Print a helpful message on how to acquire the necessary build dependency.
44551  # cups is the help tag: freetype, cups, pulse, alsa etc
44552  MISSING_DEPENDENCY=cups
44553
44554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44555    cygwin_help $MISSING_DEPENDENCY
44556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44557    msys_help $MISSING_DEPENDENCY
44558  else
44559    PKGHANDLER_COMMAND=
44560
44561    case $PKGHANDLER in
44562      apt-get)
44563        apt_help     $MISSING_DEPENDENCY ;;
44564      yum)
44565        yum_help     $MISSING_DEPENDENCY ;;
44566      port)
44567        port_help    $MISSING_DEPENDENCY ;;
44568      pkgutil)
44569        pkgutil_help $MISSING_DEPENDENCY ;;
44570      pkgadd)
44571        pkgadd_help  $MISSING_DEPENDENCY ;;
44572    esac
44573
44574    if test "x$PKGHANDLER_COMMAND" != x; then
44575      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44576    fi
44577  fi
44578
44579      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44580    fi
44581  fi
44582
44583
44584
44585
44586
44587
44588  ###############################################################################
44589  #
44590  # The ubiquitous freetype library is used to render fonts.
44591  #
44592
44593# Check whether --with-freetype was given.
44594if test "${with_freetype+set}" = set; then :
44595  withval=$with_freetype;
44596fi
44597
44598
44599# Check whether --with-freetype-include was given.
44600if test "${with_freetype_include+set}" = set; then :
44601  withval=$with_freetype_include;
44602fi
44603
44604
44605# Check whether --with-freetype-lib was given.
44606if test "${with_freetype_lib+set}" = set; then :
44607  withval=$with_freetype_lib;
44608fi
44609
44610
44611# Check whether --with-freetype-src was given.
44612if test "${with_freetype_src+set}" = set; then :
44613  withval=$with_freetype_src;
44614fi
44615
44616  # Check whether --enable-freetype-bundling was given.
44617if test "${enable_freetype_bundling+set}" = set; then :
44618  enableval=$enable_freetype_bundling;
44619fi
44620
44621
44622  FREETYPE_CFLAGS=
44623  FREETYPE_LIBS=
44624  FREETYPE_BUNDLE_LIB_PATH=
44625
44626  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44627    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
44628      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44629$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44630    fi
44631    if test "x$enable_freetype_bundling" != x; then
44632      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44633$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44634    fi
44635  else
44636    # freetype is needed to build; go get it!
44637
44638    BUNDLE_FREETYPE="$enable_freetype_bundling"
44639
44640    if  test "x$with_freetype_src" != x; then
44641      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44642        # Try to build freetype if --with-freetype-src was given on Windows
44643
44644  FREETYPE_SRC_PATH="$with_freetype_src"
44645  BUILD_FREETYPE=yes
44646
44647  # Check if the freetype sources are acessible..
44648  if ! test -d $FREETYPE_SRC_PATH; then
44649    { $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
44650$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44651    BUILD_FREETYPE=no
44652  fi
44653  # ..and contain a vc2010 project file
44654  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44655  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44656    { $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
44657$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44658    BUILD_FREETYPE=no
44659  fi
44660  # Now check if configure found a version of 'msbuild.exe'
44661  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44663$as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44664    BUILD_FREETYPE=no
44665  fi
44666
44667  # Ready to go..
44668  if test "x$BUILD_FREETYPE" = xyes; then
44669
44670    # msbuild requires trailing slashes for output directories
44671    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44672    freetype_lib_path_unix="$freetype_lib_path"
44673    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44674
44675  unix_path="$vcxproj_path"
44676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44677    windows_path=`$CYGPATH -m "$unix_path"`
44678    vcxproj_path="$windows_path"
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680    windows_path=`cmd //c echo $unix_path`
44681    vcxproj_path="$windows_path"
44682  fi
44683
44684
44685  unix_path="$freetype_lib_path"
44686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44687    windows_path=`$CYGPATH -m "$unix_path"`
44688    freetype_lib_path="$windows_path"
44689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44690    windows_path=`cmd //c echo $unix_path`
44691    freetype_lib_path="$windows_path"
44692  fi
44693
44694
44695  unix_path="$freetype_obj_path"
44696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44697    windows_path=`$CYGPATH -m "$unix_path"`
44698    freetype_obj_path="$windows_path"
44699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44700    windows_path=`cmd //c echo $unix_path`
44701    freetype_obj_path="$windows_path"
44702  fi
44703
44704    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44705      freetype_platform=x64
44706    else
44707      freetype_platform=win32
44708    fi
44709
44710    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44711    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44712    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44713    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44714    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44715$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44716
44717    # First we try to build the freetype.dll
44718    $ECHO -e "@echo off\n"\
44719	     "$MSBUILD $vcxproj_path "\
44720		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44721		       "/p:Configuration=\"Release Multithreaded\" "\
44722		       "/p:Platform=$freetype_platform "\
44723		       "/p:ConfigurationType=DynamicLibrary "\
44724		       "/p:TargetName=freetype "\
44725		       "/p:OutDir=\"$freetype_lib_path\" "\
44726		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44727    cmd /c freetype.bat
44728
44729    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44730      # If that succeeds we also build freetype.lib
44731      $ECHO -e "@echo off\n"\
44732	       "$MSBUILD $vcxproj_path "\
44733			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44734			 "/p:Configuration=\"Release Multithreaded\" "\
44735			 "/p:Platform=$freetype_platform "\
44736			 "/p:ConfigurationType=StaticLibrary "\
44737			 "/p:TargetName=freetype "\
44738			 "/p:OutDir=\"$freetype_lib_path\" "\
44739			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44740      cmd /c freetype.bat
44741
44742      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44743	# Once we build both, lib and dll, set freetype lib and include path appropriately
44744	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44745	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44746	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44747$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44748      else
44749	BUILD_FREETYPE=no
44750      fi
44751    else
44752      BUILD_FREETYPE=no
44753    fi
44754  fi
44755
44756        if test "x$BUILD_FREETYPE" = xyes; then
44757          # Okay, we built it. Check that it works.
44758
44759  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44760  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44761  METHOD="--with-freetype-src"
44762
44763  # First check if the files exists.
44764  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44765    # We found an arbitrary include file. That's a good sign.
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44767$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44768    FOUND_FREETYPE=yes
44769
44770    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44771    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44772      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44773$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44774      FOUND_FREETYPE=no
44775    else
44776      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44777        # On Windows, we will need both .lib and .dll file.
44778        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44779          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44781          FOUND_FREETYPE=no
44782        fi
44783      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44784        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44785        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44786      fi
44787    fi
44788  fi
44789
44790  if test "x$FOUND_FREETYPE" = xyes; then
44791
44792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44793
44794  # Input might be given as Windows format, start by converting to
44795  # unix format.
44796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44797  new_path=`$CYGPATH -u "$path"`
44798
44799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44802  # "foo.exe" is OK but "foo" is an error.
44803  #
44804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44805  # It is also a way to make sure we got the proper file name for the real test later on.
44806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44807  if test "x$test_shortpath" = x; then
44808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44811  fi
44812
44813  # Call helper function which possibly converts this using DOS-style short mode.
44814  # If so, the updated path is stored in $new_path.
44815
44816  input_path="$new_path"
44817  # Check if we need to convert this using DOS-style short mode. If the path
44818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44819  # take no chances and rewrite it.
44820  # Note: m4 eats our [], so we need to use [ and ] instead.
44821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44822  if test "x$has_forbidden_chars" != x; then
44823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44827      # Going to short mode and back again did indeed matter. Since short mode is
44828      # case insensitive, let's make it lowercase to improve readability.
44829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44830      # Now convert it back to Unix-style (cygpath)
44831      input_path=`$CYGPATH -u "$shortmode_path"`
44832      new_path="$input_path"
44833    fi
44834  fi
44835
44836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44837  if test "x$test_cygdrive_prefix" = x; then
44838    # As a simple fix, exclude /usr/bin since it's not a real path.
44839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44841      # a path prefixed by /cygdrive for fixpath to work.
44842      new_path="$CYGWIN_ROOT_PATH$input_path"
44843    fi
44844  fi
44845
44846
44847  if test "x$path" != "x$new_path"; then
44848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44851  fi
44852
44853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44854
44855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44856  has_colon=`$ECHO $path | $GREP ^.:`
44857  new_path="$path"
44858  if test "x$has_colon" = x; then
44859    # Not in mixed or Windows style, start by that.
44860    new_path=`cmd //c echo $path`
44861  fi
44862
44863
44864  input_path="$new_path"
44865  # Check if we need to convert this using DOS-style short mode. If the path
44866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44867  # take no chances and rewrite it.
44868  # Note: m4 eats our [], so we need to use [ and ] instead.
44869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44870  if test "x$has_forbidden_chars" != x; then
44871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44873  fi
44874
44875
44876  windows_path="$new_path"
44877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44878    unix_path=`$CYGPATH -u "$windows_path"`
44879    new_path="$unix_path"
44880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44882    new_path="$unix_path"
44883  fi
44884
44885  if test "x$path" != "x$new_path"; then
44886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44889  fi
44890
44891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44893
44894  else
44895    # We're on a posix platform. Hooray! :)
44896    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44897    has_space=`$ECHO "$path" | $GREP " "`
44898    if test "x$has_space" != x; then
44899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44901      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44902    fi
44903
44904    # Use eval to expand a potential ~
44905    eval path="$path"
44906    if test ! -f "$path" && test ! -d "$path"; then
44907      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44908    fi
44909
44910    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44911  fi
44912
44913
44914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44915
44916  # Input might be given as Windows format, start by converting to
44917  # unix format.
44918  path="$POTENTIAL_FREETYPE_LIB_PATH"
44919  new_path=`$CYGPATH -u "$path"`
44920
44921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44924  # "foo.exe" is OK but "foo" is an error.
44925  #
44926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44927  # It is also a way to make sure we got the proper file name for the real test later on.
44928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44929  if test "x$test_shortpath" = x; then
44930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44933  fi
44934
44935  # Call helper function which possibly converts this using DOS-style short mode.
44936  # If so, the updated path is stored in $new_path.
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44949      # Going to short mode and back again did indeed matter. Since short mode is
44950      # case insensitive, let's make it lowercase to improve readability.
44951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952      # Now convert it back to Unix-style (cygpath)
44953      input_path=`$CYGPATH -u "$shortmode_path"`
44954      new_path="$input_path"
44955    fi
44956  fi
44957
44958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44959  if test "x$test_cygdrive_prefix" = x; then
44960    # As a simple fix, exclude /usr/bin since it's not a real path.
44961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44963      # a path prefixed by /cygdrive for fixpath to work.
44964      new_path="$CYGWIN_ROOT_PATH$input_path"
44965    fi
44966  fi
44967
44968
44969  if test "x$path" != "x$new_path"; then
44970    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44973  fi
44974
44975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976
44977  path="$POTENTIAL_FREETYPE_LIB_PATH"
44978  has_colon=`$ECHO $path | $GREP ^.:`
44979  new_path="$path"
44980  if test "x$has_colon" = x; then
44981    # Not in mixed or Windows style, start by that.
44982    new_path=`cmd //c echo $path`
44983  fi
44984
44985
44986  input_path="$new_path"
44987  # Check if we need to convert this using DOS-style short mode. If the path
44988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44989  # take no chances and rewrite it.
44990  # Note: m4 eats our [], so we need to use [ and ] instead.
44991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44992  if test "x$has_forbidden_chars" != x; then
44993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44995  fi
44996
44997
44998  windows_path="$new_path"
44999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45000    unix_path=`$CYGPATH -u "$windows_path"`
45001    new_path="$unix_path"
45002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45004    new_path="$unix_path"
45005  fi
45006
45007  if test "x$path" != "x$new_path"; then
45008    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45011  fi
45012
45013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45015
45016  else
45017    # We're on a posix platform. Hooray! :)
45018    path="$POTENTIAL_FREETYPE_LIB_PATH"
45019    has_space=`$ECHO "$path" | $GREP " "`
45020    if test "x$has_space" != x; then
45021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45024    fi
45025
45026    # Use eval to expand a potential ~
45027    eval path="$path"
45028    if test ! -f "$path" && test ! -d "$path"; then
45029      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45030    fi
45031
45032    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45033  fi
45034
45035
45036    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45038$as_echo_n "checking for freetype includes... " >&6; }
45039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45040$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45041    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45043$as_echo_n "checking for freetype libraries... " >&6; }
45044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45045$as_echo "$FREETYPE_LIB_PATH" >&6; }
45046  fi
45047
45048          if test "x$FOUND_FREETYPE" != xyes; then
45049            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45050          fi
45051        else
45052          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45053$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45054          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45055        fi
45056      else
45057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45058$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45059      fi
45060    fi
45061
45062    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45063      # User has specified settings
45064
45065      if test "x$BUNDLE_FREETYPE" = x; then
45066        # If not specified, default is to bundle freetype
45067        BUNDLE_FREETYPE=yes
45068      fi
45069
45070      if test "x$with_freetype" != x; then
45071        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45072        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45073      fi
45074
45075      # Allow --with-freetype-lib and --with-freetype-include to override
45076      if test "x$with_freetype_include" != x; then
45077        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45078      fi
45079      if test "x$with_freetype_lib" != x; then
45080        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45081      fi
45082
45083      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45084        # Okay, we got it. Check that it works.
45085
45086  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45087  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45088  METHOD="--with-freetype"
45089
45090  # First check if the files exists.
45091  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45092    # We found an arbitrary include file. That's a good sign.
45093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45094$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45095    FOUND_FREETYPE=yes
45096
45097    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45098    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45099      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45100$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45101      FOUND_FREETYPE=no
45102    else
45103      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45104        # On Windows, we will need both .lib and .dll file.
45105        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45106          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45108          FOUND_FREETYPE=no
45109        fi
45110      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45111        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45112        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45113      fi
45114    fi
45115  fi
45116
45117  if test "x$FOUND_FREETYPE" = xyes; then
45118
45119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45120
45121  # Input might be given as Windows format, start by converting to
45122  # unix format.
45123  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45124  new_path=`$CYGPATH -u "$path"`
45125
45126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45129  # "foo.exe" is OK but "foo" is an error.
45130  #
45131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45132  # It is also a way to make sure we got the proper file name for the real test later on.
45133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45134  if test "x$test_shortpath" = x; then
45135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45136$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45137    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45138  fi
45139
45140  # Call helper function which possibly converts this using DOS-style short mode.
45141  # If so, the updated path is stored in $new_path.
45142
45143  input_path="$new_path"
45144  # Check if we need to convert this using DOS-style short mode. If the path
45145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45146  # take no chances and rewrite it.
45147  # Note: m4 eats our [], so we need to use [ and ] instead.
45148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45149  if test "x$has_forbidden_chars" != x; then
45150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45154      # Going to short mode and back again did indeed matter. Since short mode is
45155      # case insensitive, let's make it lowercase to improve readability.
45156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45157      # Now convert it back to Unix-style (cygpath)
45158      input_path=`$CYGPATH -u "$shortmode_path"`
45159      new_path="$input_path"
45160    fi
45161  fi
45162
45163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45164  if test "x$test_cygdrive_prefix" = x; then
45165    # As a simple fix, exclude /usr/bin since it's not a real path.
45166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45168      # a path prefixed by /cygdrive for fixpath to work.
45169      new_path="$CYGWIN_ROOT_PATH$input_path"
45170    fi
45171  fi
45172
45173
45174  if test "x$path" != "x$new_path"; then
45175    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45177$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45178  fi
45179
45180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45181
45182  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45183  has_colon=`$ECHO $path | $GREP ^.:`
45184  new_path="$path"
45185  if test "x$has_colon" = x; then
45186    # Not in mixed or Windows style, start by that.
45187    new_path=`cmd //c echo $path`
45188  fi
45189
45190
45191  input_path="$new_path"
45192  # Check if we need to convert this using DOS-style short mode. If the path
45193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45194  # take no chances and rewrite it.
45195  # Note: m4 eats our [], so we need to use [ and ] instead.
45196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45197  if test "x$has_forbidden_chars" != x; then
45198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45200  fi
45201
45202
45203  windows_path="$new_path"
45204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45205    unix_path=`$CYGPATH -u "$windows_path"`
45206    new_path="$unix_path"
45207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45209    new_path="$unix_path"
45210  fi
45211
45212  if test "x$path" != "x$new_path"; then
45213    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45216  fi
45217
45218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45220
45221  else
45222    # We're on a posix platform. Hooray! :)
45223    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45224    has_space=`$ECHO "$path" | $GREP " "`
45225    if test "x$has_space" != x; then
45226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45228      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45229    fi
45230
45231    # Use eval to expand a potential ~
45232    eval path="$path"
45233    if test ! -f "$path" && test ! -d "$path"; then
45234      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45235    fi
45236
45237    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45238  fi
45239
45240
45241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45242
45243  # Input might be given as Windows format, start by converting to
45244  # unix format.
45245  path="$POTENTIAL_FREETYPE_LIB_PATH"
45246  new_path=`$CYGPATH -u "$path"`
45247
45248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45251  # "foo.exe" is OK but "foo" is an error.
45252  #
45253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45254  # It is also a way to make sure we got the proper file name for the real test later on.
45255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45256  if test "x$test_shortpath" = x; then
45257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45259    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45260  fi
45261
45262  # Call helper function which possibly converts this using DOS-style short mode.
45263  # If so, the updated path is stored in $new_path.
45264
45265  input_path="$new_path"
45266  # Check if we need to convert this using DOS-style short mode. If the path
45267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45268  # take no chances and rewrite it.
45269  # Note: m4 eats our [], so we need to use [ and ] instead.
45270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45271  if test "x$has_forbidden_chars" != x; then
45272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45276      # Going to short mode and back again did indeed matter. Since short mode is
45277      # case insensitive, let's make it lowercase to improve readability.
45278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45279      # Now convert it back to Unix-style (cygpath)
45280      input_path=`$CYGPATH -u "$shortmode_path"`
45281      new_path="$input_path"
45282    fi
45283  fi
45284
45285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45286  if test "x$test_cygdrive_prefix" = x; then
45287    # As a simple fix, exclude /usr/bin since it's not a real path.
45288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45290      # a path prefixed by /cygdrive for fixpath to work.
45291      new_path="$CYGWIN_ROOT_PATH$input_path"
45292    fi
45293  fi
45294
45295
45296  if test "x$path" != "x$new_path"; then
45297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45300  fi
45301
45302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45303
45304  path="$POTENTIAL_FREETYPE_LIB_PATH"
45305  has_colon=`$ECHO $path | $GREP ^.:`
45306  new_path="$path"
45307  if test "x$has_colon" = x; then
45308    # Not in mixed or Windows style, start by that.
45309    new_path=`cmd //c echo $path`
45310  fi
45311
45312
45313  input_path="$new_path"
45314  # Check if we need to convert this using DOS-style short mode. If the path
45315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45316  # take no chances and rewrite it.
45317  # Note: m4 eats our [], so we need to use [ and ] instead.
45318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45319  if test "x$has_forbidden_chars" != x; then
45320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45322  fi
45323
45324
45325  windows_path="$new_path"
45326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327    unix_path=`$CYGPATH -u "$windows_path"`
45328    new_path="$unix_path"
45329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45331    new_path="$unix_path"
45332  fi
45333
45334  if test "x$path" != "x$new_path"; then
45335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45338  fi
45339
45340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45342
45343  else
45344    # We're on a posix platform. Hooray! :)
45345    path="$POTENTIAL_FREETYPE_LIB_PATH"
45346    has_space=`$ECHO "$path" | $GREP " "`
45347    if test "x$has_space" != x; then
45348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45350      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45351    fi
45352
45353    # Use eval to expand a potential ~
45354    eval path="$path"
45355    if test ! -f "$path" && test ! -d "$path"; then
45356      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45357    fi
45358
45359    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45360  fi
45361
45362
45363    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45365$as_echo_n "checking for freetype includes... " >&6; }
45366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45367$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45368    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45370$as_echo_n "checking for freetype libraries... " >&6; }
45371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45372$as_echo "$FREETYPE_LIB_PATH" >&6; }
45373  fi
45374
45375        if test "x$FOUND_FREETYPE" != xyes; then
45376          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45377        fi
45378      else
45379        # User specified only one of lib or include. This is an error.
45380        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45381          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45382$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45383          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45384        else
45385          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45386$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45387          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45388        fi
45389      fi
45390    else
45391      # User did not specify settings, but we need freetype. Try to locate it.
45392
45393      if test "x$BUNDLE_FREETYPE" = x; then
45394        # If not specified, default is to bundle freetype only on windows
45395        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45396          BUNDLE_FREETYPE=yes
45397        else
45398          BUNDLE_FREETYPE=no
45399        fi
45400      fi
45401
45402      if test "x$FOUND_FREETYPE" != xyes; then
45403        # Check builddeps
45404
45405
45406  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45407    # Source the builddeps file again, to make sure it uses the latest variables!
45408    . $builddepsfile
45409    # Look for a target and build machine specific resource!
45410    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45411    if test "x$resource" = x; then
45412      # Ok, lets instead look for a target specific resource
45413      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45414    fi
45415    if test "x$resource" = x; then
45416      # Ok, lets instead look for a build specific resource
45417      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45418    fi
45419    if test "x$resource" = x; then
45420      # Ok, lets instead look for a generic resource
45421      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45422      resource=${builddep_freetype2}
45423    fi
45424    if test "x$resource" != x; then
45425      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45426$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45427      # If the resource in the builddeps.conf file is an existing directory,
45428      # for example /java/linux/cups
45429      if test -d ${resource}; then
45430        depdir=${resource}
45431      else
45432
45433  # freetype2 is for example mymodule
45434  # $resource is for example libs/general/libmymod_1_2_3.zip
45435  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45436  # $with_builddeps_dir is for example /localhome/builddeps
45437  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45438  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45439  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45440  filename=`basename $resource`
45441  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45442  filebase=${filename%%.*}
45443  extension=${filename#*.}
45444  installdir=$with_builddeps_dir/$filebase
45445  if test ! -f $installdir/$filename.unpacked; then
45446    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45447$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45448    if test ! -d $installdir; then
45449      mkdir -p $installdir
45450    fi
45451    if test ! -d $installdir; then
45452      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45453    fi
45454    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45455    touch $tmpfile
45456    if test ! -f $tmpfile; then
45457      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45458    fi
45459
45460  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45461  # $tmpfile is the local file name for the downloaded file.
45462  VALID_TOOL=no
45463  if test "x$BDEPS_FTP" = xwget; then
45464    VALID_TOOL=yes
45465    wget -O $tmpfile $with_builddeps_server/$resource
45466  fi
45467  if test "x$BDEPS_FTP" = xlftp; then
45468    VALID_TOOL=yes
45469    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45470  fi
45471  if test "x$BDEPS_FTP" = xftp; then
45472    VALID_TOOL=yes
45473    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45474    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45475    FTPUSERPWD=${FTPSERVER%%@*}
45476    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45477      FTPUSER=${userpwd%%:*}
45478      FTPPWD=${userpwd#*@}
45479      FTPSERVER=${FTPSERVER#*@}
45480    else
45481      FTPUSER=ftp
45482      FTPPWD=ftp
45483    fi
45484    # the "pass" command does not work on some
45485    # ftp clients (read ftp.exe) but if it works,
45486    # passive mode is better!
45487    ( \
45488        echo "user $FTPUSER $FTPPWD"        ; \
45489        echo "pass"                         ; \
45490        echo "bin"                          ; \
45491        echo "get $FTPPATH $tmpfile"              ; \
45492    ) | ftp -in $FTPSERVER
45493  fi
45494  if test "x$VALID_TOOL" != xyes; then
45495    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45496  fi
45497
45498    mv $tmpfile $installdir/$filename
45499    if test ! -s $installdir/$filename; then
45500      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45501    fi
45502    case "$extension" in
45503      zip)  echo "Unzipping $installdir/$filename..."
45504        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45505        ;;
45506      tar.gz) echo "Untaring $installdir/$filename..."
45507        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45508        ;;
45509      tgz) echo "Untaring $installdir/$filename..."
45510        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45511        ;;
45512      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45513        ;;
45514    esac
45515  fi
45516  if test -f $installdir/$filename.unpacked; then
45517    depdir=$installdir
45518  fi
45519
45520      fi
45521      # Source the builddeps file again, because in the previous command, the depdir
45522      # was updated to point at the current build dependency install directory.
45523      . $builddepsfile
45524      # Now extract variables from the builddeps.conf files.
45525      theroot=${builddep_freetype2_ROOT}
45526      thecflags=${builddep_freetype2_CFLAGS}
45527      thelibs=${builddep_freetype2_LIBS}
45528      if test "x$depdir" = x; then
45529        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45530      fi
45531      FREETYPE=$depdir
45532      if test "x$theroot" != x; then
45533        FREETYPE="$theroot"
45534      fi
45535      if test "x$thecflags" != x; then
45536        FREETYPE_CFLAGS="$thecflags"
45537      fi
45538      if test "x$thelibs" != x; then
45539        FREETYPE_LIBS="$thelibs"
45540      fi
45541      FOUND_FREETYPE=yes
45542      else FOUND_FREETYPE=no
45543
45544    fi
45545    else FOUND_FREETYPE=no
45546
45547  fi
45548
45549        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45550        if test "x$FOUND_FREETYPE" = xyes; then
45551          if test "x$BUNDLE_FREETYPE" = xyes; then
45552            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45553$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45554            FOUND_FREETYPE=no
45555          else
45556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45557$as_echo_n "checking for freetype... " >&6; }
45558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45559$as_echo "yes (using builddeps)" >&6; }
45560          fi
45561        fi
45562      fi
45563
45564      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45565      if test "x$SYSROOT" = x; then
45566        if test "x$FOUND_FREETYPE" != xyes; then
45567          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45568          if test "x$PKG_CONFIG" != x; then
45569
45570pkg_failed=no
45571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45572$as_echo_n "checking for FREETYPE... " >&6; }
45573
45574if test -n "$FREETYPE_CFLAGS"; then
45575    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45576 elif test -n "$PKG_CONFIG"; then
45577    if test -n "$PKG_CONFIG" && \
45578    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45579  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45580  ac_status=$?
45581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45582  test $ac_status = 0; }; then
45583  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45584else
45585  pkg_failed=yes
45586fi
45587 else
45588    pkg_failed=untried
45589fi
45590if test -n "$FREETYPE_LIBS"; then
45591    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45592 elif test -n "$PKG_CONFIG"; then
45593    if test -n "$PKG_CONFIG" && \
45594    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45595  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45596  ac_status=$?
45597  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45598  test $ac_status = 0; }; then
45599  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45600else
45601  pkg_failed=yes
45602fi
45603 else
45604    pkg_failed=untried
45605fi
45606
45607
45608
45609if test $pkg_failed = yes; then
45610
45611if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45612        _pkg_short_errors_supported=yes
45613else
45614        _pkg_short_errors_supported=no
45615fi
45616        if test $_pkg_short_errors_supported = yes; then
45617	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45618        else
45619	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45620        fi
45621	# Put the nasty error message in config.log where it belongs
45622	echo "$FREETYPE_PKG_ERRORS" >&5
45623
45624	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45625$as_echo "no" >&6; }
45626                FOUND_FREETYPE=no
45627elif test $pkg_failed = untried; then
45628	FOUND_FREETYPE=no
45629else
45630	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45631	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45633$as_echo "yes" >&6; }
45634	FOUND_FREETYPE=yes
45635fi
45636            if test "x$FOUND_FREETYPE" = xyes; then
45637              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45638              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45639              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45640              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45641                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45642              fi
45643              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45644              if test "x$BUNDLE_FREETYPE" = xyes; then
45645                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45646$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45647                FOUND_FREETYPE=no
45648              else
45649                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45650$as_echo_n "checking for freetype... " >&6; }
45651                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45652$as_echo "yes (using pkg-config)" >&6; }
45653              fi
45654            fi
45655          fi
45656        fi
45657      fi
45658
45659      if test "x$FOUND_FREETYPE" != xyes; then
45660        # Check in well-known locations
45661        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45662          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45663
45664  windows_path="$FREETYPE_BASE_DIR"
45665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45666    unix_path=`$CYGPATH -u "$windows_path"`
45667    FREETYPE_BASE_DIR="$unix_path"
45668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45670    FREETYPE_BASE_DIR="$unix_path"
45671  fi
45672
45673
45674  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45675  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45676  METHOD="well-known location"
45677
45678  # First check if the files exists.
45679  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45680    # We found an arbitrary include file. That's a good sign.
45681    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45682$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45683    FOUND_FREETYPE=yes
45684
45685    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45686    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45687      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45688$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45689      FOUND_FREETYPE=no
45690    else
45691      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45692        # On Windows, we will need both .lib and .dll file.
45693        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45694          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45695$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45696          FOUND_FREETYPE=no
45697        fi
45698      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45699        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45700        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45701      fi
45702    fi
45703  fi
45704
45705  if test "x$FOUND_FREETYPE" = xyes; then
45706
45707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45708
45709  # Input might be given as Windows format, start by converting to
45710  # unix format.
45711  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45712  new_path=`$CYGPATH -u "$path"`
45713
45714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45717  # "foo.exe" is OK but "foo" is an error.
45718  #
45719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45720  # It is also a way to make sure we got the proper file name for the real test later on.
45721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45722  if test "x$test_shortpath" = x; then
45723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45725    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45726  fi
45727
45728  # Call helper function which possibly converts this using DOS-style short mode.
45729  # If so, the updated path is stored in $new_path.
45730
45731  input_path="$new_path"
45732  # Check if we need to convert this using DOS-style short mode. If the path
45733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45734  # take no chances and rewrite it.
45735  # Note: m4 eats our [], so we need to use [ and ] instead.
45736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45737  if test "x$has_forbidden_chars" != x; then
45738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45742      # Going to short mode and back again did indeed matter. Since short mode is
45743      # case insensitive, let's make it lowercase to improve readability.
45744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45745      # Now convert it back to Unix-style (cygpath)
45746      input_path=`$CYGPATH -u "$shortmode_path"`
45747      new_path="$input_path"
45748    fi
45749  fi
45750
45751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45752  if test "x$test_cygdrive_prefix" = x; then
45753    # As a simple fix, exclude /usr/bin since it's not a real path.
45754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45756      # a path prefixed by /cygdrive for fixpath to work.
45757      new_path="$CYGWIN_ROOT_PATH$input_path"
45758    fi
45759  fi
45760
45761
45762  if test "x$path" != "x$new_path"; then
45763    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45766  fi
45767
45768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45769
45770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45771  has_colon=`$ECHO $path | $GREP ^.:`
45772  new_path="$path"
45773  if test "x$has_colon" = x; then
45774    # Not in mixed or Windows style, start by that.
45775    new_path=`cmd //c echo $path`
45776  fi
45777
45778
45779  input_path="$new_path"
45780  # Check if we need to convert this using DOS-style short mode. If the path
45781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45782  # take no chances and rewrite it.
45783  # Note: m4 eats our [], so we need to use [ and ] instead.
45784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45785  if test "x$has_forbidden_chars" != x; then
45786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45788  fi
45789
45790
45791  windows_path="$new_path"
45792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45793    unix_path=`$CYGPATH -u "$windows_path"`
45794    new_path="$unix_path"
45795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45797    new_path="$unix_path"
45798  fi
45799
45800  if test "x$path" != "x$new_path"; then
45801    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45804  fi
45805
45806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45808
45809  else
45810    # We're on a posix platform. Hooray! :)
45811    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45812    has_space=`$ECHO "$path" | $GREP " "`
45813    if test "x$has_space" != x; then
45814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45816      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45817    fi
45818
45819    # Use eval to expand a potential ~
45820    eval path="$path"
45821    if test ! -f "$path" && test ! -d "$path"; then
45822      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45823    fi
45824
45825    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45826  fi
45827
45828
45829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45830
45831  # Input might be given as Windows format, start by converting to
45832  # unix format.
45833  path="$POTENTIAL_FREETYPE_LIB_PATH"
45834  new_path=`$CYGPATH -u "$path"`
45835
45836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45839  # "foo.exe" is OK but "foo" is an error.
45840  #
45841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45842  # It is also a way to make sure we got the proper file name for the real test later on.
45843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45844  if test "x$test_shortpath" = x; then
45845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45846$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45847    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45848  fi
45849
45850  # Call helper function which possibly converts this using DOS-style short mode.
45851  # If so, the updated path is stored in $new_path.
45852
45853  input_path="$new_path"
45854  # Check if we need to convert this using DOS-style short mode. If the path
45855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45856  # take no chances and rewrite it.
45857  # Note: m4 eats our [], so we need to use [ and ] instead.
45858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45859  if test "x$has_forbidden_chars" != x; then
45860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45864      # Going to short mode and back again did indeed matter. Since short mode is
45865      # case insensitive, let's make it lowercase to improve readability.
45866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45867      # Now convert it back to Unix-style (cygpath)
45868      input_path=`$CYGPATH -u "$shortmode_path"`
45869      new_path="$input_path"
45870    fi
45871  fi
45872
45873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45874  if test "x$test_cygdrive_prefix" = x; then
45875    # As a simple fix, exclude /usr/bin since it's not a real path.
45876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45878      # a path prefixed by /cygdrive for fixpath to work.
45879      new_path="$CYGWIN_ROOT_PATH$input_path"
45880    fi
45881  fi
45882
45883
45884  if test "x$path" != "x$new_path"; then
45885    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45888  fi
45889
45890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45891
45892  path="$POTENTIAL_FREETYPE_LIB_PATH"
45893  has_colon=`$ECHO $path | $GREP ^.:`
45894  new_path="$path"
45895  if test "x$has_colon" = x; then
45896    # Not in mixed or Windows style, start by that.
45897    new_path=`cmd //c echo $path`
45898  fi
45899
45900
45901  input_path="$new_path"
45902  # Check if we need to convert this using DOS-style short mode. If the path
45903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45904  # take no chances and rewrite it.
45905  # Note: m4 eats our [], so we need to use [ and ] instead.
45906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45907  if test "x$has_forbidden_chars" != x; then
45908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45910  fi
45911
45912
45913  windows_path="$new_path"
45914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45915    unix_path=`$CYGPATH -u "$windows_path"`
45916    new_path="$unix_path"
45917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45919    new_path="$unix_path"
45920  fi
45921
45922  if test "x$path" != "x$new_path"; then
45923    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45926  fi
45927
45928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45930
45931  else
45932    # We're on a posix platform. Hooray! :)
45933    path="$POTENTIAL_FREETYPE_LIB_PATH"
45934    has_space=`$ECHO "$path" | $GREP " "`
45935    if test "x$has_space" != x; then
45936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45937$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45938      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45939    fi
45940
45941    # Use eval to expand a potential ~
45942    eval path="$path"
45943    if test ! -f "$path" && test ! -d "$path"; then
45944      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45945    fi
45946
45947    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45948  fi
45949
45950
45951    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45953$as_echo_n "checking for freetype includes... " >&6; }
45954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45955$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45956    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45958$as_echo_n "checking for freetype libraries... " >&6; }
45959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45960$as_echo "$FREETYPE_LIB_PATH" >&6; }
45961  fi
45962
45963          if test "x$FOUND_FREETYPE" != xyes; then
45964            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45965
45966  windows_path="$FREETYPE_BASE_DIR"
45967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45968    unix_path=`$CYGPATH -u "$windows_path"`
45969    FREETYPE_BASE_DIR="$unix_path"
45970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45972    FREETYPE_BASE_DIR="$unix_path"
45973  fi
45974
45975
45976  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45977  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45978  METHOD="well-known location"
45979
45980  # First check if the files exists.
45981  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45982    # We found an arbitrary include file. That's a good sign.
45983    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45984$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45985    FOUND_FREETYPE=yes
45986
45987    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45988    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45989      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45990$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45991      FOUND_FREETYPE=no
45992    else
45993      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45994        # On Windows, we will need both .lib and .dll file.
45995        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45996          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45997$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45998          FOUND_FREETYPE=no
45999        fi
46000      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46001        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46002        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46003      fi
46004    fi
46005  fi
46006
46007  if test "x$FOUND_FREETYPE" = xyes; then
46008
46009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46010
46011  # Input might be given as Windows format, start by converting to
46012  # unix format.
46013  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46014  new_path=`$CYGPATH -u "$path"`
46015
46016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46019  # "foo.exe" is OK but "foo" is an error.
46020  #
46021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46022  # It is also a way to make sure we got the proper file name for the real test later on.
46023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46024  if test "x$test_shortpath" = x; then
46025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46027    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46028  fi
46029
46030  # Call helper function which possibly converts this using DOS-style short mode.
46031  # If so, the updated path is stored in $new_path.
46032
46033  input_path="$new_path"
46034  # Check if we need to convert this using DOS-style short mode. If the path
46035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46036  # take no chances and rewrite it.
46037  # Note: m4 eats our [], so we need to use [ and ] instead.
46038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46039  if test "x$has_forbidden_chars" != x; then
46040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46044      # Going to short mode and back again did indeed matter. Since short mode is
46045      # case insensitive, let's make it lowercase to improve readability.
46046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46047      # Now convert it back to Unix-style (cygpath)
46048      input_path=`$CYGPATH -u "$shortmode_path"`
46049      new_path="$input_path"
46050    fi
46051  fi
46052
46053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46054  if test "x$test_cygdrive_prefix" = x; then
46055    # As a simple fix, exclude /usr/bin since it's not a real path.
46056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46058      # a path prefixed by /cygdrive for fixpath to work.
46059      new_path="$CYGWIN_ROOT_PATH$input_path"
46060    fi
46061  fi
46062
46063
46064  if test "x$path" != "x$new_path"; then
46065    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46068  fi
46069
46070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46071
46072  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46073  has_colon=`$ECHO $path | $GREP ^.:`
46074  new_path="$path"
46075  if test "x$has_colon" = x; then
46076    # Not in mixed or Windows style, start by that.
46077    new_path=`cmd //c echo $path`
46078  fi
46079
46080
46081  input_path="$new_path"
46082  # Check if we need to convert this using DOS-style short mode. If the path
46083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46084  # take no chances and rewrite it.
46085  # Note: m4 eats our [], so we need to use [ and ] instead.
46086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46087  if test "x$has_forbidden_chars" != x; then
46088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46090  fi
46091
46092
46093  windows_path="$new_path"
46094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46095    unix_path=`$CYGPATH -u "$windows_path"`
46096    new_path="$unix_path"
46097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46099    new_path="$unix_path"
46100  fi
46101
46102  if test "x$path" != "x$new_path"; then
46103    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46106  fi
46107
46108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46110
46111  else
46112    # We're on a posix platform. Hooray! :)
46113    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46114    has_space=`$ECHO "$path" | $GREP " "`
46115    if test "x$has_space" != x; then
46116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46118      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46119    fi
46120
46121    # Use eval to expand a potential ~
46122    eval path="$path"
46123    if test ! -f "$path" && test ! -d "$path"; then
46124      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46125    fi
46126
46127    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46128  fi
46129
46130
46131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46132
46133  # Input might be given as Windows format, start by converting to
46134  # unix format.
46135  path="$POTENTIAL_FREETYPE_LIB_PATH"
46136  new_path=`$CYGPATH -u "$path"`
46137
46138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46141  # "foo.exe" is OK but "foo" is an error.
46142  #
46143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46144  # It is also a way to make sure we got the proper file name for the real test later on.
46145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46146  if test "x$test_shortpath" = x; then
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46149    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46150  fi
46151
46152  # Call helper function which possibly converts this using DOS-style short mode.
46153  # If so, the updated path is stored in $new_path.
46154
46155  input_path="$new_path"
46156  # Check if we need to convert this using DOS-style short mode. If the path
46157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46158  # take no chances and rewrite it.
46159  # Note: m4 eats our [], so we need to use [ and ] instead.
46160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46161  if test "x$has_forbidden_chars" != x; then
46162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46166      # Going to short mode and back again did indeed matter. Since short mode is
46167      # case insensitive, let's make it lowercase to improve readability.
46168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46169      # Now convert it back to Unix-style (cygpath)
46170      input_path=`$CYGPATH -u "$shortmode_path"`
46171      new_path="$input_path"
46172    fi
46173  fi
46174
46175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46176  if test "x$test_cygdrive_prefix" = x; then
46177    # As a simple fix, exclude /usr/bin since it's not a real path.
46178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46180      # a path prefixed by /cygdrive for fixpath to work.
46181      new_path="$CYGWIN_ROOT_PATH$input_path"
46182    fi
46183  fi
46184
46185
46186  if test "x$path" != "x$new_path"; then
46187    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46190  fi
46191
46192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46193
46194  path="$POTENTIAL_FREETYPE_LIB_PATH"
46195  has_colon=`$ECHO $path | $GREP ^.:`
46196  new_path="$path"
46197  if test "x$has_colon" = x; then
46198    # Not in mixed or Windows style, start by that.
46199    new_path=`cmd //c echo $path`
46200  fi
46201
46202
46203  input_path="$new_path"
46204  # Check if we need to convert this using DOS-style short mode. If the path
46205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46206  # take no chances and rewrite it.
46207  # Note: m4 eats our [], so we need to use [ and ] instead.
46208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46209  if test "x$has_forbidden_chars" != x; then
46210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46212  fi
46213
46214
46215  windows_path="$new_path"
46216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46217    unix_path=`$CYGPATH -u "$windows_path"`
46218    new_path="$unix_path"
46219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46221    new_path="$unix_path"
46222  fi
46223
46224  if test "x$path" != "x$new_path"; then
46225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46228  fi
46229
46230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46232
46233  else
46234    # We're on a posix platform. Hooray! :)
46235    path="$POTENTIAL_FREETYPE_LIB_PATH"
46236    has_space=`$ECHO "$path" | $GREP " "`
46237    if test "x$has_space" != x; then
46238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46241    fi
46242
46243    # Use eval to expand a potential ~
46244    eval path="$path"
46245    if test ! -f "$path" && test ! -d "$path"; then
46246      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46247    fi
46248
46249    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46250  fi
46251
46252
46253    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46255$as_echo_n "checking for freetype includes... " >&6; }
46256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46257$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46258    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46260$as_echo_n "checking for freetype libraries... " >&6; }
46261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46262$as_echo "$FREETYPE_LIB_PATH" >&6; }
46263  fi
46264
46265          fi
46266        else
46267          FREETYPE_BASE_DIR="$SYSROOT/usr"
46268
46269  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46270  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46271  METHOD="well-known location"
46272
46273  # First check if the files exists.
46274  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46275    # We found an arbitrary include file. That's a good sign.
46276    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46277$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46278    FOUND_FREETYPE=yes
46279
46280    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46281    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46282      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46283$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46284      FOUND_FREETYPE=no
46285    else
46286      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46287        # On Windows, we will need both .lib and .dll file.
46288        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46289          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46290$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46291          FOUND_FREETYPE=no
46292        fi
46293      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46294        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46295        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46296      fi
46297    fi
46298  fi
46299
46300  if test "x$FOUND_FREETYPE" = xyes; then
46301
46302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303
46304  # Input might be given as Windows format, start by converting to
46305  # unix format.
46306  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46307  new_path=`$CYGPATH -u "$path"`
46308
46309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46312  # "foo.exe" is OK but "foo" is an error.
46313  #
46314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46315  # It is also a way to make sure we got the proper file name for the real test later on.
46316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46317  if test "x$test_shortpath" = x; then
46318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46321  fi
46322
46323  # Call helper function which possibly converts this using DOS-style short mode.
46324  # If so, the updated path is stored in $new_path.
46325
46326  input_path="$new_path"
46327  # Check if we need to convert this using DOS-style short mode. If the path
46328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46329  # take no chances and rewrite it.
46330  # Note: m4 eats our [], so we need to use [ and ] instead.
46331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46332  if test "x$has_forbidden_chars" != x; then
46333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46337      # Going to short mode and back again did indeed matter. Since short mode is
46338      # case insensitive, let's make it lowercase to improve readability.
46339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46340      # Now convert it back to Unix-style (cygpath)
46341      input_path=`$CYGPATH -u "$shortmode_path"`
46342      new_path="$input_path"
46343    fi
46344  fi
46345
46346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46347  if test "x$test_cygdrive_prefix" = x; then
46348    # As a simple fix, exclude /usr/bin since it's not a real path.
46349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46351      # a path prefixed by /cygdrive for fixpath to work.
46352      new_path="$CYGWIN_ROOT_PATH$input_path"
46353    fi
46354  fi
46355
46356
46357  if test "x$path" != "x$new_path"; then
46358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46361  fi
46362
46363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46364
46365  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46366  has_colon=`$ECHO $path | $GREP ^.:`
46367  new_path="$path"
46368  if test "x$has_colon" = x; then
46369    # Not in mixed or Windows style, start by that.
46370    new_path=`cmd //c echo $path`
46371  fi
46372
46373
46374  input_path="$new_path"
46375  # Check if we need to convert this using DOS-style short mode. If the path
46376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46377  # take no chances and rewrite it.
46378  # Note: m4 eats our [], so we need to use [ and ] instead.
46379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46380  if test "x$has_forbidden_chars" != x; then
46381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46383  fi
46384
46385
46386  windows_path="$new_path"
46387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46388    unix_path=`$CYGPATH -u "$windows_path"`
46389    new_path="$unix_path"
46390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46392    new_path="$unix_path"
46393  fi
46394
46395  if test "x$path" != "x$new_path"; then
46396    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46399  fi
46400
46401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46403
46404  else
46405    # We're on a posix platform. Hooray! :)
46406    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46407    has_space=`$ECHO "$path" | $GREP " "`
46408    if test "x$has_space" != x; then
46409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46411      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46412    fi
46413
46414    # Use eval to expand a potential ~
46415    eval path="$path"
46416    if test ! -f "$path" && test ! -d "$path"; then
46417      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46418    fi
46419
46420    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46421  fi
46422
46423
46424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46425
46426  # Input might be given as Windows format, start by converting to
46427  # unix format.
46428  path="$POTENTIAL_FREETYPE_LIB_PATH"
46429  new_path=`$CYGPATH -u "$path"`
46430
46431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46434  # "foo.exe" is OK but "foo" is an error.
46435  #
46436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46437  # It is also a way to make sure we got the proper file name for the real test later on.
46438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46439  if test "x$test_shortpath" = x; then
46440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46442    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46443  fi
46444
46445  # Call helper function which possibly converts this using DOS-style short mode.
46446  # If so, the updated path is stored in $new_path.
46447
46448  input_path="$new_path"
46449  # Check if we need to convert this using DOS-style short mode. If the path
46450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46451  # take no chances and rewrite it.
46452  # Note: m4 eats our [], so we need to use [ and ] instead.
46453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46454  if test "x$has_forbidden_chars" != x; then
46455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46459      # Going to short mode and back again did indeed matter. Since short mode is
46460      # case insensitive, let's make it lowercase to improve readability.
46461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46462      # Now convert it back to Unix-style (cygpath)
46463      input_path=`$CYGPATH -u "$shortmode_path"`
46464      new_path="$input_path"
46465    fi
46466  fi
46467
46468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46469  if test "x$test_cygdrive_prefix" = x; then
46470    # As a simple fix, exclude /usr/bin since it's not a real path.
46471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46473      # a path prefixed by /cygdrive for fixpath to work.
46474      new_path="$CYGWIN_ROOT_PATH$input_path"
46475    fi
46476  fi
46477
46478
46479  if test "x$path" != "x$new_path"; then
46480    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46483  fi
46484
46485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46486
46487  path="$POTENTIAL_FREETYPE_LIB_PATH"
46488  has_colon=`$ECHO $path | $GREP ^.:`
46489  new_path="$path"
46490  if test "x$has_colon" = x; then
46491    # Not in mixed or Windows style, start by that.
46492    new_path=`cmd //c echo $path`
46493  fi
46494
46495
46496  input_path="$new_path"
46497  # Check if we need to convert this using DOS-style short mode. If the path
46498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46499  # take no chances and rewrite it.
46500  # Note: m4 eats our [], so we need to use [ and ] instead.
46501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46502  if test "x$has_forbidden_chars" != x; then
46503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46505  fi
46506
46507
46508  windows_path="$new_path"
46509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46510    unix_path=`$CYGPATH -u "$windows_path"`
46511    new_path="$unix_path"
46512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46514    new_path="$unix_path"
46515  fi
46516
46517  if test "x$path" != "x$new_path"; then
46518    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46520$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46521  fi
46522
46523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46525
46526  else
46527    # We're on a posix platform. Hooray! :)
46528    path="$POTENTIAL_FREETYPE_LIB_PATH"
46529    has_space=`$ECHO "$path" | $GREP " "`
46530    if test "x$has_space" != x; then
46531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46532$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46534    fi
46535
46536    # Use eval to expand a potential ~
46537    eval path="$path"
46538    if test ! -f "$path" && test ! -d "$path"; then
46539      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46540    fi
46541
46542    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46543  fi
46544
46545
46546    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46548$as_echo_n "checking for freetype includes... " >&6; }
46549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46550$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46551    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46553$as_echo_n "checking for freetype libraries... " >&6; }
46554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46555$as_echo "$FREETYPE_LIB_PATH" >&6; }
46556  fi
46557
46558
46559          if test "x$FOUND_FREETYPE" != xyes; then
46560            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46561
46562  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46563  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46564  METHOD="well-known location"
46565
46566  # First check if the files exists.
46567  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46568    # We found an arbitrary include file. That's a good sign.
46569    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46570$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46571    FOUND_FREETYPE=yes
46572
46573    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46574    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46575      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46577      FOUND_FREETYPE=no
46578    else
46579      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46580        # On Windows, we will need both .lib and .dll file.
46581        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46582          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46583$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46584          FOUND_FREETYPE=no
46585        fi
46586      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46587        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46588        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46589      fi
46590    fi
46591  fi
46592
46593  if test "x$FOUND_FREETYPE" = xyes; then
46594
46595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46596
46597  # Input might be given as Windows format, start by converting to
46598  # unix format.
46599  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46600  new_path=`$CYGPATH -u "$path"`
46601
46602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46605  # "foo.exe" is OK but "foo" is an error.
46606  #
46607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46608  # It is also a way to make sure we got the proper file name for the real test later on.
46609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46610  if test "x$test_shortpath" = x; then
46611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46613    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46614  fi
46615
46616  # Call helper function which possibly converts this using DOS-style short mode.
46617  # If so, the updated path is stored in $new_path.
46618
46619  input_path="$new_path"
46620  # Check if we need to convert this using DOS-style short mode. If the path
46621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46622  # take no chances and rewrite it.
46623  # Note: m4 eats our [], so we need to use [ and ] instead.
46624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46625  if test "x$has_forbidden_chars" != x; then
46626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46630      # Going to short mode and back again did indeed matter. Since short mode is
46631      # case insensitive, let's make it lowercase to improve readability.
46632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46633      # Now convert it back to Unix-style (cygpath)
46634      input_path=`$CYGPATH -u "$shortmode_path"`
46635      new_path="$input_path"
46636    fi
46637  fi
46638
46639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46640  if test "x$test_cygdrive_prefix" = x; then
46641    # As a simple fix, exclude /usr/bin since it's not a real path.
46642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46644      # a path prefixed by /cygdrive for fixpath to work.
46645      new_path="$CYGWIN_ROOT_PATH$input_path"
46646    fi
46647  fi
46648
46649
46650  if test "x$path" != "x$new_path"; then
46651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46654  fi
46655
46656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46657
46658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46659  has_colon=`$ECHO $path | $GREP ^.:`
46660  new_path="$path"
46661  if test "x$has_colon" = x; then
46662    # Not in mixed or Windows style, start by that.
46663    new_path=`cmd //c echo $path`
46664  fi
46665
46666
46667  input_path="$new_path"
46668  # Check if we need to convert this using DOS-style short mode. If the path
46669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46670  # take no chances and rewrite it.
46671  # Note: m4 eats our [], so we need to use [ and ] instead.
46672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46673  if test "x$has_forbidden_chars" != x; then
46674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46676  fi
46677
46678
46679  windows_path="$new_path"
46680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46681    unix_path=`$CYGPATH -u "$windows_path"`
46682    new_path="$unix_path"
46683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46685    new_path="$unix_path"
46686  fi
46687
46688  if test "x$path" != "x$new_path"; then
46689    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46692  fi
46693
46694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46696
46697  else
46698    # We're on a posix platform. Hooray! :)
46699    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46700    has_space=`$ECHO "$path" | $GREP " "`
46701    if test "x$has_space" != x; then
46702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46704      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46705    fi
46706
46707    # Use eval to expand a potential ~
46708    eval path="$path"
46709    if test ! -f "$path" && test ! -d "$path"; then
46710      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46711    fi
46712
46713    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46714  fi
46715
46716
46717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46718
46719  # Input might be given as Windows format, start by converting to
46720  # unix format.
46721  path="$POTENTIAL_FREETYPE_LIB_PATH"
46722  new_path=`$CYGPATH -u "$path"`
46723
46724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46727  # "foo.exe" is OK but "foo" is an error.
46728  #
46729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46730  # It is also a way to make sure we got the proper file name for the real test later on.
46731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46732  if test "x$test_shortpath" = x; then
46733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46736  fi
46737
46738  # Call helper function which possibly converts this using DOS-style short mode.
46739  # If so, the updated path is stored in $new_path.
46740
46741  input_path="$new_path"
46742  # Check if we need to convert this using DOS-style short mode. If the path
46743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46744  # take no chances and rewrite it.
46745  # Note: m4 eats our [], so we need to use [ and ] instead.
46746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46747  if test "x$has_forbidden_chars" != x; then
46748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46752      # Going to short mode and back again did indeed matter. Since short mode is
46753      # case insensitive, let's make it lowercase to improve readability.
46754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46755      # Now convert it back to Unix-style (cygpath)
46756      input_path=`$CYGPATH -u "$shortmode_path"`
46757      new_path="$input_path"
46758    fi
46759  fi
46760
46761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46762  if test "x$test_cygdrive_prefix" = x; then
46763    # As a simple fix, exclude /usr/bin since it's not a real path.
46764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46766      # a path prefixed by /cygdrive for fixpath to work.
46767      new_path="$CYGWIN_ROOT_PATH$input_path"
46768    fi
46769  fi
46770
46771
46772  if test "x$path" != "x$new_path"; then
46773    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46776  fi
46777
46778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779
46780  path="$POTENTIAL_FREETYPE_LIB_PATH"
46781  has_colon=`$ECHO $path | $GREP ^.:`
46782  new_path="$path"
46783  if test "x$has_colon" = x; then
46784    # Not in mixed or Windows style, start by that.
46785    new_path=`cmd //c echo $path`
46786  fi
46787
46788
46789  input_path="$new_path"
46790  # Check if we need to convert this using DOS-style short mode. If the path
46791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46792  # take no chances and rewrite it.
46793  # Note: m4 eats our [], so we need to use [ and ] instead.
46794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46795  if test "x$has_forbidden_chars" != x; then
46796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46798  fi
46799
46800
46801  windows_path="$new_path"
46802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46803    unix_path=`$CYGPATH -u "$windows_path"`
46804    new_path="$unix_path"
46805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46807    new_path="$unix_path"
46808  fi
46809
46810  if test "x$path" != "x$new_path"; then
46811    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46814  fi
46815
46816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46818
46819  else
46820    # We're on a posix platform. Hooray! :)
46821    path="$POTENTIAL_FREETYPE_LIB_PATH"
46822    has_space=`$ECHO "$path" | $GREP " "`
46823    if test "x$has_space" != x; then
46824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46827    fi
46828
46829    # Use eval to expand a potential ~
46830    eval path="$path"
46831    if test ! -f "$path" && test ! -d "$path"; then
46832      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46833    fi
46834
46835    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46836  fi
46837
46838
46839    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46841$as_echo_n "checking for freetype includes... " >&6; }
46842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46843$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46844    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46846$as_echo_n "checking for freetype libraries... " >&6; }
46847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46848$as_echo "$FREETYPE_LIB_PATH" >&6; }
46849  fi
46850
46851          fi
46852
46853          if test "x$FOUND_FREETYPE" != xyes; then
46854            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46855
46856  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46857  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46858  METHOD="well-known location"
46859
46860  # First check if the files exists.
46861  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46862    # We found an arbitrary include file. That's a good sign.
46863    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46864$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46865    FOUND_FREETYPE=yes
46866
46867    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46868    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46869      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46871      FOUND_FREETYPE=no
46872    else
46873      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46874        # On Windows, we will need both .lib and .dll file.
46875        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46876          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46877$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46878          FOUND_FREETYPE=no
46879        fi
46880      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46881        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46882        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46883      fi
46884    fi
46885  fi
46886
46887  if test "x$FOUND_FREETYPE" = xyes; then
46888
46889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46890
46891  # Input might be given as Windows format, start by converting to
46892  # unix format.
46893  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46894  new_path=`$CYGPATH -u "$path"`
46895
46896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46899  # "foo.exe" is OK but "foo" is an error.
46900  #
46901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46902  # It is also a way to make sure we got the proper file name for the real test later on.
46903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46904  if test "x$test_shortpath" = x; then
46905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46906$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46907    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46908  fi
46909
46910  # Call helper function which possibly converts this using DOS-style short mode.
46911  # If so, the updated path is stored in $new_path.
46912
46913  input_path="$new_path"
46914  # Check if we need to convert this using DOS-style short mode. If the path
46915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46916  # take no chances and rewrite it.
46917  # Note: m4 eats our [], so we need to use [ and ] instead.
46918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46919  if test "x$has_forbidden_chars" != x; then
46920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46924      # Going to short mode and back again did indeed matter. Since short mode is
46925      # case insensitive, let's make it lowercase to improve readability.
46926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46927      # Now convert it back to Unix-style (cygpath)
46928      input_path=`$CYGPATH -u "$shortmode_path"`
46929      new_path="$input_path"
46930    fi
46931  fi
46932
46933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46934  if test "x$test_cygdrive_prefix" = x; then
46935    # As a simple fix, exclude /usr/bin since it's not a real path.
46936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46938      # a path prefixed by /cygdrive for fixpath to work.
46939      new_path="$CYGWIN_ROOT_PATH$input_path"
46940    fi
46941  fi
46942
46943
46944  if test "x$path" != "x$new_path"; then
46945    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46948  fi
46949
46950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46951
46952  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46953  has_colon=`$ECHO $path | $GREP ^.:`
46954  new_path="$path"
46955  if test "x$has_colon" = x; then
46956    # Not in mixed or Windows style, start by that.
46957    new_path=`cmd //c echo $path`
46958  fi
46959
46960
46961  input_path="$new_path"
46962  # Check if we need to convert this using DOS-style short mode. If the path
46963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46964  # take no chances and rewrite it.
46965  # Note: m4 eats our [], so we need to use [ and ] instead.
46966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46967  if test "x$has_forbidden_chars" != x; then
46968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46970  fi
46971
46972
46973  windows_path="$new_path"
46974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46975    unix_path=`$CYGPATH -u "$windows_path"`
46976    new_path="$unix_path"
46977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46979    new_path="$unix_path"
46980  fi
46981
46982  if test "x$path" != "x$new_path"; then
46983    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46986  fi
46987
46988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46990
46991  else
46992    # We're on a posix platform. Hooray! :)
46993    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46994    has_space=`$ECHO "$path" | $GREP " "`
46995    if test "x$has_space" != x; then
46996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46999    fi
47000
47001    # Use eval to expand a potential ~
47002    eval path="$path"
47003    if test ! -f "$path" && test ! -d "$path"; then
47004      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47005    fi
47006
47007    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47008  fi
47009
47010
47011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47012
47013  # Input might be given as Windows format, start by converting to
47014  # unix format.
47015  path="$POTENTIAL_FREETYPE_LIB_PATH"
47016  new_path=`$CYGPATH -u "$path"`
47017
47018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47021  # "foo.exe" is OK but "foo" is an error.
47022  #
47023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47024  # It is also a way to make sure we got the proper file name for the real test later on.
47025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47026  if test "x$test_shortpath" = x; then
47027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47030  fi
47031
47032  # Call helper function which possibly converts this using DOS-style short mode.
47033  # If so, the updated path is stored in $new_path.
47034
47035  input_path="$new_path"
47036  # Check if we need to convert this using DOS-style short mode. If the path
47037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47038  # take no chances and rewrite it.
47039  # Note: m4 eats our [], so we need to use [ and ] instead.
47040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47041  if test "x$has_forbidden_chars" != x; then
47042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47046      # Going to short mode and back again did indeed matter. Since short mode is
47047      # case insensitive, let's make it lowercase to improve readability.
47048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47049      # Now convert it back to Unix-style (cygpath)
47050      input_path=`$CYGPATH -u "$shortmode_path"`
47051      new_path="$input_path"
47052    fi
47053  fi
47054
47055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47056  if test "x$test_cygdrive_prefix" = x; then
47057    # As a simple fix, exclude /usr/bin since it's not a real path.
47058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47060      # a path prefixed by /cygdrive for fixpath to work.
47061      new_path="$CYGWIN_ROOT_PATH$input_path"
47062    fi
47063  fi
47064
47065
47066  if test "x$path" != "x$new_path"; then
47067    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47070  fi
47071
47072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47073
47074  path="$POTENTIAL_FREETYPE_LIB_PATH"
47075  has_colon=`$ECHO $path | $GREP ^.:`
47076  new_path="$path"
47077  if test "x$has_colon" = x; then
47078    # Not in mixed or Windows style, start by that.
47079    new_path=`cmd //c echo $path`
47080  fi
47081
47082
47083  input_path="$new_path"
47084  # Check if we need to convert this using DOS-style short mode. If the path
47085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47086  # take no chances and rewrite it.
47087  # Note: m4 eats our [], so we need to use [ and ] instead.
47088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47089  if test "x$has_forbidden_chars" != x; then
47090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47092  fi
47093
47094
47095  windows_path="$new_path"
47096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47097    unix_path=`$CYGPATH -u "$windows_path"`
47098    new_path="$unix_path"
47099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47101    new_path="$unix_path"
47102  fi
47103
47104  if test "x$path" != "x$new_path"; then
47105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47108  fi
47109
47110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47112
47113  else
47114    # We're on a posix platform. Hooray! :)
47115    path="$POTENTIAL_FREETYPE_LIB_PATH"
47116    has_space=`$ECHO "$path" | $GREP " "`
47117    if test "x$has_space" != x; then
47118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47121    fi
47122
47123    # Use eval to expand a potential ~
47124    eval path="$path"
47125    if test ! -f "$path" && test ! -d "$path"; then
47126      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47127    fi
47128
47129    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47130  fi
47131
47132
47133    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47135$as_echo_n "checking for freetype includes... " >&6; }
47136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47137$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47138    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47140$as_echo_n "checking for freetype libraries... " >&6; }
47141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47142$as_echo "$FREETYPE_LIB_PATH" >&6; }
47143  fi
47144
47145          fi
47146
47147          if test "x$FOUND_FREETYPE" != xyes; then
47148            FREETYPE_BASE_DIR="$SYSROOT/usr"
47149            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47150
47151  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47152  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47153  METHOD="well-known location"
47154
47155  # First check if the files exists.
47156  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47157    # We found an arbitrary include file. That's a good sign.
47158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47159$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47160    FOUND_FREETYPE=yes
47161
47162    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47163    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47164      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47166      FOUND_FREETYPE=no
47167    else
47168      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47169        # On Windows, we will need both .lib and .dll file.
47170        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47171          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47172$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47173          FOUND_FREETYPE=no
47174        fi
47175      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
47176        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
47177        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
47178      fi
47179    fi
47180  fi
47181
47182  if test "x$FOUND_FREETYPE" = xyes; then
47183
47184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47185
47186  # Input might be given as Windows format, start by converting to
47187  # unix format.
47188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47189  new_path=`$CYGPATH -u "$path"`
47190
47191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47194  # "foo.exe" is OK but "foo" is an error.
47195  #
47196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47197  # It is also a way to make sure we got the proper file name for the real test later on.
47198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47199  if test "x$test_shortpath" = x; then
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47203  fi
47204
47205  # Call helper function which possibly converts this using DOS-style short mode.
47206  # If so, the updated path is stored in $new_path.
47207
47208  input_path="$new_path"
47209  # Check if we need to convert this using DOS-style short mode. If the path
47210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47211  # take no chances and rewrite it.
47212  # Note: m4 eats our [], so we need to use [ and ] instead.
47213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47214  if test "x$has_forbidden_chars" != x; then
47215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47219      # Going to short mode and back again did indeed matter. Since short mode is
47220      # case insensitive, let's make it lowercase to improve readability.
47221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47222      # Now convert it back to Unix-style (cygpath)
47223      input_path=`$CYGPATH -u "$shortmode_path"`
47224      new_path="$input_path"
47225    fi
47226  fi
47227
47228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47229  if test "x$test_cygdrive_prefix" = x; then
47230    # As a simple fix, exclude /usr/bin since it's not a real path.
47231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47233      # a path prefixed by /cygdrive for fixpath to work.
47234      new_path="$CYGWIN_ROOT_PATH$input_path"
47235    fi
47236  fi
47237
47238
47239  if test "x$path" != "x$new_path"; then
47240    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47243  fi
47244
47245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47246
47247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47248  has_colon=`$ECHO $path | $GREP ^.:`
47249  new_path="$path"
47250  if test "x$has_colon" = x; then
47251    # Not in mixed or Windows style, start by that.
47252    new_path=`cmd //c echo $path`
47253  fi
47254
47255
47256  input_path="$new_path"
47257  # Check if we need to convert this using DOS-style short mode. If the path
47258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47259  # take no chances and rewrite it.
47260  # Note: m4 eats our [], so we need to use [ and ] instead.
47261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47262  if test "x$has_forbidden_chars" != x; then
47263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47265  fi
47266
47267
47268  windows_path="$new_path"
47269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47270    unix_path=`$CYGPATH -u "$windows_path"`
47271    new_path="$unix_path"
47272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47274    new_path="$unix_path"
47275  fi
47276
47277  if test "x$path" != "x$new_path"; then
47278    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47281  fi
47282
47283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47285
47286  else
47287    # We're on a posix platform. Hooray! :)
47288    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47289    has_space=`$ECHO "$path" | $GREP " "`
47290    if test "x$has_space" != x; then
47291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47293      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47294    fi
47295
47296    # Use eval to expand a potential ~
47297    eval path="$path"
47298    if test ! -f "$path" && test ! -d "$path"; then
47299      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47300    fi
47301
47302    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47303  fi
47304
47305
47306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47307
47308  # Input might be given as Windows format, start by converting to
47309  # unix format.
47310  path="$POTENTIAL_FREETYPE_LIB_PATH"
47311  new_path=`$CYGPATH -u "$path"`
47312
47313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47316  # "foo.exe" is OK but "foo" is an error.
47317  #
47318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47319  # It is also a way to make sure we got the proper file name for the real test later on.
47320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47321  if test "x$test_shortpath" = x; then
47322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47324    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47325  fi
47326
47327  # Call helper function which possibly converts this using DOS-style short mode.
47328  # If so, the updated path is stored in $new_path.
47329
47330  input_path="$new_path"
47331  # Check if we need to convert this using DOS-style short mode. If the path
47332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47333  # take no chances and rewrite it.
47334  # Note: m4 eats our [], so we need to use [ and ] instead.
47335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47336  if test "x$has_forbidden_chars" != x; then
47337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47341      # Going to short mode and back again did indeed matter. Since short mode is
47342      # case insensitive, let's make it lowercase to improve readability.
47343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47344      # Now convert it back to Unix-style (cygpath)
47345      input_path=`$CYGPATH -u "$shortmode_path"`
47346      new_path="$input_path"
47347    fi
47348  fi
47349
47350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47351  if test "x$test_cygdrive_prefix" = x; then
47352    # As a simple fix, exclude /usr/bin since it's not a real path.
47353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47355      # a path prefixed by /cygdrive for fixpath to work.
47356      new_path="$CYGWIN_ROOT_PATH$input_path"
47357    fi
47358  fi
47359
47360
47361  if test "x$path" != "x$new_path"; then
47362    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47364$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47365  fi
47366
47367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47368
47369  path="$POTENTIAL_FREETYPE_LIB_PATH"
47370  has_colon=`$ECHO $path | $GREP ^.:`
47371  new_path="$path"
47372  if test "x$has_colon" = x; then
47373    # Not in mixed or Windows style, start by that.
47374    new_path=`cmd //c echo $path`
47375  fi
47376
47377
47378  input_path="$new_path"
47379  # Check if we need to convert this using DOS-style short mode. If the path
47380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47381  # take no chances and rewrite it.
47382  # Note: m4 eats our [], so we need to use [ and ] instead.
47383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47384  if test "x$has_forbidden_chars" != x; then
47385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47387  fi
47388
47389
47390  windows_path="$new_path"
47391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47392    unix_path=`$CYGPATH -u "$windows_path"`
47393    new_path="$unix_path"
47394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47396    new_path="$unix_path"
47397  fi
47398
47399  if test "x$path" != "x$new_path"; then
47400    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47403  fi
47404
47405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47407
47408  else
47409    # We're on a posix platform. Hooray! :)
47410    path="$POTENTIAL_FREETYPE_LIB_PATH"
47411    has_space=`$ECHO "$path" | $GREP " "`
47412    if test "x$has_space" != x; then
47413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47416    fi
47417
47418    # Use eval to expand a potential ~
47419    eval path="$path"
47420    if test ! -f "$path" && test ! -d "$path"; then
47421      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47422    fi
47423
47424    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47425  fi
47426
47427
47428    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47430$as_echo_n "checking for freetype includes... " >&6; }
47431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47432$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47433    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47435$as_echo_n "checking for freetype libraries... " >&6; }
47436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47437$as_echo "$FREETYPE_LIB_PATH" >&6; }
47438  fi
47439
47440            else
47441
47442  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47443  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47444  METHOD="well-known location"
47445
47446  # First check if the files exists.
47447  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47448    # We found an arbitrary include file. That's a good sign.
47449    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47450$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47451    FOUND_FREETYPE=yes
47452
47453    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47454    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47455      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47457      FOUND_FREETYPE=no
47458    else
47459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47460        # On Windows, we will need both .lib and .dll file.
47461        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47462          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47464          FOUND_FREETYPE=no
47465        fi
47466      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
47467        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
47468        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
47469      fi
47470    fi
47471  fi
47472
47473  if test "x$FOUND_FREETYPE" = xyes; then
47474
47475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47476
47477  # Input might be given as Windows format, start by converting to
47478  # unix format.
47479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47480  new_path=`$CYGPATH -u "$path"`
47481
47482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47485  # "foo.exe" is OK but "foo" is an error.
47486  #
47487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47488  # It is also a way to make sure we got the proper file name for the real test later on.
47489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47490  if test "x$test_shortpath" = x; then
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47493    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47494  fi
47495
47496  # Call helper function which possibly converts this using DOS-style short mode.
47497  # If so, the updated path is stored in $new_path.
47498
47499  input_path="$new_path"
47500  # Check if we need to convert this using DOS-style short mode. If the path
47501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47502  # take no chances and rewrite it.
47503  # Note: m4 eats our [], so we need to use [ and ] instead.
47504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47505  if test "x$has_forbidden_chars" != x; then
47506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47510      # Going to short mode and back again did indeed matter. Since short mode is
47511      # case insensitive, let's make it lowercase to improve readability.
47512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47513      # Now convert it back to Unix-style (cygpath)
47514      input_path=`$CYGPATH -u "$shortmode_path"`
47515      new_path="$input_path"
47516    fi
47517  fi
47518
47519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47520  if test "x$test_cygdrive_prefix" = x; then
47521    # As a simple fix, exclude /usr/bin since it's not a real path.
47522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47524      # a path prefixed by /cygdrive for fixpath to work.
47525      new_path="$CYGWIN_ROOT_PATH$input_path"
47526    fi
47527  fi
47528
47529
47530  if test "x$path" != "x$new_path"; then
47531    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47534  fi
47535
47536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47537
47538  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47539  has_colon=`$ECHO $path | $GREP ^.:`
47540  new_path="$path"
47541  if test "x$has_colon" = x; then
47542    # Not in mixed or Windows style, start by that.
47543    new_path=`cmd //c echo $path`
47544  fi
47545
47546
47547  input_path="$new_path"
47548  # Check if we need to convert this using DOS-style short mode. If the path
47549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47550  # take no chances and rewrite it.
47551  # Note: m4 eats our [], so we need to use [ and ] instead.
47552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47553  if test "x$has_forbidden_chars" != x; then
47554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47556  fi
47557
47558
47559  windows_path="$new_path"
47560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47561    unix_path=`$CYGPATH -u "$windows_path"`
47562    new_path="$unix_path"
47563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47565    new_path="$unix_path"
47566  fi
47567
47568  if test "x$path" != "x$new_path"; then
47569    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47571$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47572  fi
47573
47574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47576
47577  else
47578    # We're on a posix platform. Hooray! :)
47579    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47580    has_space=`$ECHO "$path" | $GREP " "`
47581    if test "x$has_space" != x; then
47582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47584      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47585    fi
47586
47587    # Use eval to expand a potential ~
47588    eval path="$path"
47589    if test ! -f "$path" && test ! -d "$path"; then
47590      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47591    fi
47592
47593    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47594  fi
47595
47596
47597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47598
47599  # Input might be given as Windows format, start by converting to
47600  # unix format.
47601  path="$POTENTIAL_FREETYPE_LIB_PATH"
47602  new_path=`$CYGPATH -u "$path"`
47603
47604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47607  # "foo.exe" is OK but "foo" is an error.
47608  #
47609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47610  # It is also a way to make sure we got the proper file name for the real test later on.
47611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47612  if test "x$test_shortpath" = x; then
47613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47615    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47616  fi
47617
47618  # Call helper function which possibly converts this using DOS-style short mode.
47619  # If so, the updated path is stored in $new_path.
47620
47621  input_path="$new_path"
47622  # Check if we need to convert this using DOS-style short mode. If the path
47623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47624  # take no chances and rewrite it.
47625  # Note: m4 eats our [], so we need to use [ and ] instead.
47626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47627  if test "x$has_forbidden_chars" != x; then
47628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47632      # Going to short mode and back again did indeed matter. Since short mode is
47633      # case insensitive, let's make it lowercase to improve readability.
47634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47635      # Now convert it back to Unix-style (cygpath)
47636      input_path=`$CYGPATH -u "$shortmode_path"`
47637      new_path="$input_path"
47638    fi
47639  fi
47640
47641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47642  if test "x$test_cygdrive_prefix" = x; then
47643    # As a simple fix, exclude /usr/bin since it's not a real path.
47644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47646      # a path prefixed by /cygdrive for fixpath to work.
47647      new_path="$CYGWIN_ROOT_PATH$input_path"
47648    fi
47649  fi
47650
47651
47652  if test "x$path" != "x$new_path"; then
47653    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47656  fi
47657
47658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47659
47660  path="$POTENTIAL_FREETYPE_LIB_PATH"
47661  has_colon=`$ECHO $path | $GREP ^.:`
47662  new_path="$path"
47663  if test "x$has_colon" = x; then
47664    # Not in mixed or Windows style, start by that.
47665    new_path=`cmd //c echo $path`
47666  fi
47667
47668
47669  input_path="$new_path"
47670  # Check if we need to convert this using DOS-style short mode. If the path
47671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47672  # take no chances and rewrite it.
47673  # Note: m4 eats our [], so we need to use [ and ] instead.
47674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47675  if test "x$has_forbidden_chars" != x; then
47676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47678  fi
47679
47680
47681  windows_path="$new_path"
47682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47683    unix_path=`$CYGPATH -u "$windows_path"`
47684    new_path="$unix_path"
47685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47687    new_path="$unix_path"
47688  fi
47689
47690  if test "x$path" != "x$new_path"; then
47691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47694  fi
47695
47696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47698
47699  else
47700    # We're on a posix platform. Hooray! :)
47701    path="$POTENTIAL_FREETYPE_LIB_PATH"
47702    has_space=`$ECHO "$path" | $GREP " "`
47703    if test "x$has_space" != x; then
47704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47706      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47707    fi
47708
47709    # Use eval to expand a potential ~
47710    eval path="$path"
47711    if test ! -f "$path" && test ! -d "$path"; then
47712      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47713    fi
47714
47715    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47716  fi
47717
47718
47719    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47721$as_echo_n "checking for freetype includes... " >&6; }
47722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47723$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47724    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47726$as_echo_n "checking for freetype libraries... " >&6; }
47727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47728$as_echo "$FREETYPE_LIB_PATH" >&6; }
47729  fi
47730
47731              if test "x$FOUND_FREETYPE" != xyes; then
47732
47733  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47734  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47735  METHOD="well-known location"
47736
47737  # First check if the files exists.
47738  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47739    # We found an arbitrary include file. That's a good sign.
47740    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47741$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47742    FOUND_FREETYPE=yes
47743
47744    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47745    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47746      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47747$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47748      FOUND_FREETYPE=no
47749    else
47750      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47751        # On Windows, we will need both .lib and .dll file.
47752        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47753          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47754$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47755          FOUND_FREETYPE=no
47756        fi
47757      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
47758        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
47759        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
47760      fi
47761    fi
47762  fi
47763
47764  if test "x$FOUND_FREETYPE" = xyes; then
47765
47766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47767
47768  # Input might be given as Windows format, start by converting to
47769  # unix format.
47770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47771  new_path=`$CYGPATH -u "$path"`
47772
47773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47776  # "foo.exe" is OK but "foo" is an error.
47777  #
47778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47779  # It is also a way to make sure we got the proper file name for the real test later on.
47780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47781  if test "x$test_shortpath" = x; then
47782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47784    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47785  fi
47786
47787  # Call helper function which possibly converts this using DOS-style short mode.
47788  # If so, the updated path is stored in $new_path.
47789
47790  input_path="$new_path"
47791  # Check if we need to convert this using DOS-style short mode. If the path
47792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47793  # take no chances and rewrite it.
47794  # Note: m4 eats our [], so we need to use [ and ] instead.
47795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47796  if test "x$has_forbidden_chars" != x; then
47797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47801      # Going to short mode and back again did indeed matter. Since short mode is
47802      # case insensitive, let's make it lowercase to improve readability.
47803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47804      # Now convert it back to Unix-style (cygpath)
47805      input_path=`$CYGPATH -u "$shortmode_path"`
47806      new_path="$input_path"
47807    fi
47808  fi
47809
47810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47811  if test "x$test_cygdrive_prefix" = x; then
47812    # As a simple fix, exclude /usr/bin since it's not a real path.
47813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47815      # a path prefixed by /cygdrive for fixpath to work.
47816      new_path="$CYGWIN_ROOT_PATH$input_path"
47817    fi
47818  fi
47819
47820
47821  if test "x$path" != "x$new_path"; then
47822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47825  fi
47826
47827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47828
47829  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47830  has_colon=`$ECHO $path | $GREP ^.:`
47831  new_path="$path"
47832  if test "x$has_colon" = x; then
47833    # Not in mixed or Windows style, start by that.
47834    new_path=`cmd //c echo $path`
47835  fi
47836
47837
47838  input_path="$new_path"
47839  # Check if we need to convert this using DOS-style short mode. If the path
47840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47841  # take no chances and rewrite it.
47842  # Note: m4 eats our [], so we need to use [ and ] instead.
47843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47844  if test "x$has_forbidden_chars" != x; then
47845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47847  fi
47848
47849
47850  windows_path="$new_path"
47851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47852    unix_path=`$CYGPATH -u "$windows_path"`
47853    new_path="$unix_path"
47854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47856    new_path="$unix_path"
47857  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47867
47868  else
47869    # We're on a posix platform. Hooray! :)
47870    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47871    has_space=`$ECHO "$path" | $GREP " "`
47872    if test "x$has_space" != x; then
47873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47875      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47876    fi
47877
47878    # Use eval to expand a potential ~
47879    eval path="$path"
47880    if test ! -f "$path" && test ! -d "$path"; then
47881      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47882    fi
47883
47884    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47885  fi
47886
47887
47888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47889
47890  # Input might be given as Windows format, start by converting to
47891  # unix format.
47892  path="$POTENTIAL_FREETYPE_LIB_PATH"
47893  new_path=`$CYGPATH -u "$path"`
47894
47895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47898  # "foo.exe" is OK but "foo" is an error.
47899  #
47900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47901  # It is also a way to make sure we got the proper file name for the real test later on.
47902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47903  if test "x$test_shortpath" = x; then
47904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47907  fi
47908
47909  # Call helper function which possibly converts this using DOS-style short mode.
47910  # If so, the updated path is stored in $new_path.
47911
47912  input_path="$new_path"
47913  # Check if we need to convert this using DOS-style short mode. If the path
47914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47915  # take no chances and rewrite it.
47916  # Note: m4 eats our [], so we need to use [ and ] instead.
47917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47918  if test "x$has_forbidden_chars" != x; then
47919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47923      # Going to short mode and back again did indeed matter. Since short mode is
47924      # case insensitive, let's make it lowercase to improve readability.
47925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47926      # Now convert it back to Unix-style (cygpath)
47927      input_path=`$CYGPATH -u "$shortmode_path"`
47928      new_path="$input_path"
47929    fi
47930  fi
47931
47932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47933  if test "x$test_cygdrive_prefix" = x; then
47934    # As a simple fix, exclude /usr/bin since it's not a real path.
47935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47937      # a path prefixed by /cygdrive for fixpath to work.
47938      new_path="$CYGWIN_ROOT_PATH$input_path"
47939    fi
47940  fi
47941
47942
47943  if test "x$path" != "x$new_path"; then
47944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47947  fi
47948
47949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47950
47951  path="$POTENTIAL_FREETYPE_LIB_PATH"
47952  has_colon=`$ECHO $path | $GREP ^.:`
47953  new_path="$path"
47954  if test "x$has_colon" = x; then
47955    # Not in mixed or Windows style, start by that.
47956    new_path=`cmd //c echo $path`
47957  fi
47958
47959
47960  input_path="$new_path"
47961  # Check if we need to convert this using DOS-style short mode. If the path
47962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47963  # take no chances and rewrite it.
47964  # Note: m4 eats our [], so we need to use [ and ] instead.
47965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47966  if test "x$has_forbidden_chars" != x; then
47967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47969  fi
47970
47971
47972  windows_path="$new_path"
47973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47974    unix_path=`$CYGPATH -u "$windows_path"`
47975    new_path="$unix_path"
47976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47978    new_path="$unix_path"
47979  fi
47980
47981  if test "x$path" != "x$new_path"; then
47982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47985  fi
47986
47987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47989
47990  else
47991    # We're on a posix platform. Hooray! :)
47992    path="$POTENTIAL_FREETYPE_LIB_PATH"
47993    has_space=`$ECHO "$path" | $GREP " "`
47994    if test "x$has_space" != x; then
47995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47998    fi
47999
48000    # Use eval to expand a potential ~
48001    eval path="$path"
48002    if test ! -f "$path" && test ! -d "$path"; then
48003      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48004    fi
48005
48006    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48007  fi
48008
48009
48010    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48012$as_echo_n "checking for freetype includes... " >&6; }
48013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48014$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48015    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48017$as_echo_n "checking for freetype libraries... " >&6; }
48018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48019$as_echo "$FREETYPE_LIB_PATH" >&6; }
48020  fi
48021
48022              fi
48023            fi
48024          fi
48025        fi
48026      fi # end check in well-known locations
48027
48028      if test "x$FOUND_FREETYPE" != xyes; then
48029
48030  # Print a helpful message on how to acquire the necessary build dependency.
48031  # freetype is the help tag: freetype, cups, pulse, alsa etc
48032  MISSING_DEPENDENCY=freetype
48033
48034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48035    cygwin_help $MISSING_DEPENDENCY
48036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48037    msys_help $MISSING_DEPENDENCY
48038  else
48039    PKGHANDLER_COMMAND=
48040
48041    case $PKGHANDLER in
48042      apt-get)
48043        apt_help     $MISSING_DEPENDENCY ;;
48044      yum)
48045        yum_help     $MISSING_DEPENDENCY ;;
48046      port)
48047        port_help    $MISSING_DEPENDENCY ;;
48048      pkgutil)
48049        pkgutil_help $MISSING_DEPENDENCY ;;
48050      pkgadd)
48051        pkgadd_help  $MISSING_DEPENDENCY ;;
48052    esac
48053
48054    if test "x$PKGHANDLER_COMMAND" != x; then
48055      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48056    fi
48057  fi
48058
48059        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48060      fi
48061    fi # end user specified settings
48062
48063    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48064    if test "x$FREETYPE_CFLAGS" = x; then
48065
48066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48067
48068  # Input might be given as Windows format, start by converting to
48069  # unix format.
48070  path="$FREETYPE_INCLUDE_PATH"
48071  new_path=`$CYGPATH -u "$path"`
48072
48073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48076  # "foo.exe" is OK but "foo" is an error.
48077  #
48078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48079  # It is also a way to make sure we got the proper file name for the real test later on.
48080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48081  if test "x$test_shortpath" = x; then
48082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48083$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48084    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48085  fi
48086
48087  # Call helper function which possibly converts this using DOS-style short mode.
48088  # If so, the updated path is stored in $new_path.
48089
48090  input_path="$new_path"
48091  # Check if we need to convert this using DOS-style short mode. If the path
48092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48093  # take no chances and rewrite it.
48094  # Note: m4 eats our [], so we need to use [ and ] instead.
48095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48096  if test "x$has_forbidden_chars" != x; then
48097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48101      # Going to short mode and back again did indeed matter. Since short mode is
48102      # case insensitive, let's make it lowercase to improve readability.
48103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48104      # Now convert it back to Unix-style (cygpath)
48105      input_path=`$CYGPATH -u "$shortmode_path"`
48106      new_path="$input_path"
48107    fi
48108  fi
48109
48110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48111  if test "x$test_cygdrive_prefix" = x; then
48112    # As a simple fix, exclude /usr/bin since it's not a real path.
48113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48115      # a path prefixed by /cygdrive for fixpath to work.
48116      new_path="$CYGWIN_ROOT_PATH$input_path"
48117    fi
48118  fi
48119
48120
48121  if test "x$path" != "x$new_path"; then
48122    FREETYPE_INCLUDE_PATH="$new_path"
48123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48124$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48125  fi
48126
48127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48128
48129  path="$FREETYPE_INCLUDE_PATH"
48130  has_colon=`$ECHO $path | $GREP ^.:`
48131  new_path="$path"
48132  if test "x$has_colon" = x; then
48133    # Not in mixed or Windows style, start by that.
48134    new_path=`cmd //c echo $path`
48135  fi
48136
48137
48138  input_path="$new_path"
48139  # Check if we need to convert this using DOS-style short mode. If the path
48140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48141  # take no chances and rewrite it.
48142  # Note: m4 eats our [], so we need to use [ and ] instead.
48143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48144  if test "x$has_forbidden_chars" != x; then
48145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48147  fi
48148
48149
48150  windows_path="$new_path"
48151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48152    unix_path=`$CYGPATH -u "$windows_path"`
48153    new_path="$unix_path"
48154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48156    new_path="$unix_path"
48157  fi
48158
48159  if test "x$path" != "x$new_path"; then
48160    FREETYPE_INCLUDE_PATH="$new_path"
48161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48162$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48163  fi
48164
48165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48167
48168  else
48169    # We're on a posix platform. Hooray! :)
48170    path="$FREETYPE_INCLUDE_PATH"
48171    has_space=`$ECHO "$path" | $GREP " "`
48172    if test "x$has_space" != x; then
48173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48174$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48176    fi
48177
48178    # Use eval to expand a potential ~
48179    eval path="$path"
48180    if test ! -f "$path" && test ! -d "$path"; then
48181      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48182    fi
48183
48184    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48185  fi
48186
48187      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48188        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48189      else
48190        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48191      fi
48192    fi
48193
48194    if test "x$FREETYPE_LIBS" = x; then
48195
48196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48197
48198  # Input might be given as Windows format, start by converting to
48199  # unix format.
48200  path="$FREETYPE_LIB_PATH"
48201  new_path=`$CYGPATH -u "$path"`
48202
48203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48206  # "foo.exe" is OK but "foo" is an error.
48207  #
48208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48209  # It is also a way to make sure we got the proper file name for the real test later on.
48210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48211  if test "x$test_shortpath" = x; then
48212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48213$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48214    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48215  fi
48216
48217  # Call helper function which possibly converts this using DOS-style short mode.
48218  # If so, the updated path is stored in $new_path.
48219
48220  input_path="$new_path"
48221  # Check if we need to convert this using DOS-style short mode. If the path
48222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48223  # take no chances and rewrite it.
48224  # Note: m4 eats our [], so we need to use [ and ] instead.
48225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48226  if test "x$has_forbidden_chars" != x; then
48227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48231      # Going to short mode and back again did indeed matter. Since short mode is
48232      # case insensitive, let's make it lowercase to improve readability.
48233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48234      # Now convert it back to Unix-style (cygpath)
48235      input_path=`$CYGPATH -u "$shortmode_path"`
48236      new_path="$input_path"
48237    fi
48238  fi
48239
48240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48241  if test "x$test_cygdrive_prefix" = x; then
48242    # As a simple fix, exclude /usr/bin since it's not a real path.
48243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48245      # a path prefixed by /cygdrive for fixpath to work.
48246      new_path="$CYGWIN_ROOT_PATH$input_path"
48247    fi
48248  fi
48249
48250
48251  if test "x$path" != "x$new_path"; then
48252    FREETYPE_LIB_PATH="$new_path"
48253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48254$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48255  fi
48256
48257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48258
48259  path="$FREETYPE_LIB_PATH"
48260  has_colon=`$ECHO $path | $GREP ^.:`
48261  new_path="$path"
48262  if test "x$has_colon" = x; then
48263    # Not in mixed or Windows style, start by that.
48264    new_path=`cmd //c echo $path`
48265  fi
48266
48267
48268  input_path="$new_path"
48269  # Check if we need to convert this using DOS-style short mode. If the path
48270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48271  # take no chances and rewrite it.
48272  # Note: m4 eats our [], so we need to use [ and ] instead.
48273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48274  if test "x$has_forbidden_chars" != x; then
48275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48277  fi
48278
48279
48280  windows_path="$new_path"
48281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48282    unix_path=`$CYGPATH -u "$windows_path"`
48283    new_path="$unix_path"
48284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48286    new_path="$unix_path"
48287  fi
48288
48289  if test "x$path" != "x$new_path"; then
48290    FREETYPE_LIB_PATH="$new_path"
48291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48292$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48293  fi
48294
48295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48297
48298  else
48299    # We're on a posix platform. Hooray! :)
48300    path="$FREETYPE_LIB_PATH"
48301    has_space=`$ECHO "$path" | $GREP " "`
48302    if test "x$has_space" != x; then
48303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48304$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48305      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48306    fi
48307
48308    # Use eval to expand a potential ~
48309    eval path="$path"
48310    if test ! -f "$path" && test ! -d "$path"; then
48311      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48312    fi
48313
48314    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48315  fi
48316
48317      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48318        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
48319      else
48320        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
48321      fi
48322    fi
48323
48324    # Try to compile it
48325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48326$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48327    ac_ext=cpp
48328ac_cpp='$CXXCPP $CPPFLAGS'
48329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48332
48333    PREV_CXXCFLAGS="$CXXFLAGS"
48334    PREV_LIBS="$LIBS"
48335    PREV_CXX="$CXX"
48336    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48337    LIBS="$LIBS $FREETYPE_LIBS"
48338    CXX="$FIXPATH $CXX"
48339    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48340/* end confdefs.h.  */
48341
48342          #include<ft2build.h>
48343          #include FT_FREETYPE_H
48344          int main () {
48345            FT_Init_FreeType(NULL);
48346            return 0;
48347          }
48348
48349_ACEOF
48350if ac_fn_cxx_try_link "$LINENO"; then :
48351
48352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48353$as_echo "yes" >&6; }
48354
48355else
48356
48357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48358$as_echo "no" >&6; }
48359          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48360$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48361          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48362$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48363
48364
48365  # Print a helpful message on how to acquire the necessary build dependency.
48366  # freetype is the help tag: freetype, cups, pulse, alsa etc
48367  MISSING_DEPENDENCY=freetype
48368
48369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48370    cygwin_help $MISSING_DEPENDENCY
48371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48372    msys_help $MISSING_DEPENDENCY
48373  else
48374    PKGHANDLER_COMMAND=
48375
48376    case $PKGHANDLER in
48377      apt-get)
48378        apt_help     $MISSING_DEPENDENCY ;;
48379      yum)
48380        yum_help     $MISSING_DEPENDENCY ;;
48381      port)
48382        port_help    $MISSING_DEPENDENCY ;;
48383      pkgutil)
48384        pkgutil_help $MISSING_DEPENDENCY ;;
48385      pkgadd)
48386        pkgadd_help  $MISSING_DEPENDENCY ;;
48387    esac
48388
48389    if test "x$PKGHANDLER_COMMAND" != x; then
48390      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48391    fi
48392  fi
48393
48394
48395          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48396
48397
48398fi
48399rm -f core conftest.err conftest.$ac_objext \
48400    conftest$ac_exeext conftest.$ac_ext
48401    CXXCFLAGS="$PREV_CXXFLAGS"
48402    LIBS="$PREV_LIBS"
48403    CXX="$PREV_CXX"
48404    ac_ext=cpp
48405ac_cpp='$CXXCPP $CPPFLAGS'
48406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48409
48410
48411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48412$as_echo_n "checking if we should bundle freetype... " >&6; }
48413    if test "x$BUNDLE_FREETYPE" = xyes; then
48414      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48415    fi
48416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48417$as_echo "$BUNDLE_FREETYPE" >&6; }
48418
48419  fi # end freetype needed
48420
48421
48422
48423
48424
48425
48426
48427  ###############################################################################
48428  #
48429  # Check for alsa headers and libraries. Used on Linux/GNU and BSD systems.
48430  #
48431
48432# Check whether --with-alsa was given.
48433if test "${with_alsa+set}" = set; then :
48434  withval=$with_alsa;
48435fi
48436
48437
48438# Check whether --with-alsa-include was given.
48439if test "${with_alsa_include+set}" = set; then :
48440  withval=$with_alsa_include;
48441fi
48442
48443
48444# Check whether --with-alsa-lib was given.
48445if test "${with_alsa_lib+set}" = set; then :
48446  withval=$with_alsa_lib;
48447fi
48448
48449
48450  if test "x$ALSA_NOT_NEEDED" = xyes; then
48451    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48452      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48453$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48454    fi
48455    ALSA_CFLAGS=
48456    ALSA_LIBS=
48457  else
48458    ALSA_FOUND=no
48459
48460    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48461      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48462    fi
48463
48464    if test "x${with_alsa}" != x; then
48465      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48466      ALSA_CFLAGS="-I${with_alsa}/include"
48467      ALSA_FOUND=yes
48468    fi
48469    if test "x${with_alsa_include}" != x; then
48470      ALSA_CFLAGS="-I${with_alsa_include}"
48471      ALSA_FOUND=yes
48472    fi
48473    if test "x${with_alsa_lib}" != x; then
48474      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48475      ALSA_FOUND=yes
48476    fi
48477    if test "x$ALSA_FOUND" = xno; then
48478
48479
48480  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48481    # Source the builddeps file again, to make sure it uses the latest variables!
48482    . $builddepsfile
48483    # Look for a target and build machine specific resource!
48484    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48485    if test "x$resource" = x; then
48486      # Ok, lets instead look for a target specific resource
48487      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48488    fi
48489    if test "x$resource" = x; then
48490      # Ok, lets instead look for a build specific resource
48491      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48492    fi
48493    if test "x$resource" = x; then
48494      # Ok, lets instead look for a generic resource
48495      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48496      resource=${builddep_alsa}
48497    fi
48498    if test "x$resource" != x; then
48499      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48500$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48501      # If the resource in the builddeps.conf file is an existing directory,
48502      # for example /java/linux/cups
48503      if test -d ${resource}; then
48504        depdir=${resource}
48505      else
48506
48507  # alsa is for example mymodule
48508  # $resource is for example libs/general/libmymod_1_2_3.zip
48509  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48510  # $with_builddeps_dir is for example /localhome/builddeps
48511  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48512  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48513  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48514  filename=`basename $resource`
48515  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48516  filebase=${filename%%.*}
48517  extension=${filename#*.}
48518  installdir=$with_builddeps_dir/$filebase
48519  if test ! -f $installdir/$filename.unpacked; then
48520    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48521$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48522    if test ! -d $installdir; then
48523      mkdir -p $installdir
48524    fi
48525    if test ! -d $installdir; then
48526      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48527    fi
48528    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48529    touch $tmpfile
48530    if test ! -f $tmpfile; then
48531      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48532    fi
48533
48534  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48535  # $tmpfile is the local file name for the downloaded file.
48536  VALID_TOOL=no
48537  if test "x$BDEPS_FTP" = xwget; then
48538    VALID_TOOL=yes
48539    wget -O $tmpfile $with_builddeps_server/$resource
48540  fi
48541  if test "x$BDEPS_FTP" = xlftp; then
48542    VALID_TOOL=yes
48543    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48544  fi
48545  if test "x$BDEPS_FTP" = xftp; then
48546    VALID_TOOL=yes
48547    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48548    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48549    FTPUSERPWD=${FTPSERVER%%@*}
48550    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48551      FTPUSER=${userpwd%%:*}
48552      FTPPWD=${userpwd#*@}
48553      FTPSERVER=${FTPSERVER#*@}
48554    else
48555      FTPUSER=ftp
48556      FTPPWD=ftp
48557    fi
48558    # the "pass" command does not work on some
48559    # ftp clients (read ftp.exe) but if it works,
48560    # passive mode is better!
48561    ( \
48562        echo "user $FTPUSER $FTPPWD"        ; \
48563        echo "pass"                         ; \
48564        echo "bin"                          ; \
48565        echo "get $FTPPATH $tmpfile"              ; \
48566    ) | ftp -in $FTPSERVER
48567  fi
48568  if test "x$VALID_TOOL" != xyes; then
48569    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48570  fi
48571
48572    mv $tmpfile $installdir/$filename
48573    if test ! -s $installdir/$filename; then
48574      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48575    fi
48576    case "$extension" in
48577      zip)  echo "Unzipping $installdir/$filename..."
48578        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48579        ;;
48580      tar.gz) echo "Untaring $installdir/$filename..."
48581        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48582        ;;
48583      tgz) echo "Untaring $installdir/$filename..."
48584        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48585        ;;
48586      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48587        ;;
48588    esac
48589  fi
48590  if test -f $installdir/$filename.unpacked; then
48591    depdir=$installdir
48592  fi
48593
48594      fi
48595      # Source the builddeps file again, because in the previous command, the depdir
48596      # was updated to point at the current build dependency install directory.
48597      . $builddepsfile
48598      # Now extract variables from the builddeps.conf files.
48599      theroot=${builddep_alsa_ROOT}
48600      thecflags=${builddep_alsa_CFLAGS}
48601      thelibs=${builddep_alsa_LIBS}
48602      if test "x$depdir" = x; then
48603        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48604      fi
48605      ALSA=$depdir
48606      if test "x$theroot" != x; then
48607        ALSA="$theroot"
48608      fi
48609      if test "x$thecflags" != x; then
48610        ALSA_CFLAGS="$thecflags"
48611      fi
48612      if test "x$thelibs" != x; then
48613        ALSA_LIBS="$thelibs"
48614      fi
48615      ALSA_FOUND=yes
48616      else ALSA_FOUND=no
48617
48618    fi
48619    else ALSA_FOUND=no
48620
48621  fi
48622
48623    fi
48624    # Do not try pkg-config if we have a sysroot set.
48625    if test "x$SYSROOT" = x; then
48626      if test "x$ALSA_FOUND" = xno; then
48627
48628pkg_failed=no
48629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48630$as_echo_n "checking for ALSA... " >&6; }
48631
48632if test -n "$ALSA_CFLAGS"; then
48633    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48634 elif test -n "$PKG_CONFIG"; then
48635    if test -n "$PKG_CONFIG" && \
48636    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48637  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48638  ac_status=$?
48639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48640  test $ac_status = 0; }; then
48641  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48642else
48643  pkg_failed=yes
48644fi
48645 else
48646    pkg_failed=untried
48647fi
48648if test -n "$ALSA_LIBS"; then
48649    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48650 elif test -n "$PKG_CONFIG"; then
48651    if test -n "$PKG_CONFIG" && \
48652    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48653  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48654  ac_status=$?
48655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48656  test $ac_status = 0; }; then
48657  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48658else
48659  pkg_failed=yes
48660fi
48661 else
48662    pkg_failed=untried
48663fi
48664
48665
48666
48667if test $pkg_failed = yes; then
48668
48669if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48670        _pkg_short_errors_supported=yes
48671else
48672        _pkg_short_errors_supported=no
48673fi
48674        if test $_pkg_short_errors_supported = yes; then
48675	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48676        else
48677	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48678        fi
48679	# Put the nasty error message in config.log where it belongs
48680	echo "$ALSA_PKG_ERRORS" >&5
48681
48682	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48683$as_echo "no" >&6; }
48684                ALSA_FOUND=no
48685elif test $pkg_failed = untried; then
48686	ALSA_FOUND=no
48687else
48688	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48689	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48691$as_echo "yes" >&6; }
48692	ALSA_FOUND=yes
48693fi
48694      fi
48695    fi
48696    if test "x$ALSA_FOUND" = xno; then
48697      for ac_header in alsa/asoundlib.h
48698do :
48699  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48700if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48701  cat >>confdefs.h <<_ACEOF
48702#define HAVE_ALSA_ASOUNDLIB_H 1
48703_ACEOF
48704
48705            ALSA_FOUND=yes
48706            ALSA_CFLAGS=-Iignoreme
48707            ALSA_LIBS=-lasound
48708            DEFAULT_ALSA=yes
48709
48710else
48711  ALSA_FOUND=no
48712fi
48713
48714done
48715
48716    fi
48717    if test "x$ALSA_FOUND" = xno; then
48718
48719  # Print a helpful message on how to acquire the necessary build dependency.
48720  # alsa is the help tag: freetype, cups, pulse, alsa etc
48721  MISSING_DEPENDENCY=alsa
48722
48723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48724    cygwin_help $MISSING_DEPENDENCY
48725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48726    msys_help $MISSING_DEPENDENCY
48727  else
48728    PKGHANDLER_COMMAND=
48729
48730    case $PKGHANDLER in
48731      apt-get)
48732        apt_help     $MISSING_DEPENDENCY ;;
48733      yum)
48734        yum_help     $MISSING_DEPENDENCY ;;
48735      port)
48736        port_help    $MISSING_DEPENDENCY ;;
48737      pkgutil)
48738        pkgutil_help $MISSING_DEPENDENCY ;;
48739      pkgadd)
48740        pkgadd_help  $MISSING_DEPENDENCY ;;
48741    esac
48742
48743    if test "x$PKGHANDLER_COMMAND" != x; then
48744      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48745    fi
48746  fi
48747
48748      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48749    fi
48750  fi
48751
48752
48753
48754
48755
48756
48757# Check whether --with-fontconfig was given.
48758if test "${with_fontconfig+set}" = set; then :
48759  withval=$with_fontconfig;
48760fi
48761
48762
48763# Check whether --with-fontconfig-include was given.
48764if test "${with_fontconfig_include+set}" = set; then :
48765  withval=$with_fontconfig_include;
48766fi
48767
48768
48769  if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
48770    if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
48771        (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
48772      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
48773$as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
48774    fi
48775    FONTCONFIG_CFLAGS=
48776  else
48777    FONTCONFIG_FOUND=no
48778
48779    if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
48780      as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
48781    fi
48782
48783    if test "x${with_fontconfig}" != x; then
48784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
48785$as_echo_n "checking for fontconfig headers... " >&6; }
48786      if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
48787        FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
48788        FONTCONFIG_FOUND=yes
48789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
48790$as_echo "$FONTCONFIG_FOUND" >&6; }
48791      else
48792        as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
48793      fi
48794    fi
48795    if test "x${with_fontconfig_include}" != x; then
48796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
48797$as_echo_n "checking for fontconfig headers... " >&6; }
48798      if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
48799        FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
48800        FONTCONFIG_FOUND=yes
48801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
48802$as_echo "$FONTCONFIG_FOUND" >&6; }
48803      else
48804        as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
48805      fi
48806    fi
48807    if test "x$FONTCONFIG_FOUND" = xno; then
48808      # Are the fontconfig headers installed in the default /usr/include location?
48809      for ac_header in fontconfig/fontconfig.h
48810do :
48811  ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
48812if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
48813  cat >>confdefs.h <<_ACEOF
48814#define HAVE_FONTCONFIG_FONTCONFIG_H 1
48815_ACEOF
48816
48817          FONTCONFIG_FOUND=yes
48818          FONTCONFIG_CFLAGS=
48819          DEFAULT_FONTCONFIG=yes
48820
48821fi
48822
48823done
48824
48825    fi
48826    if test "x$FONTCONFIG_FOUND" = xno; then
48827
48828  # Print a helpful message on how to acquire the necessary build dependency.
48829  # fontconfig is the help tag: freetype, cups, pulse, alsa etc
48830  MISSING_DEPENDENCY=fontconfig
48831
48832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48833    cygwin_help $MISSING_DEPENDENCY
48834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48835    msys_help $MISSING_DEPENDENCY
48836  else
48837    PKGHANDLER_COMMAND=
48838
48839    case $PKGHANDLER in
48840      apt-get)
48841        apt_help     $MISSING_DEPENDENCY ;;
48842      yum)
48843        yum_help     $MISSING_DEPENDENCY ;;
48844      port)
48845        port_help    $MISSING_DEPENDENCY ;;
48846      pkgutil)
48847        pkgutil_help $MISSING_DEPENDENCY ;;
48848      pkgadd)
48849        pkgadd_help  $MISSING_DEPENDENCY ;;
48850    esac
48851
48852    if test "x$PKGHANDLER_COMMAND" != x; then
48853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48854    fi
48855  fi
48856
48857      as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
48858    fi
48859  fi
48860
48861
48862
48863
48864
48865  ###############################################################################
48866  #
48867  # Check for the jpeg library
48868  #
48869
48870  USE_EXTERNAL_LIBJPEG=true
48871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
48872$as_echo_n "checking for main in -ljpeg... " >&6; }
48873if ${ac_cv_lib_jpeg_main+:} false; then :
48874  $as_echo_n "(cached) " >&6
48875else
48876  ac_check_lib_save_LIBS=$LIBS
48877LIBS="-ljpeg  $LIBS"
48878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48879/* end confdefs.h.  */
48880
48881
48882int
48883main ()
48884{
48885return main ();
48886  ;
48887  return 0;
48888}
48889_ACEOF
48890if ac_fn_cxx_try_link "$LINENO"; then :
48891  ac_cv_lib_jpeg_main=yes
48892else
48893  ac_cv_lib_jpeg_main=no
48894fi
48895rm -f core conftest.err conftest.$ac_objext \
48896    conftest$ac_exeext conftest.$ac_ext
48897LIBS=$ac_check_lib_save_LIBS
48898fi
48899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
48900$as_echo "$ac_cv_lib_jpeg_main" >&6; }
48901if test "x$ac_cv_lib_jpeg_main" = xyes; then :
48902  cat >>confdefs.h <<_ACEOF
48903#define HAVE_LIBJPEG 1
48904_ACEOF
48905
48906  LIBS="-ljpeg $LIBS"
48907
48908else
48909   USE_EXTERNAL_LIBJPEG=false
48910      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
48911$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
48912
48913fi
48914
48915
48916
48917  ###############################################################################
48918  #
48919  # Check for the gif library
48920  #
48921
48922
48923# Check whether --with-giflib was given.
48924if test "${with_giflib+set}" = set; then :
48925  withval=$with_giflib;
48926fi
48927
48928
48929
48930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48931$as_echo_n "checking for which giflib to use... " >&6; }
48932
48933  # default is bundled
48934  DEFAULT_GIFLIB=bundled
48935
48936  #
48937  # if user didn't specify, use DEFAULT_GIFLIB
48938  #
48939  if test "x${with_giflib}" = "x"; then
48940    with_giflib=${DEFAULT_GIFLIB}
48941  fi
48942
48943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48944$as_echo "${with_giflib}" >&6; }
48945
48946  if test "x${with_giflib}" = "xbundled"; then
48947    USE_EXTERNAL_LIBGIF=false
48948    GIFLIB_CFLAGS=
48949    GIFLIB_LDFLAGS=
48950  elif test "x${with_giflib}" = "xsystem"; then
48951    GIFLIB_H_FOUND=no
48952    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48953if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48954
48955           GIFLIB_H_FOUND=yes
48956           GIFLIB_CFLAGS=
48957
48958
48959fi
48960
48961
48962    if test "x$GIFLIB_H_FOUND" = xno; then
48963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for giflib headers" >&5
48964$as_echo_n "checking for giflib headers... " >&6; }
48965      if test -s ${PACKAGE_PATH}/include/gif_lib.h; then
48966        # Standard package location for BSD
48967        GIFLIB_H_FOUND=yes
48968        GIFLIB_CFLAGS="-I${PACKAGE_PATH}/include"
48969      fi
48970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIFLIB_H_FOUND" >&5
48971$as_echo "$GIFLIB_H_FOUND" >&6; }
48972    fi
48973    if test "x$GIFLIB_H_FOUND" = xno; then
48974
48975  # Print a helpful message on how to acquire the necessary build dependency.
48976  # giflib is the help tag: freetype, cups, pulse, alsa etc
48977  MISSING_DEPENDENCY=giflib
48978
48979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48980    cygwin_help $MISSING_DEPENDENCY
48981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48982    msys_help $MISSING_DEPENDENCY
48983  else
48984    PKGHANDLER_COMMAND=
48985
48986    case $PKGHANDLER in
48987      apt-get)
48988        apt_help     $MISSING_DEPENDENCY ;;
48989      yum)
48990        yum_help     $MISSING_DEPENDENCY ;;
48991      port)
48992        port_help    $MISSING_DEPENDENCY ;;
48993      pkgutil)
48994        pkgutil_help $MISSING_DEPENDENCY ;;
48995      pkgadd)
48996        pkgadd_help  $MISSING_DEPENDENCY ;;
48997    esac
48998
48999    if test "x$PKGHANDLER_COMMAND" != x; then
49000      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49001    fi
49002  fi
49003
49004      as_fn_error $? "Could not find giflib headers! $HELP_MSG " "$LINENO" 5
49005    fi
49006
49007    GIFLIB_LIB_FOUND=no
49008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49009$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49010if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49011  $as_echo_n "(cached) " >&6
49012else
49013  ac_check_lib_save_LIBS=$LIBS
49014LIBS="-lgif  $LIBS"
49015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49016/* end confdefs.h.  */
49017
49018/* Override any GCC internal prototype to avoid an error.
49019   Use char because int might match the return type of a GCC
49020   builtin and then its argument prototype would still apply.  */
49021#ifdef __cplusplus
49022extern "C"
49023#endif
49024char DGifGetCode ();
49025int
49026main ()
49027{
49028return DGifGetCode ();
49029  ;
49030  return 0;
49031}
49032_ACEOF
49033if ac_fn_cxx_try_link "$LINENO"; then :
49034  ac_cv_lib_gif_DGifGetCode=yes
49035else
49036  ac_cv_lib_gif_DGifGetCode=no
49037fi
49038rm -f core conftest.err conftest.$ac_objext \
49039    conftest$ac_exeext conftest.$ac_ext
49040LIBS=$ac_check_lib_save_LIBS
49041fi
49042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49043$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49044if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49045
49046           GIFLIB_LIB_FOUND=yes
49047           GIFLIB_LDFLAGS=
49048
49049
49050fi
49051
49052    if test "x$GIFLIB_LIB_FOUND" = xno; then
49053      save_LDFLAGS="$LDFLAGS"
49054      LDFLAGS="$LDFLAGS -L${PACKAGE_PATH}/lib"
49055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifOpen in -lgif" >&5
49056$as_echo_n "checking for DGifOpen in -lgif... " >&6; }
49057if ${ac_cv_lib_gif_DGifOpen+:} false; then :
49058  $as_echo_n "(cached) " >&6
49059else
49060  ac_check_lib_save_LIBS=$LIBS
49061LIBS="-lgif  $LIBS"
49062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49063/* end confdefs.h.  */
49064
49065/* Override any GCC internal prototype to avoid an error.
49066   Use char because int might match the return type of a GCC
49067   builtin and then its argument prototype would still apply.  */
49068#ifdef __cplusplus
49069extern "C"
49070#endif
49071char DGifOpen ();
49072int
49073main ()
49074{
49075return DGifOpen ();
49076  ;
49077  return 0;
49078}
49079_ACEOF
49080if ac_fn_cxx_try_link "$LINENO"; then :
49081  ac_cv_lib_gif_DGifOpen=yes
49082else
49083  ac_cv_lib_gif_DGifOpen=no
49084fi
49085rm -f core conftest.err conftest.$ac_objext \
49086    conftest$ac_exeext conftest.$ac_ext
49087LIBS=$ac_check_lib_save_LIBS
49088fi
49089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifOpen" >&5
49090$as_echo "$ac_cv_lib_gif_DGifOpen" >&6; }
49091if test "x$ac_cv_lib_gif_DGifOpen" = xyes; then :
49092
49093             GIFLIB_LIB_FOUND=yes
49094             GIFLIB_LDFLAGS="-L${PACKAGE_PATH}/lib"
49095
49096
49097fi
49098
49099      LDFLAGS="$save_LDFLAGS"
49100    fi
49101
49102    if test "x$GIFLIB_LIB_FOUND" = xno; then
49103
49104  # Print a helpful message on how to acquire the necessary build dependency.
49105  # giflib is the help tag: freetype, cups, pulse, alsa etc
49106  MISSING_DEPENDENCY=giflib
49107
49108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49109    cygwin_help $MISSING_DEPENDENCY
49110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49111    msys_help $MISSING_DEPENDENCY
49112  else
49113    PKGHANDLER_COMMAND=
49114
49115    case $PKGHANDLER in
49116      apt-get)
49117        apt_help     $MISSING_DEPENDENCY ;;
49118      yum)
49119        yum_help     $MISSING_DEPENDENCY ;;
49120      port)
49121        port_help    $MISSING_DEPENDENCY ;;
49122      pkgutil)
49123        pkgutil_help $MISSING_DEPENDENCY ;;
49124      pkgadd)
49125        pkgadd_help  $MISSING_DEPENDENCY ;;
49126    esac
49127
49128    if test "x$PKGHANDLER_COMMAND" != x; then
49129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49130    fi
49131  fi
49132
49133      as_fn_error $? "Could not find giflib library! $HELP_MSG " "$LINENO" 5
49134    fi
49135
49136    USE_EXTERNAL_LIBGIF=true
49137  else
49138    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49139  fi
49140
49141
49142
49143
49144  ###############################################################################
49145  #
49146  # Check for the zlib library
49147  #
49148
49149
49150# Check whether --with-zlib was given.
49151if test "${with_zlib+set}" = set; then :
49152  withval=$with_zlib;
49153fi
49154
49155
49156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49157$as_echo_n "checking for compress in -lz... " >&6; }
49158if ${ac_cv_lib_z_compress+:} false; then :
49159  $as_echo_n "(cached) " >&6
49160else
49161  ac_check_lib_save_LIBS=$LIBS
49162LIBS="-lz  $LIBS"
49163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49164/* end confdefs.h.  */
49165
49166/* Override any GCC internal prototype to avoid an error.
49167   Use char because int might match the return type of a GCC
49168   builtin and then its argument prototype would still apply.  */
49169#ifdef __cplusplus
49170extern "C"
49171#endif
49172char compress ();
49173int
49174main ()
49175{
49176return compress ();
49177  ;
49178  return 0;
49179}
49180_ACEOF
49181if ac_fn_cxx_try_link "$LINENO"; then :
49182  ac_cv_lib_z_compress=yes
49183else
49184  ac_cv_lib_z_compress=no
49185fi
49186rm -f core conftest.err conftest.$ac_objext \
49187    conftest$ac_exeext conftest.$ac_ext
49188LIBS=$ac_check_lib_save_LIBS
49189fi
49190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49191$as_echo "$ac_cv_lib_z_compress" >&6; }
49192if test "x$ac_cv_lib_z_compress" = xyes; then :
49193   ZLIB_FOUND=yes
49194else
49195   ZLIB_FOUND=no
49196fi
49197
49198
49199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49200$as_echo_n "checking for which zlib to use... " >&6; }
49201
49202  DEFAULT_ZLIB=bundled
49203  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49204    #
49205    # On macosx default is system...on others default is
49206    #
49207    DEFAULT_ZLIB=system
49208  fi
49209
49210  if test "x${ZLIB_FOUND}" != "xyes"; then
49211    #
49212    # If we don't find any system...set default to bundled
49213    #
49214    DEFAULT_ZLIB=bundled
49215  fi
49216
49217  #
49218  # If user didn't specify, use DEFAULT_ZLIB
49219  #
49220  if test "x${with_zlib}" = "x"; then
49221    with_zlib=${DEFAULT_ZLIB}
49222  fi
49223
49224  if test "x${with_zlib}" = "xbundled"; then
49225    USE_EXTERNAL_LIBZ=false
49226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49227$as_echo "bundled" >&6; }
49228  elif test "x${with_zlib}" = "xsystem"; then
49229    if test "x${ZLIB_FOUND}" = "xyes"; then
49230      USE_EXTERNAL_LIBZ=true
49231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49232$as_echo "system" >&6; }
49233    else
49234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49235$as_echo "system not found" >&6; }
49236      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49237    fi
49238  else
49239    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49240  fi
49241
49242
49243
49244  ###############################################################################
49245  LIBZIP_CAN_USE_MMAP=true
49246
49247
49248
49249  ###############################################################################
49250  #
49251  # Check if altzone exists in time.h
49252  #
49253
49254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49255/* end confdefs.h.  */
49256#include <time.h>
49257int
49258main ()
49259{
49260return (int)altzone;
49261  ;
49262  return 0;
49263}
49264_ACEOF
49265if ac_fn_cxx_try_link "$LINENO"; then :
49266  has_altzone=yes
49267else
49268  has_altzone=no
49269fi
49270rm -f core conftest.err conftest.$ac_objext \
49271    conftest$ac_exeext conftest.$ac_ext
49272  if test "x$has_altzone" = xyes; then
49273
49274$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49275
49276  fi
49277
49278  ###############################################################################
49279  #
49280  # Check the maths library
49281  #
49282
49283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49284$as_echo_n "checking for cos in -lm... " >&6; }
49285if ${ac_cv_lib_m_cos+:} false; then :
49286  $as_echo_n "(cached) " >&6
49287else
49288  ac_check_lib_save_LIBS=$LIBS
49289LIBS="-lm  $LIBS"
49290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49291/* end confdefs.h.  */
49292
49293/* Override any GCC internal prototype to avoid an error.
49294   Use char because int might match the return type of a GCC
49295   builtin and then its argument prototype would still apply.  */
49296#ifdef __cplusplus
49297extern "C"
49298#endif
49299char cos ();
49300int
49301main ()
49302{
49303return cos ();
49304  ;
49305  return 0;
49306}
49307_ACEOF
49308if ac_fn_cxx_try_link "$LINENO"; then :
49309  ac_cv_lib_m_cos=yes
49310else
49311  ac_cv_lib_m_cos=no
49312fi
49313rm -f core conftest.err conftest.$ac_objext \
49314    conftest$ac_exeext conftest.$ac_ext
49315LIBS=$ac_check_lib_save_LIBS
49316fi
49317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49318$as_echo "$ac_cv_lib_m_cos" >&6; }
49319if test "x$ac_cv_lib_m_cos" = xyes; then :
49320  cat >>confdefs.h <<_ACEOF
49321#define HAVE_LIBM 1
49322_ACEOF
49323
49324  LIBS="-lm $LIBS"
49325
49326else
49327
49328        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49329$as_echo "$as_me: Maths library was not found" >&6;}
49330
49331
49332fi
49333
49334
49335
49336  ###############################################################################
49337  #
49338  # Check for libdl.so
49339
49340  save_LIBS="$LIBS"
49341  LIBS=""
49342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49343$as_echo_n "checking for dlopen in -ldl... " >&6; }
49344if ${ac_cv_lib_dl_dlopen+:} false; then :
49345  $as_echo_n "(cached) " >&6
49346else
49347  ac_check_lib_save_LIBS=$LIBS
49348LIBS="-ldl  $LIBS"
49349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49350/* end confdefs.h.  */
49351
49352/* Override any GCC internal prototype to avoid an error.
49353   Use char because int might match the return type of a GCC
49354   builtin and then its argument prototype would still apply.  */
49355#ifdef __cplusplus
49356extern "C"
49357#endif
49358char dlopen ();
49359int
49360main ()
49361{
49362return dlopen ();
49363  ;
49364  return 0;
49365}
49366_ACEOF
49367if ac_fn_cxx_try_link "$LINENO"; then :
49368  ac_cv_lib_dl_dlopen=yes
49369else
49370  ac_cv_lib_dl_dlopen=no
49371fi
49372rm -f core conftest.err conftest.$ac_objext \
49373    conftest$ac_exeext conftest.$ac_ext
49374LIBS=$ac_check_lib_save_LIBS
49375fi
49376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49377$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49378if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49379  cat >>confdefs.h <<_ACEOF
49380#define HAVE_LIBDL 1
49381_ACEOF
49382
49383  LIBS="-ldl $LIBS"
49384
49385fi
49386
49387  LIBDL="$LIBS"
49388
49389  LIBS="$save_LIBS"
49390
49391
49392  ###############################################################################
49393  #
49394  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49395  # dynamic build is configured on command line.
49396  #
49397
49398# Check whether --with-stdc++lib was given.
49399if test "${with_stdc__lib+set}" = set; then :
49400  withval=$with_stdc__lib;
49401        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49402                && test "x$with_stdc__lib" != xdefault; then
49403          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49404        fi
49405
49406else
49407  with_stdc__lib=default
49408
49409fi
49410
49411
49412  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49413    # Test if -lstdc++ works.
49414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49415$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49416    ac_ext=cpp
49417ac_cpp='$CXXCPP $CPPFLAGS'
49418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49421
49422    OLD_CXXFLAGS="$CXXFLAGS"
49423    CXXFLAGS="$CXXFLAGS -lstdc++"
49424    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49425/* end confdefs.h.  */
49426
49427int
49428main ()
49429{
49430return 0;
49431  ;
49432  return 0;
49433}
49434_ACEOF
49435if ac_fn_cxx_try_link "$LINENO"; then :
49436  has_dynamic_libstdcxx=yes
49437else
49438  has_dynamic_libstdcxx=no
49439fi
49440rm -f core conftest.err conftest.$ac_objext \
49441    conftest$ac_exeext conftest.$ac_ext
49442    CXXFLAGS="$OLD_CXXFLAGS"
49443    ac_ext=cpp
49444ac_cpp='$CXXCPP $CPPFLAGS'
49445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49448
49449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49450$as_echo "$has_dynamic_libstdcxx" >&6; }
49451
49452    # Test if stdc++ can be linked statically.
49453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49454$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49455    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49456    ac_ext=cpp
49457ac_cpp='$CXXCPP $CPPFLAGS'
49458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49461
49462    OLD_LIBS="$LIBS"
49463    OLD_CXX="$CXX"
49464    LIBS="$STATIC_STDCXX_FLAGS"
49465    CXX="$CC"
49466    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49467/* end confdefs.h.  */
49468
49469int
49470main ()
49471{
49472return 0;
49473  ;
49474  return 0;
49475}
49476_ACEOF
49477if ac_fn_cxx_try_link "$LINENO"; then :
49478  has_static_libstdcxx=yes
49479else
49480  has_static_libstdcxx=no
49481fi
49482rm -f core conftest.err conftest.$ac_objext \
49483    conftest$ac_exeext conftest.$ac_ext
49484    LIBS="$OLD_LIBS"
49485    CXX="$OLD_CXX"
49486    ac_ext=cpp
49487ac_cpp='$CXXCPP $CPPFLAGS'
49488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49491
49492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49493$as_echo "$has_static_libstdcxx" >&6; }
49494
49495    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49496      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49497    fi
49498
49499    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49500      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49501    fi
49502
49503    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49504      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49505    fi
49506
49507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49508$as_echo_n "checking how to link with libstdc++... " >&6; }
49509    # If dynamic was requested, it's available since it would fail above otherwise.
49510    # If dynamic wasn't requested, go with static unless it isn't available.
49511    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49512      LIBCXX="$LIBCXX -lstdc++"
49513      LDCXX="$CXX"
49514      STATIC_CXX_SETTING="STATIC_CXX=false"
49515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49516$as_echo "dynamic" >&6; }
49517    else
49518      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49519      LDCXX="$CC"
49520      STATIC_CXX_SETTING="STATIC_CXX=true"
49521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49522$as_echo "static" >&6; }
49523    fi
49524  fi
49525
49526
49527  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49528    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49529
49530pkg_failed=no
49531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49532$as_echo_n "checking for LIBFFI... " >&6; }
49533
49534if test -n "$LIBFFI_CFLAGS"; then
49535    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49536 elif test -n "$PKG_CONFIG"; then
49537    if test -n "$PKG_CONFIG" && \
49538    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49539  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49540  ac_status=$?
49541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49542  test $ac_status = 0; }; then
49543  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49544else
49545  pkg_failed=yes
49546fi
49547 else
49548    pkg_failed=untried
49549fi
49550if test -n "$LIBFFI_LIBS"; then
49551    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49552 elif test -n "$PKG_CONFIG"; then
49553    if test -n "$PKG_CONFIG" && \
49554    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49555  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49556  ac_status=$?
49557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49558  test $ac_status = 0; }; then
49559  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49560else
49561  pkg_failed=yes
49562fi
49563 else
49564    pkg_failed=untried
49565fi
49566
49567
49568
49569if test $pkg_failed = yes; then
49570
49571if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49572        _pkg_short_errors_supported=yes
49573else
49574        _pkg_short_errors_supported=no
49575fi
49576        if test $_pkg_short_errors_supported = yes; then
49577	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49578        else
49579	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49580        fi
49581	# Put the nasty error message in config.log where it belongs
49582	echo "$LIBFFI_PKG_ERRORS" >&5
49583
49584	as_fn_error $? "Package requirements (libffi) were not met:
49585
49586$LIBFFI_PKG_ERRORS
49587
49588Consider adjusting the PKG_CONFIG_PATH environment variable if you
49589installed software in a non-standard prefix.
49590
49591Alternatively, you may set the environment variables LIBFFI_CFLAGS
49592and LIBFFI_LIBS to avoid the need to call pkg-config.
49593See the pkg-config man page for more details.
49594" "$LINENO" 5
49595elif test $pkg_failed = untried; then
49596	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49598as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49599is in your PATH or set the PKG_CONFIG environment variable to the full
49600path to pkg-config.
49601
49602Alternatively, you may set the environment variables LIBFFI_CFLAGS
49603and LIBFFI_LIBS to avoid the need to call pkg-config.
49604See the pkg-config man page for more details.
49605
49606To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49607See \`config.log' for more details" "$LINENO" 5; }
49608else
49609	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49610	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49612$as_echo "yes" >&6; }
49613	:
49614fi
49615
49616  fi
49617
49618  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49619    # Extract the first word of "llvm-config", so it can be a program name with args.
49620set dummy llvm-config; ac_word=$2
49621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49622$as_echo_n "checking for $ac_word... " >&6; }
49623if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49624  $as_echo_n "(cached) " >&6
49625else
49626  if test -n "$LLVM_CONFIG"; then
49627  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49628else
49629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49630for as_dir in $PATH
49631do
49632  IFS=$as_save_IFS
49633  test -z "$as_dir" && as_dir=.
49634    for ac_exec_ext in '' $ac_executable_extensions; do
49635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49636    ac_cv_prog_LLVM_CONFIG="llvm-config"
49637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49638    break 2
49639  fi
49640done
49641  done
49642IFS=$as_save_IFS
49643
49644fi
49645fi
49646LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49647if test -n "$LLVM_CONFIG"; then
49648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49649$as_echo "$LLVM_CONFIG" >&6; }
49650else
49651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49652$as_echo "no" >&6; }
49653fi
49654
49655
49656
49657    if test "x$LLVM_CONFIG" != xllvm-config; then
49658      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49659    fi
49660
49661    llvm_components="jit mcjit engine nativecodegen native"
49662    unset LLVM_CFLAGS
49663    for flag in $("$LLVM_CONFIG" --cxxflags); do
49664      if echo "${flag}" | grep -q '^-[ID]'; then
49665        if test "${flag}" != "-D_DEBUG" ; then
49666          if test "${LLVM_CFLAGS}" != "" ; then
49667            LLVM_CFLAGS="${LLVM_CFLAGS} "
49668          fi
49669          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49670        fi
49671      fi
49672    done
49673    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49674    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49675
49676    unset LLVM_LDFLAGS
49677    for flag in $("${LLVM_CONFIG}" --ldflags); do
49678      if echo "${flag}" | grep -q '^-L'; then
49679        if test "${LLVM_LDFLAGS}" != ""; then
49680          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49681        fi
49682        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49683      fi
49684    done
49685
49686    unset LLVM_LIBS
49687    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49688      if echo "${flag}" | grep -q '^-l'; then
49689        if test "${LLVM_LIBS}" != ""; then
49690          LLVM_LIBS="${LLVM_LIBS} "
49691        fi
49692        LLVM_LIBS="${LLVM_LIBS}${flag}"
49693      fi
49694    done
49695
49696
49697
49698
49699  fi
49700
49701  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49702  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49703    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49704  fi
49705
49706  # TODO better (platform agnostic) test
49707  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x ; then
49708    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49709      LIBCXX="-lstdc++"
49710    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49711      LIBCXX="-stdlib=libc++"
49712    fi
49713  fi
49714
49715  # TODO better (platform agnostic) test
49716  if test "x$OPENJDK_TARGET_OS" = xbsd && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
49717    LIBCXX="-lstdc++"
49718  fi
49719
49720
49721
49722
49723  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49724
49725
49726# Check whether --with-msvcr-dll was given.
49727if test "${with_msvcr_dll+set}" = set; then :
49728  withval=$with_msvcr_dll;
49729fi
49730
49731
49732  if test "x$with_msvcr_dll" != x; then
49733    # If given explicitely by user, do not probe. If not present, fail directly.
49734
49735  DLL_NAME="$MSVCR_NAME"
49736  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49737  METHOD="--with-msvcr-dll"
49738  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49740$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49741
49742    # Need to check if the found msvcr is correct architecture
49743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49744$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49745    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49747      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49748      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49750        CORRECT_MSVCR_ARCH="PE32 executable"
49751      else
49752        CORRECT_MSVCR_ARCH="PE32+ executable"
49753      fi
49754    else
49755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49756        CORRECT_MSVCR_ARCH=386
49757      else
49758        CORRECT_MSVCR_ARCH=x86-64
49759      fi
49760    fi
49761    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49763$as_echo "ok" >&6; }
49764      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49765
49766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49767
49768  # Input might be given as Windows format, start by converting to
49769  # unix format.
49770  path="$MSVC_DLL"
49771  new_path=`$CYGPATH -u "$path"`
49772
49773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49776  # "foo.exe" is OK but "foo" is an error.
49777  #
49778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49779  # It is also a way to make sure we got the proper file name for the real test later on.
49780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49781  if test "x$test_shortpath" = x; then
49782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49783$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49784    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49785  fi
49786
49787  # Call helper function which possibly converts this using DOS-style short mode.
49788  # If so, the updated path is stored in $new_path.
49789
49790  input_path="$new_path"
49791  # Check if we need to convert this using DOS-style short mode. If the path
49792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49793  # take no chances and rewrite it.
49794  # Note: m4 eats our [], so we need to use [ and ] instead.
49795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49796  if test "x$has_forbidden_chars" != x; then
49797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49801      # Going to short mode and back again did indeed matter. Since short mode is
49802      # case insensitive, let's make it lowercase to improve readability.
49803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49804      # Now convert it back to Unix-style (cygpath)
49805      input_path=`$CYGPATH -u "$shortmode_path"`
49806      new_path="$input_path"
49807    fi
49808  fi
49809
49810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49811  if test "x$test_cygdrive_prefix" = x; then
49812    # As a simple fix, exclude /usr/bin since it's not a real path.
49813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49815      # a path prefixed by /cygdrive for fixpath to work.
49816      new_path="$CYGWIN_ROOT_PATH$input_path"
49817    fi
49818  fi
49819
49820
49821  if test "x$path" != "x$new_path"; then
49822    MSVC_DLL="$new_path"
49823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49824$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49825  fi
49826
49827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49828
49829  path="$MSVC_DLL"
49830  has_colon=`$ECHO $path | $GREP ^.:`
49831  new_path="$path"
49832  if test "x$has_colon" = x; then
49833    # Not in mixed or Windows style, start by that.
49834    new_path=`cmd //c echo $path`
49835  fi
49836
49837
49838  input_path="$new_path"
49839  # Check if we need to convert this using DOS-style short mode. If the path
49840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49841  # take no chances and rewrite it.
49842  # Note: m4 eats our [], so we need to use [ and ] instead.
49843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49844  if test "x$has_forbidden_chars" != x; then
49845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49847  fi
49848
49849
49850  windows_path="$new_path"
49851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49852    unix_path=`$CYGPATH -u "$windows_path"`
49853    new_path="$unix_path"
49854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49856    new_path="$unix_path"
49857  fi
49858
49859  if test "x$path" != "x$new_path"; then
49860    MSVC_DLL="$new_path"
49861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49862$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49863  fi
49864
49865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49867
49868  else
49869    # We're on a posix platform. Hooray! :)
49870    path="$MSVC_DLL"
49871    has_space=`$ECHO "$path" | $GREP " "`
49872    if test "x$has_space" != x; then
49873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49874$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49875      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49876    fi
49877
49878    # Use eval to expand a potential ~
49879    eval path="$path"
49880    if test ! -f "$path" && test ! -d "$path"; then
49881      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49882    fi
49883
49884    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49885  fi
49886
49887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49888$as_echo_n "checking for $DLL_NAME... " >&6; }
49889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49890$as_echo "$MSVC_DLL" >&6; }
49891    else
49892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49893$as_echo "incorrect, ignoring" >&6; }
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49895$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49896    fi
49897  fi
49898
49899    if test "x$MSVC_DLL" = x; then
49900      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49901    fi
49902    MSVCR_DLL="$MSVC_DLL"
49903  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49904
49905  DLL_NAME="$MSVCR_NAME"
49906  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49907  METHOD="devkit"
49908  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49910$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49911
49912    # Need to check if the found msvcr is correct architecture
49913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49914$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49915    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49917      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49918      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49920        CORRECT_MSVCR_ARCH="PE32 executable"
49921      else
49922        CORRECT_MSVCR_ARCH="PE32+ executable"
49923      fi
49924    else
49925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49926        CORRECT_MSVCR_ARCH=386
49927      else
49928        CORRECT_MSVCR_ARCH=x86-64
49929      fi
49930    fi
49931    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49933$as_echo "ok" >&6; }
49934      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49935
49936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49937
49938  # Input might be given as Windows format, start by converting to
49939  # unix format.
49940  path="$MSVC_DLL"
49941  new_path=`$CYGPATH -u "$path"`
49942
49943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49946  # "foo.exe" is OK but "foo" is an error.
49947  #
49948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49949  # It is also a way to make sure we got the proper file name for the real test later on.
49950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49951  if test "x$test_shortpath" = x; then
49952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49953$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49954    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49955  fi
49956
49957  # Call helper function which possibly converts this using DOS-style short mode.
49958  # If so, the updated path is stored in $new_path.
49959
49960  input_path="$new_path"
49961  # Check if we need to convert this using DOS-style short mode. If the path
49962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49963  # take no chances and rewrite it.
49964  # Note: m4 eats our [], so we need to use [ and ] instead.
49965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49966  if test "x$has_forbidden_chars" != x; then
49967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49971      # Going to short mode and back again did indeed matter. Since short mode is
49972      # case insensitive, let's make it lowercase to improve readability.
49973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49974      # Now convert it back to Unix-style (cygpath)
49975      input_path=`$CYGPATH -u "$shortmode_path"`
49976      new_path="$input_path"
49977    fi
49978  fi
49979
49980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49981  if test "x$test_cygdrive_prefix" = x; then
49982    # As a simple fix, exclude /usr/bin since it's not a real path.
49983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49985      # a path prefixed by /cygdrive for fixpath to work.
49986      new_path="$CYGWIN_ROOT_PATH$input_path"
49987    fi
49988  fi
49989
49990
49991  if test "x$path" != "x$new_path"; then
49992    MSVC_DLL="$new_path"
49993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49994$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49995  fi
49996
49997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49998
49999  path="$MSVC_DLL"
50000  has_colon=`$ECHO $path | $GREP ^.:`
50001  new_path="$path"
50002  if test "x$has_colon" = x; then
50003    # Not in mixed or Windows style, start by that.
50004    new_path=`cmd //c echo $path`
50005  fi
50006
50007
50008  input_path="$new_path"
50009  # Check if we need to convert this using DOS-style short mode. If the path
50010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50011  # take no chances and rewrite it.
50012  # Note: m4 eats our [], so we need to use [ and ] instead.
50013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50014  if test "x$has_forbidden_chars" != x; then
50015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50017  fi
50018
50019
50020  windows_path="$new_path"
50021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50022    unix_path=`$CYGPATH -u "$windows_path"`
50023    new_path="$unix_path"
50024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50026    new_path="$unix_path"
50027  fi
50028
50029  if test "x$path" != "x$new_path"; then
50030    MSVC_DLL="$new_path"
50031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50032$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50033  fi
50034
50035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50037
50038  else
50039    # We're on a posix platform. Hooray! :)
50040    path="$MSVC_DLL"
50041    has_space=`$ECHO "$path" | $GREP " "`
50042    if test "x$has_space" != x; then
50043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50044$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50046    fi
50047
50048    # Use eval to expand a potential ~
50049    eval path="$path"
50050    if test ! -f "$path" && test ! -d "$path"; then
50051      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50052    fi
50053
50054    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50055  fi
50056
50057      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50058$as_echo_n "checking for $DLL_NAME... " >&6; }
50059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50060$as_echo "$MSVC_DLL" >&6; }
50061    else
50062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50063$as_echo "incorrect, ignoring" >&6; }
50064      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50065$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50066    fi
50067  fi
50068
50069    if test "x$MSVC_DLL" = x; then
50070      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50071    fi
50072    MSVCR_DLL="$MSVC_DLL"
50073  else
50074
50075  DLL_NAME="${MSVCR_NAME}"
50076  MSVC_DLL=
50077
50078  if test "x$MSVC_DLL" = x; then
50079    if test "x$VCINSTALLDIR" != x; then
50080      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50081
50082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50083
50084  # Input might be given as Windows format, start by converting to
50085  # unix format.
50086  path="$CYGWIN_VC_INSTALL_DIR"
50087  new_path=`$CYGPATH -u "$path"`
50088
50089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50092  # "foo.exe" is OK but "foo" is an error.
50093  #
50094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50095  # It is also a way to make sure we got the proper file name for the real test later on.
50096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50097  if test "x$test_shortpath" = x; then
50098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
50099$as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
50100    as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
50101  fi
50102
50103  # Call helper function which possibly converts this using DOS-style short mode.
50104  # If so, the updated path is stored in $new_path.
50105
50106  input_path="$new_path"
50107  # Check if we need to convert this using DOS-style short mode. If the path
50108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50109  # take no chances and rewrite it.
50110  # Note: m4 eats our [], so we need to use [ and ] instead.
50111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50112  if test "x$has_forbidden_chars" != x; then
50113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50117      # Going to short mode and back again did indeed matter. Since short mode is
50118      # case insensitive, let's make it lowercase to improve readability.
50119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50120      # Now convert it back to Unix-style (cygpath)
50121      input_path=`$CYGPATH -u "$shortmode_path"`
50122      new_path="$input_path"
50123    fi
50124  fi
50125
50126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50127  if test "x$test_cygdrive_prefix" = x; then
50128    # As a simple fix, exclude /usr/bin since it's not a real path.
50129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50131      # a path prefixed by /cygdrive for fixpath to work.
50132      new_path="$CYGWIN_ROOT_PATH$input_path"
50133    fi
50134  fi
50135
50136
50137  if test "x$path" != "x$new_path"; then
50138    CYGWIN_VC_INSTALL_DIR="$new_path"
50139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
50140$as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
50141  fi
50142
50143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50144
50145  path="$CYGWIN_VC_INSTALL_DIR"
50146  has_colon=`$ECHO $path | $GREP ^.:`
50147  new_path="$path"
50148  if test "x$has_colon" = x; then
50149    # Not in mixed or Windows style, start by that.
50150    new_path=`cmd //c echo $path`
50151  fi
50152
50153
50154  input_path="$new_path"
50155  # Check if we need to convert this using DOS-style short mode. If the path
50156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50157  # take no chances and rewrite it.
50158  # Note: m4 eats our [], so we need to use [ and ] instead.
50159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50160  if test "x$has_forbidden_chars" != x; then
50161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50163  fi
50164
50165
50166  windows_path="$new_path"
50167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50168    unix_path=`$CYGPATH -u "$windows_path"`
50169    new_path="$unix_path"
50170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50172    new_path="$unix_path"
50173  fi
50174
50175  if test "x$path" != "x$new_path"; then
50176    CYGWIN_VC_INSTALL_DIR="$new_path"
50177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
50178$as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
50179  fi
50180
50181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50183
50184  else
50185    # We're on a posix platform. Hooray! :)
50186    path="$CYGWIN_VC_INSTALL_DIR"
50187    has_space=`$ECHO "$path" | $GREP " "`
50188    if test "x$has_space" != x; then
50189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
50190$as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
50191      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50192    fi
50193
50194    # Use eval to expand a potential ~
50195    eval path="$path"
50196    if test ! -f "$path" && test ! -d "$path"; then
50197      as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
50198    fi
50199
50200    CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
50201  fi
50202
50203      if test "$VS_VERSION" -lt 2017; then
50204        # Probe: Using well-known location from Visual Studio 12.0 and older
50205        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50206          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50207        else
50208          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50209        fi
50210      else
50211        # Probe: Using well-known location from VS 2017
50212        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50213          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50214        else
50215          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
50216        fi
50217      fi
50218      # In case any of the above finds more than one file, loop over them.
50219      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
50220        $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
50221
50222  DLL_NAME="$DLL_NAME"
50223  POSSIBLE_MSVC_DLL="$possible_msvc_dll"
50224  METHOD="well-known location in VCINSTALLDIR"
50225  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50227$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50228
50229    # Need to check if the found msvcr is correct architecture
50230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50231$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50232    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50234      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50235      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50236      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50237        CORRECT_MSVCR_ARCH="PE32 executable"
50238      else
50239        CORRECT_MSVCR_ARCH="PE32+ executable"
50240      fi
50241    else
50242      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50243        CORRECT_MSVCR_ARCH=386
50244      else
50245        CORRECT_MSVCR_ARCH=x86-64
50246      fi
50247    fi
50248    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50250$as_echo "ok" >&6; }
50251      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50252
50253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50254
50255  # Input might be given as Windows format, start by converting to
50256  # unix format.
50257  path="$MSVC_DLL"
50258  new_path=`$CYGPATH -u "$path"`
50259
50260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50263  # "foo.exe" is OK but "foo" is an error.
50264  #
50265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50266  # It is also a way to make sure we got the proper file name for the real test later on.
50267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50268  if test "x$test_shortpath" = x; then
50269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50270$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50271    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50272  fi
50273
50274  # Call helper function which possibly converts this using DOS-style short mode.
50275  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50288      # Going to short mode and back again did indeed matter. Since short mode is
50289      # case insensitive, let's make it lowercase to improve readability.
50290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50291      # Now convert it back to Unix-style (cygpath)
50292      input_path=`$CYGPATH -u "$shortmode_path"`
50293      new_path="$input_path"
50294    fi
50295  fi
50296
50297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50298  if test "x$test_cygdrive_prefix" = x; then
50299    # As a simple fix, exclude /usr/bin since it's not a real path.
50300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50302      # a path prefixed by /cygdrive for fixpath to work.
50303      new_path="$CYGWIN_ROOT_PATH$input_path"
50304    fi
50305  fi
50306
50307
50308  if test "x$path" != "x$new_path"; then
50309    MSVC_DLL="$new_path"
50310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50312  fi
50313
50314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50315
50316  path="$MSVC_DLL"
50317  has_colon=`$ECHO $path | $GREP ^.:`
50318  new_path="$path"
50319  if test "x$has_colon" = x; then
50320    # Not in mixed or Windows style, start by that.
50321    new_path=`cmd //c echo $path`
50322  fi
50323
50324
50325  input_path="$new_path"
50326  # Check if we need to convert this using DOS-style short mode. If the path
50327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50328  # take no chances and rewrite it.
50329  # Note: m4 eats our [], so we need to use [ and ] instead.
50330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50331  if test "x$has_forbidden_chars" != x; then
50332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50334  fi
50335
50336
50337  windows_path="$new_path"
50338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50339    unix_path=`$CYGPATH -u "$windows_path"`
50340    new_path="$unix_path"
50341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50343    new_path="$unix_path"
50344  fi
50345
50346  if test "x$path" != "x$new_path"; then
50347    MSVC_DLL="$new_path"
50348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50349$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50350  fi
50351
50352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50354
50355  else
50356    # We're on a posix platform. Hooray! :)
50357    path="$MSVC_DLL"
50358    has_space=`$ECHO "$path" | $GREP " "`
50359    if test "x$has_space" != x; then
50360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50363    fi
50364
50365    # Use eval to expand a potential ~
50366    eval path="$path"
50367    if test ! -f "$path" && test ! -d "$path"; then
50368      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50369    fi
50370
50371    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50372  fi
50373
50374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50375$as_echo_n "checking for $DLL_NAME... " >&6; }
50376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50377$as_echo "$MSVC_DLL" >&6; }
50378    else
50379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50380$as_echo "incorrect, ignoring" >&6; }
50381      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50382$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50383    fi
50384  fi
50385
50386      done
50387    fi
50388  fi
50389
50390  if test "x$MSVC_DLL" = x; then
50391    # Probe: Check in the Boot JDK directory.
50392    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50393
50394  DLL_NAME="$DLL_NAME"
50395  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50396  METHOD="well-known location in Boot JDK"
50397  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50398    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50399$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50400
50401    # Need to check if the found msvcr is correct architecture
50402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50403$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50404    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50406      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50407      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50408      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50409        CORRECT_MSVCR_ARCH="PE32 executable"
50410      else
50411        CORRECT_MSVCR_ARCH="PE32+ executable"
50412      fi
50413    else
50414      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50415        CORRECT_MSVCR_ARCH=386
50416      else
50417        CORRECT_MSVCR_ARCH=x86-64
50418      fi
50419    fi
50420    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50422$as_echo "ok" >&6; }
50423      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50424
50425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50426
50427  # Input might be given as Windows format, start by converting to
50428  # unix format.
50429  path="$MSVC_DLL"
50430  new_path=`$CYGPATH -u "$path"`
50431
50432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50435  # "foo.exe" is OK but "foo" is an error.
50436  #
50437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50438  # It is also a way to make sure we got the proper file name for the real test later on.
50439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50440  if test "x$test_shortpath" = x; then
50441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50442$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50443    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50444  fi
50445
50446  # Call helper function which possibly converts this using DOS-style short mode.
50447  # If so, the updated path is stored in $new_path.
50448
50449  input_path="$new_path"
50450  # Check if we need to convert this using DOS-style short mode. If the path
50451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50452  # take no chances and rewrite it.
50453  # Note: m4 eats our [], so we need to use [ and ] instead.
50454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50455  if test "x$has_forbidden_chars" != x; then
50456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50460      # Going to short mode and back again did indeed matter. Since short mode is
50461      # case insensitive, let's make it lowercase to improve readability.
50462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50463      # Now convert it back to Unix-style (cygpath)
50464      input_path=`$CYGPATH -u "$shortmode_path"`
50465      new_path="$input_path"
50466    fi
50467  fi
50468
50469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50470  if test "x$test_cygdrive_prefix" = x; then
50471    # As a simple fix, exclude /usr/bin since it's not a real path.
50472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50474      # a path prefixed by /cygdrive for fixpath to work.
50475      new_path="$CYGWIN_ROOT_PATH$input_path"
50476    fi
50477  fi
50478
50479
50480  if test "x$path" != "x$new_path"; then
50481    MSVC_DLL="$new_path"
50482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50483$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50484  fi
50485
50486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50487
50488  path="$MSVC_DLL"
50489  has_colon=`$ECHO $path | $GREP ^.:`
50490  new_path="$path"
50491  if test "x$has_colon" = x; then
50492    # Not in mixed or Windows style, start by that.
50493    new_path=`cmd //c echo $path`
50494  fi
50495
50496
50497  input_path="$new_path"
50498  # Check if we need to convert this using DOS-style short mode. If the path
50499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50500  # take no chances and rewrite it.
50501  # Note: m4 eats our [], so we need to use [ and ] instead.
50502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50503  if test "x$has_forbidden_chars" != x; then
50504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50506  fi
50507
50508
50509  windows_path="$new_path"
50510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50511    unix_path=`$CYGPATH -u "$windows_path"`
50512    new_path="$unix_path"
50513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50515    new_path="$unix_path"
50516  fi
50517
50518  if test "x$path" != "x$new_path"; then
50519    MSVC_DLL="$new_path"
50520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50521$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50522  fi
50523
50524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50526
50527  else
50528    # We're on a posix platform. Hooray! :)
50529    path="$MSVC_DLL"
50530    has_space=`$ECHO "$path" | $GREP " "`
50531    if test "x$has_space" != x; then
50532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50533$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50535    fi
50536
50537    # Use eval to expand a potential ~
50538    eval path="$path"
50539    if test ! -f "$path" && test ! -d "$path"; then
50540      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50541    fi
50542
50543    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50544  fi
50545
50546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50547$as_echo_n "checking for $DLL_NAME... " >&6; }
50548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50549$as_echo "$MSVC_DLL" >&6; }
50550    else
50551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50552$as_echo "incorrect, ignoring" >&6; }
50553      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50554$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50555    fi
50556  fi
50557
50558  fi
50559
50560  if test "x$MSVC_DLL" = x; then
50561    # Probe: Look in the Windows system32 directory
50562    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50563
50564  windows_path="$CYGWIN_SYSTEMROOT"
50565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50566    unix_path=`$CYGPATH -u "$windows_path"`
50567    CYGWIN_SYSTEMROOT="$unix_path"
50568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50570    CYGWIN_SYSTEMROOT="$unix_path"
50571  fi
50572
50573    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50574
50575  DLL_NAME="$DLL_NAME"
50576  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50577  METHOD="well-known location in SYSTEMROOT"
50578  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50580$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50581
50582    # Need to check if the found msvcr is correct architecture
50583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50584$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50585    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50587      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50588      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50589      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50590        CORRECT_MSVCR_ARCH="PE32 executable"
50591      else
50592        CORRECT_MSVCR_ARCH="PE32+ executable"
50593      fi
50594    else
50595      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50596        CORRECT_MSVCR_ARCH=386
50597      else
50598        CORRECT_MSVCR_ARCH=x86-64
50599      fi
50600    fi
50601    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50603$as_echo "ok" >&6; }
50604      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50605
50606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50607
50608  # Input might be given as Windows format, start by converting to
50609  # unix format.
50610  path="$MSVC_DLL"
50611  new_path=`$CYGPATH -u "$path"`
50612
50613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50616  # "foo.exe" is OK but "foo" is an error.
50617  #
50618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50619  # It is also a way to make sure we got the proper file name for the real test later on.
50620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50621  if test "x$test_shortpath" = x; then
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50623$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50624    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50625  fi
50626
50627  # Call helper function which possibly converts this using DOS-style short mode.
50628  # If so, the updated path is stored in $new_path.
50629
50630  input_path="$new_path"
50631  # Check if we need to convert this using DOS-style short mode. If the path
50632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50633  # take no chances and rewrite it.
50634  # Note: m4 eats our [], so we need to use [ and ] instead.
50635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50636  if test "x$has_forbidden_chars" != x; then
50637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50641      # Going to short mode and back again did indeed matter. Since short mode is
50642      # case insensitive, let's make it lowercase to improve readability.
50643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50644      # Now convert it back to Unix-style (cygpath)
50645      input_path=`$CYGPATH -u "$shortmode_path"`
50646      new_path="$input_path"
50647    fi
50648  fi
50649
50650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50651  if test "x$test_cygdrive_prefix" = x; then
50652    # As a simple fix, exclude /usr/bin since it's not a real path.
50653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50655      # a path prefixed by /cygdrive for fixpath to work.
50656      new_path="$CYGWIN_ROOT_PATH$input_path"
50657    fi
50658  fi
50659
50660
50661  if test "x$path" != "x$new_path"; then
50662    MSVC_DLL="$new_path"
50663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50665  fi
50666
50667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50668
50669  path="$MSVC_DLL"
50670  has_colon=`$ECHO $path | $GREP ^.:`
50671  new_path="$path"
50672  if test "x$has_colon" = x; then
50673    # Not in mixed or Windows style, start by that.
50674    new_path=`cmd //c echo $path`
50675  fi
50676
50677
50678  input_path="$new_path"
50679  # Check if we need to convert this using DOS-style short mode. If the path
50680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50681  # take no chances and rewrite it.
50682  # Note: m4 eats our [], so we need to use [ and ] instead.
50683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50684  if test "x$has_forbidden_chars" != x; then
50685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50687  fi
50688
50689
50690  windows_path="$new_path"
50691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50692    unix_path=`$CYGPATH -u "$windows_path"`
50693    new_path="$unix_path"
50694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50696    new_path="$unix_path"
50697  fi
50698
50699  if test "x$path" != "x$new_path"; then
50700    MSVC_DLL="$new_path"
50701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50702$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50703  fi
50704
50705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50707
50708  else
50709    # We're on a posix platform. Hooray! :)
50710    path="$MSVC_DLL"
50711    has_space=`$ECHO "$path" | $GREP " "`
50712    if test "x$has_space" != x; then
50713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50714$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50715      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50716    fi
50717
50718    # Use eval to expand a potential ~
50719    eval path="$path"
50720    if test ! -f "$path" && test ! -d "$path"; then
50721      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50722    fi
50723
50724    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50725  fi
50726
50727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50728$as_echo_n "checking for $DLL_NAME... " >&6; }
50729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50730$as_echo "$MSVC_DLL" >&6; }
50731    else
50732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50733$as_echo "incorrect, ignoring" >&6; }
50734      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50735$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50736    fi
50737  fi
50738
50739  fi
50740
50741  if test "x$MSVC_DLL" = x; then
50742    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50743    if test "x$VS100COMNTOOLS" != x; then
50744      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50745
50746  windows_path="$CYGWIN_VS_TOOLS_DIR"
50747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50748    unix_path=`$CYGPATH -u "$windows_path"`
50749    CYGWIN_VS_TOOLS_DIR="$unix_path"
50750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50752    CYGWIN_VS_TOOLS_DIR="$unix_path"
50753  fi
50754
50755      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50756        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50757            | $GREP -i /x64/ | $HEAD --lines 1`
50758      else
50759        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50760            | $GREP -i /x86/ | $HEAD --lines 1`
50761      fi
50762
50763  DLL_NAME="$DLL_NAME"
50764  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50765  METHOD="search of VS100COMNTOOLS"
50766  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50768$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50769
50770    # Need to check if the found msvcr is correct architecture
50771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50772$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50773    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50775      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50776      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50777      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50778        CORRECT_MSVCR_ARCH="PE32 executable"
50779      else
50780        CORRECT_MSVCR_ARCH="PE32+ executable"
50781      fi
50782    else
50783      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50784        CORRECT_MSVCR_ARCH=386
50785      else
50786        CORRECT_MSVCR_ARCH=x86-64
50787      fi
50788    fi
50789    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50791$as_echo "ok" >&6; }
50792      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50793
50794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50795
50796  # Input might be given as Windows format, start by converting to
50797  # unix format.
50798  path="$MSVC_DLL"
50799  new_path=`$CYGPATH -u "$path"`
50800
50801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50804  # "foo.exe" is OK but "foo" is an error.
50805  #
50806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50807  # It is also a way to make sure we got the proper file name for the real test later on.
50808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50809  if test "x$test_shortpath" = x; then
50810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50811$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50812    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50813  fi
50814
50815  # Call helper function which possibly converts this using DOS-style short mode.
50816  # If so, the updated path is stored in $new_path.
50817
50818  input_path="$new_path"
50819  # Check if we need to convert this using DOS-style short mode. If the path
50820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50821  # take no chances and rewrite it.
50822  # Note: m4 eats our [], so we need to use [ and ] instead.
50823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50824  if test "x$has_forbidden_chars" != x; then
50825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50829      # Going to short mode and back again did indeed matter. Since short mode is
50830      # case insensitive, let's make it lowercase to improve readability.
50831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50832      # Now convert it back to Unix-style (cygpath)
50833      input_path=`$CYGPATH -u "$shortmode_path"`
50834      new_path="$input_path"
50835    fi
50836  fi
50837
50838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50839  if test "x$test_cygdrive_prefix" = x; then
50840    # As a simple fix, exclude /usr/bin since it's not a real path.
50841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50843      # a path prefixed by /cygdrive for fixpath to work.
50844      new_path="$CYGWIN_ROOT_PATH$input_path"
50845    fi
50846  fi
50847
50848
50849  if test "x$path" != "x$new_path"; then
50850    MSVC_DLL="$new_path"
50851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50852$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50853  fi
50854
50855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50856
50857  path="$MSVC_DLL"
50858  has_colon=`$ECHO $path | $GREP ^.:`
50859  new_path="$path"
50860  if test "x$has_colon" = x; then
50861    # Not in mixed or Windows style, start by that.
50862    new_path=`cmd //c echo $path`
50863  fi
50864
50865
50866  input_path="$new_path"
50867  # Check if we need to convert this using DOS-style short mode. If the path
50868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50869  # take no chances and rewrite it.
50870  # Note: m4 eats our [], so we need to use [ and ] instead.
50871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50872  if test "x$has_forbidden_chars" != x; then
50873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50875  fi
50876
50877
50878  windows_path="$new_path"
50879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50880    unix_path=`$CYGPATH -u "$windows_path"`
50881    new_path="$unix_path"
50882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50884    new_path="$unix_path"
50885  fi
50886
50887  if test "x$path" != "x$new_path"; then
50888    MSVC_DLL="$new_path"
50889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50890$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50891  fi
50892
50893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50895
50896  else
50897    # We're on a posix platform. Hooray! :)
50898    path="$MSVC_DLL"
50899    has_space=`$ECHO "$path" | $GREP " "`
50900    if test "x$has_space" != x; then
50901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50902$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50903      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50904    fi
50905
50906    # Use eval to expand a potential ~
50907    eval path="$path"
50908    if test ! -f "$path" && test ! -d "$path"; then
50909      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50910    fi
50911
50912    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50913  fi
50914
50915      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50916$as_echo_n "checking for $DLL_NAME... " >&6; }
50917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50918$as_echo "$MSVC_DLL" >&6; }
50919    else
50920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50921$as_echo "incorrect, ignoring" >&6; }
50922      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50923$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50924    fi
50925  fi
50926
50927    fi
50928  fi
50929
50930  if test "x$MSVC_DLL" = x; then
50931    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50932    # (This was the original behaviour; kept since it might turn something up)
50933    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50934      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50935        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50936          | $GREP x64 | $HEAD --lines 1`
50937      else
50938        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50939          | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50940        if test "x$POSSIBLE_MSVC_DLL" = x; then
50941          # We're grasping at straws now...
50942          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50943              | $HEAD --lines 1`
50944        fi
50945      fi
50946
50947
50948  DLL_NAME="$DLL_NAME"
50949  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50950  METHOD="search of VCINSTALLDIR"
50951  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50952    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50953$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50954
50955    # Need to check if the found msvcr is correct architecture
50956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50957$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50958    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50960      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50961      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50962      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50963        CORRECT_MSVCR_ARCH="PE32 executable"
50964      else
50965        CORRECT_MSVCR_ARCH="PE32+ executable"
50966      fi
50967    else
50968      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50969        CORRECT_MSVCR_ARCH=386
50970      else
50971        CORRECT_MSVCR_ARCH=x86-64
50972      fi
50973    fi
50974    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50976$as_echo "ok" >&6; }
50977      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50978
50979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50980
50981  # Input might be given as Windows format, start by converting to
50982  # unix format.
50983  path="$MSVC_DLL"
50984  new_path=`$CYGPATH -u "$path"`
50985
50986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50989  # "foo.exe" is OK but "foo" is an error.
50990  #
50991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50992  # It is also a way to make sure we got the proper file name for the real test later on.
50993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50994  if test "x$test_shortpath" = x; then
50995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50998  fi
50999
51000  # Call helper function which possibly converts this using DOS-style short mode.
51001  # If so, the updated path is stored in $new_path.
51002
51003  input_path="$new_path"
51004  # Check if we need to convert this using DOS-style short mode. If the path
51005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51006  # take no chances and rewrite it.
51007  # Note: m4 eats our [], so we need to use [ and ] instead.
51008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51009  if test "x$has_forbidden_chars" != x; then
51010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51014      # Going to short mode and back again did indeed matter. Since short mode is
51015      # case insensitive, let's make it lowercase to improve readability.
51016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51017      # Now convert it back to Unix-style (cygpath)
51018      input_path=`$CYGPATH -u "$shortmode_path"`
51019      new_path="$input_path"
51020    fi
51021  fi
51022
51023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51024  if test "x$test_cygdrive_prefix" = x; then
51025    # As a simple fix, exclude /usr/bin since it's not a real path.
51026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51028      # a path prefixed by /cygdrive for fixpath to work.
51029      new_path="$CYGWIN_ROOT_PATH$input_path"
51030    fi
51031  fi
51032
51033
51034  if test "x$path" != "x$new_path"; then
51035    MSVC_DLL="$new_path"
51036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51038  fi
51039
51040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51041
51042  path="$MSVC_DLL"
51043  has_colon=`$ECHO $path | $GREP ^.:`
51044  new_path="$path"
51045  if test "x$has_colon" = x; then
51046    # Not in mixed or Windows style, start by that.
51047    new_path=`cmd //c echo $path`
51048  fi
51049
51050
51051  input_path="$new_path"
51052  # Check if we need to convert this using DOS-style short mode. If the path
51053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51054  # take no chances and rewrite it.
51055  # Note: m4 eats our [], so we need to use [ and ] instead.
51056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51057  if test "x$has_forbidden_chars" != x; then
51058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51060  fi
51061
51062
51063  windows_path="$new_path"
51064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51065    unix_path=`$CYGPATH -u "$windows_path"`
51066    new_path="$unix_path"
51067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51069    new_path="$unix_path"
51070  fi
51071
51072  if test "x$path" != "x$new_path"; then
51073    MSVC_DLL="$new_path"
51074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51076  fi
51077
51078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51080
51081  else
51082    # We're on a posix platform. Hooray! :)
51083    path="$MSVC_DLL"
51084    has_space=`$ECHO "$path" | $GREP " "`
51085    if test "x$has_space" != x; then
51086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51088      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51089    fi
51090
51091    # Use eval to expand a potential ~
51092    eval path="$path"
51093    if test ! -f "$path" && test ! -d "$path"; then
51094      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51095    fi
51096
51097    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51098  fi
51099
51100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51101$as_echo_n "checking for $DLL_NAME... " >&6; }
51102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51103$as_echo "$MSVC_DLL" >&6; }
51104    else
51105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51106$as_echo "incorrect, ignoring" >&6; }
51107      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51108$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51109    fi
51110  fi
51111
51112    fi
51113  fi
51114
51115  if test "x$MSVC_DLL" = x; then
51116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51117$as_echo_n "checking for $DLL_NAME... " >&6; }
51118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51119$as_echo "no" >&6; }
51120    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51121  fi
51122
51123    MSVCR_DLL="$MSVC_DLL"
51124  fi
51125
51126
51127
51128# Check whether --with-msvcp-dll was given.
51129if test "${with_msvcp_dll+set}" = set; then :
51130  withval=$with_msvcp_dll;
51131fi
51132
51133
51134  if test "x$MSVCP_NAME" != "x"; then
51135    if test "x$with_msvcp_dll" != x; then
51136      # If given explicitely by user, do not probe. If not present, fail directly.
51137
51138  DLL_NAME="$MSVCP_NAME"
51139  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51140  METHOD="--with-msvcp-dll"
51141  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51143$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51144
51145    # Need to check if the found msvcr is correct architecture
51146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51147$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51148    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51150      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51151      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51153        CORRECT_MSVCR_ARCH="PE32 executable"
51154      else
51155        CORRECT_MSVCR_ARCH="PE32+ executable"
51156      fi
51157    else
51158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51159        CORRECT_MSVCR_ARCH=386
51160      else
51161        CORRECT_MSVCR_ARCH=x86-64
51162      fi
51163    fi
51164    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51166$as_echo "ok" >&6; }
51167      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51168
51169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51170
51171  # Input might be given as Windows format, start by converting to
51172  # unix format.
51173  path="$MSVC_DLL"
51174  new_path=`$CYGPATH -u "$path"`
51175
51176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51179  # "foo.exe" is OK but "foo" is an error.
51180  #
51181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51182  # It is also a way to make sure we got the proper file name for the real test later on.
51183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51184  if test "x$test_shortpath" = x; then
51185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51187    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51188  fi
51189
51190  # Call helper function which possibly converts this using DOS-style short mode.
51191  # If so, the updated path is stored in $new_path.
51192
51193  input_path="$new_path"
51194  # Check if we need to convert this using DOS-style short mode. If the path
51195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51196  # take no chances and rewrite it.
51197  # Note: m4 eats our [], so we need to use [ and ] instead.
51198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51199  if test "x$has_forbidden_chars" != x; then
51200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51204      # Going to short mode and back again did indeed matter. Since short mode is
51205      # case insensitive, let's make it lowercase to improve readability.
51206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51207      # Now convert it back to Unix-style (cygpath)
51208      input_path=`$CYGPATH -u "$shortmode_path"`
51209      new_path="$input_path"
51210    fi
51211  fi
51212
51213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51214  if test "x$test_cygdrive_prefix" = x; then
51215    # As a simple fix, exclude /usr/bin since it's not a real path.
51216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51218      # a path prefixed by /cygdrive for fixpath to work.
51219      new_path="$CYGWIN_ROOT_PATH$input_path"
51220    fi
51221  fi
51222
51223
51224  if test "x$path" != "x$new_path"; then
51225    MSVC_DLL="$new_path"
51226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51228  fi
51229
51230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51231
51232  path="$MSVC_DLL"
51233  has_colon=`$ECHO $path | $GREP ^.:`
51234  new_path="$path"
51235  if test "x$has_colon" = x; then
51236    # Not in mixed or Windows style, start by that.
51237    new_path=`cmd //c echo $path`
51238  fi
51239
51240
51241  input_path="$new_path"
51242  # Check if we need to convert this using DOS-style short mode. If the path
51243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51244  # take no chances and rewrite it.
51245  # Note: m4 eats our [], so we need to use [ and ] instead.
51246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51247  if test "x$has_forbidden_chars" != x; then
51248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51250  fi
51251
51252
51253  windows_path="$new_path"
51254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51255    unix_path=`$CYGPATH -u "$windows_path"`
51256    new_path="$unix_path"
51257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51259    new_path="$unix_path"
51260  fi
51261
51262  if test "x$path" != "x$new_path"; then
51263    MSVC_DLL="$new_path"
51264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51265$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51266  fi
51267
51268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51270
51271  else
51272    # We're on a posix platform. Hooray! :)
51273    path="$MSVC_DLL"
51274    has_space=`$ECHO "$path" | $GREP " "`
51275    if test "x$has_space" != x; then
51276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51277$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51279    fi
51280
51281    # Use eval to expand a potential ~
51282    eval path="$path"
51283    if test ! -f "$path" && test ! -d "$path"; then
51284      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51285    fi
51286
51287    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51288  fi
51289
51290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51291$as_echo_n "checking for $DLL_NAME... " >&6; }
51292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51293$as_echo "$MSVC_DLL" >&6; }
51294    else
51295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51296$as_echo "incorrect, ignoring" >&6; }
51297      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51298$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51299    fi
51300  fi
51301
51302      if test "x$MSVC_DLL" = x; then
51303        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51304      fi
51305      MSVCP_DLL="$MSVC_DLL"
51306    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51307
51308  DLL_NAME="$MSVCP_NAME"
51309  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51310  METHOD="devkit"
51311  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51312    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51313$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51314
51315    # Need to check if the found msvcr is correct architecture
51316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51317$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51318    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51320      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51321      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51322      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51323        CORRECT_MSVCR_ARCH="PE32 executable"
51324      else
51325        CORRECT_MSVCR_ARCH="PE32+ executable"
51326      fi
51327    else
51328      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51329        CORRECT_MSVCR_ARCH=386
51330      else
51331        CORRECT_MSVCR_ARCH=x86-64
51332      fi
51333    fi
51334    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51336$as_echo "ok" >&6; }
51337      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51338
51339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51340
51341  # Input might be given as Windows format, start by converting to
51342  # unix format.
51343  path="$MSVC_DLL"
51344  new_path=`$CYGPATH -u "$path"`
51345
51346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51349  # "foo.exe" is OK but "foo" is an error.
51350  #
51351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51352  # It is also a way to make sure we got the proper file name for the real test later on.
51353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51354  if test "x$test_shortpath" = x; then
51355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51358  fi
51359
51360  # Call helper function which possibly converts this using DOS-style short mode.
51361  # If so, the updated path is stored in $new_path.
51362
51363  input_path="$new_path"
51364  # Check if we need to convert this using DOS-style short mode. If the path
51365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51366  # take no chances and rewrite it.
51367  # Note: m4 eats our [], so we need to use [ and ] instead.
51368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51369  if test "x$has_forbidden_chars" != x; then
51370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51374      # Going to short mode and back again did indeed matter. Since short mode is
51375      # case insensitive, let's make it lowercase to improve readability.
51376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51377      # Now convert it back to Unix-style (cygpath)
51378      input_path=`$CYGPATH -u "$shortmode_path"`
51379      new_path="$input_path"
51380    fi
51381  fi
51382
51383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51384  if test "x$test_cygdrive_prefix" = x; then
51385    # As a simple fix, exclude /usr/bin since it's not a real path.
51386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51388      # a path prefixed by /cygdrive for fixpath to work.
51389      new_path="$CYGWIN_ROOT_PATH$input_path"
51390    fi
51391  fi
51392
51393
51394  if test "x$path" != "x$new_path"; then
51395    MSVC_DLL="$new_path"
51396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51398  fi
51399
51400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51401
51402  path="$MSVC_DLL"
51403  has_colon=`$ECHO $path | $GREP ^.:`
51404  new_path="$path"
51405  if test "x$has_colon" = x; then
51406    # Not in mixed or Windows style, start by that.
51407    new_path=`cmd //c echo $path`
51408  fi
51409
51410
51411  input_path="$new_path"
51412  # Check if we need to convert this using DOS-style short mode. If the path
51413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51414  # take no chances and rewrite it.
51415  # Note: m4 eats our [], so we need to use [ and ] instead.
51416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51417  if test "x$has_forbidden_chars" != x; then
51418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51420  fi
51421
51422
51423  windows_path="$new_path"
51424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51425    unix_path=`$CYGPATH -u "$windows_path"`
51426    new_path="$unix_path"
51427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51429    new_path="$unix_path"
51430  fi
51431
51432  if test "x$path" != "x$new_path"; then
51433    MSVC_DLL="$new_path"
51434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51436  fi
51437
51438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51440
51441  else
51442    # We're on a posix platform. Hooray! :)
51443    path="$MSVC_DLL"
51444    has_space=`$ECHO "$path" | $GREP " "`
51445    if test "x$has_space" != x; then
51446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51449    fi
51450
51451    # Use eval to expand a potential ~
51452    eval path="$path"
51453    if test ! -f "$path" && test ! -d "$path"; then
51454      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51455    fi
51456
51457    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51458  fi
51459
51460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51461$as_echo_n "checking for $DLL_NAME... " >&6; }
51462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51463$as_echo "$MSVC_DLL" >&6; }
51464    else
51465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51466$as_echo "incorrect, ignoring" >&6; }
51467      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51468$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51469    fi
51470  fi
51471
51472      if test "x$MSVC_DLL" = x; then
51473        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51474      fi
51475      MSVCP_DLL="$MSVC_DLL"
51476    else
51477
51478  DLL_NAME="${MSVCP_NAME}"
51479  MSVC_DLL=
51480
51481  if test "x$MSVC_DLL" = x; then
51482    if test "x$VCINSTALLDIR" != x; then
51483      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51484
51485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51486
51487  # Input might be given as Windows format, start by converting to
51488  # unix format.
51489  path="$CYGWIN_VC_INSTALL_DIR"
51490  new_path=`$CYGPATH -u "$path"`
51491
51492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51495  # "foo.exe" is OK but "foo" is an error.
51496  #
51497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51498  # It is also a way to make sure we got the proper file name for the real test later on.
51499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51500  if test "x$test_shortpath" = x; then
51501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
51502$as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
51503    as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
51504  fi
51505
51506  # Call helper function which possibly converts this using DOS-style short mode.
51507  # If so, the updated path is stored in $new_path.
51508
51509  input_path="$new_path"
51510  # Check if we need to convert this using DOS-style short mode. If the path
51511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51512  # take no chances and rewrite it.
51513  # Note: m4 eats our [], so we need to use [ and ] instead.
51514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51515  if test "x$has_forbidden_chars" != x; then
51516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51520      # Going to short mode and back again did indeed matter. Since short mode is
51521      # case insensitive, let's make it lowercase to improve readability.
51522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51523      # Now convert it back to Unix-style (cygpath)
51524      input_path=`$CYGPATH -u "$shortmode_path"`
51525      new_path="$input_path"
51526    fi
51527  fi
51528
51529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51530  if test "x$test_cygdrive_prefix" = x; then
51531    # As a simple fix, exclude /usr/bin since it's not a real path.
51532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51534      # a path prefixed by /cygdrive for fixpath to work.
51535      new_path="$CYGWIN_ROOT_PATH$input_path"
51536    fi
51537  fi
51538
51539
51540  if test "x$path" != "x$new_path"; then
51541    CYGWIN_VC_INSTALL_DIR="$new_path"
51542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
51543$as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
51544  fi
51545
51546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51547
51548  path="$CYGWIN_VC_INSTALL_DIR"
51549  has_colon=`$ECHO $path | $GREP ^.:`
51550  new_path="$path"
51551  if test "x$has_colon" = x; then
51552    # Not in mixed or Windows style, start by that.
51553    new_path=`cmd //c echo $path`
51554  fi
51555
51556
51557  input_path="$new_path"
51558  # Check if we need to convert this using DOS-style short mode. If the path
51559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51560  # take no chances and rewrite it.
51561  # Note: m4 eats our [], so we need to use [ and ] instead.
51562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51563  if test "x$has_forbidden_chars" != x; then
51564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51566  fi
51567
51568
51569  windows_path="$new_path"
51570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51571    unix_path=`$CYGPATH -u "$windows_path"`
51572    new_path="$unix_path"
51573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51575    new_path="$unix_path"
51576  fi
51577
51578  if test "x$path" != "x$new_path"; then
51579    CYGWIN_VC_INSTALL_DIR="$new_path"
51580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
51581$as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
51582  fi
51583
51584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51586
51587  else
51588    # We're on a posix platform. Hooray! :)
51589    path="$CYGWIN_VC_INSTALL_DIR"
51590    has_space=`$ECHO "$path" | $GREP " "`
51591    if test "x$has_space" != x; then
51592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
51593$as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
51594      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51595    fi
51596
51597    # Use eval to expand a potential ~
51598    eval path="$path"
51599    if test ! -f "$path" && test ! -d "$path"; then
51600      as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
51601    fi
51602
51603    CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
51604  fi
51605
51606      if test "$VS_VERSION" -lt 2017; then
51607        # Probe: Using well-known location from Visual Studio 12.0 and older
51608        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51609          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51610        else
51611          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51612        fi
51613      else
51614        # Probe: Using well-known location from VS 2017
51615        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51616          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
51617        else
51618          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
51619        fi
51620      fi
51621      # In case any of the above finds more than one file, loop over them.
51622      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
51623        $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
51624
51625  DLL_NAME="$DLL_NAME"
51626  POSSIBLE_MSVC_DLL="$possible_msvc_dll"
51627  METHOD="well-known location in VCINSTALLDIR"
51628  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51629    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51630$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51631
51632    # Need to check if the found msvcr is correct architecture
51633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51634$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51635    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51637      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51638      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51639      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51640        CORRECT_MSVCR_ARCH="PE32 executable"
51641      else
51642        CORRECT_MSVCR_ARCH="PE32+ executable"
51643      fi
51644    else
51645      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51646        CORRECT_MSVCR_ARCH=386
51647      else
51648        CORRECT_MSVCR_ARCH=x86-64
51649      fi
51650    fi
51651    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51653$as_echo "ok" >&6; }
51654      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51655
51656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51657
51658  # Input might be given as Windows format, start by converting to
51659  # unix format.
51660  path="$MSVC_DLL"
51661  new_path=`$CYGPATH -u "$path"`
51662
51663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51666  # "foo.exe" is OK but "foo" is an error.
51667  #
51668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51669  # It is also a way to make sure we got the proper file name for the real test later on.
51670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51671  if test "x$test_shortpath" = x; then
51672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51674    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51675  fi
51676
51677  # Call helper function which possibly converts this using DOS-style short mode.
51678  # If so, the updated path is stored in $new_path.
51679
51680  input_path="$new_path"
51681  # Check if we need to convert this using DOS-style short mode. If the path
51682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51683  # take no chances and rewrite it.
51684  # Note: m4 eats our [], so we need to use [ and ] instead.
51685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51686  if test "x$has_forbidden_chars" != x; then
51687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51691      # Going to short mode and back again did indeed matter. Since short mode is
51692      # case insensitive, let's make it lowercase to improve readability.
51693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51694      # Now convert it back to Unix-style (cygpath)
51695      input_path=`$CYGPATH -u "$shortmode_path"`
51696      new_path="$input_path"
51697    fi
51698  fi
51699
51700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51701  if test "x$test_cygdrive_prefix" = x; then
51702    # As a simple fix, exclude /usr/bin since it's not a real path.
51703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51705      # a path prefixed by /cygdrive for fixpath to work.
51706      new_path="$CYGWIN_ROOT_PATH$input_path"
51707    fi
51708  fi
51709
51710
51711  if test "x$path" != "x$new_path"; then
51712    MSVC_DLL="$new_path"
51713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51715  fi
51716
51717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51718
51719  path="$MSVC_DLL"
51720  has_colon=`$ECHO $path | $GREP ^.:`
51721  new_path="$path"
51722  if test "x$has_colon" = x; then
51723    # Not in mixed or Windows style, start by that.
51724    new_path=`cmd //c echo $path`
51725  fi
51726
51727
51728  input_path="$new_path"
51729  # Check if we need to convert this using DOS-style short mode. If the path
51730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51731  # take no chances and rewrite it.
51732  # Note: m4 eats our [], so we need to use [ and ] instead.
51733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51734  if test "x$has_forbidden_chars" != x; then
51735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51737  fi
51738
51739
51740  windows_path="$new_path"
51741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51742    unix_path=`$CYGPATH -u "$windows_path"`
51743    new_path="$unix_path"
51744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51746    new_path="$unix_path"
51747  fi
51748
51749  if test "x$path" != "x$new_path"; then
51750    MSVC_DLL="$new_path"
51751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51752$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51753  fi
51754
51755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51757
51758  else
51759    # We're on a posix platform. Hooray! :)
51760    path="$MSVC_DLL"
51761    has_space=`$ECHO "$path" | $GREP " "`
51762    if test "x$has_space" != x; then
51763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51766    fi
51767
51768    # Use eval to expand a potential ~
51769    eval path="$path"
51770    if test ! -f "$path" && test ! -d "$path"; then
51771      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51772    fi
51773
51774    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51775  fi
51776
51777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51778$as_echo_n "checking for $DLL_NAME... " >&6; }
51779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51780$as_echo "$MSVC_DLL" >&6; }
51781    else
51782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51783$as_echo "incorrect, ignoring" >&6; }
51784      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51785$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51786    fi
51787  fi
51788
51789      done
51790    fi
51791  fi
51792
51793  if test "x$MSVC_DLL" = x; then
51794    # Probe: Check in the Boot JDK directory.
51795    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51796
51797  DLL_NAME="$DLL_NAME"
51798  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51799  METHOD="well-known location in Boot JDK"
51800  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51802$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51803
51804    # Need to check if the found msvcr is correct architecture
51805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51806$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51807    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51809      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51810      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51811      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51812        CORRECT_MSVCR_ARCH="PE32 executable"
51813      else
51814        CORRECT_MSVCR_ARCH="PE32+ executable"
51815      fi
51816    else
51817      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51818        CORRECT_MSVCR_ARCH=386
51819      else
51820        CORRECT_MSVCR_ARCH=x86-64
51821      fi
51822    fi
51823    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51825$as_echo "ok" >&6; }
51826      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51827
51828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51829
51830  # Input might be given as Windows format, start by converting to
51831  # unix format.
51832  path="$MSVC_DLL"
51833  new_path=`$CYGPATH -u "$path"`
51834
51835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51838  # "foo.exe" is OK but "foo" is an error.
51839  #
51840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51841  # It is also a way to make sure we got the proper file name for the real test later on.
51842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51843  if test "x$test_shortpath" = x; then
51844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51845$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51846    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51847  fi
51848
51849  # Call helper function which possibly converts this using DOS-style short mode.
51850  # If so, the updated path is stored in $new_path.
51851
51852  input_path="$new_path"
51853  # Check if we need to convert this using DOS-style short mode. If the path
51854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51855  # take no chances and rewrite it.
51856  # Note: m4 eats our [], so we need to use [ and ] instead.
51857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51858  if test "x$has_forbidden_chars" != x; then
51859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51863      # Going to short mode and back again did indeed matter. Since short mode is
51864      # case insensitive, let's make it lowercase to improve readability.
51865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51866      # Now convert it back to Unix-style (cygpath)
51867      input_path=`$CYGPATH -u "$shortmode_path"`
51868      new_path="$input_path"
51869    fi
51870  fi
51871
51872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51873  if test "x$test_cygdrive_prefix" = x; then
51874    # As a simple fix, exclude /usr/bin since it's not a real path.
51875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51877      # a path prefixed by /cygdrive for fixpath to work.
51878      new_path="$CYGWIN_ROOT_PATH$input_path"
51879    fi
51880  fi
51881
51882
51883  if test "x$path" != "x$new_path"; then
51884    MSVC_DLL="$new_path"
51885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51886$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51887  fi
51888
51889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51890
51891  path="$MSVC_DLL"
51892  has_colon=`$ECHO $path | $GREP ^.:`
51893  new_path="$path"
51894  if test "x$has_colon" = x; then
51895    # Not in mixed or Windows style, start by that.
51896    new_path=`cmd //c echo $path`
51897  fi
51898
51899
51900  input_path="$new_path"
51901  # Check if we need to convert this using DOS-style short mode. If the path
51902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51903  # take no chances and rewrite it.
51904  # Note: m4 eats our [], so we need to use [ and ] instead.
51905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51906  if test "x$has_forbidden_chars" != x; then
51907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51909  fi
51910
51911
51912  windows_path="$new_path"
51913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51914    unix_path=`$CYGPATH -u "$windows_path"`
51915    new_path="$unix_path"
51916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51918    new_path="$unix_path"
51919  fi
51920
51921  if test "x$path" != "x$new_path"; then
51922    MSVC_DLL="$new_path"
51923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51924$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51925  fi
51926
51927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51929
51930  else
51931    # We're on a posix platform. Hooray! :)
51932    path="$MSVC_DLL"
51933    has_space=`$ECHO "$path" | $GREP " "`
51934    if test "x$has_space" != x; then
51935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51936$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51937      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51938    fi
51939
51940    # Use eval to expand a potential ~
51941    eval path="$path"
51942    if test ! -f "$path" && test ! -d "$path"; then
51943      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51944    fi
51945
51946    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51947  fi
51948
51949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51950$as_echo_n "checking for $DLL_NAME... " >&6; }
51951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51952$as_echo "$MSVC_DLL" >&6; }
51953    else
51954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51955$as_echo "incorrect, ignoring" >&6; }
51956      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51957$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51958    fi
51959  fi
51960
51961  fi
51962
51963  if test "x$MSVC_DLL" = x; then
51964    # Probe: Look in the Windows system32 directory
51965    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51966
51967  windows_path="$CYGWIN_SYSTEMROOT"
51968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51969    unix_path=`$CYGPATH -u "$windows_path"`
51970    CYGWIN_SYSTEMROOT="$unix_path"
51971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51973    CYGWIN_SYSTEMROOT="$unix_path"
51974  fi
51975
51976    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51977
51978  DLL_NAME="$DLL_NAME"
51979  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51980  METHOD="well-known location in SYSTEMROOT"
51981  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51983$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51984
51985    # Need to check if the found msvcr is correct architecture
51986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51987$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51988    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51990      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51991      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51992      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51993        CORRECT_MSVCR_ARCH="PE32 executable"
51994      else
51995        CORRECT_MSVCR_ARCH="PE32+ executable"
51996      fi
51997    else
51998      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51999        CORRECT_MSVCR_ARCH=386
52000      else
52001        CORRECT_MSVCR_ARCH=x86-64
52002      fi
52003    fi
52004    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52006$as_echo "ok" >&6; }
52007      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52008
52009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52010
52011  # Input might be given as Windows format, start by converting to
52012  # unix format.
52013  path="$MSVC_DLL"
52014  new_path=`$CYGPATH -u "$path"`
52015
52016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52019  # "foo.exe" is OK but "foo" is an error.
52020  #
52021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52022  # It is also a way to make sure we got the proper file name for the real test later on.
52023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52024  if test "x$test_shortpath" = x; then
52025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52026$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52027    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52028  fi
52029
52030  # Call helper function which possibly converts this using DOS-style short mode.
52031  # If so, the updated path is stored in $new_path.
52032
52033  input_path="$new_path"
52034  # Check if we need to convert this using DOS-style short mode. If the path
52035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52036  # take no chances and rewrite it.
52037  # Note: m4 eats our [], so we need to use [ and ] instead.
52038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52039  if test "x$has_forbidden_chars" != x; then
52040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52044      # Going to short mode and back again did indeed matter. Since short mode is
52045      # case insensitive, let's make it lowercase to improve readability.
52046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52047      # Now convert it back to Unix-style (cygpath)
52048      input_path=`$CYGPATH -u "$shortmode_path"`
52049      new_path="$input_path"
52050    fi
52051  fi
52052
52053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52054  if test "x$test_cygdrive_prefix" = x; then
52055    # As a simple fix, exclude /usr/bin since it's not a real path.
52056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52058      # a path prefixed by /cygdrive for fixpath to work.
52059      new_path="$CYGWIN_ROOT_PATH$input_path"
52060    fi
52061  fi
52062
52063
52064  if test "x$path" != "x$new_path"; then
52065    MSVC_DLL="$new_path"
52066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52067$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52068  fi
52069
52070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52071
52072  path="$MSVC_DLL"
52073  has_colon=`$ECHO $path | $GREP ^.:`
52074  new_path="$path"
52075  if test "x$has_colon" = x; then
52076    # Not in mixed or Windows style, start by that.
52077    new_path=`cmd //c echo $path`
52078  fi
52079
52080
52081  input_path="$new_path"
52082  # Check if we need to convert this using DOS-style short mode. If the path
52083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52084  # take no chances and rewrite it.
52085  # Note: m4 eats our [], so we need to use [ and ] instead.
52086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52087  if test "x$has_forbidden_chars" != x; then
52088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52090  fi
52091
52092
52093  windows_path="$new_path"
52094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52095    unix_path=`$CYGPATH -u "$windows_path"`
52096    new_path="$unix_path"
52097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52099    new_path="$unix_path"
52100  fi
52101
52102  if test "x$path" != "x$new_path"; then
52103    MSVC_DLL="$new_path"
52104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52105$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52106  fi
52107
52108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52110
52111  else
52112    # We're on a posix platform. Hooray! :)
52113    path="$MSVC_DLL"
52114    has_space=`$ECHO "$path" | $GREP " "`
52115    if test "x$has_space" != x; then
52116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52117$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52118      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52119    fi
52120
52121    # Use eval to expand a potential ~
52122    eval path="$path"
52123    if test ! -f "$path" && test ! -d "$path"; then
52124      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52125    fi
52126
52127    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52128  fi
52129
52130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52131$as_echo_n "checking for $DLL_NAME... " >&6; }
52132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52133$as_echo "$MSVC_DLL" >&6; }
52134    else
52135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52136$as_echo "incorrect, ignoring" >&6; }
52137      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52138$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52139    fi
52140  fi
52141
52142  fi
52143
52144  if test "x$MSVC_DLL" = x; then
52145    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52146    if test "x$VS100COMNTOOLS" != x; then
52147      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52148
52149  windows_path="$CYGWIN_VS_TOOLS_DIR"
52150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52151    unix_path=`$CYGPATH -u "$windows_path"`
52152    CYGWIN_VS_TOOLS_DIR="$unix_path"
52153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52155    CYGWIN_VS_TOOLS_DIR="$unix_path"
52156  fi
52157
52158      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52159        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52160            | $GREP -i /x64/ | $HEAD --lines 1`
52161      else
52162        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52163            | $GREP -i /x86/ | $HEAD --lines 1`
52164      fi
52165
52166  DLL_NAME="$DLL_NAME"
52167  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52168  METHOD="search of VS100COMNTOOLS"
52169  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52171$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52172
52173    # Need to check if the found msvcr is correct architecture
52174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52175$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52176    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52178      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52179      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52181        CORRECT_MSVCR_ARCH="PE32 executable"
52182      else
52183        CORRECT_MSVCR_ARCH="PE32+ executable"
52184      fi
52185    else
52186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52187        CORRECT_MSVCR_ARCH=386
52188      else
52189        CORRECT_MSVCR_ARCH=x86-64
52190      fi
52191    fi
52192    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52194$as_echo "ok" >&6; }
52195      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52196
52197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52198
52199  # Input might be given as Windows format, start by converting to
52200  # unix format.
52201  path="$MSVC_DLL"
52202  new_path=`$CYGPATH -u "$path"`
52203
52204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52207  # "foo.exe" is OK but "foo" is an error.
52208  #
52209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52210  # It is also a way to make sure we got the proper file name for the real test later on.
52211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52212  if test "x$test_shortpath" = x; then
52213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52214$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52215    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52216  fi
52217
52218  # Call helper function which possibly converts this using DOS-style short mode.
52219  # If so, the updated path is stored in $new_path.
52220
52221  input_path="$new_path"
52222  # Check if we need to convert this using DOS-style short mode. If the path
52223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52224  # take no chances and rewrite it.
52225  # Note: m4 eats our [], so we need to use [ and ] instead.
52226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52227  if test "x$has_forbidden_chars" != x; then
52228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52232      # Going to short mode and back again did indeed matter. Since short mode is
52233      # case insensitive, let's make it lowercase to improve readability.
52234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52235      # Now convert it back to Unix-style (cygpath)
52236      input_path=`$CYGPATH -u "$shortmode_path"`
52237      new_path="$input_path"
52238    fi
52239  fi
52240
52241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52242  if test "x$test_cygdrive_prefix" = x; then
52243    # As a simple fix, exclude /usr/bin since it's not a real path.
52244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52246      # a path prefixed by /cygdrive for fixpath to work.
52247      new_path="$CYGWIN_ROOT_PATH$input_path"
52248    fi
52249  fi
52250
52251
52252  if test "x$path" != "x$new_path"; then
52253    MSVC_DLL="$new_path"
52254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52255$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52256  fi
52257
52258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52259
52260  path="$MSVC_DLL"
52261  has_colon=`$ECHO $path | $GREP ^.:`
52262  new_path="$path"
52263  if test "x$has_colon" = x; then
52264    # Not in mixed or Windows style, start by that.
52265    new_path=`cmd //c echo $path`
52266  fi
52267
52268
52269  input_path="$new_path"
52270  # Check if we need to convert this using DOS-style short mode. If the path
52271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52272  # take no chances and rewrite it.
52273  # Note: m4 eats our [], so we need to use [ and ] instead.
52274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52275  if test "x$has_forbidden_chars" != x; then
52276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52278  fi
52279
52280
52281  windows_path="$new_path"
52282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52283    unix_path=`$CYGPATH -u "$windows_path"`
52284    new_path="$unix_path"
52285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52287    new_path="$unix_path"
52288  fi
52289
52290  if test "x$path" != "x$new_path"; then
52291    MSVC_DLL="$new_path"
52292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52293$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52294  fi
52295
52296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52298
52299  else
52300    # We're on a posix platform. Hooray! :)
52301    path="$MSVC_DLL"
52302    has_space=`$ECHO "$path" | $GREP " "`
52303    if test "x$has_space" != x; then
52304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52305$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52307    fi
52308
52309    # Use eval to expand a potential ~
52310    eval path="$path"
52311    if test ! -f "$path" && test ! -d "$path"; then
52312      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52313    fi
52314
52315    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52316  fi
52317
52318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52319$as_echo_n "checking for $DLL_NAME... " >&6; }
52320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52321$as_echo "$MSVC_DLL" >&6; }
52322    else
52323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52324$as_echo "incorrect, ignoring" >&6; }
52325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52327    fi
52328  fi
52329
52330    fi
52331  fi
52332
52333  if test "x$MSVC_DLL" = x; then
52334    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52335    # (This was the original behaviour; kept since it might turn something up)
52336    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52337      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52338        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52339          | $GREP x64 | $HEAD --lines 1`
52340      else
52341        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52342          | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52343        if test "x$POSSIBLE_MSVC_DLL" = x; then
52344          # We're grasping at straws now...
52345          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52346              | $HEAD --lines 1`
52347        fi
52348      fi
52349
52350
52351  DLL_NAME="$DLL_NAME"
52352  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52353  METHOD="search of VCINSTALLDIR"
52354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52357
52358    # Need to check if the found msvcr is correct architecture
52359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52366        CORRECT_MSVCR_ARCH="PE32 executable"
52367      else
52368        CORRECT_MSVCR_ARCH="PE32+ executable"
52369      fi
52370    else
52371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52372        CORRECT_MSVCR_ARCH=386
52373      else
52374        CORRECT_MSVCR_ARCH=x86-64
52375      fi
52376    fi
52377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52379$as_echo "ok" >&6; }
52380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52381
52382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52383
52384  # Input might be given as Windows format, start by converting to
52385  # unix format.
52386  path="$MSVC_DLL"
52387  new_path=`$CYGPATH -u "$path"`
52388
52389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52392  # "foo.exe" is OK but "foo" is an error.
52393  #
52394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52395  # It is also a way to make sure we got the proper file name for the real test later on.
52396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52397  if test "x$test_shortpath" = x; then
52398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52399$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52400    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52401  fi
52402
52403  # Call helper function which possibly converts this using DOS-style short mode.
52404  # If so, the updated path is stored in $new_path.
52405
52406  input_path="$new_path"
52407  # Check if we need to convert this using DOS-style short mode. If the path
52408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52409  # take no chances and rewrite it.
52410  # Note: m4 eats our [], so we need to use [ and ] instead.
52411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52412  if test "x$has_forbidden_chars" != x; then
52413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52417      # Going to short mode and back again did indeed matter. Since short mode is
52418      # case insensitive, let's make it lowercase to improve readability.
52419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52420      # Now convert it back to Unix-style (cygpath)
52421      input_path=`$CYGPATH -u "$shortmode_path"`
52422      new_path="$input_path"
52423    fi
52424  fi
52425
52426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52427  if test "x$test_cygdrive_prefix" = x; then
52428    # As a simple fix, exclude /usr/bin since it's not a real path.
52429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52431      # a path prefixed by /cygdrive for fixpath to work.
52432      new_path="$CYGWIN_ROOT_PATH$input_path"
52433    fi
52434  fi
52435
52436
52437  if test "x$path" != "x$new_path"; then
52438    MSVC_DLL="$new_path"
52439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52440$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52441  fi
52442
52443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52444
52445  path="$MSVC_DLL"
52446  has_colon=`$ECHO $path | $GREP ^.:`
52447  new_path="$path"
52448  if test "x$has_colon" = x; then
52449    # Not in mixed or Windows style, start by that.
52450    new_path=`cmd //c echo $path`
52451  fi
52452
52453
52454  input_path="$new_path"
52455  # Check if we need to convert this using DOS-style short mode. If the path
52456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52457  # take no chances and rewrite it.
52458  # Note: m4 eats our [], so we need to use [ and ] instead.
52459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52460  if test "x$has_forbidden_chars" != x; then
52461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52463  fi
52464
52465
52466  windows_path="$new_path"
52467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52468    unix_path=`$CYGPATH -u "$windows_path"`
52469    new_path="$unix_path"
52470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52472    new_path="$unix_path"
52473  fi
52474
52475  if test "x$path" != "x$new_path"; then
52476    MSVC_DLL="$new_path"
52477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52478$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52479  fi
52480
52481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52483
52484  else
52485    # We're on a posix platform. Hooray! :)
52486    path="$MSVC_DLL"
52487    has_space=`$ECHO "$path" | $GREP " "`
52488    if test "x$has_space" != x; then
52489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52490$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52491      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52492    fi
52493
52494    # Use eval to expand a potential ~
52495    eval path="$path"
52496    if test ! -f "$path" && test ! -d "$path"; then
52497      as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52498    fi
52499
52500    MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52501  fi
52502
52503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52504$as_echo_n "checking for $DLL_NAME... " >&6; }
52505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52506$as_echo "$MSVC_DLL" >&6; }
52507    else
52508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52509$as_echo "incorrect, ignoring" >&6; }
52510      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52511$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52512    fi
52513  fi
52514
52515    fi
52516  fi
52517
52518  if test "x$MSVC_DLL" = x; then
52519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52520$as_echo_n "checking for $DLL_NAME... " >&6; }
52521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52522$as_echo "no" >&6; }
52523    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52524  fi
52525
52526      MSVCP_DLL="$MSVC_DLL"
52527    fi
52528
52529  fi
52530
52531
52532# Check whether --with-ucrt-dll-dir was given.
52533if test "${with_ucrt_dll_dir+set}" = set; then :
52534  withval=$with_ucrt_dll_dir;
52535fi
52536
52537
52538  if test "x$USE_UCRT" = "xtrue"; then
52539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCRT DLL dir" >&5
52540$as_echo_n "checking for UCRT DLL dir... " >&6; }
52541    if test "x$with_ucrt_dll_dir" != x; then
52542      if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
52543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52544$as_echo "no" >&6; }
52545        as_fn_error $? "Could not find any dlls in $with_ucrt_dll_dir" "$LINENO" 5
52546      else
52547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ucrt_dll_dir" >&5
52548$as_echo "$with_ucrt_dll_dir" >&6; }
52549        UCRT_DLL_DIR="$with_ucrt_dll_dir"
52550
52551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52552
52553  # Input might be given as Windows format, start by converting to
52554  # unix format.
52555  path="$UCRT_DLL_DIR"
52556  new_path=`$CYGPATH -u "$path"`
52557
52558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52561  # "foo.exe" is OK but "foo" is an error.
52562  #
52563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52564  # It is also a way to make sure we got the proper file name for the real test later on.
52565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52566  if test "x$test_shortpath" = x; then
52567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
52568$as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
52569    as_fn_error $? "Cannot locate the the path of UCRT_DLL_DIR" "$LINENO" 5
52570  fi
52571
52572  # Call helper function which possibly converts this using DOS-style short mode.
52573  # If so, the updated path is stored in $new_path.
52574
52575  input_path="$new_path"
52576  # Check if we need to convert this using DOS-style short mode. If the path
52577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52578  # take no chances and rewrite it.
52579  # Note: m4 eats our [], so we need to use [ and ] instead.
52580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52581  if test "x$has_forbidden_chars" != x; then
52582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52586      # Going to short mode and back again did indeed matter. Since short mode is
52587      # case insensitive, let's make it lowercase to improve readability.
52588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52589      # Now convert it back to Unix-style (cygpath)
52590      input_path=`$CYGPATH -u "$shortmode_path"`
52591      new_path="$input_path"
52592    fi
52593  fi
52594
52595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52596  if test "x$test_cygdrive_prefix" = x; then
52597    # As a simple fix, exclude /usr/bin since it's not a real path.
52598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52600      # a path prefixed by /cygdrive for fixpath to work.
52601      new_path="$CYGWIN_ROOT_PATH$input_path"
52602    fi
52603  fi
52604
52605
52606  if test "x$path" != "x$new_path"; then
52607    UCRT_DLL_DIR="$new_path"
52608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
52609$as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
52610  fi
52611
52612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52613
52614  path="$UCRT_DLL_DIR"
52615  has_colon=`$ECHO $path | $GREP ^.:`
52616  new_path="$path"
52617  if test "x$has_colon" = x; then
52618    # Not in mixed or Windows style, start by that.
52619    new_path=`cmd //c echo $path`
52620  fi
52621
52622
52623  input_path="$new_path"
52624  # Check if we need to convert this using DOS-style short mode. If the path
52625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52626  # take no chances and rewrite it.
52627  # Note: m4 eats our [], so we need to use [ and ] instead.
52628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52629  if test "x$has_forbidden_chars" != x; then
52630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52632  fi
52633
52634
52635  windows_path="$new_path"
52636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52637    unix_path=`$CYGPATH -u "$windows_path"`
52638    new_path="$unix_path"
52639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52641    new_path="$unix_path"
52642  fi
52643
52644  if test "x$path" != "x$new_path"; then
52645    UCRT_DLL_DIR="$new_path"
52646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
52647$as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
52648  fi
52649
52650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52652
52653  else
52654    # We're on a posix platform. Hooray! :)
52655    path="$UCRT_DLL_DIR"
52656    has_space=`$ECHO "$path" | $GREP " "`
52657    if test "x$has_space" != x; then
52658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
52659$as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
52660      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52661    fi
52662
52663    # Use eval to expand a potential ~
52664    eval path="$path"
52665    if test ! -f "$path" && test ! -d "$path"; then
52666      as_fn_error $? "The path of UCRT_DLL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
52667    fi
52668
52669    UCRT_DLL_DIR="`cd "$path"; $THEPWDCMD -L`"
52670  fi
52671
52672      fi
52673    elif test "x$DEVKIT_UCRT_DLL_DIR" != "x"; then
52674      UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
52675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52676$as_echo "$UCRT_DLL_DIR" >&6; }
52677    else
52678      CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
52679
52680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52681
52682  # Input might be given as Windows format, start by converting to
52683  # unix format.
52684  path="$CYGWIN_WINDOWSSDKDIR"
52685  new_path=`$CYGPATH -u "$path"`
52686
52687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52690  # "foo.exe" is OK but "foo" is an error.
52691  #
52692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52693  # It is also a way to make sure we got the proper file name for the real test later on.
52694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52695  if test "x$test_shortpath" = x; then
52696    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
52697$as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
52698    as_fn_error $? "Cannot locate the the path of CYGWIN_WINDOWSSDKDIR" "$LINENO" 5
52699  fi
52700
52701  # Call helper function which possibly converts this using DOS-style short mode.
52702  # If so, the updated path is stored in $new_path.
52703
52704  input_path="$new_path"
52705  # Check if we need to convert this using DOS-style short mode. If the path
52706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52707  # take no chances and rewrite it.
52708  # Note: m4 eats our [], so we need to use [ and ] instead.
52709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52710  if test "x$has_forbidden_chars" != x; then
52711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52715      # Going to short mode and back again did indeed matter. Since short mode is
52716      # case insensitive, let's make it lowercase to improve readability.
52717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52718      # Now convert it back to Unix-style (cygpath)
52719      input_path=`$CYGPATH -u "$shortmode_path"`
52720      new_path="$input_path"
52721    fi
52722  fi
52723
52724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52725  if test "x$test_cygdrive_prefix" = x; then
52726    # As a simple fix, exclude /usr/bin since it's not a real path.
52727    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52729      # a path prefixed by /cygdrive for fixpath to work.
52730      new_path="$CYGWIN_ROOT_PATH$input_path"
52731    fi
52732  fi
52733
52734
52735  if test "x$path" != "x$new_path"; then
52736    CYGWIN_WINDOWSSDKDIR="$new_path"
52737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
52738$as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
52739  fi
52740
52741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52742
52743  path="$CYGWIN_WINDOWSSDKDIR"
52744  has_colon=`$ECHO $path | $GREP ^.:`
52745  new_path="$path"
52746  if test "x$has_colon" = x; then
52747    # Not in mixed or Windows style, start by that.
52748    new_path=`cmd //c echo $path`
52749  fi
52750
52751
52752  input_path="$new_path"
52753  # Check if we need to convert this using DOS-style short mode. If the path
52754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52755  # take no chances and rewrite it.
52756  # Note: m4 eats our [], so we need to use [ and ] instead.
52757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52758  if test "x$has_forbidden_chars" != x; then
52759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52761  fi
52762
52763
52764  windows_path="$new_path"
52765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52766    unix_path=`$CYGPATH -u "$windows_path"`
52767    new_path="$unix_path"
52768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52770    new_path="$unix_path"
52771  fi
52772
52773  if test "x$path" != "x$new_path"; then
52774    CYGWIN_WINDOWSSDKDIR="$new_path"
52775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
52776$as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
52777  fi
52778
52779  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52780  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52781
52782  else
52783    # We're on a posix platform. Hooray! :)
52784    path="$CYGWIN_WINDOWSSDKDIR"
52785    has_space=`$ECHO "$path" | $GREP " "`
52786    if test "x$has_space" != x; then
52787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
52788$as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
52789      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52790    fi
52791
52792    # Use eval to expand a potential ~
52793    eval path="$path"
52794    if test ! -f "$path" && test ! -d "$path"; then
52795      as_fn_error $? "The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is not found." "$LINENO" 5
52796    fi
52797
52798    CYGWIN_WINDOWSSDKDIR="`cd "$path"; $THEPWDCMD -L`"
52799  fi
52800
52801      dll_subdir=$OPENJDK_TARGET_CPU
52802      if test "x$dll_subdir" = "xx86_64"; then
52803        dll_subdir="x64"
52804      fi
52805      UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
52806      if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
52807        # Try with version subdir
52808        UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
52809            2> /dev/null | $SORT -d | $HEAD -n1`"
52810        if test -z "$UCRT_DLL_DIR" \
52811            || test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
52812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52813$as_echo "no" >&6; }
52814          as_fn_error $? "Could not find any dlls in $UCRT_DLL_DIR" "$LINENO" 5
52815        else
52816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52817$as_echo "$UCRT_DLL_DIR" >&6; }
52818        fi
52819      else
52820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52821$as_echo "$UCRT_DLL_DIR" >&6; }
52822      fi
52823    fi
52824  else
52825    UCRT_DLL_DIR=
52826  fi
52827
52828
52829
52830
52831# Check whether --with-dxsdk was given.
52832if test "${with_dxsdk+set}" = set; then :
52833  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52834$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52835fi
52836
52837
52838
52839
52840# Check whether --with-dxsdk-lib was given.
52841if test "${with_dxsdk_lib+set}" = set; then :
52842  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52843$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52844fi
52845
52846
52847
52848
52849# Check whether --with-dxsdk-include was given.
52850if test "${with_dxsdk_include+set}" = set; then :
52851  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52852$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52853fi
52854
52855
52856  fi
52857
52858
52859###############################################################################
52860#
52861# We need to do some final tweaking, when everything else is done.
52862#
52863###############################################################################
52864
52865
52866  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52867
52868
52869  # The name of the Service Agent jar.
52870  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52871  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52872    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52873  fi
52874
52875
52876
52877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52878$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52879
52880    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
52881      ENABLE_INTREE_EC=yes
52882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52883$as_echo "yes" >&6; }
52884    else
52885      ENABLE_INTREE_EC=no
52886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52887$as_echo "no" >&6; }
52888    fi
52889
52890
52891
52892
52893###############################################################################
52894#
52895# Configure parts of the build that only affect the build performance,
52896# not the result.
52897#
52898###############################################################################
52899
52900
52901  # How many cores do we have on this build system?
52902
52903# Check whether --with-num-cores was given.
52904if test "${with_num_cores+set}" = set; then :
52905  withval=$with_num_cores;
52906fi
52907
52908  if test "x$with_num_cores" = x; then
52909    # The number of cores were not specified, try to probe them.
52910
52911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52912$as_echo_n "checking for number of cores... " >&6; }
52913  NUM_CORES=1
52914  FOUND_CORES=no
52915
52916  if test -f /proc/cpuinfo; then
52917    # Looks like a Linux (or cygwin) system
52918    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52919    FOUND_CORES=yes
52920  elif test -x /usr/sbin/psrinfo; then
52921    # Looks like a Solaris system
52922    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52923    FOUND_CORES=yes
52924  elif test -x /usr/sbin/system_profiler; then
52925    # Looks like a MacOSX system
52926    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52927    FOUND_CORES=yes
52928  elif test "x$OPENJDK_BUILD_OS" = xbsd && test "x$(uname -s | grep -o BSD)" = xBSD; then
52929    # Looks like a BSD system
52930    NUM_CORES=`/sbin/sysctl -n hw.ncpu`
52931    FOUND_CORES=yes
52932  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52933    NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[0-9]*" | $CUT -d "=" -f 2`
52934    if test -n "$NUM_LCPU"; then
52935      NUM_CORES=$NUM_LCPU
52936      FOUND_CORES=yes
52937    fi
52938  elif test -n "$NUMBER_OF_PROCESSORS"; then
52939    # On windows, look in the env
52940    NUM_CORES=$NUMBER_OF_PROCESSORS
52941    FOUND_CORES=yes
52942  fi
52943
52944  if test "x$FOUND_CORES" = xyes; then
52945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52946$as_echo "$NUM_CORES" >&6; }
52947  else
52948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52949$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52950    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52951$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52952  fi
52953
52954  else
52955    NUM_CORES=$with_num_cores
52956  fi
52957
52958
52959
52960  # How much memory do we have on this build system?
52961
52962# Check whether --with-memory-size was given.
52963if test "${with_memory_size+set}" = set; then :
52964  withval=$with_memory_size;
52965fi
52966
52967  if test "x$with_memory_size" = x; then
52968    # The memory size was not specified, try to probe it.
52969
52970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52971$as_echo_n "checking for memory size... " >&6; }
52972  # Default to 1024 MB
52973  MEMORY_SIZE=1024
52974  FOUND_MEM=no
52975
52976  if test -f /proc/meminfo; then
52977    # Looks like a Linux (or cygwin) system
52978    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52979    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52980    FOUND_MEM=yes
52981  elif test -x /usr/sbin/prtconf; then
52982    # Looks like a Solaris or AIX system
52983    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52984    FOUND_MEM=yes
52985  elif test -x /usr/sbin/system_profiler; then
52986    # Looks like a MacOSX system
52987    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52988    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52989    FOUND_MEM=yes
52990  elif test "x$OPENJDK_BUILD_OS" = xbsd && test "x$(uname -s | grep -o OpenBSD)" = xOpenBSD; then
52991    # Looks like an OpenBSD system
52992    MEMORY_SIZE=`/sbin/sysctl -n hw.physmem | awk '{print int($NF / 1048576); }'`
52993    FOUND_MEM=yes
52994  elif test "x$OPENJDK_BUILD_OS" = xbsd && test "x$(uname -s | grep -o BSD)" = xBSD; then
52995    # Looks like a BSD system
52996    MEMORY_SIZE=`/sbin/sysctl -n hw.physmem`
52997    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52998    FOUND_MEM=yes
52999  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53000    # Windows, but without cygwin
53001    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
53002    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
53003    FOUND_MEM=yes
53004  fi
53005
53006  if test "x$FOUND_MEM" = xyes; then
53007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
53008$as_echo "$MEMORY_SIZE MB" >&6; }
53009  else
53010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
53011$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
53012    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
53013$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
53014  fi
53015
53016  else
53017    MEMORY_SIZE=$with_memory_size
53018  fi
53019
53020
53021
53022  # Provide a decent default number of parallel jobs for make depending on
53023  # number of cores, amount of memory and machine architecture.
53024
53025# Check whether --with-jobs was given.
53026if test "${with_jobs+set}" = set; then :
53027  withval=$with_jobs;
53028fi
53029
53030  if test "x$with_jobs" = x; then
53031    # Number of jobs was not specified, calculate.
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
53033$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
53034    # Approximate memory in GB, rounding up a bit.
53035    memory_gb=`expr $MEMORY_SIZE / 1100`
53036    # Pick the lowest of memory in gb and number of cores.
53037    if test "$memory_gb" -lt "$NUM_CORES"; then
53038      JOBS="$memory_gb"
53039    else
53040      JOBS="$NUM_CORES"
53041      # On bigger machines, leave some room for other processes to run
53042      if test "$JOBS" -gt "4"; then
53043        JOBS=`expr $JOBS '*' 90 / 100`
53044      fi
53045    fi
53046    # Cap number of jobs to 16
53047    if test "$JOBS" -gt "16"; then
53048      JOBS=16
53049    fi
53050    if test "$JOBS" -eq "0"; then
53051      JOBS=1
53052    fi
53053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53054$as_echo "$JOBS" >&6; }
53055  else
53056    JOBS=$with_jobs
53057  fi
53058
53059
53060
53061# Setup smart javac (after cores and memory have been setup)
53062
53063
53064# Check whether --with-sjavac-server-java was given.
53065if test "${with_sjavac_server_java+set}" = set; then :
53066  withval=$with_sjavac_server_java;
53067fi
53068
53069
53070  if test "x$with_sjavac_server_java" != x; then
53071    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53072    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53073    if test "x$FOUND_VERSION" = x; then
53074      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53075    fi
53076  else
53077    SJAVAC_SERVER_JAVA=""
53078    # Hotspot specific options.
53079
53080  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
53081  $ECHO "Command: $JAVA -verbosegc -version" >&5
53082  OUTPUT=`$JAVA -verbosegc -version 2>&1`
53083  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53084  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53085  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53086    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
53087    JVM_ARG_OK=true
53088  else
53089    $ECHO "Arg failed:" >&5
53090    $ECHO "$OUTPUT" >&5
53091    JVM_ARG_OK=false
53092  fi
53093
53094    # JRockit specific options.
53095
53096  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
53097  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
53098  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
53099  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53100  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53101  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53102    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
53103    JVM_ARG_OK=true
53104  else
53105    $ECHO "Arg failed:" >&5
53106    $ECHO "$OUTPUT" >&5
53107    JVM_ARG_OK=false
53108  fi
53109
53110    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
53111  fi
53112
53113
53114  if test "$MEMORY_SIZE" -gt "2500"; then
53115
53116  $ECHO "Check if jvm arg is ok: -d64" >&5
53117  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53118  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53119  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53120  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53121  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53122    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
53123    JVM_ARG_OK=true
53124  else
53125    $ECHO "Arg failed:" >&5
53126    $ECHO "$OUTPUT" >&5
53127    JVM_ARG_OK=false
53128  fi
53129
53130    if test "$JVM_ARG_OK" = true; then
53131      JVM_64BIT=true
53132      JVM_ARG_OK=false
53133    fi
53134  fi
53135
53136  if test "$JVM_64BIT" = true; then
53137    if test "$MEMORY_SIZE" -gt "17000"; then
53138
53139  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
53140  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
53141  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
53142  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53143  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53144  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53145    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
53146    JVM_ARG_OK=true
53147  else
53148    $ECHO "Arg failed:" >&5
53149    $ECHO "$OUTPUT" >&5
53150    JVM_ARG_OK=false
53151  fi
53152
53153    fi
53154    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
53155
53156  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
53157  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
53158  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
53159  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53160  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53161  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53162    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
53163    JVM_ARG_OK=true
53164  else
53165    $ECHO "Arg failed:" >&5
53166    $ECHO "$OUTPUT" >&5
53167    JVM_ARG_OK=false
53168  fi
53169
53170    fi
53171    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
53172
53173  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
53174  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
53175  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
53176  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53177  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53178  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53179    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
53180    JVM_ARG_OK=true
53181  else
53182    $ECHO "Arg failed:" >&5
53183    $ECHO "$OUTPUT" >&5
53184    JVM_ARG_OK=false
53185  fi
53186
53187    fi
53188    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
53189
53190  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
53191  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
53192  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
53193  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53194  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53195  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53196    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
53197    JVM_ARG_OK=true
53198  else
53199    $ECHO "Arg failed:" >&5
53200    $ECHO "$OUTPUT" >&5
53201    JVM_ARG_OK=false
53202  fi
53203
53204    fi
53205  fi
53206  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
53207
53208  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
53209  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
53210  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
53211  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53212  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53213  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53214    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
53215    JVM_ARG_OK=true
53216  else
53217    $ECHO "Arg failed:" >&5
53218    $ECHO "$OUTPUT" >&5
53219    JVM_ARG_OK=false
53220  fi
53221
53222  fi
53223  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
53224
53225  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
53226  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
53227  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
53228  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53229  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53230  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53231    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
53232    JVM_ARG_OK=true
53233  else
53234    $ECHO "Arg failed:" >&5
53235    $ECHO "$OUTPUT" >&5
53236    JVM_ARG_OK=false
53237  fi
53238
53239  fi
53240  if test "$JVM_ARG_OK" = false; then
53241
53242  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
53243  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
53244  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
53245  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53246  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53247  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53248    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
53249    JVM_ARG_OK=true
53250  else
53251    $ECHO "Arg failed:" >&5
53252    $ECHO "$OUTPUT" >&5
53253    JVM_ARG_OK=false
53254  fi
53255
53256  fi
53257
53258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53259$as_echo_n "checking whether to use sjavac... " >&6; }
53260  # Check whether --enable-sjavac was given.
53261if test "${enable_sjavac+set}" = set; then :
53262  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53263else
53264  ENABLE_SJAVAC='no'
53265fi
53266
53267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53268$as_echo "$ENABLE_SJAVAC" >&6; }
53269
53270
53271  if test "x$ENABLE_SJAVAC" = xyes; then
53272    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
53273  else
53274    SJAVAC_SERVER_DIR=
53275  fi
53276
53277
53278
53279# Can the C/C++ compiler use precompiled headers?
53280
53281
53282  ###############################################################################
53283  #
53284  # Can the C/C++ compiler use precompiled headers?
53285  #
53286  # Check whether --enable-precompiled-headers was given.
53287if test "${enable_precompiled_headers+set}" = set; then :
53288  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53289else
53290  ENABLE_PRECOMPH=yes
53291fi
53292
53293
53294  USE_PRECOMPILED_HEADER=1
53295  if test "x$ENABLE_PRECOMPH" = xno; then
53296    USE_PRECOMPILED_HEADER=0
53297  fi
53298
53299  if test "x$ENABLE_PRECOMPH" = xyes; then
53300    # Check that the compiler actually supports precomp headers.
53301    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53302      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53303$as_echo_n "checking that precompiled headers work... " >&6; }
53304      echo "int alfa();" > conftest.h
53305      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53306      if test ! -f conftest.hpp.gch; then
53307        USE_PRECOMPILED_HEADER=0
53308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53309$as_echo "no" >&6; }
53310      else
53311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53312$as_echo "yes" >&6; }
53313      fi
53314      rm -f conftest.h conftest.hpp.gch
53315    fi
53316  fi
53317
53318
53319
53320
53321# Setup use of ccache, if available
53322
53323  # Check whether --enable-ccache was given.
53324if test "${enable_ccache+set}" = set; then :
53325  enableval=$enable_ccache;
53326fi
53327
53328
53329  CCACHE=
53330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53331$as_echo_n "checking is ccache enabled... " >&6; }
53332  ENABLE_CCACHE=$enable_ccache
53333  if test "x$enable_ccache" = xyes; then
53334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53335$as_echo "yes" >&6; }
53336    OLD_PATH="$PATH"
53337    if test "x$TOOLCHAIN_PATH" != x; then
53338      PATH=$TOOLCHAIN_PATH:$PATH
53339    fi
53340
53341
53342
53343  # Publish this variable in the help.
53344
53345
53346  if test "x$CCACHE" = x; then
53347    # The variable is not set by user, try to locate tool using the code snippet
53348    for ac_prog in ccache
53349do
53350  # Extract the first word of "$ac_prog", so it can be a program name with args.
53351set dummy $ac_prog; ac_word=$2
53352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53353$as_echo_n "checking for $ac_word... " >&6; }
53354if ${ac_cv_path_CCACHE+:} false; then :
53355  $as_echo_n "(cached) " >&6
53356else
53357  case $CCACHE in
53358  [\\/]* | ?:[\\/]*)
53359  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53360  ;;
53361  *)
53362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53363for as_dir in $PATH
53364do
53365  IFS=$as_save_IFS
53366  test -z "$as_dir" && as_dir=.
53367    for ac_exec_ext in '' $ac_executable_extensions; do
53368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53369    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53371    break 2
53372  fi
53373done
53374  done
53375IFS=$as_save_IFS
53376
53377  ;;
53378esac
53379fi
53380CCACHE=$ac_cv_path_CCACHE
53381if test -n "$CCACHE"; then
53382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53383$as_echo "$CCACHE" >&6; }
53384else
53385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53386$as_echo "no" >&6; }
53387fi
53388
53389
53390  test -n "$CCACHE" && break
53391done
53392
53393  else
53394    # The variable is set, but is it from the command line or the environment?
53395
53396    # Try to remove the string !CCACHE! from our list.
53397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53399      # If it failed, the variable was not from the command line. Ignore it,
53400      # but warn the user (except for BASH, which is always set by the calling BASH).
53401      if test "xCCACHE" != xBASH; then
53402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53403$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53404      fi
53405      # Try to locate tool using the code snippet
53406      for ac_prog in ccache
53407do
53408  # Extract the first word of "$ac_prog", so it can be a program name with args.
53409set dummy $ac_prog; ac_word=$2
53410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53411$as_echo_n "checking for $ac_word... " >&6; }
53412if ${ac_cv_path_CCACHE+:} false; then :
53413  $as_echo_n "(cached) " >&6
53414else
53415  case $CCACHE in
53416  [\\/]* | ?:[\\/]*)
53417  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53418  ;;
53419  *)
53420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53421for as_dir in $PATH
53422do
53423  IFS=$as_save_IFS
53424  test -z "$as_dir" && as_dir=.
53425    for ac_exec_ext in '' $ac_executable_extensions; do
53426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53427    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53429    break 2
53430  fi
53431done
53432  done
53433IFS=$as_save_IFS
53434
53435  ;;
53436esac
53437fi
53438CCACHE=$ac_cv_path_CCACHE
53439if test -n "$CCACHE"; then
53440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53441$as_echo "$CCACHE" >&6; }
53442else
53443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53444$as_echo "no" >&6; }
53445fi
53446
53447
53448  test -n "$CCACHE" && break
53449done
53450
53451    else
53452      # If it succeeded, then it was overridden by the user. We will use it
53453      # for the tool.
53454
53455      # First remove it from the list of overridden variables, so we can test
53456      # for unknown variables in the end.
53457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53458
53459      # Check if the provided tool contains a complete path.
53460      tool_specified="$CCACHE"
53461      tool_basename="${tool_specified##*/}"
53462      if test "x$tool_basename" = "x$tool_specified"; then
53463        # A command without a complete path is provided, search $PATH.
53464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53465$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53466        # Extract the first word of "$tool_basename", so it can be a program name with args.
53467set dummy $tool_basename; ac_word=$2
53468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53469$as_echo_n "checking for $ac_word... " >&6; }
53470if ${ac_cv_path_CCACHE+:} false; then :
53471  $as_echo_n "(cached) " >&6
53472else
53473  case $CCACHE in
53474  [\\/]* | ?:[\\/]*)
53475  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53476  ;;
53477  *)
53478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53479for as_dir in $PATH
53480do
53481  IFS=$as_save_IFS
53482  test -z "$as_dir" && as_dir=.
53483    for ac_exec_ext in '' $ac_executable_extensions; do
53484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53485    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53487    break 2
53488  fi
53489done
53490  done
53491IFS=$as_save_IFS
53492
53493  ;;
53494esac
53495fi
53496CCACHE=$ac_cv_path_CCACHE
53497if test -n "$CCACHE"; then
53498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53499$as_echo "$CCACHE" >&6; }
53500else
53501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53502$as_echo "no" >&6; }
53503fi
53504
53505
53506        if test "x$CCACHE" = x; then
53507          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53508        fi
53509      else
53510        # Otherwise we believe it is a complete path. Use it as it is.
53511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53512$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53514$as_echo_n "checking for CCACHE... " >&6; }
53515        if test ! -x "$tool_specified"; then
53516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53517$as_echo "not found" >&6; }
53518          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53519        fi
53520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53521$as_echo "$tool_specified" >&6; }
53522      fi
53523    fi
53524  fi
53525
53526
53527
53528  if test "x$CCACHE" = x; then
53529    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53530  fi
53531
53532
53533    CCACHE_STATUS="enabled"
53534    PATH="$OLD_PATH"
53535  elif test "x$enable_ccache" = xno; then
53536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53537$as_echo "no, explicitly disabled" >&6; }
53538  elif test "x$enable_ccache" = x; then
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53540$as_echo "no" >&6; }
53541  else
53542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53543$as_echo "unknown" >&6; }
53544    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53545  fi
53546
53547
53548
53549# Check whether --with-ccache-dir was given.
53550if test "${with_ccache_dir+set}" = set; then :
53551  withval=$with_ccache_dir;
53552fi
53553
53554
53555  if test "x$with_ccache_dir" != x; then
53556    # When using a non home ccache directory, assume the use is to share ccache files
53557    # with other users. Thus change the umask.
53558    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53559    if test "x$CCACHE" = x; then
53560      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53561$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53562    fi
53563  fi
53564
53565  if test "x$CCACHE" != x; then
53566
53567  if test "x$CCACHE" != x; then
53568    # Only use ccache if it is 3.1.4 or later, which supports
53569    # precompiled headers.
53570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
53571$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
53572    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | awk '{ split($3, a, "."); if (a[1] >= 3 && (a[2] > 1 || (a[2] == 1 && a[3] >= 4))) print "yes"; else print "no"; }') 2> /dev/null`
53573    if test "x$HAS_GOOD_CCACHE" != xyes; then
53574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
53575$as_echo "no, disabling ccache" >&6; }
53576      CCACHE=
53577      CCACHE_STATUS="disabled"
53578    else
53579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53580$as_echo "yes" >&6; }
53581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53582$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53583      PUSHED_FLAGS="$CXXFLAGS"
53584      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
53585      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53586/* end confdefs.h.  */
53587
53588int
53589main ()
53590{
53591
53592  ;
53593  return 0;
53594}
53595_ACEOF
53596if ac_fn_cxx_try_compile "$LINENO"; then :
53597  CC_KNOWS_CCACHE_TRICK=yes
53598else
53599  CC_KNOWS_CCACHE_TRICK=no
53600fi
53601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53602      CXXFLAGS="$PUSHED_FLAGS"
53603      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53605$as_echo "yes" >&6; }
53606      else
53607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
53608$as_echo "no, disabling ccaching of precompiled headers" >&6; }
53609        CCACHE=
53610        CCACHE_STATUS="disabled"
53611      fi
53612    fi
53613  fi
53614
53615  if test "x$CCACHE" != x; then
53616    CCACHE_SLOPPINESS=time_macros
53617    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
53618    CCACHE_FLAGS=-fpch-preprocess
53619
53620    if test "x$SET_CCACHE_DIR" != x; then
53621      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53622      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53623    fi
53624  fi
53625
53626  fi
53627
53628
53629###############################################################################
53630#
53631# And now the finish...
53632#
53633###############################################################################
53634
53635# Check for some common pitfalls
53636
53637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53638    file_to_test="$SRC_ROOT/LICENSE"
53639    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53640      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
53641    fi
53642  fi
53643
53644
53645  # Did user specify any unknown variables?
53646
53647  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53648    # Replace the separating ! with spaces before presenting for end user.
53649    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53651$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53652  fi
53653
53654
53655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53656$as_echo_n "checking if build directory is on local disk... " >&6; }
53657
53658  # df -l lists only local disks; if the given directory is not found then
53659  # a non-zero exit code is given
53660  if test "x$DF" = x; then
53661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53662      # msys does not have df; use Windows "net use" instead.
53663      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53664      if test "x$IS_NETWORK_DISK" = x; then
53665        OUTPUT_DIR_IS_LOCAL="yes"
53666      else
53667        OUTPUT_DIR_IS_LOCAL="no"
53668      fi
53669    else
53670      # No df here, say it's local
53671      OUTPUT_DIR_IS_LOCAL="yes"
53672    fi
53673  else
53674    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53675      OUTPUT_DIR_IS_LOCAL="yes"
53676    else
53677      OUTPUT_DIR_IS_LOCAL="no"
53678    fi
53679  fi
53680
53681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53682$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53683
53684
53685
53686  # Check if the user has any old-style ALT_ variables set.
53687  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53688
53689  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53690  # Since we can't properly handle the dependencies for this, warn the user about the situation
53691  if test -e $OUTPUT_ROOT/spec.gmk; then
53692    IS_RECONFIGURE=yes
53693  else
53694    IS_RECONFIGURE=no
53695  fi
53696
53697
53698# At the end, call the custom hook. (Dummy macro if no custom sources available)
53699
53700
53701# We're messing a bit with internal autoconf variables to put the config.status
53702# in the output directory instead of the current directory.
53703CONFIG_STATUS="$OUTPUT_ROOT/config.status"
53704
53705# Create the actual output files. Now the main work of configure is done.
53706cat >confcache <<\_ACEOF
53707# This file is a shell script that caches the results of configure
53708# tests run on this system so they can be shared between configure
53709# scripts and configure runs, see configure's option --config-cache.
53710# It is not useful on other systems.  If it contains results you don't
53711# want to keep, you may remove or edit it.
53712#
53713# config.status only pays attention to the cache file if you give it
53714# the --recheck option to rerun configure.
53715#
53716# `ac_cv_env_foo' variables (set or unset) will be overridden when
53717# loading this file, other *unset* `ac_cv_foo' will be assigned the
53718# following values.
53719
53720_ACEOF
53721
53722# The following way of writing the cache mishandles newlines in values,
53723# but we know of no workaround that is simple, portable, and efficient.
53724# So, we kill variables containing newlines.
53725# Ultrix sh set writes to stderr and can't be redirected directly,
53726# and sets the high bit in the cache file unless we assign to the vars.
53727(
53728  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53729    eval ac_val=\$$ac_var
53730    case $ac_val in #(
53731    *${as_nl}*)
53732      case $ac_var in #(
53733      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53734$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53735      esac
53736      case $ac_var in #(
53737      _ | IFS | as_nl) ;; #(
53738      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53739      *) { eval $ac_var=; unset $ac_var;} ;;
53740      esac ;;
53741    esac
53742  done
53743
53744  (set) 2>&1 |
53745    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53746    *${as_nl}ac_space=\ *)
53747      # `set' does not quote correctly, so add quotes: double-quote
53748      # substitution turns \\\\ into \\, and sed turns \\ into \.
53749      sed -n \
53750	"s/'/'\\\\''/g;
53751	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53752      ;; #(
53753    *)
53754      # `set' quotes correctly as required by POSIX, so do not add quotes.
53755      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53756      ;;
53757    esac |
53758    sort
53759) |
53760  sed '
53761     /^ac_cv_env_/b end
53762     t clear
53763     :clear
53764     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53765     t end
53766     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53767     :end' >>confcache
53768if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53769  if test -w "$cache_file"; then
53770    if test "x$cache_file" != "x/dev/null"; then
53771      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53772$as_echo "$as_me: updating cache $cache_file" >&6;}
53773      if test ! -f "$cache_file" || test -h "$cache_file"; then
53774	cat confcache >"$cache_file"
53775      else
53776        case $cache_file in #(
53777        */* | ?:*)
53778	  mv -f confcache "$cache_file"$$ &&
53779	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53780        *)
53781	  mv -f confcache "$cache_file" ;;
53782	esac
53783      fi
53784    fi
53785  else
53786    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53787$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53788  fi
53789fi
53790rm -f confcache
53791
53792test "x$prefix" = xNONE && prefix=$ac_default_prefix
53793# Let make expand exec_prefix.
53794test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53795
53796DEFS=-DHAVE_CONFIG_H
53797
53798ac_libobjs=
53799ac_ltlibobjs=
53800U=
53801for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53802  # 1. Remove the extension, and $U if already installed.
53803  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53804  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53805  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53806  #    will be set to the directory where LIBOBJS objects are built.
53807  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53808  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53809done
53810LIBOBJS=$ac_libobjs
53811
53812LTLIBOBJS=$ac_ltlibobjs
53813
53814
53815
53816: "${CONFIG_STATUS=./config.status}"
53817ac_write_fail=0
53818ac_clean_files_save=$ac_clean_files
53819ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53820{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53821$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53822as_write_fail=0
53823cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53824#! $SHELL
53825# Generated by $as_me.
53826# Run this file to recreate the current configuration.
53827# Compiler output produced by configure, useful for debugging
53828# configure, is in config.log if it exists.
53829
53830debug=false
53831ac_cs_recheck=false
53832ac_cs_silent=false
53833
53834SHELL=\${CONFIG_SHELL-$SHELL}
53835export SHELL
53836_ASEOF
53837cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53838## -------------------- ##
53839## M4sh Initialization. ##
53840## -------------------- ##
53841
53842# Be more Bourne compatible
53843DUALCASE=1; export DUALCASE # for MKS sh
53844if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53845  emulate sh
53846  NULLCMD=:
53847  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53848  # is contrary to our usage.  Disable this feature.
53849  alias -g '${1+"$@"}'='"$@"'
53850  setopt NO_GLOB_SUBST
53851else
53852  case `(set -o) 2>/dev/null` in #(
53853  *posix*) :
53854    set -o posix ;; #(
53855  *) :
53856     ;;
53857esac
53858fi
53859
53860
53861as_nl='
53862'
53863export as_nl
53864# Printing a long string crashes Solaris 7 /usr/bin/printf.
53865as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53866as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53867as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53868# Prefer a ksh shell builtin over an external printf program on Solaris,
53869# but without wasting forks for bash or zsh.
53870if test -z "$BASH_VERSION$ZSH_VERSION" \
53871    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53872  as_echo='print -r --'
53873  as_echo_n='print -rn --'
53874elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53875  as_echo='printf %s\n'
53876  as_echo_n='printf %s'
53877else
53878  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53879    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53880    as_echo_n='/usr/ucb/echo -n'
53881  else
53882    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53883    as_echo_n_body='eval
53884      arg=$1;
53885      case $arg in #(
53886      *"$as_nl"*)
53887	expr "X$arg" : "X\\(.*\\)$as_nl";
53888	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53889      esac;
53890      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53891    '
53892    export as_echo_n_body
53893    as_echo_n='sh -c $as_echo_n_body as_echo'
53894  fi
53895  export as_echo_body
53896  as_echo='sh -c $as_echo_body as_echo'
53897fi
53898
53899# The user is always right.
53900if test "${PATH_SEPARATOR+set}" != set; then
53901  PATH_SEPARATOR=:
53902  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53903    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53904      PATH_SEPARATOR=';'
53905  }
53906fi
53907
53908
53909# IFS
53910# We need space, tab and new line, in precisely that order.  Quoting is
53911# there to prevent editors from complaining about space-tab.
53912# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53913# splitting by setting IFS to empty value.)
53914IFS=" ""	$as_nl"
53915
53916# Find who we are.  Look in the path if we contain no directory separator.
53917as_myself=
53918case $0 in #((
53919  *[\\/]* ) as_myself=$0 ;;
53920  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53921for as_dir in $PATH
53922do
53923  IFS=$as_save_IFS
53924  test -z "$as_dir" && as_dir=.
53925    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53926  done
53927IFS=$as_save_IFS
53928
53929     ;;
53930esac
53931# We did not find ourselves, most probably we were run as `sh COMMAND'
53932# in which case we are not to be found in the path.
53933if test "x$as_myself" = x; then
53934  as_myself=$0
53935fi
53936if test ! -f "$as_myself"; then
53937  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53938  exit 1
53939fi
53940
53941# Unset variables that we do not need and which cause bugs (e.g. in
53942# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53943# suppresses any "Segmentation fault" message there.  '((' could
53944# trigger a bug in pdksh 5.2.14.
53945for as_var in BASH_ENV ENV MAIL MAILPATH
53946do eval test x\${$as_var+set} = xset \
53947  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53948done
53949PS1='$ '
53950PS2='> '
53951PS4='+ '
53952
53953# NLS nuisances.
53954LC_ALL=C
53955export LC_ALL
53956LANGUAGE=C
53957export LANGUAGE
53958
53959# CDPATH.
53960(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53961
53962
53963# as_fn_error STATUS ERROR [LINENO LOG_FD]
53964# ----------------------------------------
53965# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53966# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53967# script with STATUS, using 1 if that was 0.
53968as_fn_error ()
53969{
53970  as_status=$1; test $as_status -eq 0 && as_status=1
53971  if test "$4"; then
53972    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53973    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53974  fi
53975  $as_echo "$as_me: error: $2" >&2
53976  as_fn_exit $as_status
53977} # as_fn_error
53978
53979
53980# as_fn_set_status STATUS
53981# -----------------------
53982# Set $? to STATUS, without forking.
53983as_fn_set_status ()
53984{
53985  return $1
53986} # as_fn_set_status
53987
53988# as_fn_exit STATUS
53989# -----------------
53990# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53991as_fn_exit ()
53992{
53993  set +e
53994  as_fn_set_status $1
53995  exit $1
53996} # as_fn_exit
53997
53998# as_fn_unset VAR
53999# ---------------
54000# Portably unset VAR.
54001as_fn_unset ()
54002{
54003  { eval $1=; unset $1;}
54004}
54005as_unset=as_fn_unset
54006# as_fn_append VAR VALUE
54007# ----------------------
54008# Append the text in VALUE to the end of the definition contained in VAR. Take
54009# advantage of any shell optimizations that allow amortized linear growth over
54010# repeated appends, instead of the typical quadratic growth present in naive
54011# implementations.
54012if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54013  eval 'as_fn_append ()
54014  {
54015    eval $1+=\$2
54016  }'
54017else
54018  as_fn_append ()
54019  {
54020    eval $1=\$$1\$2
54021  }
54022fi # as_fn_append
54023
54024# as_fn_arith ARG...
54025# ------------------
54026# Perform arithmetic evaluation on the ARGs, and store the result in the
54027# global $as_val. Take advantage of shells that can avoid forks. The arguments
54028# must be portable across $(()) and expr.
54029if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54030  eval 'as_fn_arith ()
54031  {
54032    as_val=$(( $* ))
54033  }'
54034else
54035  as_fn_arith ()
54036  {
54037    as_val=`expr "$@" || test $? -eq 1`
54038  }
54039fi # as_fn_arith
54040
54041
54042if expr a : '\(a\)' >/dev/null 2>&1 &&
54043   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54044  as_expr=expr
54045else
54046  as_expr=false
54047fi
54048
54049if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54050  as_basename=basename
54051else
54052  as_basename=false
54053fi
54054
54055if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54056  as_dirname=dirname
54057else
54058  as_dirname=false
54059fi
54060
54061as_me=`$as_basename -- "$0" ||
54062$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54063	 X"$0" : 'X\(//\)$' \| \
54064	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54065$as_echo X/"$0" |
54066    sed '/^.*\/\([^/][^/]*\)\/*$/{
54067	    s//\1/
54068	    q
54069	  }
54070	  /^X\/\(\/\/\)$/{
54071	    s//\1/
54072	    q
54073	  }
54074	  /^X\/\(\/\).*/{
54075	    s//\1/
54076	    q
54077	  }
54078	  s/.*/./; q'`
54079
54080# Avoid depending upon Character Ranges.
54081as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54082as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54083as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54084as_cr_digits='0123456789'
54085as_cr_alnum=$as_cr_Letters$as_cr_digits
54086
54087ECHO_C= ECHO_N= ECHO_T=
54088case `echo -n x` in #(((((
54089-n*)
54090  case `echo 'xy\c'` in
54091  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54092  xy)  ECHO_C='\c';;
54093  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54094       ECHO_T='	';;
54095  esac;;
54096*)
54097  ECHO_N='-n';;
54098esac
54099
54100rm -f conf$$ conf$$.exe conf$$.file
54101if test -d conf$$.dir; then
54102  rm -f conf$$.dir/conf$$.file
54103else
54104  rm -f conf$$.dir
54105  mkdir conf$$.dir 2>/dev/null
54106fi
54107if (echo >conf$$.file) 2>/dev/null; then
54108  if ln -s conf$$.file conf$$ 2>/dev/null; then
54109    as_ln_s='ln -s'
54110    # ... but there are two gotchas:
54111    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54112    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54113    # In both cases, we have to default to `cp -pR'.
54114    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54115      as_ln_s='cp -pR'
54116  elif ln conf$$.file conf$$ 2>/dev/null; then
54117    as_ln_s=ln
54118  else
54119    as_ln_s='cp -pR'
54120  fi
54121else
54122  as_ln_s='cp -pR'
54123fi
54124rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54125rmdir conf$$.dir 2>/dev/null
54126
54127
54128# as_fn_mkdir_p
54129# -------------
54130# Create "$as_dir" as a directory, including parents if necessary.
54131as_fn_mkdir_p ()
54132{
54133
54134  case $as_dir in #(
54135  -*) as_dir=./$as_dir;;
54136  esac
54137  test -d "$as_dir" || eval $as_mkdir_p || {
54138    as_dirs=
54139    while :; do
54140      case $as_dir in #(
54141      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54142      *) as_qdir=$as_dir;;
54143      esac
54144      as_dirs="'$as_qdir' $as_dirs"
54145      as_dir=`$as_dirname -- "$as_dir" ||
54146$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54147	 X"$as_dir" : 'X\(//\)[^/]' \| \
54148	 X"$as_dir" : 'X\(//\)$' \| \
54149	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54150$as_echo X"$as_dir" |
54151    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54152	    s//\1/
54153	    q
54154	  }
54155	  /^X\(\/\/\)[^/].*/{
54156	    s//\1/
54157	    q
54158	  }
54159	  /^X\(\/\/\)$/{
54160	    s//\1/
54161	    q
54162	  }
54163	  /^X\(\/\).*/{
54164	    s//\1/
54165	    q
54166	  }
54167	  s/.*/./; q'`
54168      test -d "$as_dir" && break
54169    done
54170    test -z "$as_dirs" || eval "mkdir $as_dirs"
54171  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54172
54173
54174} # as_fn_mkdir_p
54175if mkdir -p . 2>/dev/null; then
54176  as_mkdir_p='mkdir -p "$as_dir"'
54177else
54178  test -d ./-p && rmdir ./-p
54179  as_mkdir_p=false
54180fi
54181
54182
54183# as_fn_executable_p FILE
54184# -----------------------
54185# Test if FILE is an executable regular file.
54186as_fn_executable_p ()
54187{
54188  test -f "$1" && test -x "$1"
54189} # as_fn_executable_p
54190as_test_x='test -x'
54191as_executable_p=as_fn_executable_p
54192
54193# Sed expression to map a string onto a valid CPP name.
54194as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54195
54196# Sed expression to map a string onto a valid variable name.
54197as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54198
54199
54200exec 6>&1
54201## ----------------------------------- ##
54202## Main body of $CONFIG_STATUS script. ##
54203## ----------------------------------- ##
54204_ASEOF
54205test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54206
54207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54208# Save the log message, to keep $0 and so on meaningful, and to
54209# report actual input values of CONFIG_FILES etc. instead of their
54210# values after options handling.
54211ac_log="
54212This file was extended by OpenJDK $as_me jdk8, which was
54213generated by GNU Autoconf 2.69.  Invocation command line was
54214
54215  CONFIG_FILES    = $CONFIG_FILES
54216  CONFIG_HEADERS  = $CONFIG_HEADERS
54217  CONFIG_LINKS    = $CONFIG_LINKS
54218  CONFIG_COMMANDS = $CONFIG_COMMANDS
54219  $ $0 $@
54220
54221on `(hostname || uname -n) 2>/dev/null | sed 1q`
54222"
54223
54224_ACEOF
54225
54226case $ac_config_files in *"
54227"*) set x $ac_config_files; shift; ac_config_files=$*;;
54228esac
54229
54230case $ac_config_headers in *"
54231"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
54232esac
54233
54234
54235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54236# Files that config.status was made for.
54237config_files="$ac_config_files"
54238config_headers="$ac_config_headers"
54239
54240_ACEOF
54241
54242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54243ac_cs_usage="\
54244\`$as_me' instantiates files and other configuration actions
54245from templates according to the current configuration.  Unless the files
54246and actions are specified as TAGs, all are instantiated by default.
54247
54248Usage: $0 [OPTION]... [TAG]...
54249
54250  -h, --help       print this help, then exit
54251  -V, --version    print version number and configuration settings, then exit
54252      --config     print configuration, then exit
54253  -q, --quiet, --silent
54254                   do not print progress messages
54255  -d, --debug      don't remove temporary files
54256      --recheck    update $as_me by reconfiguring in the same conditions
54257      --file=FILE[:TEMPLATE]
54258                   instantiate the configuration file FILE
54259      --header=FILE[:TEMPLATE]
54260                   instantiate the configuration header FILE
54261
54262Configuration files:
54263$config_files
54264
54265Configuration headers:
54266$config_headers
54267
54268Report bugs to <build-dev@openjdk.java.net>.
54269OpenJDK home page: <http://openjdk.java.net>."
54270
54271_ACEOF
54272cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54273ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54274ac_cs_version="\\
54275OpenJDK config.status jdk8
54276configured by $0, generated by GNU Autoconf 2.69,
54277  with options \\"\$ac_cs_config\\"
54278
54279Copyright (C) 2012 Free Software Foundation, Inc.
54280This config.status script is free software; the Free Software Foundation
54281gives unlimited permission to copy, distribute and modify it."
54282
54283ac_pwd='$ac_pwd'
54284srcdir='$srcdir'
54285AWK='$AWK'
54286test -n "\$AWK" || AWK=awk
54287_ACEOF
54288
54289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54290# The default lists apply if the user does not specify any file.
54291ac_need_defaults=:
54292while test $# != 0
54293do
54294  case $1 in
54295  --*=?*)
54296    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54297    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54298    ac_shift=:
54299    ;;
54300  --*=)
54301    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54302    ac_optarg=
54303    ac_shift=:
54304    ;;
54305  *)
54306    ac_option=$1
54307    ac_optarg=$2
54308    ac_shift=shift
54309    ;;
54310  esac
54311
54312  case $ac_option in
54313  # Handling of the options.
54314  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54315    ac_cs_recheck=: ;;
54316  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54317    $as_echo "$ac_cs_version"; exit ;;
54318  --config | --confi | --conf | --con | --co | --c )
54319    $as_echo "$ac_cs_config"; exit ;;
54320  --debug | --debu | --deb | --de | --d | -d )
54321    debug=: ;;
54322  --file | --fil | --fi | --f )
54323    $ac_shift
54324    case $ac_optarg in
54325    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54326    '') as_fn_error $? "missing file argument" ;;
54327    esac
54328    as_fn_append CONFIG_FILES " '$ac_optarg'"
54329    ac_need_defaults=false;;
54330  --header | --heade | --head | --hea )
54331    $ac_shift
54332    case $ac_optarg in
54333    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54334    esac
54335    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
54336    ac_need_defaults=false;;
54337  --he | --h)
54338    # Conflict between --help and --header
54339    as_fn_error $? "ambiguous option: \`$1'
54340Try \`$0 --help' for more information.";;
54341  --help | --hel | -h )
54342    $as_echo "$ac_cs_usage"; exit ;;
54343  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54344  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54345    ac_cs_silent=: ;;
54346
54347  # This is an error.
54348  -*) as_fn_error $? "unrecognized option: \`$1'
54349Try \`$0 --help' for more information." ;;
54350
54351  *) as_fn_append ac_config_targets " $1"
54352     ac_need_defaults=false ;;
54353
54354  esac
54355  shift
54356done
54357
54358ac_configure_extra_args=
54359
54360if $ac_cs_silent; then
54361  exec 6>/dev/null
54362  ac_configure_extra_args="$ac_configure_extra_args --silent"
54363fi
54364
54365_ACEOF
54366cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54367if \$ac_cs_recheck; then
54368  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54369  shift
54370  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54371  CONFIG_SHELL='$SHELL'
54372  export CONFIG_SHELL
54373  exec "\$@"
54374fi
54375
54376_ACEOF
54377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54378exec 5>>config.log
54379{
54380  echo
54381  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54382## Running $as_me. ##
54383_ASBOX
54384  $as_echo "$ac_log"
54385} >&5
54386
54387_ACEOF
54388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54389_ACEOF
54390
54391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54392
54393# Handling of arguments.
54394for ac_config_target in $ac_config_targets
54395do
54396  case $ac_config_target in
54397    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
54398    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54399    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54400    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54401    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54402    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
54403    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54404
54405  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54406  esac
54407done
54408
54409
54410# If the user did not use the arguments to specify the items to instantiate,
54411# then the envvar interface is used.  Set only those that are not.
54412# We use the long form for the default assignment because of an extremely
54413# bizarre bug on SunOS 4.1.3.
54414if $ac_need_defaults; then
54415  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54416  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
54417fi
54418
54419# Have a temporary directory for convenience.  Make it in the build tree
54420# simply because there is no reason against having it here, and in addition,
54421# creating and moving files from /tmp can sometimes cause problems.
54422# Hook for its removal unless debugging.
54423# Note that there is a small window in which the directory will not be cleaned:
54424# after its creation but before its name has been assigned to `$tmp'.
54425$debug ||
54426{
54427  tmp= ac_tmp=
54428  trap 'exit_status=$?
54429  : "${ac_tmp:=$tmp}"
54430  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54431' 0
54432  trap 'as_fn_exit 1' 1 2 13 15
54433}
54434# Create a (secure) tmp directory for tmp files.
54435
54436{
54437  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54438  test -d "$tmp"
54439}  ||
54440{
54441  tmp=./conf$$-$RANDOM
54442  (umask 077 && mkdir "$tmp")
54443} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54444ac_tmp=$tmp
54445
54446# Set up the scripts for CONFIG_FILES section.
54447# No need to generate them if there are no CONFIG_FILES.
54448# This happens for instance with `./config.status config.h'.
54449if test -n "$CONFIG_FILES"; then
54450
54451
54452ac_cr=`echo X | tr X '\015'`
54453# On cygwin, bash can eat \r inside `` if the user requested igncr.
54454# But we know of no other shell where ac_cr would be empty at this
54455# point, so we can use a bashism as a fallback.
54456if test "x$ac_cr" = x; then
54457  eval ac_cr=\$\'\\r\'
54458fi
54459ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54460if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54461  ac_cs_awk_cr='\\r'
54462else
54463  ac_cs_awk_cr=$ac_cr
54464fi
54465
54466echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54467_ACEOF
54468
54469
54470{
54471  echo "cat >conf$$subs.awk <<_ACEOF" &&
54472  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54473  echo "_ACEOF"
54474} >conf$$subs.sh ||
54475  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54476ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54477ac_delim='%!_!# '
54478for ac_last_try in false false false false false :; do
54479  . ./conf$$subs.sh ||
54480    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54481
54482  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54483  if test $ac_delim_n = $ac_delim_num; then
54484    break
54485  elif $ac_last_try; then
54486    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54487  else
54488    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54489  fi
54490done
54491rm -f conf$$subs.sh
54492
54493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54494cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54495_ACEOF
54496sed -n '
54497h
54498s/^/S["/; s/!.*/"]=/
54499p
54500g
54501s/^[^!]*!//
54502:repl
54503t repl
54504s/'"$ac_delim"'$//
54505t delim
54506:nl
54507h
54508s/\(.\{148\}\)..*/\1/
54509t more1
54510s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54511p
54512n
54513b repl
54514:more1
54515s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54516p
54517g
54518s/.\{148\}//
54519t nl
54520:delim
54521h
54522s/\(.\{148\}\)..*/\1/
54523t more2
54524s/["\\]/\\&/g; s/^/"/; s/$/"/
54525p
54526b
54527:more2
54528s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54529p
54530g
54531s/.\{148\}//
54532t delim
54533' <conf$$subs.awk | sed '
54534/^[^""]/{
54535  N
54536  s/\n//
54537}
54538' >>$CONFIG_STATUS || ac_write_fail=1
54539rm -f conf$$subs.awk
54540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54541_ACAWK
54542cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54543  for (key in S) S_is_set[key] = 1
54544  FS = ""
54545
54546}
54547{
54548  line = $ 0
54549  nfields = split(line, field, "@")
54550  substed = 0
54551  len = length(field[1])
54552  for (i = 2; i < nfields; i++) {
54553    key = field[i]
54554    keylen = length(key)
54555    if (S_is_set[key]) {
54556      value = S[key]
54557      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54558      len += length(value) + length(field[++i])
54559      substed = 1
54560    } else
54561      len += 1 + keylen
54562  }
54563
54564  print line
54565}
54566
54567_ACAWK
54568_ACEOF
54569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54570if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54571  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54572else
54573  cat
54574fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54575  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54576_ACEOF
54577
54578# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54579# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54580# trailing colons and then remove the whole line if VPATH becomes empty
54581# (actually we leave an empty line to preserve line numbers).
54582if test "x$srcdir" = x.; then
54583  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54584h
54585s///
54586s/^/:/
54587s/[	 ]*$/:/
54588s/:\$(srcdir):/:/g
54589s/:\${srcdir}:/:/g
54590s/:@srcdir@:/:/g
54591s/^:*//
54592s/:*$//
54593x
54594s/\(=[	 ]*\).*/\1/
54595G
54596s/\n//
54597s/^[^=]*=[	 ]*$//
54598}'
54599fi
54600
54601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54602fi # test -n "$CONFIG_FILES"
54603
54604# Set up the scripts for CONFIG_HEADERS section.
54605# No need to generate them if there are no CONFIG_HEADERS.
54606# This happens for instance with `./config.status Makefile'.
54607if test -n "$CONFIG_HEADERS"; then
54608cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
54609BEGIN {
54610_ACEOF
54611
54612# Transform confdefs.h into an awk script `defines.awk', embedded as
54613# here-document in config.status, that substitutes the proper values into
54614# config.h.in to produce config.h.
54615
54616# Create a delimiter string that does not exist in confdefs.h, to ease
54617# handling of long lines.
54618ac_delim='%!_!# '
54619for ac_last_try in false false :; do
54620  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
54621  if test -z "$ac_tt"; then
54622    break
54623  elif $ac_last_try; then
54624    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
54625  else
54626    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54627  fi
54628done
54629
54630# For the awk script, D is an array of macro values keyed by name,
54631# likewise P contains macro parameters if any.  Preserve backslash
54632# newline sequences.
54633
54634ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
54635sed -n '
54636s/.\{148\}/&'"$ac_delim"'/g
54637t rset
54638:rset
54639s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
54640t def
54641d
54642:def
54643s/\\$//
54644t bsnl
54645s/["\\]/\\&/g
54646s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
54647D["\1"]=" \3"/p
54648s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
54649d
54650:bsnl
54651s/["\\]/\\&/g
54652s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
54653D["\1"]=" \3\\\\\\n"\\/p
54654t cont
54655s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
54656t cont
54657d
54658:cont
54659n
54660s/.\{148\}/&'"$ac_delim"'/g
54661t clear
54662:clear
54663s/\\$//
54664t bsnlc
54665s/["\\]/\\&/g; s/^/"/; s/$/"/p
54666d
54667:bsnlc
54668s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
54669b cont
54670' <confdefs.h | sed '
54671s/'"$ac_delim"'/"\\\
54672"/g' >>$CONFIG_STATUS || ac_write_fail=1
54673
54674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54675  for (key in D) D_is_set[key] = 1
54676  FS = ""
54677}
54678/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
54679  line = \$ 0
54680  split(line, arg, " ")
54681  if (arg[1] == "#") {
54682    defundef = arg[2]
54683    mac1 = arg[3]
54684  } else {
54685    defundef = substr(arg[1], 2)
54686    mac1 = arg[2]
54687  }
54688  split(mac1, mac2, "(") #)
54689  macro = mac2[1]
54690  prefix = substr(line, 1, index(line, defundef) - 1)
54691  if (D_is_set[macro]) {
54692    # Preserve the white space surrounding the "#".
54693    print prefix "define", macro P[macro] D[macro]
54694    next
54695  } else {
54696    # Replace #undef with comments.  This is necessary, for example,
54697    # in the case of _POSIX_SOURCE, which is predefined and required
54698    # on some systems where configure will not decide to define it.
54699    if (defundef == "undef") {
54700      print "/*", prefix defundef, macro, "*/"
54701      next
54702    }
54703  }
54704}
54705{ print }
54706_ACAWK
54707_ACEOF
54708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54709  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
54710fi # test -n "$CONFIG_HEADERS"
54711
54712
54713eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
54714shift
54715for ac_tag
54716do
54717  case $ac_tag in
54718  :[FHLC]) ac_mode=$ac_tag; continue;;
54719  esac
54720  case $ac_mode$ac_tag in
54721  :[FHL]*:*);;
54722  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54723  :[FH]-) ac_tag=-:-;;
54724  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54725  esac
54726  ac_save_IFS=$IFS
54727  IFS=:
54728  set x $ac_tag
54729  IFS=$ac_save_IFS
54730  shift
54731  ac_file=$1
54732  shift
54733
54734  case $ac_mode in
54735  :L) ac_source=$1;;
54736  :[FH])
54737    ac_file_inputs=
54738    for ac_f
54739    do
54740      case $ac_f in
54741      -) ac_f="$ac_tmp/stdin";;
54742      *) # Look for the file first in the build tree, then in the source tree
54743	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54744	 # because $ac_f cannot contain `:'.
54745	 test -f "$ac_f" ||
54746	   case $ac_f in
54747	   [\\/$]*) false;;
54748	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54749	   esac ||
54750	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54751      esac
54752      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54753      as_fn_append ac_file_inputs " '$ac_f'"
54754    done
54755
54756    # Let's still pretend it is `configure' which instantiates (i.e., don't
54757    # use $as_me), people would be surprised to read:
54758    #    /* config.h.  Generated by config.status.  */
54759    configure_input='Generated from '`
54760	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54761	`' by configure.'
54762    if test x"$ac_file" != x-; then
54763      configure_input="$ac_file.  $configure_input"
54764      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54765$as_echo "$as_me: creating $ac_file" >&6;}
54766    fi
54767    # Neutralize special characters interpreted by sed in replacement strings.
54768    case $configure_input in #(
54769    *\&* | *\|* | *\\* )
54770       ac_sed_conf_input=`$as_echo "$configure_input" |
54771       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54772    *) ac_sed_conf_input=$configure_input;;
54773    esac
54774
54775    case $ac_tag in
54776    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54777      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54778    esac
54779    ;;
54780  esac
54781
54782  ac_dir=`$as_dirname -- "$ac_file" ||
54783$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54784	 X"$ac_file" : 'X\(//\)[^/]' \| \
54785	 X"$ac_file" : 'X\(//\)$' \| \
54786	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54787$as_echo X"$ac_file" |
54788    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54789	    s//\1/
54790	    q
54791	  }
54792	  /^X\(\/\/\)[^/].*/{
54793	    s//\1/
54794	    q
54795	  }
54796	  /^X\(\/\/\)$/{
54797	    s//\1/
54798	    q
54799	  }
54800	  /^X\(\/\).*/{
54801	    s//\1/
54802	    q
54803	  }
54804	  s/.*/./; q'`
54805  as_dir="$ac_dir"; as_fn_mkdir_p
54806  ac_builddir=.
54807
54808case "$ac_dir" in
54809.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54810*)
54811  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54812  # A ".." for each directory in $ac_dir_suffix.
54813  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54814  case $ac_top_builddir_sub in
54815  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54816  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54817  esac ;;
54818esac
54819ac_abs_top_builddir=$ac_pwd
54820ac_abs_builddir=$ac_pwd$ac_dir_suffix
54821# for backward compatibility:
54822ac_top_builddir=$ac_top_build_prefix
54823
54824case $srcdir in
54825  .)  # We are building in place.
54826    ac_srcdir=.
54827    ac_top_srcdir=$ac_top_builddir_sub
54828    ac_abs_top_srcdir=$ac_pwd ;;
54829  [\\/]* | ?:[\\/]* )  # Absolute name.
54830    ac_srcdir=$srcdir$ac_dir_suffix;
54831    ac_top_srcdir=$srcdir
54832    ac_abs_top_srcdir=$srcdir ;;
54833  *) # Relative name.
54834    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54835    ac_top_srcdir=$ac_top_build_prefix$srcdir
54836    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54837esac
54838ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54839
54840
54841  case $ac_mode in
54842  :F)
54843  #
54844  # CONFIG_FILE
54845  #
54846
54847_ACEOF
54848
54849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54850# If the template does not know about datarootdir, expand it.
54851# FIXME: This hack should be removed a few years after 2.60.
54852ac_datarootdir_hack=; ac_datarootdir_seen=
54853ac_sed_dataroot='
54854/datarootdir/ {
54855  p
54856  q
54857}
54858/@datadir@/p
54859/@docdir@/p
54860/@infodir@/p
54861/@localedir@/p
54862/@mandir@/p'
54863case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54864*datarootdir*) ac_datarootdir_seen=yes;;
54865*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54866  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54867$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54868_ACEOF
54869cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54870  ac_datarootdir_hack='
54871  s&@datadir@&$datadir&g
54872  s&@docdir@&$docdir&g
54873  s&@infodir@&$infodir&g
54874  s&@localedir@&$localedir&g
54875  s&@mandir@&$mandir&g
54876  s&\\\${datarootdir}&$datarootdir&g' ;;
54877esac
54878_ACEOF
54879
54880# Neutralize VPATH when `$srcdir' = `.'.
54881# Shell code in configure.ac might set extrasub.
54882# FIXME: do we really want to maintain this feature?
54883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54884ac_sed_extra="$ac_vpsub
54885$extrasub
54886_ACEOF
54887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54888:t
54889/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54890s|@configure_input@|$ac_sed_conf_input|;t t
54891s&@top_builddir@&$ac_top_builddir_sub&;t t
54892s&@top_build_prefix@&$ac_top_build_prefix&;t t
54893s&@srcdir@&$ac_srcdir&;t t
54894s&@abs_srcdir@&$ac_abs_srcdir&;t t
54895s&@top_srcdir@&$ac_top_srcdir&;t t
54896s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54897s&@builddir@&$ac_builddir&;t t
54898s&@abs_builddir@&$ac_abs_builddir&;t t
54899s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54900$ac_datarootdir_hack
54901"
54902eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54903  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54904
54905test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54906  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54907  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54908      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54909  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54910which seems to be undefined.  Please make sure it is defined" >&5
54911$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54912which seems to be undefined.  Please make sure it is defined" >&2;}
54913
54914  rm -f "$ac_tmp/stdin"
54915  case $ac_file in
54916  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54917  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54918  esac \
54919  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54920 ;;
54921  :H)
54922  #
54923  # CONFIG_HEADER
54924  #
54925  if test x"$ac_file" != x-; then
54926    {
54927      $as_echo "/* $configure_input  */" \
54928      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
54929    } >"$ac_tmp/config.h" \
54930      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54931    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
54932      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
54933$as_echo "$as_me: $ac_file is unchanged" >&6;}
54934    else
54935      rm -f "$ac_file"
54936      mv "$ac_tmp/config.h" "$ac_file" \
54937	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
54938    fi
54939  else
54940    $as_echo "/* $configure_input  */" \
54941      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
54942      || as_fn_error $? "could not create -" "$LINENO" 5
54943  fi
54944 ;;
54945
54946
54947  esac
54948
54949done # for ac_tag
54950
54951
54952as_fn_exit 0
54953_ACEOF
54954ac_clean_files=$ac_clean_files_save
54955
54956test $ac_write_fail = 0 ||
54957  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54958
54959
54960# configure is writing to config.log, and then calls config.status.
54961# config.status does its own redirection, appending to config.log.
54962# Unfortunately, on DOS this fails, as config.log is still kept open
54963# by configure, so config.status won't be able to write to it; its
54964# output is simply discarded.  So we exec the FD to /dev/null,
54965# effectively closing config.log, so it can be properly (re)opened and
54966# appended to by config.status.  When coming back to configure, we
54967# need to make the FD available again.
54968if test "$no_create" != yes; then
54969  ac_cs_success=:
54970  ac_config_status_args=
54971  test "$silent" = yes &&
54972    ac_config_status_args="$ac_config_status_args --quiet"
54973  exec 5>/dev/null
54974  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54975  exec 5>>config.log
54976  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54977  # would make configure fail if this is the last instruction.
54978  $ac_cs_success || as_fn_exit 1
54979fi
54980if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54981  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54982$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54983fi
54984
54985
54986# After AC_OUTPUT, we need to do final work
54987
54988
54989  # Try to move the config.log file to the output directory.
54990  if test -e ./config.log; then
54991    $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
54992  fi
54993
54994  # Rotate our log file (configure.log)
54995  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54996    $RM -f "$OUTPUT_ROOT/configure.log.old"
54997  fi
54998  if test -e "$OUTPUT_ROOT/configure.log"; then
54999    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
55000  fi
55001
55002  # Move configure.log from current directory to the build output root
55003  if test -e ./configure.log; then
55004    echo found it
55005    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
55006  fi
55007
55008  # Make the compare script executable
55009  $CHMOD +x $OUTPUT_ROOT/compare.sh
55010
55011
55012# Finally output some useful information to the user
55013
55014  # Finally output some useful information to the user
55015
55016  printf "\n"
55017  printf "====================================================\n"
55018  printf "A new configuration has been successfully created in\n"
55019  printf "$OUTPUT_ROOT\n"
55020  if test "x$CONFIGURE_COMMAND_LINE" != x; then
55021    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
55022  else
55023    printf "using default settings.\n"
55024  fi
55025
55026  printf "\n"
55027  printf "Configuration summary:\n"
55028  printf "* Debug level:    $DEBUG_LEVEL\n"
55029  printf "* JDK variant:    $JDK_VARIANT\n"
55030  printf "* JVM variants:   $with_jvm_variants\n"
55031  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
55032
55033  printf "\n"
55034  printf "Tools summary:\n"
55035  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
55036    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
55037  fi
55038  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
55039  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
55040  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
55041  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
55042
55043  printf "\n"
55044  printf "Build performance summary:\n"
55045  printf "* Cores to use:   $JOBS\n"
55046  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55047  if test "x$CCACHE_STATUS" != "x"; then
55048    printf "* ccache status:  $CCACHE_STATUS\n"
55049  fi
55050  printf "\n"
55051
55052  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55053    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55054    printf "will result in longer build times.\n"
55055    printf "\n"
55056  fi
55057
55058  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55059    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55060    printf "These are not respected, and will be ignored. It is recommended\n"
55061    printf "that you clean your environment. The following variables are set:\n"
55062    printf "$FOUND_ALT_VARIABLES\n"
55063    printf "\n"
55064  fi
55065
55066  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55067    printf "WARNING: Your build output directory is not on a local disk.\n"
55068    printf "This will severely degrade build performance!\n"
55069    printf "It is recommended that you create an output directory on a local disk,\n"
55070    printf "and run the configure script again from that directory.\n"
55071    printf "\n"
55072  fi
55073
55074  if test "x$IS_RECONFIGURE" = "xyes"; then
55075    printf "WARNING: The result of this configuration has overridden an older\n"
55076    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55077    printf "proper build. Failure to do so might result in strange build problems.\n"
55078    printf "\n"
55079  fi
55080
55081  if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
55082    printf "WARNING: The toolchain version used is known to have issues. Please\n"
55083    printf "consider using a supported version unless you know what you are doing.\n"
55084    printf "\n"
55085  fi
55086
55087
55088  # Locate config.log.
55089  if test -e "./config.log"; then
55090    CONFIG_LOG_PATH="."
55091  fi
55092
55093  if test -e "$CONFIG_LOG_PATH/config.log"; then
55094    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55095    if test $? -eq 0; then
55096      printf "The following warnings were produced. Repeated here for convenience:\n"
55097      # We must quote sed expression (using []) to stop m4 from eating the [].
55098      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55099      printf "\n"
55100    fi
55101  fi
55102
55103