generated-configure.sh revision 1762:2b1043cd9a56
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826VERSION_IS_GA
827VERSION_SHORT
828VERSION_STRING
829VERSION_NUMBER_FOUR_POSITIONS
830VERSION_NUMBER
831VERSION_OPT
832VERSION_BUILD
833VERSION_PRE
834VERSION_PATCH
835VERSION_SECURITY
836VERSION_MINOR
837VERSION_MAJOR
838MACOSX_BUNDLE_ID_BASE
839MACOSX_BUNDLE_NAME_BASE
840COMPANY_NAME
841JDK_RC_PLATFORM_NAME
842PRODUCT_SUFFIX
843PRODUCT_NAME
844LAUNCHER_NAME
845COPYRIGHT_YEAR
846COMPRESS_JARS
847RMICONNECTOR_IIOP
848UNLIMITED_CRYPTO
849CACERTS_FILE
850TEST_IN_BUILD
851BUILD_HEADLESS
852SUPPORT_HEADFUL
853SUPPORT_HEADLESS
854BDEPS_FTP
855BDEPS_UNZIP
856OS_VERSION_MICRO
857OS_VERSION_MINOR
858OS_VERSION_MAJOR
859PKG_CONFIG
860BASH_ARGS
861SETFILE
862CODESIGN
863XATTR
864DSYMUTIL
865IS_GNU_TIME
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RM
974PRINTF
975NAWK
976MV
977MKTEMP
978MKDIR
979LS
980LN
981HEAD
982FIND
983FILE
984EXPR
985ECHO
986DIRNAME
987DIFF
988DATE
989CUT
990CP
991COMM
992CMP
993CHMOD
994CAT
995BASH
996BASENAME
997DATE_WHEN_CONFIGURED
998ORIGINAL_PATH
999CONFIGURE_COMMAND_LINE
1000target_alias
1001host_alias
1002build_alias
1003LIBS
1004ECHO_T
1005ECHO_N
1006ECHO_C
1007DEFS
1008mandir
1009localedir
1010libdir
1011psdir
1012pdfdir
1013dvidir
1014htmldir
1015infodir
1016docdir
1017oldincludedir
1018includedir
1019localstatedir
1020sharedstatedir
1021sysconfdir
1022datadir
1023datarootdir
1024libexecdir
1025sbindir
1026bindir
1027program_transform_name
1028prefix
1029exec_prefix
1030PACKAGE_URL
1031PACKAGE_BUGREPORT
1032PACKAGE_STRING
1033PACKAGE_VERSION
1034PACKAGE_TARNAME
1035PACKAGE_NAME
1036PATH_SEPARATOR
1037SHELL'
1038ac_subst_files=''
1039ac_user_opts='
1040enable_option_checking
1041with_target_bits
1042enable_openjdk_only
1043with_custom_make_dir
1044with_jdk_variant
1045with_jvm_interpreter
1046with_jvm_variants
1047enable_debug
1048with_debug_level
1049with_devkit
1050with_sys_root
1051with_sysroot
1052with_tools_dir
1053with_toolchain_path
1054with_extra_path
1055with_sdk_name
1056with_conf_name
1057with_output_sync
1058with_builddeps_conf
1059with_builddeps_server
1060with_builddeps_dir
1061with_builddeps_group
1062enable_headful
1063enable_hotspot_test_in_build
1064with_cacerts_file
1065enable_unlimited_crypto
1066enable_rmiconnector_iiop
1067with_copyright_year
1068with_milestone
1069with_update_version
1070with_user_release_suffix
1071with_build_number
1072with_version_string
1073with_version_pre
1074with_version_opt_base
1075with_version_opt_debuglevel
1076with_version_build
1077with_version_major
1078with_version_minor
1079with_version_security
1080with_version_patch
1081with_boot_jdk
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_jtreg
1096with_extra_cflags
1097with_extra_cxxflags
1098with_extra_ldflags
1099enable_warnings_as_errors
1100enable_debug_symbols
1101enable_zip_debug_info
1102enable_native_coverage
1103with_x
1104with_cups
1105with_cups_include
1106with_freetype
1107with_freetype_include
1108with_freetype_lib
1109with_freetype_src
1110enable_freetype_bundling
1111with_alsa
1112with_alsa_include
1113with_alsa_lib
1114with_libjpeg
1115with_giflib
1116with_lcms
1117with_libpng
1118with_zlib
1119with_stdc__lib
1120with_msvcr_dll
1121with_msvcp_dll
1122with_dxsdk
1123with_dxsdk_lib
1124with_dxsdk_include
1125with_num_cores
1126with_memory_size
1127with_jobs
1128with_boot_jdk_jvmargs
1129with_sjavac_server_java
1130enable_sjavac
1131enable_precompiled_headers
1132enable_ccache
1133with_ccache_dir
1134'
1135      ac_precious_vars='build_alias
1136host_alias
1137target_alias
1138BASENAME
1139BASH
1140CAT
1141CHMOD
1142CMP
1143COMM
1144CP
1145CUT
1146DATE
1147DIFF
1148DIRNAME
1149ECHO
1150EXPR
1151FILE
1152FIND
1153HEAD
1154LN
1155LS
1156MKDIR
1157MKTEMP
1158MV
1159NAWK
1160PRINTF
1161RM
1162SH
1163SORT
1164TAIL
1165TAR
1166TEE
1167TOUCH
1168TR
1169UNAME
1170UNIQ
1171WC
1172WHICH
1173XARGS
1174AWK
1175GREP
1176EGREP
1177FGREP
1178SED
1179CYGPATH
1180READLINK
1181DF
1182CPIO
1183UNZIP
1184ZIP
1185LDD
1186OTOOL
1187READELF
1188HG
1189STAT
1190TIME
1191DSYMUTIL
1192XATTR
1193CODESIGN
1194SETFILE
1195PKG_CONFIG
1196JAVA
1197JAVAC
1198JAVAH
1199JAR
1200JARSIGNER
1201CC
1202CFLAGS
1203LDFLAGS
1204LIBS
1205CPPFLAGS
1206CXX
1207CXXFLAGS
1208CCC
1209CPP
1210CXXCPP
1211AS
1212AR
1213LIPO
1214STRIP
1215NM
1216GNM
1217OBJCOPY
1218OBJDUMP
1219BUILD_CC
1220BUILD_CXX
1221BUILD_LD
1222JTREGEXE
1223XMKMF
1224FREETYPE_CFLAGS
1225FREETYPE_LIBS
1226ALSA_CFLAGS
1227ALSA_LIBS
1228LCMS_CFLAGS
1229LCMS_LIBS
1230PNG_CFLAGS
1231PNG_LIBS
1232LIBFFI_CFLAGS
1233LIBFFI_LIBS
1234CCACHE'
1235
1236
1237# Initialize some variables set by options.
1238ac_init_help=
1239ac_init_version=false
1240ac_unrecognized_opts=
1241ac_unrecognized_sep=
1242# The variables have the same names as the options, with
1243# dashes changed to underlines.
1244cache_file=/dev/null
1245exec_prefix=NONE
1246no_create=
1247no_recursion=
1248prefix=NONE
1249program_prefix=NONE
1250program_suffix=NONE
1251program_transform_name=s,x,x,
1252silent=
1253site=
1254srcdir=
1255verbose=
1256x_includes=NONE
1257x_libraries=NONE
1258
1259# Installation directory options.
1260# These are left unexpanded so users can "make install exec_prefix=/foo"
1261# and all the variables that are supposed to be based on exec_prefix
1262# by default will actually change.
1263# Use braces instead of parens because sh, perl, etc. also accept them.
1264# (The list follows the same order as the GNU Coding Standards.)
1265bindir='${exec_prefix}/bin'
1266sbindir='${exec_prefix}/sbin'
1267libexecdir='${exec_prefix}/libexec'
1268datarootdir='${prefix}/share'
1269datadir='${datarootdir}'
1270sysconfdir='${prefix}/etc'
1271sharedstatedir='${prefix}/com'
1272localstatedir='${prefix}/var'
1273includedir='${prefix}/include'
1274oldincludedir='/usr/include'
1275docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1276infodir='${datarootdir}/info'
1277htmldir='${docdir}'
1278dvidir='${docdir}'
1279pdfdir='${docdir}'
1280psdir='${docdir}'
1281libdir='${exec_prefix}/lib'
1282localedir='${datarootdir}/locale'
1283mandir='${datarootdir}/man'
1284
1285ac_prev=
1286ac_dashdash=
1287for ac_option
1288do
1289  # If the previous option needs an argument, assign it.
1290  if test -n "$ac_prev"; then
1291    eval $ac_prev=\$ac_option
1292    ac_prev=
1293    continue
1294  fi
1295
1296  case $ac_option in
1297  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1298  *=)   ac_optarg= ;;
1299  *)    ac_optarg=yes ;;
1300  esac
1301
1302  # Accept the important Cygnus configure options, so we can diagnose typos.
1303
1304  case $ac_dashdash$ac_option in
1305  --)
1306    ac_dashdash=yes ;;
1307
1308  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1309    ac_prev=bindir ;;
1310  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1311    bindir=$ac_optarg ;;
1312
1313  -build | --build | --buil | --bui | --bu)
1314    ac_prev=build_alias ;;
1315  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1316    build_alias=$ac_optarg ;;
1317
1318  -cache-file | --cache-file | --cache-fil | --cache-fi \
1319  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1320    ac_prev=cache_file ;;
1321  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1322  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1323    cache_file=$ac_optarg ;;
1324
1325  --config-cache | -C)
1326    cache_file=config.cache ;;
1327
1328  -datadir | --datadir | --datadi | --datad)
1329    ac_prev=datadir ;;
1330  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1331    datadir=$ac_optarg ;;
1332
1333  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1334  | --dataroo | --dataro | --datar)
1335    ac_prev=datarootdir ;;
1336  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1337  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1338    datarootdir=$ac_optarg ;;
1339
1340  -disable-* | --disable-*)
1341    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1342    # Reject names that are not valid shell variable names.
1343    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1344      as_fn_error $? "invalid feature name: $ac_useropt"
1345    ac_useropt_orig=$ac_useropt
1346    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1347    case $ac_user_opts in
1348      *"
1349"enable_$ac_useropt"
1350"*) ;;
1351      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1352	 ac_unrecognized_sep=', ';;
1353    esac
1354    eval enable_$ac_useropt=no ;;
1355
1356  -docdir | --docdir | --docdi | --doc | --do)
1357    ac_prev=docdir ;;
1358  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1359    docdir=$ac_optarg ;;
1360
1361  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1362    ac_prev=dvidir ;;
1363  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1364    dvidir=$ac_optarg ;;
1365
1366  -enable-* | --enable-*)
1367    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1368    # Reject names that are not valid shell variable names.
1369    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1370      as_fn_error $? "invalid feature name: $ac_useropt"
1371    ac_useropt_orig=$ac_useropt
1372    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1373    case $ac_user_opts in
1374      *"
1375"enable_$ac_useropt"
1376"*) ;;
1377      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1378	 ac_unrecognized_sep=', ';;
1379    esac
1380    eval enable_$ac_useropt=\$ac_optarg ;;
1381
1382  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1383  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1384  | --exec | --exe | --ex)
1385    ac_prev=exec_prefix ;;
1386  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1387  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1388  | --exec=* | --exe=* | --ex=*)
1389    exec_prefix=$ac_optarg ;;
1390
1391  -gas | --gas | --ga | --g)
1392    # Obsolete; use --with-gas.
1393    with_gas=yes ;;
1394
1395  -help | --help | --hel | --he | -h)
1396    ac_init_help=long ;;
1397  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1398    ac_init_help=recursive ;;
1399  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1400    ac_init_help=short ;;
1401
1402  -host | --host | --hos | --ho)
1403    ac_prev=host_alias ;;
1404  -host=* | --host=* | --hos=* | --ho=*)
1405    host_alias=$ac_optarg ;;
1406
1407  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1408    ac_prev=htmldir ;;
1409  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1410  | --ht=*)
1411    htmldir=$ac_optarg ;;
1412
1413  -includedir | --includedir | --includedi | --included | --include \
1414  | --includ | --inclu | --incl | --inc)
1415    ac_prev=includedir ;;
1416  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1417  | --includ=* | --inclu=* | --incl=* | --inc=*)
1418    includedir=$ac_optarg ;;
1419
1420  -infodir | --infodir | --infodi | --infod | --info | --inf)
1421    ac_prev=infodir ;;
1422  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1423    infodir=$ac_optarg ;;
1424
1425  -libdir | --libdir | --libdi | --libd)
1426    ac_prev=libdir ;;
1427  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1428    libdir=$ac_optarg ;;
1429
1430  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1431  | --libexe | --libex | --libe)
1432    ac_prev=libexecdir ;;
1433  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1434  | --libexe=* | --libex=* | --libe=*)
1435    libexecdir=$ac_optarg ;;
1436
1437  -localedir | --localedir | --localedi | --localed | --locale)
1438    ac_prev=localedir ;;
1439  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1440    localedir=$ac_optarg ;;
1441
1442  -localstatedir | --localstatedir | --localstatedi | --localstated \
1443  | --localstate | --localstat | --localsta | --localst | --locals)
1444    ac_prev=localstatedir ;;
1445  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1446  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1447    localstatedir=$ac_optarg ;;
1448
1449  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1450    ac_prev=mandir ;;
1451  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1452    mandir=$ac_optarg ;;
1453
1454  -nfp | --nfp | --nf)
1455    # Obsolete; use --without-fp.
1456    with_fp=no ;;
1457
1458  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1459  | --no-cr | --no-c | -n)
1460    no_create=yes ;;
1461
1462  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1463  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1464    no_recursion=yes ;;
1465
1466  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1467  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1468  | --oldin | --oldi | --old | --ol | --o)
1469    ac_prev=oldincludedir ;;
1470  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1471  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1472  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1473    oldincludedir=$ac_optarg ;;
1474
1475  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1476    ac_prev=prefix ;;
1477  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1478    prefix=$ac_optarg ;;
1479
1480  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1481  | --program-pre | --program-pr | --program-p)
1482    ac_prev=program_prefix ;;
1483  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1484  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1485    program_prefix=$ac_optarg ;;
1486
1487  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1488  | --program-suf | --program-su | --program-s)
1489    ac_prev=program_suffix ;;
1490  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1491  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1492    program_suffix=$ac_optarg ;;
1493
1494  -program-transform-name | --program-transform-name \
1495  | --program-transform-nam | --program-transform-na \
1496  | --program-transform-n | --program-transform- \
1497  | --program-transform | --program-transfor \
1498  | --program-transfo | --program-transf \
1499  | --program-trans | --program-tran \
1500  | --progr-tra | --program-tr | --program-t)
1501    ac_prev=program_transform_name ;;
1502  -program-transform-name=* | --program-transform-name=* \
1503  | --program-transform-nam=* | --program-transform-na=* \
1504  | --program-transform-n=* | --program-transform-=* \
1505  | --program-transform=* | --program-transfor=* \
1506  | --program-transfo=* | --program-transf=* \
1507  | --program-trans=* | --program-tran=* \
1508  | --progr-tra=* | --program-tr=* | --program-t=*)
1509    program_transform_name=$ac_optarg ;;
1510
1511  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1512    ac_prev=pdfdir ;;
1513  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1514    pdfdir=$ac_optarg ;;
1515
1516  -psdir | --psdir | --psdi | --psd | --ps)
1517    ac_prev=psdir ;;
1518  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1519    psdir=$ac_optarg ;;
1520
1521  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1522  | -silent | --silent | --silen | --sile | --sil)
1523    silent=yes ;;
1524
1525  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1526    ac_prev=sbindir ;;
1527  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1528  | --sbi=* | --sb=*)
1529    sbindir=$ac_optarg ;;
1530
1531  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1532  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1533  | --sharedst | --shareds | --shared | --share | --shar \
1534  | --sha | --sh)
1535    ac_prev=sharedstatedir ;;
1536  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1537  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1538  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1539  | --sha=* | --sh=*)
1540    sharedstatedir=$ac_optarg ;;
1541
1542  -site | --site | --sit)
1543    ac_prev=site ;;
1544  -site=* | --site=* | --sit=*)
1545    site=$ac_optarg ;;
1546
1547  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1548    ac_prev=srcdir ;;
1549  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1550    srcdir=$ac_optarg ;;
1551
1552  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1553  | --syscon | --sysco | --sysc | --sys | --sy)
1554    ac_prev=sysconfdir ;;
1555  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1556  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1557    sysconfdir=$ac_optarg ;;
1558
1559  -target | --target | --targe | --targ | --tar | --ta | --t)
1560    ac_prev=target_alias ;;
1561  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1562    target_alias=$ac_optarg ;;
1563
1564  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1565    verbose=yes ;;
1566
1567  -version | --version | --versio | --versi | --vers | -V)
1568    ac_init_version=: ;;
1569
1570  -with-* | --with-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1572    # Reject names that are not valid shell variable names.
1573    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1574      as_fn_error $? "invalid package name: $ac_useropt"
1575    ac_useropt_orig=$ac_useropt
1576    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1577    case $ac_user_opts in
1578      *"
1579"with_$ac_useropt"
1580"*) ;;
1581      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=\$ac_optarg ;;
1585
1586  -without-* | --without-*)
1587    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1588    # Reject names that are not valid shell variable names.
1589    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1590      as_fn_error $? "invalid package name: $ac_useropt"
1591    ac_useropt_orig=$ac_useropt
1592    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1593    case $ac_user_opts in
1594      *"
1595"with_$ac_useropt"
1596"*) ;;
1597      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1598	 ac_unrecognized_sep=', ';;
1599    esac
1600    eval with_$ac_useropt=no ;;
1601
1602  --x)
1603    # Obsolete; use --with-x.
1604    with_x=yes ;;
1605
1606  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1607  | --x-incl | --x-inc | --x-in | --x-i)
1608    ac_prev=x_includes ;;
1609  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1610  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1611    x_includes=$ac_optarg ;;
1612
1613  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1614  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1615    ac_prev=x_libraries ;;
1616  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1617  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1618    x_libraries=$ac_optarg ;;
1619
1620  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1621Try \`$0 --help' for more information"
1622    ;;
1623
1624  *=*)
1625    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1626    # Reject names that are not valid shell variable names.
1627    case $ac_envvar in #(
1628      '' | [0-9]* | *[!_$as_cr_alnum]* )
1629      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1630    esac
1631    eval $ac_envvar=\$ac_optarg
1632    export $ac_envvar ;;
1633
1634  *)
1635    # FIXME: should be removed in autoconf 3.0.
1636    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1637    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1638      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1639    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1640    ;;
1641
1642  esac
1643done
1644
1645if test -n "$ac_prev"; then
1646  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1647  as_fn_error $? "missing argument to $ac_option"
1648fi
1649
1650if test -n "$ac_unrecognized_opts"; then
1651  case $enable_option_checking in
1652    no) ;;
1653    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1654    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1655  esac
1656fi
1657
1658# Check all directory arguments for consistency.
1659for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1660		datadir sysconfdir sharedstatedir localstatedir includedir \
1661		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1662		libdir localedir mandir
1663do
1664  eval ac_val=\$$ac_var
1665  # Remove trailing slashes.
1666  case $ac_val in
1667    */ )
1668      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1669      eval $ac_var=\$ac_val;;
1670  esac
1671  # Be sure to have absolute directory names.
1672  case $ac_val in
1673    [\\/$]* | ?:[\\/]* )  continue;;
1674    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1675  esac
1676  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1677done
1678
1679# There might be people who depend on the old broken behavior: `$host'
1680# used to hold the argument of --host etc.
1681# FIXME: To remove some day.
1682build=$build_alias
1683host=$host_alias
1684target=$target_alias
1685
1686# FIXME: To remove some day.
1687if test "x$host_alias" != x; then
1688  if test "x$build_alias" = x; then
1689    cross_compiling=maybe
1690  elif test "x$build_alias" != "x$host_alias"; then
1691    cross_compiling=yes
1692  fi
1693fi
1694
1695ac_tool_prefix=
1696test -n "$host_alias" && ac_tool_prefix=$host_alias-
1697
1698test "$silent" = yes && exec 6>/dev/null
1699
1700
1701ac_pwd=`pwd` && test -n "$ac_pwd" &&
1702ac_ls_di=`ls -di .` &&
1703ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1704  as_fn_error $? "working directory cannot be determined"
1705test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1706  as_fn_error $? "pwd does not report name of working directory"
1707
1708
1709# Find the source files, if location was not specified.
1710if test -z "$srcdir"; then
1711  ac_srcdir_defaulted=yes
1712  # Try the directory containing this script, then the parent directory.
1713  ac_confdir=`$as_dirname -- "$as_myself" ||
1714$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1715	 X"$as_myself" : 'X\(//\)[^/]' \| \
1716	 X"$as_myself" : 'X\(//\)$' \| \
1717	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1718$as_echo X"$as_myself" |
1719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\/\)[^/].*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\/\)$/{
1728	    s//\1/
1729	    q
1730	  }
1731	  /^X\(\/\).*/{
1732	    s//\1/
1733	    q
1734	  }
1735	  s/.*/./; q'`
1736  srcdir=$ac_confdir
1737  if test ! -r "$srcdir/$ac_unique_file"; then
1738    srcdir=..
1739  fi
1740else
1741  ac_srcdir_defaulted=no
1742fi
1743if test ! -r "$srcdir/$ac_unique_file"; then
1744  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1745  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1746fi
1747ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1748ac_abs_confdir=`(
1749	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1750	pwd)`
1751# When building in place, set srcdir=.
1752if test "$ac_abs_confdir" = "$ac_pwd"; then
1753  srcdir=.
1754fi
1755# Remove unnecessary trailing slashes from srcdir.
1756# Double slashes in file names in object file debugging info
1757# mess up M-x gdb in Emacs.
1758case $srcdir in
1759*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1760esac
1761for ac_var in $ac_precious_vars; do
1762  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1763  eval ac_env_${ac_var}_value=\$${ac_var}
1764  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1765  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1766done
1767
1768#
1769# Report the --help message.
1770#
1771if test "$ac_init_help" = "long"; then
1772  # Omit some internal or obsolete options to make the list less imposing.
1773  # This message is too long to be a string in the A/UX 3.1 sh.
1774  cat <<_ACEOF
1775\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1776
1777Usage: $0 [OPTION]... [VAR=VALUE]...
1778
1779To assign environment variables (e.g., CC, CFLAGS...), specify them as
1780VAR=VALUE.  See below for descriptions of some of the useful variables.
1781
1782Defaults for the options are specified in brackets.
1783
1784Configuration:
1785  -h, --help              display this help and exit
1786      --help=short        display options specific to this package
1787      --help=recursive    display the short help of all the included packages
1788  -V, --version           display version information and exit
1789  -q, --quiet, --silent   do not print \`checking ...' messages
1790      --cache-file=FILE   cache test results in FILE [disabled]
1791  -C, --config-cache      alias for \`--cache-file=config.cache'
1792  -n, --no-create         do not create output files
1793      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1794
1795Installation directories:
1796  --prefix=PREFIX         install architecture-independent files in PREFIX
1797                          [$ac_default_prefix]
1798  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1799                          [PREFIX]
1800
1801By default, \`make install' will install all the files in
1802\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1803an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1804for instance \`--prefix=\$HOME'.
1805
1806For better control, use the options below.
1807
1808Fine tuning of the installation directories:
1809  --bindir=DIR            user executables [EPREFIX/bin]
1810  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1811  --libexecdir=DIR        program executables [EPREFIX/libexec]
1812  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1813  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1814  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1815  --libdir=DIR            object code libraries [EPREFIX/lib]
1816  --includedir=DIR        C header files [PREFIX/include]
1817  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1818  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1819  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1820  --infodir=DIR           info documentation [DATAROOTDIR/info]
1821  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1822  --mandir=DIR            man documentation [DATAROOTDIR/man]
1823  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1824  --htmldir=DIR           html documentation [DOCDIR]
1825  --dvidir=DIR            dvi documentation [DOCDIR]
1826  --pdfdir=DIR            pdf documentation [DOCDIR]
1827  --psdir=DIR             ps documentation [DOCDIR]
1828_ACEOF
1829
1830  cat <<\_ACEOF
1831
1832X features:
1833  --x-includes=DIR    X include files are in DIR
1834  --x-libraries=DIR   X library files are in DIR
1835
1836System types:
1837  --build=BUILD     configure for building on BUILD [guessed]
1838  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1839  --target=TARGET   configure for building compilers for TARGET [HOST]
1840_ACEOF
1841fi
1842
1843if test -n "$ac_init_help"; then
1844  case $ac_init_help in
1845     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1846   esac
1847  cat <<\_ACEOF
1848
1849Optional Features:
1850  --disable-option-checking  ignore unrecognized --enable/--with options
1851  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1852  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1853  --enable-openjdk-only   suppress building custom source even if present
1854                          [disabled]
1855  --enable-debug          set the debug level to fastdebug (shorthand for
1856                          --with-debug-level=fastdebug) [disabled]
1857  --disable-headful       disable building headful support (graphical UI
1858                          support) [enabled]
1859  --enable-hotspot-test-in-build
1860                          run the Queens test after Hotspot build [disabled]
1861  --enable-unlimited-crypto
1862                          Enable unlimited crypto policy [disabled]
1863  --enable-rmiconnector-iiop
1864                          enable the JMX RMIConnector iiop transport
1865                          [disabled]
1866  --disable-warnings-as-errors
1867                          do not consider native warnings to be an error
1868                          [enabled]
1869  --disable-debug-symbols disable generation of debug symbols [enabled]
1870  --disable-zip-debug-info
1871                          disable zipping of debug-info files [enabled]
1872  --enable-native-coverage
1873                          enable native compilation with code coverage
1874                          data[disabled]
1875  --disable-freetype-bundling
1876                          disable bundling of the freetype library with the
1877                          build result [enabled on Windows or when using
1878                          --with-freetype, disabled otherwise]
1879  --enable-sjavac         use sjavac to do fast incremental compiles
1880                          [disabled]
1881  --disable-precompiled-headers
1882                          disable using precompiled headers when compiling C++
1883                          [enabled]
1884  --enable-ccache         enable using ccache to speed up recompilations
1885                          [disabled]
1886
1887Optional Packages:
1888  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1889  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1890  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1891                          support it), e.g. --with-target-bits=32 [guessed]
1892  --with-custom-make-dir  Deprecated. Option is kept for backwards
1893                          compatibility and is ignored
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                          optimized (HotSpot build only)) [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-sdk-name         use the platform SDK of the given name. [macosx]
1910  --with-conf-name        use this as the name of the configuration [generated
1911                          from important configuration options]
1912  --with-output-sync      set make output sync type if supported by make.
1913                          [recurse]
1914  --with-builddeps-conf   use this configuration file for the builddeps
1915  --with-builddeps-server download and use build dependencies from this server
1916                          url
1917  --with-builddeps-dir    store downloaded build dependencies here
1918                          [/localhome/builddeps]
1919  --with-builddeps-group  chgrp the downloaded build dependencies to this
1920                          group
1921  --with-cacerts-file     specify alternative cacerts file
1922  --with-copyright-year   Set copyright year value for build [current year]
1923  --with-milestone        Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-update-version   Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-user-release-suffix
1928                          Deprecated. Option is kept for backwards
1929                          compatibility and is ignored
1930  --with-build-number     Deprecated. Option is kept for backwards
1931                          compatibility and is ignored
1932  --with-version-string   Set version string [calculated]
1933  --with-version-pre      Set the base part of the version 'PRE' field
1934                          (pre-release identifier) ['internal']
1935  --with-version-opt-base Set version 'OPT' base field. Debug level will be
1936                          appended. (build metadata)
1937                          [<timestamp>.<user>.<dirname>]
1938  --with-version-opt-debuglevel
1939                          Set version 'OPT' field (build metadata)
1940                          [<timestamp>.<user>.<dirname>]
1941  --with-version-build    Set version 'BUILD' field (build number) [not
1942                          specified]
1943  --with-version-major    Set version 'MAJOR' field (first number) [current
1944                          source value]
1945  --with-version-minor    Set version 'MINOR' field (second number) [current
1946                          source value]
1947  --with-version-security Set version 'SECURITY' field (third number) [current
1948                          source value]
1949  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1950                          specified]
1951  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1952  --with-add-source-root  for each and every source directory, look in this
1953                          additional source root for the same directory; if it
1954                          exists and have files in it, include it in the build
1955  --with-override-source-root
1956                          for each and every source directory, look in this
1957                          override source root for the same directory; if it
1958                          exists, use that directory instead and ignore the
1959                          directory in the original source root
1960  --with-adds-and-overrides
1961                          use the subdirs 'adds' and 'overrides' in the
1962                          specified directory as add-source-root and
1963                          override-source-root
1964  --with-override-langtools
1965                          use this langtools dir for the build
1966  --with-override-corba   use this corba dir for the build
1967  --with-override-jaxp    use this jaxp dir for the build
1968  --with-override-jaxws   use this jaxws dir for the build
1969  --with-override-hotspot use this hotspot dir for the build
1970  --with-override-nashorn use this nashorn dir for the build
1971  --with-override-jdk     use this jdk dir for the build
1972  --with-import-hotspot   import hotspot binaries from this jdk image or
1973                          hotspot build dist dir instead of building from
1974                          source
1975  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1976                          to show possible values [platform dependent]
1977  --with-toolchain-version
1978                          the version of the toolchain to look for, use
1979                          '--help' to show possible values [platform
1980                          dependent]
1981  --with-jtreg            Regression Test Harness [probed]
1982  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1983  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1984  --with-extra-ldflags    extra flags to be used when linking jdk
1985  --with-x                use the X Window System
1986  --with-cups             specify prefix directory for the cups package
1987                          (expecting the headers under PATH/include)
1988  --with-cups-include     specify directory for the cups include files
1989  --with-freetype         specify prefix directory for the freetype package
1990                          (expecting the libraries under PATH/lib and the
1991                          headers under PATH/include)
1992  --with-freetype-include specify directory for the freetype include files
1993  --with-freetype-lib     specify directory for the freetype library
1994  --with-freetype-src     specify directory with freetype sources to
1995                          automatically build the library (experimental,
1996                          Windows-only)
1997  --with-alsa             specify prefix directory for the alsa package
1998                          (expecting the libraries under PATH/lib and the
1999                          headers under PATH/include)
2000  --with-alsa-include     specify directory for the alsa include files
2001  --with-alsa-lib         specify directory for the alsa library
2002  --with-libjpeg          use libjpeg from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-giflib           use giflib from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-lcms             use lcms2 from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-libpng           use libpng from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-zlib             use zlib from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-dxsdk            Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-dxsdk-include    Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-num-cores        number of cores in the build system, e.g.
2027                          --with-num-cores=8 [probed]
2028  --with-memory-size      memory (in MB) available in the build system, e.g.
2029                          --with-memory-size=1024 [probed]
2030  --with-jobs             number of parallel jobs to let make run [calculated
2031                          based on cores and memory]
2032  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2033                          invocations of boot JDK, overriding the default
2034                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2035                          -enableassertions"
2036  --with-sjavac-server-java
2037                          use this java binary for running the sjavac
2038                          background server [Boot JDK java]
2039  --with-ccache-dir       where to store ccache files [~/.ccache]
2040
2041Some influential environment variables:
2042  BASENAME    Override default value for BASENAME
2043  BASH        Override default value for BASH
2044  CAT         Override default value for CAT
2045  CHMOD       Override default value for CHMOD
2046  CMP         Override default value for CMP
2047  COMM        Override default value for COMM
2048  CP          Override default value for CP
2049  CUT         Override default value for CUT
2050  DATE        Override default value for DATE
2051  DIFF        Override default value for DIFF
2052  DIRNAME     Override default value for DIRNAME
2053  ECHO        Override default value for ECHO
2054  EXPR        Override default value for EXPR
2055  FILE        Override default value for FILE
2056  FIND        Override default value for FIND
2057  HEAD        Override default value for HEAD
2058  LN          Override default value for LN
2059  LS          Override default value for LS
2060  MKDIR       Override default value for MKDIR
2061  MKTEMP      Override default value for MKTEMP
2062  MV          Override default value for MV
2063  NAWK        Override default value for NAWK
2064  PRINTF      Override default value for PRINTF
2065  RM          Override default value for RM
2066  SH          Override default value for SH
2067  SORT        Override default value for SORT
2068  TAIL        Override default value for TAIL
2069  TAR         Override default value for TAR
2070  TEE         Override default value for TEE
2071  TOUCH       Override default value for TOUCH
2072  TR          Override default value for TR
2073  UNAME       Override default value for UNAME
2074  UNIQ        Override default value for UNIQ
2075  WC          Override default value for WC
2076  WHICH       Override default value for WHICH
2077  XARGS       Override default value for XARGS
2078  AWK         Override default value for AWK
2079  GREP        Override default value for GREP
2080  EGREP       Override default value for EGREP
2081  FGREP       Override default value for FGREP
2082  SED         Override default value for SED
2083  CYGPATH     Override default value for CYGPATH
2084  READLINK    Override default value for READLINK
2085  DF          Override default value for DF
2086  CPIO        Override default value for CPIO
2087  UNZIP       Override default value for UNZIP
2088  ZIP         Override default value for ZIP
2089  LDD         Override default value for LDD
2090  OTOOL       Override default value for OTOOL
2091  READELF     Override default value for READELF
2092  HG          Override default value for HG
2093  STAT        Override default value for STAT
2094  TIME        Override default value for TIME
2095  DSYMUTIL    Override default value for DSYMUTIL
2096  XATTR       Override default value for XATTR
2097  CODESIGN    Override default value for CODESIGN
2098  SETFILE     Override default value for SETFILE
2099  PKG_CONFIG  path to pkg-config utility
2100  JAVA        Override default value for JAVA
2101  JAVAC       Override default value for JAVAC
2102  JAVAH       Override default value for JAVAH
2103  JAR         Override default value for JAR
2104  JARSIGNER   Override default value for JARSIGNER
2105  CC          C compiler command
2106  CFLAGS      C compiler flags
2107  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2108              nonstandard directory <lib dir>
2109  LIBS        libraries to pass to the linker, e.g. -l<library>
2110  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2111              you have headers in a nonstandard directory <include dir>
2112  CXX         C++ compiler command
2113  CXXFLAGS    C++ compiler flags
2114  CPP         C preprocessor
2115  CXXCPP      C++ preprocessor
2116  AS          Override default value for AS
2117  AR          Override default value for AR
2118  LIPO        Override default value for LIPO
2119  STRIP       Override default value for STRIP
2120  NM          Override default value for NM
2121  GNM         Override default value for GNM
2122  OBJCOPY     Override default value for OBJCOPY
2123  OBJDUMP     Override default value for OBJDUMP
2124  BUILD_CC    Override default value for BUILD_CC
2125  BUILD_CXX   Override default value for BUILD_CXX
2126  BUILD_LD    Override default value for BUILD_LD
2127  JTREGEXE    Override default value for JTREGEXE
2128  XMKMF       Path to xmkmf, Makefile generator for X Window System
2129  FREETYPE_CFLAGS
2130              C compiler flags for FREETYPE, overriding pkg-config
2131  FREETYPE_LIBS
2132              linker flags for FREETYPE, overriding pkg-config
2133  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2134  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2135  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2136  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2137  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2138  PNG_LIBS    linker flags for PNG, overriding pkg-config
2139  LIBFFI_CFLAGS
2140              C compiler flags for LIBFFI, overriding pkg-config
2141  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2142  CCACHE      Override default value for CCACHE
2143
2144Use these variables to override the choices made by `configure' or to help
2145it to find libraries and programs with nonstandard names/locations.
2146
2147Report bugs to <build-dev@openjdk.java.net>.
2148OpenJDK home page: <http://openjdk.java.net>.
2149_ACEOF
2150ac_status=$?
2151fi
2152
2153if test "$ac_init_help" = "recursive"; then
2154  # If there are subdirs, report their specific --help.
2155  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2156    test -d "$ac_dir" ||
2157      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2158      continue
2159    ac_builddir=.
2160
2161case "$ac_dir" in
2162.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2163*)
2164  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2165  # A ".." for each directory in $ac_dir_suffix.
2166  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2167  case $ac_top_builddir_sub in
2168  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2169  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2170  esac ;;
2171esac
2172ac_abs_top_builddir=$ac_pwd
2173ac_abs_builddir=$ac_pwd$ac_dir_suffix
2174# for backward compatibility:
2175ac_top_builddir=$ac_top_build_prefix
2176
2177case $srcdir in
2178  .)  # We are building in place.
2179    ac_srcdir=.
2180    ac_top_srcdir=$ac_top_builddir_sub
2181    ac_abs_top_srcdir=$ac_pwd ;;
2182  [\\/]* | ?:[\\/]* )  # Absolute name.
2183    ac_srcdir=$srcdir$ac_dir_suffix;
2184    ac_top_srcdir=$srcdir
2185    ac_abs_top_srcdir=$srcdir ;;
2186  *) # Relative name.
2187    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2188    ac_top_srcdir=$ac_top_build_prefix$srcdir
2189    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2190esac
2191ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2192
2193    cd "$ac_dir" || { ac_status=$?; continue; }
2194    # Check for guested configure.
2195    if test -f "$ac_srcdir/configure.gnu"; then
2196      echo &&
2197      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2198    elif test -f "$ac_srcdir/configure"; then
2199      echo &&
2200      $SHELL "$ac_srcdir/configure" --help=recursive
2201    else
2202      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2203    fi || ac_status=$?
2204    cd "$ac_pwd" || { ac_status=$?; break; }
2205  done
2206fi
2207
2208test -n "$ac_init_help" && exit $ac_status
2209if $ac_init_version; then
2210  cat <<\_ACEOF
2211OpenJDK configure jdk9
2212generated by GNU Autoconf 2.69
2213
2214Copyright (C) 2012 Free Software Foundation, Inc.
2215This configure script is free software; the Free Software Foundation
2216gives unlimited permission to copy, distribute and modify it.
2217_ACEOF
2218  exit
2219fi
2220
2221## ------------------------ ##
2222## Autoconf initialization. ##
2223## ------------------------ ##
2224
2225# ac_fn_c_try_compile LINENO
2226# --------------------------
2227# Try to compile conftest.$ac_ext, and return whether this succeeded.
2228ac_fn_c_try_compile ()
2229{
2230  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231  rm -f conftest.$ac_objext
2232  if { { ac_try="$ac_compile"
2233case "(($ac_try" in
2234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235  *) ac_try_echo=$ac_try;;
2236esac
2237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238$as_echo "$ac_try_echo"; } >&5
2239  (eval "$ac_compile") 2>conftest.err
2240  ac_status=$?
2241  if test -s conftest.err; then
2242    grep -v '^ *+' conftest.err >conftest.er1
2243    cat conftest.er1 >&5
2244    mv -f conftest.er1 conftest.err
2245  fi
2246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247  test $ac_status = 0; } && {
2248	 test -z "$ac_c_werror_flag" ||
2249	 test ! -s conftest.err
2250       } && test -s conftest.$ac_objext; then :
2251  ac_retval=0
2252else
2253  $as_echo "$as_me: failed program was:" >&5
2254sed 's/^/| /' conftest.$ac_ext >&5
2255
2256	ac_retval=1
2257fi
2258  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259  as_fn_set_status $ac_retval
2260
2261} # ac_fn_c_try_compile
2262
2263# ac_fn_cxx_try_compile LINENO
2264# ----------------------------
2265# Try to compile conftest.$ac_ext, and return whether this succeeded.
2266ac_fn_cxx_try_compile ()
2267{
2268  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269  rm -f conftest.$ac_objext
2270  if { { ac_try="$ac_compile"
2271case "(($ac_try" in
2272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273  *) ac_try_echo=$ac_try;;
2274esac
2275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276$as_echo "$ac_try_echo"; } >&5
2277  (eval "$ac_compile") 2>conftest.err
2278  ac_status=$?
2279  if test -s conftest.err; then
2280    grep -v '^ *+' conftest.err >conftest.er1
2281    cat conftest.er1 >&5
2282    mv -f conftest.er1 conftest.err
2283  fi
2284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285  test $ac_status = 0; } && {
2286	 test -z "$ac_cxx_werror_flag" ||
2287	 test ! -s conftest.err
2288       } && test -s conftest.$ac_objext; then :
2289  ac_retval=0
2290else
2291  $as_echo "$as_me: failed program was:" >&5
2292sed 's/^/| /' conftest.$ac_ext >&5
2293
2294	ac_retval=1
2295fi
2296  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297  as_fn_set_status $ac_retval
2298
2299} # ac_fn_cxx_try_compile
2300
2301# ac_fn_c_try_cpp LINENO
2302# ----------------------
2303# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2304ac_fn_c_try_cpp ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  if { { ac_try="$ac_cpp conftest.$ac_ext"
2308case "(($ac_try" in
2309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2310  *) ac_try_echo=$ac_try;;
2311esac
2312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2313$as_echo "$ac_try_echo"; } >&5
2314  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2315  ac_status=$?
2316  if test -s conftest.err; then
2317    grep -v '^ *+' conftest.err >conftest.er1
2318    cat conftest.er1 >&5
2319    mv -f conftest.er1 conftest.err
2320  fi
2321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2322  test $ac_status = 0; } > conftest.i && {
2323	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2324	 test ! -s conftest.err
2325       }; then :
2326  ac_retval=0
2327else
2328  $as_echo "$as_me: failed program was:" >&5
2329sed 's/^/| /' conftest.$ac_ext >&5
2330
2331    ac_retval=1
2332fi
2333  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2334  as_fn_set_status $ac_retval
2335
2336} # ac_fn_c_try_cpp
2337
2338# ac_fn_cxx_try_cpp LINENO
2339# ------------------------
2340# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2341ac_fn_cxx_try_cpp ()
2342{
2343  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344  if { { ac_try="$ac_cpp conftest.$ac_ext"
2345case "(($ac_try" in
2346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2347  *) ac_try_echo=$ac_try;;
2348esac
2349eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2350$as_echo "$ac_try_echo"; } >&5
2351  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2352  ac_status=$?
2353  if test -s conftest.err; then
2354    grep -v '^ *+' conftest.err >conftest.er1
2355    cat conftest.er1 >&5
2356    mv -f conftest.er1 conftest.err
2357  fi
2358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2359  test $ac_status = 0; } > conftest.i && {
2360	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2361	 test ! -s conftest.err
2362       }; then :
2363  ac_retval=0
2364else
2365  $as_echo "$as_me: failed program was:" >&5
2366sed 's/^/| /' conftest.$ac_ext >&5
2367
2368    ac_retval=1
2369fi
2370  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371  as_fn_set_status $ac_retval
2372
2373} # ac_fn_cxx_try_cpp
2374
2375# ac_fn_c_try_link LINENO
2376# -----------------------
2377# Try to link conftest.$ac_ext, and return whether this succeeded.
2378ac_fn_c_try_link ()
2379{
2380  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381  rm -f conftest.$ac_objext conftest$ac_exeext
2382  if { { ac_try="$ac_link"
2383case "(($ac_try" in
2384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385  *) ac_try_echo=$ac_try;;
2386esac
2387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388$as_echo "$ac_try_echo"; } >&5
2389  (eval "$ac_link") 2>conftest.err
2390  ac_status=$?
2391  if test -s conftest.err; then
2392    grep -v '^ *+' conftest.err >conftest.er1
2393    cat conftest.er1 >&5
2394    mv -f conftest.er1 conftest.err
2395  fi
2396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397  test $ac_status = 0; } && {
2398	 test -z "$ac_c_werror_flag" ||
2399	 test ! -s conftest.err
2400       } && test -s conftest$ac_exeext && {
2401	 test "$cross_compiling" = yes ||
2402	 test -x conftest$ac_exeext
2403       }; then :
2404  ac_retval=0
2405else
2406  $as_echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409	ac_retval=1
2410fi
2411  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2412  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2413  # interfere with the next link command; also delete a directory that is
2414  # left behind by Apple's compiler.  We do this before executing the actions.
2415  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417  as_fn_set_status $ac_retval
2418
2419} # ac_fn_c_try_link
2420
2421# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2422# ---------------------------------------------------------
2423# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2424# the include files in INCLUDES and setting the cache variable VAR
2425# accordingly.
2426ac_fn_cxx_check_header_mongrel ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  if eval \${$3+:} false; then :
2430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431$as_echo_n "checking for $2... " >&6; }
2432if eval \${$3+:} false; then :
2433  $as_echo_n "(cached) " >&6
2434fi
2435eval ac_res=\$$3
2436	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
2438else
2439  # Is the header compilable?
2440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2441$as_echo_n "checking $2 usability... " >&6; }
2442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443/* end confdefs.h.  */
2444$4
2445#include <$2>
2446_ACEOF
2447if ac_fn_cxx_try_compile "$LINENO"; then :
2448  ac_header_compiler=yes
2449else
2450  ac_header_compiler=no
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2454$as_echo "$ac_header_compiler" >&6; }
2455
2456# Is the header present?
2457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2458$as_echo_n "checking $2 presence... " >&6; }
2459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460/* end confdefs.h.  */
2461#include <$2>
2462_ACEOF
2463if ac_fn_cxx_try_cpp "$LINENO"; then :
2464  ac_header_preproc=yes
2465else
2466  ac_header_preproc=no
2467fi
2468rm -f conftest.err conftest.i conftest.$ac_ext
2469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2470$as_echo "$ac_header_preproc" >&6; }
2471
2472# So?  What about this header?
2473case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2474  yes:no: )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2476$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2478$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2479    ;;
2480  no:yes:* )
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2482$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2484$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2486$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2488$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2490$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2491( $as_echo "## ----------------------------------------- ##
2492## Report this to build-dev@openjdk.java.net ##
2493## ----------------------------------------- ##"
2494     ) | sed "s/^/$as_me: WARNING:     /" >&2
2495    ;;
2496esac
2497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2498$as_echo_n "checking for $2... " >&6; }
2499if eval \${$3+:} false; then :
2500  $as_echo_n "(cached) " >&6
2501else
2502  eval "$3=\$ac_header_compiler"
2503fi
2504eval ac_res=\$$3
2505	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2506$as_echo "$ac_res" >&6; }
2507fi
2508  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509
2510} # ac_fn_cxx_check_header_mongrel
2511
2512# ac_fn_cxx_try_run LINENO
2513# ------------------------
2514# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2515# that executables *can* be run.
2516ac_fn_cxx_try_run ()
2517{
2518  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519  if { { ac_try="$ac_link"
2520case "(($ac_try" in
2521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522  *) ac_try_echo=$ac_try;;
2523esac
2524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525$as_echo "$ac_try_echo"; } >&5
2526  (eval "$ac_link") 2>&5
2527  ac_status=$?
2528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2530  { { case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_try") 2>&5
2537  ac_status=$?
2538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539  test $ac_status = 0; }; }; then :
2540  ac_retval=0
2541else
2542  $as_echo "$as_me: program exited with status $ac_status" >&5
2543       $as_echo "$as_me: failed program was:" >&5
2544sed 's/^/| /' conftest.$ac_ext >&5
2545
2546       ac_retval=$ac_status
2547fi
2548  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550  as_fn_set_status $ac_retval
2551
2552} # ac_fn_cxx_try_run
2553
2554# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2555# ---------------------------------------------------------
2556# Tests whether HEADER exists and can be compiled using the include files in
2557# INCLUDES, setting the cache variable VAR accordingly.
2558ac_fn_cxx_check_header_compile ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562$as_echo_n "checking for $2... " >&6; }
2563if eval \${$3+:} false; then :
2564  $as_echo_n "(cached) " >&6
2565else
2566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567/* end confdefs.h.  */
2568$4
2569#include <$2>
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  eval "$3=yes"
2573else
2574  eval "$3=no"
2575fi
2576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577fi
2578eval ac_res=\$$3
2579	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580$as_echo "$ac_res" >&6; }
2581  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582
2583} # ac_fn_cxx_check_header_compile
2584
2585# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2586# ----------------------------------------------
2587# Tries to find the compile-time value of EXPR in a program that includes
2588# INCLUDES, setting VAR accordingly. Returns whether the value could be
2589# computed
2590ac_fn_cxx_compute_int ()
2591{
2592  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593  if test "$cross_compiling" = yes; then
2594    # Depending upon the size, compute the lo and hi bounds.
2595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596/* end confdefs.h.  */
2597$4
2598int
2599main ()
2600{
2601static int test_array [1 - 2 * !(($2) >= 0)];
2602test_array [0] = 0;
2603return test_array [0];
2604
2605  ;
2606  return 0;
2607}
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_lo=0 ac_mid=0
2611  while :; do
2612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615int
2616main ()
2617{
2618static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2619test_array [0] = 0;
2620return test_array [0];
2621
2622  ;
2623  return 0;
2624}
2625_ACEOF
2626if ac_fn_cxx_try_compile "$LINENO"; then :
2627  ac_hi=$ac_mid; break
2628else
2629  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2630			if test $ac_lo -le $ac_mid; then
2631			  ac_lo= ac_hi=
2632			  break
2633			fi
2634			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637  done
2638else
2639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$4
2642int
2643main ()
2644{
2645static int test_array [1 - 2 * !(($2) < 0)];
2646test_array [0] = 0;
2647return test_array [0];
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_compile "$LINENO"; then :
2654  ac_hi=-1 ac_mid=-1
2655  while :; do
2656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657/* end confdefs.h.  */
2658$4
2659int
2660main ()
2661{
2662static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2663test_array [0] = 0;
2664return test_array [0];
2665
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670if ac_fn_cxx_try_compile "$LINENO"; then :
2671  ac_lo=$ac_mid; break
2672else
2673  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2674			if test $ac_mid -le $ac_hi; then
2675			  ac_lo= ac_hi=
2676			  break
2677			fi
2678			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681  done
2682else
2683  ac_lo= ac_hi=
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686fi
2687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688# Binary search between lo and hi bounds.
2689while test "x$ac_lo" != "x$ac_hi"; do
2690  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694int
2695main ()
2696{
2697static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2698test_array [0] = 0;
2699return test_array [0];
2700
2701  ;
2702  return 0;
2703}
2704_ACEOF
2705if ac_fn_cxx_try_compile "$LINENO"; then :
2706  ac_hi=$ac_mid
2707else
2708  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711done
2712case $ac_lo in #((
2713?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2714'') ac_retval=1 ;;
2715esac
2716  else
2717    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718/* end confdefs.h.  */
2719$4
2720static long int longval () { return $2; }
2721static unsigned long int ulongval () { return $2; }
2722#include <stdio.h>
2723#include <stdlib.h>
2724int
2725main ()
2726{
2727
2728  FILE *f = fopen ("conftest.val", "w");
2729  if (! f)
2730    return 1;
2731  if (($2) < 0)
2732    {
2733      long int i = longval ();
2734      if (i != ($2))
2735	return 1;
2736      fprintf (f, "%ld", i);
2737    }
2738  else
2739    {
2740      unsigned long int i = ulongval ();
2741      if (i != ($2))
2742	return 1;
2743      fprintf (f, "%lu", i);
2744    }
2745  /* Do not output a trailing newline, as this causes \r\n confusion
2746     on some platforms.  */
2747  return ferror (f) || fclose (f) != 0;
2748
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753if ac_fn_cxx_try_run "$LINENO"; then :
2754  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2755else
2756  ac_retval=1
2757fi
2758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2759  conftest.$ac_objext conftest.beam conftest.$ac_ext
2760rm -f conftest.val
2761
2762  fi
2763  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2764  as_fn_set_status $ac_retval
2765
2766} # ac_fn_cxx_compute_int
2767
2768# ac_fn_cxx_try_link LINENO
2769# -------------------------
2770# Try to link conftest.$ac_ext, and return whether this succeeded.
2771ac_fn_cxx_try_link ()
2772{
2773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774  rm -f conftest.$ac_objext conftest$ac_exeext
2775  if { { ac_try="$ac_link"
2776case "(($ac_try" in
2777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778  *) ac_try_echo=$ac_try;;
2779esac
2780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2781$as_echo "$ac_try_echo"; } >&5
2782  (eval "$ac_link") 2>conftest.err
2783  ac_status=$?
2784  if test -s conftest.err; then
2785    grep -v '^ *+' conftest.err >conftest.er1
2786    cat conftest.er1 >&5
2787    mv -f conftest.er1 conftest.err
2788  fi
2789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2790  test $ac_status = 0; } && {
2791	 test -z "$ac_cxx_werror_flag" ||
2792	 test ! -s conftest.err
2793       } && test -s conftest$ac_exeext && {
2794	 test "$cross_compiling" = yes ||
2795	 test -x conftest$ac_exeext
2796       }; then :
2797  ac_retval=0
2798else
2799  $as_echo "$as_me: failed program was:" >&5
2800sed 's/^/| /' conftest.$ac_ext >&5
2801
2802	ac_retval=1
2803fi
2804  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2805  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2806  # interfere with the next link command; also delete a directory that is
2807  # left behind by Apple's compiler.  We do this before executing the actions.
2808  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810  as_fn_set_status $ac_retval
2811
2812} # ac_fn_cxx_try_link
2813
2814# ac_fn_cxx_check_func LINENO FUNC VAR
2815# ------------------------------------
2816# Tests whether FUNC exists, setting the cache variable VAR accordingly
2817ac_fn_cxx_check_func ()
2818{
2819  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2821$as_echo_n "checking for $2... " >&6; }
2822if eval \${$3+:} false; then :
2823  $as_echo_n "(cached) " >&6
2824else
2825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2826/* end confdefs.h.  */
2827/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2828   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2829#define $2 innocuous_$2
2830
2831/* System header to define __stub macros and hopefully few prototypes,
2832    which can conflict with char $2 (); below.
2833    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2834    <limits.h> exists even on freestanding compilers.  */
2835
2836#ifdef __STDC__
2837# include <limits.h>
2838#else
2839# include <assert.h>
2840#endif
2841
2842#undef $2
2843
2844/* Override any GCC internal prototype to avoid an error.
2845   Use char because int might match the return type of a GCC
2846   builtin and then its argument prototype would still apply.  */
2847#ifdef __cplusplus
2848extern "C"
2849#endif
2850char $2 ();
2851/* The GNU C library defines this for functions which it implements
2852    to always fail with ENOSYS.  Some functions are actually named
2853    something starting with __ and the normal name is an alias.  */
2854#if defined __stub_$2 || defined __stub___$2
2855choke me
2856#endif
2857
2858int
2859main ()
2860{
2861return $2 ();
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_link "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext \
2872    conftest$ac_exeext conftest.$ac_ext
2873fi
2874eval ac_res=\$$3
2875	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2876$as_echo "$ac_res" >&6; }
2877  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878
2879} # ac_fn_cxx_check_func
2880
2881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2882# -------------------------------------------------------
2883# Tests whether HEADER exists and can be compiled using the include files in
2884# INCLUDES, setting the cache variable VAR accordingly.
2885ac_fn_c_check_header_compile ()
2886{
2887  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2889$as_echo_n "checking for $2... " >&6; }
2890if eval \${$3+:} false; then :
2891  $as_echo_n "(cached) " >&6
2892else
2893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894/* end confdefs.h.  */
2895$4
2896#include <$2>
2897_ACEOF
2898if ac_fn_c_try_compile "$LINENO"; then :
2899  eval "$3=yes"
2900else
2901  eval "$3=no"
2902fi
2903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2904fi
2905eval ac_res=\$$3
2906	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907$as_echo "$ac_res" >&6; }
2908  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909
2910} # ac_fn_c_check_header_compile
2911cat >config.log <<_ACEOF
2912This file contains any messages produced by compilers while
2913running configure, to aid debugging if configure makes a mistake.
2914
2915It was created by OpenJDK $as_me jdk9, which was
2916generated by GNU Autoconf 2.69.  Invocation command line was
2917
2918  $ $0 $@
2919
2920_ACEOF
2921exec 5>>config.log
2922{
2923cat <<_ASUNAME
2924## --------- ##
2925## Platform. ##
2926## --------- ##
2927
2928hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2929uname -m = `(uname -m) 2>/dev/null || echo unknown`
2930uname -r = `(uname -r) 2>/dev/null || echo unknown`
2931uname -s = `(uname -s) 2>/dev/null || echo unknown`
2932uname -v = `(uname -v) 2>/dev/null || echo unknown`
2933
2934/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2935/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2936
2937/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2938/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2939/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2940/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2941/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2942/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2943/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2944
2945_ASUNAME
2946
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950  IFS=$as_save_IFS
2951  test -z "$as_dir" && as_dir=.
2952    $as_echo "PATH: $as_dir"
2953  done
2954IFS=$as_save_IFS
2955
2956} >&5
2957
2958cat >&5 <<_ACEOF
2959
2960
2961## ----------- ##
2962## Core tests. ##
2963## ----------- ##
2964
2965_ACEOF
2966
2967
2968# Keep a trace of the command line.
2969# Strip out --no-create and --no-recursion so they do not pile up.
2970# Strip out --silent because we don't want to record it for future runs.
2971# Also quote any args containing shell meta-characters.
2972# Make two passes to allow for proper duplicate-argument suppression.
2973ac_configure_args=
2974ac_configure_args0=
2975ac_configure_args1=
2976ac_must_keep_next=false
2977for ac_pass in 1 2
2978do
2979  for ac_arg
2980  do
2981    case $ac_arg in
2982    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2983    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2984    | -silent | --silent | --silen | --sile | --sil)
2985      continue ;;
2986    *\'*)
2987      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2988    esac
2989    case $ac_pass in
2990    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2991    2)
2992      as_fn_append ac_configure_args1 " '$ac_arg'"
2993      if test $ac_must_keep_next = true; then
2994	ac_must_keep_next=false # Got value, back to normal.
2995      else
2996	case $ac_arg in
2997	  *=* | --config-cache | -C | -disable-* | --disable-* \
2998	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2999	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3000	  | -with-* | --with-* | -without-* | --without-* | --x)
3001	    case "$ac_configure_args0 " in
3002	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3003	    esac
3004	    ;;
3005	  -* ) ac_must_keep_next=true ;;
3006	esac
3007      fi
3008      as_fn_append ac_configure_args " '$ac_arg'"
3009      ;;
3010    esac
3011  done
3012done
3013{ ac_configure_args0=; unset ac_configure_args0;}
3014{ ac_configure_args1=; unset ac_configure_args1;}
3015
3016# When interrupted or exit'd, cleanup temporary files, and complete
3017# config.log.  We remove comments because anyway the quotes in there
3018# would cause problems or look ugly.
3019# WARNING: Use '\'' to represent an apostrophe within the trap.
3020# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3021trap 'exit_status=$?
3022  # Save into config.log some information that might help in debugging.
3023  {
3024    echo
3025
3026    $as_echo "## ---------------- ##
3027## Cache variables. ##
3028## ---------------- ##"
3029    echo
3030    # The following way of writing the cache mishandles newlines in values,
3031(
3032  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3033    eval ac_val=\$$ac_var
3034    case $ac_val in #(
3035    *${as_nl}*)
3036      case $ac_var in #(
3037      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3038$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3039      esac
3040      case $ac_var in #(
3041      _ | IFS | as_nl) ;; #(
3042      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3043      *) { eval $ac_var=; unset $ac_var;} ;;
3044      esac ;;
3045    esac
3046  done
3047  (set) 2>&1 |
3048    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3049    *${as_nl}ac_space=\ *)
3050      sed -n \
3051	"s/'\''/'\''\\\\'\'''\''/g;
3052	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3053      ;; #(
3054    *)
3055      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3056      ;;
3057    esac |
3058    sort
3059)
3060    echo
3061
3062    $as_echo "## ----------------- ##
3063## Output variables. ##
3064## ----------------- ##"
3065    echo
3066    for ac_var in $ac_subst_vars
3067    do
3068      eval ac_val=\$$ac_var
3069      case $ac_val in
3070      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3071      esac
3072      $as_echo "$ac_var='\''$ac_val'\''"
3073    done | sort
3074    echo
3075
3076    if test -n "$ac_subst_files"; then
3077      $as_echo "## ------------------- ##
3078## File substitutions. ##
3079## ------------------- ##"
3080      echo
3081      for ac_var in $ac_subst_files
3082      do
3083	eval ac_val=\$$ac_var
3084	case $ac_val in
3085	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3086	esac
3087	$as_echo "$ac_var='\''$ac_val'\''"
3088      done | sort
3089      echo
3090    fi
3091
3092    if test -s confdefs.h; then
3093      $as_echo "## ----------- ##
3094## confdefs.h. ##
3095## ----------- ##"
3096      echo
3097      cat confdefs.h
3098      echo
3099    fi
3100    test "$ac_signal" != 0 &&
3101      $as_echo "$as_me: caught signal $ac_signal"
3102    $as_echo "$as_me: exit $exit_status"
3103  } >&5
3104  rm -f core *.core core.conftest.* &&
3105    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3106    exit $exit_status
3107' 0
3108for ac_signal in 1 2 13 15; do
3109  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3110done
3111ac_signal=0
3112
3113# confdefs.h avoids OS command line length limits that DEFS can exceed.
3114rm -f -r conftest* confdefs.h
3115
3116$as_echo "/* confdefs.h */" > confdefs.h
3117
3118# Predefined preprocessor variables.
3119
3120cat >>confdefs.h <<_ACEOF
3121#define PACKAGE_NAME "$PACKAGE_NAME"
3122_ACEOF
3123
3124cat >>confdefs.h <<_ACEOF
3125#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3126_ACEOF
3127
3128cat >>confdefs.h <<_ACEOF
3129#define PACKAGE_VERSION "$PACKAGE_VERSION"
3130_ACEOF
3131
3132cat >>confdefs.h <<_ACEOF
3133#define PACKAGE_STRING "$PACKAGE_STRING"
3134_ACEOF
3135
3136cat >>confdefs.h <<_ACEOF
3137#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3138_ACEOF
3139
3140cat >>confdefs.h <<_ACEOF
3141#define PACKAGE_URL "$PACKAGE_URL"
3142_ACEOF
3143
3144
3145# Let the site file select an alternate cache file if it wants to.
3146# Prefer an explicitly selected file to automatically selected ones.
3147ac_site_file1=NONE
3148ac_site_file2=NONE
3149if test -n "$CONFIG_SITE"; then
3150  # We do not want a PATH search for config.site.
3151  case $CONFIG_SITE in #((
3152    -*)  ac_site_file1=./$CONFIG_SITE;;
3153    */*) ac_site_file1=$CONFIG_SITE;;
3154    *)   ac_site_file1=./$CONFIG_SITE;;
3155  esac
3156elif test "x$prefix" != xNONE; then
3157  ac_site_file1=$prefix/share/config.site
3158  ac_site_file2=$prefix/etc/config.site
3159else
3160  ac_site_file1=$ac_default_prefix/share/config.site
3161  ac_site_file2=$ac_default_prefix/etc/config.site
3162fi
3163for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3164do
3165  test "x$ac_site_file" = xNONE && continue
3166  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3167    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3168$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3169    sed 's/^/| /' "$ac_site_file" >&5
3170    . "$ac_site_file" \
3171      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173as_fn_error $? "failed to load site script $ac_site_file
3174See \`config.log' for more details" "$LINENO" 5; }
3175  fi
3176done
3177
3178if test -r "$cache_file"; then
3179  # Some versions of bash will fail to source /dev/null (special files
3180  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3181  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3182    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3183$as_echo "$as_me: loading cache $cache_file" >&6;}
3184    case $cache_file in
3185      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3186      *)                      . "./$cache_file";;
3187    esac
3188  fi
3189else
3190  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3191$as_echo "$as_me: creating cache $cache_file" >&6;}
3192  >$cache_file
3193fi
3194
3195# Check that the precious variables saved in the cache have kept the same
3196# value.
3197ac_cache_corrupted=false
3198for ac_var in $ac_precious_vars; do
3199  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3200  eval ac_new_set=\$ac_env_${ac_var}_set
3201  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3202  eval ac_new_val=\$ac_env_${ac_var}_value
3203  case $ac_old_set,$ac_new_set in
3204    set,)
3205      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3206$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3207      ac_cache_corrupted=: ;;
3208    ,set)
3209      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3210$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3211      ac_cache_corrupted=: ;;
3212    ,);;
3213    *)
3214      if test "x$ac_old_val" != "x$ac_new_val"; then
3215	# differences in whitespace do not lead to failure.
3216	ac_old_val_w=`echo x $ac_old_val`
3217	ac_new_val_w=`echo x $ac_new_val`
3218	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3219	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3220$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3221	  ac_cache_corrupted=:
3222	else
3223	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3224$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3225	  eval $ac_var=\$ac_old_val
3226	fi
3227	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3228$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3229	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3230$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3231      fi;;
3232  esac
3233  # Pass precious variables to config.status.
3234  if test "$ac_new_set" = set; then
3235    case $ac_new_val in
3236    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3237    *) ac_arg=$ac_var=$ac_new_val ;;
3238    esac
3239    case " $ac_configure_args " in
3240      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3241      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3242    esac
3243  fi
3244done
3245if $ac_cache_corrupted; then
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3249$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3250  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3251fi
3252## -------------------- ##
3253## Main body of script. ##
3254## -------------------- ##
3255
3256ac_ext=c
3257ac_cpp='$CPP $CPPFLAGS'
3258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3260ac_compiler_gnu=$ac_cv_c_compiler_gnu
3261
3262
3263
3264ac_aux_dir=
3265for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3266  if test -f "$ac_dir/install-sh"; then
3267    ac_aux_dir=$ac_dir
3268    ac_install_sh="$ac_aux_dir/install-sh -c"
3269    break
3270  elif test -f "$ac_dir/install.sh"; then
3271    ac_aux_dir=$ac_dir
3272    ac_install_sh="$ac_aux_dir/install.sh -c"
3273    break
3274  elif test -f "$ac_dir/shtool"; then
3275    ac_aux_dir=$ac_dir
3276    ac_install_sh="$ac_aux_dir/shtool install -c"
3277    break
3278  fi
3279done
3280if test -z "$ac_aux_dir"; then
3281  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
3282fi
3283
3284# These three variables are undocumented and unsupported,
3285# and are intended to be withdrawn in a future Autoconf release.
3286# They can cause serious problems if a builder's source tree is in a directory
3287# whose full name contains unusual characters.
3288ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3289ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3290ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3291
3292
3293# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3294
3295#
3296# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320#
3321# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3322#
3323# This program is free software; you can redistribute it and/or modify
3324# it under the terms of the GNU General Public License as published by
3325# the Free Software Foundation; either version 2 of the License, or
3326# (at your option) any later version.
3327#
3328# This program is distributed in the hope that it will be useful, but
3329# WITHOUT ANY WARRANTY; without even the implied warranty of
3330# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3331# General Public License for more details.
3332#
3333# You should have received a copy of the GNU General Public License
3334# along with this program; if not, write to the Free Software
3335# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3336#
3337# As a special exception to the GNU General Public License, if you
3338# distribute this file as part of a program that contains a
3339# configuration script generated by Autoconf, you may include it under
3340# the same distribution terms that you use for the rest of that program.
3341
3342# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3343# ----------------------------------
3344# PKG_PROG_PKG_CONFIG
3345
3346# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3347#
3348# Check to see whether a particular set of modules exists.  Similar
3349# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3350#
3351#
3352# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3353# this or PKG_CHECK_MODULES is called, or make sure to call
3354# PKG_CHECK_EXISTS manually
3355# --------------------------------------------------------------
3356
3357
3358
3359# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3360# ---------------------------------------------
3361# _PKG_CONFIG
3362
3363# _PKG_SHORT_ERRORS_SUPPORTED
3364# -----------------------------
3365# _PKG_SHORT_ERRORS_SUPPORTED
3366
3367
3368# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3369# [ACTION-IF-NOT-FOUND])
3370#
3371#
3372# Note that if there is a possibility the first call to
3373# PKG_CHECK_MODULES might not happen, you should be sure to include an
3374# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3375#
3376#
3377# --------------------------------------------------------------
3378# PKG_CHECK_MODULES
3379
3380
3381# Include these first...
3382#
3383# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3384# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3385#
3386# This code is free software; you can redistribute it and/or modify it
3387# under the terms of the GNU General Public License version 2 only, as
3388# published by the Free Software Foundation.  Oracle designates this
3389# particular file as subject to the "Classpath" exception as provided
3390# by Oracle in the LICENSE file that accompanied this code.
3391#
3392# This code is distributed in the hope that it will be useful, but WITHOUT
3393# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3394# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3395# version 2 for more details (a copy is included in the LICENSE file that
3396# accompanied this code).
3397#
3398# You should have received a copy of the GNU General Public License version
3399# 2 along with this work; if not, write to the Free Software Foundation,
3400# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3401#
3402# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3403# or visit www.oracle.com if you need additional information or have any
3404# questions.
3405#
3406
3407# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3408# If so, then append $1 to $2 \
3409# Also set JVM_ARG_OK to true/false depending on outcome.
3410
3411
3412# Appends a string to a path variable, only adding the : when needed.
3413
3414
3415# Prepends a string to a path variable, only adding the : when needed.
3416
3417
3418# This will make sure the given variable points to a full and proper
3419# path. This means:
3420# 1) There will be no spaces in the path. On unix platforms,
3421#    spaces in the path will result in an error. On Windows,
3422#    the path will be rewritten using short-style to be space-free.
3423# 2) The path will be absolute, and it will be in unix-style (on
3424#     cygwin).
3425# $1: The name of the variable to fix
3426
3427
3428# This will make sure the given variable points to a executable
3429# with a full and proper path. This means:
3430# 1) There will be no spaces in the path. On unix platforms,
3431#    spaces in the path will result in an error. On Windows,
3432#    the path will be rewritten using short-style to be space-free.
3433# 2) The path will be absolute, and it will be in unix-style (on
3434#     cygwin).
3435# Any arguments given to the executable is preserved.
3436# If the input variable does not have a directory specification, then
3437# it need to be in the PATH.
3438# $1: The name of the variable to fix
3439
3440
3441
3442
3443# Register a --with argument but mark it as deprecated
3444# $1: The name of the with argument to deprecate, not including --with-
3445
3446
3447# Register a --enable argument but mark it as deprecated
3448# $1: The name of the with argument to deprecate, not including --enable-
3449# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3450
3451
3452
3453
3454# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3455# $1: variable to check
3456
3457
3458# Check that there are no unprocessed overridden variables left.
3459# If so, they are an incorrect argument and we will exit with an error.
3460
3461
3462# Setup a tool for the given variable. If correctly specified by the user,
3463# use that value, otherwise search for the tool using the supplied code snippet.
3464# $1: variable to set
3465# $2: code snippet to call to look for the tool
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_PATH_PROGS but fails if no tool was found.
3479# $1: variable to set
3480# $2: executable name (or list of names) to look for
3481
3482
3483# Like BASIC_SETUP_TOOL but fails if no tool was found.
3484# $1: variable to set
3485# $2: autoconf macro to call to look for the special tool
3486
3487
3488# Setup the most fundamental tools that relies on not much else to set up,
3489# but is used by much of the early bootstrap code.
3490
3491
3492# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3493
3494
3495# Evaluates platform specific overrides for devkit variables.
3496# $1: Name of variable
3497
3498
3499
3500
3501
3502
3503#%%% Simple tools %%%
3504
3505# Check if we have found a usable version of make
3506# $1: the path to a potential make binary (or empty)
3507# $2: the description on how we found this
3508
3509
3510
3511
3512# Goes looking for a usable version of GNU make.
3513
3514
3515
3516
3517
3518
3519# Check if build directory is on local disk. If not possible to determine,
3520# we prefer to claim it's local.
3521# Argument 1: directory to test
3522# Argument 2: what to do if it is on local disk
3523# Argument 3: what to do otherwise (remote disk or failure)
3524
3525
3526# Check that source files have basic read permissions set. This might
3527# not be the case in cygwin in certain conditions.
3528
3529
3530
3531
3532# Check for support for specific options in bash
3533
3534
3535# Code to run after AC_OUTPUT
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567# Helper function which possibly converts a path using DOS-style short mode.
3568# If so, the updated path is stored in $new_path.
3569# $1: The path to check
3570
3571
3572# Helper function which possibly converts a path using DOS-style short mode.
3573# If so, the updated path is stored in $new_path.
3574# $1: The path to check
3575
3576
3577# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3578# and could probably be heavily simplified. However, all changes in this
3579# area tend to need lot of testing in different scenarios, and in lack of
3580# proper unit testing, cleaning this up has not been deemed worth the effort
3581# at the moment.
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3592
3593
3594
3595
3596#
3597# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631# ... then the rest
3632#
3633# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3634# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3635#
3636# This code is free software; you can redistribute it and/or modify it
3637# under the terms of the GNU General Public License version 2 only, as
3638# published by the Free Software Foundation.  Oracle designates this
3639# particular file as subject to the "Classpath" exception as provided
3640# by Oracle in the LICENSE file that accompanied this code.
3641#
3642# This code is distributed in the hope that it will be useful, but WITHOUT
3643# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3644# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3645# version 2 for more details (a copy is included in the LICENSE file that
3646# accompanied this code).
3647#
3648# You should have received a copy of the GNU General Public License version
3649# 2 along with this work; if not, write to the Free Software Foundation,
3650# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3651#
3652# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3653# or visit www.oracle.com if you need additional information or have any
3654# questions.
3655#
3656
3657########################################################################
3658# This file handles detection of the Boot JDK. The Boot JDK detection
3659# process has been developed as a response to solve a complex real-world
3660# problem. Initially, it was simple, but it has grown as platform after
3661# platform, idiosyncracy after idiosyncracy has been supported.
3662#
3663# The basic idea is this:
3664# 1) You need an acceptable *) JDK to use as a Boot JDK
3665# 2) There are several ways to locate a JDK, that are mostly platform
3666#    dependent **)
3667# 3) You can have multiple JDKs installed
3668# 4) If possible, configure should try to dig out an acceptable JDK
3669#    automatically, without having to resort to command-line options
3670#
3671# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3672#     javac) and not a JRE, etc.
3673#
3674# **) On Windows we typically use a well-known path.
3675#     On MacOSX we typically use the tool java_home.
3676#     On Linux we typically find javac in the $PATH, and then follow a
3677#     chain of symlinks that often ends up in a real JDK.
3678#
3679# This leads to the code where we check in different ways to locate a
3680# JDK, and if one is found, check if it is acceptable. If not, we print
3681# our reasons for rejecting it (useful when debugging non-working
3682# configure situations) and continue checking the next one.
3683########################################################################
3684
3685# Execute the check given as argument, and verify the result
3686# If the Boot JDK was previously found, do nothing
3687# $1 A command line (typically autoconf macro) to execute
3688
3689
3690# Test: Is bootjdk explicitely set by command line arguments?
3691
3692
3693# Test: Is bootjdk available from builddeps?
3694
3695
3696# Test: Is $JAVA_HOME set?
3697
3698
3699# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3700
3701
3702# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3703# $1: Argument to the java_home binary (optional)
3704
3705
3706# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3707
3708
3709# Look for a jdk in the given path. If there are multiple, try to select the newest.
3710# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3711# $1 = Path to directory containing jdk installations.
3712# $2 = String to append to the found JDK directory to get the proper JDK home
3713
3714
3715# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3716# environmental variable as base for where to look.
3717# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3718
3719
3720# Test: Is there a JDK installed in default, well-known locations?
3721
3722
3723# Check that a command-line tool in the Boot JDK is correct
3724# $1 = name of variable to assign
3725# $2 = name of binary
3726
3727
3728###############################################################################
3729#
3730# We need a Boot JDK to bootstrap the build.
3731#
3732
3733
3734
3735
3736
3737#
3738# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781#
3782# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3783# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3784#
3785# This code is free software; you can redistribute it and/or modify it
3786# under the terms of the GNU General Public License version 2 only, as
3787# published by the Free Software Foundation.  Oracle designates this
3788# particular file as subject to the "Classpath" exception as provided
3789# by Oracle in the LICENSE file that accompanied this code.
3790#
3791# This code is distributed in the hope that it will be useful, but WITHOUT
3792# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3793# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3794# version 2 for more details (a copy is included in the LICENSE file that
3795# accompanied this code).
3796#
3797# You should have received a copy of the GNU General Public License version
3798# 2 along with this work; if not, write to the Free Software Foundation,
3799# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3800#
3801# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3802# or visit www.oracle.com if you need additional information or have any
3803# questions.
3804#
3805
3806
3807
3808
3809
3810# Documentation on common flags used for solstudio in HIGHEST.
3811#
3812# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3813#          done with care, there are some assumptions below that need to
3814#          be understood about the use of pointers, and IEEE behavior.
3815#
3816# -fns: Use non-standard floating point mode (not IEEE 754)
3817# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3818# -fsingle: Use single precision floating point with 'float'
3819# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3820#   (Source with excessing pointer casting and data access with mixed
3821#    pointer types are not recommended)
3822# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3823#   (If you expect perfect errno behavior, do not use this)
3824# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3825# -xrestrict: Pointer parameters to functions do not overlap
3826#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3827#    If you pass in multiple pointers to the same data, do not use this)
3828# -xlibmil: Inline some library routines
3829#   (If you expect perfect errno behavior, do not use this)
3830# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3831#   (If you expect perfect errno behavior, do not use this)
3832#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3833
3834    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3835    # Bug?
3836    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3837    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3838    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3839    #fi
3840
3841
3842
3843
3844
3845# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846#                                   [RUN-IF-FALSE])
3847# ------------------------------------------------------------
3848# Check that the c and c++ compilers support an argument
3849
3850
3851# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852#                                    [RUN-IF-FALSE])
3853# ------------------------------------------------------------
3854# Check that the linker support an argument
3855
3856
3857
3858
3859#
3860# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3862#
3863# This code is free software; you can redistribute it and/or modify it
3864# under the terms of the GNU General Public License version 2 only, as
3865# published by the Free Software Foundation.  Oracle designates this
3866# particular file as subject to the "Classpath" exception as provided
3867# by Oracle in the LICENSE file that accompanied this code.
3868#
3869# This code is distributed in the hope that it will be useful, but WITHOUT
3870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3872# version 2 for more details (a copy is included in the LICENSE file that
3873# accompanied this code).
3874#
3875# You should have received a copy of the GNU General Public License version
3876# 2 along with this work; if not, write to the Free Software Foundation,
3877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3878#
3879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3880# or visit www.oracle.com if you need additional information or have any
3881# questions.
3882#
3883
3884
3885
3886
3887
3888cygwin_help() {
3889  case $1 in
3890    unzip)
3891      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893      ;;
3894    zip)
3895      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897      ;;
3898    make)
3899      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3900      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3901      ;;
3902    freetype)
3903      HELP_MSG="
3904The freetype library can now be build during the configure process.
3905Download the freetype sources and unpack them into an arbitrary directory:
3906
3907wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3908tar -xzf freetype-2.5.3.tar.gz
3909
3910Then run configure with '--with-freetype-src=<freetype_src>'. This will
3911automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3912builds or into '<freetype_src>/lib32' for 32-bit builds.
3913Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3914and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3915      ;;
3916  esac
3917}
3918
3919msys_help() {
3920  PKGHANDLER_COMMAND=""
3921}
3922
3923apt_help() {
3924  case $1 in
3925    devkit)
3926      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3927    openjdk)
3928      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3929    alsa)
3930      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3931    cups)
3932      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3933    freetype)
3934      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3935    pulse)
3936      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3937    x11)
3938      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3939    ccache)
3940      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3941  esac
3942}
3943
3944yum_help() {
3945  case $1 in
3946    devkit)
3947      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3948    openjdk)
3949      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3950    alsa)
3951      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3952    cups)
3953      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3954    freetype)
3955      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3956    pulse)
3957      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3958    x11)
3959      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3960    ccache)
3961      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3962  esac
3963}
3964
3965port_help() {
3966  PKGHANDLER_COMMAND=""
3967}
3968
3969pkgutil_help() {
3970  PKGHANDLER_COMMAND=""
3971}
3972
3973pkgadd_help() {
3974  PKGHANDLER_COMMAND=""
3975}
3976
3977# This function will check if we're called from the "configure" wrapper while
3978# printing --help. If so, we will print out additional information that can
3979# only be extracted within the autoconf script, and then exit. This must be
3980# called at the very beginning in configure.ac.
3981
3982
3983
3984
3985
3986
3987#
3988# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021###############################################################################
4022#
4023# Should we build only OpenJDK even if closed sources are present?
4024#
4025
4026
4027
4028
4029
4030
4031###############################################################################
4032#
4033# Enable or disable the elliptic curve crypto implementation
4034#
4035
4036
4037
4038
4039
4040################################################################################
4041#
4042# Gcov coverage data for hotspot
4043#
4044
4045
4046#
4047# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4048# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049#
4050# This code is free software; you can redistribute it and/or modify it
4051# under the terms of the GNU General Public License version 2 only, as
4052# published by the Free Software Foundation.  Oracle designates this
4053# particular file as subject to the "Classpath" exception as provided
4054# by Oracle in the LICENSE file that accompanied this code.
4055#
4056# This code is distributed in the hope that it will be useful, but WITHOUT
4057# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4059# version 2 for more details (a copy is included in the LICENSE file that
4060# accompanied this code).
4061#
4062# You should have received a copy of the GNU General Public License version
4063# 2 along with this work; if not, write to the Free Software Foundation,
4064# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065#
4066# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067# or visit www.oracle.com if you need additional information or have any
4068# questions.
4069#
4070
4071###############################################################################
4072#
4073# Setup version numbers
4074#
4075
4076# Verify that a given string represents a valid version number, and assign it
4077# to a variable.
4078
4079# Argument 1: the variable to assign to
4080# Argument 2: the value given by the user
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130#
4131# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133#
4134# This code is free software; you can redistribute it and/or modify it
4135# under the terms of the GNU General Public License version 2 only, as
4136# published by the Free Software Foundation.  Oracle designates this
4137# particular file as subject to the "Classpath" exception as provided
4138# by Oracle in the LICENSE file that accompanied this code.
4139#
4140# This code is distributed in the hope that it will be useful, but WITHOUT
4141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4143# version 2 for more details (a copy is included in the LICENSE file that
4144# accompanied this code).
4145#
4146# You should have received a copy of the GNU General Public License version
4147# 2 along with this work; if not, write to the Free Software Foundation,
4148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149#
4150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151# or visit www.oracle.com if you need additional information or have any
4152# questions.
4153#
4154
4155# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4156# Converts autoconf style CPU name to OpenJDK style, into
4157# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4158
4159
4160# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4161# Converts autoconf style OS name to OpenJDK style, into
4162# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4163
4164
4165# Expects $host_os $host_cpu $build_os and $build_cpu
4166# and $with_target_bits to have been setup!
4167#
4168# Translate the standard triplet(quadruplet) definition
4169# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4170# OPENJDK_BUILD_OS, etc.
4171
4172
4173# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4174# accordingly. Must be done after setting up build and target system, but before
4175# doing anything else with these values.
4176
4177
4178# Setup the legacy variables, for controlling the old makefiles.
4179#
4180
4181
4182
4183
4184#%%% Build and target systems %%%
4185
4186
4187
4188
4189# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4190# Add -mX to various FLAGS variables.
4191
4192
4193
4194
4195
4196
4197#
4198# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4199# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4200#
4201# This code is free software; you can redistribute it and/or modify it
4202# under the terms of the GNU General Public License version 2 only, as
4203# published by the Free Software Foundation.  Oracle designates this
4204# particular file as subject to the "Classpath" exception as provided
4205# by Oracle in the LICENSE file that accompanied this code.
4206#
4207# This code is distributed in the hope that it will be useful, but WITHOUT
4208# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4209# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4210# version 2 for more details (a copy is included in the LICENSE file that
4211# accompanied this code).
4212#
4213# You should have received a copy of the GNU General Public License version
4214# 2 along with this work; if not, write to the Free Software Foundation,
4215# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4216#
4217# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4218# or visit www.oracle.com if you need additional information or have any
4219# questions.
4220#
4221
4222
4223
4224
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254########################################################################
4255# This file is responsible for detecting, verifying and setting up the
4256# toolchain, i.e. the compiler, linker and related utilities. It will setup
4257# proper paths to the binaries, but it will not setup any flags.
4258#
4259# The binaries used is determined by the toolchain type, which is the family of
4260# compilers and related tools that are used.
4261########################################################################
4262
4263
4264# All valid toolchains, regardless of platform (used by help.m4)
4265VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4266
4267# These toolchains are valid on different platforms
4268VALID_TOOLCHAINS_linux="gcc clang"
4269VALID_TOOLCHAINS_solaris="solstudio"
4270VALID_TOOLCHAINS_macosx="gcc clang"
4271VALID_TOOLCHAINS_aix="xlc"
4272VALID_TOOLCHAINS_windows="microsoft"
4273
4274# Toolchain descriptions
4275TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4276TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4277TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4278TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4279TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4280
4281# Setup a number of variables describing how native output files are
4282# named on this platform/toolchain.
4283
4284
4285# Determine which toolchain type to use, and make sure it is valid for this
4286# platform. Setup various information about the selected toolchain.
4287
4288
4289# Before we start detecting the toolchain executables, we might need some
4290# special setup, e.g. additional paths etc.
4291
4292
4293# Restore path, etc
4294
4295
4296# Check if a compiler is of the toolchain type we expect, and save the version
4297# information from it. If the compiler does not match the expected type,
4298# this function will abort using AC_MSG_ERROR. If it matches, the version will
4299# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4300# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4301#
4302# $1 = compiler to test (CC or CXX)
4303# $2 = human readable name of compiler (C or C++)
4304
4305
4306# Try to locate the given C or C++ compiler in the path, or otherwise.
4307#
4308# $1 = compiler to test (CC or CXX)
4309# $2 = human readable name of compiler (C or C++)
4310# $3 = list of compiler names to search for
4311
4312
4313# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4314# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4315# archiver (AR). Verify that the compilers are correct according to the
4316# toolchain type.
4317
4318
4319# Setup additional tools that is considered a part of the toolchain, but not the
4320# core part. Many of these are highly platform-specific and do not exist,
4321# and/or are not needed on all platforms.
4322
4323
4324# Setup the build tools (i.e, the compiler and linker used to build programs
4325# that should be run on the build platform, not the target platform, as a build
4326# helper). Since the non-cross-compile case uses the normal, target compilers
4327# for this, we can only do this after these have been setup.
4328
4329
4330# Setup legacy variables that are still needed as alternative ways to refer to
4331# parts of the toolchain.
4332
4333
4334# Do some additional checks on the detected tools.
4335
4336
4337# Setup the JTReg Regression Test Harness.
4338
4339
4340#
4341# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343#
4344# This code is free software; you can redistribute it and/or modify it
4345# under the terms of the GNU General Public License version 2 only, as
4346# published by the Free Software Foundation.  Oracle designates this
4347# particular file as subject to the "Classpath" exception as provided
4348# by Oracle in the LICENSE file that accompanied this code.
4349#
4350# This code is distributed in the hope that it will be useful, but WITHOUT
4351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353# version 2 for more details (a copy is included in the LICENSE file that
4354# accompanied this code).
4355#
4356# You should have received a copy of the GNU General Public License version
4357# 2 along with this work; if not, write to the Free Software Foundation,
4358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359#
4360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361# or visit www.oracle.com if you need additional information or have any
4362# questions.
4363#
4364
4365################################################################################
4366# The order of these defines the priority by which we try to find them.
4367VALID_VS_VERSIONS="2013 2012 2010"
4368
4369VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4370VS_VERSION_INTERNAL_2010=100
4371VS_MSVCR_2010=msvcr100.dll
4372# We don't use msvcp on Visual Studio 2010
4373#VS_MSVCP_2010=msvcp100.dll
4374VS_ENVVAR_2010="VS100COMNTOOLS"
4375VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4376VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4377VS_VS_PLATFORM_NAME_2010="v100"
4378VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4379
4380VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4381VS_VERSION_INTERNAL_2012=110
4382VS_MSVCR_2012=msvcr110.dll
4383VS_MSVCP_2012=msvcp110.dll
4384VS_ENVVAR_2012="VS110COMNTOOLS"
4385VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4386VS_SDK_INSTALLDIR_2012=
4387VS_VS_PLATFORM_NAME_2012="v110"
4388VS_SDK_PLATFORM_NAME_2012=
4389
4390VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4391VS_VERSION_INTERNAL_2013=120
4392VS_MSVCR_2013=msvcr120.dll
4393VS_MSVCP_2013=msvcp120.dll
4394VS_ENVVAR_2013="VS120COMNTOOLS"
4395VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4396VS_SDK_INSTALLDIR_2013=
4397VS_VS_PLATFORM_NAME_2013="v120"
4398VS_SDK_PLATFORM_NAME_2013=
4399
4400################################################################################
4401
4402
4403
4404################################################################################
4405
4406
4407
4408################################################################################
4409# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4410# build environment and assigns it to VS_ENV_CMD
4411
4412
4413################################################################################
4414
4415
4416
4417################################################################################
4418# Check if the VS env variables were setup prior to running configure.
4419# If not, then find vcvarsall.bat and run it automatically, and integrate
4420# the set env variables into the spec file.
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435# This line needs to be here, verbatim, after all includes and the dummy hook
4436# definitions. It is replaced with custom functionality when building
4437# custom sources.
4438#CUSTOM_AUTOCONF_INCLUDE
4439
4440# Do not change or remove the following line, it is needed for consistency checks:
4441DATE_WHEN_GENERATED=1436819493
4442
4443###############################################################################
4444#
4445# Initialization / Boot-strapping
4446#
4447# The bootstrapping process needs to solve the "chicken or the egg" problem,
4448# thus it jumps back and forth, each time gaining something needed later on.
4449#
4450###############################################################################
4451
4452# If we are requested to print additional help, do that and then exit.
4453# This must be the very first call.
4454
4455  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4456    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4457    $PRINTF "Which are valid to use depends on the build platform.\n"
4458    for toolchain in $VALID_TOOLCHAINS_all; do
4459      # Use indirect variable referencing
4460      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4461      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4462      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4463    done
4464
4465    # And now exit directly
4466    exit 0
4467  fi
4468
4469
4470# Basic initialization that must happen first of all in the normal process.
4471
4472  # Save the original command line. This is passed to us by the wrapper configure script.
4473
4474  # Save the path variable before it gets changed
4475  ORIGINAL_PATH="$PATH"
4476
4477  DATE_WHEN_CONFIGURED=`LANG=C date`
4478
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4480$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4482$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4483
4484
4485  # Start with tools that do not need have cross compilation support
4486  # and can be expected to be found in the default PATH. These tools are
4487  # used by configure. Nor are these tools expected to be found in the
4488  # devkit from the builddeps server either, since they are
4489  # needed to download the devkit.
4490
4491  # First are all the simple required tools.
4492
4493
4494
4495  # Publish this variable in the help.
4496
4497
4498  if test "x$BASENAME" = x; then
4499    # The variable is not set by user, try to locate tool using the code snippet
4500    for ac_prog in basename
4501do
4502  # Extract the first word of "$ac_prog", so it can be a program name with args.
4503set dummy $ac_prog; ac_word=$2
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505$as_echo_n "checking for $ac_word... " >&6; }
4506if ${ac_cv_path_BASENAME+:} false; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  case $BASENAME in
4510  [\\/]* | ?:[\\/]*)
4511  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4512  ;;
4513  *)
4514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4521    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529  ;;
4530esac
4531fi
4532BASENAME=$ac_cv_path_BASENAME
4533if test -n "$BASENAME"; then
4534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4535$as_echo "$BASENAME" >&6; }
4536else
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538$as_echo "no" >&6; }
4539fi
4540
4541
4542  test -n "$BASENAME" && break
4543done
4544
4545  else
4546    # The variable is set, but is it from the command line or the environment?
4547
4548    # Try to remove the string !BASENAME! from our list.
4549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4551      # If it failed, the variable was not from the command line. Ignore it,
4552      # but warn the user (except for BASH, which is always set by the calling BASH).
4553      if test "xBASENAME" != xBASH; then
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4555$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4556      fi
4557      # Try to locate tool using the code snippet
4558      for ac_prog in basename
4559do
4560  # Extract the first word of "$ac_prog", so it can be a program name with args.
4561set dummy $ac_prog; ac_word=$2
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
4564if ${ac_cv_path_BASENAME+:} false; then :
4565  $as_echo_n "(cached) " >&6
4566else
4567  case $BASENAME in
4568  [\\/]* | ?:[\\/]*)
4569  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4570  ;;
4571  *)
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    for ac_exec_ext in '' $ac_executable_extensions; do
4578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4579    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581    break 2
4582  fi
4583done
4584  done
4585IFS=$as_save_IFS
4586
4587  ;;
4588esac
4589fi
4590BASENAME=$ac_cv_path_BASENAME
4591if test -n "$BASENAME"; then
4592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4593$as_echo "$BASENAME" >&6; }
4594else
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
4597fi
4598
4599
4600  test -n "$BASENAME" && break
4601done
4602
4603    else
4604      # If it succeeded, then it was overridden by the user. We will use it
4605      # for the tool.
4606
4607      # First remove it from the list of overridden variables, so we can test
4608      # for unknown variables in the end.
4609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4610
4611      # Check if the provided tool contains a complete path.
4612      tool_specified="$BASENAME"
4613      tool_basename="${tool_specified##*/}"
4614      if test "x$tool_basename" = "x$tool_specified"; then
4615        # A command without a complete path is provided, search $PATH.
4616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4617$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4618        # Extract the first word of "$tool_basename", so it can be a program name with args.
4619set dummy $tool_basename; ac_word=$2
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
4622if ${ac_cv_path_BASENAME+:} false; then :
4623  $as_echo_n "(cached) " >&6
4624else
4625  case $BASENAME in
4626  [\\/]* | ?:[\\/]*)
4627  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4628  ;;
4629  *)
4630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631for as_dir in $PATH
4632do
4633  IFS=$as_save_IFS
4634  test -z "$as_dir" && as_dir=.
4635    for ac_exec_ext in '' $ac_executable_extensions; do
4636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4637    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4639    break 2
4640  fi
4641done
4642  done
4643IFS=$as_save_IFS
4644
4645  ;;
4646esac
4647fi
4648BASENAME=$ac_cv_path_BASENAME
4649if test -n "$BASENAME"; then
4650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4651$as_echo "$BASENAME" >&6; }
4652else
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
4655fi
4656
4657
4658        if test "x$BASENAME" = x; then
4659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4660        fi
4661      else
4662        # Otherwise we believe it is a complete path. Use it as it is.
4663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4664$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4666$as_echo_n "checking for BASENAME... " >&6; }
4667        if test ! -x "$tool_specified"; then
4668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4669$as_echo "not found" >&6; }
4670          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4673$as_echo "$tool_specified" >&6; }
4674      fi
4675    fi
4676  fi
4677
4678
4679
4680  if test "x$BASENAME" = x; then
4681    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4682  fi
4683
4684
4685
4686
4687
4688  # Publish this variable in the help.
4689
4690
4691  if test "x$BASH" = x; then
4692    # The variable is not set by user, try to locate tool using the code snippet
4693    for ac_prog in bash
4694do
4695  # Extract the first word of "$ac_prog", so it can be a program name with args.
4696set dummy $ac_prog; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_BASH+:} false; then :
4700  $as_echo_n "(cached) " >&6
4701else
4702  case $BASH in
4703  [\\/]* | ?:[\\/]*)
4704  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4705  ;;
4706  *)
4707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in $PATH
4709do
4710  IFS=$as_save_IFS
4711  test -z "$as_dir" && as_dir=.
4712    for ac_exec_ext in '' $ac_executable_extensions; do
4713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716    break 2
4717  fi
4718done
4719  done
4720IFS=$as_save_IFS
4721
4722  ;;
4723esac
4724fi
4725BASH=$ac_cv_path_BASH
4726if test -n "$BASH"; then
4727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4728$as_echo "$BASH" >&6; }
4729else
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735  test -n "$BASH" && break
4736done
4737
4738  else
4739    # The variable is set, but is it from the command line or the environment?
4740
4741    # Try to remove the string !BASH! from our list.
4742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4744      # If it failed, the variable was not from the command line. Ignore it,
4745      # but warn the user (except for BASH, which is always set by the calling BASH).
4746      if test "xBASH" != xBASH; then
4747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4748$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4749      fi
4750      # Try to locate tool using the code snippet
4751      for ac_prog in bash
4752do
4753  # Extract the first word of "$ac_prog", so it can be a program name with args.
4754set dummy $ac_prog; ac_word=$2
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4756$as_echo_n "checking for $ac_word... " >&6; }
4757if ${ac_cv_path_BASH+:} false; then :
4758  $as_echo_n "(cached) " >&6
4759else
4760  case $BASH in
4761  [\\/]* | ?:[\\/]*)
4762  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4763  ;;
4764  *)
4765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766for as_dir in $PATH
4767do
4768  IFS=$as_save_IFS
4769  test -z "$as_dir" && as_dir=.
4770    for ac_exec_ext in '' $ac_executable_extensions; do
4771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4774    break 2
4775  fi
4776done
4777  done
4778IFS=$as_save_IFS
4779
4780  ;;
4781esac
4782fi
4783BASH=$ac_cv_path_BASH
4784if test -n "$BASH"; then
4785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4786$as_echo "$BASH" >&6; }
4787else
4788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4789$as_echo "no" >&6; }
4790fi
4791
4792
4793  test -n "$BASH" && break
4794done
4795
4796    else
4797      # If it succeeded, then it was overridden by the user. We will use it
4798      # for the tool.
4799
4800      # First remove it from the list of overridden variables, so we can test
4801      # for unknown variables in the end.
4802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4803
4804      # Check if the provided tool contains a complete path.
4805      tool_specified="$BASH"
4806      tool_basename="${tool_specified##*/}"
4807      if test "x$tool_basename" = "x$tool_specified"; then
4808        # A command without a complete path is provided, search $PATH.
4809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4810$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4811        # Extract the first word of "$tool_basename", so it can be a program name with args.
4812set dummy $tool_basename; ac_word=$2
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814$as_echo_n "checking for $ac_word... " >&6; }
4815if ${ac_cv_path_BASH+:} false; then :
4816  $as_echo_n "(cached) " >&6
4817else
4818  case $BASH in
4819  [\\/]* | ?:[\\/]*)
4820  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4821  ;;
4822  *)
4823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824for as_dir in $PATH
4825do
4826  IFS=$as_save_IFS
4827  test -z "$as_dir" && as_dir=.
4828    for ac_exec_ext in '' $ac_executable_extensions; do
4829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4830    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4832    break 2
4833  fi
4834done
4835  done
4836IFS=$as_save_IFS
4837
4838  ;;
4839esac
4840fi
4841BASH=$ac_cv_path_BASH
4842if test -n "$BASH"; then
4843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4844$as_echo "$BASH" >&6; }
4845else
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851        if test "x$BASH" = x; then
4852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4853        fi
4854      else
4855        # Otherwise we believe it is a complete path. Use it as it is.
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4857$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4859$as_echo_n "checking for BASH... " >&6; }
4860        if test ! -x "$tool_specified"; then
4861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4862$as_echo "not found" >&6; }
4863          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4864        fi
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4866$as_echo "$tool_specified" >&6; }
4867      fi
4868    fi
4869  fi
4870
4871
4872
4873  if test "x$BASH" = x; then
4874    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4875  fi
4876
4877
4878
4879
4880
4881  # Publish this variable in the help.
4882
4883
4884  if test "x$CAT" = x; then
4885    # The variable is not set by user, try to locate tool using the code snippet
4886    for ac_prog in cat
4887do
4888  # Extract the first word of "$ac_prog", so it can be a program name with args.
4889set dummy $ac_prog; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
4892if ${ac_cv_path_CAT+:} false; then :
4893  $as_echo_n "(cached) " >&6
4894else
4895  case $CAT in
4896  [\\/]* | ?:[\\/]*)
4897  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4898  ;;
4899  *)
4900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901for as_dir in $PATH
4902do
4903  IFS=$as_save_IFS
4904  test -z "$as_dir" && as_dir=.
4905    for ac_exec_ext in '' $ac_executable_extensions; do
4906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909    break 2
4910  fi
4911done
4912  done
4913IFS=$as_save_IFS
4914
4915  ;;
4916esac
4917fi
4918CAT=$ac_cv_path_CAT
4919if test -n "$CAT"; then
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4921$as_echo "$CAT" >&6; }
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928  test -n "$CAT" && break
4929done
4930
4931  else
4932    # The variable is set, but is it from the command line or the environment?
4933
4934    # Try to remove the string !CAT! from our list.
4935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4937      # If it failed, the variable was not from the command line. Ignore it,
4938      # but warn the user (except for BASH, which is always set by the calling BASH).
4939      if test "xCAT" != xBASH; then
4940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4941$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4942      fi
4943      # Try to locate tool using the code snippet
4944      for ac_prog in cat
4945do
4946  # Extract the first word of "$ac_prog", so it can be a program name with args.
4947set dummy $ac_prog; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if ${ac_cv_path_CAT+:} false; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953  case $CAT in
4954  [\\/]* | ?:[\\/]*)
4955  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4956  ;;
4957  *)
4958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in $PATH
4960do
4961  IFS=$as_save_IFS
4962  test -z "$as_dir" && as_dir=.
4963    for ac_exec_ext in '' $ac_executable_extensions; do
4964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967    break 2
4968  fi
4969done
4970  done
4971IFS=$as_save_IFS
4972
4973  ;;
4974esac
4975fi
4976CAT=$ac_cv_path_CAT
4977if test -n "$CAT"; then
4978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4979$as_echo "$CAT" >&6; }
4980else
4981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985
4986  test -n "$CAT" && break
4987done
4988
4989    else
4990      # If it succeeded, then it was overridden by the user. We will use it
4991      # for the tool.
4992
4993      # First remove it from the list of overridden variables, so we can test
4994      # for unknown variables in the end.
4995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4996
4997      # Check if the provided tool contains a complete path.
4998      tool_specified="$CAT"
4999      tool_basename="${tool_specified##*/}"
5000      if test "x$tool_basename" = "x$tool_specified"; then
5001        # A command without a complete path is provided, search $PATH.
5002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5003$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5004        # Extract the first word of "$tool_basename", so it can be a program name with args.
5005set dummy $tool_basename; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
5008if ${ac_cv_path_CAT+:} false; then :
5009  $as_echo_n "(cached) " >&6
5010else
5011  case $CAT in
5012  [\\/]* | ?:[\\/]*)
5013  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5014  ;;
5015  *)
5016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019  IFS=$as_save_IFS
5020  test -z "$as_dir" && as_dir=.
5021    for ac_exec_ext in '' $ac_executable_extensions; do
5022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5023    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025    break 2
5026  fi
5027done
5028  done
5029IFS=$as_save_IFS
5030
5031  ;;
5032esac
5033fi
5034CAT=$ac_cv_path_CAT
5035if test -n "$CAT"; then
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5037$as_echo "$CAT" >&6; }
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
5041fi
5042
5043
5044        if test "x$CAT" = x; then
5045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5046        fi
5047      else
5048        # Otherwise we believe it is a complete path. Use it as it is.
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5050$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5052$as_echo_n "checking for CAT... " >&6; }
5053        if test ! -x "$tool_specified"; then
5054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5055$as_echo "not found" >&6; }
5056          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5057        fi
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5059$as_echo "$tool_specified" >&6; }
5060      fi
5061    fi
5062  fi
5063
5064
5065
5066  if test "x$CAT" = x; then
5067    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5068  fi
5069
5070
5071
5072
5073
5074  # Publish this variable in the help.
5075
5076
5077  if test "x$CHMOD" = x; then
5078    # The variable is not set by user, try to locate tool using the code snippet
5079    for ac_prog in chmod
5080do
5081  # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_path_CHMOD+:} false; then :
5086  $as_echo_n "(cached) " >&6
5087else
5088  case $CHMOD in
5089  [\\/]* | ?:[\\/]*)
5090  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5091  ;;
5092  *)
5093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096  IFS=$as_save_IFS
5097  test -z "$as_dir" && as_dir=.
5098    for ac_exec_ext in '' $ac_executable_extensions; do
5099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102    break 2
5103  fi
5104done
5105  done
5106IFS=$as_save_IFS
5107
5108  ;;
5109esac
5110fi
5111CHMOD=$ac_cv_path_CHMOD
5112if test -n "$CHMOD"; then
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5114$as_echo "$CHMOD" >&6; }
5115else
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120
5121  test -n "$CHMOD" && break
5122done
5123
5124  else
5125    # The variable is set, but is it from the command line or the environment?
5126
5127    # Try to remove the string !CHMOD! from our list.
5128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5130      # If it failed, the variable was not from the command line. Ignore it,
5131      # but warn the user (except for BASH, which is always set by the calling BASH).
5132      if test "xCHMOD" != xBASH; then
5133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5134$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5135      fi
5136      # Try to locate tool using the code snippet
5137      for ac_prog in chmod
5138do
5139  # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if ${ac_cv_path_CHMOD+:} false; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146  case $CHMOD in
5147  [\\/]* | ?:[\\/]*)
5148  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5149  ;;
5150  *)
5151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  test -z "$as_dir" && as_dir=.
5156    for ac_exec_ext in '' $ac_executable_extensions; do
5157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160    break 2
5161  fi
5162done
5163  done
5164IFS=$as_save_IFS
5165
5166  ;;
5167esac
5168fi
5169CHMOD=$ac_cv_path_CHMOD
5170if test -n "$CHMOD"; then
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5172$as_echo "$CHMOD" >&6; }
5173else
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179  test -n "$CHMOD" && break
5180done
5181
5182    else
5183      # If it succeeded, then it was overridden by the user. We will use it
5184      # for the tool.
5185
5186      # First remove it from the list of overridden variables, so we can test
5187      # for unknown variables in the end.
5188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5189
5190      # Check if the provided tool contains a complete path.
5191      tool_specified="$CHMOD"
5192      tool_basename="${tool_specified##*/}"
5193      if test "x$tool_basename" = "x$tool_specified"; then
5194        # A command without a complete path is provided, search $PATH.
5195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5196$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5197        # Extract the first word of "$tool_basename", so it can be a program name with args.
5198set dummy $tool_basename; ac_word=$2
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200$as_echo_n "checking for $ac_word... " >&6; }
5201if ${ac_cv_path_CHMOD+:} false; then :
5202  $as_echo_n "(cached) " >&6
5203else
5204  case $CHMOD in
5205  [\\/]* | ?:[\\/]*)
5206  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5207  ;;
5208  *)
5209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212  IFS=$as_save_IFS
5213  test -z "$as_dir" && as_dir=.
5214    for ac_exec_ext in '' $ac_executable_extensions; do
5215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5216    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218    break 2
5219  fi
5220done
5221  done
5222IFS=$as_save_IFS
5223
5224  ;;
5225esac
5226fi
5227CHMOD=$ac_cv_path_CHMOD
5228if test -n "$CHMOD"; then
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5230$as_echo "$CHMOD" >&6; }
5231else
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }
5234fi
5235
5236
5237        if test "x$CHMOD" = x; then
5238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5239        fi
5240      else
5241        # Otherwise we believe it is a complete path. Use it as it is.
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5243$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5245$as_echo_n "checking for CHMOD... " >&6; }
5246        if test ! -x "$tool_specified"; then
5247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5248$as_echo "not found" >&6; }
5249          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5250        fi
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5252$as_echo "$tool_specified" >&6; }
5253      fi
5254    fi
5255  fi
5256
5257
5258
5259  if test "x$CHMOD" = x; then
5260    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5261  fi
5262
5263
5264
5265
5266
5267  # Publish this variable in the help.
5268
5269
5270  if test "x$CMP" = x; then
5271    # The variable is not set by user, try to locate tool using the code snippet
5272    for ac_prog in cmp
5273do
5274  # Extract the first word of "$ac_prog", so it can be a program name with args.
5275set dummy $ac_prog; ac_word=$2
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
5278if ${ac_cv_path_CMP+:} false; then :
5279  $as_echo_n "(cached) " >&6
5280else
5281  case $CMP in
5282  [\\/]* | ?:[\\/]*)
5283  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5284  ;;
5285  *)
5286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289  IFS=$as_save_IFS
5290  test -z "$as_dir" && as_dir=.
5291    for ac_exec_ext in '' $ac_executable_extensions; do
5292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295    break 2
5296  fi
5297done
5298  done
5299IFS=$as_save_IFS
5300
5301  ;;
5302esac
5303fi
5304CMP=$ac_cv_path_CMP
5305if test -n "$CMP"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5307$as_echo "$CMP" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314  test -n "$CMP" && break
5315done
5316
5317  else
5318    # The variable is set, but is it from the command line or the environment?
5319
5320    # Try to remove the string !CMP! from our list.
5321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5323      # If it failed, the variable was not from the command line. Ignore it,
5324      # but warn the user (except for BASH, which is always set by the calling BASH).
5325      if test "xCMP" != xBASH; then
5326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5327$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5328      fi
5329      # Try to locate tool using the code snippet
5330      for ac_prog in cmp
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_CMP+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $CMP in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362CMP=$ac_cv_path_CMP
5363if test -n "$CMP"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5365$as_echo "$CMP" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$CMP" && break
5373done
5374
5375    else
5376      # If it succeeded, then it was overridden by the user. We will use it
5377      # for the tool.
5378
5379      # First remove it from the list of overridden variables, so we can test
5380      # for unknown variables in the end.
5381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5382
5383      # Check if the provided tool contains a complete path.
5384      tool_specified="$CMP"
5385      tool_basename="${tool_specified##*/}"
5386      if test "x$tool_basename" = "x$tool_specified"; then
5387        # A command without a complete path is provided, search $PATH.
5388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5389$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5390        # Extract the first word of "$tool_basename", so it can be a program name with args.
5391set dummy $tool_basename; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_CMP+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $CMP in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420CMP=$ac_cv_path_CMP
5421if test -n "$CMP"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5423$as_echo "$CMP" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430        if test "x$CMP" = x; then
5431          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5432        fi
5433      else
5434        # Otherwise we believe it is a complete path. Use it as it is.
5435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5436$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5438$as_echo_n "checking for CMP... " >&6; }
5439        if test ! -x "$tool_specified"; then
5440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5441$as_echo "not found" >&6; }
5442          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5443        fi
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5445$as_echo "$tool_specified" >&6; }
5446      fi
5447    fi
5448  fi
5449
5450
5451
5452  if test "x$CMP" = x; then
5453    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5454  fi
5455
5456
5457
5458
5459
5460  # Publish this variable in the help.
5461
5462
5463  if test "x$COMM" = x; then
5464    # The variable is not set by user, try to locate tool using the code snippet
5465    for ac_prog in comm
5466do
5467  # Extract the first word of "$ac_prog", so it can be a program name with args.
5468set dummy $ac_prog; ac_word=$2
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5470$as_echo_n "checking for $ac_word... " >&6; }
5471if ${ac_cv_path_COMM+:} false; then :
5472  $as_echo_n "(cached) " >&6
5473else
5474  case $COMM in
5475  [\\/]* | ?:[\\/]*)
5476  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5477  ;;
5478  *)
5479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480for as_dir in $PATH
5481do
5482  IFS=$as_save_IFS
5483  test -z "$as_dir" && as_dir=.
5484    for ac_exec_ext in '' $ac_executable_extensions; do
5485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488    break 2
5489  fi
5490done
5491  done
5492IFS=$as_save_IFS
5493
5494  ;;
5495esac
5496fi
5497COMM=$ac_cv_path_COMM
5498if test -n "$COMM"; then
5499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5500$as_echo "$COMM" >&6; }
5501else
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503$as_echo "no" >&6; }
5504fi
5505
5506
5507  test -n "$COMM" && break
5508done
5509
5510  else
5511    # The variable is set, but is it from the command line or the environment?
5512
5513    # Try to remove the string !COMM! from our list.
5514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5516      # If it failed, the variable was not from the command line. Ignore it,
5517      # but warn the user (except for BASH, which is always set by the calling BASH).
5518      if test "xCOMM" != xBASH; then
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5520$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5521      fi
5522      # Try to locate tool using the code snippet
5523      for ac_prog in comm
5524do
5525  # Extract the first word of "$ac_prog", so it can be a program name with args.
5526set dummy $ac_prog; ac_word=$2
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528$as_echo_n "checking for $ac_word... " >&6; }
5529if ${ac_cv_path_COMM+:} false; then :
5530  $as_echo_n "(cached) " >&6
5531else
5532  case $COMM in
5533  [\\/]* | ?:[\\/]*)
5534  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5535  ;;
5536  *)
5537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH
5539do
5540  IFS=$as_save_IFS
5541  test -z "$as_dir" && as_dir=.
5542    for ac_exec_ext in '' $ac_executable_extensions; do
5543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5544    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546    break 2
5547  fi
5548done
5549  done
5550IFS=$as_save_IFS
5551
5552  ;;
5553esac
5554fi
5555COMM=$ac_cv_path_COMM
5556if test -n "$COMM"; then
5557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5558$as_echo "$COMM" >&6; }
5559else
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
5562fi
5563
5564
5565  test -n "$COMM" && break
5566done
5567
5568    else
5569      # If it succeeded, then it was overridden by the user. We will use it
5570      # for the tool.
5571
5572      # First remove it from the list of overridden variables, so we can test
5573      # for unknown variables in the end.
5574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5575
5576      # Check if the provided tool contains a complete path.
5577      tool_specified="$COMM"
5578      tool_basename="${tool_specified##*/}"
5579      if test "x$tool_basename" = "x$tool_specified"; then
5580        # A command without a complete path is provided, search $PATH.
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5583        # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_COMM+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $COMM in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613COMM=$ac_cv_path_COMM
5614if test -n "$COMM"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5616$as_echo "$COMM" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623        if test "x$COMM" = x; then
5624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625        fi
5626      else
5627        # Otherwise we believe it is a complete path. Use it as it is.
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5631$as_echo_n "checking for COMM... " >&6; }
5632        if test ! -x "$tool_specified"; then
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5636        fi
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639      fi
5640    fi
5641  fi
5642
5643
5644
5645  if test "x$COMM" = x; then
5646    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5647  fi
5648
5649
5650
5651
5652
5653  # Publish this variable in the help.
5654
5655
5656  if test "x$CP" = x; then
5657    # The variable is not set by user, try to locate tool using the code snippet
5658    for ac_prog in cp
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CP+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CP in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CP=$ac_cv_path_CP
5691if test -n "$CP"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5693$as_echo "$CP" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$CP" && break
5701done
5702
5703  else
5704    # The variable is set, but is it from the command line or the environment?
5705
5706    # Try to remove the string !CP! from our list.
5707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5709      # If it failed, the variable was not from the command line. Ignore it,
5710      # but warn the user (except for BASH, which is always set by the calling BASH).
5711      if test "xCP" != xBASH; then
5712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5713$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5714      fi
5715      # Try to locate tool using the code snippet
5716      for ac_prog in cp
5717do
5718  # Extract the first word of "$ac_prog", so it can be a program name with args.
5719set dummy $ac_prog; ac_word=$2
5720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5721$as_echo_n "checking for $ac_word... " >&6; }
5722if ${ac_cv_path_CP+:} false; then :
5723  $as_echo_n "(cached) " >&6
5724else
5725  case $CP in
5726  [\\/]* | ?:[\\/]*)
5727  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5728  ;;
5729  *)
5730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5731for as_dir in $PATH
5732do
5733  IFS=$as_save_IFS
5734  test -z "$as_dir" && as_dir=.
5735    for ac_exec_ext in '' $ac_executable_extensions; do
5736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5737    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5739    break 2
5740  fi
5741done
5742  done
5743IFS=$as_save_IFS
5744
5745  ;;
5746esac
5747fi
5748CP=$ac_cv_path_CP
5749if test -n "$CP"; then
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5751$as_echo "$CP" >&6; }
5752else
5753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5754$as_echo "no" >&6; }
5755fi
5756
5757
5758  test -n "$CP" && break
5759done
5760
5761    else
5762      # If it succeeded, then it was overridden by the user. We will use it
5763      # for the tool.
5764
5765      # First remove it from the list of overridden variables, so we can test
5766      # for unknown variables in the end.
5767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5768
5769      # Check if the provided tool contains a complete path.
5770      tool_specified="$CP"
5771      tool_basename="${tool_specified##*/}"
5772      if test "x$tool_basename" = "x$tool_specified"; then
5773        # A command without a complete path is provided, search $PATH.
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5775$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5776        # Extract the first word of "$tool_basename", so it can be a program name with args.
5777set dummy $tool_basename; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CP+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CP in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CP=$ac_cv_path_CP
5807if test -n "$CP"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5809$as_echo "$CP" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816        if test "x$CP" = x; then
5817          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5818        fi
5819      else
5820        # Otherwise we believe it is a complete path. Use it as it is.
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5822$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5824$as_echo_n "checking for CP... " >&6; }
5825        if test ! -x "$tool_specified"; then
5826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5827$as_echo "not found" >&6; }
5828          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5829        fi
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5831$as_echo "$tool_specified" >&6; }
5832      fi
5833    fi
5834  fi
5835
5836
5837
5838  if test "x$CP" = x; then
5839    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if test "x$CUT" = x; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in cut
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CUT+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CUT in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CUT=$ac_cv_path_CUT
5884if test -n "$CUT"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5886$as_echo "$CUT" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CUT" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CUT! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCUT" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in cut
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CUT+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CUT in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CUT=$ac_cv_path_CUT
5942if test -n "$CUT"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5944$as_echo "$CUT" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CUT" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if the provided tool contains a complete path.
5963      tool_specified="$CUT"
5964      tool_basename="${tool_specified##*/}"
5965      if test "x$tool_basename" = "x$tool_specified"; then
5966        # A command without a complete path is provided, search $PATH.
5967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5969        # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CUT+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CUT in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CUT=$ac_cv_path_CUT
6000if test -n "$CUT"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6002$as_echo "$CUT" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009        if test "x$CUT" = x; then
6010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011        fi
6012      else
6013        # Otherwise we believe it is a complete path. Use it as it is.
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6017$as_echo_n "checking for CUT... " >&6; }
6018        if test ! -x "$tool_specified"; then
6019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6022        fi
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025      fi
6026    fi
6027  fi
6028
6029
6030
6031  if test "x$CUT" = x; then
6032    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6033  fi
6034
6035
6036
6037
6038
6039  # Publish this variable in the help.
6040
6041
6042  if test "x$DATE" = x; then
6043    # The variable is not set by user, try to locate tool using the code snippet
6044    for ac_prog in date
6045do
6046  # Extract the first word of "$ac_prog", so it can be a program name with args.
6047set dummy $ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_path_DATE+:} false; then :
6051  $as_echo_n "(cached) " >&6
6052else
6053  case $DATE in
6054  [\\/]* | ?:[\\/]*)
6055  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6056  ;;
6057  *)
6058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061  IFS=$as_save_IFS
6062  test -z "$as_dir" && as_dir=.
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067    break 2
6068  fi
6069done
6070  done
6071IFS=$as_save_IFS
6072
6073  ;;
6074esac
6075fi
6076DATE=$ac_cv_path_DATE
6077if test -n "$DATE"; then
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6079$as_echo "$DATE" >&6; }
6080else
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086  test -n "$DATE" && break
6087done
6088
6089  else
6090    # The variable is set, but is it from the command line or the environment?
6091
6092    # Try to remove the string !DATE! from our list.
6093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6095      # If it failed, the variable was not from the command line. Ignore it,
6096      # but warn the user (except for BASH, which is always set by the calling BASH).
6097      if test "xDATE" != xBASH; then
6098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6099$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6100      fi
6101      # Try to locate tool using the code snippet
6102      for ac_prog in date
6103do
6104  # Extract the first word of "$ac_prog", so it can be a program name with args.
6105set dummy $ac_prog; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_path_DATE+:} false; then :
6109  $as_echo_n "(cached) " >&6
6110else
6111  case $DATE in
6112  [\\/]* | ?:[\\/]*)
6113  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6114  ;;
6115  *)
6116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH
6118do
6119  IFS=$as_save_IFS
6120  test -z "$as_dir" && as_dir=.
6121    for ac_exec_ext in '' $ac_executable_extensions; do
6122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125    break 2
6126  fi
6127done
6128  done
6129IFS=$as_save_IFS
6130
6131  ;;
6132esac
6133fi
6134DATE=$ac_cv_path_DATE
6135if test -n "$DATE"; then
6136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6137$as_echo "$DATE" >&6; }
6138else
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140$as_echo "no" >&6; }
6141fi
6142
6143
6144  test -n "$DATE" && break
6145done
6146
6147    else
6148      # If it succeeded, then it was overridden by the user. We will use it
6149      # for the tool.
6150
6151      # First remove it from the list of overridden variables, so we can test
6152      # for unknown variables in the end.
6153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6154
6155      # Check if the provided tool contains a complete path.
6156      tool_specified="$DATE"
6157      tool_basename="${tool_specified##*/}"
6158      if test "x$tool_basename" = "x$tool_specified"; then
6159        # A command without a complete path is provided, search $PATH.
6160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6161$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6162        # Extract the first word of "$tool_basename", so it can be a program name with args.
6163set dummy $tool_basename; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_path_DATE+:} false; then :
6167  $as_echo_n "(cached) " >&6
6168else
6169  case $DATE in
6170  [\\/]* | ?:[\\/]*)
6171  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6172  ;;
6173  *)
6174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175for as_dir in $PATH
6176do
6177  IFS=$as_save_IFS
6178  test -z "$as_dir" && as_dir=.
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183    break 2
6184  fi
6185done
6186  done
6187IFS=$as_save_IFS
6188
6189  ;;
6190esac
6191fi
6192DATE=$ac_cv_path_DATE
6193if test -n "$DATE"; then
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6195$as_echo "$DATE" >&6; }
6196else
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199fi
6200
6201
6202        if test "x$DATE" = x; then
6203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6204        fi
6205      else
6206        # Otherwise we believe it is a complete path. Use it as it is.
6207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6208$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6210$as_echo_n "checking for DATE... " >&6; }
6211        if test ! -x "$tool_specified"; then
6212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6213$as_echo "not found" >&6; }
6214          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6215        fi
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6217$as_echo "$tool_specified" >&6; }
6218      fi
6219    fi
6220  fi
6221
6222
6223
6224  if test "x$DATE" = x; then
6225    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if test "x$DIFF" = x; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in gdiff diff
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_DIFF+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $DIFF in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269DIFF=$ac_cv_path_DIFF
6270if test -n "$DIFF"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6272$as_echo "$DIFF" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$DIFF" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !DIFF! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xDIFF" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in gdiff diff
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_DIFF+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $DIFF in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327DIFF=$ac_cv_path_DIFF
6328if test -n "$DIFF"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6330$as_echo "$DIFF" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$DIFF" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if the provided tool contains a complete path.
6349      tool_specified="$DIFF"
6350      tool_basename="${tool_specified##*/}"
6351      if test "x$tool_basename" = "x$tool_specified"; then
6352        # A command without a complete path is provided, search $PATH.
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6354$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6355        # Extract the first word of "$tool_basename", so it can be a program name with args.
6356set dummy $tool_basename; ac_word=$2
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6358$as_echo_n "checking for $ac_word... " >&6; }
6359if ${ac_cv_path_DIFF+:} false; then :
6360  $as_echo_n "(cached) " >&6
6361else
6362  case $DIFF in
6363  [\\/]* | ?:[\\/]*)
6364  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6365  ;;
6366  *)
6367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370  IFS=$as_save_IFS
6371  test -z "$as_dir" && as_dir=.
6372    for ac_exec_ext in '' $ac_executable_extensions; do
6373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6374    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376    break 2
6377  fi
6378done
6379  done
6380IFS=$as_save_IFS
6381
6382  ;;
6383esac
6384fi
6385DIFF=$ac_cv_path_DIFF
6386if test -n "$DIFF"; then
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6388$as_echo "$DIFF" >&6; }
6389else
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395        if test "x$DIFF" = x; then
6396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6397        fi
6398      else
6399        # Otherwise we believe it is a complete path. Use it as it is.
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6401$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6403$as_echo_n "checking for DIFF... " >&6; }
6404        if test ! -x "$tool_specified"; then
6405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6406$as_echo "not found" >&6; }
6407          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6408        fi
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6410$as_echo "$tool_specified" >&6; }
6411      fi
6412    fi
6413  fi
6414
6415
6416
6417  if test "x$DIFF" = x; then
6418    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6419  fi
6420
6421
6422
6423
6424
6425  # Publish this variable in the help.
6426
6427
6428  if test "x$DIRNAME" = x; then
6429    # The variable is not set by user, try to locate tool using the code snippet
6430    for ac_prog in dirname
6431do
6432  # Extract the first word of "$ac_prog", so it can be a program name with args.
6433set dummy $ac_prog; ac_word=$2
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435$as_echo_n "checking for $ac_word... " >&6; }
6436if ${ac_cv_path_DIRNAME+:} false; then :
6437  $as_echo_n "(cached) " >&6
6438else
6439  case $DIRNAME in
6440  [\\/]* | ?:[\\/]*)
6441  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6442  ;;
6443  *)
6444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445for as_dir in $PATH
6446do
6447  IFS=$as_save_IFS
6448  test -z "$as_dir" && as_dir=.
6449    for ac_exec_ext in '' $ac_executable_extensions; do
6450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6451    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6453    break 2
6454  fi
6455done
6456  done
6457IFS=$as_save_IFS
6458
6459  ;;
6460esac
6461fi
6462DIRNAME=$ac_cv_path_DIRNAME
6463if test -n "$DIRNAME"; then
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6465$as_echo "$DIRNAME" >&6; }
6466else
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
6471
6472  test -n "$DIRNAME" && break
6473done
6474
6475  else
6476    # The variable is set, but is it from the command line or the environment?
6477
6478    # Try to remove the string !DIRNAME! from our list.
6479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6481      # If it failed, the variable was not from the command line. Ignore it,
6482      # but warn the user (except for BASH, which is always set by the calling BASH).
6483      if test "xDIRNAME" != xBASH; then
6484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6485$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6486      fi
6487      # Try to locate tool using the code snippet
6488      for ac_prog in dirname
6489do
6490  # Extract the first word of "$ac_prog", so it can be a program name with args.
6491set dummy $ac_prog; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_path_DIRNAME+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  case $DIRNAME in
6498  [\\/]* | ?:[\\/]*)
6499  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6500  ;;
6501  *)
6502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503for as_dir in $PATH
6504do
6505  IFS=$as_save_IFS
6506  test -z "$as_dir" && as_dir=.
6507    for ac_exec_ext in '' $ac_executable_extensions; do
6508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511    break 2
6512  fi
6513done
6514  done
6515IFS=$as_save_IFS
6516
6517  ;;
6518esac
6519fi
6520DIRNAME=$ac_cv_path_DIRNAME
6521if test -n "$DIRNAME"; then
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6523$as_echo "$DIRNAME" >&6; }
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529
6530  test -n "$DIRNAME" && break
6531done
6532
6533    else
6534      # If it succeeded, then it was overridden by the user. We will use it
6535      # for the tool.
6536
6537      # First remove it from the list of overridden variables, so we can test
6538      # for unknown variables in the end.
6539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6540
6541      # Check if the provided tool contains a complete path.
6542      tool_specified="$DIRNAME"
6543      tool_basename="${tool_specified##*/}"
6544      if test "x$tool_basename" = "x$tool_specified"; then
6545        # A command without a complete path is provided, search $PATH.
6546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6547$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6548        # Extract the first word of "$tool_basename", so it can be a program name with args.
6549set dummy $tool_basename; ac_word=$2
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_DIRNAME+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  case $DIRNAME in
6556  [\\/]* | ?:[\\/]*)
6557  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6558  ;;
6559  *)
6560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563  IFS=$as_save_IFS
6564  test -z "$as_dir" && as_dir=.
6565    for ac_exec_ext in '' $ac_executable_extensions; do
6566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569    break 2
6570  fi
6571done
6572  done
6573IFS=$as_save_IFS
6574
6575  ;;
6576esac
6577fi
6578DIRNAME=$ac_cv_path_DIRNAME
6579if test -n "$DIRNAME"; then
6580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6581$as_echo "$DIRNAME" >&6; }
6582else
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
6588        if test "x$DIRNAME" = x; then
6589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6590        fi
6591      else
6592        # Otherwise we believe it is a complete path. Use it as it is.
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6594$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6596$as_echo_n "checking for DIRNAME... " >&6; }
6597        if test ! -x "$tool_specified"; then
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6599$as_echo "not found" >&6; }
6600          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6601        fi
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6603$as_echo "$tool_specified" >&6; }
6604      fi
6605    fi
6606  fi
6607
6608
6609
6610  if test "x$DIRNAME" = x; then
6611    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6612  fi
6613
6614
6615
6616
6617
6618  # Publish this variable in the help.
6619
6620
6621  if test "x$ECHO" = x; then
6622    # The variable is not set by user, try to locate tool using the code snippet
6623    for ac_prog in echo
6624do
6625  # Extract the first word of "$ac_prog", so it can be a program name with args.
6626set dummy $ac_prog; ac_word=$2
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if ${ac_cv_path_ECHO+:} false; then :
6630  $as_echo_n "(cached) " >&6
6631else
6632  case $ECHO in
6633  [\\/]* | ?:[\\/]*)
6634  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6635  ;;
6636  *)
6637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638for as_dir in $PATH
6639do
6640  IFS=$as_save_IFS
6641  test -z "$as_dir" && as_dir=.
6642    for ac_exec_ext in '' $ac_executable_extensions; do
6643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646    break 2
6647  fi
6648done
6649  done
6650IFS=$as_save_IFS
6651
6652  ;;
6653esac
6654fi
6655ECHO=$ac_cv_path_ECHO
6656if test -n "$ECHO"; then
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6658$as_echo "$ECHO" >&6; }
6659else
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661$as_echo "no" >&6; }
6662fi
6663
6664
6665  test -n "$ECHO" && break
6666done
6667
6668  else
6669    # The variable is set, but is it from the command line or the environment?
6670
6671    # Try to remove the string !ECHO! from our list.
6672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6674      # If it failed, the variable was not from the command line. Ignore it,
6675      # but warn the user (except for BASH, which is always set by the calling BASH).
6676      if test "xECHO" != xBASH; then
6677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6678$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6679      fi
6680      # Try to locate tool using the code snippet
6681      for ac_prog in echo
6682do
6683  # Extract the first word of "$ac_prog", so it can be a program name with args.
6684set dummy $ac_prog; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_ECHO+:} false; then :
6688  $as_echo_n "(cached) " >&6
6689else
6690  case $ECHO in
6691  [\\/]* | ?:[\\/]*)
6692  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6693  ;;
6694  *)
6695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in $PATH
6697do
6698  IFS=$as_save_IFS
6699  test -z "$as_dir" && as_dir=.
6700    for ac_exec_ext in '' $ac_executable_extensions; do
6701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704    break 2
6705  fi
6706done
6707  done
6708IFS=$as_save_IFS
6709
6710  ;;
6711esac
6712fi
6713ECHO=$ac_cv_path_ECHO
6714if test -n "$ECHO"; then
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6716$as_echo "$ECHO" >&6; }
6717else
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
6723  test -n "$ECHO" && break
6724done
6725
6726    else
6727      # If it succeeded, then it was overridden by the user. We will use it
6728      # for the tool.
6729
6730      # First remove it from the list of overridden variables, so we can test
6731      # for unknown variables in the end.
6732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6733
6734      # Check if the provided tool contains a complete path.
6735      tool_specified="$ECHO"
6736      tool_basename="${tool_specified##*/}"
6737      if test "x$tool_basename" = "x$tool_specified"; then
6738        # A command without a complete path is provided, search $PATH.
6739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6740$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6741        # Extract the first word of "$tool_basename", so it can be a program name with args.
6742set dummy $tool_basename; ac_word=$2
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744$as_echo_n "checking for $ac_word... " >&6; }
6745if ${ac_cv_path_ECHO+:} false; then :
6746  $as_echo_n "(cached) " >&6
6747else
6748  case $ECHO in
6749  [\\/]* | ?:[\\/]*)
6750  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6751  ;;
6752  *)
6753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754for as_dir in $PATH
6755do
6756  IFS=$as_save_IFS
6757  test -z "$as_dir" && as_dir=.
6758    for ac_exec_ext in '' $ac_executable_extensions; do
6759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762    break 2
6763  fi
6764done
6765  done
6766IFS=$as_save_IFS
6767
6768  ;;
6769esac
6770fi
6771ECHO=$ac_cv_path_ECHO
6772if test -n "$ECHO"; then
6773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6774$as_echo "$ECHO" >&6; }
6775else
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
6780
6781        if test "x$ECHO" = x; then
6782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783        fi
6784      else
6785        # Otherwise we believe it is a complete path. Use it as it is.
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6787$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6789$as_echo_n "checking for ECHO... " >&6; }
6790        if test ! -x "$tool_specified"; then
6791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792$as_echo "not found" >&6; }
6793          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6794        fi
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796$as_echo "$tool_specified" >&6; }
6797      fi
6798    fi
6799  fi
6800
6801
6802
6803  if test "x$ECHO" = x; then
6804    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6805  fi
6806
6807
6808
6809
6810
6811  # Publish this variable in the help.
6812
6813
6814  if test "x$EXPR" = x; then
6815    # The variable is not set by user, try to locate tool using the code snippet
6816    for ac_prog in expr
6817do
6818  # Extract the first word of "$ac_prog", so it can be a program name with args.
6819set dummy $ac_prog; ac_word=$2
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821$as_echo_n "checking for $ac_word... " >&6; }
6822if ${ac_cv_path_EXPR+:} false; then :
6823  $as_echo_n "(cached) " >&6
6824else
6825  case $EXPR in
6826  [\\/]* | ?:[\\/]*)
6827  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6828  ;;
6829  *)
6830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831for as_dir in $PATH
6832do
6833  IFS=$as_save_IFS
6834  test -z "$as_dir" && as_dir=.
6835    for ac_exec_ext in '' $ac_executable_extensions; do
6836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6839    break 2
6840  fi
6841done
6842  done
6843IFS=$as_save_IFS
6844
6845  ;;
6846esac
6847fi
6848EXPR=$ac_cv_path_EXPR
6849if test -n "$EXPR"; then
6850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6851$as_echo "$EXPR" >&6; }
6852else
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
6855fi
6856
6857
6858  test -n "$EXPR" && break
6859done
6860
6861  else
6862    # The variable is set, but is it from the command line or the environment?
6863
6864    # Try to remove the string !EXPR! from our list.
6865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6867      # If it failed, the variable was not from the command line. Ignore it,
6868      # but warn the user (except for BASH, which is always set by the calling BASH).
6869      if test "xEXPR" != xBASH; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6871$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6872      fi
6873      # Try to locate tool using the code snippet
6874      for ac_prog in expr
6875do
6876  # Extract the first word of "$ac_prog", so it can be a program name with args.
6877set dummy $ac_prog; ac_word=$2
6878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6879$as_echo_n "checking for $ac_word... " >&6; }
6880if ${ac_cv_path_EXPR+:} false; then :
6881  $as_echo_n "(cached) " >&6
6882else
6883  case $EXPR in
6884  [\\/]* | ?:[\\/]*)
6885  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6886  ;;
6887  *)
6888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6889for as_dir in $PATH
6890do
6891  IFS=$as_save_IFS
6892  test -z "$as_dir" && as_dir=.
6893    for ac_exec_ext in '' $ac_executable_extensions; do
6894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6895    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6897    break 2
6898  fi
6899done
6900  done
6901IFS=$as_save_IFS
6902
6903  ;;
6904esac
6905fi
6906EXPR=$ac_cv_path_EXPR
6907if test -n "$EXPR"; then
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6909$as_echo "$EXPR" >&6; }
6910else
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6912$as_echo "no" >&6; }
6913fi
6914
6915
6916  test -n "$EXPR" && break
6917done
6918
6919    else
6920      # If it succeeded, then it was overridden by the user. We will use it
6921      # for the tool.
6922
6923      # First remove it from the list of overridden variables, so we can test
6924      # for unknown variables in the end.
6925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6926
6927      # Check if the provided tool contains a complete path.
6928      tool_specified="$EXPR"
6929      tool_basename="${tool_specified##*/}"
6930      if test "x$tool_basename" = "x$tool_specified"; then
6931        # A command without a complete path is provided, search $PATH.
6932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6933$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6934        # Extract the first word of "$tool_basename", so it can be a program name with args.
6935set dummy $tool_basename; ac_word=$2
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937$as_echo_n "checking for $ac_word... " >&6; }
6938if ${ac_cv_path_EXPR+:} false; then :
6939  $as_echo_n "(cached) " >&6
6940else
6941  case $EXPR in
6942  [\\/]* | ?:[\\/]*)
6943  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6944  ;;
6945  *)
6946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6947for as_dir in $PATH
6948do
6949  IFS=$as_save_IFS
6950  test -z "$as_dir" && as_dir=.
6951    for ac_exec_ext in '' $ac_executable_extensions; do
6952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6955    break 2
6956  fi
6957done
6958  done
6959IFS=$as_save_IFS
6960
6961  ;;
6962esac
6963fi
6964EXPR=$ac_cv_path_EXPR
6965if test -n "$EXPR"; then
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6967$as_echo "$EXPR" >&6; }
6968else
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6970$as_echo "no" >&6; }
6971fi
6972
6973
6974        if test "x$EXPR" = x; then
6975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6976        fi
6977      else
6978        # Otherwise we believe it is a complete path. Use it as it is.
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6980$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6982$as_echo_n "checking for EXPR... " >&6; }
6983        if test ! -x "$tool_specified"; then
6984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6985$as_echo "not found" >&6; }
6986          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6987        fi
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6989$as_echo "$tool_specified" >&6; }
6990      fi
6991    fi
6992  fi
6993
6994
6995
6996  if test "x$EXPR" = x; then
6997    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6998  fi
6999
7000
7001
7002
7003
7004  # Publish this variable in the help.
7005
7006
7007  if test "x$FILE" = x; then
7008    # The variable is not set by user, try to locate tool using the code snippet
7009    for ac_prog in file
7010do
7011  # Extract the first word of "$ac_prog", so it can be a program name with args.
7012set dummy $ac_prog; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_FILE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $FILE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041FILE=$ac_cv_path_FILE
7042if test -n "$FILE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7044$as_echo "$FILE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051  test -n "$FILE" && break
7052done
7053
7054  else
7055    # The variable is set, but is it from the command line or the environment?
7056
7057    # Try to remove the string !FILE! from our list.
7058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7060      # If it failed, the variable was not from the command line. Ignore it,
7061      # but warn the user (except for BASH, which is always set by the calling BASH).
7062      if test "xFILE" != xBASH; then
7063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7064$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7065      fi
7066      # Try to locate tool using the code snippet
7067      for ac_prog in file
7068do
7069  # Extract the first word of "$ac_prog", so it can be a program name with args.
7070set dummy $ac_prog; ac_word=$2
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7072$as_echo_n "checking for $ac_word... " >&6; }
7073if ${ac_cv_path_FILE+:} false; then :
7074  $as_echo_n "(cached) " >&6
7075else
7076  case $FILE in
7077  [\\/]* | ?:[\\/]*)
7078  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7079  ;;
7080  *)
7081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082for as_dir in $PATH
7083do
7084  IFS=$as_save_IFS
7085  test -z "$as_dir" && as_dir=.
7086    for ac_exec_ext in '' $ac_executable_extensions; do
7087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7088    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7090    break 2
7091  fi
7092done
7093  done
7094IFS=$as_save_IFS
7095
7096  ;;
7097esac
7098fi
7099FILE=$ac_cv_path_FILE
7100if test -n "$FILE"; then
7101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7102$as_echo "$FILE" >&6; }
7103else
7104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105$as_echo "no" >&6; }
7106fi
7107
7108
7109  test -n "$FILE" && break
7110done
7111
7112    else
7113      # If it succeeded, then it was overridden by the user. We will use it
7114      # for the tool.
7115
7116      # First remove it from the list of overridden variables, so we can test
7117      # for unknown variables in the end.
7118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7119
7120      # Check if the provided tool contains a complete path.
7121      tool_specified="$FILE"
7122      tool_basename="${tool_specified##*/}"
7123      if test "x$tool_basename" = "x$tool_specified"; then
7124        # A command without a complete path is provided, search $PATH.
7125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7127        # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_FILE+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $FILE in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157FILE=$ac_cv_path_FILE
7158if test -n "$FILE"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7160$as_echo "$FILE" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167        if test "x$FILE" = x; then
7168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169        fi
7170      else
7171        # Otherwise we believe it is a complete path. Use it as it is.
7172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7175$as_echo_n "checking for FILE... " >&6; }
7176        if test ! -x "$tool_specified"; then
7177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7180        fi
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183      fi
7184    fi
7185  fi
7186
7187
7188
7189  if test "x$FILE" = x; then
7190    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if test "x$FIND" = x; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in find
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_FIND+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $FIND in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234FIND=$ac_cv_path_FIND
7235if test -n "$FIND"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7237$as_echo "$FIND" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$FIND" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !FIND! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xFIND" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in find
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_FIND+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $FIND in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292FIND=$ac_cv_path_FIND
7293if test -n "$FIND"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7295$as_echo "$FIND" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$FIND" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if the provided tool contains a complete path.
7314      tool_specified="$FIND"
7315      tool_basename="${tool_specified##*/}"
7316      if test "x$tool_basename" = "x$tool_specified"; then
7317        # A command without a complete path is provided, search $PATH.
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7319$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7320        # Extract the first word of "$tool_basename", so it can be a program name with args.
7321set dummy $tool_basename; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_FIND+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $FIND in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350FIND=$ac_cv_path_FIND
7351if test -n "$FIND"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7353$as_echo "$FIND" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360        if test "x$FIND" = x; then
7361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7362        fi
7363      else
7364        # Otherwise we believe it is a complete path. Use it as it is.
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7366$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7368$as_echo_n "checking for FIND... " >&6; }
7369        if test ! -x "$tool_specified"; then
7370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7371$as_echo "not found" >&6; }
7372          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7373        fi
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7375$as_echo "$tool_specified" >&6; }
7376      fi
7377    fi
7378  fi
7379
7380
7381
7382  if test "x$FIND" = x; then
7383    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if test "x$HEAD" = x; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in head
7396do
7397  # Extract the first word of "$ac_prog", so it can be a program name with args.
7398set dummy $ac_prog; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_HEAD+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $HEAD in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427HEAD=$ac_cv_path_HEAD
7428if test -n "$HEAD"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7430$as_echo "$HEAD" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$HEAD" && break
7438done
7439
7440  else
7441    # The variable is set, but is it from the command line or the environment?
7442
7443    # Try to remove the string !HEAD! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446      # If it failed, the variable was not from the command line. Ignore it,
7447      # but warn the user (except for BASH, which is always set by the calling BASH).
7448      if test "xHEAD" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7451      fi
7452      # Try to locate tool using the code snippet
7453      for ac_prog in head
7454do
7455  # Extract the first word of "$ac_prog", so it can be a program name with args.
7456set dummy $ac_prog; ac_word=$2
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458$as_echo_n "checking for $ac_word... " >&6; }
7459if ${ac_cv_path_HEAD+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $HEAD in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7465  ;;
7466  *)
7467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468for as_dir in $PATH
7469do
7470  IFS=$as_save_IFS
7471  test -z "$as_dir" && as_dir=.
7472    for ac_exec_ext in '' $ac_executable_extensions; do
7473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476    break 2
7477  fi
7478done
7479  done
7480IFS=$as_save_IFS
7481
7482  ;;
7483esac
7484fi
7485HEAD=$ac_cv_path_HEAD
7486if test -n "$HEAD"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7488$as_echo "$HEAD" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$HEAD" && break
7496done
7497
7498    else
7499      # If it succeeded, then it was overridden by the user. We will use it
7500      # for the tool.
7501
7502      # First remove it from the list of overridden variables, so we can test
7503      # for unknown variables in the end.
7504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506      # Check if the provided tool contains a complete path.
7507      tool_specified="$HEAD"
7508      tool_basename="${tool_specified##*/}"
7509      if test "x$tool_basename" = "x$tool_specified"; then
7510        # A command without a complete path is provided, search $PATH.
7511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7512$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7513        # Extract the first word of "$tool_basename", so it can be a program name with args.
7514set dummy $tool_basename; ac_word=$2
7515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516$as_echo_n "checking for $ac_word... " >&6; }
7517if ${ac_cv_path_HEAD+:} false; then :
7518  $as_echo_n "(cached) " >&6
7519else
7520  case $HEAD in
7521  [\\/]* | ?:[\\/]*)
7522  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7523  ;;
7524  *)
7525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526for as_dir in $PATH
7527do
7528  IFS=$as_save_IFS
7529  test -z "$as_dir" && as_dir=.
7530    for ac_exec_ext in '' $ac_executable_extensions; do
7531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534    break 2
7535  fi
7536done
7537  done
7538IFS=$as_save_IFS
7539
7540  ;;
7541esac
7542fi
7543HEAD=$ac_cv_path_HEAD
7544if test -n "$HEAD"; then
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7546$as_echo "$HEAD" >&6; }
7547else
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549$as_echo "no" >&6; }
7550fi
7551
7552
7553        if test "x$HEAD" = x; then
7554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7555        fi
7556      else
7557        # Otherwise we believe it is a complete path. Use it as it is.
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7559$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7561$as_echo_n "checking for HEAD... " >&6; }
7562        if test ! -x "$tool_specified"; then
7563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7564$as_echo "not found" >&6; }
7565          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7566        fi
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7568$as_echo "$tool_specified" >&6; }
7569      fi
7570    fi
7571  fi
7572
7573
7574
7575  if test "x$HEAD" = x; then
7576    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7577  fi
7578
7579
7580
7581
7582
7583  # Publish this variable in the help.
7584
7585
7586  if test "x$LN" = x; then
7587    # The variable is not set by user, try to locate tool using the code snippet
7588    for ac_prog in ln
7589do
7590  # Extract the first word of "$ac_prog", so it can be a program name with args.
7591set dummy $ac_prog; ac_word=$2
7592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593$as_echo_n "checking for $ac_word... " >&6; }
7594if ${ac_cv_path_LN+:} false; then :
7595  $as_echo_n "(cached) " >&6
7596else
7597  case $LN in
7598  [\\/]* | ?:[\\/]*)
7599  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7600  ;;
7601  *)
7602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605  IFS=$as_save_IFS
7606  test -z "$as_dir" && as_dir=.
7607    for ac_exec_ext in '' $ac_executable_extensions; do
7608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611    break 2
7612  fi
7613done
7614  done
7615IFS=$as_save_IFS
7616
7617  ;;
7618esac
7619fi
7620LN=$ac_cv_path_LN
7621if test -n "$LN"; then
7622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7623$as_echo "$LN" >&6; }
7624else
7625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626$as_echo "no" >&6; }
7627fi
7628
7629
7630  test -n "$LN" && break
7631done
7632
7633  else
7634    # The variable is set, but is it from the command line or the environment?
7635
7636    # Try to remove the string !LN! from our list.
7637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7639      # If it failed, the variable was not from the command line. Ignore it,
7640      # but warn the user (except for BASH, which is always set by the calling BASH).
7641      if test "xLN" != xBASH; then
7642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7643$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7644      fi
7645      # Try to locate tool using the code snippet
7646      for ac_prog in ln
7647do
7648  # Extract the first word of "$ac_prog", so it can be a program name with args.
7649set dummy $ac_prog; ac_word=$2
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651$as_echo_n "checking for $ac_word... " >&6; }
7652if ${ac_cv_path_LN+:} false; then :
7653  $as_echo_n "(cached) " >&6
7654else
7655  case $LN in
7656  [\\/]* | ?:[\\/]*)
7657  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7658  ;;
7659  *)
7660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663  IFS=$as_save_IFS
7664  test -z "$as_dir" && as_dir=.
7665    for ac_exec_ext in '' $ac_executable_extensions; do
7666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669    break 2
7670  fi
7671done
7672  done
7673IFS=$as_save_IFS
7674
7675  ;;
7676esac
7677fi
7678LN=$ac_cv_path_LN
7679if test -n "$LN"; then
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7681$as_echo "$LN" >&6; }
7682else
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
7685fi
7686
7687
7688  test -n "$LN" && break
7689done
7690
7691    else
7692      # If it succeeded, then it was overridden by the user. We will use it
7693      # for the tool.
7694
7695      # First remove it from the list of overridden variables, so we can test
7696      # for unknown variables in the end.
7697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7698
7699      # Check if the provided tool contains a complete path.
7700      tool_specified="$LN"
7701      tool_basename="${tool_specified##*/}"
7702      if test "x$tool_basename" = "x$tool_specified"; then
7703        # A command without a complete path is provided, search $PATH.
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7705$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7706        # Extract the first word of "$tool_basename", so it can be a program name with args.
7707set dummy $tool_basename; ac_word=$2
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709$as_echo_n "checking for $ac_word... " >&6; }
7710if ${ac_cv_path_LN+:} false; then :
7711  $as_echo_n "(cached) " >&6
7712else
7713  case $LN in
7714  [\\/]* | ?:[\\/]*)
7715  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7716  ;;
7717  *)
7718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719for as_dir in $PATH
7720do
7721  IFS=$as_save_IFS
7722  test -z "$as_dir" && as_dir=.
7723    for ac_exec_ext in '' $ac_executable_extensions; do
7724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7725    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727    break 2
7728  fi
7729done
7730  done
7731IFS=$as_save_IFS
7732
7733  ;;
7734esac
7735fi
7736LN=$ac_cv_path_LN
7737if test -n "$LN"; then
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7739$as_echo "$LN" >&6; }
7740else
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
7743fi
7744
7745
7746        if test "x$LN" = x; then
7747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7748        fi
7749      else
7750        # Otherwise we believe it is a complete path. Use it as it is.
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7752$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7754$as_echo_n "checking for LN... " >&6; }
7755        if test ! -x "$tool_specified"; then
7756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7757$as_echo "not found" >&6; }
7758          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7759        fi
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7761$as_echo "$tool_specified" >&6; }
7762      fi
7763    fi
7764  fi
7765
7766
7767
7768  if test "x$LN" = x; then
7769    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7770  fi
7771
7772
7773
7774
7775
7776  # Publish this variable in the help.
7777
7778
7779  if test "x$LS" = x; then
7780    # The variable is not set by user, try to locate tool using the code snippet
7781    for ac_prog in ls
7782do
7783  # Extract the first word of "$ac_prog", so it can be a program name with args.
7784set dummy $ac_prog; ac_word=$2
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7786$as_echo_n "checking for $ac_word... " >&6; }
7787if ${ac_cv_path_LS+:} false; then :
7788  $as_echo_n "(cached) " >&6
7789else
7790  case $LS in
7791  [\\/]* | ?:[\\/]*)
7792  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7793  ;;
7794  *)
7795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798  IFS=$as_save_IFS
7799  test -z "$as_dir" && as_dir=.
7800    for ac_exec_ext in '' $ac_executable_extensions; do
7801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7802    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7804    break 2
7805  fi
7806done
7807  done
7808IFS=$as_save_IFS
7809
7810  ;;
7811esac
7812fi
7813LS=$ac_cv_path_LS
7814if test -n "$LS"; then
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7816$as_echo "$LS" >&6; }
7817else
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819$as_echo "no" >&6; }
7820fi
7821
7822
7823  test -n "$LS" && break
7824done
7825
7826  else
7827    # The variable is set, but is it from the command line or the environment?
7828
7829    # Try to remove the string !LS! from our list.
7830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7832      # If it failed, the variable was not from the command line. Ignore it,
7833      # but warn the user (except for BASH, which is always set by the calling BASH).
7834      if test "xLS" != xBASH; then
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7836$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7837      fi
7838      # Try to locate tool using the code snippet
7839      for ac_prog in ls
7840do
7841  # Extract the first word of "$ac_prog", so it can be a program name with args.
7842set dummy $ac_prog; ac_word=$2
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7844$as_echo_n "checking for $ac_word... " >&6; }
7845if ${ac_cv_path_LS+:} false; then :
7846  $as_echo_n "(cached) " >&6
7847else
7848  case $LS in
7849  [\\/]* | ?:[\\/]*)
7850  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7851  ;;
7852  *)
7853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856  IFS=$as_save_IFS
7857  test -z "$as_dir" && as_dir=.
7858    for ac_exec_ext in '' $ac_executable_extensions; do
7859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862    break 2
7863  fi
7864done
7865  done
7866IFS=$as_save_IFS
7867
7868  ;;
7869esac
7870fi
7871LS=$ac_cv_path_LS
7872if test -n "$LS"; then
7873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7874$as_echo "$LS" >&6; }
7875else
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877$as_echo "no" >&6; }
7878fi
7879
7880
7881  test -n "$LS" && break
7882done
7883
7884    else
7885      # If it succeeded, then it was overridden by the user. We will use it
7886      # for the tool.
7887
7888      # First remove it from the list of overridden variables, so we can test
7889      # for unknown variables in the end.
7890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7891
7892      # Check if the provided tool contains a complete path.
7893      tool_specified="$LS"
7894      tool_basename="${tool_specified##*/}"
7895      if test "x$tool_basename" = "x$tool_specified"; then
7896        # A command without a complete path is provided, search $PATH.
7897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7898$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7899        # Extract the first word of "$tool_basename", so it can be a program name with args.
7900set dummy $tool_basename; ac_word=$2
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902$as_echo_n "checking for $ac_word... " >&6; }
7903if ${ac_cv_path_LS+:} false; then :
7904  $as_echo_n "(cached) " >&6
7905else
7906  case $LS in
7907  [\\/]* | ?:[\\/]*)
7908  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7909  ;;
7910  *)
7911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912for as_dir in $PATH
7913do
7914  IFS=$as_save_IFS
7915  test -z "$as_dir" && as_dir=.
7916    for ac_exec_ext in '' $ac_executable_extensions; do
7917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920    break 2
7921  fi
7922done
7923  done
7924IFS=$as_save_IFS
7925
7926  ;;
7927esac
7928fi
7929LS=$ac_cv_path_LS
7930if test -n "$LS"; then
7931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7932$as_echo "$LS" >&6; }
7933else
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935$as_echo "no" >&6; }
7936fi
7937
7938
7939        if test "x$LS" = x; then
7940          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7941        fi
7942      else
7943        # Otherwise we believe it is a complete path. Use it as it is.
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7945$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7947$as_echo_n "checking for LS... " >&6; }
7948        if test ! -x "$tool_specified"; then
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7950$as_echo "not found" >&6; }
7951          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7952        fi
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7954$as_echo "$tool_specified" >&6; }
7955      fi
7956    fi
7957  fi
7958
7959
7960
7961  if test "x$LS" = x; then
7962    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7963  fi
7964
7965
7966
7967
7968
7969  # Publish this variable in the help.
7970
7971
7972  if test "x$MKDIR" = x; then
7973    # The variable is not set by user, try to locate tool using the code snippet
7974    for ac_prog in mkdir
7975do
7976  # Extract the first word of "$ac_prog", so it can be a program name with args.
7977set dummy $ac_prog; ac_word=$2
7978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7979$as_echo_n "checking for $ac_word... " >&6; }
7980if ${ac_cv_path_MKDIR+:} false; then :
7981  $as_echo_n "(cached) " >&6
7982else
7983  case $MKDIR in
7984  [\\/]* | ?:[\\/]*)
7985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7986  ;;
7987  *)
7988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989for as_dir in $PATH
7990do
7991  IFS=$as_save_IFS
7992  test -z "$as_dir" && as_dir=.
7993    for ac_exec_ext in '' $ac_executable_extensions; do
7994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7997    break 2
7998  fi
7999done
8000  done
8001IFS=$as_save_IFS
8002
8003  ;;
8004esac
8005fi
8006MKDIR=$ac_cv_path_MKDIR
8007if test -n "$MKDIR"; then
8008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8009$as_echo "$MKDIR" >&6; }
8010else
8011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8012$as_echo "no" >&6; }
8013fi
8014
8015
8016  test -n "$MKDIR" && break
8017done
8018
8019  else
8020    # The variable is set, but is it from the command line or the environment?
8021
8022    # Try to remove the string !MKDIR! from our list.
8023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8025      # If it failed, the variable was not from the command line. Ignore it,
8026      # but warn the user (except for BASH, which is always set by the calling BASH).
8027      if test "xMKDIR" != xBASH; then
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8029$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8030      fi
8031      # Try to locate tool using the code snippet
8032      for ac_prog in mkdir
8033do
8034  # Extract the first word of "$ac_prog", so it can be a program name with args.
8035set dummy $ac_prog; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_MKDIR+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $MKDIR in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064MKDIR=$ac_cv_path_MKDIR
8065if test -n "$MKDIR"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8067$as_echo "$MKDIR" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074  test -n "$MKDIR" && break
8075done
8076
8077    else
8078      # If it succeeded, then it was overridden by the user. We will use it
8079      # for the tool.
8080
8081      # First remove it from the list of overridden variables, so we can test
8082      # for unknown variables in the end.
8083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8084
8085      # Check if the provided tool contains a complete path.
8086      tool_specified="$MKDIR"
8087      tool_basename="${tool_specified##*/}"
8088      if test "x$tool_basename" = "x$tool_specified"; then
8089        # A command without a complete path is provided, search $PATH.
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8091$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8092        # Extract the first word of "$tool_basename", so it can be a program name with args.
8093set dummy $tool_basename; ac_word=$2
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095$as_echo_n "checking for $ac_word... " >&6; }
8096if ${ac_cv_path_MKDIR+:} false; then :
8097  $as_echo_n "(cached) " >&6
8098else
8099  case $MKDIR in
8100  [\\/]* | ?:[\\/]*)
8101  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8102  ;;
8103  *)
8104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105for as_dir in $PATH
8106do
8107  IFS=$as_save_IFS
8108  test -z "$as_dir" && as_dir=.
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119  ;;
8120esac
8121fi
8122MKDIR=$ac_cv_path_MKDIR
8123if test -n "$MKDIR"; then
8124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8125$as_echo "$MKDIR" >&6; }
8126else
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
8129fi
8130
8131
8132        if test "x$MKDIR" = x; then
8133          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8134        fi
8135      else
8136        # Otherwise we believe it is a complete path. Use it as it is.
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8138$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8140$as_echo_n "checking for MKDIR... " >&6; }
8141        if test ! -x "$tool_specified"; then
8142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8143$as_echo "not found" >&6; }
8144          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8145        fi
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8147$as_echo "$tool_specified" >&6; }
8148      fi
8149    fi
8150  fi
8151
8152
8153
8154  if test "x$MKDIR" = x; then
8155    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8156  fi
8157
8158
8159
8160
8161
8162  # Publish this variable in the help.
8163
8164
8165  if test "x$MKTEMP" = x; then
8166    # The variable is not set by user, try to locate tool using the code snippet
8167    for ac_prog in mktemp
8168do
8169  # Extract the first word of "$ac_prog", so it can be a program name with args.
8170set dummy $ac_prog; ac_word=$2
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172$as_echo_n "checking for $ac_word... " >&6; }
8173if ${ac_cv_path_MKTEMP+:} false; then :
8174  $as_echo_n "(cached) " >&6
8175else
8176  case $MKTEMP in
8177  [\\/]* | ?:[\\/]*)
8178  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8179  ;;
8180  *)
8181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182for as_dir in $PATH
8183do
8184  IFS=$as_save_IFS
8185  test -z "$as_dir" && as_dir=.
8186    for ac_exec_ext in '' $ac_executable_extensions; do
8187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190    break 2
8191  fi
8192done
8193  done
8194IFS=$as_save_IFS
8195
8196  ;;
8197esac
8198fi
8199MKTEMP=$ac_cv_path_MKTEMP
8200if test -n "$MKTEMP"; then
8201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8202$as_echo "$MKTEMP" >&6; }
8203else
8204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
8206fi
8207
8208
8209  test -n "$MKTEMP" && break
8210done
8211
8212  else
8213    # The variable is set, but is it from the command line or the environment?
8214
8215    # Try to remove the string !MKTEMP! from our list.
8216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8218      # If it failed, the variable was not from the command line. Ignore it,
8219      # but warn the user (except for BASH, which is always set by the calling BASH).
8220      if test "xMKTEMP" != xBASH; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8222$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8223      fi
8224      # Try to locate tool using the code snippet
8225      for ac_prog in mktemp
8226do
8227  # Extract the first word of "$ac_prog", so it can be a program name with args.
8228set dummy $ac_prog; ac_word=$2
8229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8230$as_echo_n "checking for $ac_word... " >&6; }
8231if ${ac_cv_path_MKTEMP+:} false; then :
8232  $as_echo_n "(cached) " >&6
8233else
8234  case $MKTEMP in
8235  [\\/]* | ?:[\\/]*)
8236  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8237  ;;
8238  *)
8239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8240for as_dir in $PATH
8241do
8242  IFS=$as_save_IFS
8243  test -z "$as_dir" && as_dir=.
8244    for ac_exec_ext in '' $ac_executable_extensions; do
8245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8246    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8248    break 2
8249  fi
8250done
8251  done
8252IFS=$as_save_IFS
8253
8254  ;;
8255esac
8256fi
8257MKTEMP=$ac_cv_path_MKTEMP
8258if test -n "$MKTEMP"; then
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8260$as_echo "$MKTEMP" >&6; }
8261else
8262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263$as_echo "no" >&6; }
8264fi
8265
8266
8267  test -n "$MKTEMP" && break
8268done
8269
8270    else
8271      # If it succeeded, then it was overridden by the user. We will use it
8272      # for the tool.
8273
8274      # First remove it from the list of overridden variables, so we can test
8275      # for unknown variables in the end.
8276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8277
8278      # Check if the provided tool contains a complete path.
8279      tool_specified="$MKTEMP"
8280      tool_basename="${tool_specified##*/}"
8281      if test "x$tool_basename" = "x$tool_specified"; then
8282        # A command without a complete path is provided, search $PATH.
8283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8284$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8285        # Extract the first word of "$tool_basename", so it can be a program name with args.
8286set dummy $tool_basename; ac_word=$2
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288$as_echo_n "checking for $ac_word... " >&6; }
8289if ${ac_cv_path_MKTEMP+:} false; then :
8290  $as_echo_n "(cached) " >&6
8291else
8292  case $MKTEMP in
8293  [\\/]* | ?:[\\/]*)
8294  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8295  ;;
8296  *)
8297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298for as_dir in $PATH
8299do
8300  IFS=$as_save_IFS
8301  test -z "$as_dir" && as_dir=.
8302    for ac_exec_ext in '' $ac_executable_extensions; do
8303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8304    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8306    break 2
8307  fi
8308done
8309  done
8310IFS=$as_save_IFS
8311
8312  ;;
8313esac
8314fi
8315MKTEMP=$ac_cv_path_MKTEMP
8316if test -n "$MKTEMP"; then
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8318$as_echo "$MKTEMP" >&6; }
8319else
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321$as_echo "no" >&6; }
8322fi
8323
8324
8325        if test "x$MKTEMP" = x; then
8326          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8327        fi
8328      else
8329        # Otherwise we believe it is a complete path. Use it as it is.
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8331$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8333$as_echo_n "checking for MKTEMP... " >&6; }
8334        if test ! -x "$tool_specified"; then
8335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8336$as_echo "not found" >&6; }
8337          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8338        fi
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8340$as_echo "$tool_specified" >&6; }
8341      fi
8342    fi
8343  fi
8344
8345
8346
8347  if test "x$MKTEMP" = x; then
8348    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8349  fi
8350
8351
8352
8353
8354
8355  # Publish this variable in the help.
8356
8357
8358  if test "x$MV" = x; then
8359    # The variable is not set by user, try to locate tool using the code snippet
8360    for ac_prog in mv
8361do
8362  # Extract the first word of "$ac_prog", so it can be a program name with args.
8363set dummy $ac_prog; ac_word=$2
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
8366if ${ac_cv_path_MV+:} false; then :
8367  $as_echo_n "(cached) " >&6
8368else
8369  case $MV in
8370  [\\/]* | ?:[\\/]*)
8371  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8372  ;;
8373  *)
8374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in $PATH
8376do
8377  IFS=$as_save_IFS
8378  test -z "$as_dir" && as_dir=.
8379    for ac_exec_ext in '' $ac_executable_extensions; do
8380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383    break 2
8384  fi
8385done
8386  done
8387IFS=$as_save_IFS
8388
8389  ;;
8390esac
8391fi
8392MV=$ac_cv_path_MV
8393if test -n "$MV"; then
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8395$as_echo "$MV" >&6; }
8396else
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399fi
8400
8401
8402  test -n "$MV" && break
8403done
8404
8405  else
8406    # The variable is set, but is it from the command line or the environment?
8407
8408    # Try to remove the string !MV! from our list.
8409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8411      # If it failed, the variable was not from the command line. Ignore it,
8412      # but warn the user (except for BASH, which is always set by the calling BASH).
8413      if test "xMV" != xBASH; then
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8415$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8416      fi
8417      # Try to locate tool using the code snippet
8418      for ac_prog in mv
8419do
8420  # Extract the first word of "$ac_prog", so it can be a program name with args.
8421set dummy $ac_prog; ac_word=$2
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423$as_echo_n "checking for $ac_word... " >&6; }
8424if ${ac_cv_path_MV+:} false; then :
8425  $as_echo_n "(cached) " >&6
8426else
8427  case $MV in
8428  [\\/]* | ?:[\\/]*)
8429  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8430  ;;
8431  *)
8432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433for as_dir in $PATH
8434do
8435  IFS=$as_save_IFS
8436  test -z "$as_dir" && as_dir=.
8437    for ac_exec_ext in '' $ac_executable_extensions; do
8438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441    break 2
8442  fi
8443done
8444  done
8445IFS=$as_save_IFS
8446
8447  ;;
8448esac
8449fi
8450MV=$ac_cv_path_MV
8451if test -n "$MV"; then
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8453$as_echo "$MV" >&6; }
8454else
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457fi
8458
8459
8460  test -n "$MV" && break
8461done
8462
8463    else
8464      # If it succeeded, then it was overridden by the user. We will use it
8465      # for the tool.
8466
8467      # First remove it from the list of overridden variables, so we can test
8468      # for unknown variables in the end.
8469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8470
8471      # Check if the provided tool contains a complete path.
8472      tool_specified="$MV"
8473      tool_basename="${tool_specified##*/}"
8474      if test "x$tool_basename" = "x$tool_specified"; then
8475        # A command without a complete path is provided, search $PATH.
8476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8477$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8478        # Extract the first word of "$tool_basename", so it can be a program name with args.
8479set dummy $tool_basename; ac_word=$2
8480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8481$as_echo_n "checking for $ac_word... " >&6; }
8482if ${ac_cv_path_MV+:} false; then :
8483  $as_echo_n "(cached) " >&6
8484else
8485  case $MV in
8486  [\\/]* | ?:[\\/]*)
8487  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8488  ;;
8489  *)
8490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_exec_ext in '' $ac_executable_extensions; do
8496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499    break 2
8500  fi
8501done
8502  done
8503IFS=$as_save_IFS
8504
8505  ;;
8506esac
8507fi
8508MV=$ac_cv_path_MV
8509if test -n "$MV"; then
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8511$as_echo "$MV" >&6; }
8512else
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
8515fi
8516
8517
8518        if test "x$MV" = x; then
8519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8520        fi
8521      else
8522        # Otherwise we believe it is a complete path. Use it as it is.
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8524$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8526$as_echo_n "checking for MV... " >&6; }
8527        if test ! -x "$tool_specified"; then
8528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8529$as_echo "not found" >&6; }
8530          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8531        fi
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8533$as_echo "$tool_specified" >&6; }
8534      fi
8535    fi
8536  fi
8537
8538
8539
8540  if test "x$MV" = x; then
8541    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8542  fi
8543
8544
8545
8546
8547
8548  # Publish this variable in the help.
8549
8550
8551  if test "x$NAWK" = x; then
8552    # The variable is not set by user, try to locate tool using the code snippet
8553    for ac_prog in nawk gawk awk
8554do
8555  # Extract the first word of "$ac_prog", so it can be a program name with args.
8556set dummy $ac_prog; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_NAWK+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $NAWK in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585NAWK=$ac_cv_path_NAWK
8586if test -n "$NAWK"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8588$as_echo "$NAWK" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595  test -n "$NAWK" && break
8596done
8597
8598  else
8599    # The variable is set, but is it from the command line or the environment?
8600
8601    # Try to remove the string !NAWK! from our list.
8602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8604      # If it failed, the variable was not from the command line. Ignore it,
8605      # but warn the user (except for BASH, which is always set by the calling BASH).
8606      if test "xNAWK" != xBASH; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8608$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8609      fi
8610      # Try to locate tool using the code snippet
8611      for ac_prog in nawk gawk awk
8612do
8613  # Extract the first word of "$ac_prog", so it can be a program name with args.
8614set dummy $ac_prog; ac_word=$2
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8616$as_echo_n "checking for $ac_word... " >&6; }
8617if ${ac_cv_path_NAWK+:} false; then :
8618  $as_echo_n "(cached) " >&6
8619else
8620  case $NAWK in
8621  [\\/]* | ?:[\\/]*)
8622  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8623  ;;
8624  *)
8625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8626for as_dir in $PATH
8627do
8628  IFS=$as_save_IFS
8629  test -z "$as_dir" && as_dir=.
8630    for ac_exec_ext in '' $ac_executable_extensions; do
8631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8632    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8634    break 2
8635  fi
8636done
8637  done
8638IFS=$as_save_IFS
8639
8640  ;;
8641esac
8642fi
8643NAWK=$ac_cv_path_NAWK
8644if test -n "$NAWK"; then
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8646$as_echo "$NAWK" >&6; }
8647else
8648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649$as_echo "no" >&6; }
8650fi
8651
8652
8653  test -n "$NAWK" && break
8654done
8655
8656    else
8657      # If it succeeded, then it was overridden by the user. We will use it
8658      # for the tool.
8659
8660      # First remove it from the list of overridden variables, so we can test
8661      # for unknown variables in the end.
8662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8663
8664      # Check if the provided tool contains a complete path.
8665      tool_specified="$NAWK"
8666      tool_basename="${tool_specified##*/}"
8667      if test "x$tool_basename" = "x$tool_specified"; then
8668        # A command without a complete path is provided, search $PATH.
8669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8670$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8671        # Extract the first word of "$tool_basename", so it can be a program name with args.
8672set dummy $tool_basename; ac_word=$2
8673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8674$as_echo_n "checking for $ac_word... " >&6; }
8675if ${ac_cv_path_NAWK+:} false; then :
8676  $as_echo_n "(cached) " >&6
8677else
8678  case $NAWK in
8679  [\\/]* | ?:[\\/]*)
8680  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8681  ;;
8682  *)
8683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8684for as_dir in $PATH
8685do
8686  IFS=$as_save_IFS
8687  test -z "$as_dir" && as_dir=.
8688    for ac_exec_ext in '' $ac_executable_extensions; do
8689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8690    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8692    break 2
8693  fi
8694done
8695  done
8696IFS=$as_save_IFS
8697
8698  ;;
8699esac
8700fi
8701NAWK=$ac_cv_path_NAWK
8702if test -n "$NAWK"; then
8703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8704$as_echo "$NAWK" >&6; }
8705else
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8707$as_echo "no" >&6; }
8708fi
8709
8710
8711        if test "x$NAWK" = x; then
8712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8713        fi
8714      else
8715        # Otherwise we believe it is a complete path. Use it as it is.
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8717$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8719$as_echo_n "checking for NAWK... " >&6; }
8720        if test ! -x "$tool_specified"; then
8721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8722$as_echo "not found" >&6; }
8723          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8724        fi
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8726$as_echo "$tool_specified" >&6; }
8727      fi
8728    fi
8729  fi
8730
8731
8732
8733  if test "x$NAWK" = x; then
8734    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8735  fi
8736
8737
8738
8739
8740
8741  # Publish this variable in the help.
8742
8743
8744  if test "x$PRINTF" = x; then
8745    # The variable is not set by user, try to locate tool using the code snippet
8746    for ac_prog in printf
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_PRINTF+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $PRINTF in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778PRINTF=$ac_cv_path_PRINTF
8779if test -n "$PRINTF"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8781$as_echo "$PRINTF" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$PRINTF" && break
8789done
8790
8791  else
8792    # The variable is set, but is it from the command line or the environment?
8793
8794    # Try to remove the string !PRINTF! from our list.
8795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8797      # If it failed, the variable was not from the command line. Ignore it,
8798      # but warn the user (except for BASH, which is always set by the calling BASH).
8799      if test "xPRINTF" != xBASH; then
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8801$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8802      fi
8803      # Try to locate tool using the code snippet
8804      for ac_prog in printf
8805do
8806  # Extract the first word of "$ac_prog", so it can be a program name with args.
8807set dummy $ac_prog; ac_word=$2
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809$as_echo_n "checking for $ac_word... " >&6; }
8810if ${ac_cv_path_PRINTF+:} false; then :
8811  $as_echo_n "(cached) " >&6
8812else
8813  case $PRINTF in
8814  [\\/]* | ?:[\\/]*)
8815  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8816  ;;
8817  *)
8818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821  IFS=$as_save_IFS
8822  test -z "$as_dir" && as_dir=.
8823    for ac_exec_ext in '' $ac_executable_extensions; do
8824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8825    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827    break 2
8828  fi
8829done
8830  done
8831IFS=$as_save_IFS
8832
8833  ;;
8834esac
8835fi
8836PRINTF=$ac_cv_path_PRINTF
8837if test -n "$PRINTF"; then
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8839$as_echo "$PRINTF" >&6; }
8840else
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
8843fi
8844
8845
8846  test -n "$PRINTF" && break
8847done
8848
8849    else
8850      # If it succeeded, then it was overridden by the user. We will use it
8851      # for the tool.
8852
8853      # First remove it from the list of overridden variables, so we can test
8854      # for unknown variables in the end.
8855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8856
8857      # Check if the provided tool contains a complete path.
8858      tool_specified="$PRINTF"
8859      tool_basename="${tool_specified##*/}"
8860      if test "x$tool_basename" = "x$tool_specified"; then
8861        # A command without a complete path is provided, search $PATH.
8862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8864        # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_PRINTF+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $PRINTF in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894PRINTF=$ac_cv_path_PRINTF
8895if test -n "$PRINTF"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8897$as_echo "$PRINTF" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904        if test "x$PRINTF" = x; then
8905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906        fi
8907      else
8908        # Otherwise we believe it is a complete path. Use it as it is.
8909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8912$as_echo_n "checking for PRINTF... " >&6; }
8913        if test ! -x "$tool_specified"; then
8914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8917        fi
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920      fi
8921    fi
8922  fi
8923
8924
8925
8926  if test "x$PRINTF" = x; then
8927    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8928  fi
8929
8930
8931
8932
8933
8934  # Publish this variable in the help.
8935
8936
8937  if test "x$RM" = x; then
8938    # The variable is not set by user, try to locate tool using the code snippet
8939    for ac_prog in rm
8940do
8941  # Extract the first word of "$ac_prog", so it can be a program name with args.
8942set dummy $ac_prog; ac_word=$2
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8944$as_echo_n "checking for $ac_word... " >&6; }
8945if ${ac_cv_path_RM+:} false; then :
8946  $as_echo_n "(cached) " >&6
8947else
8948  case $RM in
8949  [\\/]* | ?:[\\/]*)
8950  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8951  ;;
8952  *)
8953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954for as_dir in $PATH
8955do
8956  IFS=$as_save_IFS
8957  test -z "$as_dir" && as_dir=.
8958    for ac_exec_ext in '' $ac_executable_extensions; do
8959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962    break 2
8963  fi
8964done
8965  done
8966IFS=$as_save_IFS
8967
8968  ;;
8969esac
8970fi
8971RM=$ac_cv_path_RM
8972if test -n "$RM"; then
8973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8974$as_echo "$RM" >&6; }
8975else
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977$as_echo "no" >&6; }
8978fi
8979
8980
8981  test -n "$RM" && break
8982done
8983
8984  else
8985    # The variable is set, but is it from the command line or the environment?
8986
8987    # Try to remove the string !RM! from our list.
8988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8990      # If it failed, the variable was not from the command line. Ignore it,
8991      # but warn the user (except for BASH, which is always set by the calling BASH).
8992      if test "xRM" != xBASH; then
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8994$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8995      fi
8996      # Try to locate tool using the code snippet
8997      for ac_prog in rm
8998do
8999  # Extract the first word of "$ac_prog", so it can be a program name with args.
9000set dummy $ac_prog; ac_word=$2
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002$as_echo_n "checking for $ac_word... " >&6; }
9003if ${ac_cv_path_RM+:} false; then :
9004  $as_echo_n "(cached) " >&6
9005else
9006  case $RM in
9007  [\\/]* | ?:[\\/]*)
9008  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9009  ;;
9010  *)
9011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012for as_dir in $PATH
9013do
9014  IFS=$as_save_IFS
9015  test -z "$as_dir" && as_dir=.
9016    for ac_exec_ext in '' $ac_executable_extensions; do
9017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9020    break 2
9021  fi
9022done
9023  done
9024IFS=$as_save_IFS
9025
9026  ;;
9027esac
9028fi
9029RM=$ac_cv_path_RM
9030if test -n "$RM"; then
9031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9032$as_echo "$RM" >&6; }
9033else
9034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035$as_echo "no" >&6; }
9036fi
9037
9038
9039  test -n "$RM" && break
9040done
9041
9042    else
9043      # If it succeeded, then it was overridden by the user. We will use it
9044      # for the tool.
9045
9046      # First remove it from the list of overridden variables, so we can test
9047      # for unknown variables in the end.
9048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9049
9050      # Check if the provided tool contains a complete path.
9051      tool_specified="$RM"
9052      tool_basename="${tool_specified##*/}"
9053      if test "x$tool_basename" = "x$tool_specified"; then
9054        # A command without a complete path is provided, search $PATH.
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9056$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9057        # Extract the first word of "$tool_basename", so it can be a program name with args.
9058set dummy $tool_basename; ac_word=$2
9059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060$as_echo_n "checking for $ac_word... " >&6; }
9061if ${ac_cv_path_RM+:} false; then :
9062  $as_echo_n "(cached) " >&6
9063else
9064  case $RM in
9065  [\\/]* | ?:[\\/]*)
9066  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9067  ;;
9068  *)
9069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070for as_dir in $PATH
9071do
9072  IFS=$as_save_IFS
9073  test -z "$as_dir" && as_dir=.
9074    for ac_exec_ext in '' $ac_executable_extensions; do
9075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078    break 2
9079  fi
9080done
9081  done
9082IFS=$as_save_IFS
9083
9084  ;;
9085esac
9086fi
9087RM=$ac_cv_path_RM
9088if test -n "$RM"; then
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9090$as_echo "$RM" >&6; }
9091else
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093$as_echo "no" >&6; }
9094fi
9095
9096
9097        if test "x$RM" = x; then
9098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9099        fi
9100      else
9101        # Otherwise we believe it is a complete path. Use it as it is.
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9103$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9105$as_echo_n "checking for RM... " >&6; }
9106        if test ! -x "$tool_specified"; then
9107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9108$as_echo "not found" >&6; }
9109          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9110        fi
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9112$as_echo "$tool_specified" >&6; }
9113      fi
9114    fi
9115  fi
9116
9117
9118
9119  if test "x$RM" = x; then
9120    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9121  fi
9122
9123
9124
9125
9126
9127  # Publish this variable in the help.
9128
9129
9130  if test "x$SH" = x; then
9131    # The variable is not set by user, try to locate tool using the code snippet
9132    for ac_prog in sh
9133do
9134  # Extract the first word of "$ac_prog", so it can be a program name with args.
9135set dummy $ac_prog; ac_word=$2
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9137$as_echo_n "checking for $ac_word... " >&6; }
9138if ${ac_cv_path_SH+:} false; then :
9139  $as_echo_n "(cached) " >&6
9140else
9141  case $SH in
9142  [\\/]* | ?:[\\/]*)
9143  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9144  ;;
9145  *)
9146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9147for as_dir in $PATH
9148do
9149  IFS=$as_save_IFS
9150  test -z "$as_dir" && as_dir=.
9151    for ac_exec_ext in '' $ac_executable_extensions; do
9152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9153    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9155    break 2
9156  fi
9157done
9158  done
9159IFS=$as_save_IFS
9160
9161  ;;
9162esac
9163fi
9164SH=$ac_cv_path_SH
9165if test -n "$SH"; then
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9167$as_echo "$SH" >&6; }
9168else
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9170$as_echo "no" >&6; }
9171fi
9172
9173
9174  test -n "$SH" && break
9175done
9176
9177  else
9178    # The variable is set, but is it from the command line or the environment?
9179
9180    # Try to remove the string !SH! from our list.
9181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9183      # If it failed, the variable was not from the command line. Ignore it,
9184      # but warn the user (except for BASH, which is always set by the calling BASH).
9185      if test "xSH" != xBASH; then
9186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9187$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9188      fi
9189      # Try to locate tool using the code snippet
9190      for ac_prog in sh
9191do
9192  # Extract the first word of "$ac_prog", so it can be a program name with args.
9193set dummy $ac_prog; ac_word=$2
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9195$as_echo_n "checking for $ac_word... " >&6; }
9196if ${ac_cv_path_SH+:} false; then :
9197  $as_echo_n "(cached) " >&6
9198else
9199  case $SH in
9200  [\\/]* | ?:[\\/]*)
9201  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9202  ;;
9203  *)
9204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9205for as_dir in $PATH
9206do
9207  IFS=$as_save_IFS
9208  test -z "$as_dir" && as_dir=.
9209    for ac_exec_ext in '' $ac_executable_extensions; do
9210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9211    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9213    break 2
9214  fi
9215done
9216  done
9217IFS=$as_save_IFS
9218
9219  ;;
9220esac
9221fi
9222SH=$ac_cv_path_SH
9223if test -n "$SH"; then
9224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9225$as_echo "$SH" >&6; }
9226else
9227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9228$as_echo "no" >&6; }
9229fi
9230
9231
9232  test -n "$SH" && break
9233done
9234
9235    else
9236      # If it succeeded, then it was overridden by the user. We will use it
9237      # for the tool.
9238
9239      # First remove it from the list of overridden variables, so we can test
9240      # for unknown variables in the end.
9241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9242
9243      # Check if the provided tool contains a complete path.
9244      tool_specified="$SH"
9245      tool_basename="${tool_specified##*/}"
9246      if test "x$tool_basename" = "x$tool_specified"; then
9247        # A command without a complete path is provided, search $PATH.
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9249$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9250        # Extract the first word of "$tool_basename", so it can be a program name with args.
9251set dummy $tool_basename; ac_word=$2
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9253$as_echo_n "checking for $ac_word... " >&6; }
9254if ${ac_cv_path_SH+:} false; then :
9255  $as_echo_n "(cached) " >&6
9256else
9257  case $SH in
9258  [\\/]* | ?:[\\/]*)
9259  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9260  ;;
9261  *)
9262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9263for as_dir in $PATH
9264do
9265  IFS=$as_save_IFS
9266  test -z "$as_dir" && as_dir=.
9267    for ac_exec_ext in '' $ac_executable_extensions; do
9268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9269    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9271    break 2
9272  fi
9273done
9274  done
9275IFS=$as_save_IFS
9276
9277  ;;
9278esac
9279fi
9280SH=$ac_cv_path_SH
9281if test -n "$SH"; then
9282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9283$as_echo "$SH" >&6; }
9284else
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
9287fi
9288
9289
9290        if test "x$SH" = x; then
9291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9292        fi
9293      else
9294        # Otherwise we believe it is a complete path. Use it as it is.
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9296$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9298$as_echo_n "checking for SH... " >&6; }
9299        if test ! -x "$tool_specified"; then
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9301$as_echo "not found" >&6; }
9302          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9303        fi
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9305$as_echo "$tool_specified" >&6; }
9306      fi
9307    fi
9308  fi
9309
9310
9311
9312  if test "x$SH" = x; then
9313    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9314  fi
9315
9316
9317
9318
9319
9320  # Publish this variable in the help.
9321
9322
9323  if test "x$SORT" = x; then
9324    # The variable is not set by user, try to locate tool using the code snippet
9325    for ac_prog in sort
9326do
9327  # Extract the first word of "$ac_prog", so it can be a program name with args.
9328set dummy $ac_prog; ac_word=$2
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330$as_echo_n "checking for $ac_word... " >&6; }
9331if ${ac_cv_path_SORT+:} false; then :
9332  $as_echo_n "(cached) " >&6
9333else
9334  case $SORT in
9335  [\\/]* | ?:[\\/]*)
9336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9337  ;;
9338  *)
9339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340for as_dir in $PATH
9341do
9342  IFS=$as_save_IFS
9343  test -z "$as_dir" && as_dir=.
9344    for ac_exec_ext in '' $ac_executable_extensions; do
9345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348    break 2
9349  fi
9350done
9351  done
9352IFS=$as_save_IFS
9353
9354  ;;
9355esac
9356fi
9357SORT=$ac_cv_path_SORT
9358if test -n "$SORT"; then
9359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9360$as_echo "$SORT" >&6; }
9361else
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
9364fi
9365
9366
9367  test -n "$SORT" && break
9368done
9369
9370  else
9371    # The variable is set, but is it from the command line or the environment?
9372
9373    # Try to remove the string !SORT! from our list.
9374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376      # If it failed, the variable was not from the command line. Ignore it,
9377      # but warn the user (except for BASH, which is always set by the calling BASH).
9378      if test "xSORT" != xBASH; then
9379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9380$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9381      fi
9382      # Try to locate tool using the code snippet
9383      for ac_prog in sort
9384do
9385  # Extract the first word of "$ac_prog", so it can be a program name with args.
9386set dummy $ac_prog; ac_word=$2
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388$as_echo_n "checking for $ac_word... " >&6; }
9389if ${ac_cv_path_SORT+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  case $SORT in
9393  [\\/]* | ?:[\\/]*)
9394  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9395  ;;
9396  *)
9397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398for as_dir in $PATH
9399do
9400  IFS=$as_save_IFS
9401  test -z "$as_dir" && as_dir=.
9402    for ac_exec_ext in '' $ac_executable_extensions; do
9403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406    break 2
9407  fi
9408done
9409  done
9410IFS=$as_save_IFS
9411
9412  ;;
9413esac
9414fi
9415SORT=$ac_cv_path_SORT
9416if test -n "$SORT"; then
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9418$as_echo "$SORT" >&6; }
9419else
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
9422fi
9423
9424
9425  test -n "$SORT" && break
9426done
9427
9428    else
9429      # If it succeeded, then it was overridden by the user. We will use it
9430      # for the tool.
9431
9432      # First remove it from the list of overridden variables, so we can test
9433      # for unknown variables in the end.
9434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435
9436      # Check if the provided tool contains a complete path.
9437      tool_specified="$SORT"
9438      tool_basename="${tool_specified##*/}"
9439      if test "x$tool_basename" = "x$tool_specified"; then
9440        # A command without a complete path is provided, search $PATH.
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9442$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9443        # Extract the first word of "$tool_basename", so it can be a program name with args.
9444set dummy $tool_basename; ac_word=$2
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446$as_echo_n "checking for $ac_word... " >&6; }
9447if ${ac_cv_path_SORT+:} false; then :
9448  $as_echo_n "(cached) " >&6
9449else
9450  case $SORT in
9451  [\\/]* | ?:[\\/]*)
9452  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9453  ;;
9454  *)
9455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456for as_dir in $PATH
9457do
9458  IFS=$as_save_IFS
9459  test -z "$as_dir" && as_dir=.
9460    for ac_exec_ext in '' $ac_executable_extensions; do
9461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464    break 2
9465  fi
9466done
9467  done
9468IFS=$as_save_IFS
9469
9470  ;;
9471esac
9472fi
9473SORT=$ac_cv_path_SORT
9474if test -n "$SORT"; then
9475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9476$as_echo "$SORT" >&6; }
9477else
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
9481
9482
9483        if test "x$SORT" = x; then
9484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9485        fi
9486      else
9487        # Otherwise we believe it is a complete path. Use it as it is.
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9489$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9491$as_echo_n "checking for SORT... " >&6; }
9492        if test ! -x "$tool_specified"; then
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9494$as_echo "not found" >&6; }
9495          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9496        fi
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9498$as_echo "$tool_specified" >&6; }
9499      fi
9500    fi
9501  fi
9502
9503
9504
9505  if test "x$SORT" = x; then
9506    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9507  fi
9508
9509
9510
9511
9512
9513  # Publish this variable in the help.
9514
9515
9516  if test "x$TAIL" = x; then
9517    # The variable is not set by user, try to locate tool using the code snippet
9518    for ac_prog in tail
9519do
9520  # Extract the first word of "$ac_prog", so it can be a program name with args.
9521set dummy $ac_prog; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if ${ac_cv_path_TAIL+:} false; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $TAIL in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9539    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550TAIL=$ac_cv_path_TAIL
9551if test -n "$TAIL"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9553$as_echo "$TAIL" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560  test -n "$TAIL" && break
9561done
9562
9563  else
9564    # The variable is set, but is it from the command line or the environment?
9565
9566    # Try to remove the string !TAIL! from our list.
9567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9569      # If it failed, the variable was not from the command line. Ignore it,
9570      # but warn the user (except for BASH, which is always set by the calling BASH).
9571      if test "xTAIL" != xBASH; then
9572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9573$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9574      fi
9575      # Try to locate tool using the code snippet
9576      for ac_prog in tail
9577do
9578  # Extract the first word of "$ac_prog", so it can be a program name with args.
9579set dummy $ac_prog; ac_word=$2
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
9582if ${ac_cv_path_TAIL+:} false; then :
9583  $as_echo_n "(cached) " >&6
9584else
9585  case $TAIL in
9586  [\\/]* | ?:[\\/]*)
9587  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9588  ;;
9589  *)
9590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593  IFS=$as_save_IFS
9594  test -z "$as_dir" && as_dir=.
9595    for ac_exec_ext in '' $ac_executable_extensions; do
9596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602  done
9603IFS=$as_save_IFS
9604
9605  ;;
9606esac
9607fi
9608TAIL=$ac_cv_path_TAIL
9609if test -n "$TAIL"; then
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9611$as_echo "$TAIL" >&6; }
9612else
9613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
9615fi
9616
9617
9618  test -n "$TAIL" && break
9619done
9620
9621    else
9622      # If it succeeded, then it was overridden by the user. We will use it
9623      # for the tool.
9624
9625      # First remove it from the list of overridden variables, so we can test
9626      # for unknown variables in the end.
9627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9628
9629      # Check if the provided tool contains a complete path.
9630      tool_specified="$TAIL"
9631      tool_basename="${tool_specified##*/}"
9632      if test "x$tool_basename" = "x$tool_specified"; then
9633        # A command without a complete path is provided, search $PATH.
9634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9635$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9636        # Extract the first word of "$tool_basename", so it can be a program name with args.
9637set dummy $tool_basename; ac_word=$2
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if ${ac_cv_path_TAIL+:} false; then :
9641  $as_echo_n "(cached) " >&6
9642else
9643  case $TAIL in
9644  [\\/]* | ?:[\\/]*)
9645  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9646  ;;
9647  *)
9648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649for as_dir in $PATH
9650do
9651  IFS=$as_save_IFS
9652  test -z "$as_dir" && as_dir=.
9653    for ac_exec_ext in '' $ac_executable_extensions; do
9654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657    break 2
9658  fi
9659done
9660  done
9661IFS=$as_save_IFS
9662
9663  ;;
9664esac
9665fi
9666TAIL=$ac_cv_path_TAIL
9667if test -n "$TAIL"; then
9668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9669$as_echo "$TAIL" >&6; }
9670else
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673fi
9674
9675
9676        if test "x$TAIL" = x; then
9677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9678        fi
9679      else
9680        # Otherwise we believe it is a complete path. Use it as it is.
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9682$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9684$as_echo_n "checking for TAIL... " >&6; }
9685        if test ! -x "$tool_specified"; then
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9687$as_echo "not found" >&6; }
9688          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9689        fi
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9691$as_echo "$tool_specified" >&6; }
9692      fi
9693    fi
9694  fi
9695
9696
9697
9698  if test "x$TAIL" = x; then
9699    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9700  fi
9701
9702
9703
9704
9705
9706  # Publish this variable in the help.
9707
9708
9709  if test "x$TAR" = x; then
9710    # The variable is not set by user, try to locate tool using the code snippet
9711    for ac_prog in tar
9712do
9713  # Extract the first word of "$ac_prog", so it can be a program name with args.
9714set dummy $ac_prog; ac_word=$2
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716$as_echo_n "checking for $ac_word... " >&6; }
9717if ${ac_cv_path_TAR+:} false; then :
9718  $as_echo_n "(cached) " >&6
9719else
9720  case $TAR in
9721  [\\/]* | ?:[\\/]*)
9722  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9723  ;;
9724  *)
9725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726for as_dir in $PATH
9727do
9728  IFS=$as_save_IFS
9729  test -z "$as_dir" && as_dir=.
9730    for ac_exec_ext in '' $ac_executable_extensions; do
9731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9732    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734    break 2
9735  fi
9736done
9737  done
9738IFS=$as_save_IFS
9739
9740  ;;
9741esac
9742fi
9743TAR=$ac_cv_path_TAR
9744if test -n "$TAR"; then
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9746$as_echo "$TAR" >&6; }
9747else
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752
9753  test -n "$TAR" && break
9754done
9755
9756  else
9757    # The variable is set, but is it from the command line or the environment?
9758
9759    # Try to remove the string !TAR! from our list.
9760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9762      # If it failed, the variable was not from the command line. Ignore it,
9763      # but warn the user (except for BASH, which is always set by the calling BASH).
9764      if test "xTAR" != xBASH; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9766$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9767      fi
9768      # Try to locate tool using the code snippet
9769      for ac_prog in tar
9770do
9771  # Extract the first word of "$ac_prog", so it can be a program name with args.
9772set dummy $ac_prog; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_TAR+:} false; then :
9776  $as_echo_n "(cached) " >&6
9777else
9778  case $TAR in
9779  [\\/]* | ?:[\\/]*)
9780  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9781  ;;
9782  *)
9783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786  IFS=$as_save_IFS
9787  test -z "$as_dir" && as_dir=.
9788    for ac_exec_ext in '' $ac_executable_extensions; do
9789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792    break 2
9793  fi
9794done
9795  done
9796IFS=$as_save_IFS
9797
9798  ;;
9799esac
9800fi
9801TAR=$ac_cv_path_TAR
9802if test -n "$TAR"; then
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9804$as_echo "$TAR" >&6; }
9805else
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811  test -n "$TAR" && break
9812done
9813
9814    else
9815      # If it succeeded, then it was overridden by the user. We will use it
9816      # for the tool.
9817
9818      # First remove it from the list of overridden variables, so we can test
9819      # for unknown variables in the end.
9820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9821
9822      # Check if the provided tool contains a complete path.
9823      tool_specified="$TAR"
9824      tool_basename="${tool_specified##*/}"
9825      if test "x$tool_basename" = "x$tool_specified"; then
9826        # A command without a complete path is provided, search $PATH.
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9828$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9829        # Extract the first word of "$tool_basename", so it can be a program name with args.
9830set dummy $tool_basename; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_TAR+:} false; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  case $TAR in
9837  [\\/]* | ?:[\\/]*)
9838  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9839  ;;
9840  *)
9841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844  IFS=$as_save_IFS
9845  test -z "$as_dir" && as_dir=.
9846    for ac_exec_ext in '' $ac_executable_extensions; do
9847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850    break 2
9851  fi
9852done
9853  done
9854IFS=$as_save_IFS
9855
9856  ;;
9857esac
9858fi
9859TAR=$ac_cv_path_TAR
9860if test -n "$TAR"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9862$as_echo "$TAR" >&6; }
9863else
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868
9869        if test "x$TAR" = x; then
9870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9871        fi
9872      else
9873        # Otherwise we believe it is a complete path. Use it as it is.
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9875$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9877$as_echo_n "checking for TAR... " >&6; }
9878        if test ! -x "$tool_specified"; then
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9880$as_echo "not found" >&6; }
9881          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9882        fi
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9884$as_echo "$tool_specified" >&6; }
9885      fi
9886    fi
9887  fi
9888
9889
9890
9891  if test "x$TAR" = x; then
9892    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9893  fi
9894
9895
9896
9897
9898
9899  # Publish this variable in the help.
9900
9901
9902  if test "x$TEE" = x; then
9903    # The variable is not set by user, try to locate tool using the code snippet
9904    for ac_prog in tee
9905do
9906  # Extract the first word of "$ac_prog", so it can be a program name with args.
9907set dummy $ac_prog; ac_word=$2
9908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909$as_echo_n "checking for $ac_word... " >&6; }
9910if ${ac_cv_path_TEE+:} false; then :
9911  $as_echo_n "(cached) " >&6
9912else
9913  case $TEE in
9914  [\\/]* | ?:[\\/]*)
9915  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9916  ;;
9917  *)
9918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919for as_dir in $PATH
9920do
9921  IFS=$as_save_IFS
9922  test -z "$as_dir" && as_dir=.
9923    for ac_exec_ext in '' $ac_executable_extensions; do
9924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9925    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927    break 2
9928  fi
9929done
9930  done
9931IFS=$as_save_IFS
9932
9933  ;;
9934esac
9935fi
9936TEE=$ac_cv_path_TEE
9937if test -n "$TEE"; then
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9939$as_echo "$TEE" >&6; }
9940else
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946  test -n "$TEE" && break
9947done
9948
9949  else
9950    # The variable is set, but is it from the command line or the environment?
9951
9952    # Try to remove the string !TEE! from our list.
9953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9955      # If it failed, the variable was not from the command line. Ignore it,
9956      # but warn the user (except for BASH, which is always set by the calling BASH).
9957      if test "xTEE" != xBASH; then
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9959$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9960      fi
9961      # Try to locate tool using the code snippet
9962      for ac_prog in tee
9963do
9964  # Extract the first word of "$ac_prog", so it can be a program name with args.
9965set dummy $ac_prog; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if ${ac_cv_path_TEE+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971  case $TEE in
9972  [\\/]* | ?:[\\/]*)
9973  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9974  ;;
9975  *)
9976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979  IFS=$as_save_IFS
9980  test -z "$as_dir" && as_dir=.
9981    for ac_exec_ext in '' $ac_executable_extensions; do
9982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985    break 2
9986  fi
9987done
9988  done
9989IFS=$as_save_IFS
9990
9991  ;;
9992esac
9993fi
9994TEE=$ac_cv_path_TEE
9995if test -n "$TEE"; then
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9997$as_echo "$TEE" >&6; }
9998else
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
10001fi
10002
10003
10004  test -n "$TEE" && break
10005done
10006
10007    else
10008      # If it succeeded, then it was overridden by the user. We will use it
10009      # for the tool.
10010
10011      # First remove it from the list of overridden variables, so we can test
10012      # for unknown variables in the end.
10013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10014
10015      # Check if the provided tool contains a complete path.
10016      tool_specified="$TEE"
10017      tool_basename="${tool_specified##*/}"
10018      if test "x$tool_basename" = "x$tool_specified"; then
10019        # A command without a complete path is provided, search $PATH.
10020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10021$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10022        # Extract the first word of "$tool_basename", so it can be a program name with args.
10023set dummy $tool_basename; ac_word=$2
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10025$as_echo_n "checking for $ac_word... " >&6; }
10026if ${ac_cv_path_TEE+:} false; then :
10027  $as_echo_n "(cached) " >&6
10028else
10029  case $TEE in
10030  [\\/]* | ?:[\\/]*)
10031  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10032  ;;
10033  *)
10034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10035for as_dir in $PATH
10036do
10037  IFS=$as_save_IFS
10038  test -z "$as_dir" && as_dir=.
10039    for ac_exec_ext in '' $ac_executable_extensions; do
10040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10041    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10043    break 2
10044  fi
10045done
10046  done
10047IFS=$as_save_IFS
10048
10049  ;;
10050esac
10051fi
10052TEE=$ac_cv_path_TEE
10053if test -n "$TEE"; then
10054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10055$as_echo "$TEE" >&6; }
10056else
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059fi
10060
10061
10062        if test "x$TEE" = x; then
10063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10064        fi
10065      else
10066        # Otherwise we believe it is a complete path. Use it as it is.
10067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10068$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10070$as_echo_n "checking for TEE... " >&6; }
10071        if test ! -x "$tool_specified"; then
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10073$as_echo "not found" >&6; }
10074          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10075        fi
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10077$as_echo "$tool_specified" >&6; }
10078      fi
10079    fi
10080  fi
10081
10082
10083
10084  if test "x$TEE" = x; then
10085    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10086  fi
10087
10088
10089
10090
10091
10092  # Publish this variable in the help.
10093
10094
10095  if test "x$TOUCH" = x; then
10096    # The variable is not set by user, try to locate tool using the code snippet
10097    for ac_prog in touch
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_TOUCH+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $TOUCH in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129TOUCH=$ac_cv_path_TOUCH
10130if test -n "$TOUCH"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10132$as_echo "$TOUCH" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$TOUCH" && break
10140done
10141
10142  else
10143    # The variable is set, but is it from the command line or the environment?
10144
10145    # Try to remove the string !TOUCH! from our list.
10146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10148      # If it failed, the variable was not from the command line. Ignore it,
10149      # but warn the user (except for BASH, which is always set by the calling BASH).
10150      if test "xTOUCH" != xBASH; then
10151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10152$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10153      fi
10154      # Try to locate tool using the code snippet
10155      for ac_prog in touch
10156do
10157  # Extract the first word of "$ac_prog", so it can be a program name with args.
10158set dummy $ac_prog; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_TOUCH+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $TOUCH in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187TOUCH=$ac_cv_path_TOUCH
10188if test -n "$TOUCH"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10190$as_echo "$TOUCH" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197  test -n "$TOUCH" && break
10198done
10199
10200    else
10201      # If it succeeded, then it was overridden by the user. We will use it
10202      # for the tool.
10203
10204      # First remove it from the list of overridden variables, so we can test
10205      # for unknown variables in the end.
10206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10207
10208      # Check if the provided tool contains a complete path.
10209      tool_specified="$TOUCH"
10210      tool_basename="${tool_specified##*/}"
10211      if test "x$tool_basename" = "x$tool_specified"; then
10212        # A command without a complete path is provided, search $PATH.
10213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10214$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10215        # Extract the first word of "$tool_basename", so it can be a program name with args.
10216set dummy $tool_basename; ac_word=$2
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218$as_echo_n "checking for $ac_word... " >&6; }
10219if ${ac_cv_path_TOUCH+:} false; then :
10220  $as_echo_n "(cached) " >&6
10221else
10222  case $TOUCH in
10223  [\\/]* | ?:[\\/]*)
10224  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10225  ;;
10226  *)
10227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228for as_dir in $PATH
10229do
10230  IFS=$as_save_IFS
10231  test -z "$as_dir" && as_dir=.
10232    for ac_exec_ext in '' $ac_executable_extensions; do
10233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236    break 2
10237  fi
10238done
10239  done
10240IFS=$as_save_IFS
10241
10242  ;;
10243esac
10244fi
10245TOUCH=$ac_cv_path_TOUCH
10246if test -n "$TOUCH"; then
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10248$as_echo "$TOUCH" >&6; }
10249else
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
10255        if test "x$TOUCH" = x; then
10256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10257        fi
10258      else
10259        # Otherwise we believe it is a complete path. Use it as it is.
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10261$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10263$as_echo_n "checking for TOUCH... " >&6; }
10264        if test ! -x "$tool_specified"; then
10265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10266$as_echo "not found" >&6; }
10267          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10268        fi
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10270$as_echo "$tool_specified" >&6; }
10271      fi
10272    fi
10273  fi
10274
10275
10276
10277  if test "x$TOUCH" = x; then
10278    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10279  fi
10280
10281
10282
10283
10284
10285  # Publish this variable in the help.
10286
10287
10288  if test "x$TR" = x; then
10289    # The variable is not set by user, try to locate tool using the code snippet
10290    for ac_prog in tr
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_TR+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $TR in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322TR=$ac_cv_path_TR
10323if test -n "$TR"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10325$as_echo "$TR" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$TR" && break
10333done
10334
10335  else
10336    # The variable is set, but is it from the command line or the environment?
10337
10338    # Try to remove the string !TR! from our list.
10339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10341      # If it failed, the variable was not from the command line. Ignore it,
10342      # but warn the user (except for BASH, which is always set by the calling BASH).
10343      if test "xTR" != xBASH; then
10344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10345$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10346      fi
10347      # Try to locate tool using the code snippet
10348      for ac_prog in tr
10349do
10350  # Extract the first word of "$ac_prog", so it can be a program name with args.
10351set dummy $ac_prog; ac_word=$2
10352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353$as_echo_n "checking for $ac_word... " >&6; }
10354if ${ac_cv_path_TR+:} false; then :
10355  $as_echo_n "(cached) " >&6
10356else
10357  case $TR in
10358  [\\/]* | ?:[\\/]*)
10359  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10360  ;;
10361  *)
10362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363for as_dir in $PATH
10364do
10365  IFS=$as_save_IFS
10366  test -z "$as_dir" && as_dir=.
10367    for ac_exec_ext in '' $ac_executable_extensions; do
10368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371    break 2
10372  fi
10373done
10374  done
10375IFS=$as_save_IFS
10376
10377  ;;
10378esac
10379fi
10380TR=$ac_cv_path_TR
10381if test -n "$TR"; then
10382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10383$as_echo "$TR" >&6; }
10384else
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386$as_echo "no" >&6; }
10387fi
10388
10389
10390  test -n "$TR" && break
10391done
10392
10393    else
10394      # If it succeeded, then it was overridden by the user. We will use it
10395      # for the tool.
10396
10397      # First remove it from the list of overridden variables, so we can test
10398      # for unknown variables in the end.
10399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10400
10401      # Check if the provided tool contains a complete path.
10402      tool_specified="$TR"
10403      tool_basename="${tool_specified##*/}"
10404      if test "x$tool_basename" = "x$tool_specified"; then
10405        # A command without a complete path is provided, search $PATH.
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10407$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10408        # Extract the first word of "$tool_basename", so it can be a program name with args.
10409set dummy $tool_basename; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_TR+:} false; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $TR in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438TR=$ac_cv_path_TR
10439if test -n "$TR"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10441$as_echo "$TR" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448        if test "x$TR" = x; then
10449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10450        fi
10451      else
10452        # Otherwise we believe it is a complete path. Use it as it is.
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10454$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10456$as_echo_n "checking for TR... " >&6; }
10457        if test ! -x "$tool_specified"; then
10458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10459$as_echo "not found" >&6; }
10460          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10461        fi
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10463$as_echo "$tool_specified" >&6; }
10464      fi
10465    fi
10466  fi
10467
10468
10469
10470  if test "x$TR" = x; then
10471    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10472  fi
10473
10474
10475
10476
10477
10478  # Publish this variable in the help.
10479
10480
10481  if test "x$UNAME" = x; then
10482    # The variable is not set by user, try to locate tool using the code snippet
10483    for ac_prog in uname
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_UNAME+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $UNAME in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515UNAME=$ac_cv_path_UNAME
10516if test -n "$UNAME"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10518$as_echo "$UNAME" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$UNAME" && break
10526done
10527
10528  else
10529    # The variable is set, but is it from the command line or the environment?
10530
10531    # Try to remove the string !UNAME! from our list.
10532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10534      # If it failed, the variable was not from the command line. Ignore it,
10535      # but warn the user (except for BASH, which is always set by the calling BASH).
10536      if test "xUNAME" != xBASH; then
10537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10538$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10539      fi
10540      # Try to locate tool using the code snippet
10541      for ac_prog in uname
10542do
10543  # Extract the first word of "$ac_prog", so it can be a program name with args.
10544set dummy $ac_prog; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_UNAME+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $UNAME in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573UNAME=$ac_cv_path_UNAME
10574if test -n "$UNAME"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10576$as_echo "$UNAME" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  test -n "$UNAME" && break
10584done
10585
10586    else
10587      # If it succeeded, then it was overridden by the user. We will use it
10588      # for the tool.
10589
10590      # First remove it from the list of overridden variables, so we can test
10591      # for unknown variables in the end.
10592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10593
10594      # Check if the provided tool contains a complete path.
10595      tool_specified="$UNAME"
10596      tool_basename="${tool_specified##*/}"
10597      if test "x$tool_basename" = "x$tool_specified"; then
10598        # A command without a complete path is provided, search $PATH.
10599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10600$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10601        # Extract the first word of "$tool_basename", so it can be a program name with args.
10602set dummy $tool_basename; ac_word=$2
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604$as_echo_n "checking for $ac_word... " >&6; }
10605if ${ac_cv_path_UNAME+:} false; then :
10606  $as_echo_n "(cached) " >&6
10607else
10608  case $UNAME in
10609  [\\/]* | ?:[\\/]*)
10610  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10611  ;;
10612  *)
10613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10614for as_dir in $PATH
10615do
10616  IFS=$as_save_IFS
10617  test -z "$as_dir" && as_dir=.
10618    for ac_exec_ext in '' $ac_executable_extensions; do
10619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10620    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10622    break 2
10623  fi
10624done
10625  done
10626IFS=$as_save_IFS
10627
10628  ;;
10629esac
10630fi
10631UNAME=$ac_cv_path_UNAME
10632if test -n "$UNAME"; then
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10634$as_echo "$UNAME" >&6; }
10635else
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
10638fi
10639
10640
10641        if test "x$UNAME" = x; then
10642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10643        fi
10644      else
10645        # Otherwise we believe it is a complete path. Use it as it is.
10646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10647$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10649$as_echo_n "checking for UNAME... " >&6; }
10650        if test ! -x "$tool_specified"; then
10651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10652$as_echo "not found" >&6; }
10653          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10654        fi
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10656$as_echo "$tool_specified" >&6; }
10657      fi
10658    fi
10659  fi
10660
10661
10662
10663  if test "x$UNAME" = x; then
10664    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10665  fi
10666
10667
10668
10669
10670
10671  # Publish this variable in the help.
10672
10673
10674  if test "x$UNIQ" = x; then
10675    # The variable is not set by user, try to locate tool using the code snippet
10676    for ac_prog in uniq
10677do
10678  # Extract the first word of "$ac_prog", so it can be a program name with args.
10679set dummy $ac_prog; ac_word=$2
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681$as_echo_n "checking for $ac_word... " >&6; }
10682if ${ac_cv_path_UNIQ+:} false; then :
10683  $as_echo_n "(cached) " >&6
10684else
10685  case $UNIQ in
10686  [\\/]* | ?:[\\/]*)
10687  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10688  ;;
10689  *)
10690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691for as_dir in $PATH
10692do
10693  IFS=$as_save_IFS
10694  test -z "$as_dir" && as_dir=.
10695    for ac_exec_ext in '' $ac_executable_extensions; do
10696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10697    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699    break 2
10700  fi
10701done
10702  done
10703IFS=$as_save_IFS
10704
10705  ;;
10706esac
10707fi
10708UNIQ=$ac_cv_path_UNIQ
10709if test -n "$UNIQ"; then
10710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10711$as_echo "$UNIQ" >&6; }
10712else
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715fi
10716
10717
10718  test -n "$UNIQ" && break
10719done
10720
10721  else
10722    # The variable is set, but is it from the command line or the environment?
10723
10724    # Try to remove the string !UNIQ! from our list.
10725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10727      # If it failed, the variable was not from the command line. Ignore it,
10728      # but warn the user (except for BASH, which is always set by the calling BASH).
10729      if test "xUNIQ" != xBASH; then
10730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10731$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10732      fi
10733      # Try to locate tool using the code snippet
10734      for ac_prog in uniq
10735do
10736  # Extract the first word of "$ac_prog", so it can be a program name with args.
10737set dummy $ac_prog; ac_word=$2
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10739$as_echo_n "checking for $ac_word... " >&6; }
10740if ${ac_cv_path_UNIQ+:} false; then :
10741  $as_echo_n "(cached) " >&6
10742else
10743  case $UNIQ in
10744  [\\/]* | ?:[\\/]*)
10745  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10746  ;;
10747  *)
10748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10749for as_dir in $PATH
10750do
10751  IFS=$as_save_IFS
10752  test -z "$as_dir" && as_dir=.
10753    for ac_exec_ext in '' $ac_executable_extensions; do
10754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10755    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10757    break 2
10758  fi
10759done
10760  done
10761IFS=$as_save_IFS
10762
10763  ;;
10764esac
10765fi
10766UNIQ=$ac_cv_path_UNIQ
10767if test -n "$UNIQ"; then
10768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10769$as_echo "$UNIQ" >&6; }
10770else
10771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773fi
10774
10775
10776  test -n "$UNIQ" && break
10777done
10778
10779    else
10780      # If it succeeded, then it was overridden by the user. We will use it
10781      # for the tool.
10782
10783      # First remove it from the list of overridden variables, so we can test
10784      # for unknown variables in the end.
10785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10786
10787      # Check if the provided tool contains a complete path.
10788      tool_specified="$UNIQ"
10789      tool_basename="${tool_specified##*/}"
10790      if test "x$tool_basename" = "x$tool_specified"; then
10791        # A command without a complete path is provided, search $PATH.
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10793$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10794        # Extract the first word of "$tool_basename", so it can be a program name with args.
10795set dummy $tool_basename; ac_word=$2
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797$as_echo_n "checking for $ac_word... " >&6; }
10798if ${ac_cv_path_UNIQ+:} false; then :
10799  $as_echo_n "(cached) " >&6
10800else
10801  case $UNIQ in
10802  [\\/]* | ?:[\\/]*)
10803  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10804  ;;
10805  *)
10806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807for as_dir in $PATH
10808do
10809  IFS=$as_save_IFS
10810  test -z "$as_dir" && as_dir=.
10811    for ac_exec_ext in '' $ac_executable_extensions; do
10812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815    break 2
10816  fi
10817done
10818  done
10819IFS=$as_save_IFS
10820
10821  ;;
10822esac
10823fi
10824UNIQ=$ac_cv_path_UNIQ
10825if test -n "$UNIQ"; then
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10827$as_echo "$UNIQ" >&6; }
10828else
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830$as_echo "no" >&6; }
10831fi
10832
10833
10834        if test "x$UNIQ" = x; then
10835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10836        fi
10837      else
10838        # Otherwise we believe it is a complete path. Use it as it is.
10839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10840$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10842$as_echo_n "checking for UNIQ... " >&6; }
10843        if test ! -x "$tool_specified"; then
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10845$as_echo "not found" >&6; }
10846          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10847        fi
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10849$as_echo "$tool_specified" >&6; }
10850      fi
10851    fi
10852  fi
10853
10854
10855
10856  if test "x$UNIQ" = x; then
10857    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10858  fi
10859
10860
10861
10862
10863
10864  # Publish this variable in the help.
10865
10866
10867  if test "x$WC" = x; then
10868    # The variable is not set by user, try to locate tool using the code snippet
10869    for ac_prog in wc
10870do
10871  # Extract the first word of "$ac_prog", so it can be a program name with args.
10872set dummy $ac_prog; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_WC+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $WC in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901WC=$ac_cv_path_WC
10902if test -n "$WC"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10904$as_echo "$WC" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911  test -n "$WC" && break
10912done
10913
10914  else
10915    # The variable is set, but is it from the command line or the environment?
10916
10917    # Try to remove the string !WC! from our list.
10918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10920      # If it failed, the variable was not from the command line. Ignore it,
10921      # but warn the user (except for BASH, which is always set by the calling BASH).
10922      if test "xWC" != xBASH; then
10923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10924$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10925      fi
10926      # Try to locate tool using the code snippet
10927      for ac_prog in wc
10928do
10929  # Extract the first word of "$ac_prog", so it can be a program name with args.
10930set dummy $ac_prog; ac_word=$2
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932$as_echo_n "checking for $ac_word... " >&6; }
10933if ${ac_cv_path_WC+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  case $WC in
10937  [\\/]* | ?:[\\/]*)
10938  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10939  ;;
10940  *)
10941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942for as_dir in $PATH
10943do
10944  IFS=$as_save_IFS
10945  test -z "$as_dir" && as_dir=.
10946    for ac_exec_ext in '' $ac_executable_extensions; do
10947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10948    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10950    break 2
10951  fi
10952done
10953  done
10954IFS=$as_save_IFS
10955
10956  ;;
10957esac
10958fi
10959WC=$ac_cv_path_WC
10960if test -n "$WC"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10962$as_echo "$WC" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$WC" && break
10970done
10971
10972    else
10973      # If it succeeded, then it was overridden by the user. We will use it
10974      # for the tool.
10975
10976      # First remove it from the list of overridden variables, so we can test
10977      # for unknown variables in the end.
10978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10979
10980      # Check if the provided tool contains a complete path.
10981      tool_specified="$WC"
10982      tool_basename="${tool_specified##*/}"
10983      if test "x$tool_basename" = "x$tool_specified"; then
10984        # A command without a complete path is provided, search $PATH.
10985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10986$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10987        # Extract the first word of "$tool_basename", so it can be a program name with args.
10988set dummy $tool_basename; ac_word=$2
10989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10990$as_echo_n "checking for $ac_word... " >&6; }
10991if ${ac_cv_path_WC+:} false; then :
10992  $as_echo_n "(cached) " >&6
10993else
10994  case $WC in
10995  [\\/]* | ?:[\\/]*)
10996  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10997  ;;
10998  *)
10999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000for as_dir in $PATH
11001do
11002  IFS=$as_save_IFS
11003  test -z "$as_dir" && as_dir=.
11004    for ac_exec_ext in '' $ac_executable_extensions; do
11005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11006    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11008    break 2
11009  fi
11010done
11011  done
11012IFS=$as_save_IFS
11013
11014  ;;
11015esac
11016fi
11017WC=$ac_cv_path_WC
11018if test -n "$WC"; then
11019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11020$as_echo "$WC" >&6; }
11021else
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023$as_echo "no" >&6; }
11024fi
11025
11026
11027        if test "x$WC" = x; then
11028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11029        fi
11030      else
11031        # Otherwise we believe it is a complete path. Use it as it is.
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11033$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11035$as_echo_n "checking for WC... " >&6; }
11036        if test ! -x "$tool_specified"; then
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11038$as_echo "not found" >&6; }
11039          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11040        fi
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11042$as_echo "$tool_specified" >&6; }
11043      fi
11044    fi
11045  fi
11046
11047
11048
11049  if test "x$WC" = x; then
11050    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11051  fi
11052
11053
11054
11055
11056
11057  # Publish this variable in the help.
11058
11059
11060  if test "x$WHICH" = x; then
11061    # The variable is not set by user, try to locate tool using the code snippet
11062    for ac_prog in which
11063do
11064  # Extract the first word of "$ac_prog", so it can be a program name with args.
11065set dummy $ac_prog; ac_word=$2
11066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11067$as_echo_n "checking for $ac_word... " >&6; }
11068if ${ac_cv_path_WHICH+:} false; then :
11069  $as_echo_n "(cached) " >&6
11070else
11071  case $WHICH in
11072  [\\/]* | ?:[\\/]*)
11073  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11074  ;;
11075  *)
11076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11077for as_dir in $PATH
11078do
11079  IFS=$as_save_IFS
11080  test -z "$as_dir" && as_dir=.
11081    for ac_exec_ext in '' $ac_executable_extensions; do
11082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11083    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11085    break 2
11086  fi
11087done
11088  done
11089IFS=$as_save_IFS
11090
11091  ;;
11092esac
11093fi
11094WHICH=$ac_cv_path_WHICH
11095if test -n "$WHICH"; then
11096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11097$as_echo "$WHICH" >&6; }
11098else
11099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100$as_echo "no" >&6; }
11101fi
11102
11103
11104  test -n "$WHICH" && break
11105done
11106
11107  else
11108    # The variable is set, but is it from the command line or the environment?
11109
11110    # Try to remove the string !WHICH! from our list.
11111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11113      # If it failed, the variable was not from the command line. Ignore it,
11114      # but warn the user (except for BASH, which is always set by the calling BASH).
11115      if test "xWHICH" != xBASH; then
11116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11117$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11118      fi
11119      # Try to locate tool using the code snippet
11120      for ac_prog in which
11121do
11122  # Extract the first word of "$ac_prog", so it can be a program name with args.
11123set dummy $ac_prog; ac_word=$2
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11125$as_echo_n "checking for $ac_word... " >&6; }
11126if ${ac_cv_path_WHICH+:} false; then :
11127  $as_echo_n "(cached) " >&6
11128else
11129  case $WHICH in
11130  [\\/]* | ?:[\\/]*)
11131  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11132  ;;
11133  *)
11134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11135for as_dir in $PATH
11136do
11137  IFS=$as_save_IFS
11138  test -z "$as_dir" && as_dir=.
11139    for ac_exec_ext in '' $ac_executable_extensions; do
11140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11141    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11143    break 2
11144  fi
11145done
11146  done
11147IFS=$as_save_IFS
11148
11149  ;;
11150esac
11151fi
11152WHICH=$ac_cv_path_WHICH
11153if test -n "$WHICH"; then
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11155$as_echo "$WHICH" >&6; }
11156else
11157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
11159fi
11160
11161
11162  test -n "$WHICH" && break
11163done
11164
11165    else
11166      # If it succeeded, then it was overridden by the user. We will use it
11167      # for the tool.
11168
11169      # First remove it from the list of overridden variables, so we can test
11170      # for unknown variables in the end.
11171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11172
11173      # Check if the provided tool contains a complete path.
11174      tool_specified="$WHICH"
11175      tool_basename="${tool_specified##*/}"
11176      if test "x$tool_basename" = "x$tool_specified"; then
11177        # A command without a complete path is provided, search $PATH.
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11179$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11180        # Extract the first word of "$tool_basename", so it can be a program name with args.
11181set dummy $tool_basename; ac_word=$2
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183$as_echo_n "checking for $ac_word... " >&6; }
11184if ${ac_cv_path_WHICH+:} false; then :
11185  $as_echo_n "(cached) " >&6
11186else
11187  case $WHICH in
11188  [\\/]* | ?:[\\/]*)
11189  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11190  ;;
11191  *)
11192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193for as_dir in $PATH
11194do
11195  IFS=$as_save_IFS
11196  test -z "$as_dir" && as_dir=.
11197    for ac_exec_ext in '' $ac_executable_extensions; do
11198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201    break 2
11202  fi
11203done
11204  done
11205IFS=$as_save_IFS
11206
11207  ;;
11208esac
11209fi
11210WHICH=$ac_cv_path_WHICH
11211if test -n "$WHICH"; then
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11213$as_echo "$WHICH" >&6; }
11214else
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
11217fi
11218
11219
11220        if test "x$WHICH" = x; then
11221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11222        fi
11223      else
11224        # Otherwise we believe it is a complete path. Use it as it is.
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11226$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11228$as_echo_n "checking for WHICH... " >&6; }
11229        if test ! -x "$tool_specified"; then
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11231$as_echo "not found" >&6; }
11232          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11233        fi
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11235$as_echo "$tool_specified" >&6; }
11236      fi
11237    fi
11238  fi
11239
11240
11241
11242  if test "x$WHICH" = x; then
11243    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11244  fi
11245
11246
11247
11248
11249
11250  # Publish this variable in the help.
11251
11252
11253  if test "x$XARGS" = x; then
11254    # The variable is not set by user, try to locate tool using the code snippet
11255    for ac_prog in xargs
11256do
11257  # Extract the first word of "$ac_prog", so it can be a program name with args.
11258set dummy $ac_prog; ac_word=$2
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260$as_echo_n "checking for $ac_word... " >&6; }
11261if ${ac_cv_path_XARGS+:} false; then :
11262  $as_echo_n "(cached) " >&6
11263else
11264  case $XARGS in
11265  [\\/]* | ?:[\\/]*)
11266  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11267  ;;
11268  *)
11269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270for as_dir in $PATH
11271do
11272  IFS=$as_save_IFS
11273  test -z "$as_dir" && as_dir=.
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284  ;;
11285esac
11286fi
11287XARGS=$ac_cv_path_XARGS
11288if test -n "$XARGS"; then
11289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11290$as_echo "$XARGS" >&6; }
11291else
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
11294fi
11295
11296
11297  test -n "$XARGS" && break
11298done
11299
11300  else
11301    # The variable is set, but is it from the command line or the environment?
11302
11303    # Try to remove the string !XARGS! from our list.
11304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11306      # If it failed, the variable was not from the command line. Ignore it,
11307      # but warn the user (except for BASH, which is always set by the calling BASH).
11308      if test "xXARGS" != xBASH; then
11309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11310$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11311      fi
11312      # Try to locate tool using the code snippet
11313      for ac_prog in xargs
11314do
11315  # Extract the first word of "$ac_prog", so it can be a program name with args.
11316set dummy $ac_prog; ac_word=$2
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318$as_echo_n "checking for $ac_word... " >&6; }
11319if ${ac_cv_path_XARGS+:} false; then :
11320  $as_echo_n "(cached) " >&6
11321else
11322  case $XARGS in
11323  [\\/]* | ?:[\\/]*)
11324  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11325  ;;
11326  *)
11327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328for as_dir in $PATH
11329do
11330  IFS=$as_save_IFS
11331  test -z "$as_dir" && as_dir=.
11332    for ac_exec_ext in '' $ac_executable_extensions; do
11333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11334    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11336    break 2
11337  fi
11338done
11339  done
11340IFS=$as_save_IFS
11341
11342  ;;
11343esac
11344fi
11345XARGS=$ac_cv_path_XARGS
11346if test -n "$XARGS"; then
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11348$as_echo "$XARGS" >&6; }
11349else
11350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
11352fi
11353
11354
11355  test -n "$XARGS" && break
11356done
11357
11358    else
11359      # If it succeeded, then it was overridden by the user. We will use it
11360      # for the tool.
11361
11362      # First remove it from the list of overridden variables, so we can test
11363      # for unknown variables in the end.
11364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11365
11366      # Check if the provided tool contains a complete path.
11367      tool_specified="$XARGS"
11368      tool_basename="${tool_specified##*/}"
11369      if test "x$tool_basename" = "x$tool_specified"; then
11370        # A command without a complete path is provided, search $PATH.
11371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11372$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11373        # Extract the first word of "$tool_basename", so it can be a program name with args.
11374set dummy $tool_basename; ac_word=$2
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11376$as_echo_n "checking for $ac_word... " >&6; }
11377if ${ac_cv_path_XARGS+:} false; then :
11378  $as_echo_n "(cached) " >&6
11379else
11380  case $XARGS in
11381  [\\/]* | ?:[\\/]*)
11382  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11383  ;;
11384  *)
11385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400  ;;
11401esac
11402fi
11403XARGS=$ac_cv_path_XARGS
11404if test -n "$XARGS"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11406$as_echo "$XARGS" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413        if test "x$XARGS" = x; then
11414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11415        fi
11416      else
11417        # Otherwise we believe it is a complete path. Use it as it is.
11418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11419$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11421$as_echo_n "checking for XARGS... " >&6; }
11422        if test ! -x "$tool_specified"; then
11423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11424$as_echo "not found" >&6; }
11425          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11426        fi
11427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11428$as_echo "$tool_specified" >&6; }
11429      fi
11430    fi
11431  fi
11432
11433
11434
11435  if test "x$XARGS" = x; then
11436    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11437  fi
11438
11439
11440
11441  # Then required tools that require some special treatment.
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if test "x$AWK" = x; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in gawk mawk nawk awk
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_prog_AWK+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  if test -n "$AWK"; then
11459  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11460else
11461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_prog_AWK="$ac_prog"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476fi
11477fi
11478AWK=$ac_cv_prog_AWK
11479if test -n "$AWK"; then
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11481$as_echo "$AWK" >&6; }
11482else
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485fi
11486
11487
11488  test -n "$AWK" && break
11489done
11490
11491  else
11492    # The variable is set, but is it from the command line or the environment?
11493
11494    # Try to remove the string !AWK! from our list.
11495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11497      # If it failed, the variable was not from the command line. Ignore it,
11498      # but warn the user (except for BASH, which is always set by the calling BASH).
11499      if test "xAWK" != xBASH; then
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11501$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11502      fi
11503      # Try to locate tool using the code snippet
11504      for ac_prog in gawk mawk nawk awk
11505do
11506  # Extract the first word of "$ac_prog", so it can be a program name with args.
11507set dummy $ac_prog; ac_word=$2
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11509$as_echo_n "checking for $ac_word... " >&6; }
11510if ${ac_cv_prog_AWK+:} false; then :
11511  $as_echo_n "(cached) " >&6
11512else
11513  if test -n "$AWK"; then
11514  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11515else
11516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11517for as_dir in $PATH
11518do
11519  IFS=$as_save_IFS
11520  test -z "$as_dir" && as_dir=.
11521    for ac_exec_ext in '' $ac_executable_extensions; do
11522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11523    ac_cv_prog_AWK="$ac_prog"
11524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11525    break 2
11526  fi
11527done
11528  done
11529IFS=$as_save_IFS
11530
11531fi
11532fi
11533AWK=$ac_cv_prog_AWK
11534if test -n "$AWK"; then
11535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11536$as_echo "$AWK" >&6; }
11537else
11538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
11540fi
11541
11542
11543  test -n "$AWK" && break
11544done
11545
11546    else
11547      # If it succeeded, then it was overridden by the user. We will use it
11548      # for the tool.
11549
11550      # First remove it from the list of overridden variables, so we can test
11551      # for unknown variables in the end.
11552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11553
11554      # Check if the provided tool contains a complete path.
11555      tool_specified="$AWK"
11556      tool_basename="${tool_specified##*/}"
11557      if test "x$tool_basename" = "x$tool_specified"; then
11558        # A command without a complete path is provided, search $PATH.
11559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11560$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11561        # Extract the first word of "$tool_basename", so it can be a program name with args.
11562set dummy $tool_basename; ac_word=$2
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564$as_echo_n "checking for $ac_word... " >&6; }
11565if ${ac_cv_path_AWK+:} false; then :
11566  $as_echo_n "(cached) " >&6
11567else
11568  case $AWK in
11569  [\\/]* | ?:[\\/]*)
11570  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11571  ;;
11572  *)
11573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574for as_dir in $PATH
11575do
11576  IFS=$as_save_IFS
11577  test -z "$as_dir" && as_dir=.
11578    for ac_exec_ext in '' $ac_executable_extensions; do
11579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582    break 2
11583  fi
11584done
11585  done
11586IFS=$as_save_IFS
11587
11588  ;;
11589esac
11590fi
11591AWK=$ac_cv_path_AWK
11592if test -n "$AWK"; then
11593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11594$as_echo "$AWK" >&6; }
11595else
11596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
11598fi
11599
11600
11601        if test "x$AWK" = x; then
11602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11603        fi
11604      else
11605        # Otherwise we believe it is a complete path. Use it as it is.
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11607$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11609$as_echo_n "checking for AWK... " >&6; }
11610        if test ! -x "$tool_specified"; then
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11612$as_echo "not found" >&6; }
11613          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11614        fi
11615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11616$as_echo "$tool_specified" >&6; }
11617      fi
11618    fi
11619  fi
11620
11621
11622  if test "x$AWK" = x; then
11623    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11624  fi
11625
11626
11627
11628
11629  # Publish this variable in the help.
11630
11631
11632  if test "x$GREP" = x; then
11633    # The variable is not set by user, try to locate tool using the code snippet
11634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697  else
11698    # The variable is set, but is it from the command line or the environment?
11699
11700    # Try to remove the string !GREP! from our list.
11701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11703      # If it failed, the variable was not from the command line. Ignore it,
11704      # but warn the user (except for BASH, which is always set by the calling BASH).
11705      if test "xGREP" != xBASH; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11707$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11708      fi
11709      # Try to locate tool using the code snippet
11710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11711$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11712if ${ac_cv_path_GREP+:} false; then :
11713  $as_echo_n "(cached) " >&6
11714else
11715  if test -z "$GREP"; then
11716  ac_path_GREP_found=false
11717  # Loop through the user's path and test for each of PROGNAME-LIST
11718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11720do
11721  IFS=$as_save_IFS
11722  test -z "$as_dir" && as_dir=.
11723    for ac_prog in grep ggrep; do
11724    for ac_exec_ext in '' $ac_executable_extensions; do
11725      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11726      as_fn_executable_p "$ac_path_GREP" || continue
11727# Check for GNU ac_path_GREP and select it if it is found.
11728  # Check for GNU $ac_path_GREP
11729case `"$ac_path_GREP" --version 2>&1` in
11730*GNU*)
11731  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11732*)
11733  ac_count=0
11734  $as_echo_n 0123456789 >"conftest.in"
11735  while :
11736  do
11737    cat "conftest.in" "conftest.in" >"conftest.tmp"
11738    mv "conftest.tmp" "conftest.in"
11739    cp "conftest.in" "conftest.nl"
11740    $as_echo 'GREP' >> "conftest.nl"
11741    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11742    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11743    as_fn_arith $ac_count + 1 && ac_count=$as_val
11744    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11745      # Best one so far, save it but keep looking for a better one
11746      ac_cv_path_GREP="$ac_path_GREP"
11747      ac_path_GREP_max=$ac_count
11748    fi
11749    # 10*(2^10) chars as input seems more than enough
11750    test $ac_count -gt 10 && break
11751  done
11752  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11753esac
11754
11755      $ac_path_GREP_found && break 3
11756    done
11757  done
11758  done
11759IFS=$as_save_IFS
11760  if test -z "$ac_cv_path_GREP"; then
11761    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11762  fi
11763else
11764  ac_cv_path_GREP=$GREP
11765fi
11766
11767fi
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11769$as_echo "$ac_cv_path_GREP" >&6; }
11770 GREP="$ac_cv_path_GREP"
11771
11772
11773    else
11774      # If it succeeded, then it was overridden by the user. We will use it
11775      # for the tool.
11776
11777      # First remove it from the list of overridden variables, so we can test
11778      # for unknown variables in the end.
11779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11780
11781      # Check if the provided tool contains a complete path.
11782      tool_specified="$GREP"
11783      tool_basename="${tool_specified##*/}"
11784      if test "x$tool_basename" = "x$tool_specified"; then
11785        # A command without a complete path is provided, search $PATH.
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11787$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11788        # Extract the first word of "$tool_basename", so it can be a program name with args.
11789set dummy $tool_basename; ac_word=$2
11790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11791$as_echo_n "checking for $ac_word... " >&6; }
11792if ${ac_cv_path_GREP+:} false; then :
11793  $as_echo_n "(cached) " >&6
11794else
11795  case $GREP in
11796  [\\/]* | ?:[\\/]*)
11797  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11798  ;;
11799  *)
11800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801for as_dir in $PATH
11802do
11803  IFS=$as_save_IFS
11804  test -z "$as_dir" && as_dir=.
11805    for ac_exec_ext in '' $ac_executable_extensions; do
11806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11807    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11809    break 2
11810  fi
11811done
11812  done
11813IFS=$as_save_IFS
11814
11815  ;;
11816esac
11817fi
11818GREP=$ac_cv_path_GREP
11819if test -n "$GREP"; then
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11821$as_echo "$GREP" >&6; }
11822else
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825fi
11826
11827
11828        if test "x$GREP" = x; then
11829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11830        fi
11831      else
11832        # Otherwise we believe it is a complete path. Use it as it is.
11833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11834$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11836$as_echo_n "checking for GREP... " >&6; }
11837        if test ! -x "$tool_specified"; then
11838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11839$as_echo "not found" >&6; }
11840          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11841        fi
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11843$as_echo "$tool_specified" >&6; }
11844      fi
11845    fi
11846  fi
11847
11848
11849  if test "x$GREP" = x; then
11850    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11851  fi
11852
11853
11854
11855
11856  # Publish this variable in the help.
11857
11858
11859  if test "x$EGREP" = x; then
11860    # The variable is not set by user, try to locate tool using the code snippet
11861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11862$as_echo_n "checking for egrep... " >&6; }
11863if ${ac_cv_path_EGREP+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11867   then ac_cv_path_EGREP="$GREP -E"
11868   else
11869     if test -z "$EGREP"; then
11870  ac_path_EGREP_found=false
11871  # Loop through the user's path and test for each of PROGNAME-LIST
11872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11874do
11875  IFS=$as_save_IFS
11876  test -z "$as_dir" && as_dir=.
11877    for ac_prog in egrep; do
11878    for ac_exec_ext in '' $ac_executable_extensions; do
11879      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11880      as_fn_executable_p "$ac_path_EGREP" || continue
11881# Check for GNU ac_path_EGREP and select it if it is found.
11882  # Check for GNU $ac_path_EGREP
11883case `"$ac_path_EGREP" --version 2>&1` in
11884*GNU*)
11885  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11886*)
11887  ac_count=0
11888  $as_echo_n 0123456789 >"conftest.in"
11889  while :
11890  do
11891    cat "conftest.in" "conftest.in" >"conftest.tmp"
11892    mv "conftest.tmp" "conftest.in"
11893    cp "conftest.in" "conftest.nl"
11894    $as_echo 'EGREP' >> "conftest.nl"
11895    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11896    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11897    as_fn_arith $ac_count + 1 && ac_count=$as_val
11898    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11899      # Best one so far, save it but keep looking for a better one
11900      ac_cv_path_EGREP="$ac_path_EGREP"
11901      ac_path_EGREP_max=$ac_count
11902    fi
11903    # 10*(2^10) chars as input seems more than enough
11904    test $ac_count -gt 10 && break
11905  done
11906  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11907esac
11908
11909      $ac_path_EGREP_found && break 3
11910    done
11911  done
11912  done
11913IFS=$as_save_IFS
11914  if test -z "$ac_cv_path_EGREP"; then
11915    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11916  fi
11917else
11918  ac_cv_path_EGREP=$EGREP
11919fi
11920
11921   fi
11922fi
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11924$as_echo "$ac_cv_path_EGREP" >&6; }
11925 EGREP="$ac_cv_path_EGREP"
11926
11927
11928  else
11929    # The variable is set, but is it from the command line or the environment?
11930
11931    # Try to remove the string !EGREP! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934      # If it failed, the variable was not from the command line. Ignore it,
11935      # but warn the user (except for BASH, which is always set by the calling BASH).
11936      if test "xEGREP" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11942$as_echo_n "checking for egrep... " >&6; }
11943if ${ac_cv_path_EGREP+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11947   then ac_cv_path_EGREP="$GREP -E"
11948   else
11949     if test -z "$EGREP"; then
11950  ac_path_EGREP_found=false
11951  # Loop through the user's path and test for each of PROGNAME-LIST
11952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11954do
11955  IFS=$as_save_IFS
11956  test -z "$as_dir" && as_dir=.
11957    for ac_prog in egrep; do
11958    for ac_exec_ext in '' $ac_executable_extensions; do
11959      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11960      as_fn_executable_p "$ac_path_EGREP" || continue
11961# Check for GNU ac_path_EGREP and select it if it is found.
11962  # Check for GNU $ac_path_EGREP
11963case `"$ac_path_EGREP" --version 2>&1` in
11964*GNU*)
11965  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11966*)
11967  ac_count=0
11968  $as_echo_n 0123456789 >"conftest.in"
11969  while :
11970  do
11971    cat "conftest.in" "conftest.in" >"conftest.tmp"
11972    mv "conftest.tmp" "conftest.in"
11973    cp "conftest.in" "conftest.nl"
11974    $as_echo 'EGREP' >> "conftest.nl"
11975    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11976    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11977    as_fn_arith $ac_count + 1 && ac_count=$as_val
11978    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11979      # Best one so far, save it but keep looking for a better one
11980      ac_cv_path_EGREP="$ac_path_EGREP"
11981      ac_path_EGREP_max=$ac_count
11982    fi
11983    # 10*(2^10) chars as input seems more than enough
11984    test $ac_count -gt 10 && break
11985  done
11986  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11987esac
11988
11989      $ac_path_EGREP_found && break 3
11990    done
11991  done
11992  done
11993IFS=$as_save_IFS
11994  if test -z "$ac_cv_path_EGREP"; then
11995    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11996  fi
11997else
11998  ac_cv_path_EGREP=$EGREP
11999fi
12000
12001   fi
12002fi
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12004$as_echo "$ac_cv_path_EGREP" >&6; }
12005 EGREP="$ac_cv_path_EGREP"
12006
12007
12008    else
12009      # If it succeeded, then it was overridden by the user. We will use it
12010      # for the tool.
12011
12012      # First remove it from the list of overridden variables, so we can test
12013      # for unknown variables in the end.
12014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12015
12016      # Check if the provided tool contains a complete path.
12017      tool_specified="$EGREP"
12018      tool_basename="${tool_specified##*/}"
12019      if test "x$tool_basename" = "x$tool_specified"; then
12020        # A command without a complete path is provided, search $PATH.
12021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12023        # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_EGREP+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $EGREP in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053EGREP=$ac_cv_path_EGREP
12054if test -n "$EGREP"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12056$as_echo "$EGREP" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063        if test "x$EGREP" = x; then
12064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065        fi
12066      else
12067        # Otherwise we believe it is a complete path. Use it as it is.
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12071$as_echo_n "checking for EGREP... " >&6; }
12072        if test ! -x "$tool_specified"; then
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12076        fi
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079      fi
12080    fi
12081  fi
12082
12083
12084  if test "x$EGREP" = x; then
12085    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12086  fi
12087
12088
12089
12090
12091  # Publish this variable in the help.
12092
12093
12094  if test "x$FGREP" = x; then
12095    # The variable is not set by user, try to locate tool using the code snippet
12096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12097$as_echo_n "checking for fgrep... " >&6; }
12098if ${ac_cv_path_FGREP+:} false; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12102   then ac_cv_path_FGREP="$GREP -F"
12103   else
12104     if test -z "$FGREP"; then
12105  ac_path_FGREP_found=false
12106  # Loop through the user's path and test for each of PROGNAME-LIST
12107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12109do
12110  IFS=$as_save_IFS
12111  test -z "$as_dir" && as_dir=.
12112    for ac_prog in fgrep; do
12113    for ac_exec_ext in '' $ac_executable_extensions; do
12114      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12115      as_fn_executable_p "$ac_path_FGREP" || continue
12116# Check for GNU ac_path_FGREP and select it if it is found.
12117  # Check for GNU $ac_path_FGREP
12118case `"$ac_path_FGREP" --version 2>&1` in
12119*GNU*)
12120  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12121*)
12122  ac_count=0
12123  $as_echo_n 0123456789 >"conftest.in"
12124  while :
12125  do
12126    cat "conftest.in" "conftest.in" >"conftest.tmp"
12127    mv "conftest.tmp" "conftest.in"
12128    cp "conftest.in" "conftest.nl"
12129    $as_echo 'FGREP' >> "conftest.nl"
12130    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12131    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12132    as_fn_arith $ac_count + 1 && ac_count=$as_val
12133    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12134      # Best one so far, save it but keep looking for a better one
12135      ac_cv_path_FGREP="$ac_path_FGREP"
12136      ac_path_FGREP_max=$ac_count
12137    fi
12138    # 10*(2^10) chars as input seems more than enough
12139    test $ac_count -gt 10 && break
12140  done
12141  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12142esac
12143
12144      $ac_path_FGREP_found && break 3
12145    done
12146  done
12147  done
12148IFS=$as_save_IFS
12149  if test -z "$ac_cv_path_FGREP"; then
12150    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12151  fi
12152else
12153  ac_cv_path_FGREP=$FGREP
12154fi
12155
12156   fi
12157fi
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12159$as_echo "$ac_cv_path_FGREP" >&6; }
12160 FGREP="$ac_cv_path_FGREP"
12161
12162
12163  else
12164    # The variable is set, but is it from the command line or the environment?
12165
12166    # Try to remove the string !FGREP! from our list.
12167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12169      # If it failed, the variable was not from the command line. Ignore it,
12170      # but warn the user (except for BASH, which is always set by the calling BASH).
12171      if test "xFGREP" != xBASH; then
12172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12173$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12174      fi
12175      # Try to locate tool using the code snippet
12176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12177$as_echo_n "checking for fgrep... " >&6; }
12178if ${ac_cv_path_FGREP+:} false; then :
12179  $as_echo_n "(cached) " >&6
12180else
12181  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12182   then ac_cv_path_FGREP="$GREP -F"
12183   else
12184     if test -z "$FGREP"; then
12185  ac_path_FGREP_found=false
12186  # Loop through the user's path and test for each of PROGNAME-LIST
12187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12189do
12190  IFS=$as_save_IFS
12191  test -z "$as_dir" && as_dir=.
12192    for ac_prog in fgrep; do
12193    for ac_exec_ext in '' $ac_executable_extensions; do
12194      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12195      as_fn_executable_p "$ac_path_FGREP" || continue
12196# Check for GNU ac_path_FGREP and select it if it is found.
12197  # Check for GNU $ac_path_FGREP
12198case `"$ac_path_FGREP" --version 2>&1` in
12199*GNU*)
12200  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12201*)
12202  ac_count=0
12203  $as_echo_n 0123456789 >"conftest.in"
12204  while :
12205  do
12206    cat "conftest.in" "conftest.in" >"conftest.tmp"
12207    mv "conftest.tmp" "conftest.in"
12208    cp "conftest.in" "conftest.nl"
12209    $as_echo 'FGREP' >> "conftest.nl"
12210    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12211    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12212    as_fn_arith $ac_count + 1 && ac_count=$as_val
12213    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12214      # Best one so far, save it but keep looking for a better one
12215      ac_cv_path_FGREP="$ac_path_FGREP"
12216      ac_path_FGREP_max=$ac_count
12217    fi
12218    # 10*(2^10) chars as input seems more than enough
12219    test $ac_count -gt 10 && break
12220  done
12221  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12222esac
12223
12224      $ac_path_FGREP_found && break 3
12225    done
12226  done
12227  done
12228IFS=$as_save_IFS
12229  if test -z "$ac_cv_path_FGREP"; then
12230    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12231  fi
12232else
12233  ac_cv_path_FGREP=$FGREP
12234fi
12235
12236   fi
12237fi
12238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12239$as_echo "$ac_cv_path_FGREP" >&6; }
12240 FGREP="$ac_cv_path_FGREP"
12241
12242
12243    else
12244      # If it succeeded, then it was overridden by the user. We will use it
12245      # for the tool.
12246
12247      # First remove it from the list of overridden variables, so we can test
12248      # for unknown variables in the end.
12249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12250
12251      # Check if the provided tool contains a complete path.
12252      tool_specified="$FGREP"
12253      tool_basename="${tool_specified##*/}"
12254      if test "x$tool_basename" = "x$tool_specified"; then
12255        # A command without a complete path is provided, search $PATH.
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12257$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12258        # Extract the first word of "$tool_basename", so it can be a program name with args.
12259set dummy $tool_basename; ac_word=$2
12260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12261$as_echo_n "checking for $ac_word... " >&6; }
12262if ${ac_cv_path_FGREP+:} false; then :
12263  $as_echo_n "(cached) " >&6
12264else
12265  case $FGREP in
12266  [\\/]* | ?:[\\/]*)
12267  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12268  ;;
12269  *)
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12279    break 2
12280  fi
12281done
12282  done
12283IFS=$as_save_IFS
12284
12285  ;;
12286esac
12287fi
12288FGREP=$ac_cv_path_FGREP
12289if test -n "$FGREP"; then
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12291$as_echo "$FGREP" >&6; }
12292else
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12294$as_echo "no" >&6; }
12295fi
12296
12297
12298        if test "x$FGREP" = x; then
12299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12300        fi
12301      else
12302        # Otherwise we believe it is a complete path. Use it as it is.
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12304$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12306$as_echo_n "checking for FGREP... " >&6; }
12307        if test ! -x "$tool_specified"; then
12308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12309$as_echo "not found" >&6; }
12310          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12311        fi
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12313$as_echo "$tool_specified" >&6; }
12314      fi
12315    fi
12316  fi
12317
12318
12319  if test "x$FGREP" = x; then
12320    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12321  fi
12322
12323
12324
12325
12326  # Publish this variable in the help.
12327
12328
12329  if test "x$SED" = x; then
12330    # The variable is not set by user, try to locate tool using the code snippet
12331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12332$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12333if ${ac_cv_path_SED+:} false; then :
12334  $as_echo_n "(cached) " >&6
12335else
12336            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12337     for ac_i in 1 2 3 4 5 6 7; do
12338       ac_script="$ac_script$as_nl$ac_script"
12339     done
12340     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12341     { ac_script=; unset ac_script;}
12342     if test -z "$SED"; then
12343  ac_path_SED_found=false
12344  # Loop through the user's path and test for each of PROGNAME-LIST
12345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12346for as_dir in $PATH
12347do
12348  IFS=$as_save_IFS
12349  test -z "$as_dir" && as_dir=.
12350    for ac_prog in sed gsed; do
12351    for ac_exec_ext in '' $ac_executable_extensions; do
12352      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12353      as_fn_executable_p "$ac_path_SED" || continue
12354# Check for GNU ac_path_SED and select it if it is found.
12355  # Check for GNU $ac_path_SED
12356case `"$ac_path_SED" --version 2>&1` in
12357*GNU*)
12358  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12359*)
12360  ac_count=0
12361  $as_echo_n 0123456789 >"conftest.in"
12362  while :
12363  do
12364    cat "conftest.in" "conftest.in" >"conftest.tmp"
12365    mv "conftest.tmp" "conftest.in"
12366    cp "conftest.in" "conftest.nl"
12367    $as_echo '' >> "conftest.nl"
12368    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12369    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12370    as_fn_arith $ac_count + 1 && ac_count=$as_val
12371    if test $ac_count -gt ${ac_path_SED_max-0}; then
12372      # Best one so far, save it but keep looking for a better one
12373      ac_cv_path_SED="$ac_path_SED"
12374      ac_path_SED_max=$ac_count
12375    fi
12376    # 10*(2^10) chars as input seems more than enough
12377    test $ac_count -gt 10 && break
12378  done
12379  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12380esac
12381
12382      $ac_path_SED_found && break 3
12383    done
12384  done
12385  done
12386IFS=$as_save_IFS
12387  if test -z "$ac_cv_path_SED"; then
12388    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12389  fi
12390else
12391  ac_cv_path_SED=$SED
12392fi
12393
12394fi
12395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12396$as_echo "$ac_cv_path_SED" >&6; }
12397 SED="$ac_cv_path_SED"
12398  rm -f conftest.sed
12399
12400  else
12401    # The variable is set, but is it from the command line or the environment?
12402
12403    # Try to remove the string !SED! from our list.
12404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12406      # If it failed, the variable was not from the command line. Ignore it,
12407      # but warn the user (except for BASH, which is always set by the calling BASH).
12408      if test "xSED" != xBASH; then
12409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12410$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12411      fi
12412      # Try to locate tool using the code snippet
12413      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12414$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12415if ${ac_cv_path_SED+:} false; then :
12416  $as_echo_n "(cached) " >&6
12417else
12418            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12419     for ac_i in 1 2 3 4 5 6 7; do
12420       ac_script="$ac_script$as_nl$ac_script"
12421     done
12422     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12423     { ac_script=; unset ac_script;}
12424     if test -z "$SED"; then
12425  ac_path_SED_found=false
12426  # Loop through the user's path and test for each of PROGNAME-LIST
12427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428for as_dir in $PATH
12429do
12430  IFS=$as_save_IFS
12431  test -z "$as_dir" && as_dir=.
12432    for ac_prog in sed gsed; do
12433    for ac_exec_ext in '' $ac_executable_extensions; do
12434      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12435      as_fn_executable_p "$ac_path_SED" || continue
12436# Check for GNU ac_path_SED and select it if it is found.
12437  # Check for GNU $ac_path_SED
12438case `"$ac_path_SED" --version 2>&1` in
12439*GNU*)
12440  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12441*)
12442  ac_count=0
12443  $as_echo_n 0123456789 >"conftest.in"
12444  while :
12445  do
12446    cat "conftest.in" "conftest.in" >"conftest.tmp"
12447    mv "conftest.tmp" "conftest.in"
12448    cp "conftest.in" "conftest.nl"
12449    $as_echo '' >> "conftest.nl"
12450    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12451    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12452    as_fn_arith $ac_count + 1 && ac_count=$as_val
12453    if test $ac_count -gt ${ac_path_SED_max-0}; then
12454      # Best one so far, save it but keep looking for a better one
12455      ac_cv_path_SED="$ac_path_SED"
12456      ac_path_SED_max=$ac_count
12457    fi
12458    # 10*(2^10) chars as input seems more than enough
12459    test $ac_count -gt 10 && break
12460  done
12461  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12462esac
12463
12464      $ac_path_SED_found && break 3
12465    done
12466  done
12467  done
12468IFS=$as_save_IFS
12469  if test -z "$ac_cv_path_SED"; then
12470    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12471  fi
12472else
12473  ac_cv_path_SED=$SED
12474fi
12475
12476fi
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12478$as_echo "$ac_cv_path_SED" >&6; }
12479 SED="$ac_cv_path_SED"
12480  rm -f conftest.sed
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if the provided tool contains a complete path.
12491      tool_specified="$SED"
12492      tool_basename="${tool_specified##*/}"
12493      if test "x$tool_basename" = "x$tool_specified"; then
12494        # A command without a complete path is provided, search $PATH.
12495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12497        # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_SED+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $SED in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527SED=$ac_cv_path_SED
12528if test -n "$SED"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12530$as_echo "$SED" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537        if test "x$SED" = x; then
12538          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539        fi
12540      else
12541        # Otherwise we believe it is a complete path. Use it as it is.
12542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12545$as_echo_n "checking for SED... " >&6; }
12546        if test ! -x "$tool_specified"; then
12547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12550        fi
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553      fi
12554    fi
12555  fi
12556
12557
12558  if test "x$SED" = x; then
12559    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12560  fi
12561
12562
12563
12564  # Always force rm.
12565  RM="$RM -f"
12566
12567  # pwd behaves differently on various platforms and some don't support the -L flag.
12568  # Always use the bash builtin pwd to get uniform behavior.
12569  THEPWDCMD=pwd
12570
12571  # These are not required on all platforms
12572
12573
12574  # Publish this variable in the help.
12575
12576
12577  if test "x$CYGPATH" = x; then
12578    # The variable is not set by user, try to locate tool using the code snippet
12579    for ac_prog in cygpath
12580do
12581  # Extract the first word of "$ac_prog", so it can be a program name with args.
12582set dummy $ac_prog; ac_word=$2
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584$as_echo_n "checking for $ac_word... " >&6; }
12585if ${ac_cv_path_CYGPATH+:} false; then :
12586  $as_echo_n "(cached) " >&6
12587else
12588  case $CYGPATH in
12589  [\\/]* | ?:[\\/]*)
12590  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12591  ;;
12592  *)
12593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594for as_dir in $PATH
12595do
12596  IFS=$as_save_IFS
12597  test -z "$as_dir" && as_dir=.
12598    for ac_exec_ext in '' $ac_executable_extensions; do
12599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602    break 2
12603  fi
12604done
12605  done
12606IFS=$as_save_IFS
12607
12608  ;;
12609esac
12610fi
12611CYGPATH=$ac_cv_path_CYGPATH
12612if test -n "$CYGPATH"; then
12613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12614$as_echo "$CYGPATH" >&6; }
12615else
12616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617$as_echo "no" >&6; }
12618fi
12619
12620
12621  test -n "$CYGPATH" && break
12622done
12623
12624  else
12625    # The variable is set, but is it from the command line or the environment?
12626
12627    # Try to remove the string !CYGPATH! from our list.
12628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12630      # If it failed, the variable was not from the command line. Ignore it,
12631      # but warn the user (except for BASH, which is always set by the calling BASH).
12632      if test "xCYGPATH" != xBASH; then
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12634$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12635      fi
12636      # Try to locate tool using the code snippet
12637      for ac_prog in cygpath
12638do
12639  # Extract the first word of "$ac_prog", so it can be a program name with args.
12640set dummy $ac_prog; ac_word=$2
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642$as_echo_n "checking for $ac_word... " >&6; }
12643if ${ac_cv_path_CYGPATH+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  case $CYGPATH in
12647  [\\/]* | ?:[\\/]*)
12648  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12649  ;;
12650  *)
12651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652for as_dir in $PATH
12653do
12654  IFS=$as_save_IFS
12655  test -z "$as_dir" && as_dir=.
12656    for ac_exec_ext in '' $ac_executable_extensions; do
12657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660    break 2
12661  fi
12662done
12663  done
12664IFS=$as_save_IFS
12665
12666  ;;
12667esac
12668fi
12669CYGPATH=$ac_cv_path_CYGPATH
12670if test -n "$CYGPATH"; then
12671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12672$as_echo "$CYGPATH" >&6; }
12673else
12674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675$as_echo "no" >&6; }
12676fi
12677
12678
12679  test -n "$CYGPATH" && break
12680done
12681
12682    else
12683      # If it succeeded, then it was overridden by the user. We will use it
12684      # for the tool.
12685
12686      # First remove it from the list of overridden variables, so we can test
12687      # for unknown variables in the end.
12688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12689
12690      # Check if the provided tool contains a complete path.
12691      tool_specified="$CYGPATH"
12692      tool_basename="${tool_specified##*/}"
12693      if test "x$tool_basename" = "x$tool_specified"; then
12694        # A command without a complete path is provided, search $PATH.
12695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12696$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12697        # Extract the first word of "$tool_basename", so it can be a program name with args.
12698set dummy $tool_basename; ac_word=$2
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700$as_echo_n "checking for $ac_word... " >&6; }
12701if ${ac_cv_path_CYGPATH+:} false; then :
12702  $as_echo_n "(cached) " >&6
12703else
12704  case $CYGPATH in
12705  [\\/]* | ?:[\\/]*)
12706  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12707  ;;
12708  *)
12709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712  IFS=$as_save_IFS
12713  test -z "$as_dir" && as_dir=.
12714    for ac_exec_ext in '' $ac_executable_extensions; do
12715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718    break 2
12719  fi
12720done
12721  done
12722IFS=$as_save_IFS
12723
12724  ;;
12725esac
12726fi
12727CYGPATH=$ac_cv_path_CYGPATH
12728if test -n "$CYGPATH"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12730$as_echo "$CYGPATH" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737        if test "x$CYGPATH" = x; then
12738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12739        fi
12740      else
12741        # Otherwise we believe it is a complete path. Use it as it is.
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12743$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12745$as_echo_n "checking for CYGPATH... " >&6; }
12746        if test ! -x "$tool_specified"; then
12747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12748$as_echo "not found" >&6; }
12749          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12750        fi
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12752$as_echo "$tool_specified" >&6; }
12753      fi
12754    fi
12755  fi
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if test "x$READLINK" = x; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in greadlink readlink
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_READLINK+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $READLINK in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797READLINK=$ac_cv_path_READLINK
12798if test -n "$READLINK"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12800$as_echo "$READLINK" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$READLINK" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !READLINK! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xREADLINK" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in greadlink readlink
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_READLINK+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $READLINK in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855READLINK=$ac_cv_path_READLINK
12856if test -n "$READLINK"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12858$as_echo "$READLINK" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$READLINK" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if the provided tool contains a complete path.
12877      tool_specified="$READLINK"
12878      tool_basename="${tool_specified##*/}"
12879      if test "x$tool_basename" = "x$tool_specified"; then
12880        # A command without a complete path is provided, search $PATH.
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12882$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12883        # Extract the first word of "$tool_basename", so it can be a program name with args.
12884set dummy $tool_basename; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_READLINK+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $READLINK in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913READLINK=$ac_cv_path_READLINK
12914if test -n "$READLINK"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12916$as_echo "$READLINK" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923        if test "x$READLINK" = x; then
12924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925        fi
12926      else
12927        # Otherwise we believe it is a complete path. Use it as it is.
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12929$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12931$as_echo_n "checking for READLINK... " >&6; }
12932        if test ! -x "$tool_specified"; then
12933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12936        fi
12937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938$as_echo "$tool_specified" >&6; }
12939      fi
12940    fi
12941  fi
12942
12943
12944
12945
12946  # Publish this variable in the help.
12947
12948
12949  if test "x$DF" = x; then
12950    # The variable is not set by user, try to locate tool using the code snippet
12951    for ac_prog in df
12952do
12953  # Extract the first word of "$ac_prog", so it can be a program name with args.
12954set dummy $ac_prog; ac_word=$2
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956$as_echo_n "checking for $ac_word... " >&6; }
12957if ${ac_cv_path_DF+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  case $DF in
12961  [\\/]* | ?:[\\/]*)
12962  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12963  ;;
12964  *)
12965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968  IFS=$as_save_IFS
12969  test -z "$as_dir" && as_dir=.
12970    for ac_exec_ext in '' $ac_executable_extensions; do
12971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974    break 2
12975  fi
12976done
12977  done
12978IFS=$as_save_IFS
12979
12980  ;;
12981esac
12982fi
12983DF=$ac_cv_path_DF
12984if test -n "$DF"; then
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12986$as_echo "$DF" >&6; }
12987else
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
12990fi
12991
12992
12993  test -n "$DF" && break
12994done
12995
12996  else
12997    # The variable is set, but is it from the command line or the environment?
12998
12999    # Try to remove the string !DF! from our list.
13000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002      # If it failed, the variable was not from the command line. Ignore it,
13003      # but warn the user (except for BASH, which is always set by the calling BASH).
13004      if test "xDF" != xBASH; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13006$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13007      fi
13008      # Try to locate tool using the code snippet
13009      for ac_prog in df
13010do
13011  # Extract the first word of "$ac_prog", so it can be a program name with args.
13012set dummy $ac_prog; ac_word=$2
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014$as_echo_n "checking for $ac_word... " >&6; }
13015if ${ac_cv_path_DF+:} false; then :
13016  $as_echo_n "(cached) " >&6
13017else
13018  case $DF in
13019  [\\/]* | ?:[\\/]*)
13020  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13021  ;;
13022  *)
13023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024for as_dir in $PATH
13025do
13026  IFS=$as_save_IFS
13027  test -z "$as_dir" && as_dir=.
13028    for ac_exec_ext in '' $ac_executable_extensions; do
13029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032    break 2
13033  fi
13034done
13035  done
13036IFS=$as_save_IFS
13037
13038  ;;
13039esac
13040fi
13041DF=$ac_cv_path_DF
13042if test -n "$DF"; then
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13044$as_echo "$DF" >&6; }
13045else
13046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047$as_echo "no" >&6; }
13048fi
13049
13050
13051  test -n "$DF" && break
13052done
13053
13054    else
13055      # If it succeeded, then it was overridden by the user. We will use it
13056      # for the tool.
13057
13058      # First remove it from the list of overridden variables, so we can test
13059      # for unknown variables in the end.
13060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062      # Check if the provided tool contains a complete path.
13063      tool_specified="$DF"
13064      tool_basename="${tool_specified##*/}"
13065      if test "x$tool_basename" = "x$tool_specified"; then
13066        # A command without a complete path is provided, search $PATH.
13067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13068$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13069        # Extract the first word of "$tool_basename", so it can be a program name with args.
13070set dummy $tool_basename; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_DF+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $DF in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099DF=$ac_cv_path_DF
13100if test -n "$DF"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13102$as_echo "$DF" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109        if test "x$DF" = x; then
13110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111        fi
13112      else
13113        # Otherwise we believe it is a complete path. Use it as it is.
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13115$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13117$as_echo_n "checking for DF... " >&6; }
13118        if test ! -x "$tool_specified"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120$as_echo "not found" >&6; }
13121          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13122        fi
13123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124$as_echo "$tool_specified" >&6; }
13125      fi
13126    fi
13127  fi
13128
13129
13130
13131
13132  # Publish this variable in the help.
13133
13134
13135  if test "x$CPIO" = x; then
13136    # The variable is not set by user, try to locate tool using the code snippet
13137    for ac_prog in cpio bsdcpio
13138do
13139  # Extract the first word of "$ac_prog", so it can be a program name with args.
13140set dummy $ac_prog; ac_word=$2
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142$as_echo_n "checking for $ac_word... " >&6; }
13143if ${ac_cv_path_CPIO+:} false; then :
13144  $as_echo_n "(cached) " >&6
13145else
13146  case $CPIO in
13147  [\\/]* | ?:[\\/]*)
13148  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13149  ;;
13150  *)
13151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152for as_dir in $PATH
13153do
13154  IFS=$as_save_IFS
13155  test -z "$as_dir" && as_dir=.
13156    for ac_exec_ext in '' $ac_executable_extensions; do
13157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160    break 2
13161  fi
13162done
13163  done
13164IFS=$as_save_IFS
13165
13166  ;;
13167esac
13168fi
13169CPIO=$ac_cv_path_CPIO
13170if test -n "$CPIO"; then
13171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13172$as_echo "$CPIO" >&6; }
13173else
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176fi
13177
13178
13179  test -n "$CPIO" && break
13180done
13181
13182  else
13183    # The variable is set, but is it from the command line or the environment?
13184
13185    # Try to remove the string !CPIO! from our list.
13186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13188      # If it failed, the variable was not from the command line. Ignore it,
13189      # but warn the user (except for BASH, which is always set by the calling BASH).
13190      if test "xCPIO" != xBASH; then
13191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13192$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13193      fi
13194      # Try to locate tool using the code snippet
13195      for ac_prog in cpio bsdcpio
13196do
13197  # Extract the first word of "$ac_prog", so it can be a program name with args.
13198set dummy $ac_prog; ac_word=$2
13199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200$as_echo_n "checking for $ac_word... " >&6; }
13201if ${ac_cv_path_CPIO+:} false; then :
13202  $as_echo_n "(cached) " >&6
13203else
13204  case $CPIO in
13205  [\\/]* | ?:[\\/]*)
13206  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13207  ;;
13208  *)
13209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210for as_dir in $PATH
13211do
13212  IFS=$as_save_IFS
13213  test -z "$as_dir" && as_dir=.
13214    for ac_exec_ext in '' $ac_executable_extensions; do
13215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218    break 2
13219  fi
13220done
13221  done
13222IFS=$as_save_IFS
13223
13224  ;;
13225esac
13226fi
13227CPIO=$ac_cv_path_CPIO
13228if test -n "$CPIO"; then
13229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13230$as_echo "$CPIO" >&6; }
13231else
13232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233$as_echo "no" >&6; }
13234fi
13235
13236
13237  test -n "$CPIO" && break
13238done
13239
13240    else
13241      # If it succeeded, then it was overridden by the user. We will use it
13242      # for the tool.
13243
13244      # First remove it from the list of overridden variables, so we can test
13245      # for unknown variables in the end.
13246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247
13248      # Check if the provided tool contains a complete path.
13249      tool_specified="$CPIO"
13250      tool_basename="${tool_specified##*/}"
13251      if test "x$tool_basename" = "x$tool_specified"; then
13252        # A command without a complete path is provided, search $PATH.
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13254$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13255        # Extract the first word of "$tool_basename", so it can be a program name with args.
13256set dummy $tool_basename; ac_word=$2
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258$as_echo_n "checking for $ac_word... " >&6; }
13259if ${ac_cv_path_CPIO+:} false; then :
13260  $as_echo_n "(cached) " >&6
13261else
13262  case $CPIO in
13263  [\\/]* | ?:[\\/]*)
13264  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13265  ;;
13266  *)
13267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268for as_dir in $PATH
13269do
13270  IFS=$as_save_IFS
13271  test -z "$as_dir" && as_dir=.
13272    for ac_exec_ext in '' $ac_executable_extensions; do
13273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276    break 2
13277  fi
13278done
13279  done
13280IFS=$as_save_IFS
13281
13282  ;;
13283esac
13284fi
13285CPIO=$ac_cv_path_CPIO
13286if test -n "$CPIO"; then
13287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13288$as_echo "$CPIO" >&6; }
13289else
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
13292fi
13293
13294
13295        if test "x$CPIO" = x; then
13296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13297        fi
13298      else
13299        # Otherwise we believe it is a complete path. Use it as it is.
13300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13301$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13303$as_echo_n "checking for CPIO... " >&6; }
13304        if test ! -x "$tool_specified"; then
13305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13306$as_echo "not found" >&6; }
13307          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13308        fi
13309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13310$as_echo "$tool_specified" >&6; }
13311      fi
13312    fi
13313  fi
13314
13315
13316
13317
13318# Now we can determine OpenJDK build and target platforms. This is required to
13319# have early on.
13320# Make sure we can run config.sub.
13321$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13322  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13323
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13325$as_echo_n "checking build system type... " >&6; }
13326if ${ac_cv_build+:} false; then :
13327  $as_echo_n "(cached) " >&6
13328else
13329  ac_build_alias=$build_alias
13330test "x$ac_build_alias" = x &&
13331  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13332test "x$ac_build_alias" = x &&
13333  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13334ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13335  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13336
13337fi
13338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13339$as_echo "$ac_cv_build" >&6; }
13340case $ac_cv_build in
13341*-*-*) ;;
13342*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13343esac
13344build=$ac_cv_build
13345ac_save_IFS=$IFS; IFS='-'
13346set x $ac_cv_build
13347shift
13348build_cpu=$1
13349build_vendor=$2
13350shift; shift
13351# Remember, the first character of IFS is used to create $*,
13352# except with old shells:
13353build_os=$*
13354IFS=$ac_save_IFS
13355case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13356
13357
13358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13359$as_echo_n "checking host system type... " >&6; }
13360if ${ac_cv_host+:} false; then :
13361  $as_echo_n "(cached) " >&6
13362else
13363  if test "x$host_alias" = x; then
13364  ac_cv_host=$ac_cv_build
13365else
13366  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13368fi
13369
13370fi
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13372$as_echo "$ac_cv_host" >&6; }
13373case $ac_cv_host in
13374*-*-*) ;;
13375*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13376esac
13377host=$ac_cv_host
13378ac_save_IFS=$IFS; IFS='-'
13379set x $ac_cv_host
13380shift
13381host_cpu=$1
13382host_vendor=$2
13383shift; shift
13384# Remember, the first character of IFS is used to create $*,
13385# except with old shells:
13386host_os=$*
13387IFS=$ac_save_IFS
13388case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13389
13390
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13392$as_echo_n "checking target system type... " >&6; }
13393if ${ac_cv_target+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test "x$target_alias" = x; then
13397  ac_cv_target=$ac_cv_host
13398else
13399  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13400    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13401fi
13402
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13405$as_echo "$ac_cv_target" >&6; }
13406case $ac_cv_target in
13407*-*-*) ;;
13408*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13409esac
13410target=$ac_cv_target
13411ac_save_IFS=$IFS; IFS='-'
13412set x $ac_cv_target
13413shift
13414target_cpu=$1
13415target_vendor=$2
13416shift; shift
13417# Remember, the first character of IFS is used to create $*,
13418# except with old shells:
13419target_os=$*
13420IFS=$ac_save_IFS
13421case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13422
13423
13424# The aliases save the names the user supplied, while $host etc.
13425# will get canonicalized.
13426test -n "$target_alias" &&
13427  test "$program_prefix$program_suffix$program_transform_name" = \
13428    NONENONEs,x,x, &&
13429  program_prefix=${target_alias}-
13430
13431  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13432  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13433  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13434  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13435  # to use the configure naming style.
13436
13437
13438
13439
13440
13441  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13442  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13443  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13444  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13445  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13446  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13447
13448
13449
13450  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13451
13452  case "$build_os" in
13453    *linux*)
13454      VAR_OS=linux
13455      VAR_OS_TYPE=unix
13456      ;;
13457    *solaris*)
13458      VAR_OS=solaris
13459      VAR_OS_TYPE=unix
13460      ;;
13461    *darwin*)
13462      VAR_OS=macosx
13463      VAR_OS_TYPE=unix
13464      ;;
13465    *bsd*)
13466      VAR_OS=bsd
13467      VAR_OS_TYPE=unix
13468      ;;
13469    *cygwin*)
13470      VAR_OS=windows
13471      VAR_OS_ENV=windows.cygwin
13472      ;;
13473    *mingw*)
13474      VAR_OS=windows
13475      VAR_OS_ENV=windows.msys
13476      ;;
13477    *aix*)
13478      VAR_OS=aix
13479      VAR_OS_TYPE=unix
13480      ;;
13481    *)
13482      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13483      ;;
13484  esac
13485
13486
13487  # First argument is the cpu name from the trip/quad
13488  case "$build_cpu" in
13489    x86_64)
13490      VAR_CPU=x86_64
13491      VAR_CPU_ARCH=x86
13492      VAR_CPU_BITS=64
13493      VAR_CPU_ENDIAN=little
13494      ;;
13495    i?86)
13496      VAR_CPU=x86
13497      VAR_CPU_ARCH=x86
13498      VAR_CPU_BITS=32
13499      VAR_CPU_ENDIAN=little
13500      ;;
13501    arm*)
13502      VAR_CPU=arm
13503      VAR_CPU_ARCH=arm
13504      VAR_CPU_BITS=32
13505      VAR_CPU_ENDIAN=little
13506      ;;
13507    aarch64)
13508      VAR_CPU=aarch64
13509      VAR_CPU_ARCH=aarch64
13510      VAR_CPU_BITS=64
13511      VAR_CPU_ENDIAN=little
13512      ;;
13513    powerpc)
13514      VAR_CPU=ppc
13515      VAR_CPU_ARCH=ppc
13516      VAR_CPU_BITS=32
13517      VAR_CPU_ENDIAN=big
13518      ;;
13519    powerpc64)
13520      VAR_CPU=ppc64
13521      VAR_CPU_ARCH=ppc
13522      VAR_CPU_BITS=64
13523      VAR_CPU_ENDIAN=big
13524      ;;
13525    powerpc64le)
13526      VAR_CPU=ppc64
13527      VAR_CPU_ARCH=ppc
13528      VAR_CPU_BITS=64
13529      VAR_CPU_ENDIAN=little
13530      ;;
13531    s390)
13532      VAR_CPU=s390
13533      VAR_CPU_ARCH=s390
13534      VAR_CPU_BITS=32
13535      VAR_CPU_ENDIAN=big
13536      ;;
13537    s390x)
13538      VAR_CPU=s390x
13539      VAR_CPU_ARCH=s390
13540      VAR_CPU_BITS=64
13541      VAR_CPU_ENDIAN=big
13542      ;;
13543    sparc)
13544      VAR_CPU=sparc
13545      VAR_CPU_ARCH=sparc
13546      VAR_CPU_BITS=32
13547      VAR_CPU_ENDIAN=big
13548      ;;
13549    sparcv9|sparc64)
13550      VAR_CPU=sparcv9
13551      VAR_CPU_ARCH=sparc
13552      VAR_CPU_BITS=64
13553      VAR_CPU_ENDIAN=big
13554      ;;
13555    *)
13556      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13557      ;;
13558  esac
13559
13560  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13561  OPENJDK_BUILD_OS="$VAR_OS"
13562  if test "x$VAR_OS_TYPE" != x; then
13563    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13564  else
13565    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13566  fi
13567  if test "x$VAR_OS_ENV" != x; then
13568    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13569  else
13570    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13571  fi
13572  OPENJDK_BUILD_CPU="$VAR_CPU"
13573  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13574  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13575  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13576
13577
13578
13579
13580
13581
13582
13583
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13585$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13587$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13588
13589  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13590
13591  case "$host_os" in
13592    *linux*)
13593      VAR_OS=linux
13594      VAR_OS_TYPE=unix
13595      ;;
13596    *solaris*)
13597      VAR_OS=solaris
13598      VAR_OS_TYPE=unix
13599      ;;
13600    *darwin*)
13601      VAR_OS=macosx
13602      VAR_OS_TYPE=unix
13603      ;;
13604    *bsd*)
13605      VAR_OS=bsd
13606      VAR_OS_TYPE=unix
13607      ;;
13608    *cygwin*)
13609      VAR_OS=windows
13610      VAR_OS_ENV=windows.cygwin
13611      ;;
13612    *mingw*)
13613      VAR_OS=windows
13614      VAR_OS_ENV=windows.msys
13615      ;;
13616    *aix*)
13617      VAR_OS=aix
13618      VAR_OS_TYPE=unix
13619      ;;
13620    *)
13621      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13622      ;;
13623  esac
13624
13625
13626  # First argument is the cpu name from the trip/quad
13627  case "$host_cpu" in
13628    x86_64)
13629      VAR_CPU=x86_64
13630      VAR_CPU_ARCH=x86
13631      VAR_CPU_BITS=64
13632      VAR_CPU_ENDIAN=little
13633      ;;
13634    i?86)
13635      VAR_CPU=x86
13636      VAR_CPU_ARCH=x86
13637      VAR_CPU_BITS=32
13638      VAR_CPU_ENDIAN=little
13639      ;;
13640    arm*)
13641      VAR_CPU=arm
13642      VAR_CPU_ARCH=arm
13643      VAR_CPU_BITS=32
13644      VAR_CPU_ENDIAN=little
13645      ;;
13646    aarch64)
13647      VAR_CPU=aarch64
13648      VAR_CPU_ARCH=aarch64
13649      VAR_CPU_BITS=64
13650      VAR_CPU_ENDIAN=little
13651      ;;
13652    powerpc)
13653      VAR_CPU=ppc
13654      VAR_CPU_ARCH=ppc
13655      VAR_CPU_BITS=32
13656      VAR_CPU_ENDIAN=big
13657      ;;
13658    powerpc64)
13659      VAR_CPU=ppc64
13660      VAR_CPU_ARCH=ppc
13661      VAR_CPU_BITS=64
13662      VAR_CPU_ENDIAN=big
13663      ;;
13664    powerpc64le)
13665      VAR_CPU=ppc64
13666      VAR_CPU_ARCH=ppc
13667      VAR_CPU_BITS=64
13668      VAR_CPU_ENDIAN=little
13669      ;;
13670    s390)
13671      VAR_CPU=s390
13672      VAR_CPU_ARCH=s390
13673      VAR_CPU_BITS=32
13674      VAR_CPU_ENDIAN=big
13675      ;;
13676    s390x)
13677      VAR_CPU=s390x
13678      VAR_CPU_ARCH=s390
13679      VAR_CPU_BITS=64
13680      VAR_CPU_ENDIAN=big
13681      ;;
13682    sparc)
13683      VAR_CPU=sparc
13684      VAR_CPU_ARCH=sparc
13685      VAR_CPU_BITS=32
13686      VAR_CPU_ENDIAN=big
13687      ;;
13688    sparcv9|sparc64)
13689      VAR_CPU=sparcv9
13690      VAR_CPU_ARCH=sparc
13691      VAR_CPU_BITS=64
13692      VAR_CPU_ENDIAN=big
13693      ;;
13694    *)
13695      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13696      ;;
13697  esac
13698
13699  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13700  OPENJDK_TARGET_OS="$VAR_OS"
13701  if test "x$VAR_OS_TYPE" != x; then
13702    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13703  else
13704    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13705  fi
13706  if test "x$VAR_OS_ENV" != x; then
13707    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13708  else
13709    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13710  fi
13711  OPENJDK_TARGET_CPU="$VAR_CPU"
13712  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13713  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13714  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13715
13716
13717
13718
13719
13720
13721
13722
13723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13724$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13726$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13727
13728
13729
13730# Check whether --with-target-bits was given.
13731if test "${with_target_bits+set}" = set; then :
13732  withval=$with_target_bits;
13733fi
13734
13735
13736  # We have three types of compiles:
13737  # native  == normal compilation, target system == build system
13738  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13739  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13740  #
13741  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13742    # We're doing a proper cross-compilation
13743    COMPILE_TYPE="cross"
13744  else
13745    COMPILE_TYPE="native"
13746  fi
13747
13748  if test "x$with_target_bits" != x; then
13749    if test "x$COMPILE_TYPE" = "xcross"; then
13750      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13751    fi
13752
13753    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13754      # A reduced build is requested
13755      COMPILE_TYPE="reduced"
13756      OPENJDK_TARGET_CPU_BITS=32
13757      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13758        OPENJDK_TARGET_CPU=x86
13759      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13760        OPENJDK_TARGET_CPU=sparc
13761      else
13762        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13763      fi
13764    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13765      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
13766    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13767      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13768$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13769    else
13770      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13771    fi
13772  fi
13773
13774
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13776$as_echo_n "checking compilation type... " >&6; }
13777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13778$as_echo "$COMPILE_TYPE" >&6; }
13779
13780
13781  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13782    REQUIRED_OS_NAME=SunOS
13783    REQUIRED_OS_VERSION=5.10
13784  fi
13785  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13786    REQUIRED_OS_NAME=Linux
13787    REQUIRED_OS_VERSION=2.6
13788  fi
13789  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13790    REQUIRED_OS_NAME=Windows
13791    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13792      REQUIRED_OS_VERSION=5.2
13793    else
13794      REQUIRED_OS_VERSION=5.1
13795    fi
13796  fi
13797  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13798    REQUIRED_OS_NAME=Darwin
13799    REQUIRED_OS_VERSION=11.2
13800  fi
13801
13802
13803
13804
13805
13806  # Also store the legacy naming of the cpu.
13807  # Ie i586 and amd64 instead of x86 and x86_64
13808  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13809  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13810    OPENJDK_TARGET_CPU_LEGACY="i586"
13811  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13812    # On all platforms except MacOSX replace x86_64 with amd64.
13813    OPENJDK_TARGET_CPU_LEGACY="amd64"
13814  fi
13815
13816
13817  # And the second legacy naming of the cpu.
13818  # Ie i386 and amd64 instead of x86 and x86_64.
13819  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13820  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13821    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13822  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13823    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13824  fi
13825
13826
13827  # This is the name of the cpu (but using i386 and amd64 instead of
13828  # x86 and x86_64, respectively), preceeded by a /, to be used when
13829  # locating libraries. On macosx, it's empty, though.
13830  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13831  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13832    OPENJDK_TARGET_CPU_LIBDIR=""
13833  fi
13834
13835
13836  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13837  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13838  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13839  OPENJDK_TARGET_CPU_ISADIR=""
13840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13841    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13842      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13843    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13844      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13845    fi
13846  fi
13847
13848
13849  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13850  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13851  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13852    # On linux only, we replace x86 with i386.
13853    OPENJDK_TARGET_CPU_OSARCH="i386"
13854  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13855    # On all platforms except macosx, we replace x86_64 with amd64.
13856    OPENJDK_TARGET_CPU_OSARCH="amd64"
13857  fi
13858
13859
13860  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13861  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13862    OPENJDK_TARGET_CPU_JLI="i386"
13863  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13864    # On all platforms except macosx, we replace x86_64 with amd64.
13865    OPENJDK_TARGET_CPU_JLI="amd64"
13866  fi
13867  # Now setup the -D flags for building libjli.
13868  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13869  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13870    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13871      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13872    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13873      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13874    fi
13875  fi
13876
13877
13878  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13879      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13880  else
13881      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13882  fi
13883
13884
13885  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13886    A_LP64="LP64:="
13887    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13888    # unpack200.exe
13889    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13890      ADD_LP64="-D_LP64=1"
13891    fi
13892  fi
13893  LP64=$A_LP64
13894
13895
13896  if test "x$COMPILE_TYPE" = "xcross"; then
13897    # FIXME: ... or should this include reduced builds..?
13898    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13899  else
13900    DEFINE_CROSS_COMPILE_ARCH=""
13901  fi
13902
13903
13904  # ZERO_ARCHDEF is used to enable architecture-specific code
13905  case "${OPENJDK_TARGET_CPU}" in
13906    ppc)     ZERO_ARCHDEF=PPC32 ;;
13907    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13908    s390*)   ZERO_ARCHDEF=S390  ;;
13909    sparc*)  ZERO_ARCHDEF=SPARC ;;
13910    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13911    x86)     ZERO_ARCHDEF=IA32  ;;
13912    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13913  esac
13914
13915
13916
13917
13918# Continue setting up basic stuff. Most remaining code require fundamental tools.
13919
13920  # Save the current directory this script was started from
13921  CURDIR="$PWD"
13922
13923  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13924    PATH_SEP=";"
13925
13926  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13927  if test $SRC_ROOT_LENGTH -gt 100; then
13928    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13929  fi
13930
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13933$as_echo_n "checking cygwin release... " >&6; }
13934    CYGWIN_VERSION=`$UNAME -r`
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13936$as_echo "$CYGWIN_VERSION" >&6; }
13937    WINDOWS_ENV_VENDOR='cygwin'
13938    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13939
13940    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13941    if test "x$CYGWIN_VERSION_OLD" != x; then
13942      { $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
13943$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;}
13944      as_fn_error $? "Cannot continue" "$LINENO" 5
13945    fi
13946    if test "x$CYGPATH" = x; then
13947      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13948    fi
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13950$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13951    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13952    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13953    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13954    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13956$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13957    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13958    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13959    if test "x$test_cygdrive_prefix" = x; then
13960      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13961    fi
13962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13964$as_echo_n "checking msys release... " >&6; }
13965    MSYS_VERSION=`$UNAME -r`
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13967$as_echo "$MSYS_VERSION" >&6; }
13968
13969    WINDOWS_ENV_VENDOR='msys'
13970    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13971
13972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13973$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13974    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13975    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13976
13977  windows_path="$MSYS_ROOT_PATH"
13978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979    unix_path=`$CYGPATH -u "$windows_path"`
13980    MSYS_ROOT_PATH="$unix_path"
13981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13983    MSYS_ROOT_PATH="$unix_path"
13984  fi
13985
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13987$as_echo "$MSYS_ROOT_PATH" >&6; }
13988    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13989  else
13990    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13991  fi
13992
13993  # Test if windows or unix (cygwin/msys) find is first in path.
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13995$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13996  FIND_BINARY_OUTPUT=`find --version 2>&1`
13997  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13999$as_echo "unix style" >&6; }
14000  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14002$as_echo "Windows" >&6; }
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14004$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14005    { $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
14006$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14007    as_fn_error $? "Cannot continue" "$LINENO" 5
14008  else
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14010$as_echo "unknown" >&6; }
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14012$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14013  fi
14014
14015  else
14016    PATH_SEP=":"
14017  fi
14018
14019
14020  # We get the top-level directory from the supporting wrappers.
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14022$as_echo_n "checking for top-level directory... " >&6; }
14023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14024$as_echo "$TOPDIR" >&6; }
14025
14026
14027  # Save the original version of TOPDIR for string comparisons
14028  ORIGINAL_TOPDIR="$TOPDIR"
14029
14030
14031  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14032
14033  # Only process if variable expands to non-empty
14034
14035  if test "x$CURDIR" != x; then
14036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14037
14038  # Input might be given as Windows format, start by converting to
14039  # unix format.
14040  path="$CURDIR"
14041  new_path=`$CYGPATH -u "$path"`
14042
14043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14046  # "foo.exe" is OK but "foo" is an error.
14047  #
14048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14049  # It is also a way to make sure we got the proper file name for the real test later on.
14050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14051  if test "x$test_shortpath" = x; then
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14053$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14054    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14055  fi
14056
14057  # Call helper function which possibly converts this using DOS-style short mode.
14058  # If so, the updated path is stored in $new_path.
14059
14060  input_path="$new_path"
14061  # Check if we need to convert this using DOS-style short mode. If the path
14062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14063  # take no chances and rewrite it.
14064  # Note: m4 eats our [], so we need to use [ and ] instead.
14065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14066  if test "x$has_forbidden_chars" != x; then
14067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14071      # Going to short mode and back again did indeed matter. Since short mode is
14072      # case insensitive, let's make it lowercase to improve readability.
14073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14074      # Now convert it back to Unix-style (cygpath)
14075      input_path=`$CYGPATH -u "$shortmode_path"`
14076      new_path="$input_path"
14077    fi
14078  fi
14079
14080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14081  if test "x$test_cygdrive_prefix" = x; then
14082    # As a simple fix, exclude /usr/bin since it's not a real path.
14083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14085      # a path prefixed by /cygdrive for fixpath to work.
14086      new_path="$CYGWIN_ROOT_PATH$input_path"
14087    fi
14088  fi
14089
14090
14091  if test "x$path" != "x$new_path"; then
14092    CURDIR="$new_path"
14093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14094$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14095  fi
14096
14097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14098
14099  path="$CURDIR"
14100  has_colon=`$ECHO $path | $GREP ^.:`
14101  new_path="$path"
14102  if test "x$has_colon" = x; then
14103    # Not in mixed or Windows style, start by that.
14104    new_path=`cmd //c echo $path`
14105  fi
14106
14107
14108  input_path="$new_path"
14109  # Check if we need to convert this using DOS-style short mode. If the path
14110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14111  # take no chances and rewrite it.
14112  # Note: m4 eats our [], so we need to use [ and ] instead.
14113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14114  if test "x$has_forbidden_chars" != x; then
14115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14117  fi
14118
14119
14120  windows_path="$new_path"
14121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14122    unix_path=`$CYGPATH -u "$windows_path"`
14123    new_path="$unix_path"
14124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14126    new_path="$unix_path"
14127  fi
14128
14129  if test "x$path" != "x$new_path"; then
14130    CURDIR="$new_path"
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14132$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14133  fi
14134
14135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14137
14138    else
14139      # We're on a unix platform. Hooray! :)
14140      path="$CURDIR"
14141      has_space=`$ECHO "$path" | $GREP " "`
14142      if test "x$has_space" != x; then
14143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14144$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14146      fi
14147
14148      # Use eval to expand a potential ~
14149      eval path="$path"
14150      if test ! -f "$path" && test ! -d "$path"; then
14151        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14152      fi
14153
14154      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14155    fi
14156  fi
14157
14158
14159  # Only process if variable expands to non-empty
14160
14161  if test "x$TOPDIR" != x; then
14162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14163
14164  # Input might be given as Windows format, start by converting to
14165  # unix format.
14166  path="$TOPDIR"
14167  new_path=`$CYGPATH -u "$path"`
14168
14169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14172  # "foo.exe" is OK but "foo" is an error.
14173  #
14174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14175  # It is also a way to make sure we got the proper file name for the real test later on.
14176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14177  if test "x$test_shortpath" = x; then
14178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14179$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14180    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14181  fi
14182
14183  # Call helper function which possibly converts this using DOS-style short mode.
14184  # If so, the updated path is stored in $new_path.
14185
14186  input_path="$new_path"
14187  # Check if we need to convert this using DOS-style short mode. If the path
14188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14189  # take no chances and rewrite it.
14190  # Note: m4 eats our [], so we need to use [ and ] instead.
14191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14192  if test "x$has_forbidden_chars" != x; then
14193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14197      # Going to short mode and back again did indeed matter. Since short mode is
14198      # case insensitive, let's make it lowercase to improve readability.
14199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14200      # Now convert it back to Unix-style (cygpath)
14201      input_path=`$CYGPATH -u "$shortmode_path"`
14202      new_path="$input_path"
14203    fi
14204  fi
14205
14206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14207  if test "x$test_cygdrive_prefix" = x; then
14208    # As a simple fix, exclude /usr/bin since it's not a real path.
14209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14211      # a path prefixed by /cygdrive for fixpath to work.
14212      new_path="$CYGWIN_ROOT_PATH$input_path"
14213    fi
14214  fi
14215
14216
14217  if test "x$path" != "x$new_path"; then
14218    TOPDIR="$new_path"
14219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14220$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14221  fi
14222
14223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14224
14225  path="$TOPDIR"
14226  has_colon=`$ECHO $path | $GREP ^.:`
14227  new_path="$path"
14228  if test "x$has_colon" = x; then
14229    # Not in mixed or Windows style, start by that.
14230    new_path=`cmd //c echo $path`
14231  fi
14232
14233
14234  input_path="$new_path"
14235  # Check if we need to convert this using DOS-style short mode. If the path
14236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14237  # take no chances and rewrite it.
14238  # Note: m4 eats our [], so we need to use [ and ] instead.
14239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14240  if test "x$has_forbidden_chars" != x; then
14241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14243  fi
14244
14245
14246  windows_path="$new_path"
14247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14248    unix_path=`$CYGPATH -u "$windows_path"`
14249    new_path="$unix_path"
14250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14252    new_path="$unix_path"
14253  fi
14254
14255  if test "x$path" != "x$new_path"; then
14256    TOPDIR="$new_path"
14257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14258$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14259  fi
14260
14261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14263
14264    else
14265      # We're on a unix platform. Hooray! :)
14266      path="$TOPDIR"
14267      has_space=`$ECHO "$path" | $GREP " "`
14268      if test "x$has_space" != x; then
14269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14270$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14272      fi
14273
14274      # Use eval to expand a potential ~
14275      eval path="$path"
14276      if test ! -f "$path" && test ! -d "$path"; then
14277        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14278      fi
14279
14280      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14281    fi
14282  fi
14283
14284  # SRC_ROOT is a traditional alias for TOPDIR.
14285  SRC_ROOT=$TOPDIR
14286
14287  # Calculate a canonical version of TOPDIR for string comparisons
14288  CANONICAL_TOPDIR=$TOPDIR
14289
14290  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14291    # Follow a chain of symbolic links. Use readlink
14292    # where it exists, else fall back to horribly
14293    # complicated shell code.
14294    if test "x$READLINK_TESTED" != yes; then
14295      # On MacOSX there is a readlink tool with a different
14296      # purpose than the GNU readlink tool. Check the found readlink.
14297      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14298      if test "x$ISGNU" = x; then
14299        # A readlink that we do not know how to use.
14300        # Are there other non-GNU readlinks out there?
14301        READLINK_TESTED=yes
14302        READLINK=
14303      fi
14304    fi
14305
14306    if test "x$READLINK" != x; then
14307      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14308    else
14309      # Save the current directory for restoring afterwards
14310      STARTDIR=$PWD
14311      COUNTER=0
14312      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14313      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14314      cd $sym_link_dir
14315      # Use -P flag to resolve symlinks in directories.
14316      cd `$THEPWDCMD -P`
14317      sym_link_dir=`$THEPWDCMD -P`
14318      # Resolve file symlinks
14319      while test $COUNTER -lt 20; do
14320        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14321        if test "x$ISLINK" == x; then
14322          # This is not a symbolic link! We are done!
14323          break
14324        fi
14325        # Again resolve directory symlinks since the target of the just found
14326        # link could be in a different directory
14327        cd `$DIRNAME $ISLINK`
14328        sym_link_dir=`$THEPWDCMD -P`
14329        sym_link_file=`$BASENAME $ISLINK`
14330        let COUNTER=COUNTER+1
14331      done
14332      cd $STARTDIR
14333      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14334    fi
14335  fi
14336
14337
14338
14339  # Locate the directory of this script.
14340  AUTOCONF_DIR=$TOPDIR/common/autoconf
14341
14342
14343# Check if it's a pure open build or if custom sources are to be used.
14344
14345  # Check whether --enable-openjdk-only was given.
14346if test "${enable_openjdk_only+set}" = set; then :
14347  enableval=$enable_openjdk_only;
14348else
14349  enable_openjdk_only="no"
14350fi
14351
14352
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14354$as_echo_n "checking for presence of closed sources... " >&6; }
14355  if test -d "$SRC_ROOT/jdk/src/closed"; then
14356    CLOSED_SOURCE_PRESENT=yes
14357  else
14358    CLOSED_SOURCE_PRESENT=no
14359  fi
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14361$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14362
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14364$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14365  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14367$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14368
14369  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14370    OPENJDK=true
14371    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14372      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14373$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14374    fi
14375  else
14376    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14377      OPENJDK=true
14378    else
14379      OPENJDK=false
14380    fi
14381  fi
14382
14383  if test "x$OPENJDK" = "xtrue"; then
14384    SET_OPENJDK="OPENJDK=true"
14385  fi
14386
14387
14388
14389  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14390  # the IncludeCustomExtension macro.
14391
14392
14393# Check whether --with-custom-make-dir was given.
14394if test "${with_custom_make_dir+set}" = set; then :
14395  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14396$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14397fi
14398
14399
14400
14401
14402# These are needed to be able to create a configuration name (and thus the output directory)
14403
14404  ###############################################################################
14405  #
14406  # Check which variant of the JDK that we want to build.
14407  # Currently we have:
14408  #    normal:   standard edition
14409  # but the custom make system may add other variants
14410  #
14411  # Effectively the JDK variant gives a name to a specific set of
14412  # modules to compile into the JDK. In the future, these modules
14413  # might even be Jigsaw modules.
14414  #
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14416$as_echo_n "checking which variant of the JDK to build... " >&6; }
14417
14418# Check whether --with-jdk-variant was given.
14419if test "${with_jdk_variant+set}" = set; then :
14420  withval=$with_jdk_variant;
14421fi
14422
14423
14424  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14425    JDK_VARIANT="normal"
14426  else
14427    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14428  fi
14429
14430
14431
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14433$as_echo "$JDK_VARIANT" >&6; }
14434
14435
14436###############################################################################
14437#
14438# Check which interpreter of the JVM we want to build.
14439# Currently we have:
14440#    template: Template interpreter (the default)
14441#    cpp     : C++ interpreter
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14443$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14444
14445# Check whether --with-jvm-interpreter was given.
14446if test "${with_jvm_interpreter+set}" = set; then :
14447  withval=$with_jvm_interpreter;
14448fi
14449
14450
14451if test "x$with_jvm_interpreter" = x; then
14452     with_jvm_interpreter="template"
14453fi
14454
14455JVM_INTERPRETER="$with_jvm_interpreter"
14456
14457if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14458   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14459fi
14460
14461
14462
14463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14464$as_echo "$with_jvm_interpreter" >&6; }
14465
14466
14467
14468  ###############################################################################
14469  #
14470  # Check which variants of the JVM that we want to build.
14471  # Currently we have:
14472  #    server: normal interpreter and a tiered C1/C2 compiler
14473  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14474  #    minimal1: reduced form of client with optional VM services and features stripped out
14475  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14476  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14477  #    zero: no machine code interpreter, no compiler
14478  #    zeroshark: zero interpreter and shark/llvm compiler backend
14479#    core: interpreter only, no compiler (only works on some platforms)
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14481$as_echo_n "checking which variants of the JVM to build... " >&6; }
14482
14483# Check whether --with-jvm-variants was given.
14484if test "${with_jvm_variants+set}" = set; then :
14485  withval=$with_jvm_variants;
14486fi
14487
14488
14489  if test "x$with_jvm_variants" = x; then
14490    with_jvm_variants="server"
14491  fi
14492
14493  JVM_VARIANTS=",$with_jvm_variants,"
14494  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,//'`
14495
14496  if test "x$TEST_VARIANTS" != "x,"; then
14497     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14498  fi
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14500$as_echo "$with_jvm_variants" >&6; }
14501
14502  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14503  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14504  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14505  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14506  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14507  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14508  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14509
14510  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14511    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14512      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14513    fi
14514  fi
14515  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525
14526  # Replace the commas with AND for use in the build directory name.
14527  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14528  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/'`
14529  if test "x$COUNT_VARIANTS" != "x,1"; then
14530    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14531  else
14532    BUILDING_MULTIPLE_JVM_VARIANTS=no
14533  fi
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544  INCLUDE_SA=true
14545  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14546    INCLUDE_SA=false
14547  fi
14548  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14549    INCLUDE_SA=false
14550  fi
14551  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14552    INCLUDE_SA=false
14553  fi
14554  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14555    INCLUDE_SA=false
14556  fi
14557
14558
14559  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14560    MACOSX_UNIVERSAL="true"
14561  fi
14562
14563
14564
14565
14566  ###############################################################################
14567  #
14568  # Set the debug level
14569  #    release: no debug information, all optimizations, no asserts.
14570  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14571  #    fastdebug: debug information (-g), all optimizations, all asserts
14572  #    slowdebug: debug information (-g), no optimizations, all asserts
14573  #
14574  DEBUG_LEVEL="release"
14575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14576$as_echo_n "checking which debug level to use... " >&6; }
14577  # Check whether --enable-debug was given.
14578if test "${enable_debug+set}" = set; then :
14579  enableval=$enable_debug;
14580        ENABLE_DEBUG="${enableval}"
14581        DEBUG_LEVEL="fastdebug"
14582
14583else
14584  ENABLE_DEBUG="no"
14585fi
14586
14587
14588
14589# Check whether --with-debug-level was given.
14590if test "${with_debug_level+set}" = set; then :
14591  withval=$with_debug_level;
14592        DEBUG_LEVEL="${withval}"
14593        if test "x$ENABLE_DEBUG" = xyes; then
14594          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14595        fi
14596
14597fi
14598
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14600$as_echo "$DEBUG_LEVEL" >&6; }
14601
14602  if test "x$DEBUG_LEVEL" != xrelease && \
14603      test "x$DEBUG_LEVEL" != xoptimized && \
14604      test "x$DEBUG_LEVEL" != xfastdebug && \
14605      test "x$DEBUG_LEVEL" != xslowdebug; then
14606    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14607  fi
14608
14609
14610  ###############################################################################
14611  #
14612  # Setup legacy vars/targets and new vars to deal with different debug levels.
14613  #
14614
14615  case $DEBUG_LEVEL in
14616    release )
14617      VARIANT="OPT"
14618      FASTDEBUG="false"
14619      DEBUG_CLASSFILES="false"
14620      BUILD_VARIANT_RELEASE=""
14621      HOTSPOT_DEBUG_LEVEL="product"
14622      HOTSPOT_EXPORT="product"
14623      ;;
14624    fastdebug )
14625      VARIANT="DBG"
14626      FASTDEBUG="true"
14627      DEBUG_CLASSFILES="true"
14628      BUILD_VARIANT_RELEASE="-fastdebug"
14629      HOTSPOT_DEBUG_LEVEL="fastdebug"
14630      HOTSPOT_EXPORT="fastdebug"
14631      ;;
14632    slowdebug )
14633      VARIANT="DBG"
14634      FASTDEBUG="false"
14635      DEBUG_CLASSFILES="true"
14636      BUILD_VARIANT_RELEASE="-debug"
14637      HOTSPOT_DEBUG_LEVEL="debug"
14638      HOTSPOT_EXPORT="debug"
14639      ;;
14640    optimized )
14641      VARIANT="OPT"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="false"
14644      BUILD_VARIANT_RELEASE="-optimized"
14645      HOTSPOT_DEBUG_LEVEL="optimized"
14646      HOTSPOT_EXPORT="optimized"
14647      ;;
14648  esac
14649
14650  # The debug level 'optimized' is a little special because it is currently only
14651  # applicable to the HotSpot build where it means to build a completely
14652  # optimized version of the VM without any debugging code (like for the
14653  # 'release' debug level which is called 'product' in the HotSpot build) but
14654  # with the exception that it can contain additional code which is otherwise
14655  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14656  # test new and/or experimental features which are not intended for customer
14657  # shipment. Because these new features need to be tested and benchmarked in
14658  # real world scenarios, we want to build the containing JDK at the 'release'
14659  # debug level.
14660  if test "x$DEBUG_LEVEL" = xoptimized; then
14661    DEBUG_LEVEL="release"
14662  fi
14663
14664  #####
14665  # Generate the legacy makefile targets for hotspot.
14666  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14667  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14668  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14669  # But until then ...
14670  HOTSPOT_TARGET=""
14671
14672  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14673    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14674  fi
14675
14676  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14677    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14678  fi
14679
14680  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14681    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14682  fi
14683
14684  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14686  fi
14687
14688  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14690  fi
14691
14692  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14694  fi
14695
14696  if test "x$JVM_VARIANT_CORE" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14698  fi
14699
14700  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14701
14702  # On Macosx universal binaries are produced, but they only contain
14703  # 64 bit intel. This invalidates control of which jvms are built
14704  # from configure, but only server is valid anyway. Fix this
14705  # when hotspot makefiles are rewritten.
14706  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14707    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14708  fi
14709
14710  #####
14711
14712
14713
14714
14715
14716
14717
14718
14719# With basic setup done, call the custom early hook.
14720
14721
14722# Check if we have devkits, extra paths or sysroot set.
14723
14724
14725# Check whether --with-devkit was given.
14726if test "${with_devkit+set}" = set; then :
14727  withval=$with_devkit;
14728
14729  # Only process if variable expands to non-empty
14730
14731  if test "x$with_devkit" != x; then
14732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14733
14734  # Input might be given as Windows format, start by converting to
14735  # unix format.
14736  path="$with_devkit"
14737  new_path=`$CYGPATH -u "$path"`
14738
14739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14742  # "foo.exe" is OK but "foo" is an error.
14743  #
14744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14745  # It is also a way to make sure we got the proper file name for the real test later on.
14746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14747  if test "x$test_shortpath" = x; then
14748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14750    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14751  fi
14752
14753  # Call helper function which possibly converts this using DOS-style short mode.
14754  # If so, the updated path is stored in $new_path.
14755
14756  input_path="$new_path"
14757  # Check if we need to convert this using DOS-style short mode. If the path
14758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14759  # take no chances and rewrite it.
14760  # Note: m4 eats our [], so we need to use [ and ] instead.
14761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14762  if test "x$has_forbidden_chars" != x; then
14763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14767      # Going to short mode and back again did indeed matter. Since short mode is
14768      # case insensitive, let's make it lowercase to improve readability.
14769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14770      # Now convert it back to Unix-style (cygpath)
14771      input_path=`$CYGPATH -u "$shortmode_path"`
14772      new_path="$input_path"
14773    fi
14774  fi
14775
14776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14777  if test "x$test_cygdrive_prefix" = x; then
14778    # As a simple fix, exclude /usr/bin since it's not a real path.
14779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14781      # a path prefixed by /cygdrive for fixpath to work.
14782      new_path="$CYGWIN_ROOT_PATH$input_path"
14783    fi
14784  fi
14785
14786
14787  if test "x$path" != "x$new_path"; then
14788    with_devkit="$new_path"
14789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14790$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14791  fi
14792
14793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794
14795  path="$with_devkit"
14796  has_colon=`$ECHO $path | $GREP ^.:`
14797  new_path="$path"
14798  if test "x$has_colon" = x; then
14799    # Not in mixed or Windows style, start by that.
14800    new_path=`cmd //c echo $path`
14801  fi
14802
14803
14804  input_path="$new_path"
14805  # Check if we need to convert this using DOS-style short mode. If the path
14806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14807  # take no chances and rewrite it.
14808  # Note: m4 eats our [], so we need to use [ and ] instead.
14809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14810  if test "x$has_forbidden_chars" != x; then
14811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14813  fi
14814
14815
14816  windows_path="$new_path"
14817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14818    unix_path=`$CYGPATH -u "$windows_path"`
14819    new_path="$unix_path"
14820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14822    new_path="$unix_path"
14823  fi
14824
14825  if test "x$path" != "x$new_path"; then
14826    with_devkit="$new_path"
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14828$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14829  fi
14830
14831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14833
14834    else
14835      # We're on a unix platform. Hooray! :)
14836      path="$with_devkit"
14837      has_space=`$ECHO "$path" | $GREP " "`
14838      if test "x$has_space" != x; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14840$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14842      fi
14843
14844      # Use eval to expand a potential ~
14845      eval path="$path"
14846      if test ! -f "$path" && test ! -d "$path"; then
14847        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14848      fi
14849
14850      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14851    fi
14852  fi
14853
14854        DEVKIT_ROOT="$with_devkit"
14855        # Check for a meta data info file in the root of the devkit
14856        if test -f "$DEVKIT_ROOT/devkit.info"; then
14857          . $DEVKIT_ROOT/devkit.info
14858          # This potentially sets the following:
14859          # A descriptive name of the devkit
14860
14861  if test "x$DEVKIT_NAME" = x; then
14862    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14863  fi
14864
14865          # Corresponds to --with-extra-path
14866
14867  if test "x$DEVKIT_EXTRA_PATH" = x; then
14868    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14869  fi
14870
14871          # Corresponds to --with-toolchain-path
14872
14873  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14874    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14875  fi
14876
14877          # Corresponds to --with-sysroot
14878
14879  if test "x$DEVKIT_SYSROOT" = x; then
14880    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14881  fi
14882
14883
14884          # Identifies the Visual Studio version in the devkit
14885
14886  if test "x$DEVKIT_VS_VERSION" = x; then
14887    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14888  fi
14889
14890          # The Visual Studio include environment variable
14891
14892  if test "x$DEVKIT_VS_INCLUDE" = x; then
14893    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14894  fi
14895
14896          # The Visual Studio lib environment variable
14897
14898  if test "x$DEVKIT_VS_LIB" = x; then
14899    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14900  fi
14901
14902          # Corresponds to --with-msvcr-dll
14903
14904  if test "x$DEVKIT_MSVCR_DLL" = x; then
14905    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14906  fi
14907
14908          # Corresponds to --with-msvcp-dll
14909
14910  if test "x$DEVKIT_MSVCP_DLL" = x; then
14911    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14912  fi
14913
14914        fi
14915
14916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14917$as_echo_n "checking for devkit... " >&6; }
14918        if test "x$DEVKIT_NAME" != x; then
14919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14920$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14921        else
14922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14923$as_echo "$DEVKIT_ROOT" >&6; }
14924        fi
14925
14926
14927  if test "x$DEVKIT_EXTRA_PATH" != x; then
14928    if test "x$EXTRA_PATH" = x; then
14929      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14930    else
14931      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14932    fi
14933  fi
14934
14935
14936        # Fallback default of just /bin if DEVKIT_PATH is not defined
14937        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14938          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14939        fi
14940
14941  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14942    if test "x$TOOLCHAIN_PATH" = x; then
14943      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14944    else
14945      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14946    fi
14947  fi
14948
14949
14950        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14951        # places for backwards compatiblity.
14952        if test "x$DEVKIT_SYSROOT" != x; then
14953          SYSROOT="$DEVKIT_SYSROOT"
14954        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14955          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14956        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14957          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14958        fi
14959
14960
14961fi
14962
14963
14964  # You can force the sysroot if the sysroot encoded into the compiler tools
14965  # is not correct.
14966
14967# Check whether --with-sys-root was given.
14968if test "${with_sys_root+set}" = set; then :
14969  withval=$with_sys_root; SYSROOT=$with_sys_root
14970
14971fi
14972
14973
14974
14975# Check whether --with-sysroot was given.
14976if test "${with_sysroot+set}" = set; then :
14977  withval=$with_sysroot; SYSROOT=$with_sysroot
14978
14979fi
14980
14981
14982
14983# Check whether --with-tools-dir was given.
14984if test "${with_tools_dir+set}" = set; then :
14985  withval=$with_tools_dir;
14986  if test "x$with_tools_dir" != x; then
14987    if test "x$TOOLCHAIN_PATH" = x; then
14988      TOOLCHAIN_PATH="$with_tools_dir"
14989    else
14990      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14991    fi
14992  fi
14993
14994
14995fi
14996
14997
14998
14999# Check whether --with-toolchain-path was given.
15000if test "${with_toolchain_path+set}" = set; then :
15001  withval=$with_toolchain_path;
15002  if test "x$with_toolchain_path" != x; then
15003    if test "x$TOOLCHAIN_PATH" = x; then
15004      TOOLCHAIN_PATH="$with_toolchain_path"
15005    else
15006      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15007    fi
15008  fi
15009
15010
15011fi
15012
15013
15014
15015# Check whether --with-extra-path was given.
15016if test "${with_extra_path+set}" = set; then :
15017  withval=$with_extra_path;
15018  if test "x$with_extra_path" != x; then
15019    if test "x$EXTRA_PATH" = x; then
15020      EXTRA_PATH="$with_extra_path"
15021    else
15022      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15023    fi
15024  fi
15025
15026
15027fi
15028
15029
15030  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15031    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15032    # If not, detect if Xcode is installed by running xcodebuild -version
15033    # if no Xcode installed, xcodebuild exits with 1
15034    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15035    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15036      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15037      # fall back on the stub binary in /usr/bin/xcodebuild
15038      # Extract the first word of "xcodebuild", so it can be a program name with args.
15039set dummy xcodebuild; ac_word=$2
15040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15041$as_echo_n "checking for $ac_word... " >&6; }
15042if ${ac_cv_path_XCODEBUILD+:} false; then :
15043  $as_echo_n "(cached) " >&6
15044else
15045  case $XCODEBUILD in
15046  [\\/]* | ?:[\\/]*)
15047  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15048  ;;
15049  *)
15050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15051for as_dir in $TOOLCHAIN_PATH
15052do
15053  IFS=$as_save_IFS
15054  test -z "$as_dir" && as_dir=.
15055    for ac_exec_ext in '' $ac_executable_extensions; do
15056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15057    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15059    break 2
15060  fi
15061done
15062  done
15063IFS=$as_save_IFS
15064
15065  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15066  ;;
15067esac
15068fi
15069XCODEBUILD=$ac_cv_path_XCODEBUILD
15070if test -n "$XCODEBUILD"; then
15071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15072$as_echo "$XCODEBUILD" >&6; }
15073else
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075$as_echo "no" >&6; }
15076fi
15077
15078
15079    else
15080      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15081      # when only the command line tools are installed there are no SDKs, so headers
15082      # are copied into the system frameworks
15083      XCODEBUILD=
15084
15085    fi
15086
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15088$as_echo_n "checking for sdk name... " >&6; }
15089
15090# Check whether --with-sdk-name was given.
15091if test "${with_sdk_name+set}" = set; then :
15092  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15093
15094fi
15095
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15097$as_echo "$SDKNAME" >&6; }
15098
15099    # if toolchain path is specified then don't rely on system headers, they may not compile
15100    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15101    test -z "$TOOLCHAIN_PATH" && \
15102      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15103
15104    if test -z "$SYSROOT"; then
15105      if test -n "$XCODEBUILD"; then
15106        # if we don't have system headers, use default SDK name (last resort)
15107        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15108          SDKNAME=${SDKNAME:-macosx}
15109        fi
15110
15111        if test -n "$SDKNAME"; then
15112          # Call xcodebuild to determine SYSROOT
15113          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15114        fi
15115      else
15116        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15117          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15118        fi
15119      fi
15120    else
15121      # warn user if --with-sdk-name was also set
15122      if test -n "$with_sdk_name"; then
15123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15124$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15125      fi
15126    fi
15127
15128    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15129      # If no system framework headers, then SYSROOT must be set, or we won't build
15130      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15131    fi
15132
15133    # Perform a basic sanity test
15134    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15135      if test -z "$SYSROOT"; then
15136        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15137      else
15138        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15139      fi
15140    fi
15141
15142    # set SDKROOT too, Xcode tools will pick it up
15143    SDKROOT=$SYSROOT
15144
15145  fi
15146
15147  # Prepend the extra path to the global path
15148
15149  if test "x$EXTRA_PATH" != x; then
15150    if test "x$PATH" = x; then
15151      PATH="$EXTRA_PATH"
15152    else
15153      PATH="$EXTRA_PATH:$PATH"
15154    fi
15155  fi
15156
15157
15158  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15159    # Add extra search paths on solaris for utilities like ar and as etc...
15160    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15161  fi
15162
15163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15164$as_echo_n "checking for sysroot... " >&6; }
15165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15166$as_echo "$SYSROOT" >&6; }
15167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15168$as_echo_n "checking for toolchain path... " >&6; }
15169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15170$as_echo "$TOOLCHAIN_PATH" >&6; }
15171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15172$as_echo_n "checking for extra path... " >&6; }
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15174$as_echo "$EXTRA_PATH" >&6; }
15175
15176
15177# To properly create a configuration name, we need to have the OpenJDK target
15178# and options (variants and debug level) parsed.
15179
15180
15181
15182# Check whether --with-conf-name was given.
15183if test "${with_conf_name+set}" = set; then :
15184  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15185fi
15186
15187
15188  # Test from where we are running configure, in or outside of src root.
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15190$as_echo_n "checking where to store configuration... " >&6; }
15191  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15192      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15193      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15194    # We are running configure from the src root.
15195    # Create a default ./build/target-variant-debuglevel output root.
15196    if test "x${CONF_NAME}" = x; then
15197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15198$as_echo "in default location" >&6; }
15199      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15200    else
15201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15202$as_echo "in build directory with custom name" >&6; }
15203    fi
15204    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15205    $MKDIR -p "$OUTPUT_ROOT"
15206    if test ! -d "$OUTPUT_ROOT"; then
15207      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15208    fi
15209  else
15210    # We are running configure from outside of the src dir.
15211    # Then use the current directory as output dir!
15212    # If configuration is situated in normal build directory, just use the build
15213    # directory name as configuration name, otherwise use the complete path.
15214    if test "x${CONF_NAME}" = x; then
15215      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15216    fi
15217    OUTPUT_ROOT="$CURDIR"
15218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15219$as_echo "in current directory" >&6; }
15220
15221    # WARNING: This might be a bad thing to do. You need to be sure you want to
15222    # have a configuration in this directory. Do some sanity checks!
15223
15224    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15225      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15226      # other files
15227      files_present=`$LS $OUTPUT_ROOT`
15228      # Configure has already touched config.log and confdefs.h in the current dir when this check
15229      # is performed.
15230      filtered_files=`$ECHO "$files_present" \
15231          | $SED -e 's/config.log//g' \
15232              -e 's/configure.log//g' \
15233              -e 's/confdefs.h//g' \
15234              -e 's/ //g' \
15235          | $TR -d '\n'`
15236      if test "x$filtered_files" != x; then
15237        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15238$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15239        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15240$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15241        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15242$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15243        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15244$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15245        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15246$as_echo "$as_me: seriously mess up just about everything." >&6;}
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15248$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15250$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15251        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15252      fi
15253    fi
15254  fi
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15256$as_echo_n "checking what configuration name to use... " >&6; }
15257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15258$as_echo "$CONF_NAME" >&6; }
15259
15260
15261  # Only process if variable expands to non-empty
15262
15263  if test "x$OUTPUT_ROOT" != x; then
15264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15265
15266  # Input might be given as Windows format, start by converting to
15267  # unix format.
15268  path="$OUTPUT_ROOT"
15269  new_path=`$CYGPATH -u "$path"`
15270
15271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15274  # "foo.exe" is OK but "foo" is an error.
15275  #
15276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15277  # It is also a way to make sure we got the proper file name for the real test later on.
15278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15279  if test "x$test_shortpath" = x; then
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15281$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15282    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15283  fi
15284
15285  # Call helper function which possibly converts this using DOS-style short mode.
15286  # If so, the updated path is stored in $new_path.
15287
15288  input_path="$new_path"
15289  # Check if we need to convert this using DOS-style short mode. If the path
15290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15291  # take no chances and rewrite it.
15292  # Note: m4 eats our [], so we need to use [ and ] instead.
15293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15294  if test "x$has_forbidden_chars" != x; then
15295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15299      # Going to short mode and back again did indeed matter. Since short mode is
15300      # case insensitive, let's make it lowercase to improve readability.
15301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302      # Now convert it back to Unix-style (cygpath)
15303      input_path=`$CYGPATH -u "$shortmode_path"`
15304      new_path="$input_path"
15305    fi
15306  fi
15307
15308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15309  if test "x$test_cygdrive_prefix" = x; then
15310    # As a simple fix, exclude /usr/bin since it's not a real path.
15311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15313      # a path prefixed by /cygdrive for fixpath to work.
15314      new_path="$CYGWIN_ROOT_PATH$input_path"
15315    fi
15316  fi
15317
15318
15319  if test "x$path" != "x$new_path"; then
15320    OUTPUT_ROOT="$new_path"
15321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15322$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15323  fi
15324
15325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15326
15327  path="$OUTPUT_ROOT"
15328  has_colon=`$ECHO $path | $GREP ^.:`
15329  new_path="$path"
15330  if test "x$has_colon" = x; then
15331    # Not in mixed or Windows style, start by that.
15332    new_path=`cmd //c echo $path`
15333  fi
15334
15335
15336  input_path="$new_path"
15337  # Check if we need to convert this using DOS-style short mode. If the path
15338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15339  # take no chances and rewrite it.
15340  # Note: m4 eats our [], so we need to use [ and ] instead.
15341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15342  if test "x$has_forbidden_chars" != x; then
15343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15345  fi
15346
15347
15348  windows_path="$new_path"
15349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15350    unix_path=`$CYGPATH -u "$windows_path"`
15351    new_path="$unix_path"
15352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15354    new_path="$unix_path"
15355  fi
15356
15357  if test "x$path" != "x$new_path"; then
15358    OUTPUT_ROOT="$new_path"
15359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15360$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15361  fi
15362
15363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15365
15366    else
15367      # We're on a unix platform. Hooray! :)
15368      path="$OUTPUT_ROOT"
15369      has_space=`$ECHO "$path" | $GREP " "`
15370      if test "x$has_space" != x; then
15371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15372$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15374      fi
15375
15376      # Use eval to expand a potential ~
15377      eval path="$path"
15378      if test ! -f "$path" && test ! -d "$path"; then
15379        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15380      fi
15381
15382      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15383    fi
15384  fi
15385
15386
15387  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15388  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15389
15390  SPEC=$OUTPUT_ROOT/spec.gmk
15391
15392  CONF_NAME=$CONF_NAME
15393
15394  OUTPUT_ROOT=$OUTPUT_ROOT
15395
15396
15397
15398  # The spec.gmk file contains all variables for the make system.
15399  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15400
15401  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15402  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15403
15404  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15405  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15406
15407  # The compare.sh is used to compare the build output to other builds.
15408  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15409
15410  # The generated Makefile knows where the spec.gmk is and where the source is.
15411  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15412  # which will look for generated configurations
15413  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15414
15415
15416
15417# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15418
15419  for ac_prog in apt-get yum port pkgutil pkgadd
15420do
15421  # Extract the first word of "$ac_prog", so it can be a program name with args.
15422set dummy $ac_prog; ac_word=$2
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15424$as_echo_n "checking for $ac_word... " >&6; }
15425if ${ac_cv_prog_PKGHANDLER+:} false; then :
15426  $as_echo_n "(cached) " >&6
15427else
15428  if test -n "$PKGHANDLER"; then
15429  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15430else
15431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15432for as_dir in $PATH
15433do
15434  IFS=$as_save_IFS
15435  test -z "$as_dir" && as_dir=.
15436    for ac_exec_ext in '' $ac_executable_extensions; do
15437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15438    ac_cv_prog_PKGHANDLER="$ac_prog"
15439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15440    break 2
15441  fi
15442done
15443  done
15444IFS=$as_save_IFS
15445
15446fi
15447fi
15448PKGHANDLER=$ac_cv_prog_PKGHANDLER
15449if test -n "$PKGHANDLER"; then
15450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15451$as_echo "$PKGHANDLER" >&6; }
15452else
15453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15454$as_echo "no" >&6; }
15455fi
15456
15457
15458  test -n "$PKGHANDLER" && break
15459done
15460
15461
15462
15463# Setup tools that requires more complex handling, or that is not needed by the configure script.
15464
15465
15466  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15467  if test "x$MAKE" != x; then
15468    # User has supplied a make, test it.
15469    if test ! -f "$MAKE"; then
15470      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15471    fi
15472
15473  MAKE_CANDIDATE=""$MAKE""
15474  DESCRIPTION="user supplied MAKE=$MAKE"
15475
15476  # On Cygwin, we require a newer version of make than on other platforms
15477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15478    MAKE_VERSION_EXPR="-e 4\."
15479    MAKE_REQUIRED_VERSION="4.0"
15480   else
15481    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15482    MAKE_REQUIRED_VERSION="3.81"
15483  fi
15484
15485  if test "x$MAKE_CANDIDATE" != x; then
15486    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15487$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15488    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15489    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15490    if test "x$IS_GNU_MAKE" = x; then
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15492$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15493    else
15494      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15495      if test "x$IS_MODERN_MAKE" = x; then
15496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15497$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15498      else
15499        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15500          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15501            MAKE_EXPECTED_ENV='cygwin'
15502          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15503            MAKE_EXPECTED_ENV='msys'
15504          else
15505            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15506          fi
15507          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15508          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15509        else
15510          # Not relevant for non-Windows
15511          IS_MAKE_CORRECT_ENV=true
15512        fi
15513        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15514          { $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
15515$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;}
15516        else
15517          FOUND_MAKE=$MAKE_CANDIDATE
15518
15519  # Only process if variable expands to non-empty
15520
15521  if test "x$FOUND_MAKE" != x; then
15522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15523
15524  # First separate the path from the arguments. This will split at the first
15525  # space.
15526  complete="$FOUND_MAKE"
15527  path="${complete%% *}"
15528  tmp="$complete EOL"
15529  arguments="${tmp#* }"
15530
15531  # Input might be given as Windows format, start by converting to
15532  # unix format.
15533  new_path=`$CYGPATH -u "$path"`
15534
15535  # Now try to locate executable using which
15536  new_path=`$WHICH "$new_path" 2> /dev/null`
15537  # bat and cmd files are not always considered executable in cygwin causing which
15538  # to not find them
15539  if test "x$new_path" = x \
15540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15542    new_path=`$CYGPATH -u "$path"`
15543  fi
15544  if test "x$new_path" = x; then
15545    # Oops. Which didn't find the executable.
15546    # The splitting of arguments from the executable at a space might have been incorrect,
15547    # since paths with space are more likely in Windows. Give it another try with the whole
15548    # argument.
15549    path="$complete"
15550    arguments="EOL"
15551    new_path=`$CYGPATH -u "$path"`
15552    new_path=`$WHICH "$new_path" 2> /dev/null`
15553    # bat and cmd files are not always considered executable in cygwin causing which
15554    # to not find them
15555    if test "x$new_path" = x \
15556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15558      new_path=`$CYGPATH -u "$path"`
15559    fi
15560    if test "x$new_path" = x; then
15561      # It's still not found. Now this is an unrecoverable error.
15562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15563$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15564      has_space=`$ECHO "$complete" | $GREP " "`
15565      if test "x$has_space" != x; then
15566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15568      fi
15569      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15570    fi
15571  fi
15572
15573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15576  # "foo.exe" is OK but "foo" is an error.
15577  #
15578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15579  # It is also a way to make sure we got the proper file name for the real test later on.
15580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15581  if test "x$test_shortpath" = x; then
15582    # Short path failed, file does not exist as specified.
15583    # Try adding .exe or .cmd
15584    if test -f "${new_path}.exe"; then
15585      input_to_shortpath="${new_path}.exe"
15586    elif test -f "${new_path}.cmd"; then
15587      input_to_shortpath="${new_path}.cmd"
15588    else
15589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15594    fi
15595  else
15596    input_to_shortpath="$new_path"
15597  fi
15598
15599  # Call helper function which possibly converts this using DOS-style short mode.
15600  # If so, the updated path is stored in $new_path.
15601  new_path="$input_to_shortpath"
15602
15603  input_path="$input_to_shortpath"
15604  # Check if we need to convert this using DOS-style short mode. If the path
15605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15606  # take no chances and rewrite it.
15607  # Note: m4 eats our [], so we need to use [ and ] instead.
15608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15609  if test "x$has_forbidden_chars" != x; then
15610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15614      # Going to short mode and back again did indeed matter. Since short mode is
15615      # case insensitive, let's make it lowercase to improve readability.
15616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15617      # Now convert it back to Unix-style (cygpath)
15618      input_path=`$CYGPATH -u "$shortmode_path"`
15619      new_path="$input_path"
15620    fi
15621  fi
15622
15623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15624  if test "x$test_cygdrive_prefix" = x; then
15625    # As a simple fix, exclude /usr/bin since it's not a real path.
15626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15628      # a path prefixed by /cygdrive for fixpath to work.
15629      new_path="$CYGWIN_ROOT_PATH$input_path"
15630    fi
15631  fi
15632
15633  # remove trailing .exe if any
15634  new_path="${new_path/%.exe/}"
15635
15636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15637
15638  # First separate the path from the arguments. This will split at the first
15639  # space.
15640  complete="$FOUND_MAKE"
15641  path="${complete%% *}"
15642  tmp="$complete EOL"
15643  arguments="${tmp#* }"
15644
15645  # Input might be given as Windows format, start by converting to
15646  # unix format.
15647  new_path="$path"
15648
15649  windows_path="$new_path"
15650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15651    unix_path=`$CYGPATH -u "$windows_path"`
15652    new_path="$unix_path"
15653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15655    new_path="$unix_path"
15656  fi
15657
15658
15659  # Now try to locate executable using which
15660  new_path=`$WHICH "$new_path" 2> /dev/null`
15661
15662  if test "x$new_path" = x; then
15663    # Oops. Which didn't find the executable.
15664    # The splitting of arguments from the executable at a space might have been incorrect,
15665    # since paths with space are more likely in Windows. Give it another try with the whole
15666    # argument.
15667    path="$complete"
15668    arguments="EOL"
15669    new_path="$path"
15670
15671  windows_path="$new_path"
15672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15673    unix_path=`$CYGPATH -u "$windows_path"`
15674    new_path="$unix_path"
15675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15677    new_path="$unix_path"
15678  fi
15679
15680
15681    new_path=`$WHICH "$new_path" 2> /dev/null`
15682    # bat and cmd files are not always considered executable in MSYS causing which
15683    # to not find them
15684    if test "x$new_path" = x \
15685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15687      new_path="$path"
15688
15689  windows_path="$new_path"
15690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15691    unix_path=`$CYGPATH -u "$windows_path"`
15692    new_path="$unix_path"
15693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15695    new_path="$unix_path"
15696  fi
15697
15698    fi
15699
15700    if test "x$new_path" = x; then
15701      # It's still not found. Now this is an unrecoverable error.
15702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15703$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15704      has_space=`$ECHO "$complete" | $GREP " "`
15705      if test "x$has_space" != x; then
15706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15708      fi
15709      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15710    fi
15711  fi
15712
15713  # Now new_path has a complete unix path to the binary
15714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15715    # Keep paths in /bin as-is, but remove trailing .exe if any
15716    new_path="${new_path/%.exe/}"
15717    # Do not save /bin paths to all_fixpath_prefixes!
15718  else
15719    # Not in mixed or Windows style, start by that.
15720    new_path=`cmd //c echo $new_path`
15721
15722  input_path="$new_path"
15723  # Check if we need to convert this using DOS-style short mode. If the path
15724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15725  # take no chances and rewrite it.
15726  # Note: m4 eats our [], so we need to use [ and ] instead.
15727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15728  if test "x$has_forbidden_chars" != x; then
15729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15731  fi
15732
15733    # Output is in $new_path
15734
15735  windows_path="$new_path"
15736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15737    unix_path=`$CYGPATH -u "$windows_path"`
15738    new_path="$unix_path"
15739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15741    new_path="$unix_path"
15742  fi
15743
15744    # remove trailing .exe if any
15745    new_path="${new_path/%.exe/}"
15746
15747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15749  fi
15750
15751    else
15752      # We're on a unix platform. Hooray! :)
15753      # First separate the path from the arguments. This will split at the first
15754      # space.
15755      complete="$FOUND_MAKE"
15756      path="${complete%% *}"
15757      tmp="$complete EOL"
15758      arguments="${tmp#* }"
15759
15760      # Cannot rely on the command "which" here since it doesn't always work.
15761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15762      if test -z "$is_absolute_path"; then
15763        # Path to executable is not absolute. Find it.
15764        IFS_save="$IFS"
15765        IFS=:
15766        for p in $PATH; do
15767          if test -f "$p/$path" && test -x "$p/$path"; then
15768            new_path="$p/$path"
15769            break
15770          fi
15771        done
15772        IFS="$IFS_save"
15773      else
15774        # This is an absolute path, we can use it without further modifications.
15775        new_path="$path"
15776      fi
15777
15778      if test "x$new_path" = x; then
15779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15780$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15781        has_space=`$ECHO "$complete" | $GREP " "`
15782        if test "x$has_space" != x; then
15783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15785        fi
15786        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15787      fi
15788    fi
15789
15790    # Now join together the path and the arguments once again
15791    if test "x$arguments" != xEOL; then
15792      new_complete="$new_path ${arguments% *}"
15793    else
15794      new_complete="$new_path"
15795    fi
15796
15797    if test "x$complete" != "x$new_complete"; then
15798      FOUND_MAKE="$new_complete"
15799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15800$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15801    fi
15802  fi
15803
15804        fi
15805      fi
15806    fi
15807  fi
15808
15809    if test "x$FOUND_MAKE" = x; then
15810      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15811    fi
15812  else
15813    # Try our hardest to locate a correct version of GNU make
15814    for ac_prog in gmake
15815do
15816  # Extract the first word of "$ac_prog", so it can be a program name with args.
15817set dummy $ac_prog; ac_word=$2
15818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15819$as_echo_n "checking for $ac_word... " >&6; }
15820if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15821  $as_echo_n "(cached) " >&6
15822else
15823  case $CHECK_GMAKE in
15824  [\\/]* | ?:[\\/]*)
15825  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15826  ;;
15827  *)
15828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15829for as_dir in $PATH
15830do
15831  IFS=$as_save_IFS
15832  test -z "$as_dir" && as_dir=.
15833    for ac_exec_ext in '' $ac_executable_extensions; do
15834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15835    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15837    break 2
15838  fi
15839done
15840  done
15841IFS=$as_save_IFS
15842
15843  ;;
15844esac
15845fi
15846CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15847if test -n "$CHECK_GMAKE"; then
15848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15849$as_echo "$CHECK_GMAKE" >&6; }
15850else
15851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15852$as_echo "no" >&6; }
15853fi
15854
15855
15856  test -n "$CHECK_GMAKE" && break
15857done
15858
15859
15860  MAKE_CANDIDATE=""$CHECK_GMAKE""
15861  DESCRIPTION="gmake in PATH"
15862
15863  # On Cygwin, we require a newer version of make than on other platforms
15864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15865    MAKE_VERSION_EXPR="-e 4\."
15866    MAKE_REQUIRED_VERSION="4.0"
15867   else
15868    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15869    MAKE_REQUIRED_VERSION="3.81"
15870  fi
15871
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 $MAKE_VERSION_EXPR`
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 $MAKE_REQUIRED_VERSION 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 $MAKE_REQUIRED_VERSION 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  # Only process if variable expands to non-empty
15907
15908  if test "x$FOUND_MAKE" != x; then
15909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15910
15911  # First separate the path from the arguments. This will split at the first
15912  # space.
15913  complete="$FOUND_MAKE"
15914  path="${complete%% *}"
15915  tmp="$complete EOL"
15916  arguments="${tmp#* }"
15917
15918  # Input might be given as Windows format, start by converting to
15919  # unix format.
15920  new_path=`$CYGPATH -u "$path"`
15921
15922  # Now try to locate executable using which
15923  new_path=`$WHICH "$new_path" 2> /dev/null`
15924  # bat and cmd files are not always considered executable in cygwin causing which
15925  # to not find them
15926  if test "x$new_path" = x \
15927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15929    new_path=`$CYGPATH -u "$path"`
15930  fi
15931  if test "x$new_path" = x; then
15932    # Oops. Which didn't find the executable.
15933    # The splitting of arguments from the executable at a space might have been incorrect,
15934    # since paths with space are more likely in Windows. Give it another try with the whole
15935    # argument.
15936    path="$complete"
15937    arguments="EOL"
15938    new_path=`$CYGPATH -u "$path"`
15939    new_path=`$WHICH "$new_path" 2> /dev/null`
15940    # bat and cmd files are not always considered executable in cygwin causing which
15941    # to not find them
15942    if test "x$new_path" = x \
15943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15945      new_path=`$CYGPATH -u "$path"`
15946    fi
15947    if test "x$new_path" = x; then
15948      # It's still not found. Now this is an unrecoverable error.
15949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15950$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15951      has_space=`$ECHO "$complete" | $GREP " "`
15952      if test "x$has_space" != x; then
15953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15955      fi
15956      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15957    fi
15958  fi
15959
15960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15963  # "foo.exe" is OK but "foo" is an error.
15964  #
15965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15966  # It is also a way to make sure we got the proper file name for the real test later on.
15967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15968  if test "x$test_shortpath" = x; then
15969    # Short path failed, file does not exist as specified.
15970    # Try adding .exe or .cmd
15971    if test -f "${new_path}.exe"; then
15972      input_to_shortpath="${new_path}.exe"
15973    elif test -f "${new_path}.cmd"; then
15974      input_to_shortpath="${new_path}.cmd"
15975    else
15976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15981    fi
15982  else
15983    input_to_shortpath="$new_path"
15984  fi
15985
15986  # Call helper function which possibly converts this using DOS-style short mode.
15987  # If so, the updated path is stored in $new_path.
15988  new_path="$input_to_shortpath"
15989
15990  input_path="$input_to_shortpath"
15991  # Check if we need to convert this using DOS-style short mode. If the path
15992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15993  # take no chances and rewrite it.
15994  # Note: m4 eats our [], so we need to use [ and ] instead.
15995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15996  if test "x$has_forbidden_chars" != x; then
15997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16001      # Going to short mode and back again did indeed matter. Since short mode is
16002      # case insensitive, let's make it lowercase to improve readability.
16003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16004      # Now convert it back to Unix-style (cygpath)
16005      input_path=`$CYGPATH -u "$shortmode_path"`
16006      new_path="$input_path"
16007    fi
16008  fi
16009
16010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16011  if test "x$test_cygdrive_prefix" = x; then
16012    # As a simple fix, exclude /usr/bin since it's not a real path.
16013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16015      # a path prefixed by /cygdrive for fixpath to work.
16016      new_path="$CYGWIN_ROOT_PATH$input_path"
16017    fi
16018  fi
16019
16020  # remove trailing .exe if any
16021  new_path="${new_path/%.exe/}"
16022
16023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16024
16025  # First separate the path from the arguments. This will split at the first
16026  # space.
16027  complete="$FOUND_MAKE"
16028  path="${complete%% *}"
16029  tmp="$complete EOL"
16030  arguments="${tmp#* }"
16031
16032  # Input might be given as Windows format, start by converting to
16033  # unix format.
16034  new_path="$path"
16035
16036  windows_path="$new_path"
16037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16038    unix_path=`$CYGPATH -u "$windows_path"`
16039    new_path="$unix_path"
16040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16042    new_path="$unix_path"
16043  fi
16044
16045
16046  # Now try to locate executable using which
16047  new_path=`$WHICH "$new_path" 2> /dev/null`
16048
16049  if test "x$new_path" = x; then
16050    # Oops. Which didn't find the executable.
16051    # The splitting of arguments from the executable at a space might have been incorrect,
16052    # since paths with space are more likely in Windows. Give it another try with the whole
16053    # argument.
16054    path="$complete"
16055    arguments="EOL"
16056    new_path="$path"
16057
16058  windows_path="$new_path"
16059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16060    unix_path=`$CYGPATH -u "$windows_path"`
16061    new_path="$unix_path"
16062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16064    new_path="$unix_path"
16065  fi
16066
16067
16068    new_path=`$WHICH "$new_path" 2> /dev/null`
16069    # bat and cmd files are not always considered executable in MSYS causing which
16070    # to not find them
16071    if test "x$new_path" = x \
16072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16074      new_path="$path"
16075
16076  windows_path="$new_path"
16077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16078    unix_path=`$CYGPATH -u "$windows_path"`
16079    new_path="$unix_path"
16080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16082    new_path="$unix_path"
16083  fi
16084
16085    fi
16086
16087    if test "x$new_path" = x; then
16088      # It's still not found. Now this is an unrecoverable error.
16089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16091      has_space=`$ECHO "$complete" | $GREP " "`
16092      if test "x$has_space" != x; then
16093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16095      fi
16096      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16097    fi
16098  fi
16099
16100  # Now new_path has a complete unix path to the binary
16101  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16102    # Keep paths in /bin as-is, but remove trailing .exe if any
16103    new_path="${new_path/%.exe/}"
16104    # Do not save /bin paths to all_fixpath_prefixes!
16105  else
16106    # Not in mixed or Windows style, start by that.
16107    new_path=`cmd //c echo $new_path`
16108
16109  input_path="$new_path"
16110  # Check if we need to convert this using DOS-style short mode. If the path
16111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16112  # take no chances and rewrite it.
16113  # Note: m4 eats our [], so we need to use [ and ] instead.
16114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16115  if test "x$has_forbidden_chars" != x; then
16116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16118  fi
16119
16120    # Output is in $new_path
16121
16122  windows_path="$new_path"
16123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16124    unix_path=`$CYGPATH -u "$windows_path"`
16125    new_path="$unix_path"
16126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16128    new_path="$unix_path"
16129  fi
16130
16131    # remove trailing .exe if any
16132    new_path="${new_path/%.exe/}"
16133
16134    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16135    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16136  fi
16137
16138    else
16139      # We're on a unix platform. Hooray! :)
16140      # First separate the path from the arguments. This will split at the first
16141      # space.
16142      complete="$FOUND_MAKE"
16143      path="${complete%% *}"
16144      tmp="$complete EOL"
16145      arguments="${tmp#* }"
16146
16147      # Cannot rely on the command "which" here since it doesn't always work.
16148      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16149      if test -z "$is_absolute_path"; then
16150        # Path to executable is not absolute. Find it.
16151        IFS_save="$IFS"
16152        IFS=:
16153        for p in $PATH; do
16154          if test -f "$p/$path" && test -x "$p/$path"; then
16155            new_path="$p/$path"
16156            break
16157          fi
16158        done
16159        IFS="$IFS_save"
16160      else
16161        # This is an absolute path, we can use it without further modifications.
16162        new_path="$path"
16163      fi
16164
16165      if test "x$new_path" = x; then
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16168        has_space=`$ECHO "$complete" | $GREP " "`
16169        if test "x$has_space" != x; then
16170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16172        fi
16173        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16174      fi
16175    fi
16176
16177    # Now join together the path and the arguments once again
16178    if test "x$arguments" != xEOL; then
16179      new_complete="$new_path ${arguments% *}"
16180    else
16181      new_complete="$new_path"
16182    fi
16183
16184    if test "x$complete" != "x$new_complete"; then
16185      FOUND_MAKE="$new_complete"
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16187$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16188    fi
16189  fi
16190
16191        fi
16192      fi
16193    fi
16194  fi
16195
16196
16197    if test "x$FOUND_MAKE" = x; then
16198      for ac_prog in make
16199do
16200  # Extract the first word of "$ac_prog", so it can be a program name with args.
16201set dummy $ac_prog; ac_word=$2
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16203$as_echo_n "checking for $ac_word... " >&6; }
16204if ${ac_cv_path_CHECK_MAKE+:} false; then :
16205  $as_echo_n "(cached) " >&6
16206else
16207  case $CHECK_MAKE in
16208  [\\/]* | ?:[\\/]*)
16209  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16210  ;;
16211  *)
16212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16213for as_dir in $PATH
16214do
16215  IFS=$as_save_IFS
16216  test -z "$as_dir" && as_dir=.
16217    for ac_exec_ext in '' $ac_executable_extensions; do
16218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16219    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16221    break 2
16222  fi
16223done
16224  done
16225IFS=$as_save_IFS
16226
16227  ;;
16228esac
16229fi
16230CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16231if test -n "$CHECK_MAKE"; then
16232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16233$as_echo "$CHECK_MAKE" >&6; }
16234else
16235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16236$as_echo "no" >&6; }
16237fi
16238
16239
16240  test -n "$CHECK_MAKE" && break
16241done
16242
16243
16244  MAKE_CANDIDATE=""$CHECK_MAKE""
16245  DESCRIPTION="make in PATH"
16246
16247  # On Cygwin, we require a newer version of make than on other platforms
16248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16249    MAKE_VERSION_EXPR="-e 4\."
16250    MAKE_REQUIRED_VERSION="4.0"
16251   else
16252    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16253    MAKE_REQUIRED_VERSION="3.81"
16254  fi
16255
16256  if test "x$MAKE_CANDIDATE" != x; then
16257    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16258$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16259    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16260    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16261    if test "x$IS_GNU_MAKE" = x; then
16262      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16263$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16264    else
16265      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16266      if test "x$IS_MODERN_MAKE" = x; then
16267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16268$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16269      else
16270        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16271          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16272            MAKE_EXPECTED_ENV='cygwin'
16273          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16274            MAKE_EXPECTED_ENV='msys'
16275          else
16276            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16277          fi
16278          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16279          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16280        else
16281          # Not relevant for non-Windows
16282          IS_MAKE_CORRECT_ENV=true
16283        fi
16284        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16285          { $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
16286$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;}
16287        else
16288          FOUND_MAKE=$MAKE_CANDIDATE
16289
16290  # Only process if variable expands to non-empty
16291
16292  if test "x$FOUND_MAKE" != x; then
16293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16294
16295  # First separate the path from the arguments. This will split at the first
16296  # space.
16297  complete="$FOUND_MAKE"
16298  path="${complete%% *}"
16299  tmp="$complete EOL"
16300  arguments="${tmp#* }"
16301
16302  # Input might be given as Windows format, start by converting to
16303  # unix format.
16304  new_path=`$CYGPATH -u "$path"`
16305
16306  # Now try to locate executable using which
16307  new_path=`$WHICH "$new_path" 2> /dev/null`
16308  # bat and cmd files are not always considered executable in cygwin causing which
16309  # to not find them
16310  if test "x$new_path" = x \
16311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16313    new_path=`$CYGPATH -u "$path"`
16314  fi
16315  if test "x$new_path" = x; then
16316    # Oops. Which didn't find the executable.
16317    # The splitting of arguments from the executable at a space might have been incorrect,
16318    # since paths with space are more likely in Windows. Give it another try with the whole
16319    # argument.
16320    path="$complete"
16321    arguments="EOL"
16322    new_path=`$CYGPATH -u "$path"`
16323    new_path=`$WHICH "$new_path" 2> /dev/null`
16324    # bat and cmd files are not always considered executable in cygwin causing which
16325    # to not find them
16326    if test "x$new_path" = x \
16327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16329      new_path=`$CYGPATH -u "$path"`
16330    fi
16331    if test "x$new_path" = x; then
16332      # It's still not found. Now this is an unrecoverable error.
16333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16335      has_space=`$ECHO "$complete" | $GREP " "`
16336      if test "x$has_space" != x; then
16337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16339      fi
16340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16341    fi
16342  fi
16343
16344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16347  # "foo.exe" is OK but "foo" is an error.
16348  #
16349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16350  # It is also a way to make sure we got the proper file name for the real test later on.
16351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16352  if test "x$test_shortpath" = x; then
16353    # Short path failed, file does not exist as specified.
16354    # Try adding .exe or .cmd
16355    if test -f "${new_path}.exe"; then
16356      input_to_shortpath="${new_path}.exe"
16357    elif test -f "${new_path}.cmd"; then
16358      input_to_shortpath="${new_path}.cmd"
16359    else
16360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16361$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16365    fi
16366  else
16367    input_to_shortpath="$new_path"
16368  fi
16369
16370  # Call helper function which possibly converts this using DOS-style short mode.
16371  # If so, the updated path is stored in $new_path.
16372  new_path="$input_to_shortpath"
16373
16374  input_path="$input_to_shortpath"
16375  # Check if we need to convert this using DOS-style short mode. If the path
16376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16377  # take no chances and rewrite it.
16378  # Note: m4 eats our [], so we need to use [ and ] instead.
16379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16380  if test "x$has_forbidden_chars" != x; then
16381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16385      # Going to short mode and back again did indeed matter. Since short mode is
16386      # case insensitive, let's make it lowercase to improve readability.
16387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16388      # Now convert it back to Unix-style (cygpath)
16389      input_path=`$CYGPATH -u "$shortmode_path"`
16390      new_path="$input_path"
16391    fi
16392  fi
16393
16394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16395  if test "x$test_cygdrive_prefix" = x; then
16396    # As a simple fix, exclude /usr/bin since it's not a real path.
16397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16399      # a path prefixed by /cygdrive for fixpath to work.
16400      new_path="$CYGWIN_ROOT_PATH$input_path"
16401    fi
16402  fi
16403
16404  # remove trailing .exe if any
16405  new_path="${new_path/%.exe/}"
16406
16407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408
16409  # First separate the path from the arguments. This will split at the first
16410  # space.
16411  complete="$FOUND_MAKE"
16412  path="${complete%% *}"
16413  tmp="$complete EOL"
16414  arguments="${tmp#* }"
16415
16416  # Input might be given as Windows format, start by converting to
16417  # unix format.
16418  new_path="$path"
16419
16420  windows_path="$new_path"
16421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16422    unix_path=`$CYGPATH -u "$windows_path"`
16423    new_path="$unix_path"
16424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16426    new_path="$unix_path"
16427  fi
16428
16429
16430  # Now try to locate executable using which
16431  new_path=`$WHICH "$new_path" 2> /dev/null`
16432
16433  if test "x$new_path" = x; then
16434    # Oops. Which didn't find the executable.
16435    # The splitting of arguments from the executable at a space might have been incorrect,
16436    # since paths with space are more likely in Windows. Give it another try with the whole
16437    # argument.
16438    path="$complete"
16439    arguments="EOL"
16440    new_path="$path"
16441
16442  windows_path="$new_path"
16443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16444    unix_path=`$CYGPATH -u "$windows_path"`
16445    new_path="$unix_path"
16446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16448    new_path="$unix_path"
16449  fi
16450
16451
16452    new_path=`$WHICH "$new_path" 2> /dev/null`
16453    # bat and cmd files are not always considered executable in MSYS causing which
16454    # to not find them
16455    if test "x$new_path" = x \
16456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16458      new_path="$path"
16459
16460  windows_path="$new_path"
16461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16462    unix_path=`$CYGPATH -u "$windows_path"`
16463    new_path="$unix_path"
16464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16466    new_path="$unix_path"
16467  fi
16468
16469    fi
16470
16471    if test "x$new_path" = x; then
16472      # It's still not found. Now this is an unrecoverable error.
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16475      has_space=`$ECHO "$complete" | $GREP " "`
16476      if test "x$has_space" != x; then
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16479      fi
16480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16481    fi
16482  fi
16483
16484  # Now new_path has a complete unix path to the binary
16485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16486    # Keep paths in /bin as-is, but remove trailing .exe if any
16487    new_path="${new_path/%.exe/}"
16488    # Do not save /bin paths to all_fixpath_prefixes!
16489  else
16490    # Not in mixed or Windows style, start by that.
16491    new_path=`cmd //c echo $new_path`
16492
16493  input_path="$new_path"
16494  # Check if we need to convert this using DOS-style short mode. If the path
16495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16496  # take no chances and rewrite it.
16497  # Note: m4 eats our [], so we need to use [ and ] instead.
16498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16499  if test "x$has_forbidden_chars" != x; then
16500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16502  fi
16503
16504    # Output is in $new_path
16505
16506  windows_path="$new_path"
16507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16508    unix_path=`$CYGPATH -u "$windows_path"`
16509    new_path="$unix_path"
16510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16512    new_path="$unix_path"
16513  fi
16514
16515    # remove trailing .exe if any
16516    new_path="${new_path/%.exe/}"
16517
16518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16520  fi
16521
16522    else
16523      # We're on a unix platform. Hooray! :)
16524      # First separate the path from the arguments. This will split at the first
16525      # space.
16526      complete="$FOUND_MAKE"
16527      path="${complete%% *}"
16528      tmp="$complete EOL"
16529      arguments="${tmp#* }"
16530
16531      # Cannot rely on the command "which" here since it doesn't always work.
16532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16533      if test -z "$is_absolute_path"; then
16534        # Path to executable is not absolute. Find it.
16535        IFS_save="$IFS"
16536        IFS=:
16537        for p in $PATH; do
16538          if test -f "$p/$path" && test -x "$p/$path"; then
16539            new_path="$p/$path"
16540            break
16541          fi
16542        done
16543        IFS="$IFS_save"
16544      else
16545        # This is an absolute path, we can use it without further modifications.
16546        new_path="$path"
16547      fi
16548
16549      if test "x$new_path" = x; then
16550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16552        has_space=`$ECHO "$complete" | $GREP " "`
16553        if test "x$has_space" != x; then
16554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16556        fi
16557        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16558      fi
16559    fi
16560
16561    # Now join together the path and the arguments once again
16562    if test "x$arguments" != xEOL; then
16563      new_complete="$new_path ${arguments% *}"
16564    else
16565      new_complete="$new_path"
16566    fi
16567
16568    if test "x$complete" != "x$new_complete"; then
16569      FOUND_MAKE="$new_complete"
16570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16571$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16572    fi
16573  fi
16574
16575        fi
16576      fi
16577    fi
16578  fi
16579
16580    fi
16581
16582    if test "x$FOUND_MAKE" = x; then
16583      if test "x$TOOLCHAIN_PATH" != x; then
16584        # We have a toolchain path, check that as well before giving up.
16585        OLD_PATH=$PATH
16586        PATH=$TOOLCHAIN_PATH:$PATH
16587        for ac_prog in gmake
16588do
16589  # Extract the first word of "$ac_prog", so it can be a program name with args.
16590set dummy $ac_prog; ac_word=$2
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16592$as_echo_n "checking for $ac_word... " >&6; }
16593if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16594  $as_echo_n "(cached) " >&6
16595else
16596  case $CHECK_TOOLSDIR_GMAKE in
16597  [\\/]* | ?:[\\/]*)
16598  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16599  ;;
16600  *)
16601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16602for as_dir in $PATH
16603do
16604  IFS=$as_save_IFS
16605  test -z "$as_dir" && as_dir=.
16606    for ac_exec_ext in '' $ac_executable_extensions; do
16607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16608    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16610    break 2
16611  fi
16612done
16613  done
16614IFS=$as_save_IFS
16615
16616  ;;
16617esac
16618fi
16619CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16620if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16622$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16623else
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
16626fi
16627
16628
16629  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16630done
16631
16632
16633  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16634  DESCRIPTION="gmake in tools-dir"
16635
16636  # On Cygwin, we require a newer version of make than on other platforms
16637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16638    MAKE_VERSION_EXPR="-e 4\."
16639    MAKE_REQUIRED_VERSION="4.0"
16640   else
16641    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16642    MAKE_REQUIRED_VERSION="3.81"
16643  fi
16644
16645  if test "x$MAKE_CANDIDATE" != x; then
16646    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16647$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16648    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16649    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16650    if test "x$IS_GNU_MAKE" = x; then
16651      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16652$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16653    else
16654      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16655      if test "x$IS_MODERN_MAKE" = x; then
16656        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16657$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16658      else
16659        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16660          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16661            MAKE_EXPECTED_ENV='cygwin'
16662          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16663            MAKE_EXPECTED_ENV='msys'
16664          else
16665            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16666          fi
16667          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16668          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16669        else
16670          # Not relevant for non-Windows
16671          IS_MAKE_CORRECT_ENV=true
16672        fi
16673        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16674          { $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
16675$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;}
16676        else
16677          FOUND_MAKE=$MAKE_CANDIDATE
16678
16679  # Only process if variable expands to non-empty
16680
16681  if test "x$FOUND_MAKE" != x; then
16682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16683
16684  # First separate the path from the arguments. This will split at the first
16685  # space.
16686  complete="$FOUND_MAKE"
16687  path="${complete%% *}"
16688  tmp="$complete EOL"
16689  arguments="${tmp#* }"
16690
16691  # Input might be given as Windows format, start by converting to
16692  # unix format.
16693  new_path=`$CYGPATH -u "$path"`
16694
16695  # Now try to locate executable using which
16696  new_path=`$WHICH "$new_path" 2> /dev/null`
16697  # bat and cmd files are not always considered executable in cygwin causing which
16698  # to not find them
16699  if test "x$new_path" = x \
16700      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16701      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16702    new_path=`$CYGPATH -u "$path"`
16703  fi
16704  if test "x$new_path" = x; then
16705    # Oops. Which didn't find the executable.
16706    # The splitting of arguments from the executable at a space might have been incorrect,
16707    # since paths with space are more likely in Windows. Give it another try with the whole
16708    # argument.
16709    path="$complete"
16710    arguments="EOL"
16711    new_path=`$CYGPATH -u "$path"`
16712    new_path=`$WHICH "$new_path" 2> /dev/null`
16713    # bat and cmd files are not always considered executable in cygwin causing which
16714    # to not find them
16715    if test "x$new_path" = x \
16716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16718      new_path=`$CYGPATH -u "$path"`
16719    fi
16720    if test "x$new_path" = x; then
16721      # It's still not found. Now this is an unrecoverable error.
16722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16723$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16724      has_space=`$ECHO "$complete" | $GREP " "`
16725      if test "x$has_space" != x; then
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16728      fi
16729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16730    fi
16731  fi
16732
16733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16736  # "foo.exe" is OK but "foo" is an error.
16737  #
16738  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16739  # It is also a way to make sure we got the proper file name for the real test later on.
16740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16741  if test "x$test_shortpath" = x; then
16742    # Short path failed, file does not exist as specified.
16743    # Try adding .exe or .cmd
16744    if test -f "${new_path}.exe"; then
16745      input_to_shortpath="${new_path}.exe"
16746    elif test -f "${new_path}.cmd"; then
16747      input_to_shortpath="${new_path}.cmd"
16748    else
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16753      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16754    fi
16755  else
16756    input_to_shortpath="$new_path"
16757  fi
16758
16759  # Call helper function which possibly converts this using DOS-style short mode.
16760  # If so, the updated path is stored in $new_path.
16761  new_path="$input_to_shortpath"
16762
16763  input_path="$input_to_shortpath"
16764  # Check if we need to convert this using DOS-style short mode. If the path
16765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16766  # take no chances and rewrite it.
16767  # Note: m4 eats our [], so we need to use [ and ] instead.
16768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16769  if test "x$has_forbidden_chars" != x; then
16770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16774      # Going to short mode and back again did indeed matter. Since short mode is
16775      # case insensitive, let's make it lowercase to improve readability.
16776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16777      # Now convert it back to Unix-style (cygpath)
16778      input_path=`$CYGPATH -u "$shortmode_path"`
16779      new_path="$input_path"
16780    fi
16781  fi
16782
16783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16784  if test "x$test_cygdrive_prefix" = x; then
16785    # As a simple fix, exclude /usr/bin since it's not a real path.
16786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16788      # a path prefixed by /cygdrive for fixpath to work.
16789      new_path="$CYGWIN_ROOT_PATH$input_path"
16790    fi
16791  fi
16792
16793  # remove trailing .exe if any
16794  new_path="${new_path/%.exe/}"
16795
16796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16797
16798  # First separate the path from the arguments. This will split at the first
16799  # space.
16800  complete="$FOUND_MAKE"
16801  path="${complete%% *}"
16802  tmp="$complete EOL"
16803  arguments="${tmp#* }"
16804
16805  # Input might be given as Windows format, start by converting to
16806  # unix format.
16807  new_path="$path"
16808
16809  windows_path="$new_path"
16810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16811    unix_path=`$CYGPATH -u "$windows_path"`
16812    new_path="$unix_path"
16813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16815    new_path="$unix_path"
16816  fi
16817
16818
16819  # Now try to locate executable using which
16820  new_path=`$WHICH "$new_path" 2> /dev/null`
16821
16822  if test "x$new_path" = x; then
16823    # Oops. Which didn't find the executable.
16824    # The splitting of arguments from the executable at a space might have been incorrect,
16825    # since paths with space are more likely in Windows. Give it another try with the whole
16826    # argument.
16827    path="$complete"
16828    arguments="EOL"
16829    new_path="$path"
16830
16831  windows_path="$new_path"
16832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16833    unix_path=`$CYGPATH -u "$windows_path"`
16834    new_path="$unix_path"
16835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16837    new_path="$unix_path"
16838  fi
16839
16840
16841    new_path=`$WHICH "$new_path" 2> /dev/null`
16842    # bat and cmd files are not always considered executable in MSYS causing which
16843    # to not find them
16844    if test "x$new_path" = x \
16845        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16846        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16847      new_path="$path"
16848
16849  windows_path="$new_path"
16850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16851    unix_path=`$CYGPATH -u "$windows_path"`
16852    new_path="$unix_path"
16853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16855    new_path="$unix_path"
16856  fi
16857
16858    fi
16859
16860    if test "x$new_path" = x; then
16861      # It's still not found. Now this is an unrecoverable error.
16862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16864      has_space=`$ECHO "$complete" | $GREP " "`
16865      if test "x$has_space" != x; then
16866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16868      fi
16869      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16870    fi
16871  fi
16872
16873  # Now new_path has a complete unix path to the binary
16874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16875    # Keep paths in /bin as-is, but remove trailing .exe if any
16876    new_path="${new_path/%.exe/}"
16877    # Do not save /bin paths to all_fixpath_prefixes!
16878  else
16879    # Not in mixed or Windows style, start by that.
16880    new_path=`cmd //c echo $new_path`
16881
16882  input_path="$new_path"
16883  # Check if we need to convert this using DOS-style short mode. If the path
16884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16885  # take no chances and rewrite it.
16886  # Note: m4 eats our [], so we need to use [ and ] instead.
16887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16888  if test "x$has_forbidden_chars" != x; then
16889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16891  fi
16892
16893    # Output is in $new_path
16894
16895  windows_path="$new_path"
16896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897    unix_path=`$CYGPATH -u "$windows_path"`
16898    new_path="$unix_path"
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16901    new_path="$unix_path"
16902  fi
16903
16904    # remove trailing .exe if any
16905    new_path="${new_path/%.exe/}"
16906
16907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16909  fi
16910
16911    else
16912      # We're on a unix platform. Hooray! :)
16913      # First separate the path from the arguments. This will split at the first
16914      # space.
16915      complete="$FOUND_MAKE"
16916      path="${complete%% *}"
16917      tmp="$complete EOL"
16918      arguments="${tmp#* }"
16919
16920      # Cannot rely on the command "which" here since it doesn't always work.
16921      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16922      if test -z "$is_absolute_path"; then
16923        # Path to executable is not absolute. Find it.
16924        IFS_save="$IFS"
16925        IFS=:
16926        for p in $PATH; do
16927          if test -f "$p/$path" && test -x "$p/$path"; then
16928            new_path="$p/$path"
16929            break
16930          fi
16931        done
16932        IFS="$IFS_save"
16933      else
16934        # This is an absolute path, we can use it without further modifications.
16935        new_path="$path"
16936      fi
16937
16938      if test "x$new_path" = x; then
16939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16940$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16941        has_space=`$ECHO "$complete" | $GREP " "`
16942        if test "x$has_space" != x; then
16943          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16945        fi
16946        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16947      fi
16948    fi
16949
16950    # Now join together the path and the arguments once again
16951    if test "x$arguments" != xEOL; then
16952      new_complete="$new_path ${arguments% *}"
16953    else
16954      new_complete="$new_path"
16955    fi
16956
16957    if test "x$complete" != "x$new_complete"; then
16958      FOUND_MAKE="$new_complete"
16959      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16960$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16961    fi
16962  fi
16963
16964        fi
16965      fi
16966    fi
16967  fi
16968
16969        if test "x$FOUND_MAKE" = x; then
16970          for ac_prog in make
16971do
16972  # Extract the first word of "$ac_prog", so it can be a program name with args.
16973set dummy $ac_prog; ac_word=$2
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16975$as_echo_n "checking for $ac_word... " >&6; }
16976if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16977  $as_echo_n "(cached) " >&6
16978else
16979  case $CHECK_TOOLSDIR_MAKE in
16980  [\\/]* | ?:[\\/]*)
16981  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16982  ;;
16983  *)
16984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16985for as_dir in $PATH
16986do
16987  IFS=$as_save_IFS
16988  test -z "$as_dir" && as_dir=.
16989    for ac_exec_ext in '' $ac_executable_extensions; do
16990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16991    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16993    break 2
16994  fi
16995done
16996  done
16997IFS=$as_save_IFS
16998
16999  ;;
17000esac
17001fi
17002CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17003if test -n "$CHECK_TOOLSDIR_MAKE"; then
17004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17005$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17006else
17007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17008$as_echo "no" >&6; }
17009fi
17010
17011
17012  test -n "$CHECK_TOOLSDIR_MAKE" && break
17013done
17014
17015
17016  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17017  DESCRIPTION="make in tools-dir"
17018
17019  # On Cygwin, we require a newer version of make than on other platforms
17020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17021    MAKE_VERSION_EXPR="-e 4\."
17022    MAKE_REQUIRED_VERSION="4.0"
17023   else
17024    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17025    MAKE_REQUIRED_VERSION="3.81"
17026  fi
17027
17028  if test "x$MAKE_CANDIDATE" != x; then
17029    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17030$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17031    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17032    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17033    if test "x$IS_GNU_MAKE" = x; then
17034      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17035$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17036    else
17037      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17038      if test "x$IS_MODERN_MAKE" = x; then
17039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17040$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17041      else
17042        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17043          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17044            MAKE_EXPECTED_ENV='cygwin'
17045          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17046            MAKE_EXPECTED_ENV='msys'
17047          else
17048            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17049          fi
17050          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17051          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17052        else
17053          # Not relevant for non-Windows
17054          IS_MAKE_CORRECT_ENV=true
17055        fi
17056        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17057          { $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
17058$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;}
17059        else
17060          FOUND_MAKE=$MAKE_CANDIDATE
17061
17062  # Only process if variable expands to non-empty
17063
17064  if test "x$FOUND_MAKE" != x; then
17065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17066
17067  # First separate the path from the arguments. This will split at the first
17068  # space.
17069  complete="$FOUND_MAKE"
17070  path="${complete%% *}"
17071  tmp="$complete EOL"
17072  arguments="${tmp#* }"
17073
17074  # Input might be given as Windows format, start by converting to
17075  # unix format.
17076  new_path=`$CYGPATH -u "$path"`
17077
17078  # Now try to locate executable using which
17079  new_path=`$WHICH "$new_path" 2> /dev/null`
17080  # bat and cmd files are not always considered executable in cygwin causing which
17081  # to not find them
17082  if test "x$new_path" = x \
17083      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17084      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17085    new_path=`$CYGPATH -u "$path"`
17086  fi
17087  if test "x$new_path" = x; then
17088    # Oops. Which didn't find the executable.
17089    # The splitting of arguments from the executable at a space might have been incorrect,
17090    # since paths with space are more likely in Windows. Give it another try with the whole
17091    # argument.
17092    path="$complete"
17093    arguments="EOL"
17094    new_path=`$CYGPATH -u "$path"`
17095    new_path=`$WHICH "$new_path" 2> /dev/null`
17096    # bat and cmd files are not always considered executable in cygwin causing which
17097    # to not find them
17098    if test "x$new_path" = x \
17099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17101      new_path=`$CYGPATH -u "$path"`
17102    fi
17103    if test "x$new_path" = x; then
17104      # It's still not found. Now this is an unrecoverable error.
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17107      has_space=`$ECHO "$complete" | $GREP " "`
17108      if test "x$has_space" != x; then
17109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17111      fi
17112      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17113    fi
17114  fi
17115
17116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17119  # "foo.exe" is OK but "foo" is an error.
17120  #
17121  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17122  # It is also a way to make sure we got the proper file name for the real test later on.
17123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17124  if test "x$test_shortpath" = x; then
17125    # Short path failed, file does not exist as specified.
17126    # Try adding .exe or .cmd
17127    if test -f "${new_path}.exe"; then
17128      input_to_shortpath="${new_path}.exe"
17129    elif test -f "${new_path}.cmd"; then
17130      input_to_shortpath="${new_path}.cmd"
17131    else
17132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17134      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17135$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17136      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17137    fi
17138  else
17139    input_to_shortpath="$new_path"
17140  fi
17141
17142  # Call helper function which possibly converts this using DOS-style short mode.
17143  # If so, the updated path is stored in $new_path.
17144  new_path="$input_to_shortpath"
17145
17146  input_path="$input_to_shortpath"
17147  # Check if we need to convert this using DOS-style short mode. If the path
17148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17149  # take no chances and rewrite it.
17150  # Note: m4 eats our [], so we need to use [ and ] instead.
17151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17152  if test "x$has_forbidden_chars" != x; then
17153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17157      # Going to short mode and back again did indeed matter. Since short mode is
17158      # case insensitive, let's make it lowercase to improve readability.
17159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17160      # Now convert it back to Unix-style (cygpath)
17161      input_path=`$CYGPATH -u "$shortmode_path"`
17162      new_path="$input_path"
17163    fi
17164  fi
17165
17166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17167  if test "x$test_cygdrive_prefix" = x; then
17168    # As a simple fix, exclude /usr/bin since it's not a real path.
17169    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17171      # a path prefixed by /cygdrive for fixpath to work.
17172      new_path="$CYGWIN_ROOT_PATH$input_path"
17173    fi
17174  fi
17175
17176  # remove trailing .exe if any
17177  new_path="${new_path/%.exe/}"
17178
17179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17180
17181  # First separate the path from the arguments. This will split at the first
17182  # space.
17183  complete="$FOUND_MAKE"
17184  path="${complete%% *}"
17185  tmp="$complete EOL"
17186  arguments="${tmp#* }"
17187
17188  # Input might be given as Windows format, start by converting to
17189  # unix format.
17190  new_path="$path"
17191
17192  windows_path="$new_path"
17193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17194    unix_path=`$CYGPATH -u "$windows_path"`
17195    new_path="$unix_path"
17196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17198    new_path="$unix_path"
17199  fi
17200
17201
17202  # Now try to locate executable using which
17203  new_path=`$WHICH "$new_path" 2> /dev/null`
17204
17205  if test "x$new_path" = x; then
17206    # Oops. Which didn't find the executable.
17207    # The splitting of arguments from the executable at a space might have been incorrect,
17208    # since paths with space are more likely in Windows. Give it another try with the whole
17209    # argument.
17210    path="$complete"
17211    arguments="EOL"
17212    new_path="$path"
17213
17214  windows_path="$new_path"
17215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17216    unix_path=`$CYGPATH -u "$windows_path"`
17217    new_path="$unix_path"
17218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17220    new_path="$unix_path"
17221  fi
17222
17223
17224    new_path=`$WHICH "$new_path" 2> /dev/null`
17225    # bat and cmd files are not always considered executable in MSYS causing which
17226    # to not find them
17227    if test "x$new_path" = x \
17228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17230      new_path="$path"
17231
17232  windows_path="$new_path"
17233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17234    unix_path=`$CYGPATH -u "$windows_path"`
17235    new_path="$unix_path"
17236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17238    new_path="$unix_path"
17239  fi
17240
17241    fi
17242
17243    if test "x$new_path" = x; then
17244      # It's still not found. Now this is an unrecoverable error.
17245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17247      has_space=`$ECHO "$complete" | $GREP " "`
17248      if test "x$has_space" != x; then
17249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17251      fi
17252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17253    fi
17254  fi
17255
17256  # Now new_path has a complete unix path to the binary
17257  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17258    # Keep paths in /bin as-is, but remove trailing .exe if any
17259    new_path="${new_path/%.exe/}"
17260    # Do not save /bin paths to all_fixpath_prefixes!
17261  else
17262    # Not in mixed or Windows style, start by that.
17263    new_path=`cmd //c echo $new_path`
17264
17265  input_path="$new_path"
17266  # Check if we need to convert this using DOS-style short mode. If the path
17267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17268  # take no chances and rewrite it.
17269  # Note: m4 eats our [], so we need to use [ and ] instead.
17270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17271  if test "x$has_forbidden_chars" != x; then
17272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17274  fi
17275
17276    # Output is in $new_path
17277
17278  windows_path="$new_path"
17279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17280    unix_path=`$CYGPATH -u "$windows_path"`
17281    new_path="$unix_path"
17282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17284    new_path="$unix_path"
17285  fi
17286
17287    # remove trailing .exe if any
17288    new_path="${new_path/%.exe/}"
17289
17290    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17291    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17292  fi
17293
17294    else
17295      # We're on a unix platform. Hooray! :)
17296      # First separate the path from the arguments. This will split at the first
17297      # space.
17298      complete="$FOUND_MAKE"
17299      path="${complete%% *}"
17300      tmp="$complete EOL"
17301      arguments="${tmp#* }"
17302
17303      # Cannot rely on the command "which" here since it doesn't always work.
17304      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17305      if test -z "$is_absolute_path"; then
17306        # Path to executable is not absolute. Find it.
17307        IFS_save="$IFS"
17308        IFS=:
17309        for p in $PATH; do
17310          if test -f "$p/$path" && test -x "$p/$path"; then
17311            new_path="$p/$path"
17312            break
17313          fi
17314        done
17315        IFS="$IFS_save"
17316      else
17317        # This is an absolute path, we can use it without further modifications.
17318        new_path="$path"
17319      fi
17320
17321      if test "x$new_path" = x; then
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17323$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17324        has_space=`$ECHO "$complete" | $GREP " "`
17325        if test "x$has_space" != x; then
17326          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17328        fi
17329        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17330      fi
17331    fi
17332
17333    # Now join together the path and the arguments once again
17334    if test "x$arguments" != xEOL; then
17335      new_complete="$new_path ${arguments% *}"
17336    else
17337      new_complete="$new_path"
17338    fi
17339
17340    if test "x$complete" != "x$new_complete"; then
17341      FOUND_MAKE="$new_complete"
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17343$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17344    fi
17345  fi
17346
17347        fi
17348      fi
17349    fi
17350  fi
17351
17352        fi
17353        PATH=$OLD_PATH
17354      fi
17355    fi
17356
17357    if test "x$FOUND_MAKE" = x; then
17358      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17359    fi
17360  fi
17361
17362  MAKE=$FOUND_MAKE
17363
17364  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17365$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17366
17367
17368  # Check if make supports the output sync option and if so, setup using it.
17369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17370$as_echo_n "checking if make --output-sync is supported... " >&6; }
17371  if $MAKE --version -O > /dev/null 2>&1; then
17372    OUTPUT_SYNC_SUPPORTED=true
17373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17374$as_echo "yes" >&6; }
17375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17376$as_echo_n "checking for output-sync value... " >&6; }
17377
17378# Check whether --with-output-sync was given.
17379if test "${with_output_sync+set}" = set; then :
17380  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17381fi
17382
17383    if test "x$OUTPUT_SYNC" = "x"; then
17384      OUTPUT_SYNC=none
17385    fi
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17387$as_echo "$OUTPUT_SYNC" >&6; }
17388    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17389      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17390    fi
17391  else
17392    OUTPUT_SYNC_SUPPORTED=false
17393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17394$as_echo "no" >&6; }
17395  fi
17396
17397
17398
17399
17400
17401
17402  # Test if find supports -delete
17403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17404$as_echo_n "checking if find supports -delete... " >&6; }
17405  FIND_DELETE="-delete"
17406
17407  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17408
17409  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17410
17411  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17412  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17413    # No, it does not.
17414    rm $DELETEDIR/TestIfFindSupportsDelete
17415    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17416      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17417      FIND_DELETE="-print | xargs rm"
17418    else
17419      FIND_DELETE="-exec rm \{\} \+"
17420    fi
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422$as_echo "no" >&6; }
17423  else
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17425$as_echo "yes" >&6; }
17426  fi
17427  rmdir $DELETEDIR
17428
17429
17430
17431  # These tools might not be installed by default,
17432  # need hint on how to install them.
17433
17434
17435
17436  # Publish this variable in the help.
17437
17438
17439  if test "x$UNZIP" = x; then
17440    # The variable is not set by user, try to locate tool using the code snippet
17441    for ac_prog in unzip
17442do
17443  # Extract the first word of "$ac_prog", so it can be a program name with args.
17444set dummy $ac_prog; ac_word=$2
17445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17446$as_echo_n "checking for $ac_word... " >&6; }
17447if ${ac_cv_path_UNZIP+:} false; then :
17448  $as_echo_n "(cached) " >&6
17449else
17450  case $UNZIP in
17451  [\\/]* | ?:[\\/]*)
17452  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17453  ;;
17454  *)
17455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17456for as_dir in $PATH
17457do
17458  IFS=$as_save_IFS
17459  test -z "$as_dir" && as_dir=.
17460    for ac_exec_ext in '' $ac_executable_extensions; do
17461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17462    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17464    break 2
17465  fi
17466done
17467  done
17468IFS=$as_save_IFS
17469
17470  ;;
17471esac
17472fi
17473UNZIP=$ac_cv_path_UNZIP
17474if test -n "$UNZIP"; then
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17476$as_echo "$UNZIP" >&6; }
17477else
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17479$as_echo "no" >&6; }
17480fi
17481
17482
17483  test -n "$UNZIP" && break
17484done
17485
17486  else
17487    # The variable is set, but is it from the command line or the environment?
17488
17489    # Try to remove the string !UNZIP! from our list.
17490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17492      # If it failed, the variable was not from the command line. Ignore it,
17493      # but warn the user (except for BASH, which is always set by the calling BASH).
17494      if test "xUNZIP" != xBASH; then
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17496$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17497      fi
17498      # Try to locate tool using the code snippet
17499      for ac_prog in unzip
17500do
17501  # Extract the first word of "$ac_prog", so it can be a program name with args.
17502set dummy $ac_prog; ac_word=$2
17503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17504$as_echo_n "checking for $ac_word... " >&6; }
17505if ${ac_cv_path_UNZIP+:} false; then :
17506  $as_echo_n "(cached) " >&6
17507else
17508  case $UNZIP in
17509  [\\/]* | ?:[\\/]*)
17510  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17511  ;;
17512  *)
17513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17514for as_dir in $PATH
17515do
17516  IFS=$as_save_IFS
17517  test -z "$as_dir" && as_dir=.
17518    for ac_exec_ext in '' $ac_executable_extensions; do
17519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17520    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17522    break 2
17523  fi
17524done
17525  done
17526IFS=$as_save_IFS
17527
17528  ;;
17529esac
17530fi
17531UNZIP=$ac_cv_path_UNZIP
17532if test -n "$UNZIP"; then
17533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17534$as_echo "$UNZIP" >&6; }
17535else
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17537$as_echo "no" >&6; }
17538fi
17539
17540
17541  test -n "$UNZIP" && break
17542done
17543
17544    else
17545      # If it succeeded, then it was overridden by the user. We will use it
17546      # for the tool.
17547
17548      # First remove it from the list of overridden variables, so we can test
17549      # for unknown variables in the end.
17550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17551
17552      # Check if the provided tool contains a complete path.
17553      tool_specified="$UNZIP"
17554      tool_basename="${tool_specified##*/}"
17555      if test "x$tool_basename" = "x$tool_specified"; then
17556        # A command without a complete path is provided, search $PATH.
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17558$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17559        # Extract the first word of "$tool_basename", so it can be a program name with args.
17560set dummy $tool_basename; ac_word=$2
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17562$as_echo_n "checking for $ac_word... " >&6; }
17563if ${ac_cv_path_UNZIP+:} false; then :
17564  $as_echo_n "(cached) " >&6
17565else
17566  case $UNZIP in
17567  [\\/]* | ?:[\\/]*)
17568  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17569  ;;
17570  *)
17571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572for as_dir in $PATH
17573do
17574  IFS=$as_save_IFS
17575  test -z "$as_dir" && as_dir=.
17576    for ac_exec_ext in '' $ac_executable_extensions; do
17577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17578    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17580    break 2
17581  fi
17582done
17583  done
17584IFS=$as_save_IFS
17585
17586  ;;
17587esac
17588fi
17589UNZIP=$ac_cv_path_UNZIP
17590if test -n "$UNZIP"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17592$as_echo "$UNZIP" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599        if test "x$UNZIP" = x; then
17600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17601        fi
17602      else
17603        # Otherwise we believe it is a complete path. Use it as it is.
17604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17605$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17607$as_echo_n "checking for UNZIP... " >&6; }
17608        if test ! -x "$tool_specified"; then
17609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17610$as_echo "not found" >&6; }
17611          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17612        fi
17613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17614$as_echo "$tool_specified" >&6; }
17615      fi
17616    fi
17617  fi
17618
17619
17620
17621  if test "x$UNZIP" = x; then
17622    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17623  fi
17624
17625
17626
17627
17628
17629  # Publish this variable in the help.
17630
17631
17632  if test "x$ZIP" = x; then
17633    # The variable is not set by user, try to locate tool using the code snippet
17634    for ac_prog in zip
17635do
17636  # Extract the first word of "$ac_prog", so it can be a program name with args.
17637set dummy $ac_prog; ac_word=$2
17638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17639$as_echo_n "checking for $ac_word... " >&6; }
17640if ${ac_cv_path_ZIP+:} false; then :
17641  $as_echo_n "(cached) " >&6
17642else
17643  case $ZIP in
17644  [\\/]* | ?:[\\/]*)
17645  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17646  ;;
17647  *)
17648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17649for as_dir in $PATH
17650do
17651  IFS=$as_save_IFS
17652  test -z "$as_dir" && as_dir=.
17653    for ac_exec_ext in '' $ac_executable_extensions; do
17654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17655    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17657    break 2
17658  fi
17659done
17660  done
17661IFS=$as_save_IFS
17662
17663  ;;
17664esac
17665fi
17666ZIP=$ac_cv_path_ZIP
17667if test -n "$ZIP"; then
17668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17669$as_echo "$ZIP" >&6; }
17670else
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17672$as_echo "no" >&6; }
17673fi
17674
17675
17676  test -n "$ZIP" && break
17677done
17678
17679  else
17680    # The variable is set, but is it from the command line or the environment?
17681
17682    # Try to remove the string !ZIP! from our list.
17683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17685      # If it failed, the variable was not from the command line. Ignore it,
17686      # but warn the user (except for BASH, which is always set by the calling BASH).
17687      if test "xZIP" != xBASH; then
17688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17689$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17690      fi
17691      # Try to locate tool using the code snippet
17692      for ac_prog in zip
17693do
17694  # Extract the first word of "$ac_prog", so it can be a program name with args.
17695set dummy $ac_prog; ac_word=$2
17696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17697$as_echo_n "checking for $ac_word... " >&6; }
17698if ${ac_cv_path_ZIP+:} false; then :
17699  $as_echo_n "(cached) " >&6
17700else
17701  case $ZIP in
17702  [\\/]* | ?:[\\/]*)
17703  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17704  ;;
17705  *)
17706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17707for as_dir in $PATH
17708do
17709  IFS=$as_save_IFS
17710  test -z "$as_dir" && as_dir=.
17711    for ac_exec_ext in '' $ac_executable_extensions; do
17712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17713    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17715    break 2
17716  fi
17717done
17718  done
17719IFS=$as_save_IFS
17720
17721  ;;
17722esac
17723fi
17724ZIP=$ac_cv_path_ZIP
17725if test -n "$ZIP"; then
17726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17727$as_echo "$ZIP" >&6; }
17728else
17729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17730$as_echo "no" >&6; }
17731fi
17732
17733
17734  test -n "$ZIP" && break
17735done
17736
17737    else
17738      # If it succeeded, then it was overridden by the user. We will use it
17739      # for the tool.
17740
17741      # First remove it from the list of overridden variables, so we can test
17742      # for unknown variables in the end.
17743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17744
17745      # Check if the provided tool contains a complete path.
17746      tool_specified="$ZIP"
17747      tool_basename="${tool_specified##*/}"
17748      if test "x$tool_basename" = "x$tool_specified"; then
17749        # A command without a complete path is provided, search $PATH.
17750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17751$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17752        # Extract the first word of "$tool_basename", so it can be a program name with args.
17753set dummy $tool_basename; ac_word=$2
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17755$as_echo_n "checking for $ac_word... " >&6; }
17756if ${ac_cv_path_ZIP+:} false; then :
17757  $as_echo_n "(cached) " >&6
17758else
17759  case $ZIP in
17760  [\\/]* | ?:[\\/]*)
17761  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17762  ;;
17763  *)
17764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17771    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779  ;;
17780esac
17781fi
17782ZIP=$ac_cv_path_ZIP
17783if test -n "$ZIP"; then
17784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17785$as_echo "$ZIP" >&6; }
17786else
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17788$as_echo "no" >&6; }
17789fi
17790
17791
17792        if test "x$ZIP" = x; then
17793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17794        fi
17795      else
17796        # Otherwise we believe it is a complete path. Use it as it is.
17797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17798$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17800$as_echo_n "checking for ZIP... " >&6; }
17801        if test ! -x "$tool_specified"; then
17802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17803$as_echo "not found" >&6; }
17804          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17805        fi
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17807$as_echo "$tool_specified" >&6; }
17808      fi
17809    fi
17810  fi
17811
17812
17813
17814  if test "x$ZIP" = x; then
17815    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17816  fi
17817
17818
17819
17820  # Non-required basic tools
17821
17822
17823
17824  # Publish this variable in the help.
17825
17826
17827  if test "x$LDD" = x; then
17828    # The variable is not set by user, try to locate tool using the code snippet
17829    for ac_prog in ldd
17830do
17831  # Extract the first word of "$ac_prog", so it can be a program name with args.
17832set dummy $ac_prog; ac_word=$2
17833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17834$as_echo_n "checking for $ac_word... " >&6; }
17835if ${ac_cv_path_LDD+:} false; then :
17836  $as_echo_n "(cached) " >&6
17837else
17838  case $LDD in
17839  [\\/]* | ?:[\\/]*)
17840  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17841  ;;
17842  *)
17843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17844for as_dir in $PATH
17845do
17846  IFS=$as_save_IFS
17847  test -z "$as_dir" && as_dir=.
17848    for ac_exec_ext in '' $ac_executable_extensions; do
17849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17850    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17852    break 2
17853  fi
17854done
17855  done
17856IFS=$as_save_IFS
17857
17858  ;;
17859esac
17860fi
17861LDD=$ac_cv_path_LDD
17862if test -n "$LDD"; then
17863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17864$as_echo "$LDD" >&6; }
17865else
17866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17867$as_echo "no" >&6; }
17868fi
17869
17870
17871  test -n "$LDD" && break
17872done
17873
17874  else
17875    # The variable is set, but is it from the command line or the environment?
17876
17877    # Try to remove the string !LDD! from our list.
17878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17880      # If it failed, the variable was not from the command line. Ignore it,
17881      # but warn the user (except for BASH, which is always set by the calling BASH).
17882      if test "xLDD" != xBASH; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17884$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17885      fi
17886      # Try to locate tool using the code snippet
17887      for ac_prog in ldd
17888do
17889  # Extract the first word of "$ac_prog", so it can be a program name with args.
17890set dummy $ac_prog; ac_word=$2
17891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17892$as_echo_n "checking for $ac_word... " >&6; }
17893if ${ac_cv_path_LDD+:} false; then :
17894  $as_echo_n "(cached) " >&6
17895else
17896  case $LDD in
17897  [\\/]* | ?:[\\/]*)
17898  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17899  ;;
17900  *)
17901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17902for as_dir in $PATH
17903do
17904  IFS=$as_save_IFS
17905  test -z "$as_dir" && as_dir=.
17906    for ac_exec_ext in '' $ac_executable_extensions; do
17907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17908    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17910    break 2
17911  fi
17912done
17913  done
17914IFS=$as_save_IFS
17915
17916  ;;
17917esac
17918fi
17919LDD=$ac_cv_path_LDD
17920if test -n "$LDD"; then
17921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17922$as_echo "$LDD" >&6; }
17923else
17924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17925$as_echo "no" >&6; }
17926fi
17927
17928
17929  test -n "$LDD" && break
17930done
17931
17932    else
17933      # If it succeeded, then it was overridden by the user. We will use it
17934      # for the tool.
17935
17936      # First remove it from the list of overridden variables, so we can test
17937      # for unknown variables in the end.
17938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17939
17940      # Check if the provided tool contains a complete path.
17941      tool_specified="$LDD"
17942      tool_basename="${tool_specified##*/}"
17943      if test "x$tool_basename" = "x$tool_specified"; then
17944        # A command without a complete path is provided, search $PATH.
17945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17946$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17947        # Extract the first word of "$tool_basename", so it can be a program name with args.
17948set dummy $tool_basename; ac_word=$2
17949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17950$as_echo_n "checking for $ac_word... " >&6; }
17951if ${ac_cv_path_LDD+:} false; then :
17952  $as_echo_n "(cached) " >&6
17953else
17954  case $LDD in
17955  [\\/]* | ?:[\\/]*)
17956  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17957  ;;
17958  *)
17959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17960for as_dir in $PATH
17961do
17962  IFS=$as_save_IFS
17963  test -z "$as_dir" && as_dir=.
17964    for ac_exec_ext in '' $ac_executable_extensions; do
17965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17966    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17968    break 2
17969  fi
17970done
17971  done
17972IFS=$as_save_IFS
17973
17974  ;;
17975esac
17976fi
17977LDD=$ac_cv_path_LDD
17978if test -n "$LDD"; then
17979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17980$as_echo "$LDD" >&6; }
17981else
17982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17983$as_echo "no" >&6; }
17984fi
17985
17986
17987        if test "x$LDD" = x; then
17988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17989        fi
17990      else
17991        # Otherwise we believe it is a complete path. Use it as it is.
17992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17993$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17995$as_echo_n "checking for LDD... " >&6; }
17996        if test ! -x "$tool_specified"; then
17997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17998$as_echo "not found" >&6; }
17999          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18000        fi
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18002$as_echo "$tool_specified" >&6; }
18003      fi
18004    fi
18005  fi
18006
18007
18008  if test "x$LDD" = "x"; then
18009    # List shared lib dependencies is used for
18010    # debug output and checking for forbidden dependencies.
18011    # We can build without it.
18012    LDD="true"
18013  fi
18014
18015
18016  # Publish this variable in the help.
18017
18018
18019  if test "x$OTOOL" = x; then
18020    # The variable is not set by user, try to locate tool using the code snippet
18021    for ac_prog in otool
18022do
18023  # Extract the first word of "$ac_prog", so it can be a program name with args.
18024set dummy $ac_prog; ac_word=$2
18025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18026$as_echo_n "checking for $ac_word... " >&6; }
18027if ${ac_cv_path_OTOOL+:} false; then :
18028  $as_echo_n "(cached) " >&6
18029else
18030  case $OTOOL in
18031  [\\/]* | ?:[\\/]*)
18032  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18033  ;;
18034  *)
18035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18036for as_dir in $PATH
18037do
18038  IFS=$as_save_IFS
18039  test -z "$as_dir" && as_dir=.
18040    for ac_exec_ext in '' $ac_executable_extensions; do
18041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18042    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18044    break 2
18045  fi
18046done
18047  done
18048IFS=$as_save_IFS
18049
18050  ;;
18051esac
18052fi
18053OTOOL=$ac_cv_path_OTOOL
18054if test -n "$OTOOL"; then
18055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18056$as_echo "$OTOOL" >&6; }
18057else
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059$as_echo "no" >&6; }
18060fi
18061
18062
18063  test -n "$OTOOL" && break
18064done
18065
18066  else
18067    # The variable is set, but is it from the command line or the environment?
18068
18069    # Try to remove the string !OTOOL! from our list.
18070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18072      # If it failed, the variable was not from the command line. Ignore it,
18073      # but warn the user (except for BASH, which is always set by the calling BASH).
18074      if test "xOTOOL" != xBASH; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18076$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18077      fi
18078      # Try to locate tool using the code snippet
18079      for ac_prog in otool
18080do
18081  # Extract the first word of "$ac_prog", so it can be a program name with args.
18082set dummy $ac_prog; ac_word=$2
18083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18084$as_echo_n "checking for $ac_word... " >&6; }
18085if ${ac_cv_path_OTOOL+:} false; then :
18086  $as_echo_n "(cached) " >&6
18087else
18088  case $OTOOL in
18089  [\\/]* | ?:[\\/]*)
18090  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18091  ;;
18092  *)
18093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18094for as_dir in $PATH
18095do
18096  IFS=$as_save_IFS
18097  test -z "$as_dir" && as_dir=.
18098    for ac_exec_ext in '' $ac_executable_extensions; do
18099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18100    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18102    break 2
18103  fi
18104done
18105  done
18106IFS=$as_save_IFS
18107
18108  ;;
18109esac
18110fi
18111OTOOL=$ac_cv_path_OTOOL
18112if test -n "$OTOOL"; then
18113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18114$as_echo "$OTOOL" >&6; }
18115else
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117$as_echo "no" >&6; }
18118fi
18119
18120
18121  test -n "$OTOOL" && break
18122done
18123
18124    else
18125      # If it succeeded, then it was overridden by the user. We will use it
18126      # for the tool.
18127
18128      # First remove it from the list of overridden variables, so we can test
18129      # for unknown variables in the end.
18130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18131
18132      # Check if the provided tool contains a complete path.
18133      tool_specified="$OTOOL"
18134      tool_basename="${tool_specified##*/}"
18135      if test "x$tool_basename" = "x$tool_specified"; then
18136        # A command without a complete path is provided, search $PATH.
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18138$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18139        # Extract the first word of "$tool_basename", so it can be a program name with args.
18140set dummy $tool_basename; ac_word=$2
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142$as_echo_n "checking for $ac_word... " >&6; }
18143if ${ac_cv_path_OTOOL+:} false; then :
18144  $as_echo_n "(cached) " >&6
18145else
18146  case $OTOOL in
18147  [\\/]* | ?:[\\/]*)
18148  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18149  ;;
18150  *)
18151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152for as_dir in $PATH
18153do
18154  IFS=$as_save_IFS
18155  test -z "$as_dir" && as_dir=.
18156    for ac_exec_ext in '' $ac_executable_extensions; do
18157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160    break 2
18161  fi
18162done
18163  done
18164IFS=$as_save_IFS
18165
18166  ;;
18167esac
18168fi
18169OTOOL=$ac_cv_path_OTOOL
18170if test -n "$OTOOL"; then
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18172$as_echo "$OTOOL" >&6; }
18173else
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176fi
18177
18178
18179        if test "x$OTOOL" = x; then
18180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18181        fi
18182      else
18183        # Otherwise we believe it is a complete path. Use it as it is.
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18185$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18187$as_echo_n "checking for OTOOL... " >&6; }
18188        if test ! -x "$tool_specified"; then
18189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18190$as_echo "not found" >&6; }
18191          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18192        fi
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18194$as_echo "$tool_specified" >&6; }
18195      fi
18196    fi
18197  fi
18198
18199
18200  if test "x$OTOOL" = "x"; then
18201    OTOOL="true"
18202  fi
18203
18204
18205  # Publish this variable in the help.
18206
18207
18208  if test "x$READELF" = x; then
18209    # The variable is not set by user, try to locate tool using the code snippet
18210    for ac_prog in greadelf readelf
18211do
18212  # Extract the first word of "$ac_prog", so it can be a program name with args.
18213set dummy $ac_prog; ac_word=$2
18214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18215$as_echo_n "checking for $ac_word... " >&6; }
18216if ${ac_cv_path_READELF+:} false; then :
18217  $as_echo_n "(cached) " >&6
18218else
18219  case $READELF in
18220  [\\/]* | ?:[\\/]*)
18221  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18222  ;;
18223  *)
18224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18225for as_dir in $PATH
18226do
18227  IFS=$as_save_IFS
18228  test -z "$as_dir" && as_dir=.
18229    for ac_exec_ext in '' $ac_executable_extensions; do
18230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18231    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18233    break 2
18234  fi
18235done
18236  done
18237IFS=$as_save_IFS
18238
18239  ;;
18240esac
18241fi
18242READELF=$ac_cv_path_READELF
18243if test -n "$READELF"; then
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18245$as_echo "$READELF" >&6; }
18246else
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18248$as_echo "no" >&6; }
18249fi
18250
18251
18252  test -n "$READELF" && break
18253done
18254
18255  else
18256    # The variable is set, but is it from the command line or the environment?
18257
18258    # Try to remove the string !READELF! from our list.
18259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18261      # If it failed, the variable was not from the command line. Ignore it,
18262      # but warn the user (except for BASH, which is always set by the calling BASH).
18263      if test "xREADELF" != xBASH; then
18264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18265$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18266      fi
18267      # Try to locate tool using the code snippet
18268      for ac_prog in greadelf readelf
18269do
18270  # Extract the first word of "$ac_prog", so it can be a program name with args.
18271set dummy $ac_prog; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_READELF+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $READELF in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300READELF=$ac_cv_path_READELF
18301if test -n "$READELF"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18303$as_echo "$READELF" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310  test -n "$READELF" && break
18311done
18312
18313    else
18314      # If it succeeded, then it was overridden by the user. We will use it
18315      # for the tool.
18316
18317      # First remove it from the list of overridden variables, so we can test
18318      # for unknown variables in the end.
18319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18320
18321      # Check if the provided tool contains a complete path.
18322      tool_specified="$READELF"
18323      tool_basename="${tool_specified##*/}"
18324      if test "x$tool_basename" = "x$tool_specified"; then
18325        # A command without a complete path is provided, search $PATH.
18326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18327$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18328        # Extract the first word of "$tool_basename", so it can be a program name with args.
18329set dummy $tool_basename; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_READELF+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $READELF in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358READELF=$ac_cv_path_READELF
18359if test -n "$READELF"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18361$as_echo "$READELF" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368        if test "x$READELF" = x; then
18369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18370        fi
18371      else
18372        # Otherwise we believe it is a complete path. Use it as it is.
18373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18374$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18376$as_echo_n "checking for READELF... " >&6; }
18377        if test ! -x "$tool_specified"; then
18378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18379$as_echo "not found" >&6; }
18380          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18381        fi
18382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18383$as_echo "$tool_specified" >&6; }
18384      fi
18385    fi
18386  fi
18387
18388
18389
18390
18391  # Publish this variable in the help.
18392
18393
18394  if test "x$HG" = x; then
18395    # The variable is not set by user, try to locate tool using the code snippet
18396    for ac_prog in hg
18397do
18398  # Extract the first word of "$ac_prog", so it can be a program name with args.
18399set dummy $ac_prog; ac_word=$2
18400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18401$as_echo_n "checking for $ac_word... " >&6; }
18402if ${ac_cv_path_HG+:} false; then :
18403  $as_echo_n "(cached) " >&6
18404else
18405  case $HG in
18406  [\\/]* | ?:[\\/]*)
18407  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18408  ;;
18409  *)
18410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18411for as_dir in $PATH
18412do
18413  IFS=$as_save_IFS
18414  test -z "$as_dir" && as_dir=.
18415    for ac_exec_ext in '' $ac_executable_extensions; do
18416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18417    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18419    break 2
18420  fi
18421done
18422  done
18423IFS=$as_save_IFS
18424
18425  ;;
18426esac
18427fi
18428HG=$ac_cv_path_HG
18429if test -n "$HG"; then
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18431$as_echo "$HG" >&6; }
18432else
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18434$as_echo "no" >&6; }
18435fi
18436
18437
18438  test -n "$HG" && break
18439done
18440
18441  else
18442    # The variable is set, but is it from the command line or the environment?
18443
18444    # Try to remove the string !HG! from our list.
18445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18447      # If it failed, the variable was not from the command line. Ignore it,
18448      # but warn the user (except for BASH, which is always set by the calling BASH).
18449      if test "xHG" != xBASH; then
18450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18451$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18452      fi
18453      # Try to locate tool using the code snippet
18454      for ac_prog in hg
18455do
18456  # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_HG+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $HG in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486HG=$ac_cv_path_HG
18487if test -n "$HG"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18489$as_echo "$HG" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496  test -n "$HG" && break
18497done
18498
18499    else
18500      # If it succeeded, then it was overridden by the user. We will use it
18501      # for the tool.
18502
18503      # First remove it from the list of overridden variables, so we can test
18504      # for unknown variables in the end.
18505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18506
18507      # Check if the provided tool contains a complete path.
18508      tool_specified="$HG"
18509      tool_basename="${tool_specified##*/}"
18510      if test "x$tool_basename" = "x$tool_specified"; then
18511        # A command without a complete path is provided, search $PATH.
18512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18513$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18514        # Extract the first word of "$tool_basename", so it can be a program name with args.
18515set dummy $tool_basename; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_HG+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $HG in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544HG=$ac_cv_path_HG
18545if test -n "$HG"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18547$as_echo "$HG" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554        if test "x$HG" = x; then
18555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18556        fi
18557      else
18558        # Otherwise we believe it is a complete path. Use it as it is.
18559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18560$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18562$as_echo_n "checking for HG... " >&6; }
18563        if test ! -x "$tool_specified"; then
18564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18565$as_echo "not found" >&6; }
18566          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18567        fi
18568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18569$as_echo "$tool_specified" >&6; }
18570      fi
18571    fi
18572  fi
18573
18574
18575
18576
18577  # Publish this variable in the help.
18578
18579
18580  if test "x$STAT" = x; then
18581    # The variable is not set by user, try to locate tool using the code snippet
18582    for ac_prog in stat
18583do
18584  # Extract the first word of "$ac_prog", so it can be a program name with args.
18585set dummy $ac_prog; ac_word=$2
18586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18587$as_echo_n "checking for $ac_word... " >&6; }
18588if ${ac_cv_path_STAT+:} false; then :
18589  $as_echo_n "(cached) " >&6
18590else
18591  case $STAT in
18592  [\\/]* | ?:[\\/]*)
18593  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18594  ;;
18595  *)
18596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599  IFS=$as_save_IFS
18600  test -z "$as_dir" && as_dir=.
18601    for ac_exec_ext in '' $ac_executable_extensions; do
18602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605    break 2
18606  fi
18607done
18608  done
18609IFS=$as_save_IFS
18610
18611  ;;
18612esac
18613fi
18614STAT=$ac_cv_path_STAT
18615if test -n "$STAT"; then
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18617$as_echo "$STAT" >&6; }
18618else
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18620$as_echo "no" >&6; }
18621fi
18622
18623
18624  test -n "$STAT" && break
18625done
18626
18627  else
18628    # The variable is set, but is it from the command line or the environment?
18629
18630    # Try to remove the string !STAT! from our list.
18631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18633      # If it failed, the variable was not from the command line. Ignore it,
18634      # but warn the user (except for BASH, which is always set by the calling BASH).
18635      if test "xSTAT" != xBASH; then
18636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18637$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18638      fi
18639      # Try to locate tool using the code snippet
18640      for ac_prog in stat
18641do
18642  # Extract the first word of "$ac_prog", so it can be a program name with args.
18643set dummy $ac_prog; ac_word=$2
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18645$as_echo_n "checking for $ac_word... " >&6; }
18646if ${ac_cv_path_STAT+:} false; then :
18647  $as_echo_n "(cached) " >&6
18648else
18649  case $STAT in
18650  [\\/]* | ?:[\\/]*)
18651  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18652  ;;
18653  *)
18654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18655for as_dir in $PATH
18656do
18657  IFS=$as_save_IFS
18658  test -z "$as_dir" && as_dir=.
18659    for ac_exec_ext in '' $ac_executable_extensions; do
18660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18661    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18663    break 2
18664  fi
18665done
18666  done
18667IFS=$as_save_IFS
18668
18669  ;;
18670esac
18671fi
18672STAT=$ac_cv_path_STAT
18673if test -n "$STAT"; then
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18675$as_echo "$STAT" >&6; }
18676else
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18678$as_echo "no" >&6; }
18679fi
18680
18681
18682  test -n "$STAT" && break
18683done
18684
18685    else
18686      # If it succeeded, then it was overridden by the user. We will use it
18687      # for the tool.
18688
18689      # First remove it from the list of overridden variables, so we can test
18690      # for unknown variables in the end.
18691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18692
18693      # Check if the provided tool contains a complete path.
18694      tool_specified="$STAT"
18695      tool_basename="${tool_specified##*/}"
18696      if test "x$tool_basename" = "x$tool_specified"; then
18697        # A command without a complete path is provided, search $PATH.
18698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18699$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18700        # Extract the first word of "$tool_basename", so it can be a program name with args.
18701set dummy $tool_basename; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_STAT+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $STAT in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730STAT=$ac_cv_path_STAT
18731if test -n "$STAT"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18733$as_echo "$STAT" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740        if test "x$STAT" = x; then
18741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18742        fi
18743      else
18744        # Otherwise we believe it is a complete path. Use it as it is.
18745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18746$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18748$as_echo_n "checking for STAT... " >&6; }
18749        if test ! -x "$tool_specified"; then
18750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18751$as_echo "not found" >&6; }
18752          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18753        fi
18754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18755$as_echo "$tool_specified" >&6; }
18756      fi
18757    fi
18758  fi
18759
18760
18761
18762
18763  # Publish this variable in the help.
18764
18765
18766  if test "x$TIME" = x; then
18767    # The variable is not set by user, try to locate tool using the code snippet
18768    for ac_prog in time
18769do
18770  # Extract the first word of "$ac_prog", so it can be a program name with args.
18771set dummy $ac_prog; ac_word=$2
18772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18773$as_echo_n "checking for $ac_word... " >&6; }
18774if ${ac_cv_path_TIME+:} false; then :
18775  $as_echo_n "(cached) " >&6
18776else
18777  case $TIME in
18778  [\\/]* | ?:[\\/]*)
18779  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18780  ;;
18781  *)
18782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18783for as_dir in $PATH
18784do
18785  IFS=$as_save_IFS
18786  test -z "$as_dir" && as_dir=.
18787    for ac_exec_ext in '' $ac_executable_extensions; do
18788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18789    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18791    break 2
18792  fi
18793done
18794  done
18795IFS=$as_save_IFS
18796
18797  ;;
18798esac
18799fi
18800TIME=$ac_cv_path_TIME
18801if test -n "$TIME"; then
18802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18803$as_echo "$TIME" >&6; }
18804else
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18806$as_echo "no" >&6; }
18807fi
18808
18809
18810  test -n "$TIME" && break
18811done
18812
18813  else
18814    # The variable is set, but is it from the command line or the environment?
18815
18816    # Try to remove the string !TIME! from our list.
18817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18819      # If it failed, the variable was not from the command line. Ignore it,
18820      # but warn the user (except for BASH, which is always set by the calling BASH).
18821      if test "xTIME" != xBASH; then
18822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18823$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18824      fi
18825      # Try to locate tool using the code snippet
18826      for ac_prog in time
18827do
18828  # Extract the first word of "$ac_prog", so it can be a program name with args.
18829set dummy $ac_prog; ac_word=$2
18830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18831$as_echo_n "checking for $ac_word... " >&6; }
18832if ${ac_cv_path_TIME+:} false; then :
18833  $as_echo_n "(cached) " >&6
18834else
18835  case $TIME in
18836  [\\/]* | ?:[\\/]*)
18837  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18838  ;;
18839  *)
18840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18841for as_dir in $PATH
18842do
18843  IFS=$as_save_IFS
18844  test -z "$as_dir" && as_dir=.
18845    for ac_exec_ext in '' $ac_executable_extensions; do
18846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18847    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18849    break 2
18850  fi
18851done
18852  done
18853IFS=$as_save_IFS
18854
18855  ;;
18856esac
18857fi
18858TIME=$ac_cv_path_TIME
18859if test -n "$TIME"; then
18860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18861$as_echo "$TIME" >&6; }
18862else
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18864$as_echo "no" >&6; }
18865fi
18866
18867
18868  test -n "$TIME" && break
18869done
18870
18871    else
18872      # If it succeeded, then it was overridden by the user. We will use it
18873      # for the tool.
18874
18875      # First remove it from the list of overridden variables, so we can test
18876      # for unknown variables in the end.
18877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18878
18879      # Check if the provided tool contains a complete path.
18880      tool_specified="$TIME"
18881      tool_basename="${tool_specified##*/}"
18882      if test "x$tool_basename" = "x$tool_specified"; then
18883        # A command without a complete path is provided, search $PATH.
18884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18885$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18886        # Extract the first word of "$tool_basename", so it can be a program name with args.
18887set dummy $tool_basename; ac_word=$2
18888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18889$as_echo_n "checking for $ac_word... " >&6; }
18890if ${ac_cv_path_TIME+:} false; then :
18891  $as_echo_n "(cached) " >&6
18892else
18893  case $TIME in
18894  [\\/]* | ?:[\\/]*)
18895  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18896  ;;
18897  *)
18898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18899for as_dir in $PATH
18900do
18901  IFS=$as_save_IFS
18902  test -z "$as_dir" && as_dir=.
18903    for ac_exec_ext in '' $ac_executable_extensions; do
18904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18905    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18907    break 2
18908  fi
18909done
18910  done
18911IFS=$as_save_IFS
18912
18913  ;;
18914esac
18915fi
18916TIME=$ac_cv_path_TIME
18917if test -n "$TIME"; then
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18919$as_echo "$TIME" >&6; }
18920else
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18922$as_echo "no" >&6; }
18923fi
18924
18925
18926        if test "x$TIME" = x; then
18927          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18928        fi
18929      else
18930        # Otherwise we believe it is a complete path. Use it as it is.
18931        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18932$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18934$as_echo_n "checking for TIME... " >&6; }
18935        if test ! -x "$tool_specified"; then
18936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18937$as_echo "not found" >&6; }
18938          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18939        fi
18940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18941$as_echo "$tool_specified" >&6; }
18942      fi
18943    fi
18944  fi
18945
18946
18947  # Check if it's GNU time
18948  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18949  if test "x$IS_GNU_TIME" != x; then
18950    IS_GNU_TIME=yes
18951  else
18952    IS_GNU_TIME=no
18953  fi
18954
18955
18956  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18957
18958
18959
18960  # Publish this variable in the help.
18961
18962
18963  if test "x$DSYMUTIL" = x; then
18964    # The variable is not set by user, try to locate tool using the code snippet
18965    for ac_prog in dsymutil
18966do
18967  # Extract the first word of "$ac_prog", so it can be a program name with args.
18968set dummy $ac_prog; ac_word=$2
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18970$as_echo_n "checking for $ac_word... " >&6; }
18971if ${ac_cv_path_DSYMUTIL+:} false; then :
18972  $as_echo_n "(cached) " >&6
18973else
18974  case $DSYMUTIL in
18975  [\\/]* | ?:[\\/]*)
18976  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18977  ;;
18978  *)
18979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18980for as_dir in $PATH
18981do
18982  IFS=$as_save_IFS
18983  test -z "$as_dir" && as_dir=.
18984    for ac_exec_ext in '' $ac_executable_extensions; do
18985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18986    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18988    break 2
18989  fi
18990done
18991  done
18992IFS=$as_save_IFS
18993
18994  ;;
18995esac
18996fi
18997DSYMUTIL=$ac_cv_path_DSYMUTIL
18998if test -n "$DSYMUTIL"; then
18999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19000$as_echo "$DSYMUTIL" >&6; }
19001else
19002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19003$as_echo "no" >&6; }
19004fi
19005
19006
19007  test -n "$DSYMUTIL" && break
19008done
19009
19010  else
19011    # The variable is set, but is it from the command line or the environment?
19012
19013    # Try to remove the string !DSYMUTIL! from our list.
19014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19016      # If it failed, the variable was not from the command line. Ignore it,
19017      # but warn the user (except for BASH, which is always set by the calling BASH).
19018      if test "xDSYMUTIL" != xBASH; then
19019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19020$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19021      fi
19022      # Try to locate tool using the code snippet
19023      for ac_prog in dsymutil
19024do
19025  # Extract the first word of "$ac_prog", so it can be a program name with args.
19026set dummy $ac_prog; ac_word=$2
19027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19028$as_echo_n "checking for $ac_word... " >&6; }
19029if ${ac_cv_path_DSYMUTIL+:} false; then :
19030  $as_echo_n "(cached) " >&6
19031else
19032  case $DSYMUTIL in
19033  [\\/]* | ?:[\\/]*)
19034  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19035  ;;
19036  *)
19037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19038for as_dir in $PATH
19039do
19040  IFS=$as_save_IFS
19041  test -z "$as_dir" && as_dir=.
19042    for ac_exec_ext in '' $ac_executable_extensions; do
19043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19044    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19046    break 2
19047  fi
19048done
19049  done
19050IFS=$as_save_IFS
19051
19052  ;;
19053esac
19054fi
19055DSYMUTIL=$ac_cv_path_DSYMUTIL
19056if test -n "$DSYMUTIL"; then
19057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19058$as_echo "$DSYMUTIL" >&6; }
19059else
19060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19061$as_echo "no" >&6; }
19062fi
19063
19064
19065  test -n "$DSYMUTIL" && break
19066done
19067
19068    else
19069      # If it succeeded, then it was overridden by the user. We will use it
19070      # for the tool.
19071
19072      # First remove it from the list of overridden variables, so we can test
19073      # for unknown variables in the end.
19074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19075
19076      # Check if the provided tool contains a complete path.
19077      tool_specified="$DSYMUTIL"
19078      tool_basename="${tool_specified##*/}"
19079      if test "x$tool_basename" = "x$tool_specified"; then
19080        # A command without a complete path is provided, search $PATH.
19081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19082$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19083        # Extract the first word of "$tool_basename", so it can be a program name with args.
19084set dummy $tool_basename; 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_DSYMUTIL+:} false; then :
19088  $as_echo_n "(cached) " >&6
19089else
19090  case $DSYMUTIL in
19091  [\\/]* | ?:[\\/]*)
19092  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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
19113DSYMUTIL=$ac_cv_path_DSYMUTIL
19114if test -n "$DSYMUTIL"; then
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19116$as_echo "$DSYMUTIL" >&6; }
19117else
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19119$as_echo "no" >&6; }
19120fi
19121
19122
19123        if test "x$DSYMUTIL" = x; then
19124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19125        fi
19126      else
19127        # Otherwise we believe it is a complete path. Use it as it is.
19128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19129$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19131$as_echo_n "checking for DSYMUTIL... " >&6; }
19132        if test ! -x "$tool_specified"; then
19133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19134$as_echo "not found" >&6; }
19135          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19136        fi
19137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19138$as_echo "$tool_specified" >&6; }
19139      fi
19140    fi
19141  fi
19142
19143
19144
19145  if test "x$DSYMUTIL" = x; then
19146    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19147  fi
19148
19149
19150
19151
19152
19153  # Publish this variable in the help.
19154
19155
19156  if test "x$XATTR" = x; then
19157    # The variable is not set by user, try to locate tool using the code snippet
19158    for ac_prog in xattr
19159do
19160  # Extract the first word of "$ac_prog", so it can be a program name with args.
19161set dummy $ac_prog; ac_word=$2
19162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19163$as_echo_n "checking for $ac_word... " >&6; }
19164if ${ac_cv_path_XATTR+:} false; then :
19165  $as_echo_n "(cached) " >&6
19166else
19167  case $XATTR in
19168  [\\/]* | ?:[\\/]*)
19169  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19170  ;;
19171  *)
19172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19173for as_dir in $PATH
19174do
19175  IFS=$as_save_IFS
19176  test -z "$as_dir" && as_dir=.
19177    for ac_exec_ext in '' $ac_executable_extensions; do
19178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19179    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19181    break 2
19182  fi
19183done
19184  done
19185IFS=$as_save_IFS
19186
19187  ;;
19188esac
19189fi
19190XATTR=$ac_cv_path_XATTR
19191if test -n "$XATTR"; then
19192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19193$as_echo "$XATTR" >&6; }
19194else
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19196$as_echo "no" >&6; }
19197fi
19198
19199
19200  test -n "$XATTR" && break
19201done
19202
19203  else
19204    # The variable is set, but is it from the command line or the environment?
19205
19206    # Try to remove the string !XATTR! from our list.
19207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19209      # If it failed, the variable was not from the command line. Ignore it,
19210      # but warn the user (except for BASH, which is always set by the calling BASH).
19211      if test "xXATTR" != xBASH; then
19212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19213$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19214      fi
19215      # Try to locate tool using the code snippet
19216      for ac_prog in xattr
19217do
19218  # Extract the first word of "$ac_prog", so it can be a program name with args.
19219set dummy $ac_prog; ac_word=$2
19220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19221$as_echo_n "checking for $ac_word... " >&6; }
19222if ${ac_cv_path_XATTR+:} false; then :
19223  $as_echo_n "(cached) " >&6
19224else
19225  case $XATTR in
19226  [\\/]* | ?:[\\/]*)
19227  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19228  ;;
19229  *)
19230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19231for as_dir in $PATH
19232do
19233  IFS=$as_save_IFS
19234  test -z "$as_dir" && as_dir=.
19235    for ac_exec_ext in '' $ac_executable_extensions; do
19236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19237    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19239    break 2
19240  fi
19241done
19242  done
19243IFS=$as_save_IFS
19244
19245  ;;
19246esac
19247fi
19248XATTR=$ac_cv_path_XATTR
19249if test -n "$XATTR"; then
19250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19251$as_echo "$XATTR" >&6; }
19252else
19253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19254$as_echo "no" >&6; }
19255fi
19256
19257
19258  test -n "$XATTR" && break
19259done
19260
19261    else
19262      # If it succeeded, then it was overridden by the user. We will use it
19263      # for the tool.
19264
19265      # First remove it from the list of overridden variables, so we can test
19266      # for unknown variables in the end.
19267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19268
19269      # Check if the provided tool contains a complete path.
19270      tool_specified="$XATTR"
19271      tool_basename="${tool_specified##*/}"
19272      if test "x$tool_basename" = "x$tool_specified"; then
19273        # A command without a complete path is provided, search $PATH.
19274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19275$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19276        # Extract the first word of "$tool_basename", so it can be a program name with args.
19277set dummy $tool_basename; ac_word=$2
19278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19279$as_echo_n "checking for $ac_word... " >&6; }
19280if ${ac_cv_path_XATTR+:} false; then :
19281  $as_echo_n "(cached) " >&6
19282else
19283  case $XATTR in
19284  [\\/]* | ?:[\\/]*)
19285  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19286  ;;
19287  *)
19288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19289for as_dir in $PATH
19290do
19291  IFS=$as_save_IFS
19292  test -z "$as_dir" && as_dir=.
19293    for ac_exec_ext in '' $ac_executable_extensions; do
19294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19295    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19297    break 2
19298  fi
19299done
19300  done
19301IFS=$as_save_IFS
19302
19303  ;;
19304esac
19305fi
19306XATTR=$ac_cv_path_XATTR
19307if test -n "$XATTR"; then
19308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19309$as_echo "$XATTR" >&6; }
19310else
19311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19312$as_echo "no" >&6; }
19313fi
19314
19315
19316        if test "x$XATTR" = x; then
19317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19318        fi
19319      else
19320        # Otherwise we believe it is a complete path. Use it as it is.
19321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19322$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19324$as_echo_n "checking for XATTR... " >&6; }
19325        if test ! -x "$tool_specified"; then
19326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19327$as_echo "not found" >&6; }
19328          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19329        fi
19330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19331$as_echo "$tool_specified" >&6; }
19332      fi
19333    fi
19334  fi
19335
19336
19337
19338  if test "x$XATTR" = x; then
19339    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19340  fi
19341
19342
19343
19344
19345  # Publish this variable in the help.
19346
19347
19348  if test "x$CODESIGN" = x; then
19349    # The variable is not set by user, try to locate tool using the code snippet
19350    for ac_prog in codesign
19351do
19352  # Extract the first word of "$ac_prog", so it can be a program name with args.
19353set dummy $ac_prog; ac_word=$2
19354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19355$as_echo_n "checking for $ac_word... " >&6; }
19356if ${ac_cv_path_CODESIGN+:} false; then :
19357  $as_echo_n "(cached) " >&6
19358else
19359  case $CODESIGN in
19360  [\\/]* | ?:[\\/]*)
19361  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19362  ;;
19363  *)
19364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19365for as_dir in $PATH
19366do
19367  IFS=$as_save_IFS
19368  test -z "$as_dir" && as_dir=.
19369    for ac_exec_ext in '' $ac_executable_extensions; do
19370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19371    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19373    break 2
19374  fi
19375done
19376  done
19377IFS=$as_save_IFS
19378
19379  ;;
19380esac
19381fi
19382CODESIGN=$ac_cv_path_CODESIGN
19383if test -n "$CODESIGN"; then
19384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19385$as_echo "$CODESIGN" >&6; }
19386else
19387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388$as_echo "no" >&6; }
19389fi
19390
19391
19392  test -n "$CODESIGN" && break
19393done
19394
19395  else
19396    # The variable is set, but is it from the command line or the environment?
19397
19398    # Try to remove the string !CODESIGN! from our list.
19399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19401      # If it failed, the variable was not from the command line. Ignore it,
19402      # but warn the user (except for BASH, which is always set by the calling BASH).
19403      if test "xCODESIGN" != xBASH; then
19404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19405$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19406      fi
19407      # Try to locate tool using the code snippet
19408      for ac_prog in codesign
19409do
19410  # Extract the first word of "$ac_prog", so it can be a program name with args.
19411set dummy $ac_prog; ac_word=$2
19412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19413$as_echo_n "checking for $ac_word... " >&6; }
19414if ${ac_cv_path_CODESIGN+:} false; then :
19415  $as_echo_n "(cached) " >&6
19416else
19417  case $CODESIGN in
19418  [\\/]* | ?:[\\/]*)
19419  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19420  ;;
19421  *)
19422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19423for as_dir in $PATH
19424do
19425  IFS=$as_save_IFS
19426  test -z "$as_dir" && as_dir=.
19427    for ac_exec_ext in '' $ac_executable_extensions; do
19428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19429    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19431    break 2
19432  fi
19433done
19434  done
19435IFS=$as_save_IFS
19436
19437  ;;
19438esac
19439fi
19440CODESIGN=$ac_cv_path_CODESIGN
19441if test -n "$CODESIGN"; then
19442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19443$as_echo "$CODESIGN" >&6; }
19444else
19445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19446$as_echo "no" >&6; }
19447fi
19448
19449
19450  test -n "$CODESIGN" && break
19451done
19452
19453    else
19454      # If it succeeded, then it was overridden by the user. We will use it
19455      # for the tool.
19456
19457      # First remove it from the list of overridden variables, so we can test
19458      # for unknown variables in the end.
19459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19460
19461      # Check if the provided tool contains a complete path.
19462      tool_specified="$CODESIGN"
19463      tool_basename="${tool_specified##*/}"
19464      if test "x$tool_basename" = "x$tool_specified"; then
19465        # A command without a complete path is provided, search $PATH.
19466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19467$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19468        # Extract the first word of "$tool_basename", so it can be a program name with args.
19469set dummy $tool_basename; ac_word=$2
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19471$as_echo_n "checking for $ac_word... " >&6; }
19472if ${ac_cv_path_CODESIGN+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  case $CODESIGN in
19476  [\\/]* | ?:[\\/]*)
19477  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19478  ;;
19479  *)
19480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481for as_dir in $PATH
19482do
19483  IFS=$as_save_IFS
19484  test -z "$as_dir" && as_dir=.
19485    for ac_exec_ext in '' $ac_executable_extensions; do
19486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19487    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489    break 2
19490  fi
19491done
19492  done
19493IFS=$as_save_IFS
19494
19495  ;;
19496esac
19497fi
19498CODESIGN=$ac_cv_path_CODESIGN
19499if test -n "$CODESIGN"; then
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19501$as_echo "$CODESIGN" >&6; }
19502else
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19504$as_echo "no" >&6; }
19505fi
19506
19507
19508        if test "x$CODESIGN" = x; then
19509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19510        fi
19511      else
19512        # Otherwise we believe it is a complete path. Use it as it is.
19513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19514$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19516$as_echo_n "checking for CODESIGN... " >&6; }
19517        if test ! -x "$tool_specified"; then
19518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19519$as_echo "not found" >&6; }
19520          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19521        fi
19522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19523$as_echo "$tool_specified" >&6; }
19524      fi
19525    fi
19526  fi
19527
19528
19529    if test "x$CODESIGN" != "x"; then
19530      # Verify that the openjdk_codesign certificate is present
19531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19532$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19533      rm -f codesign-testfile
19534      touch codesign-testfile
19535      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19536      rm -f codesign-testfile
19537      if test "x$CODESIGN" = x; then
19538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19539$as_echo "no" >&6; }
19540      else
19541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19542$as_echo "yes" >&6; }
19543      fi
19544    fi
19545
19546
19547
19548  # Publish this variable in the help.
19549
19550
19551  if test "x$SETFILE" = x; then
19552    # The variable is not set by user, try to locate tool using the code snippet
19553    for ac_prog in SetFile
19554do
19555  # Extract the first word of "$ac_prog", so it can be a program name with args.
19556set dummy $ac_prog; ac_word=$2
19557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19558$as_echo_n "checking for $ac_word... " >&6; }
19559if ${ac_cv_path_SETFILE+:} false; then :
19560  $as_echo_n "(cached) " >&6
19561else
19562  case $SETFILE in
19563  [\\/]* | ?:[\\/]*)
19564  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19565  ;;
19566  *)
19567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19568for as_dir in $PATH
19569do
19570  IFS=$as_save_IFS
19571  test -z "$as_dir" && as_dir=.
19572    for ac_exec_ext in '' $ac_executable_extensions; do
19573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19574    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19576    break 2
19577  fi
19578done
19579  done
19580IFS=$as_save_IFS
19581
19582  ;;
19583esac
19584fi
19585SETFILE=$ac_cv_path_SETFILE
19586if test -n "$SETFILE"; then
19587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19588$as_echo "$SETFILE" >&6; }
19589else
19590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19591$as_echo "no" >&6; }
19592fi
19593
19594
19595  test -n "$SETFILE" && break
19596done
19597
19598  else
19599    # The variable is set, but is it from the command line or the environment?
19600
19601    # Try to remove the string !SETFILE! from our list.
19602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19604      # If it failed, the variable was not from the command line. Ignore it,
19605      # but warn the user (except for BASH, which is always set by the calling BASH).
19606      if test "xSETFILE" != xBASH; then
19607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19608$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19609      fi
19610      # Try to locate tool using the code snippet
19611      for ac_prog in SetFile
19612do
19613  # Extract the first word of "$ac_prog", so it can be a program name with args.
19614set dummy $ac_prog; ac_word=$2
19615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19616$as_echo_n "checking for $ac_word... " >&6; }
19617if ${ac_cv_path_SETFILE+:} false; then :
19618  $as_echo_n "(cached) " >&6
19619else
19620  case $SETFILE in
19621  [\\/]* | ?:[\\/]*)
19622  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19623  ;;
19624  *)
19625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19626for as_dir in $PATH
19627do
19628  IFS=$as_save_IFS
19629  test -z "$as_dir" && as_dir=.
19630    for ac_exec_ext in '' $ac_executable_extensions; do
19631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19632    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19634    break 2
19635  fi
19636done
19637  done
19638IFS=$as_save_IFS
19639
19640  ;;
19641esac
19642fi
19643SETFILE=$ac_cv_path_SETFILE
19644if test -n "$SETFILE"; then
19645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19646$as_echo "$SETFILE" >&6; }
19647else
19648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19649$as_echo "no" >&6; }
19650fi
19651
19652
19653  test -n "$SETFILE" && break
19654done
19655
19656    else
19657      # If it succeeded, then it was overridden by the user. We will use it
19658      # for the tool.
19659
19660      # First remove it from the list of overridden variables, so we can test
19661      # for unknown variables in the end.
19662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19663
19664      # Check if the provided tool contains a complete path.
19665      tool_specified="$SETFILE"
19666      tool_basename="${tool_specified##*/}"
19667      if test "x$tool_basename" = "x$tool_specified"; then
19668        # A command without a complete path is provided, search $PATH.
19669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19670$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19671        # Extract the first word of "$tool_basename", so it can be a program name with args.
19672set dummy $tool_basename; ac_word=$2
19673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19674$as_echo_n "checking for $ac_word... " >&6; }
19675if ${ac_cv_path_SETFILE+:} false; then :
19676  $as_echo_n "(cached) " >&6
19677else
19678  case $SETFILE in
19679  [\\/]* | ?:[\\/]*)
19680  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19681  ;;
19682  *)
19683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19684for as_dir in $PATH
19685do
19686  IFS=$as_save_IFS
19687  test -z "$as_dir" && as_dir=.
19688    for ac_exec_ext in '' $ac_executable_extensions; do
19689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19690    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19692    break 2
19693  fi
19694done
19695  done
19696IFS=$as_save_IFS
19697
19698  ;;
19699esac
19700fi
19701SETFILE=$ac_cv_path_SETFILE
19702if test -n "$SETFILE"; then
19703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19704$as_echo "$SETFILE" >&6; }
19705else
19706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19707$as_echo "no" >&6; }
19708fi
19709
19710
19711        if test "x$SETFILE" = x; then
19712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19713        fi
19714      else
19715        # Otherwise we believe it is a complete path. Use it as it is.
19716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19717$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19719$as_echo_n "checking for SETFILE... " >&6; }
19720        if test ! -x "$tool_specified"; then
19721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19722$as_echo "not found" >&6; }
19723          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19724        fi
19725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19726$as_echo "$tool_specified" >&6; }
19727      fi
19728    fi
19729  fi
19730
19731
19732
19733  if test "x$SETFILE" = x; then
19734    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19735  fi
19736
19737
19738  fi
19739
19740
19741  # Test if bash supports pipefail.
19742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19743$as_echo_n "checking if bash supports pipefail... " >&6; }
19744  if ${BASH} -c 'set -o pipefail'; then
19745    BASH_ARGS="$BASH_ARGS -o pipefail"
19746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19747$as_echo "yes" >&6; }
19748  else
19749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19750$as_echo "no" >&6; }
19751  fi
19752
19753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19754$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19755  if ${BASH} -e -c 'true'; then
19756    BASH_ARGS="$BASH_ARGS -e"
19757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19758$as_echo "yes" >&6; }
19759  else
19760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19761$as_echo "no" >&6; }
19762  fi
19763
19764
19765
19766
19767# Check if pkg-config is available.
19768
19769
19770if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19771	if test -n "$ac_tool_prefix"; then
19772  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19773set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19775$as_echo_n "checking for $ac_word... " >&6; }
19776if ${ac_cv_path_PKG_CONFIG+:} false; then :
19777  $as_echo_n "(cached) " >&6
19778else
19779  case $PKG_CONFIG in
19780  [\\/]* | ?:[\\/]*)
19781  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19782  ;;
19783  *)
19784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19785for as_dir in $PATH
19786do
19787  IFS=$as_save_IFS
19788  test -z "$as_dir" && as_dir=.
19789    for ac_exec_ext in '' $ac_executable_extensions; do
19790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19791    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19793    break 2
19794  fi
19795done
19796  done
19797IFS=$as_save_IFS
19798
19799  ;;
19800esac
19801fi
19802PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19803if test -n "$PKG_CONFIG"; then
19804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19805$as_echo "$PKG_CONFIG" >&6; }
19806else
19807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19808$as_echo "no" >&6; }
19809fi
19810
19811
19812fi
19813if test -z "$ac_cv_path_PKG_CONFIG"; then
19814  ac_pt_PKG_CONFIG=$PKG_CONFIG
19815  # Extract the first word of "pkg-config", so it can be a program name with args.
19816set dummy pkg-config; ac_word=$2
19817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19818$as_echo_n "checking for $ac_word... " >&6; }
19819if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19820  $as_echo_n "(cached) " >&6
19821else
19822  case $ac_pt_PKG_CONFIG in
19823  [\\/]* | ?:[\\/]*)
19824  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19825  ;;
19826  *)
19827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19828for as_dir in $PATH
19829do
19830  IFS=$as_save_IFS
19831  test -z "$as_dir" && as_dir=.
19832    for ac_exec_ext in '' $ac_executable_extensions; do
19833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19834    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19836    break 2
19837  fi
19838done
19839  done
19840IFS=$as_save_IFS
19841
19842  ;;
19843esac
19844fi
19845ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19846if test -n "$ac_pt_PKG_CONFIG"; then
19847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19848$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19849else
19850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19851$as_echo "no" >&6; }
19852fi
19853
19854  if test "x$ac_pt_PKG_CONFIG" = x; then
19855    PKG_CONFIG=""
19856  else
19857    case $cross_compiling:$ac_tool_warned in
19858yes:)
19859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19861ac_tool_warned=yes ;;
19862esac
19863    PKG_CONFIG=$ac_pt_PKG_CONFIG
19864  fi
19865else
19866  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19867fi
19868
19869fi
19870if test -n "$PKG_CONFIG"; then
19871	_pkg_min_version=0.9.0
19872	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19873$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19874	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19875		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19876$as_echo "yes" >&6; }
19877	else
19878		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19879$as_echo "no" >&6; }
19880		PKG_CONFIG=""
19881	fi
19882
19883fi
19884
19885# After basic tools have been setup, we can check build os specific details.
19886
19887  ###############################################################################
19888
19889  # Note that this is the build platform OS version!
19890
19891  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19892  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19893  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19894  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19895
19896
19897
19898
19899
19900# Setup builddeps, for automatic downloading of tools we need.
19901# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19902# boot-jdk setup, but we need to have basic tools setup first.
19903
19904
19905# Check whether --with-builddeps-conf was given.
19906if test "${with_builddeps_conf+set}" = set; then :
19907  withval=$with_builddeps_conf;
19908fi
19909
19910
19911
19912# Check whether --with-builddeps-server was given.
19913if test "${with_builddeps_server+set}" = set; then :
19914  withval=$with_builddeps_server;
19915fi
19916
19917
19918
19919# Check whether --with-builddeps-dir was given.
19920if test "${with_builddeps_dir+set}" = set; then :
19921  withval=$with_builddeps_dir;
19922else
19923  with_builddeps_dir=/localhome/builddeps
19924fi
19925
19926
19927
19928# Check whether --with-builddeps-group was given.
19929if test "${with_builddeps_group+set}" = set; then :
19930  withval=$with_builddeps_group;
19931fi
19932
19933
19934
19935
19936  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19937    if test "x$with_builddeps_conf" != x; then
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19939$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19940      builddepsfile=$with_builddeps_conf
19941      if test -s $builddepsfile; then
19942        . $builddepsfile
19943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19944$as_echo "loaded!" >&6; }
19945      else
19946        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19947      fi
19948    else
19949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19950$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19951      builddepsfile=`mktemp`
19952      touch $builddepsfile
19953      # Put all found confs into a single file.
19954      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19955      # Source the file to acquire the variables
19956      if test -s $builddepsfile; then
19957        . $builddepsfile
19958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19959$as_echo "found at least one!" >&6; }
19960      else
19961        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19962      fi
19963    fi
19964    # Create build and target names that use _ instead of "-" and ".".
19965    # This is necessary to use them in variable names.
19966    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19967    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19968    # Extract rewrite information for build and target
19969    eval rewritten_build=\${REWRITE_${build_var}}
19970    if test "x$rewritten_build" = x; then
19971      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19972      echo Build stays the same $rewritten_build
19973    else
19974      echo Rewriting build for builddeps into $rewritten_build
19975    fi
19976    eval rewritten_target=\${REWRITE_${target_var}}
19977    if test "x$rewritten_target" = x; then
19978      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19979      echo Target stays the same $rewritten_target
19980    else
19981      echo Rewriting target for builddeps into $rewritten_target
19982    fi
19983    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19984    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19985  fi
19986  for ac_prog in 7z unzip
19987do
19988  # Extract the first word of "$ac_prog", so it can be a program name with args.
19989set dummy $ac_prog; ac_word=$2
19990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19991$as_echo_n "checking for $ac_word... " >&6; }
19992if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19993  $as_echo_n "(cached) " >&6
19994else
19995  if test -n "$BDEPS_UNZIP"; then
19996  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19997else
19998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19999for as_dir in $PATH
20000do
20001  IFS=$as_save_IFS
20002  test -z "$as_dir" && as_dir=.
20003    for ac_exec_ext in '' $ac_executable_extensions; do
20004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20005    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20007    break 2
20008  fi
20009done
20010  done
20011IFS=$as_save_IFS
20012
20013fi
20014fi
20015BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20016if test -n "$BDEPS_UNZIP"; then
20017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20018$as_echo "$BDEPS_UNZIP" >&6; }
20019else
20020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20021$as_echo "no" >&6; }
20022fi
20023
20024
20025  test -n "$BDEPS_UNZIP" && break
20026done
20027
20028  if test "x$BDEPS_UNZIP" = x7z; then
20029    BDEPS_UNZIP="7z x"
20030  fi
20031
20032  for ac_prog in wget lftp ftp
20033do
20034  # Extract the first word of "$ac_prog", so it can be a program name with args.
20035set dummy $ac_prog; ac_word=$2
20036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20037$as_echo_n "checking for $ac_word... " >&6; }
20038if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20039  $as_echo_n "(cached) " >&6
20040else
20041  if test -n "$BDEPS_FTP"; then
20042  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20043else
20044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20045for as_dir in $PATH
20046do
20047  IFS=$as_save_IFS
20048  test -z "$as_dir" && as_dir=.
20049    for ac_exec_ext in '' $ac_executable_extensions; do
20050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20051    ac_cv_prog_BDEPS_FTP="$ac_prog"
20052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20053    break 2
20054  fi
20055done
20056  done
20057IFS=$as_save_IFS
20058
20059fi
20060fi
20061BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20062if test -n "$BDEPS_FTP"; then
20063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20064$as_echo "$BDEPS_FTP" >&6; }
20065else
20066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20067$as_echo "no" >&6; }
20068fi
20069
20070
20071  test -n "$BDEPS_FTP" && break
20072done
20073
20074
20075
20076###############################################################################
20077#
20078# Determine OpenJDK variants, options and version numbers.
20079#
20080###############################################################################
20081
20082# We need build & target for this.
20083
20084
20085  ###############################################################################
20086  #
20087  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20088  # We always build headless support.
20089  #
20090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20091$as_echo_n "checking headful support... " >&6; }
20092  # Check whether --enable-headful was given.
20093if test "${enable_headful+set}" = set; then :
20094  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20095else
20096  SUPPORT_HEADFUL=yes
20097fi
20098
20099
20100  SUPPORT_HEADLESS=yes
20101  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20102
20103  if test "x$SUPPORT_HEADFUL" = xyes; then
20104    # We are building both headful and headless.
20105    headful_msg="include support for both headful and headless"
20106  fi
20107
20108  if test "x$SUPPORT_HEADFUL" = xno; then
20109    # Thus we are building headless only.
20110    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20111    headful_msg="headless only"
20112  fi
20113
20114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20115$as_echo "$headful_msg" >&6; }
20116
20117
20118
20119
20120
20121  # Control wether Hotspot runs Queens test after build.
20122  # Check whether --enable-hotspot-test-in-build was given.
20123if test "${enable_hotspot_test_in_build+set}" = set; then :
20124  enableval=$enable_hotspot_test_in_build;
20125else
20126  enable_hotspot_test_in_build=no
20127fi
20128
20129  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20130    TEST_IN_BUILD=true
20131  else
20132    TEST_IN_BUILD=false
20133  fi
20134
20135
20136  ###############################################################################
20137  #
20138  # Choose cacerts source file
20139  #
20140
20141# Check whether --with-cacerts-file was given.
20142if test "${with_cacerts_file+set}" = set; then :
20143  withval=$with_cacerts_file;
20144fi
20145
20146  if test "x$with_cacerts_file" != x; then
20147    CACERTS_FILE=$with_cacerts_file
20148  fi
20149
20150
20151  ###############################################################################
20152  #
20153  # Enable or disable unlimited crypto
20154  #
20155  # Check whether --enable-unlimited-crypto was given.
20156if test "${enable_unlimited_crypto+set}" = set; then :
20157  enableval=$enable_unlimited_crypto;
20158else
20159  enable_unlimited_crypto=no
20160fi
20161
20162  if test "x$enable_unlimited_crypto" = "xyes"; then
20163    UNLIMITED_CRYPTO=true
20164  else
20165    UNLIMITED_CRYPTO=false
20166  fi
20167
20168
20169  ###############################################################################
20170  #
20171  # --enable-rmiconnector-iiop
20172  #
20173  # Check whether --enable-rmiconnector-iiop was given.
20174if test "${enable_rmiconnector_iiop+set}" = set; then :
20175  enableval=$enable_rmiconnector_iiop;
20176fi
20177
20178  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20179    RMICONNECTOR_IIOP=true
20180  else
20181    RMICONNECTOR_IIOP=false
20182  fi
20183
20184
20185  ###############################################################################
20186  #
20187  # Compress jars
20188  #
20189  COMPRESS_JARS=false
20190
20191
20192
20193  # Setup default copyright year. Mostly overridden when building close to a new year.
20194
20195# Check whether --with-copyright-year was given.
20196if test "${with_copyright_year+set}" = set; then :
20197  withval=$with_copyright_year;
20198fi
20199
20200  if test "x$with_copyright_year" = xyes; then
20201    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20202  elif test "x$with_copyright_year" != x; then
20203    COPYRIGHT_YEAR="$with_copyright_year"
20204  else
20205    COPYRIGHT_YEAR=`date +'%Y'`
20206  fi
20207
20208
20209
20210  # Warn user that old version arguments are deprecated.
20211
20212
20213# Check whether --with-milestone was given.
20214if test "${with_milestone+set}" = set; then :
20215  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20216$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20217fi
20218
20219
20220
20221
20222# Check whether --with-update-version was given.
20223if test "${with_update_version+set}" = set; then :
20224  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20225$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20226fi
20227
20228
20229
20230
20231# Check whether --with-user-release-suffix was given.
20232if test "${with_user_release_suffix+set}" = set; then :
20233  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20234$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20235fi
20236
20237
20238
20239
20240# Check whether --with-build-number was given.
20241if test "${with_build_number+set}" = set; then :
20242  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20243$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20244fi
20245
20246
20247
20248  # Source the version numbers file
20249  . $AUTOCONF_DIR/version-numbers
20250
20251  # Some non-version number information is set in that file
20252
20253
20254
20255
20256
20257
20258
20259
20260  # Override version from arguments
20261
20262  # If --with-version-string is set, process it first. It is possible to
20263  # override parts with more specific flags, since these are processed later.
20264
20265# Check whether --with-version-string was given.
20266if test "${with_version_string+set}" = set; then :
20267  withval=$with_version_string;
20268fi
20269
20270  if test "x$with_version_string" = xyes; then
20271    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20272  elif test "x$with_version_string" != x; then
20273    # Additional [] needed to keep m4 from mangling shell constructs.
20274    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ; then
20275      VERSION_MAJOR=${BASH_REMATCH[1]}
20276      VERSION_MINOR=${BASH_REMATCH[3]}
20277      VERSION_SECURITY=${BASH_REMATCH[5]}
20278      VERSION_PATCH=${BASH_REMATCH[7]}
20279      VERSION_PRE=${BASH_REMATCH[9]}
20280      version_plus_separator=${BASH_REMATCH[11]}
20281      VERSION_BUILD=${BASH_REMATCH[12]}
20282      VERSION_OPT_BASE=${BASH_REMATCH[14]}
20283      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
20284      # Unspecified numerical fields are interpreted as 0.
20285      if test "x$VERSION_MINOR" = x; then
20286        VERSION_MINOR=0
20287      fi
20288      if test "x$VERSION_SECURITY" = x; then
20289        VERSION_SECURITY=0
20290      fi
20291      if test "x$VERSION_PATCH" = x; then
20292        VERSION_PATCH=0
20293      fi
20294      if test "x$version_plus_separator" != x \
20295          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
20296        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20297      fi
20298      # Stop the version part process from setting default values.
20299      # We still allow them to explicitely override though.
20300      NO_DEFAULT_VERSION_PARTS=true
20301    else
20302      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20303    fi
20304  fi
20305
20306
20307# Check whether --with-version-pre was given.
20308if test "${with_version_pre+set}" = set; then :
20309  withval=$with_version_pre; with_version_pre_present=true
20310else
20311  with_version_pre_present=false
20312fi
20313
20314
20315  if test "x$with_version_pre_present" = xtrue; then
20316    if test "x$with_version_pre" = xyes; then
20317      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20318    elif test "x$with_version_pre" = xno; then
20319      # Interpret --without-* as empty string instead of the literal "no"
20320      VERSION_PRE=
20321    else
20322      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20323       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20324      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20326$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20327      fi
20328    fi
20329  else
20330    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20331      # Default is to use "internal" as pre
20332      VERSION_PRE="internal"
20333    fi
20334  fi
20335
20336
20337# Check whether --with-version-opt-base was given.
20338if test "${with_version_opt_base+set}" = set; then :
20339  withval=$with_version_opt_base; with_version_opt_base_present=true
20340else
20341  with_version_opt_base_present=false
20342fi
20343
20344
20345  if test "x$with_version_opt_base_present" = xtrue; then
20346    if test "x$with_version_opt_base" = xyes; then
20347      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
20348    elif test "x$with_version_opt_base" = xno; then
20349      # Interpret --without-* as empty string instead of the literal "no"
20350      VERSION_OPT_BASE=
20351    else
20352      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
20353       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
20354      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
20355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&5
20356$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
20357      fi
20358    fi
20359  else
20360    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20361      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20362      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20363      # Outer [ ] to quote m4.
20364       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20365       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20366      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
20367    fi
20368  fi
20369
20370
20371# Check whether --with-version-opt-debuglevel was given.
20372if test "${with_version_opt_debuglevel+set}" = set; then :
20373  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
20374else
20375  with_version_opt_debuglevel_present=false
20376fi
20377
20378
20379  if test "x$with_version_opt_debuglevel_present" = xtrue; then
20380    if test "x$with_version_opt_debuglevel" = xyes; then
20381      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
20382    elif test "x$with_version_opt_debuglevel" = xno; then
20383      # Interpret --without-* as empty string instead of the literal "no"
20384      VERSION_OPT_DEBUGLEVEL=
20385    else
20386      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
20387       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
20388      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
20389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&5
20390$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
20391      fi
20392    fi
20393  else
20394    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20395      # Default is to use the debug level name, except for release which is empty.
20396      if test "x$DEBUG_LEVEL" != "xrelease"; then
20397        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
20398      else
20399        VERSION_OPT_DEBUGLEVEL=""
20400      fi
20401    fi
20402  fi
20403
20404# Check whether --with-version-build was given.
20405if test "${with_version_build+set}" = set; then :
20406  withval=$with_version_build; with_version_build_present=true
20407else
20408  with_version_build_present=false
20409fi
20410
20411
20412  if test "x$with_version_build_present" = xtrue; then
20413    if test "x$with_version_build" = xyes; then
20414      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20415    elif test "x$with_version_build" = xno; then
20416      # Interpret --without-* as empty string instead of the literal "no"
20417      VERSION_BUILD=
20418    elif test "x$with_version_build" = x; then
20419      VERSION_BUILD=
20420    else
20421
20422  # Additional [] needed to keep m4 from mangling shell constructs.
20423  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20424    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20425  fi
20426  # Extract the version number without leading zeros.
20427  cleaned_value=${BASH_REMATCH[1]}
20428  if test "x$cleaned_value" = x; then
20429    # Special case for zero
20430    cleaned_value=${BASH_REMATCH[2]}
20431  fi
20432
20433  if test $cleaned_value -gt 255; then
20434    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20435  fi
20436  if test "x$cleaned_value" != "x$with_version_build"; then
20437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20438$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20439  fi
20440  VERSION_BUILD=$cleaned_value
20441
20442    fi
20443  else
20444    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20445      # Default is to not have a build number.
20446      VERSION_BUILD=""
20447      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20448      VERSION_BUILD=0
20449    fi
20450  fi
20451
20452
20453# Check whether --with-version-major was given.
20454if test "${with_version_major+set}" = set; then :
20455  withval=$with_version_major; with_version_major_present=true
20456else
20457  with_version_major_present=false
20458fi
20459
20460
20461  if test "x$with_version_major_present" = xtrue; then
20462    if test "x$with_version_major" = xyes; then
20463      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20464    else
20465
20466  # Additional [] needed to keep m4 from mangling shell constructs.
20467  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20468    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20469  fi
20470  # Extract the version number without leading zeros.
20471  cleaned_value=${BASH_REMATCH[1]}
20472  if test "x$cleaned_value" = x; then
20473    # Special case for zero
20474    cleaned_value=${BASH_REMATCH[2]}
20475  fi
20476
20477  if test $cleaned_value -gt 255; then
20478    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20479  fi
20480  if test "x$cleaned_value" != "x$with_version_major"; then
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20482$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20483  fi
20484  VERSION_MAJOR=$cleaned_value
20485
20486    fi
20487  else
20488    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20489      # Default is to get value from version-numbers
20490      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20491    fi
20492  fi
20493
20494
20495# Check whether --with-version-minor was given.
20496if test "${with_version_minor+set}" = set; then :
20497  withval=$with_version_minor; with_version_minor_present=true
20498else
20499  with_version_minor_present=false
20500fi
20501
20502
20503  if test "x$with_version_minor_present" = xtrue; then
20504    if test "x$with_version_minor" = xyes; then
20505      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20506    elif test "x$with_version_minor" = xno; then
20507      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20508      VERSION_MINOR=0
20509    elif test "x$with_version_minor" = x; then
20510      VERSION_MINOR=0
20511    else
20512
20513  # Additional [] needed to keep m4 from mangling shell constructs.
20514  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20515    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20516  fi
20517  # Extract the version number without leading zeros.
20518  cleaned_value=${BASH_REMATCH[1]}
20519  if test "x$cleaned_value" = x; then
20520    # Special case for zero
20521    cleaned_value=${BASH_REMATCH[2]}
20522  fi
20523
20524  if test $cleaned_value -gt 255; then
20525    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20526  fi
20527  if test "x$cleaned_value" != "x$with_version_minor"; then
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20529$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20530  fi
20531  VERSION_MINOR=$cleaned_value
20532
20533    fi
20534  else
20535    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20536      # Default is 0, if unspecified
20537      VERSION_MINOR=0
20538    fi
20539  fi
20540
20541
20542# Check whether --with-version-security was given.
20543if test "${with_version_security+set}" = set; then :
20544  withval=$with_version_security; with_version_security_present=true
20545else
20546  with_version_security_present=false
20547fi
20548
20549
20550  if test "x$with_version_security_present" = xtrue; then
20551    if test "x$with_version_security" = xyes; then
20552      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20553    elif test "x$with_version_security" = xno; then
20554      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20555      VERSION_SECURITY=0
20556    elif test "x$with_version_security" = x; then
20557      VERSION_SECURITY=0
20558    else
20559
20560  # Additional [] needed to keep m4 from mangling shell constructs.
20561  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20562    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20563  fi
20564  # Extract the version number without leading zeros.
20565  cleaned_value=${BASH_REMATCH[1]}
20566  if test "x$cleaned_value" = x; then
20567    # Special case for zero
20568    cleaned_value=${BASH_REMATCH[2]}
20569  fi
20570
20571  if test $cleaned_value -gt 255; then
20572    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20573  fi
20574  if test "x$cleaned_value" != "x$with_version_security"; then
20575    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20576$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20577  fi
20578  VERSION_SECURITY=$cleaned_value
20579
20580    fi
20581  else
20582    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20583      # Default is 0, if unspecified
20584      VERSION_SECURITY=0
20585    fi
20586  fi
20587
20588
20589# Check whether --with-version-patch was given.
20590if test "${with_version_patch+set}" = set; then :
20591  withval=$with_version_patch; with_version_patch_present=true
20592else
20593  with_version_patch_present=false
20594fi
20595
20596
20597  if test "x$with_version_patch_present" = xtrue; then
20598    if test "x$with_version_patch" = xyes; then
20599      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20600    elif test "x$with_version_patch" = xno; then
20601      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20602      VERSION_PATCH=0
20603    elif test "x$with_version_patch" = x; then
20604      VERSION_PATCH=0
20605    else
20606
20607  # Additional [] needed to keep m4 from mangling shell constructs.
20608  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20609    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20610  fi
20611  # Extract the version number without leading zeros.
20612  cleaned_value=${BASH_REMATCH[1]}
20613  if test "x$cleaned_value" = x; then
20614    # Special case for zero
20615    cleaned_value=${BASH_REMATCH[2]}
20616  fi
20617
20618  if test $cleaned_value -gt 255; then
20619    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20620  fi
20621  if test "x$cleaned_value" != "x$with_version_patch"; then
20622    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20623$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20624  fi
20625  VERSION_PATCH=$cleaned_value
20626
20627    fi
20628  else
20629    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20630      # Default is 0, if unspecified
20631      VERSION_PATCH=0
20632    fi
20633  fi
20634
20635  # Calculate derived version properties
20636
20637  # Set opt to "opt-base" if debug level is empty (i.e. release), or
20638  # "opt-base_debug-level" otherwise.
20639  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
20640
20641  # Set VERSION_IS_GA based on if VERSION_PRE has a value
20642  if test "x$VERSION_PRE" = x; then
20643    VERSION_IS_GA=true
20644  else
20645    VERSION_IS_GA=false
20646  fi
20647
20648  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20649  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20650
20651  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20652  # Strip trailing zeroes from stripped_version_number
20653  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20654  VERSION_NUMBER=$stripped_version_number
20655
20656  # The complete version string, with additional build information
20657  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20658    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20659  else
20660    # If either build or opt is set, we need a + separator
20661    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20662  fi
20663
20664  # The short version string, just VERSION_NUMBER and PRE, if present.
20665  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20666
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20668$as_echo_n "checking for version string... " >&6; }
20669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20670$as_echo "$VERSION_STRING" >&6; }
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686###############################################################################
20687#
20688# Setup BootJDK, used to bootstrap the build.
20689#
20690###############################################################################
20691
20692
20693  BOOT_JDK_FOUND=no
20694
20695# Check whether --with-boot-jdk was given.
20696if test "${with_boot_jdk+set}" = set; then :
20697  withval=$with_boot_jdk;
20698fi
20699
20700
20701  # We look for the Boot JDK through various means, going from more certain to
20702  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20703  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20704  # must check if this is indeed valid; otherwise we'll continue looking.
20705
20706  # Test: Is bootjdk explicitely set by command line arguments?
20707
20708  if test "x$BOOT_JDK_FOUND" = xno; then
20709    # Now execute the test
20710
20711  if test "x$with_boot_jdk" != x; then
20712    BOOT_JDK=$with_boot_jdk
20713    BOOT_JDK_FOUND=maybe
20714    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20715$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20716  fi
20717
20718
20719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20721      # Do we have a bin/java?
20722      if test ! -x "$BOOT_JDK/bin/java"; then
20723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20725        BOOT_JDK_FOUND=no
20726      else
20727        # Do we have a bin/javac?
20728        if test ! -x "$BOOT_JDK/bin/javac"; then
20729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20733          BOOT_JDK_FOUND=no
20734        else
20735          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20736          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20737
20738          # Extra M4 quote needed to protect [] in grep expression.
20739          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20740          if test "x$FOUND_CORRECT_VERSION" = x; then
20741            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20743            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20744$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20745            BOOT_JDK_FOUND=no
20746          else
20747            # We're done! :-)
20748            BOOT_JDK_FOUND=yes
20749
20750  # Only process if variable expands to non-empty
20751
20752  if test "x$BOOT_JDK" != x; then
20753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754
20755  # Input might be given as Windows format, start by converting to
20756  # unix format.
20757  path="$BOOT_JDK"
20758  new_path=`$CYGPATH -u "$path"`
20759
20760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20763  # "foo.exe" is OK but "foo" is an error.
20764  #
20765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20766  # It is also a way to make sure we got the proper file name for the real test later on.
20767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20768  if test "x$test_shortpath" = x; then
20769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20772  fi
20773
20774  # Call helper function which possibly converts this using DOS-style short mode.
20775  # If so, the updated path is stored in $new_path.
20776
20777  input_path="$new_path"
20778  # Check if we need to convert this using DOS-style short mode. If the path
20779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20780  # take no chances and rewrite it.
20781  # Note: m4 eats our [], so we need to use [ and ] instead.
20782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20783  if test "x$has_forbidden_chars" != x; then
20784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20788      # Going to short mode and back again did indeed matter. Since short mode is
20789      # case insensitive, let's make it lowercase to improve readability.
20790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20791      # Now convert it back to Unix-style (cygpath)
20792      input_path=`$CYGPATH -u "$shortmode_path"`
20793      new_path="$input_path"
20794    fi
20795  fi
20796
20797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20798  if test "x$test_cygdrive_prefix" = x; then
20799    # As a simple fix, exclude /usr/bin since it's not a real path.
20800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20802      # a path prefixed by /cygdrive for fixpath to work.
20803      new_path="$CYGWIN_ROOT_PATH$input_path"
20804    fi
20805  fi
20806
20807
20808  if test "x$path" != "x$new_path"; then
20809    BOOT_JDK="$new_path"
20810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20812  fi
20813
20814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20815
20816  path="$BOOT_JDK"
20817  has_colon=`$ECHO $path | $GREP ^.:`
20818  new_path="$path"
20819  if test "x$has_colon" = x; then
20820    # Not in mixed or Windows style, start by that.
20821    new_path=`cmd //c echo $path`
20822  fi
20823
20824
20825  input_path="$new_path"
20826  # Check if we need to convert this using DOS-style short mode. If the path
20827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20828  # take no chances and rewrite it.
20829  # Note: m4 eats our [], so we need to use [ and ] instead.
20830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20831  if test "x$has_forbidden_chars" != x; then
20832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20834  fi
20835
20836
20837  windows_path="$new_path"
20838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20839    unix_path=`$CYGPATH -u "$windows_path"`
20840    new_path="$unix_path"
20841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20843    new_path="$unix_path"
20844  fi
20845
20846  if test "x$path" != "x$new_path"; then
20847    BOOT_JDK="$new_path"
20848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20850  fi
20851
20852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20854
20855    else
20856      # We're on a unix platform. Hooray! :)
20857      path="$BOOT_JDK"
20858      has_space=`$ECHO "$path" | $GREP " "`
20859      if test "x$has_space" != x; then
20860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20863      fi
20864
20865      # Use eval to expand a potential ~
20866      eval path="$path"
20867      if test ! -f "$path" && test ! -d "$path"; then
20868        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20869      fi
20870
20871      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20872    fi
20873  fi
20874
20875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20876$as_echo_n "checking for Boot JDK... " >&6; }
20877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20878$as_echo "$BOOT_JDK" >&6; }
20879            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20880$as_echo_n "checking Boot JDK version... " >&6; }
20881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20883$as_echo "$BOOT_JDK_VERSION" >&6; }
20884          fi # end check jdk version
20885        fi # end check javac
20886      fi # end check java
20887    fi # end check boot jdk found
20888  fi
20889
20890  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20891    # Having specified an argument which is incorrect will produce an instant failure;
20892    # we should not go on looking
20893    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20894  fi
20895
20896  # Test: Is bootjdk available from builddeps?
20897
20898  if test "x$BOOT_JDK_FOUND" = xno; then
20899    # Now execute the test
20900
20901
20902
20903  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20904    # Source the builddeps file again, to make sure it uses the latest variables!
20905    . $builddepsfile
20906    # Look for a target and build machine specific resource!
20907    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20908    if test "x$resource" = x; then
20909      # Ok, lets instead look for a target specific resource
20910      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20911    fi
20912    if test "x$resource" = x; then
20913      # Ok, lets instead look for a build specific resource
20914      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20915    fi
20916    if test "x$resource" = x; then
20917      # Ok, lets instead look for a generic resource
20918      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20919      resource=${builddep_bootjdk}
20920    fi
20921    if test "x$resource" != x; then
20922      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20923$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20924      # If the resource in the builddeps.conf file is an existing directory,
20925      # for example /java/linux/cups
20926      if test -d ${resource}; then
20927        depdir=${resource}
20928      else
20929
20930  # bootjdk is for example mymodule
20931  # $resource is for example libs/general/libmymod_1_2_3.zip
20932  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20933  # $with_builddeps_dir is for example /localhome/builddeps
20934  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20935  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20936  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20937  filename=`basename $resource`
20938  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20939  filebase=${filename%%.*}
20940  extension=${filename#*.}
20941  installdir=$with_builddeps_dir/$filebase
20942  if test ! -f $installdir/$filename.unpacked; then
20943    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20944$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20945    if test ! -d $installdir; then
20946      mkdir -p $installdir
20947    fi
20948    if test ! -d $installdir; then
20949      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20950    fi
20951    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20952    touch $tmpfile
20953    if test ! -f $tmpfile; then
20954      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20955    fi
20956
20957  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20958  # $tmpfile is the local file name for the downloaded file.
20959  VALID_TOOL=no
20960  if test "x$BDEPS_FTP" = xwget; then
20961    VALID_TOOL=yes
20962    wget -O $tmpfile $with_builddeps_server/$resource
20963  fi
20964  if test "x$BDEPS_FTP" = xlftp; then
20965    VALID_TOOL=yes
20966    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20967  fi
20968  if test "x$BDEPS_FTP" = xftp; then
20969    VALID_TOOL=yes
20970    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20971    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20972    FTPUSERPWD=${FTPSERVER%%@*}
20973    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20974      FTPUSER=${userpwd%%:*}
20975      FTPPWD=${userpwd#*@}
20976      FTPSERVER=${FTPSERVER#*@}
20977    else
20978      FTPUSER=ftp
20979      FTPPWD=ftp
20980    fi
20981    # the "pass" command does not work on some
20982    # ftp clients (read ftp.exe) but if it works,
20983    # passive mode is better!
20984    ( \
20985        echo "user $FTPUSER $FTPPWD"        ; \
20986        echo "pass"                         ; \
20987        echo "bin"                          ; \
20988        echo "get $FTPPATH $tmpfile"              ; \
20989    ) | ftp -in $FTPSERVER
20990  fi
20991  if test "x$VALID_TOOL" != xyes; then
20992    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20993  fi
20994
20995    mv $tmpfile $installdir/$filename
20996    if test ! -s $installdir/$filename; then
20997      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20998    fi
20999    case "$extension" in
21000      zip)  echo "Unzipping $installdir/$filename..."
21001        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
21002        ;;
21003      tar.gz) echo "Untaring $installdir/$filename..."
21004        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21005        ;;
21006      tgz) echo "Untaring $installdir/$filename..."
21007        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
21008        ;;
21009      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
21010        ;;
21011    esac
21012  fi
21013  if test -f $installdir/$filename.unpacked; then
21014    depdir=$installdir
21015  fi
21016
21017      fi
21018      # Source the builddeps file again, because in the previous command, the depdir
21019      # was updated to point at the current build dependency install directory.
21020      . $builddepsfile
21021      # Now extract variables from the builddeps.conf files.
21022      theroot=${builddep_bootjdk_ROOT}
21023      thecflags=${builddep_bootjdk_CFLAGS}
21024      thelibs=${builddep_bootjdk_LIBS}
21025      if test "x$depdir" = x; then
21026        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21027      fi
21028      BOOT_JDK=$depdir
21029      if test "x$theroot" != x; then
21030        BOOT_JDK="$theroot"
21031      fi
21032      if test "x$thecflags" != x; then
21033        BOOT_JDK_CFLAGS="$thecflags"
21034      fi
21035      if test "x$thelibs" != x; then
21036        BOOT_JDK_LIBS="$thelibs"
21037      fi
21038      BOOT_JDK_FOUND=maybe
21039      else BOOT_JDK_FOUND=no
21040
21041    fi
21042    else BOOT_JDK_FOUND=no
21043
21044  fi
21045
21046
21047
21048    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21049    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21050      # Do we have a bin/java?
21051      if test ! -x "$BOOT_JDK/bin/java"; then
21052        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21054        BOOT_JDK_FOUND=no
21055      else
21056        # Do we have a bin/javac?
21057        if test ! -x "$BOOT_JDK/bin/javac"; then
21058          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21060          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21061$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21062          BOOT_JDK_FOUND=no
21063        else
21064          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21065          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21066
21067          # Extra M4 quote needed to protect [] in grep expression.
21068          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21069          if test "x$FOUND_CORRECT_VERSION" = x; then
21070            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21072            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21073$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21074            BOOT_JDK_FOUND=no
21075          else
21076            # We're done! :-)
21077            BOOT_JDK_FOUND=yes
21078
21079  # Only process if variable expands to non-empty
21080
21081  if test "x$BOOT_JDK" != x; then
21082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21083
21084  # Input might be given as Windows format, start by converting to
21085  # unix format.
21086  path="$BOOT_JDK"
21087  new_path=`$CYGPATH -u "$path"`
21088
21089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21092  # "foo.exe" is OK but "foo" is an error.
21093  #
21094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21095  # It is also a way to make sure we got the proper file name for the real test later on.
21096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21097  if test "x$test_shortpath" = x; then
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21100    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21101  fi
21102
21103  # Call helper function which possibly converts this using DOS-style short mode.
21104  # If so, the updated path is stored in $new_path.
21105
21106  input_path="$new_path"
21107  # Check if we need to convert this using DOS-style short mode. If the path
21108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21109  # take no chances and rewrite it.
21110  # Note: m4 eats our [], so we need to use [ and ] instead.
21111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21112  if test "x$has_forbidden_chars" != x; then
21113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21117      # Going to short mode and back again did indeed matter. Since short mode is
21118      # case insensitive, let's make it lowercase to improve readability.
21119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21120      # Now convert it back to Unix-style (cygpath)
21121      input_path=`$CYGPATH -u "$shortmode_path"`
21122      new_path="$input_path"
21123    fi
21124  fi
21125
21126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21127  if test "x$test_cygdrive_prefix" = x; then
21128    # As a simple fix, exclude /usr/bin since it's not a real path.
21129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21131      # a path prefixed by /cygdrive for fixpath to work.
21132      new_path="$CYGWIN_ROOT_PATH$input_path"
21133    fi
21134  fi
21135
21136
21137  if test "x$path" != "x$new_path"; then
21138    BOOT_JDK="$new_path"
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21141  fi
21142
21143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21144
21145  path="$BOOT_JDK"
21146  has_colon=`$ECHO $path | $GREP ^.:`
21147  new_path="$path"
21148  if test "x$has_colon" = x; then
21149    # Not in mixed or Windows style, start by that.
21150    new_path=`cmd //c echo $path`
21151  fi
21152
21153
21154  input_path="$new_path"
21155  # Check if we need to convert this using DOS-style short mode. If the path
21156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21157  # take no chances and rewrite it.
21158  # Note: m4 eats our [], so we need to use [ and ] instead.
21159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21160  if test "x$has_forbidden_chars" != x; then
21161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21163  fi
21164
21165
21166  windows_path="$new_path"
21167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21168    unix_path=`$CYGPATH -u "$windows_path"`
21169    new_path="$unix_path"
21170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21172    new_path="$unix_path"
21173  fi
21174
21175  if test "x$path" != "x$new_path"; then
21176    BOOT_JDK="$new_path"
21177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21178$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21179  fi
21180
21181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21183
21184    else
21185      # We're on a unix platform. Hooray! :)
21186      path="$BOOT_JDK"
21187      has_space=`$ECHO "$path" | $GREP " "`
21188      if test "x$has_space" != x; then
21189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21192      fi
21193
21194      # Use eval to expand a potential ~
21195      eval path="$path"
21196      if test ! -f "$path" && test ! -d "$path"; then
21197        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21198      fi
21199
21200      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21201    fi
21202  fi
21203
21204            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21205$as_echo_n "checking for Boot JDK... " >&6; }
21206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21207$as_echo "$BOOT_JDK" >&6; }
21208            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21209$as_echo_n "checking Boot JDK version... " >&6; }
21210            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21212$as_echo "$BOOT_JDK_VERSION" >&6; }
21213          fi # end check jdk version
21214        fi # end check javac
21215      fi # end check java
21216    fi # end check boot jdk found
21217  fi
21218
21219
21220  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21221
21222  if test "x$BOOT_JDK_FOUND" = xno; then
21223    # Now execute the test
21224
21225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21226    # First check at user selected default
21227
21228  if test "x$BOOT_JDK_FOUND" = xno; then
21229    # Now execute the test
21230
21231  if test -x /usr/libexec/java_home; then
21232    BOOT_JDK=`/usr/libexec/java_home `
21233    BOOT_JDK_FOUND=maybe
21234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21235$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21236  fi
21237
21238
21239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21241      # Do we have a bin/java?
21242      if test ! -x "$BOOT_JDK/bin/java"; then
21243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21245        BOOT_JDK_FOUND=no
21246      else
21247        # Do we have a bin/javac?
21248        if test ! -x "$BOOT_JDK/bin/javac"; then
21249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21253          BOOT_JDK_FOUND=no
21254        else
21255          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21256          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21257
21258          # Extra M4 quote needed to protect [] in grep expression.
21259          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21260          if test "x$FOUND_CORRECT_VERSION" = x; then
21261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21263            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21264$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21265            BOOT_JDK_FOUND=no
21266          else
21267            # We're done! :-)
21268            BOOT_JDK_FOUND=yes
21269
21270  # Only process if variable expands to non-empty
21271
21272  if test "x$BOOT_JDK" != x; then
21273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274
21275  # Input might be given as Windows format, start by converting to
21276  # unix format.
21277  path="$BOOT_JDK"
21278  new_path=`$CYGPATH -u "$path"`
21279
21280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21283  # "foo.exe" is OK but "foo" is an error.
21284  #
21285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21286  # It is also a way to make sure we got the proper file name for the real test later on.
21287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21288  if test "x$test_shortpath" = x; then
21289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21291    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21292  fi
21293
21294  # Call helper function which possibly converts this using DOS-style short mode.
21295  # If so, the updated path is stored in $new_path.
21296
21297  input_path="$new_path"
21298  # Check if we need to convert this using DOS-style short mode. If the path
21299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21300  # take no chances and rewrite it.
21301  # Note: m4 eats our [], so we need to use [ and ] instead.
21302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21303  if test "x$has_forbidden_chars" != x; then
21304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21308      # Going to short mode and back again did indeed matter. Since short mode is
21309      # case insensitive, let's make it lowercase to improve readability.
21310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21311      # Now convert it back to Unix-style (cygpath)
21312      input_path=`$CYGPATH -u "$shortmode_path"`
21313      new_path="$input_path"
21314    fi
21315  fi
21316
21317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21318  if test "x$test_cygdrive_prefix" = x; then
21319    # As a simple fix, exclude /usr/bin since it's not a real path.
21320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21322      # a path prefixed by /cygdrive for fixpath to work.
21323      new_path="$CYGWIN_ROOT_PATH$input_path"
21324    fi
21325  fi
21326
21327
21328  if test "x$path" != "x$new_path"; then
21329    BOOT_JDK="$new_path"
21330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21332  fi
21333
21334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21335
21336  path="$BOOT_JDK"
21337  has_colon=`$ECHO $path | $GREP ^.:`
21338  new_path="$path"
21339  if test "x$has_colon" = x; then
21340    # Not in mixed or Windows style, start by that.
21341    new_path=`cmd //c echo $path`
21342  fi
21343
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354  fi
21355
21356
21357  windows_path="$new_path"
21358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21359    unix_path=`$CYGPATH -u "$windows_path"`
21360    new_path="$unix_path"
21361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21363    new_path="$unix_path"
21364  fi
21365
21366  if test "x$path" != "x$new_path"; then
21367    BOOT_JDK="$new_path"
21368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21370  fi
21371
21372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21374
21375    else
21376      # We're on a unix platform. Hooray! :)
21377      path="$BOOT_JDK"
21378      has_space=`$ECHO "$path" | $GREP " "`
21379      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
21383      fi
21384
21385      # Use eval to expand a potential ~
21386      eval path="$path"
21387      if test ! -f "$path" && test ! -d "$path"; then
21388        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21389      fi
21390
21391      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21392    fi
21393  fi
21394
21395            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21396$as_echo_n "checking for Boot JDK... " >&6; }
21397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21398$as_echo "$BOOT_JDK" >&6; }
21399            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21400$as_echo_n "checking Boot JDK version... " >&6; }
21401            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21403$as_echo "$BOOT_JDK_VERSION" >&6; }
21404          fi # end check jdk version
21405        fi # end check javac
21406      fi # end check java
21407    fi # end check boot jdk found
21408  fi
21409
21410    # If that did not work out (e.g. too old), try explicit versions instead
21411
21412  if test "x$BOOT_JDK_FOUND" = xno; then
21413    # Now execute the test
21414
21415  if test -x /usr/libexec/java_home; then
21416    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21417    BOOT_JDK_FOUND=maybe
21418    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21419$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21420  fi
21421
21422
21423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21425      # Do we have a bin/java?
21426      if test ! -x "$BOOT_JDK/bin/java"; then
21427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21429        BOOT_JDK_FOUND=no
21430      else
21431        # Do we have a bin/javac?
21432        if test ! -x "$BOOT_JDK/bin/javac"; then
21433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21437          BOOT_JDK_FOUND=no
21438        else
21439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21441
21442          # Extra M4 quote needed to protect [] in grep expression.
21443          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21444          if test "x$FOUND_CORRECT_VERSION" = x; then
21445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21449            BOOT_JDK_FOUND=no
21450          else
21451            # We're done! :-)
21452            BOOT_JDK_FOUND=yes
21453
21454  # Only process if variable expands to non-empty
21455
21456  if test "x$BOOT_JDK" != x; then
21457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21458
21459  # Input might be given as Windows format, start by converting to
21460  # unix format.
21461  path="$BOOT_JDK"
21462  new_path=`$CYGPATH -u "$path"`
21463
21464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21467  # "foo.exe" is OK but "foo" is an error.
21468  #
21469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21470  # It is also a way to make sure we got the proper file name for the real test later on.
21471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21472  if test "x$test_shortpath" = x; then
21473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21476  fi
21477
21478  # Call helper function which possibly converts this using DOS-style short mode.
21479  # If so, the updated path is stored in $new_path.
21480
21481  input_path="$new_path"
21482  # Check if we need to convert this using DOS-style short mode. If the path
21483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21484  # take no chances and rewrite it.
21485  # Note: m4 eats our [], so we need to use [ and ] instead.
21486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21487  if test "x$has_forbidden_chars" != x; then
21488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21492      # Going to short mode and back again did indeed matter. Since short mode is
21493      # case insensitive, let's make it lowercase to improve readability.
21494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21495      # Now convert it back to Unix-style (cygpath)
21496      input_path=`$CYGPATH -u "$shortmode_path"`
21497      new_path="$input_path"
21498    fi
21499  fi
21500
21501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21502  if test "x$test_cygdrive_prefix" = x; then
21503    # As a simple fix, exclude /usr/bin since it's not a real path.
21504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21506      # a path prefixed by /cygdrive for fixpath to work.
21507      new_path="$CYGWIN_ROOT_PATH$input_path"
21508    fi
21509  fi
21510
21511
21512  if test "x$path" != "x$new_path"; then
21513    BOOT_JDK="$new_path"
21514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21516  fi
21517
21518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21519
21520  path="$BOOT_JDK"
21521  has_colon=`$ECHO $path | $GREP ^.:`
21522  new_path="$path"
21523  if test "x$has_colon" = x; then
21524    # Not in mixed or Windows style, start by that.
21525    new_path=`cmd //c echo $path`
21526  fi
21527
21528
21529  input_path="$new_path"
21530  # Check if we need to convert this using DOS-style short mode. If the path
21531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21532  # take no chances and rewrite it.
21533  # Note: m4 eats our [], so we need to use [ and ] instead.
21534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21535  if test "x$has_forbidden_chars" != x; then
21536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21538  fi
21539
21540
21541  windows_path="$new_path"
21542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543    unix_path=`$CYGPATH -u "$windows_path"`
21544    new_path="$unix_path"
21545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21547    new_path="$unix_path"
21548  fi
21549
21550  if test "x$path" != "x$new_path"; then
21551    BOOT_JDK="$new_path"
21552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21554  fi
21555
21556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21558
21559    else
21560      # We're on a unix platform. Hooray! :)
21561      path="$BOOT_JDK"
21562      has_space=`$ECHO "$path" | $GREP " "`
21563      if test "x$has_space" != x; then
21564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21567      fi
21568
21569      # Use eval to expand a potential ~
21570      eval path="$path"
21571      if test ! -f "$path" && test ! -d "$path"; then
21572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21573      fi
21574
21575      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21576    fi
21577  fi
21578
21579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21580$as_echo_n "checking for Boot JDK... " >&6; }
21581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21582$as_echo "$BOOT_JDK" >&6; }
21583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21584$as_echo_n "checking Boot JDK version... " >&6; }
21585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21587$as_echo "$BOOT_JDK_VERSION" >&6; }
21588          fi # end check jdk version
21589        fi # end check javac
21590      fi # end check java
21591    fi # end check boot jdk found
21592  fi
21593
21594
21595  if test "x$BOOT_JDK_FOUND" = xno; then
21596    # Now execute the test
21597
21598  if test -x /usr/libexec/java_home; then
21599    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21600    BOOT_JDK_FOUND=maybe
21601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21602$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21603  fi
21604
21605
21606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21608      # Do we have a bin/java?
21609      if test ! -x "$BOOT_JDK/bin/java"; then
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21612        BOOT_JDK_FOUND=no
21613      else
21614        # Do we have a bin/javac?
21615        if test ! -x "$BOOT_JDK/bin/javac"; then
21616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21620          BOOT_JDK_FOUND=no
21621        else
21622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21624
21625          # Extra M4 quote needed to protect [] in grep expression.
21626          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21627          if test "x$FOUND_CORRECT_VERSION" = x; then
21628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21632            BOOT_JDK_FOUND=no
21633          else
21634            # We're done! :-)
21635            BOOT_JDK_FOUND=yes
21636
21637  # Only process if variable expands to non-empty
21638
21639  if test "x$BOOT_JDK" != x; then
21640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21641
21642  # Input might be given as Windows format, start by converting to
21643  # unix format.
21644  path="$BOOT_JDK"
21645  new_path=`$CYGPATH -u "$path"`
21646
21647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21650  # "foo.exe" is OK but "foo" is an error.
21651  #
21652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21653  # It is also a way to make sure we got the proper file name for the real test later on.
21654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21655  if test "x$test_shortpath" = x; then
21656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21659  fi
21660
21661  # Call helper function which possibly converts this using DOS-style short mode.
21662  # If so, the updated path is stored in $new_path.
21663
21664  input_path="$new_path"
21665  # Check if we need to convert this using DOS-style short mode. If the path
21666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21667  # take no chances and rewrite it.
21668  # Note: m4 eats our [], so we need to use [ and ] instead.
21669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21670  if test "x$has_forbidden_chars" != x; then
21671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21675      # Going to short mode and back again did indeed matter. Since short mode is
21676      # case insensitive, let's make it lowercase to improve readability.
21677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21678      # Now convert it back to Unix-style (cygpath)
21679      input_path=`$CYGPATH -u "$shortmode_path"`
21680      new_path="$input_path"
21681    fi
21682  fi
21683
21684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21685  if test "x$test_cygdrive_prefix" = x; then
21686    # As a simple fix, exclude /usr/bin since it's not a real path.
21687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21689      # a path prefixed by /cygdrive for fixpath to work.
21690      new_path="$CYGWIN_ROOT_PATH$input_path"
21691    fi
21692  fi
21693
21694
21695  if test "x$path" != "x$new_path"; then
21696    BOOT_JDK="$new_path"
21697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21699  fi
21700
21701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21702
21703  path="$BOOT_JDK"
21704  has_colon=`$ECHO $path | $GREP ^.:`
21705  new_path="$path"
21706  if test "x$has_colon" = x; then
21707    # Not in mixed or Windows style, start by that.
21708    new_path=`cmd //c echo $path`
21709  fi
21710
21711
21712  input_path="$new_path"
21713  # Check if we need to convert this using DOS-style short mode. If the path
21714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21715  # take no chances and rewrite it.
21716  # Note: m4 eats our [], so we need to use [ and ] instead.
21717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21718  if test "x$has_forbidden_chars" != x; then
21719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21721  fi
21722
21723
21724  windows_path="$new_path"
21725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21726    unix_path=`$CYGPATH -u "$windows_path"`
21727    new_path="$unix_path"
21728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21730    new_path="$unix_path"
21731  fi
21732
21733  if test "x$path" != "x$new_path"; then
21734    BOOT_JDK="$new_path"
21735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21737  fi
21738
21739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21741
21742    else
21743      # We're on a unix platform. Hooray! :)
21744      path="$BOOT_JDK"
21745      has_space=`$ECHO "$path" | $GREP " "`
21746      if test "x$has_space" != x; then
21747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21750      fi
21751
21752      # Use eval to expand a potential ~
21753      eval path="$path"
21754      if test ! -f "$path" && test ! -d "$path"; then
21755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21756      fi
21757
21758      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21759    fi
21760  fi
21761
21762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21763$as_echo_n "checking for Boot JDK... " >&6; }
21764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21765$as_echo "$BOOT_JDK" >&6; }
21766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21767$as_echo_n "checking Boot JDK version... " >&6; }
21768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21770$as_echo "$BOOT_JDK_VERSION" >&6; }
21771          fi # end check jdk version
21772        fi # end check javac
21773      fi # end check java
21774    fi # end check boot jdk found
21775  fi
21776
21777
21778  if test "x$BOOT_JDK_FOUND" = xno; then
21779    # Now execute the test
21780
21781  if test -x /usr/libexec/java_home; then
21782    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21783    BOOT_JDK_FOUND=maybe
21784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21785$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21786  fi
21787
21788
21789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21791      # Do we have a bin/java?
21792      if test ! -x "$BOOT_JDK/bin/java"; then
21793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21795        BOOT_JDK_FOUND=no
21796      else
21797        # Do we have a bin/javac?
21798        if test ! -x "$BOOT_JDK/bin/javac"; then
21799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21803          BOOT_JDK_FOUND=no
21804        else
21805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21807
21808          # Extra M4 quote needed to protect [] in grep expression.
21809          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21810          if test "x$FOUND_CORRECT_VERSION" = x; then
21811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21815            BOOT_JDK_FOUND=no
21816          else
21817            # We're done! :-)
21818            BOOT_JDK_FOUND=yes
21819
21820  # Only process if variable expands to non-empty
21821
21822  if test "x$BOOT_JDK" != x; then
21823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21824
21825  # Input might be given as Windows format, start by converting to
21826  # unix format.
21827  path="$BOOT_JDK"
21828  new_path=`$CYGPATH -u "$path"`
21829
21830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21833  # "foo.exe" is OK but "foo" is an error.
21834  #
21835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21836  # It is also a way to make sure we got the proper file name for the real test later on.
21837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21838  if test "x$test_shortpath" = x; then
21839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21842  fi
21843
21844  # Call helper function which possibly converts this using DOS-style short mode.
21845  # If so, the updated path is stored in $new_path.
21846
21847  input_path="$new_path"
21848  # Check if we need to convert this using DOS-style short mode. If the path
21849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21850  # take no chances and rewrite it.
21851  # Note: m4 eats our [], so we need to use [ and ] instead.
21852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21853  if test "x$has_forbidden_chars" != x; then
21854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21858      # Going to short mode and back again did indeed matter. Since short mode is
21859      # case insensitive, let's make it lowercase to improve readability.
21860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21861      # Now convert it back to Unix-style (cygpath)
21862      input_path=`$CYGPATH -u "$shortmode_path"`
21863      new_path="$input_path"
21864    fi
21865  fi
21866
21867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21868  if test "x$test_cygdrive_prefix" = x; then
21869    # As a simple fix, exclude /usr/bin since it's not a real path.
21870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21872      # a path prefixed by /cygdrive for fixpath to work.
21873      new_path="$CYGWIN_ROOT_PATH$input_path"
21874    fi
21875  fi
21876
21877
21878  if test "x$path" != "x$new_path"; then
21879    BOOT_JDK="$new_path"
21880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21882  fi
21883
21884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21885
21886  path="$BOOT_JDK"
21887  has_colon=`$ECHO $path | $GREP ^.:`
21888  new_path="$path"
21889  if test "x$has_colon" = x; then
21890    # Not in mixed or Windows style, start by that.
21891    new_path=`cmd //c echo $path`
21892  fi
21893
21894
21895  input_path="$new_path"
21896  # Check if we need to convert this using DOS-style short mode. If the path
21897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21898  # take no chances and rewrite it.
21899  # Note: m4 eats our [], so we need to use [ and ] instead.
21900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21901  if test "x$has_forbidden_chars" != x; then
21902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21904  fi
21905
21906
21907  windows_path="$new_path"
21908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21909    unix_path=`$CYGPATH -u "$windows_path"`
21910    new_path="$unix_path"
21911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21913    new_path="$unix_path"
21914  fi
21915
21916  if test "x$path" != "x$new_path"; then
21917    BOOT_JDK="$new_path"
21918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21920  fi
21921
21922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21924
21925    else
21926      # We're on a unix platform. Hooray! :)
21927      path="$BOOT_JDK"
21928      has_space=`$ECHO "$path" | $GREP " "`
21929      if test "x$has_space" != x; then
21930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21933      fi
21934
21935      # Use eval to expand a potential ~
21936      eval path="$path"
21937      if test ! -f "$path" && test ! -d "$path"; then
21938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21939      fi
21940
21941      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21942    fi
21943  fi
21944
21945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21946$as_echo_n "checking for Boot JDK... " >&6; }
21947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21948$as_echo "$BOOT_JDK" >&6; }
21949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21950$as_echo_n "checking Boot JDK version... " >&6; }
21951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21953$as_echo "$BOOT_JDK_VERSION" >&6; }
21954          fi # end check jdk version
21955        fi # end check javac
21956      fi # end check java
21957    fi # end check boot jdk found
21958  fi
21959
21960  fi
21961
21962
21963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21965      # Do we have a bin/java?
21966      if test ! -x "$BOOT_JDK/bin/java"; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21969        BOOT_JDK_FOUND=no
21970      else
21971        # Do we have a bin/javac?
21972        if test ! -x "$BOOT_JDK/bin/javac"; then
21973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21977          BOOT_JDK_FOUND=no
21978        else
21979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21981
21982          # Extra M4 quote needed to protect [] in grep expression.
21983          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21984          if test "x$FOUND_CORRECT_VERSION" = x; then
21985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21989            BOOT_JDK_FOUND=no
21990          else
21991            # We're done! :-)
21992            BOOT_JDK_FOUND=yes
21993
21994  # Only process if variable expands to non-empty
21995
21996  if test "x$BOOT_JDK" != x; then
21997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21998
21999  # Input might be given as Windows format, start by converting to
22000  # unix format.
22001  path="$BOOT_JDK"
22002  new_path=`$CYGPATH -u "$path"`
22003
22004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22007  # "foo.exe" is OK but "foo" is an error.
22008  #
22009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22010  # It is also a way to make sure we got the proper file name for the real test later on.
22011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22012  if test "x$test_shortpath" = x; then
22013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22016  fi
22017
22018  # Call helper function which possibly converts this using DOS-style short mode.
22019  # If so, the updated path is stored in $new_path.
22020
22021  input_path="$new_path"
22022  # Check if we need to convert this using DOS-style short mode. If the path
22023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22024  # take no chances and rewrite it.
22025  # Note: m4 eats our [], so we need to use [ and ] instead.
22026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22027  if test "x$has_forbidden_chars" != x; then
22028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22032      # Going to short mode and back again did indeed matter. Since short mode is
22033      # case insensitive, let's make it lowercase to improve readability.
22034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22035      # Now convert it back to Unix-style (cygpath)
22036      input_path=`$CYGPATH -u "$shortmode_path"`
22037      new_path="$input_path"
22038    fi
22039  fi
22040
22041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22042  if test "x$test_cygdrive_prefix" = x; then
22043    # As a simple fix, exclude /usr/bin since it's not a real path.
22044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22046      # a path prefixed by /cygdrive for fixpath to work.
22047      new_path="$CYGWIN_ROOT_PATH$input_path"
22048    fi
22049  fi
22050
22051
22052  if test "x$path" != "x$new_path"; then
22053    BOOT_JDK="$new_path"
22054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22056  fi
22057
22058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22059
22060  path="$BOOT_JDK"
22061  has_colon=`$ECHO $path | $GREP ^.:`
22062  new_path="$path"
22063  if test "x$has_colon" = x; then
22064    # Not in mixed or Windows style, start by that.
22065    new_path=`cmd //c echo $path`
22066  fi
22067
22068
22069  input_path="$new_path"
22070  # Check if we need to convert this using DOS-style short mode. If the path
22071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22072  # take no chances and rewrite it.
22073  # Note: m4 eats our [], so we need to use [ and ] instead.
22074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22075  if test "x$has_forbidden_chars" != x; then
22076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22078  fi
22079
22080
22081  windows_path="$new_path"
22082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22083    unix_path=`$CYGPATH -u "$windows_path"`
22084    new_path="$unix_path"
22085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22087    new_path="$unix_path"
22088  fi
22089
22090  if test "x$path" != "x$new_path"; then
22091    BOOT_JDK="$new_path"
22092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22094  fi
22095
22096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22098
22099    else
22100      # We're on a unix platform. Hooray! :)
22101      path="$BOOT_JDK"
22102      has_space=`$ECHO "$path" | $GREP " "`
22103      if test "x$has_space" != x; then
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22107      fi
22108
22109      # Use eval to expand a potential ~
22110      eval path="$path"
22111      if test ! -f "$path" && test ! -d "$path"; then
22112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22113      fi
22114
22115      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22116    fi
22117  fi
22118
22119            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22120$as_echo_n "checking for Boot JDK... " >&6; }
22121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22122$as_echo "$BOOT_JDK" >&6; }
22123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22124$as_echo_n "checking Boot JDK version... " >&6; }
22125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22127$as_echo "$BOOT_JDK_VERSION" >&6; }
22128          fi # end check jdk version
22129        fi # end check javac
22130      fi # end check java
22131    fi # end check boot jdk found
22132  fi
22133
22134
22135  # Test: Is $JAVA_HOME set?
22136
22137  if test "x$BOOT_JDK_FOUND" = xno; then
22138    # Now execute the test
22139
22140  if test "x$JAVA_HOME" != x; then
22141    JAVA_HOME_PROCESSED="$JAVA_HOME"
22142
22143  # Only process if variable expands to non-empty
22144
22145  if test "x$JAVA_HOME_PROCESSED" != x; then
22146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22147
22148  # Input might be given as Windows format, start by converting to
22149  # unix format.
22150  path="$JAVA_HOME_PROCESSED"
22151  new_path=`$CYGPATH -u "$path"`
22152
22153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22156  # "foo.exe" is OK but "foo" is an error.
22157  #
22158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22159  # It is also a way to make sure we got the proper file name for the real test later on.
22160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22161  if test "x$test_shortpath" = x; then
22162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22163$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22164    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22165  fi
22166
22167  # Call helper function which possibly converts this using DOS-style short mode.
22168  # If so, the updated path is stored in $new_path.
22169
22170  input_path="$new_path"
22171  # Check if we need to convert this using DOS-style short mode. If the path
22172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22173  # take no chances and rewrite it.
22174  # Note: m4 eats our [], so we need to use [ and ] instead.
22175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22176  if test "x$has_forbidden_chars" != x; then
22177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22181      # Going to short mode and back again did indeed matter. Since short mode is
22182      # case insensitive, let's make it lowercase to improve readability.
22183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22184      # Now convert it back to Unix-style (cygpath)
22185      input_path=`$CYGPATH -u "$shortmode_path"`
22186      new_path="$input_path"
22187    fi
22188  fi
22189
22190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22191  if test "x$test_cygdrive_prefix" = x; then
22192    # As a simple fix, exclude /usr/bin since it's not a real path.
22193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22195      # a path prefixed by /cygdrive for fixpath to work.
22196      new_path="$CYGWIN_ROOT_PATH$input_path"
22197    fi
22198  fi
22199
22200
22201  if test "x$path" != "x$new_path"; then
22202    JAVA_HOME_PROCESSED="$new_path"
22203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22204$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22205  fi
22206
22207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22208
22209  path="$JAVA_HOME_PROCESSED"
22210  has_colon=`$ECHO $path | $GREP ^.:`
22211  new_path="$path"
22212  if test "x$has_colon" = x; then
22213    # Not in mixed or Windows style, start by that.
22214    new_path=`cmd //c echo $path`
22215  fi
22216
22217
22218  input_path="$new_path"
22219  # Check if we need to convert this using DOS-style short mode. If the path
22220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22221  # take no chances and rewrite it.
22222  # Note: m4 eats our [], so we need to use [ and ] instead.
22223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22224  if test "x$has_forbidden_chars" != x; then
22225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22227  fi
22228
22229
22230  windows_path="$new_path"
22231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22232    unix_path=`$CYGPATH -u "$windows_path"`
22233    new_path="$unix_path"
22234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22236    new_path="$unix_path"
22237  fi
22238
22239  if test "x$path" != "x$new_path"; then
22240    JAVA_HOME_PROCESSED="$new_path"
22241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22242$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22243  fi
22244
22245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22247
22248    else
22249      # We're on a unix platform. Hooray! :)
22250      path="$JAVA_HOME_PROCESSED"
22251      has_space=`$ECHO "$path" | $GREP " "`
22252      if test "x$has_space" != x; then
22253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22254$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22255        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22256      fi
22257
22258      # Use eval to expand a potential ~
22259      eval path="$path"
22260      if test ! -f "$path" && test ! -d "$path"; then
22261        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22262      fi
22263
22264      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22265    fi
22266  fi
22267
22268    if test ! -d "$JAVA_HOME_PROCESSED"; then
22269      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22270$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22271    else
22272      # Aha, the user has set a JAVA_HOME
22273      # let us use that as the Boot JDK.
22274      BOOT_JDK="$JAVA_HOME_PROCESSED"
22275      BOOT_JDK_FOUND=maybe
22276      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22277$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22278    fi
22279  fi
22280
22281
22282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22284      # Do we have a bin/java?
22285      if test ! -x "$BOOT_JDK/bin/java"; then
22286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22288        BOOT_JDK_FOUND=no
22289      else
22290        # Do we have a bin/javac?
22291        if test ! -x "$BOOT_JDK/bin/javac"; then
22292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22296          BOOT_JDK_FOUND=no
22297        else
22298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22300
22301          # Extra M4 quote needed to protect [] in grep expression.
22302          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22303          if test "x$FOUND_CORRECT_VERSION" = x; then
22304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22308            BOOT_JDK_FOUND=no
22309          else
22310            # We're done! :-)
22311            BOOT_JDK_FOUND=yes
22312
22313  # Only process if variable expands to non-empty
22314
22315  if test "x$BOOT_JDK" != x; then
22316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22317
22318  # Input might be given as Windows format, start by converting to
22319  # unix format.
22320  path="$BOOT_JDK"
22321  new_path=`$CYGPATH -u "$path"`
22322
22323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22326  # "foo.exe" is OK but "foo" is an error.
22327  #
22328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22329  # It is also a way to make sure we got the proper file name for the real test later on.
22330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22331  if test "x$test_shortpath" = x; then
22332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22335  fi
22336
22337  # Call helper function which possibly converts this using DOS-style short mode.
22338  # If so, the updated path is stored in $new_path.
22339
22340  input_path="$new_path"
22341  # Check if we need to convert this using DOS-style short mode. If the path
22342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22343  # take no chances and rewrite it.
22344  # Note: m4 eats our [], so we need to use [ and ] instead.
22345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22346  if test "x$has_forbidden_chars" != x; then
22347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22351      # Going to short mode and back again did indeed matter. Since short mode is
22352      # case insensitive, let's make it lowercase to improve readability.
22353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22354      # Now convert it back to Unix-style (cygpath)
22355      input_path=`$CYGPATH -u "$shortmode_path"`
22356      new_path="$input_path"
22357    fi
22358  fi
22359
22360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22361  if test "x$test_cygdrive_prefix" = x; then
22362    # As a simple fix, exclude /usr/bin since it's not a real path.
22363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22365      # a path prefixed by /cygdrive for fixpath to work.
22366      new_path="$CYGWIN_ROOT_PATH$input_path"
22367    fi
22368  fi
22369
22370
22371  if test "x$path" != "x$new_path"; then
22372    BOOT_JDK="$new_path"
22373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22375  fi
22376
22377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22378
22379  path="$BOOT_JDK"
22380  has_colon=`$ECHO $path | $GREP ^.:`
22381  new_path="$path"
22382  if test "x$has_colon" = x; then
22383    # Not in mixed or Windows style, start by that.
22384    new_path=`cmd //c echo $path`
22385  fi
22386
22387
22388  input_path="$new_path"
22389  # Check if we need to convert this using DOS-style short mode. If the path
22390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22391  # take no chances and rewrite it.
22392  # Note: m4 eats our [], so we need to use [ and ] instead.
22393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22394  if test "x$has_forbidden_chars" != x; then
22395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22397  fi
22398
22399
22400  windows_path="$new_path"
22401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22402    unix_path=`$CYGPATH -u "$windows_path"`
22403    new_path="$unix_path"
22404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22406    new_path="$unix_path"
22407  fi
22408
22409  if test "x$path" != "x$new_path"; then
22410    BOOT_JDK="$new_path"
22411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22413  fi
22414
22415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22417
22418    else
22419      # We're on a unix platform. Hooray! :)
22420      path="$BOOT_JDK"
22421      has_space=`$ECHO "$path" | $GREP " "`
22422      if test "x$has_space" != x; then
22423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22426      fi
22427
22428      # Use eval to expand a potential ~
22429      eval path="$path"
22430      if test ! -f "$path" && test ! -d "$path"; then
22431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22432      fi
22433
22434      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22435    fi
22436  fi
22437
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22439$as_echo_n "checking for Boot JDK... " >&6; }
22440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22441$as_echo "$BOOT_JDK" >&6; }
22442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22443$as_echo_n "checking Boot JDK version... " >&6; }
22444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22446$as_echo "$BOOT_JDK_VERSION" >&6; }
22447          fi # end check jdk version
22448        fi # end check javac
22449      fi # end check java
22450    fi # end check boot jdk found
22451  fi
22452
22453
22454  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22455
22456  if test "x$BOOT_JDK_FOUND" = xno; then
22457    # Now execute the test
22458
22459  # Extract the first word of "javac", so it can be a program name with args.
22460set dummy javac; ac_word=$2
22461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22462$as_echo_n "checking for $ac_word... " >&6; }
22463if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22464  $as_echo_n "(cached) " >&6
22465else
22466  case $JAVAC_CHECK in
22467  [\\/]* | ?:[\\/]*)
22468  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22469  ;;
22470  *)
22471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22472for as_dir in $PATH
22473do
22474  IFS=$as_save_IFS
22475  test -z "$as_dir" && as_dir=.
22476    for ac_exec_ext in '' $ac_executable_extensions; do
22477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22478    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22480    break 2
22481  fi
22482done
22483  done
22484IFS=$as_save_IFS
22485
22486  ;;
22487esac
22488fi
22489JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22490if test -n "$JAVAC_CHECK"; then
22491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22492$as_echo "$JAVAC_CHECK" >&6; }
22493else
22494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22495$as_echo "no" >&6; }
22496fi
22497
22498
22499  # Extract the first word of "java", so it can be a program name with args.
22500set dummy java; ac_word=$2
22501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22502$as_echo_n "checking for $ac_word... " >&6; }
22503if ${ac_cv_path_JAVA_CHECK+:} false; then :
22504  $as_echo_n "(cached) " >&6
22505else
22506  case $JAVA_CHECK in
22507  [\\/]* | ?:[\\/]*)
22508  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22509  ;;
22510  *)
22511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22512for as_dir in $PATH
22513do
22514  IFS=$as_save_IFS
22515  test -z "$as_dir" && as_dir=.
22516    for ac_exec_ext in '' $ac_executable_extensions; do
22517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22518    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22520    break 2
22521  fi
22522done
22523  done
22524IFS=$as_save_IFS
22525
22526  ;;
22527esac
22528fi
22529JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22530if test -n "$JAVA_CHECK"; then
22531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22532$as_echo "$JAVA_CHECK" >&6; }
22533else
22534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22535$as_echo "no" >&6; }
22536fi
22537
22538
22539  BINARY="$JAVAC_CHECK"
22540  if test "x$JAVAC_CHECK" = x; then
22541    BINARY="$JAVA_CHECK"
22542  fi
22543  if test "x$BINARY" != x; then
22544    # So there is a java(c) binary, it might be part of a JDK.
22545    # Lets find the JDK/JRE directory by following symbolic links.
22546    # Linux/GNU systems often have links from /usr/bin/java to
22547    # /etc/alternatives/java to the real JDK binary.
22548
22549  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22550    # Follow a chain of symbolic links. Use readlink
22551    # where it exists, else fall back to horribly
22552    # complicated shell code.
22553    if test "x$READLINK_TESTED" != yes; then
22554      # On MacOSX there is a readlink tool with a different
22555      # purpose than the GNU readlink tool. Check the found readlink.
22556      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22557      if test "x$ISGNU" = x; then
22558        # A readlink that we do not know how to use.
22559        # Are there other non-GNU readlinks out there?
22560        READLINK_TESTED=yes
22561        READLINK=
22562      fi
22563    fi
22564
22565    if test "x$READLINK" != x; then
22566      BINARY=`$READLINK -f $BINARY`
22567    else
22568      # Save the current directory for restoring afterwards
22569      STARTDIR=$PWD
22570      COUNTER=0
22571      sym_link_dir=`$DIRNAME $BINARY`
22572      sym_link_file=`$BASENAME $BINARY`
22573      cd $sym_link_dir
22574      # Use -P flag to resolve symlinks in directories.
22575      cd `$THEPWDCMD -P`
22576      sym_link_dir=`$THEPWDCMD -P`
22577      # Resolve file symlinks
22578      while test $COUNTER -lt 20; do
22579        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22580        if test "x$ISLINK" == x; then
22581          # This is not a symbolic link! We are done!
22582          break
22583        fi
22584        # Again resolve directory symlinks since the target of the just found
22585        # link could be in a different directory
22586        cd `$DIRNAME $ISLINK`
22587        sym_link_dir=`$THEPWDCMD -P`
22588        sym_link_file=`$BASENAME $ISLINK`
22589        let COUNTER=COUNTER+1
22590      done
22591      cd $STARTDIR
22592      BINARY=$sym_link_dir/$sym_link_file
22593    fi
22594  fi
22595
22596    BOOT_JDK=`dirname "$BINARY"`
22597    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22598    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22599      # Looks like we found ourselves an JDK
22600      BOOT_JDK_FOUND=maybe
22601      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22602$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22603    fi
22604  fi
22605
22606
22607    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22608    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22609      # Do we have a bin/java?
22610      if test ! -x "$BOOT_JDK/bin/java"; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22613        BOOT_JDK_FOUND=no
22614      else
22615        # Do we have a bin/javac?
22616        if test ! -x "$BOOT_JDK/bin/javac"; then
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22619          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22620$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22621          BOOT_JDK_FOUND=no
22622        else
22623          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22624          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22625
22626          # Extra M4 quote needed to protect [] in grep expression.
22627          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22628          if test "x$FOUND_CORRECT_VERSION" = x; then
22629            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22631            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22632$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22633            BOOT_JDK_FOUND=no
22634          else
22635            # We're done! :-)
22636            BOOT_JDK_FOUND=yes
22637
22638  # Only process if variable expands to non-empty
22639
22640  if test "x$BOOT_JDK" != x; then
22641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22642
22643  # Input might be given as Windows format, start by converting to
22644  # unix format.
22645  path="$BOOT_JDK"
22646  new_path=`$CYGPATH -u "$path"`
22647
22648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22651  # "foo.exe" is OK but "foo" is an error.
22652  #
22653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22654  # It is also a way to make sure we got the proper file name for the real test later on.
22655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22656  if test "x$test_shortpath" = x; then
22657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22659    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22660  fi
22661
22662  # Call helper function which possibly converts this using DOS-style short mode.
22663  # If so, the updated path is stored in $new_path.
22664
22665  input_path="$new_path"
22666  # Check if we need to convert this using DOS-style short mode. If the path
22667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22668  # take no chances and rewrite it.
22669  # Note: m4 eats our [], so we need to use [ and ] instead.
22670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22671  if test "x$has_forbidden_chars" != x; then
22672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22676      # Going to short mode and back again did indeed matter. Since short mode is
22677      # case insensitive, let's make it lowercase to improve readability.
22678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22679      # Now convert it back to Unix-style (cygpath)
22680      input_path=`$CYGPATH -u "$shortmode_path"`
22681      new_path="$input_path"
22682    fi
22683  fi
22684
22685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22686  if test "x$test_cygdrive_prefix" = x; then
22687    # As a simple fix, exclude /usr/bin since it's not a real path.
22688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22690      # a path prefixed by /cygdrive for fixpath to work.
22691      new_path="$CYGWIN_ROOT_PATH$input_path"
22692    fi
22693  fi
22694
22695
22696  if test "x$path" != "x$new_path"; then
22697    BOOT_JDK="$new_path"
22698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22700  fi
22701
22702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22703
22704  path="$BOOT_JDK"
22705  has_colon=`$ECHO $path | $GREP ^.:`
22706  new_path="$path"
22707  if test "x$has_colon" = x; then
22708    # Not in mixed or Windows style, start by that.
22709    new_path=`cmd //c echo $path`
22710  fi
22711
22712
22713  input_path="$new_path"
22714  # Check if we need to convert this using DOS-style short mode. If the path
22715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22716  # take no chances and rewrite it.
22717  # Note: m4 eats our [], so we need to use [ and ] instead.
22718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22719  if test "x$has_forbidden_chars" != x; then
22720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22722  fi
22723
22724
22725  windows_path="$new_path"
22726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727    unix_path=`$CYGPATH -u "$windows_path"`
22728    new_path="$unix_path"
22729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22731    new_path="$unix_path"
22732  fi
22733
22734  if test "x$path" != "x$new_path"; then
22735    BOOT_JDK="$new_path"
22736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22738  fi
22739
22740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22742
22743    else
22744      # We're on a unix platform. Hooray! :)
22745      path="$BOOT_JDK"
22746      has_space=`$ECHO "$path" | $GREP " "`
22747      if test "x$has_space" != x; then
22748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22751      fi
22752
22753      # Use eval to expand a potential ~
22754      eval path="$path"
22755      if test ! -f "$path" && test ! -d "$path"; then
22756        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22757      fi
22758
22759      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22760    fi
22761  fi
22762
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22764$as_echo_n "checking for Boot JDK... " >&6; }
22765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22766$as_echo "$BOOT_JDK" >&6; }
22767            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22768$as_echo_n "checking Boot JDK version... " >&6; }
22769            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22771$as_echo "$BOOT_JDK_VERSION" >&6; }
22772          fi # end check jdk version
22773        fi # end check javac
22774      fi # end check java
22775    fi # end check boot jdk found
22776  fi
22777
22778
22779  # Test: Is there a JDK installed in default, well-known locations?
22780
22781  if test "x$BOOT_JDK_FOUND" = xno; then
22782    # Now execute the test
22783
22784  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22785
22786  if test "x$BOOT_JDK_FOUND" = xno; then
22787    # Now execute the test
22788
22789  if test "x$ProgramW6432" != x; then
22790    VIRTUAL_DIR="$ProgramW6432/Java"
22791
22792  windows_path="$VIRTUAL_DIR"
22793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22794    unix_path=`$CYGPATH -u "$windows_path"`
22795    VIRTUAL_DIR="$unix_path"
22796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22798    VIRTUAL_DIR="$unix_path"
22799  fi
22800
22801
22802  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22803  BOOT_JDK_SUFFIX=""
22804  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22805  if test "x$ALL_JDKS_FOUND" != x; then
22806    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22807
22808  if test "x$BOOT_JDK_FOUND" = xno; then
22809    # Now execute the test
22810
22811        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22812        if test -d "$BOOT_JDK"; then
22813          BOOT_JDK_FOUND=maybe
22814          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22815$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22816        fi
22817
22818
22819    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22820    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22821      # Do we have a bin/java?
22822      if test ! -x "$BOOT_JDK/bin/java"; then
22823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22825        BOOT_JDK_FOUND=no
22826      else
22827        # Do we have a bin/javac?
22828        if test ! -x "$BOOT_JDK/bin/javac"; then
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22831          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22832$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22833          BOOT_JDK_FOUND=no
22834        else
22835          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22836          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22837
22838          # Extra M4 quote needed to protect [] in grep expression.
22839          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22840          if test "x$FOUND_CORRECT_VERSION" = x; then
22841            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22843            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22844$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22845            BOOT_JDK_FOUND=no
22846          else
22847            # We're done! :-)
22848            BOOT_JDK_FOUND=yes
22849
22850  # Only process if variable expands to non-empty
22851
22852  if test "x$BOOT_JDK" != x; then
22853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22854
22855  # Input might be given as Windows format, start by converting to
22856  # unix format.
22857  path="$BOOT_JDK"
22858  new_path=`$CYGPATH -u "$path"`
22859
22860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22863  # "foo.exe" is OK but "foo" is an error.
22864  #
22865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22866  # It is also a way to make sure we got the proper file name for the real test later on.
22867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22868  if test "x$test_shortpath" = x; then
22869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22871    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22872  fi
22873
22874  # Call helper function which possibly converts this using DOS-style short mode.
22875  # If so, the updated path is stored in $new_path.
22876
22877  input_path="$new_path"
22878  # Check if we need to convert this using DOS-style short mode. If the path
22879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22880  # take no chances and rewrite it.
22881  # Note: m4 eats our [], so we need to use [ and ] instead.
22882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22883  if test "x$has_forbidden_chars" != x; then
22884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22888      # Going to short mode and back again did indeed matter. Since short mode is
22889      # case insensitive, let's make it lowercase to improve readability.
22890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22891      # Now convert it back to Unix-style (cygpath)
22892      input_path=`$CYGPATH -u "$shortmode_path"`
22893      new_path="$input_path"
22894    fi
22895  fi
22896
22897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22898  if test "x$test_cygdrive_prefix" = x; then
22899    # As a simple fix, exclude /usr/bin since it's not a real path.
22900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22902      # a path prefixed by /cygdrive for fixpath to work.
22903      new_path="$CYGWIN_ROOT_PATH$input_path"
22904    fi
22905  fi
22906
22907
22908  if test "x$path" != "x$new_path"; then
22909    BOOT_JDK="$new_path"
22910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22912  fi
22913
22914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22915
22916  path="$BOOT_JDK"
22917  has_colon=`$ECHO $path | $GREP ^.:`
22918  new_path="$path"
22919  if test "x$has_colon" = x; then
22920    # Not in mixed or Windows style, start by that.
22921    new_path=`cmd //c echo $path`
22922  fi
22923
22924
22925  input_path="$new_path"
22926  # Check if we need to convert this using DOS-style short mode. If the path
22927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22928  # take no chances and rewrite it.
22929  # Note: m4 eats our [], so we need to use [ and ] instead.
22930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22931  if test "x$has_forbidden_chars" != x; then
22932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22934  fi
22935
22936
22937  windows_path="$new_path"
22938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22939    unix_path=`$CYGPATH -u "$windows_path"`
22940    new_path="$unix_path"
22941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22943    new_path="$unix_path"
22944  fi
22945
22946  if test "x$path" != "x$new_path"; then
22947    BOOT_JDK="$new_path"
22948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22950  fi
22951
22952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22954
22955    else
22956      # We're on a unix platform. Hooray! :)
22957      path="$BOOT_JDK"
22958      has_space=`$ECHO "$path" | $GREP " "`
22959      if test "x$has_space" != x; then
22960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22963      fi
22964
22965      # Use eval to expand a potential ~
22966      eval path="$path"
22967      if test ! -f "$path" && test ! -d "$path"; then
22968        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22969      fi
22970
22971      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22972    fi
22973  fi
22974
22975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22976$as_echo_n "checking for Boot JDK... " >&6; }
22977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22978$as_echo "$BOOT_JDK" >&6; }
22979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22980$as_echo_n "checking Boot JDK version... " >&6; }
22981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22983$as_echo "$BOOT_JDK_VERSION" >&6; }
22984          fi # end check jdk version
22985        fi # end check javac
22986      fi # end check java
22987    fi # end check boot jdk found
22988  fi
22989
22990    done
22991  fi
22992
22993  fi
22994
22995
22996    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22997    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22998      # Do we have a bin/java?
22999      if test ! -x "$BOOT_JDK/bin/java"; then
23000        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23002        BOOT_JDK_FOUND=no
23003      else
23004        # Do we have a bin/javac?
23005        if test ! -x "$BOOT_JDK/bin/javac"; then
23006          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23008          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23009$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23010          BOOT_JDK_FOUND=no
23011        else
23012          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23013          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23014
23015          # Extra M4 quote needed to protect [] in grep expression.
23016          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23017          if test "x$FOUND_CORRECT_VERSION" = x; then
23018            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23020            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23021$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23022            BOOT_JDK_FOUND=no
23023          else
23024            # We're done! :-)
23025            BOOT_JDK_FOUND=yes
23026
23027  # Only process if variable expands to non-empty
23028
23029  if test "x$BOOT_JDK" != x; then
23030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23031
23032  # Input might be given as Windows format, start by converting to
23033  # unix format.
23034  path="$BOOT_JDK"
23035  new_path=`$CYGPATH -u "$path"`
23036
23037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23040  # "foo.exe" is OK but "foo" is an error.
23041  #
23042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23043  # It is also a way to make sure we got the proper file name for the real test later on.
23044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23045  if test "x$test_shortpath" = x; then
23046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23049  fi
23050
23051  # Call helper function which possibly converts this using DOS-style short mode.
23052  # If so, the updated path is stored in $new_path.
23053
23054  input_path="$new_path"
23055  # Check if we need to convert this using DOS-style short mode. If the path
23056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23057  # take no chances and rewrite it.
23058  # Note: m4 eats our [], so we need to use [ and ] instead.
23059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23060  if test "x$has_forbidden_chars" != x; then
23061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23065      # Going to short mode and back again did indeed matter. Since short mode is
23066      # case insensitive, let's make it lowercase to improve readability.
23067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23068      # Now convert it back to Unix-style (cygpath)
23069      input_path=`$CYGPATH -u "$shortmode_path"`
23070      new_path="$input_path"
23071    fi
23072  fi
23073
23074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23075  if test "x$test_cygdrive_prefix" = x; then
23076    # As a simple fix, exclude /usr/bin since it's not a real path.
23077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23079      # a path prefixed by /cygdrive for fixpath to work.
23080      new_path="$CYGWIN_ROOT_PATH$input_path"
23081    fi
23082  fi
23083
23084
23085  if test "x$path" != "x$new_path"; then
23086    BOOT_JDK="$new_path"
23087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23089  fi
23090
23091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23092
23093  path="$BOOT_JDK"
23094  has_colon=`$ECHO $path | $GREP ^.:`
23095  new_path="$path"
23096  if test "x$has_colon" = x; then
23097    # Not in mixed or Windows style, start by that.
23098    new_path=`cmd //c echo $path`
23099  fi
23100
23101
23102  input_path="$new_path"
23103  # Check if we need to convert this using DOS-style short mode. If the path
23104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23105  # take no chances and rewrite it.
23106  # Note: m4 eats our [], so we need to use [ and ] instead.
23107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23108  if test "x$has_forbidden_chars" != x; then
23109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23111  fi
23112
23113
23114  windows_path="$new_path"
23115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23116    unix_path=`$CYGPATH -u "$windows_path"`
23117    new_path="$unix_path"
23118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23120    new_path="$unix_path"
23121  fi
23122
23123  if test "x$path" != "x$new_path"; then
23124    BOOT_JDK="$new_path"
23125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23127  fi
23128
23129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23131
23132    else
23133      # We're on a unix platform. Hooray! :)
23134      path="$BOOT_JDK"
23135      has_space=`$ECHO "$path" | $GREP " "`
23136      if test "x$has_space" != x; then
23137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23140      fi
23141
23142      # Use eval to expand a potential ~
23143      eval path="$path"
23144      if test ! -f "$path" && test ! -d "$path"; then
23145        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23146      fi
23147
23148      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23149    fi
23150  fi
23151
23152            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23153$as_echo_n "checking for Boot JDK... " >&6; }
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23155$as_echo "$BOOT_JDK" >&6; }
23156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23157$as_echo_n "checking Boot JDK version... " >&6; }
23158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23160$as_echo "$BOOT_JDK_VERSION" >&6; }
23161          fi # end check jdk version
23162        fi # end check javac
23163      fi # end check java
23164    fi # end check boot jdk found
23165  fi
23166
23167
23168  if test "x$BOOT_JDK_FOUND" = xno; then
23169    # Now execute the test
23170
23171  if test "x$PROGRAMW6432" != x; then
23172    VIRTUAL_DIR="$PROGRAMW6432/Java"
23173
23174  windows_path="$VIRTUAL_DIR"
23175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23176    unix_path=`$CYGPATH -u "$windows_path"`
23177    VIRTUAL_DIR="$unix_path"
23178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23180    VIRTUAL_DIR="$unix_path"
23181  fi
23182
23183
23184  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23185  BOOT_JDK_SUFFIX=""
23186  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23187  if test "x$ALL_JDKS_FOUND" != x; then
23188    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23189
23190  if test "x$BOOT_JDK_FOUND" = xno; then
23191    # Now execute the test
23192
23193        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23194        if test -d "$BOOT_JDK"; then
23195          BOOT_JDK_FOUND=maybe
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23197$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23198        fi
23199
23200
23201    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23202    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23203      # Do we have a bin/java?
23204      if test ! -x "$BOOT_JDK/bin/java"; then
23205        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23207        BOOT_JDK_FOUND=no
23208      else
23209        # Do we have a bin/javac?
23210        if test ! -x "$BOOT_JDK/bin/javac"; then
23211          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23213          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23214$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23215          BOOT_JDK_FOUND=no
23216        else
23217          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23218          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23219
23220          # Extra M4 quote needed to protect [] in grep expression.
23221          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23222          if test "x$FOUND_CORRECT_VERSION" = x; then
23223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23225            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23226$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23227            BOOT_JDK_FOUND=no
23228          else
23229            # We're done! :-)
23230            BOOT_JDK_FOUND=yes
23231
23232  # Only process if variable expands to non-empty
23233
23234  if test "x$BOOT_JDK" != x; then
23235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23236
23237  # Input might be given as Windows format, start by converting to
23238  # unix format.
23239  path="$BOOT_JDK"
23240  new_path=`$CYGPATH -u "$path"`
23241
23242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23245  # "foo.exe" is OK but "foo" is an error.
23246  #
23247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23248  # It is also a way to make sure we got the proper file name for the real test later on.
23249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23250  if test "x$test_shortpath" = x; then
23251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23253    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23254  fi
23255
23256  # Call helper function which possibly converts this using DOS-style short mode.
23257  # If so, the updated path is stored in $new_path.
23258
23259  input_path="$new_path"
23260  # Check if we need to convert this using DOS-style short mode. If the path
23261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23262  # take no chances and rewrite it.
23263  # Note: m4 eats our [], so we need to use [ and ] instead.
23264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23265  if test "x$has_forbidden_chars" != x; then
23266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23270      # Going to short mode and back again did indeed matter. Since short mode is
23271      # case insensitive, let's make it lowercase to improve readability.
23272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23273      # Now convert it back to Unix-style (cygpath)
23274      input_path=`$CYGPATH -u "$shortmode_path"`
23275      new_path="$input_path"
23276    fi
23277  fi
23278
23279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23280  if test "x$test_cygdrive_prefix" = x; then
23281    # As a simple fix, exclude /usr/bin since it's not a real path.
23282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23284      # a path prefixed by /cygdrive for fixpath to work.
23285      new_path="$CYGWIN_ROOT_PATH$input_path"
23286    fi
23287  fi
23288
23289
23290  if test "x$path" != "x$new_path"; then
23291    BOOT_JDK="$new_path"
23292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23294  fi
23295
23296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297
23298  path="$BOOT_JDK"
23299  has_colon=`$ECHO $path | $GREP ^.:`
23300  new_path="$path"
23301  if test "x$has_colon" = x; then
23302    # Not in mixed or Windows style, start by that.
23303    new_path=`cmd //c echo $path`
23304  fi
23305
23306
23307  input_path="$new_path"
23308  # Check if we need to convert this using DOS-style short mode. If the path
23309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23310  # take no chances and rewrite it.
23311  # Note: m4 eats our [], so we need to use [ and ] instead.
23312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23313  if test "x$has_forbidden_chars" != x; then
23314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23316  fi
23317
23318
23319  windows_path="$new_path"
23320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23321    unix_path=`$CYGPATH -u "$windows_path"`
23322    new_path="$unix_path"
23323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23325    new_path="$unix_path"
23326  fi
23327
23328  if test "x$path" != "x$new_path"; then
23329    BOOT_JDK="$new_path"
23330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23332  fi
23333
23334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23336
23337    else
23338      # We're on a unix platform. Hooray! :)
23339      path="$BOOT_JDK"
23340      has_space=`$ECHO "$path" | $GREP " "`
23341      if test "x$has_space" != x; then
23342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23345      fi
23346
23347      # Use eval to expand a potential ~
23348      eval path="$path"
23349      if test ! -f "$path" && test ! -d "$path"; then
23350        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23351      fi
23352
23353      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23354    fi
23355  fi
23356
23357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23358$as_echo_n "checking for Boot JDK... " >&6; }
23359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23360$as_echo "$BOOT_JDK" >&6; }
23361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23362$as_echo_n "checking Boot JDK version... " >&6; }
23363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23365$as_echo "$BOOT_JDK_VERSION" >&6; }
23366          fi # end check jdk version
23367        fi # end check javac
23368      fi # end check java
23369    fi # end check boot jdk found
23370  fi
23371
23372    done
23373  fi
23374
23375  fi
23376
23377
23378    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23379    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23380      # Do we have a bin/java?
23381      if test ! -x "$BOOT_JDK/bin/java"; then
23382        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23384        BOOT_JDK_FOUND=no
23385      else
23386        # Do we have a bin/javac?
23387        if test ! -x "$BOOT_JDK/bin/javac"; then
23388          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23390          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23391$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23392          BOOT_JDK_FOUND=no
23393        else
23394          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23395          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23396
23397          # Extra M4 quote needed to protect [] in grep expression.
23398          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23399          if test "x$FOUND_CORRECT_VERSION" = x; then
23400            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23402            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23403$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23404            BOOT_JDK_FOUND=no
23405          else
23406            # We're done! :-)
23407            BOOT_JDK_FOUND=yes
23408
23409  # Only process if variable expands to non-empty
23410
23411  if test "x$BOOT_JDK" != x; then
23412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23413
23414  # Input might be given as Windows format, start by converting to
23415  # unix format.
23416  path="$BOOT_JDK"
23417  new_path=`$CYGPATH -u "$path"`
23418
23419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23422  # "foo.exe" is OK but "foo" is an error.
23423  #
23424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23425  # It is also a way to make sure we got the proper file name for the real test later on.
23426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23427  if test "x$test_shortpath" = x; then
23428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23430    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23431  fi
23432
23433  # Call helper function which possibly converts this using DOS-style short mode.
23434  # If so, the updated path is stored in $new_path.
23435
23436  input_path="$new_path"
23437  # Check if we need to convert this using DOS-style short mode. If the path
23438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23439  # take no chances and rewrite it.
23440  # Note: m4 eats our [], so we need to use [ and ] instead.
23441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23442  if test "x$has_forbidden_chars" != x; then
23443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23447      # Going to short mode and back again did indeed matter. Since short mode is
23448      # case insensitive, let's make it lowercase to improve readability.
23449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23450      # Now convert it back to Unix-style (cygpath)
23451      input_path=`$CYGPATH -u "$shortmode_path"`
23452      new_path="$input_path"
23453    fi
23454  fi
23455
23456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23457  if test "x$test_cygdrive_prefix" = x; then
23458    # As a simple fix, exclude /usr/bin since it's not a real path.
23459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23461      # a path prefixed by /cygdrive for fixpath to work.
23462      new_path="$CYGWIN_ROOT_PATH$input_path"
23463    fi
23464  fi
23465
23466
23467  if test "x$path" != "x$new_path"; then
23468    BOOT_JDK="$new_path"
23469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23471  fi
23472
23473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23474
23475  path="$BOOT_JDK"
23476  has_colon=`$ECHO $path | $GREP ^.:`
23477  new_path="$path"
23478  if test "x$has_colon" = x; then
23479    # Not in mixed or Windows style, start by that.
23480    new_path=`cmd //c echo $path`
23481  fi
23482
23483
23484  input_path="$new_path"
23485  # Check if we need to convert this using DOS-style short mode. If the path
23486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23487  # take no chances and rewrite it.
23488  # Note: m4 eats our [], so we need to use [ and ] instead.
23489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23490  if test "x$has_forbidden_chars" != x; then
23491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23493  fi
23494
23495
23496  windows_path="$new_path"
23497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23498    unix_path=`$CYGPATH -u "$windows_path"`
23499    new_path="$unix_path"
23500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23502    new_path="$unix_path"
23503  fi
23504
23505  if test "x$path" != "x$new_path"; then
23506    BOOT_JDK="$new_path"
23507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23509  fi
23510
23511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23513
23514    else
23515      # We're on a unix platform. Hooray! :)
23516      path="$BOOT_JDK"
23517      has_space=`$ECHO "$path" | $GREP " "`
23518      if test "x$has_space" != x; then
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23521        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23522      fi
23523
23524      # Use eval to expand a potential ~
23525      eval path="$path"
23526      if test ! -f "$path" && test ! -d "$path"; then
23527        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23528      fi
23529
23530      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23531    fi
23532  fi
23533
23534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23535$as_echo_n "checking for Boot JDK... " >&6; }
23536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23537$as_echo "$BOOT_JDK" >&6; }
23538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23539$as_echo_n "checking Boot JDK version... " >&6; }
23540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23542$as_echo "$BOOT_JDK_VERSION" >&6; }
23543          fi # end check jdk version
23544        fi # end check javac
23545      fi # end check java
23546    fi # end check boot jdk found
23547  fi
23548
23549
23550  if test "x$BOOT_JDK_FOUND" = xno; then
23551    # Now execute the test
23552
23553  if test "x$PROGRAMFILES" != x; then
23554    VIRTUAL_DIR="$PROGRAMFILES/Java"
23555
23556  windows_path="$VIRTUAL_DIR"
23557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23558    unix_path=`$CYGPATH -u "$windows_path"`
23559    VIRTUAL_DIR="$unix_path"
23560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23562    VIRTUAL_DIR="$unix_path"
23563  fi
23564
23565
23566  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23567  BOOT_JDK_SUFFIX=""
23568  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23569  if test "x$ALL_JDKS_FOUND" != x; then
23570    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23571
23572  if test "x$BOOT_JDK_FOUND" = xno; then
23573    # Now execute the test
23574
23575        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23576        if test -d "$BOOT_JDK"; then
23577          BOOT_JDK_FOUND=maybe
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23579$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23580        fi
23581
23582
23583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23585      # Do we have a bin/java?
23586      if test ! -x "$BOOT_JDK/bin/java"; then
23587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23589        BOOT_JDK_FOUND=no
23590      else
23591        # Do we have a bin/javac?
23592        if test ! -x "$BOOT_JDK/bin/javac"; then
23593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23597          BOOT_JDK_FOUND=no
23598        else
23599          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23600          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23601
23602          # Extra M4 quote needed to protect [] in grep expression.
23603          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23604          if test "x$FOUND_CORRECT_VERSION" = x; then
23605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23607            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23608$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23609            BOOT_JDK_FOUND=no
23610          else
23611            # We're done! :-)
23612            BOOT_JDK_FOUND=yes
23613
23614  # Only process if variable expands to non-empty
23615
23616  if test "x$BOOT_JDK" != x; then
23617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618
23619  # Input might be given as Windows format, start by converting to
23620  # unix format.
23621  path="$BOOT_JDK"
23622  new_path=`$CYGPATH -u "$path"`
23623
23624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23627  # "foo.exe" is OK but "foo" is an error.
23628  #
23629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23630  # It is also a way to make sure we got the proper file name for the real test later on.
23631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23632  if test "x$test_shortpath" = x; then
23633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23636  fi
23637
23638  # Call helper function which possibly converts this using DOS-style short mode.
23639  # If so, the updated path is stored in $new_path.
23640
23641  input_path="$new_path"
23642  # Check if we need to convert this using DOS-style short mode. If the path
23643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23644  # take no chances and rewrite it.
23645  # Note: m4 eats our [], so we need to use [ and ] instead.
23646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23647  if test "x$has_forbidden_chars" != x; then
23648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23652      # Going to short mode and back again did indeed matter. Since short mode is
23653      # case insensitive, let's make it lowercase to improve readability.
23654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655      # Now convert it back to Unix-style (cygpath)
23656      input_path=`$CYGPATH -u "$shortmode_path"`
23657      new_path="$input_path"
23658    fi
23659  fi
23660
23661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23662  if test "x$test_cygdrive_prefix" = x; then
23663    # As a simple fix, exclude /usr/bin since it's not a real path.
23664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23666      # a path prefixed by /cygdrive for fixpath to work.
23667      new_path="$CYGWIN_ROOT_PATH$input_path"
23668    fi
23669  fi
23670
23671
23672  if test "x$path" != "x$new_path"; then
23673    BOOT_JDK="$new_path"
23674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23676  fi
23677
23678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679
23680  path="$BOOT_JDK"
23681  has_colon=`$ECHO $path | $GREP ^.:`
23682  new_path="$path"
23683  if test "x$has_colon" = x; then
23684    # Not in mixed or Windows style, start by that.
23685    new_path=`cmd //c echo $path`
23686  fi
23687
23688
23689  input_path="$new_path"
23690  # Check if we need to convert this using DOS-style short mode. If the path
23691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23692  # take no chances and rewrite it.
23693  # Note: m4 eats our [], so we need to use [ and ] instead.
23694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23695  if test "x$has_forbidden_chars" != x; then
23696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23698  fi
23699
23700
23701  windows_path="$new_path"
23702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703    unix_path=`$CYGPATH -u "$windows_path"`
23704    new_path="$unix_path"
23705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23707    new_path="$unix_path"
23708  fi
23709
23710  if test "x$path" != "x$new_path"; then
23711    BOOT_JDK="$new_path"
23712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23714  fi
23715
23716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23718
23719    else
23720      # We're on a unix platform. Hooray! :)
23721      path="$BOOT_JDK"
23722      has_space=`$ECHO "$path" | $GREP " "`
23723      if test "x$has_space" != x; then
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23727      fi
23728
23729      # Use eval to expand a potential ~
23730      eval path="$path"
23731      if test ! -f "$path" && test ! -d "$path"; then
23732        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23733      fi
23734
23735      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23736    fi
23737  fi
23738
23739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23740$as_echo_n "checking for Boot JDK... " >&6; }
23741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23742$as_echo "$BOOT_JDK" >&6; }
23743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23744$as_echo_n "checking Boot JDK version... " >&6; }
23745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23747$as_echo "$BOOT_JDK_VERSION" >&6; }
23748          fi # end check jdk version
23749        fi # end check javac
23750      fi # end check java
23751    fi # end check boot jdk found
23752  fi
23753
23754    done
23755  fi
23756
23757  fi
23758
23759
23760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23762      # Do we have a bin/java?
23763      if test ! -x "$BOOT_JDK/bin/java"; then
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23766        BOOT_JDK_FOUND=no
23767      else
23768        # Do we have a bin/javac?
23769        if test ! -x "$BOOT_JDK/bin/javac"; then
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23774          BOOT_JDK_FOUND=no
23775        else
23776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23778
23779          # Extra M4 quote needed to protect [] in grep expression.
23780          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23781          if test "x$FOUND_CORRECT_VERSION" = x; then
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23786            BOOT_JDK_FOUND=no
23787          else
23788            # We're done! :-)
23789            BOOT_JDK_FOUND=yes
23790
23791  # Only process if variable expands to non-empty
23792
23793  if test "x$BOOT_JDK" != x; then
23794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23795
23796  # Input might be given as Windows format, start by converting to
23797  # unix format.
23798  path="$BOOT_JDK"
23799  new_path=`$CYGPATH -u "$path"`
23800
23801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23804  # "foo.exe" is OK but "foo" is an error.
23805  #
23806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23807  # It is also a way to make sure we got the proper file name for the real test later on.
23808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23809  if test "x$test_shortpath" = x; then
23810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23813  fi
23814
23815  # Call helper function which possibly converts this using DOS-style short mode.
23816  # If so, the updated path is stored in $new_path.
23817
23818  input_path="$new_path"
23819  # Check if we need to convert this using DOS-style short mode. If the path
23820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23821  # take no chances and rewrite it.
23822  # Note: m4 eats our [], so we need to use [ and ] instead.
23823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23824  if test "x$has_forbidden_chars" != x; then
23825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23829      # Going to short mode and back again did indeed matter. Since short mode is
23830      # case insensitive, let's make it lowercase to improve readability.
23831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23832      # Now convert it back to Unix-style (cygpath)
23833      input_path=`$CYGPATH -u "$shortmode_path"`
23834      new_path="$input_path"
23835    fi
23836  fi
23837
23838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23839  if test "x$test_cygdrive_prefix" = x; then
23840    # As a simple fix, exclude /usr/bin since it's not a real path.
23841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23843      # a path prefixed by /cygdrive for fixpath to work.
23844      new_path="$CYGWIN_ROOT_PATH$input_path"
23845    fi
23846  fi
23847
23848
23849  if test "x$path" != "x$new_path"; then
23850    BOOT_JDK="$new_path"
23851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23853  fi
23854
23855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23856
23857  path="$BOOT_JDK"
23858  has_colon=`$ECHO $path | $GREP ^.:`
23859  new_path="$path"
23860  if test "x$has_colon" = x; then
23861    # Not in mixed or Windows style, start by that.
23862    new_path=`cmd //c echo $path`
23863  fi
23864
23865
23866  input_path="$new_path"
23867  # Check if we need to convert this using DOS-style short mode. If the path
23868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23869  # take no chances and rewrite it.
23870  # Note: m4 eats our [], so we need to use [ and ] instead.
23871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23872  if test "x$has_forbidden_chars" != x; then
23873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23875  fi
23876
23877
23878  windows_path="$new_path"
23879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23880    unix_path=`$CYGPATH -u "$windows_path"`
23881    new_path="$unix_path"
23882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23884    new_path="$unix_path"
23885  fi
23886
23887  if test "x$path" != "x$new_path"; then
23888    BOOT_JDK="$new_path"
23889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23891  fi
23892
23893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23895
23896    else
23897      # We're on a unix platform. Hooray! :)
23898      path="$BOOT_JDK"
23899      has_space=`$ECHO "$path" | $GREP " "`
23900      if test "x$has_space" != x; then
23901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23904      fi
23905
23906      # Use eval to expand a potential ~
23907      eval path="$path"
23908      if test ! -f "$path" && test ! -d "$path"; then
23909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23910      fi
23911
23912      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23913    fi
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931
23932  if test "x$BOOT_JDK_FOUND" = xno; then
23933    # Now execute the test
23934
23935  if test "x$ProgramFiles" != x; then
23936    VIRTUAL_DIR="$ProgramFiles/Java"
23937
23938  windows_path="$VIRTUAL_DIR"
23939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23940    unix_path=`$CYGPATH -u "$windows_path"`
23941    VIRTUAL_DIR="$unix_path"
23942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23944    VIRTUAL_DIR="$unix_path"
23945  fi
23946
23947
23948  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23949  BOOT_JDK_SUFFIX=""
23950  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23951  if test "x$ALL_JDKS_FOUND" != x; then
23952    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23953
23954  if test "x$BOOT_JDK_FOUND" = xno; then
23955    # Now execute the test
23956
23957        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23958        if test -d "$BOOT_JDK"; then
23959          BOOT_JDK_FOUND=maybe
23960          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23961$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23962        fi
23963
23964
23965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23967      # Do we have a bin/java?
23968      if test ! -x "$BOOT_JDK/bin/java"; then
23969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23971        BOOT_JDK_FOUND=no
23972      else
23973        # Do we have a bin/javac?
23974        if test ! -x "$BOOT_JDK/bin/javac"; then
23975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23979          BOOT_JDK_FOUND=no
23980        else
23981          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23982          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23983
23984          # Extra M4 quote needed to protect [] in grep expression.
23985          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23986          if test "x$FOUND_CORRECT_VERSION" = x; then
23987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23989            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23990$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23991            BOOT_JDK_FOUND=no
23992          else
23993            # We're done! :-)
23994            BOOT_JDK_FOUND=yes
23995
23996  # Only process if variable expands to non-empty
23997
23998  if test "x$BOOT_JDK" != x; then
23999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24000
24001  # Input might be given as Windows format, start by converting to
24002  # unix format.
24003  path="$BOOT_JDK"
24004  new_path=`$CYGPATH -u "$path"`
24005
24006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24009  # "foo.exe" is OK but "foo" is an error.
24010  #
24011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24012  # It is also a way to make sure we got the proper file name for the real test later on.
24013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24014  if test "x$test_shortpath" = x; then
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24018  fi
24019
24020  # Call helper function which possibly converts this using DOS-style short mode.
24021  # If so, the updated path is stored in $new_path.
24022
24023  input_path="$new_path"
24024  # Check if we need to convert this using DOS-style short mode. If the path
24025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24026  # take no chances and rewrite it.
24027  # Note: m4 eats our [], so we need to use [ and ] instead.
24028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24029  if test "x$has_forbidden_chars" != x; then
24030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24034      # Going to short mode and back again did indeed matter. Since short mode is
24035      # case insensitive, let's make it lowercase to improve readability.
24036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24037      # Now convert it back to Unix-style (cygpath)
24038      input_path=`$CYGPATH -u "$shortmode_path"`
24039      new_path="$input_path"
24040    fi
24041  fi
24042
24043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24044  if test "x$test_cygdrive_prefix" = x; then
24045    # As a simple fix, exclude /usr/bin since it's not a real path.
24046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24048      # a path prefixed by /cygdrive for fixpath to work.
24049      new_path="$CYGWIN_ROOT_PATH$input_path"
24050    fi
24051  fi
24052
24053
24054  if test "x$path" != "x$new_path"; then
24055    BOOT_JDK="$new_path"
24056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24058  fi
24059
24060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24061
24062  path="$BOOT_JDK"
24063  has_colon=`$ECHO $path | $GREP ^.:`
24064  new_path="$path"
24065  if test "x$has_colon" = x; then
24066    # Not in mixed or Windows style, start by that.
24067    new_path=`cmd //c echo $path`
24068  fi
24069
24070
24071  input_path="$new_path"
24072  # Check if we need to convert this using DOS-style short mode. If the path
24073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24074  # take no chances and rewrite it.
24075  # Note: m4 eats our [], so we need to use [ and ] instead.
24076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24077  if test "x$has_forbidden_chars" != x; then
24078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24080  fi
24081
24082
24083  windows_path="$new_path"
24084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24085    unix_path=`$CYGPATH -u "$windows_path"`
24086    new_path="$unix_path"
24087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24089    new_path="$unix_path"
24090  fi
24091
24092  if test "x$path" != "x$new_path"; then
24093    BOOT_JDK="$new_path"
24094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24096  fi
24097
24098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24100
24101    else
24102      # We're on a unix platform. Hooray! :)
24103      path="$BOOT_JDK"
24104      has_space=`$ECHO "$path" | $GREP " "`
24105      if test "x$has_space" != x; then
24106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24109      fi
24110
24111      # Use eval to expand a potential ~
24112      eval path="$path"
24113      if test ! -f "$path" && test ! -d "$path"; then
24114        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24115      fi
24116
24117      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24118    fi
24119  fi
24120
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24122$as_echo_n "checking for Boot JDK... " >&6; }
24123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24124$as_echo "$BOOT_JDK" >&6; }
24125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24126$as_echo_n "checking Boot JDK version... " >&6; }
24127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24129$as_echo "$BOOT_JDK_VERSION" >&6; }
24130          fi # end check jdk version
24131        fi # end check javac
24132      fi # end check java
24133    fi # end check boot jdk found
24134  fi
24135
24136    done
24137  fi
24138
24139  fi
24140
24141
24142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24144      # Do we have a bin/java?
24145      if test ! -x "$BOOT_JDK/bin/java"; then
24146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24148        BOOT_JDK_FOUND=no
24149      else
24150        # Do we have a bin/javac?
24151        if test ! -x "$BOOT_JDK/bin/javac"; then
24152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24156          BOOT_JDK_FOUND=no
24157        else
24158          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24159          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24160
24161          # Extra M4 quote needed to protect [] in grep expression.
24162          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24163          if test "x$FOUND_CORRECT_VERSION" = x; then
24164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24166            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24168            BOOT_JDK_FOUND=no
24169          else
24170            # We're done! :-)
24171            BOOT_JDK_FOUND=yes
24172
24173  # Only process if variable expands to non-empty
24174
24175  if test "x$BOOT_JDK" != x; then
24176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24177
24178  # Input might be given as Windows format, start by converting to
24179  # unix format.
24180  path="$BOOT_JDK"
24181  new_path=`$CYGPATH -u "$path"`
24182
24183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24186  # "foo.exe" is OK but "foo" is an error.
24187  #
24188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24189  # It is also a way to make sure we got the proper file name for the real test later on.
24190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24191  if test "x$test_shortpath" = x; then
24192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24195  fi
24196
24197  # Call helper function which possibly converts this using DOS-style short mode.
24198  # If so, the updated path is stored in $new_path.
24199
24200  input_path="$new_path"
24201  # Check if we need to convert this using DOS-style short mode. If the path
24202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24203  # take no chances and rewrite it.
24204  # Note: m4 eats our [], so we need to use [ and ] instead.
24205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24206  if test "x$has_forbidden_chars" != x; then
24207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24211      # Going to short mode and back again did indeed matter. Since short mode is
24212      # case insensitive, let's make it lowercase to improve readability.
24213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214      # Now convert it back to Unix-style (cygpath)
24215      input_path=`$CYGPATH -u "$shortmode_path"`
24216      new_path="$input_path"
24217    fi
24218  fi
24219
24220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24221  if test "x$test_cygdrive_prefix" = x; then
24222    # As a simple fix, exclude /usr/bin since it's not a real path.
24223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24225      # a path prefixed by /cygdrive for fixpath to work.
24226      new_path="$CYGWIN_ROOT_PATH$input_path"
24227    fi
24228  fi
24229
24230
24231  if test "x$path" != "x$new_path"; then
24232    BOOT_JDK="$new_path"
24233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24235  fi
24236
24237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238
24239  path="$BOOT_JDK"
24240  has_colon=`$ECHO $path | $GREP ^.:`
24241  new_path="$path"
24242  if test "x$has_colon" = x; then
24243    # Not in mixed or Windows style, start by that.
24244    new_path=`cmd //c echo $path`
24245  fi
24246
24247
24248  input_path="$new_path"
24249  # Check if we need to convert this using DOS-style short mode. If the path
24250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24251  # take no chances and rewrite it.
24252  # Note: m4 eats our [], so we need to use [ and ] instead.
24253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24254  if test "x$has_forbidden_chars" != x; then
24255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24257  fi
24258
24259
24260  windows_path="$new_path"
24261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24262    unix_path=`$CYGPATH -u "$windows_path"`
24263    new_path="$unix_path"
24264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24266    new_path="$unix_path"
24267  fi
24268
24269  if test "x$path" != "x$new_path"; then
24270    BOOT_JDK="$new_path"
24271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24273  fi
24274
24275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24277
24278    else
24279      # We're on a unix platform. Hooray! :)
24280      path="$BOOT_JDK"
24281      has_space=`$ECHO "$path" | $GREP " "`
24282      if test "x$has_space" != x; then
24283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24286      fi
24287
24288      # Use eval to expand a potential ~
24289      eval path="$path"
24290      if test ! -f "$path" && test ! -d "$path"; then
24291        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24292      fi
24293
24294      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24295    fi
24296  fi
24297
24298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24299$as_echo_n "checking for Boot JDK... " >&6; }
24300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24301$as_echo "$BOOT_JDK" >&6; }
24302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24303$as_echo_n "checking Boot JDK version... " >&6; }
24304            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24306$as_echo "$BOOT_JDK_VERSION" >&6; }
24307          fi # end check jdk version
24308        fi # end check javac
24309      fi # end check java
24310    fi # end check boot jdk found
24311  fi
24312
24313
24314  if test "x$BOOT_JDK_FOUND" = xno; then
24315    # Now execute the test
24316
24317  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24318  BOOT_JDK_SUFFIX=""
24319  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24320  if test "x$ALL_JDKS_FOUND" != x; then
24321    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24322
24323  if test "x$BOOT_JDK_FOUND" = xno; then
24324    # Now execute the test
24325
24326        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24327        if test -d "$BOOT_JDK"; then
24328          BOOT_JDK_FOUND=maybe
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24330$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24331        fi
24332
24333
24334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24336      # Do we have a bin/java?
24337      if test ! -x "$BOOT_JDK/bin/java"; then
24338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24340        BOOT_JDK_FOUND=no
24341      else
24342        # Do we have a bin/javac?
24343        if test ! -x "$BOOT_JDK/bin/javac"; then
24344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24348          BOOT_JDK_FOUND=no
24349        else
24350          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24351          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24352
24353          # Extra M4 quote needed to protect [] in grep expression.
24354          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24355          if test "x$FOUND_CORRECT_VERSION" = x; then
24356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24359$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24360            BOOT_JDK_FOUND=no
24361          else
24362            # We're done! :-)
24363            BOOT_JDK_FOUND=yes
24364
24365  # Only process if variable expands to non-empty
24366
24367  if test "x$BOOT_JDK" != x; then
24368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24369
24370  # Input might be given as Windows format, start by converting to
24371  # unix format.
24372  path="$BOOT_JDK"
24373  new_path=`$CYGPATH -u "$path"`
24374
24375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24378  # "foo.exe" is OK but "foo" is an error.
24379  #
24380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24381  # It is also a way to make sure we got the proper file name for the real test later on.
24382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24383  if test "x$test_shortpath" = x; then
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24387  fi
24388
24389  # Call helper function which possibly converts this using DOS-style short mode.
24390  # If so, the updated path is stored in $new_path.
24391
24392  input_path="$new_path"
24393  # Check if we need to convert this using DOS-style short mode. If the path
24394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24395  # take no chances and rewrite it.
24396  # Note: m4 eats our [], so we need to use [ and ] instead.
24397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24398  if test "x$has_forbidden_chars" != x; then
24399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24403      # Going to short mode and back again did indeed matter. Since short mode is
24404      # case insensitive, let's make it lowercase to improve readability.
24405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24406      # Now convert it back to Unix-style (cygpath)
24407      input_path=`$CYGPATH -u "$shortmode_path"`
24408      new_path="$input_path"
24409    fi
24410  fi
24411
24412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24413  if test "x$test_cygdrive_prefix" = x; then
24414    # As a simple fix, exclude /usr/bin since it's not a real path.
24415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24417      # a path prefixed by /cygdrive for fixpath to work.
24418      new_path="$CYGWIN_ROOT_PATH$input_path"
24419    fi
24420  fi
24421
24422
24423  if test "x$path" != "x$new_path"; then
24424    BOOT_JDK="$new_path"
24425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24427  fi
24428
24429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24430
24431  path="$BOOT_JDK"
24432  has_colon=`$ECHO $path | $GREP ^.:`
24433  new_path="$path"
24434  if test "x$has_colon" = x; then
24435    # Not in mixed or Windows style, start by that.
24436    new_path=`cmd //c echo $path`
24437  fi
24438
24439
24440  input_path="$new_path"
24441  # Check if we need to convert this using DOS-style short mode. If the path
24442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24443  # take no chances and rewrite it.
24444  # Note: m4 eats our [], so we need to use [ and ] instead.
24445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24446  if test "x$has_forbidden_chars" != x; then
24447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24449  fi
24450
24451
24452  windows_path="$new_path"
24453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24454    unix_path=`$CYGPATH -u "$windows_path"`
24455    new_path="$unix_path"
24456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24458    new_path="$unix_path"
24459  fi
24460
24461  if test "x$path" != "x$new_path"; then
24462    BOOT_JDK="$new_path"
24463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24465  fi
24466
24467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24469
24470    else
24471      # We're on a unix platform. Hooray! :)
24472      path="$BOOT_JDK"
24473      has_space=`$ECHO "$path" | $GREP " "`
24474      if test "x$has_space" != x; then
24475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24478      fi
24479
24480      # Use eval to expand a potential ~
24481      eval path="$path"
24482      if test ! -f "$path" && test ! -d "$path"; then
24483        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24484      fi
24485
24486      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24487    fi
24488  fi
24489
24490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24491$as_echo_n "checking for Boot JDK... " >&6; }
24492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24493$as_echo "$BOOT_JDK" >&6; }
24494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24495$as_echo_n "checking Boot JDK version... " >&6; }
24496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24498$as_echo "$BOOT_JDK_VERSION" >&6; }
24499          fi # end check jdk version
24500        fi # end check javac
24501      fi # end check java
24502    fi # end check boot jdk found
24503  fi
24504
24505    done
24506  fi
24507
24508
24509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24511      # Do we have a bin/java?
24512      if test ! -x "$BOOT_JDK/bin/java"; then
24513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24515        BOOT_JDK_FOUND=no
24516      else
24517        # Do we have a bin/javac?
24518        if test ! -x "$BOOT_JDK/bin/javac"; then
24519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24523          BOOT_JDK_FOUND=no
24524        else
24525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24527
24528          # Extra M4 quote needed to protect [] in grep expression.
24529          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24530          if test "x$FOUND_CORRECT_VERSION" = x; then
24531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24535            BOOT_JDK_FOUND=no
24536          else
24537            # We're done! :-)
24538            BOOT_JDK_FOUND=yes
24539
24540  # Only process if variable expands to non-empty
24541
24542  if test "x$BOOT_JDK" != x; then
24543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24544
24545  # Input might be given as Windows format, start by converting to
24546  # unix format.
24547  path="$BOOT_JDK"
24548  new_path=`$CYGPATH -u "$path"`
24549
24550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24553  # "foo.exe" is OK but "foo" is an error.
24554  #
24555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24556  # It is also a way to make sure we got the proper file name for the real test later on.
24557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24558  if test "x$test_shortpath" = x; then
24559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24562  fi
24563
24564  # Call helper function which possibly converts this using DOS-style short mode.
24565  # If so, the updated path is stored in $new_path.
24566
24567  input_path="$new_path"
24568  # Check if we need to convert this using DOS-style short mode. If the path
24569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24570  # take no chances and rewrite it.
24571  # Note: m4 eats our [], so we need to use [ and ] instead.
24572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24573  if test "x$has_forbidden_chars" != x; then
24574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24578      # Going to short mode and back again did indeed matter. Since short mode is
24579      # case insensitive, let's make it lowercase to improve readability.
24580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24581      # Now convert it back to Unix-style (cygpath)
24582      input_path=`$CYGPATH -u "$shortmode_path"`
24583      new_path="$input_path"
24584    fi
24585  fi
24586
24587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24588  if test "x$test_cygdrive_prefix" = x; then
24589    # As a simple fix, exclude /usr/bin since it's not a real path.
24590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24592      # a path prefixed by /cygdrive for fixpath to work.
24593      new_path="$CYGWIN_ROOT_PATH$input_path"
24594    fi
24595  fi
24596
24597
24598  if test "x$path" != "x$new_path"; then
24599    BOOT_JDK="$new_path"
24600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24602  fi
24603
24604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24605
24606  path="$BOOT_JDK"
24607  has_colon=`$ECHO $path | $GREP ^.:`
24608  new_path="$path"
24609  if test "x$has_colon" = x; then
24610    # Not in mixed or Windows style, start by that.
24611    new_path=`cmd //c echo $path`
24612  fi
24613
24614
24615  input_path="$new_path"
24616  # Check if we need to convert this using DOS-style short mode. If the path
24617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24618  # take no chances and rewrite it.
24619  # Note: m4 eats our [], so we need to use [ and ] instead.
24620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24621  if test "x$has_forbidden_chars" != x; then
24622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24624  fi
24625
24626
24627  windows_path="$new_path"
24628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24629    unix_path=`$CYGPATH -u "$windows_path"`
24630    new_path="$unix_path"
24631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24633    new_path="$unix_path"
24634  fi
24635
24636  if test "x$path" != "x$new_path"; then
24637    BOOT_JDK="$new_path"
24638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24640  fi
24641
24642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24644
24645    else
24646      # We're on a unix platform. Hooray! :)
24647      path="$BOOT_JDK"
24648      has_space=`$ECHO "$path" | $GREP " "`
24649      if test "x$has_space" != x; then
24650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24653      fi
24654
24655      # Use eval to expand a potential ~
24656      eval path="$path"
24657      if test ! -f "$path" && test ! -d "$path"; then
24658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24659      fi
24660
24661      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24662    fi
24663  fi
24664
24665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24666$as_echo_n "checking for Boot JDK... " >&6; }
24667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24668$as_echo "$BOOT_JDK" >&6; }
24669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24670$as_echo_n "checking Boot JDK version... " >&6; }
24671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24673$as_echo "$BOOT_JDK_VERSION" >&6; }
24674          fi # end check jdk version
24675        fi # end check javac
24676      fi # end check java
24677    fi # end check boot jdk found
24678  fi
24679
24680  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24681
24682  if test "x$BOOT_JDK_FOUND" = xno; then
24683    # Now execute the test
24684
24685  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24686  BOOT_JDK_SUFFIX="/Contents/Home"
24687  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24688  if test "x$ALL_JDKS_FOUND" != x; then
24689    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24690
24691  if test "x$BOOT_JDK_FOUND" = xno; then
24692    # Now execute the test
24693
24694        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24695        if test -d "$BOOT_JDK"; then
24696          BOOT_JDK_FOUND=maybe
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24698$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24699        fi
24700
24701
24702    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24703    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24704      # Do we have a bin/java?
24705      if test ! -x "$BOOT_JDK/bin/java"; then
24706        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24708        BOOT_JDK_FOUND=no
24709      else
24710        # Do we have a bin/javac?
24711        if test ! -x "$BOOT_JDK/bin/javac"; then
24712          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24714          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24715$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24716          BOOT_JDK_FOUND=no
24717        else
24718          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24719          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24720
24721          # Extra M4 quote needed to protect [] in grep expression.
24722          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24723          if test "x$FOUND_CORRECT_VERSION" = x; then
24724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24726            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24727$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24728            BOOT_JDK_FOUND=no
24729          else
24730            # We're done! :-)
24731            BOOT_JDK_FOUND=yes
24732
24733  # Only process if variable expands to non-empty
24734
24735  if test "x$BOOT_JDK" != x; then
24736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24737
24738  # Input might be given as Windows format, start by converting to
24739  # unix format.
24740  path="$BOOT_JDK"
24741  new_path=`$CYGPATH -u "$path"`
24742
24743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24746  # "foo.exe" is OK but "foo" is an error.
24747  #
24748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24749  # It is also a way to make sure we got the proper file name for the real test later on.
24750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24751  if test "x$test_shortpath" = x; then
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24755  fi
24756
24757  # Call helper function which possibly converts this using DOS-style short mode.
24758  # If so, the updated path is stored in $new_path.
24759
24760  input_path="$new_path"
24761  # Check if we need to convert this using DOS-style short mode. If the path
24762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24763  # take no chances and rewrite it.
24764  # Note: m4 eats our [], so we need to use [ and ] instead.
24765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24766  if test "x$has_forbidden_chars" != x; then
24767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24771      # Going to short mode and back again did indeed matter. Since short mode is
24772      # case insensitive, let's make it lowercase to improve readability.
24773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24774      # Now convert it back to Unix-style (cygpath)
24775      input_path=`$CYGPATH -u "$shortmode_path"`
24776      new_path="$input_path"
24777    fi
24778  fi
24779
24780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24781  if test "x$test_cygdrive_prefix" = x; then
24782    # As a simple fix, exclude /usr/bin since it's not a real path.
24783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24785      # a path prefixed by /cygdrive for fixpath to work.
24786      new_path="$CYGWIN_ROOT_PATH$input_path"
24787    fi
24788  fi
24789
24790
24791  if test "x$path" != "x$new_path"; then
24792    BOOT_JDK="$new_path"
24793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24795  fi
24796
24797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24798
24799  path="$BOOT_JDK"
24800  has_colon=`$ECHO $path | $GREP ^.:`
24801  new_path="$path"
24802  if test "x$has_colon" = x; then
24803    # Not in mixed or Windows style, start by that.
24804    new_path=`cmd //c echo $path`
24805  fi
24806
24807
24808  input_path="$new_path"
24809  # Check if we need to convert this using DOS-style short mode. If the path
24810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24811  # take no chances and rewrite it.
24812  # Note: m4 eats our [], so we need to use [ and ] instead.
24813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24814  if test "x$has_forbidden_chars" != x; then
24815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24817  fi
24818
24819
24820  windows_path="$new_path"
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822    unix_path=`$CYGPATH -u "$windows_path"`
24823    new_path="$unix_path"
24824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24826    new_path="$unix_path"
24827  fi
24828
24829  if test "x$path" != "x$new_path"; then
24830    BOOT_JDK="$new_path"
24831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24833  fi
24834
24835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24837
24838    else
24839      # We're on a unix platform. Hooray! :)
24840      path="$BOOT_JDK"
24841      has_space=`$ECHO "$path" | $GREP " "`
24842      if test "x$has_space" != x; then
24843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24846      fi
24847
24848      # Use eval to expand a potential ~
24849      eval path="$path"
24850      if test ! -f "$path" && test ! -d "$path"; then
24851        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24852      fi
24853
24854      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24855    fi
24856  fi
24857
24858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24859$as_echo_n "checking for Boot JDK... " >&6; }
24860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24861$as_echo "$BOOT_JDK" >&6; }
24862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24863$as_echo_n "checking Boot JDK version... " >&6; }
24864            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24866$as_echo "$BOOT_JDK_VERSION" >&6; }
24867          fi # end check jdk version
24868        fi # end check javac
24869      fi # end check java
24870    fi # end check boot jdk found
24871  fi
24872
24873    done
24874  fi
24875
24876
24877    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24878    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24879      # Do we have a bin/java?
24880      if test ! -x "$BOOT_JDK/bin/java"; then
24881        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24883        BOOT_JDK_FOUND=no
24884      else
24885        # Do we have a bin/javac?
24886        if test ! -x "$BOOT_JDK/bin/javac"; then
24887          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24889          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24890$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24891          BOOT_JDK_FOUND=no
24892        else
24893          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24894          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24895
24896          # Extra M4 quote needed to protect [] in grep expression.
24897          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24898          if test "x$FOUND_CORRECT_VERSION" = x; then
24899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24901            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24902$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24903            BOOT_JDK_FOUND=no
24904          else
24905            # We're done! :-)
24906            BOOT_JDK_FOUND=yes
24907
24908  # Only process if variable expands to non-empty
24909
24910  if test "x$BOOT_JDK" != x; then
24911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912
24913  # Input might be given as Windows format, start by converting to
24914  # unix format.
24915  path="$BOOT_JDK"
24916  new_path=`$CYGPATH -u "$path"`
24917
24918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24921  # "foo.exe" is OK but "foo" is an error.
24922  #
24923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24924  # It is also a way to make sure we got the proper file name for the real test later on.
24925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24926  if test "x$test_shortpath" = x; then
24927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24930  fi
24931
24932  # Call helper function which possibly converts this using DOS-style short mode.
24933  # If so, the updated path is stored in $new_path.
24934
24935  input_path="$new_path"
24936  # Check if we need to convert this using DOS-style short mode. If the path
24937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24938  # take no chances and rewrite it.
24939  # Note: m4 eats our [], so we need to use [ and ] instead.
24940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24941  if test "x$has_forbidden_chars" != x; then
24942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24946      # Going to short mode and back again did indeed matter. Since short mode is
24947      # case insensitive, let's make it lowercase to improve readability.
24948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24949      # Now convert it back to Unix-style (cygpath)
24950      input_path=`$CYGPATH -u "$shortmode_path"`
24951      new_path="$input_path"
24952    fi
24953  fi
24954
24955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24956  if test "x$test_cygdrive_prefix" = x; then
24957    # As a simple fix, exclude /usr/bin since it's not a real path.
24958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24960      # a path prefixed by /cygdrive for fixpath to work.
24961      new_path="$CYGWIN_ROOT_PATH$input_path"
24962    fi
24963  fi
24964
24965
24966  if test "x$path" != "x$new_path"; then
24967    BOOT_JDK="$new_path"
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24970  fi
24971
24972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24973
24974  path="$BOOT_JDK"
24975  has_colon=`$ECHO $path | $GREP ^.:`
24976  new_path="$path"
24977  if test "x$has_colon" = x; then
24978    # Not in mixed or Windows style, start by that.
24979    new_path=`cmd //c echo $path`
24980  fi
24981
24982
24983  input_path="$new_path"
24984  # Check if we need to convert this using DOS-style short mode. If the path
24985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24986  # take no chances and rewrite it.
24987  # Note: m4 eats our [], so we need to use [ and ] instead.
24988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24989  if test "x$has_forbidden_chars" != x; then
24990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24992  fi
24993
24994
24995  windows_path="$new_path"
24996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24997    unix_path=`$CYGPATH -u "$windows_path"`
24998    new_path="$unix_path"
24999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25001    new_path="$unix_path"
25002  fi
25003
25004  if test "x$path" != "x$new_path"; then
25005    BOOT_JDK="$new_path"
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25008  fi
25009
25010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25012
25013    else
25014      # We're on a unix platform. Hooray! :)
25015      path="$BOOT_JDK"
25016      has_space=`$ECHO "$path" | $GREP " "`
25017      if test "x$has_space" != x; then
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25021      fi
25022
25023      # Use eval to expand a potential ~
25024      eval path="$path"
25025      if test ! -f "$path" && test ! -d "$path"; then
25026        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25027      fi
25028
25029      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25030    fi
25031  fi
25032
25033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25034$as_echo_n "checking for Boot JDK... " >&6; }
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25036$as_echo "$BOOT_JDK" >&6; }
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25038$as_echo_n "checking Boot JDK version... " >&6; }
25039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25041$as_echo "$BOOT_JDK_VERSION" >&6; }
25042          fi # end check jdk version
25043        fi # end check javac
25044      fi # end check java
25045    fi # end check boot jdk found
25046  fi
25047
25048
25049  if test "x$BOOT_JDK_FOUND" = xno; then
25050    # Now execute the test
25051
25052  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25053  BOOT_JDK_SUFFIX="/Contents/Home"
25054  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25055  if test "x$ALL_JDKS_FOUND" != x; then
25056    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25057
25058  if test "x$BOOT_JDK_FOUND" = xno; then
25059    # Now execute the test
25060
25061        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25062        if test -d "$BOOT_JDK"; then
25063          BOOT_JDK_FOUND=maybe
25064          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25065$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25066        fi
25067
25068
25069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25071      # Do we have a bin/java?
25072      if test ! -x "$BOOT_JDK/bin/java"; then
25073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25075        BOOT_JDK_FOUND=no
25076      else
25077        # Do we have a bin/javac?
25078        if test ! -x "$BOOT_JDK/bin/javac"; then
25079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25083          BOOT_JDK_FOUND=no
25084        else
25085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25087
25088          # Extra M4 quote needed to protect [] in grep expression.
25089          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25090          if test "x$FOUND_CORRECT_VERSION" = x; then
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25095            BOOT_JDK_FOUND=no
25096          else
25097            # We're done! :-)
25098            BOOT_JDK_FOUND=yes
25099
25100  # Only process if variable expands to non-empty
25101
25102  if test "x$BOOT_JDK" != x; then
25103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # Input might be given as Windows format, start by converting to
25106  # unix format.
25107  path="$BOOT_JDK"
25108  new_path=`$CYGPATH -u "$path"`
25109
25110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25113  # "foo.exe" is OK but "foo" is an error.
25114  #
25115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25116  # It is also a way to make sure we got the proper file name for the real test later on.
25117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25118  if test "x$test_shortpath" = x; then
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25122  fi
25123
25124  # Call helper function which possibly converts this using DOS-style short mode.
25125  # If so, the updated path is stored in $new_path.
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25138      # Going to short mode and back again did indeed matter. Since short mode is
25139      # case insensitive, let's make it lowercase to improve readability.
25140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25141      # Now convert it back to Unix-style (cygpath)
25142      input_path=`$CYGPATH -u "$shortmode_path"`
25143      new_path="$input_path"
25144    fi
25145  fi
25146
25147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25148  if test "x$test_cygdrive_prefix" = x; then
25149    # As a simple fix, exclude /usr/bin since it's not a real path.
25150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25152      # a path prefixed by /cygdrive for fixpath to work.
25153      new_path="$CYGWIN_ROOT_PATH$input_path"
25154    fi
25155  fi
25156
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165
25166  path="$BOOT_JDK"
25167  has_colon=`$ECHO $path | $GREP ^.:`
25168  new_path="$path"
25169  if test "x$has_colon" = x; then
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $path`
25172  fi
25173
25174
25175  input_path="$new_path"
25176  # Check if we need to convert this using DOS-style short mode. If the path
25177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25178  # take no chances and rewrite it.
25179  # Note: m4 eats our [], so we need to use [ and ] instead.
25180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25181  if test "x$has_forbidden_chars" != x; then
25182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184  fi
25185
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196  if test "x$path" != "x$new_path"; then
25197    BOOT_JDK="$new_path"
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25200  fi
25201
25202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25204
25205    else
25206      # We're on a unix platform. Hooray! :)
25207      path="$BOOT_JDK"
25208      has_space=`$ECHO "$path" | $GREP " "`
25209      if test "x$has_space" != x; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25213      fi
25214
25215      # Use eval to expand a potential ~
25216      eval path="$path"
25217      if test ! -f "$path" && test ! -d "$path"; then
25218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25219      fi
25220
25221      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25222    fi
25223  fi
25224
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25226$as_echo_n "checking for Boot JDK... " >&6; }
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25228$as_echo "$BOOT_JDK" >&6; }
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25230$as_echo_n "checking Boot JDK version... " >&6; }
25231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25233$as_echo "$BOOT_JDK_VERSION" >&6; }
25234          fi # end check jdk version
25235        fi # end check javac
25236      fi # end check java
25237    fi # end check boot jdk found
25238  fi
25239
25240    done
25241  fi
25242
25243
25244    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25245    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25246      # Do we have a bin/java?
25247      if test ! -x "$BOOT_JDK/bin/java"; then
25248        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25250        BOOT_JDK_FOUND=no
25251      else
25252        # Do we have a bin/javac?
25253        if test ! -x "$BOOT_JDK/bin/javac"; then
25254          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25256          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25257$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25258          BOOT_JDK_FOUND=no
25259        else
25260          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25261          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25262
25263          # Extra M4 quote needed to protect [] in grep expression.
25264          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25265          if test "x$FOUND_CORRECT_VERSION" = x; then
25266            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25269$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25270            BOOT_JDK_FOUND=no
25271          else
25272            # We're done! :-)
25273            BOOT_JDK_FOUND=yes
25274
25275  # Only process if variable expands to non-empty
25276
25277  if test "x$BOOT_JDK" != x; then
25278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25279
25280  # Input might be given as Windows format, start by converting to
25281  # unix format.
25282  path="$BOOT_JDK"
25283  new_path=`$CYGPATH -u "$path"`
25284
25285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25288  # "foo.exe" is OK but "foo" is an error.
25289  #
25290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25291  # It is also a way to make sure we got the proper file name for the real test later on.
25292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25293  if test "x$test_shortpath" = x; then
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25296    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25297  fi
25298
25299  # Call helper function which possibly converts this using DOS-style short mode.
25300  # If so, the updated path is stored in $new_path.
25301
25302  input_path="$new_path"
25303  # Check if we need to convert this using DOS-style short mode. If the path
25304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25305  # take no chances and rewrite it.
25306  # Note: m4 eats our [], so we need to use [ and ] instead.
25307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25308  if test "x$has_forbidden_chars" != x; then
25309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25313      # Going to short mode and back again did indeed matter. Since short mode is
25314      # case insensitive, let's make it lowercase to improve readability.
25315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25316      # Now convert it back to Unix-style (cygpath)
25317      input_path=`$CYGPATH -u "$shortmode_path"`
25318      new_path="$input_path"
25319    fi
25320  fi
25321
25322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25323  if test "x$test_cygdrive_prefix" = x; then
25324    # As a simple fix, exclude /usr/bin since it's not a real path.
25325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25327      # a path prefixed by /cygdrive for fixpath to work.
25328      new_path="$CYGWIN_ROOT_PATH$input_path"
25329    fi
25330  fi
25331
25332
25333  if test "x$path" != "x$new_path"; then
25334    BOOT_JDK="$new_path"
25335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25337  fi
25338
25339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25340
25341  path="$BOOT_JDK"
25342  has_colon=`$ECHO $path | $GREP ^.:`
25343  new_path="$path"
25344  if test "x$has_colon" = x; then
25345    # Not in mixed or Windows style, start by that.
25346    new_path=`cmd //c echo $path`
25347  fi
25348
25349
25350  input_path="$new_path"
25351  # Check if we need to convert this using DOS-style short mode. If the path
25352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25353  # take no chances and rewrite it.
25354  # Note: m4 eats our [], so we need to use [ and ] instead.
25355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25356  if test "x$has_forbidden_chars" != x; then
25357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25359  fi
25360
25361
25362  windows_path="$new_path"
25363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25364    unix_path=`$CYGPATH -u "$windows_path"`
25365    new_path="$unix_path"
25366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25368    new_path="$unix_path"
25369  fi
25370
25371  if test "x$path" != "x$new_path"; then
25372    BOOT_JDK="$new_path"
25373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25375  fi
25376
25377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25379
25380    else
25381      # We're on a unix platform. Hooray! :)
25382      path="$BOOT_JDK"
25383      has_space=`$ECHO "$path" | $GREP " "`
25384      if test "x$has_space" != x; then
25385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25388      fi
25389
25390      # Use eval to expand a potential ~
25391      eval path="$path"
25392      if test ! -f "$path" && test ! -d "$path"; then
25393        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25394      fi
25395
25396      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25397    fi
25398  fi
25399
25400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25401$as_echo_n "checking for Boot JDK... " >&6; }
25402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25403$as_echo "$BOOT_JDK" >&6; }
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25405$as_echo_n "checking Boot JDK version... " >&6; }
25406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25408$as_echo "$BOOT_JDK_VERSION" >&6; }
25409          fi # end check jdk version
25410        fi # end check javac
25411      fi # end check java
25412    fi # end check boot jdk found
25413  fi
25414
25415  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25416
25417  if test "x$BOOT_JDK_FOUND" = xno; then
25418    # Now execute the test
25419
25420  BOOT_JDK_PREFIX="/usr/lib/jvm"
25421  BOOT_JDK_SUFFIX=""
25422  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25423  if test "x$ALL_JDKS_FOUND" != x; then
25424    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25425
25426  if test "x$BOOT_JDK_FOUND" = xno; then
25427    # Now execute the test
25428
25429        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25430        if test -d "$BOOT_JDK"; then
25431          BOOT_JDK_FOUND=maybe
25432          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25433$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25434        fi
25435
25436
25437    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25438    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25439      # Do we have a bin/java?
25440      if test ! -x "$BOOT_JDK/bin/java"; then
25441        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25443        BOOT_JDK_FOUND=no
25444      else
25445        # Do we have a bin/javac?
25446        if test ! -x "$BOOT_JDK/bin/javac"; then
25447          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25449          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25450$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25451          BOOT_JDK_FOUND=no
25452        else
25453          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25454          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25455
25456          # Extra M4 quote needed to protect [] in grep expression.
25457          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25458          if test "x$FOUND_CORRECT_VERSION" = x; then
25459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25461            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25462$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25463            BOOT_JDK_FOUND=no
25464          else
25465            # We're done! :-)
25466            BOOT_JDK_FOUND=yes
25467
25468  # Only process if variable expands to non-empty
25469
25470  if test "x$BOOT_JDK" != x; then
25471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25472
25473  # Input might be given as Windows format, start by converting to
25474  # unix format.
25475  path="$BOOT_JDK"
25476  new_path=`$CYGPATH -u "$path"`
25477
25478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25481  # "foo.exe" is OK but "foo" is an error.
25482  #
25483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25484  # It is also a way to make sure we got the proper file name for the real test later on.
25485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25486  if test "x$test_shortpath" = x; then
25487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25489    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25490  fi
25491
25492  # Call helper function which possibly converts this using DOS-style short mode.
25493  # If so, the updated path is stored in $new_path.
25494
25495  input_path="$new_path"
25496  # Check if we need to convert this using DOS-style short mode. If the path
25497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25498  # take no chances and rewrite it.
25499  # Note: m4 eats our [], so we need to use [ and ] instead.
25500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25501  if test "x$has_forbidden_chars" != x; then
25502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25506      # Going to short mode and back again did indeed matter. Since short mode is
25507      # case insensitive, let's make it lowercase to improve readability.
25508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25509      # Now convert it back to Unix-style (cygpath)
25510      input_path=`$CYGPATH -u "$shortmode_path"`
25511      new_path="$input_path"
25512    fi
25513  fi
25514
25515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25516  if test "x$test_cygdrive_prefix" = x; then
25517    # As a simple fix, exclude /usr/bin since it's not a real path.
25518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25520      # a path prefixed by /cygdrive for fixpath to work.
25521      new_path="$CYGWIN_ROOT_PATH$input_path"
25522    fi
25523  fi
25524
25525
25526  if test "x$path" != "x$new_path"; then
25527    BOOT_JDK="$new_path"
25528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25530  fi
25531
25532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25533
25534  path="$BOOT_JDK"
25535  has_colon=`$ECHO $path | $GREP ^.:`
25536  new_path="$path"
25537  if test "x$has_colon" = x; then
25538    # Not in mixed or Windows style, start by that.
25539    new_path=`cmd //c echo $path`
25540  fi
25541
25542
25543  input_path="$new_path"
25544  # Check if we need to convert this using DOS-style short mode. If the path
25545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25546  # take no chances and rewrite it.
25547  # Note: m4 eats our [], so we need to use [ and ] instead.
25548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25549  if test "x$has_forbidden_chars" != x; then
25550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25552  fi
25553
25554
25555  windows_path="$new_path"
25556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25557    unix_path=`$CYGPATH -u "$windows_path"`
25558    new_path="$unix_path"
25559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25561    new_path="$unix_path"
25562  fi
25563
25564  if test "x$path" != "x$new_path"; then
25565    BOOT_JDK="$new_path"
25566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25568  fi
25569
25570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25572
25573    else
25574      # We're on a unix platform. Hooray! :)
25575      path="$BOOT_JDK"
25576      has_space=`$ECHO "$path" | $GREP " "`
25577      if test "x$has_space" != x; then
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25581      fi
25582
25583      # Use eval to expand a potential ~
25584      eval path="$path"
25585      if test ! -f "$path" && test ! -d "$path"; then
25586        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25587      fi
25588
25589      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25590    fi
25591  fi
25592
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25594$as_echo_n "checking for Boot JDK... " >&6; }
25595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25596$as_echo "$BOOT_JDK" >&6; }
25597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25598$as_echo_n "checking Boot JDK version... " >&6; }
25599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25601$as_echo "$BOOT_JDK_VERSION" >&6; }
25602          fi # end check jdk version
25603        fi # end check javac
25604      fi # end check java
25605    fi # end check boot jdk found
25606  fi
25607
25608    done
25609  fi
25610
25611
25612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25614      # Do we have a bin/java?
25615      if test ! -x "$BOOT_JDK/bin/java"; then
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25618        BOOT_JDK_FOUND=no
25619      else
25620        # Do we have a bin/javac?
25621        if test ! -x "$BOOT_JDK/bin/javac"; then
25622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25626          BOOT_JDK_FOUND=no
25627        else
25628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25630
25631          # Extra M4 quote needed to protect [] in grep expression.
25632          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25633          if test "x$FOUND_CORRECT_VERSION" = x; then
25634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25638            BOOT_JDK_FOUND=no
25639          else
25640            # We're done! :-)
25641            BOOT_JDK_FOUND=yes
25642
25643  # Only process if variable expands to non-empty
25644
25645  if test "x$BOOT_JDK" != x; then
25646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647
25648  # Input might be given as Windows format, start by converting to
25649  # unix format.
25650  path="$BOOT_JDK"
25651  new_path=`$CYGPATH -u "$path"`
25652
25653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25656  # "foo.exe" is OK but "foo" is an error.
25657  #
25658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25659  # It is also a way to make sure we got the proper file name for the real test later on.
25660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25661  if test "x$test_shortpath" = x; then
25662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25665  fi
25666
25667  # Call helper function which possibly converts this using DOS-style short mode.
25668  # If so, the updated path is stored in $new_path.
25669
25670  input_path="$new_path"
25671  # Check if we need to convert this using DOS-style short mode. If the path
25672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25673  # take no chances and rewrite it.
25674  # Note: m4 eats our [], so we need to use [ and ] instead.
25675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25676  if test "x$has_forbidden_chars" != x; then
25677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25681      # Going to short mode and back again did indeed matter. Since short mode is
25682      # case insensitive, let's make it lowercase to improve readability.
25683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25684      # Now convert it back to Unix-style (cygpath)
25685      input_path=`$CYGPATH -u "$shortmode_path"`
25686      new_path="$input_path"
25687    fi
25688  fi
25689
25690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25691  if test "x$test_cygdrive_prefix" = x; then
25692    # As a simple fix, exclude /usr/bin since it's not a real path.
25693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25695      # a path prefixed by /cygdrive for fixpath to work.
25696      new_path="$CYGWIN_ROOT_PATH$input_path"
25697    fi
25698  fi
25699
25700
25701  if test "x$path" != "x$new_path"; then
25702    BOOT_JDK="$new_path"
25703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705  fi
25706
25707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25708
25709  path="$BOOT_JDK"
25710  has_colon=`$ECHO $path | $GREP ^.:`
25711  new_path="$path"
25712  if test "x$has_colon" = x; then
25713    # Not in mixed or Windows style, start by that.
25714    new_path=`cmd //c echo $path`
25715  fi
25716
25717
25718  input_path="$new_path"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25727  fi
25728
25729
25730  windows_path="$new_path"
25731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25732    unix_path=`$CYGPATH -u "$windows_path"`
25733    new_path="$unix_path"
25734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25736    new_path="$unix_path"
25737  fi
25738
25739  if test "x$path" != "x$new_path"; then
25740    BOOT_JDK="$new_path"
25741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25743  fi
25744
25745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25747
25748    else
25749      # We're on a unix platform. Hooray! :)
25750      path="$BOOT_JDK"
25751      has_space=`$ECHO "$path" | $GREP " "`
25752      if test "x$has_space" != x; then
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25756      fi
25757
25758      # Use eval to expand a potential ~
25759      eval path="$path"
25760      if test ! -f "$path" && test ! -d "$path"; then
25761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25762      fi
25763
25764      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25765    fi
25766  fi
25767
25768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25769$as_echo_n "checking for Boot JDK... " >&6; }
25770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25771$as_echo "$BOOT_JDK" >&6; }
25772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25773$as_echo_n "checking Boot JDK version... " >&6; }
25774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25776$as_echo "$BOOT_JDK_VERSION" >&6; }
25777          fi # end check jdk version
25778        fi # end check javac
25779      fi # end check java
25780    fi # end check boot jdk found
25781  fi
25782
25783  fi
25784
25785
25786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25788      # Do we have a bin/java?
25789      if test ! -x "$BOOT_JDK/bin/java"; then
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25792        BOOT_JDK_FOUND=no
25793      else
25794        # Do we have a bin/javac?
25795        if test ! -x "$BOOT_JDK/bin/javac"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25800          BOOT_JDK_FOUND=no
25801        else
25802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25804
25805          # Extra M4 quote needed to protect [] in grep expression.
25806          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25807          if test "x$FOUND_CORRECT_VERSION" = x; then
25808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25812            BOOT_JDK_FOUND=no
25813          else
25814            # We're done! :-)
25815            BOOT_JDK_FOUND=yes
25816
25817  # Only process if variable expands to non-empty
25818
25819  if test "x$BOOT_JDK" != x; then
25820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # Input might be given as Windows format, start by converting to
25823  # unix format.
25824  path="$BOOT_JDK"
25825  new_path=`$CYGPATH -u "$path"`
25826
25827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25830  # "foo.exe" is OK but "foo" is an error.
25831  #
25832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25833  # It is also a way to make sure we got the proper file name for the real test later on.
25834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25835  if test "x$test_shortpath" = x; then
25836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25839  fi
25840
25841  # Call helper function which possibly converts this using DOS-style short mode.
25842  # If so, the updated path is stored in $new_path.
25843
25844  input_path="$new_path"
25845  # Check if we need to convert this using DOS-style short mode. If the path
25846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847  # take no chances and rewrite it.
25848  # Note: m4 eats our [], so we need to use [ and ] instead.
25849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25850  if test "x$has_forbidden_chars" != x; then
25851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25855      # Going to short mode and back again did indeed matter. Since short mode is
25856      # case insensitive, let's make it lowercase to improve readability.
25857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25858      # Now convert it back to Unix-style (cygpath)
25859      input_path=`$CYGPATH -u "$shortmode_path"`
25860      new_path="$input_path"
25861    fi
25862  fi
25863
25864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25865  if test "x$test_cygdrive_prefix" = x; then
25866    # As a simple fix, exclude /usr/bin since it's not a real path.
25867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25869      # a path prefixed by /cygdrive for fixpath to work.
25870      new_path="$CYGWIN_ROOT_PATH$input_path"
25871    fi
25872  fi
25873
25874
25875  if test "x$path" != "x$new_path"; then
25876    BOOT_JDK="$new_path"
25877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25879  fi
25880
25881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882
25883  path="$BOOT_JDK"
25884  has_colon=`$ECHO $path | $GREP ^.:`
25885  new_path="$path"
25886  if test "x$has_colon" = x; then
25887    # Not in mixed or Windows style, start by that.
25888    new_path=`cmd //c echo $path`
25889  fi
25890
25891
25892  input_path="$new_path"
25893  # Check if we need to convert this using DOS-style short mode. If the path
25894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25895  # take no chances and rewrite it.
25896  # Note: m4 eats our [], so we need to use [ and ] instead.
25897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25898  if test "x$has_forbidden_chars" != x; then
25899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25901  fi
25902
25903
25904  windows_path="$new_path"
25905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25906    unix_path=`$CYGPATH -u "$windows_path"`
25907    new_path="$unix_path"
25908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25910    new_path="$unix_path"
25911  fi
25912
25913  if test "x$path" != "x$new_path"; then
25914    BOOT_JDK="$new_path"
25915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25917  fi
25918
25919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25921
25922    else
25923      # We're on a unix platform. Hooray! :)
25924      path="$BOOT_JDK"
25925      has_space=`$ECHO "$path" | $GREP " "`
25926      if test "x$has_space" != x; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25930      fi
25931
25932      # Use eval to expand a potential ~
25933      eval path="$path"
25934      if test ! -f "$path" && test ! -d "$path"; then
25935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25936      fi
25937
25938      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25939    fi
25940  fi
25941
25942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25943$as_echo_n "checking for Boot JDK... " >&6; }
25944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25945$as_echo "$BOOT_JDK" >&6; }
25946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25947$as_echo_n "checking Boot JDK version... " >&6; }
25948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25950$as_echo "$BOOT_JDK_VERSION" >&6; }
25951          fi # end check jdk version
25952        fi # end check javac
25953      fi # end check java
25954    fi # end check boot jdk found
25955  fi
25956
25957
25958  # If we haven't found anything yet, we've truly lost. Give up.
25959  if test "x$BOOT_JDK_FOUND" = xno; then
25960
25961  # Print a helpful message on how to acquire the necessary build dependency.
25962  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25963  MISSING_DEPENDENCY=openjdk
25964
25965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25966    cygwin_help $MISSING_DEPENDENCY
25967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25968    msys_help $MISSING_DEPENDENCY
25969  else
25970    PKGHANDLER_COMMAND=
25971
25972    case $PKGHANDLER in
25973      apt-get)
25974        apt_help     $MISSING_DEPENDENCY ;;
25975      yum)
25976        yum_help     $MISSING_DEPENDENCY ;;
25977      port)
25978        port_help    $MISSING_DEPENDENCY ;;
25979      pkgutil)
25980        pkgutil_help $MISSING_DEPENDENCY ;;
25981      pkgadd)
25982        pkgadd_help  $MISSING_DEPENDENCY ;;
25983    esac
25984
25985    if test "x$PKGHANDLER_COMMAND" != x; then
25986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25987    fi
25988  fi
25989
25990    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25991$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25992    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25993$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25994    as_fn_error $? "Cannot continue" "$LINENO" 5
25995  fi
25996
25997
25998
25999  # Setup tools from the Boot JDK.
26000
26001  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26002
26003  # Publish this variable in the help.
26004
26005
26006  if test "x$JAVA" = x; then
26007    # The variable is not set by user, try to locate tool using the code snippet
26008
26009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26010$as_echo_n "checking for java in Boot JDK... " >&6; }
26011      JAVA=$BOOT_JDK/bin/java
26012      if test ! -x $JAVA; then
26013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26014$as_echo "not found" >&6; }
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26016$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26017        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26018      fi
26019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26020$as_echo "ok" >&6; }
26021
26022
26023  else
26024    # The variable is set, but is it from the command line or the environment?
26025
26026    # Try to remove the string !JAVA! from our list.
26027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26029      # If it failed, the variable was not from the command line. Ignore it,
26030      # but warn the user (except for BASH, which is always set by the calling BASH).
26031      if test "xJAVA" != xBASH; then
26032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26033$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26034      fi
26035      # Try to locate tool using the code snippet
26036
26037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26038$as_echo_n "checking for java in Boot JDK... " >&6; }
26039      JAVA=$BOOT_JDK/bin/java
26040      if test ! -x $JAVA; then
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26042$as_echo "not found" >&6; }
26043        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26044$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26045        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26046      fi
26047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26048$as_echo "ok" >&6; }
26049
26050
26051    else
26052      # If it succeeded, then it was overridden by the user. We will use it
26053      # for the tool.
26054
26055      # First remove it from the list of overridden variables, so we can test
26056      # for unknown variables in the end.
26057      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26058
26059      # Check if the provided tool contains a complete path.
26060      tool_specified="$JAVA"
26061      tool_basename="${tool_specified##*/}"
26062      if test "x$tool_basename" = "x$tool_specified"; then
26063        # A command without a complete path is provided, search $PATH.
26064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26065$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26066        # Extract the first word of "$tool_basename", so it can be a program name with args.
26067set dummy $tool_basename; ac_word=$2
26068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26069$as_echo_n "checking for $ac_word... " >&6; }
26070if ${ac_cv_path_JAVA+:} false; then :
26071  $as_echo_n "(cached) " >&6
26072else
26073  case $JAVA in
26074  [\\/]* | ?:[\\/]*)
26075  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26076  ;;
26077  *)
26078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26079for as_dir in $PATH
26080do
26081  IFS=$as_save_IFS
26082  test -z "$as_dir" && as_dir=.
26083    for ac_exec_ext in '' $ac_executable_extensions; do
26084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26085    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26087    break 2
26088  fi
26089done
26090  done
26091IFS=$as_save_IFS
26092
26093  ;;
26094esac
26095fi
26096JAVA=$ac_cv_path_JAVA
26097if test -n "$JAVA"; then
26098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26099$as_echo "$JAVA" >&6; }
26100else
26101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26102$as_echo "no" >&6; }
26103fi
26104
26105
26106        if test "x$JAVA" = x; then
26107          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26108        fi
26109      else
26110        # Otherwise we believe it is a complete path. Use it as it is.
26111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26112$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26114$as_echo_n "checking for JAVA... " >&6; }
26115        if test ! -x "$tool_specified"; then
26116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26117$as_echo "not found" >&6; }
26118          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26119        fi
26120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26121$as_echo "$tool_specified" >&6; }
26122      fi
26123    fi
26124  fi
26125
26126
26127
26128  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26129
26130  # Publish this variable in the help.
26131
26132
26133  if test "x$JAVAC" = x; then
26134    # The variable is not set by user, try to locate tool using the code snippet
26135
26136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26137$as_echo_n "checking for javac in Boot JDK... " >&6; }
26138      JAVAC=$BOOT_JDK/bin/javac
26139      if test ! -x $JAVAC; then
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26141$as_echo "not found" >&6; }
26142        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26143$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26144        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26145      fi
26146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26147$as_echo "ok" >&6; }
26148
26149
26150  else
26151    # The variable is set, but is it from the command line or the environment?
26152
26153    # Try to remove the string !JAVAC! from our list.
26154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26156      # If it failed, the variable was not from the command line. Ignore it,
26157      # but warn the user (except for BASH, which is always set by the calling BASH).
26158      if test "xJAVAC" != xBASH; then
26159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26160$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26161      fi
26162      # Try to locate tool using the code snippet
26163
26164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26165$as_echo_n "checking for javac in Boot JDK... " >&6; }
26166      JAVAC=$BOOT_JDK/bin/javac
26167      if test ! -x $JAVAC; then
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26169$as_echo "not found" >&6; }
26170        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26171$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26172        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26173      fi
26174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26175$as_echo "ok" >&6; }
26176
26177
26178    else
26179      # If it succeeded, then it was overridden by the user. We will use it
26180      # for the tool.
26181
26182      # First remove it from the list of overridden variables, so we can test
26183      # for unknown variables in the end.
26184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26185
26186      # Check if the provided tool contains a complete path.
26187      tool_specified="$JAVAC"
26188      tool_basename="${tool_specified##*/}"
26189      if test "x$tool_basename" = "x$tool_specified"; then
26190        # A command without a complete path is provided, search $PATH.
26191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26192$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26193        # Extract the first word of "$tool_basename", so it can be a program name with args.
26194set dummy $tool_basename; ac_word=$2
26195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26196$as_echo_n "checking for $ac_word... " >&6; }
26197if ${ac_cv_path_JAVAC+:} false; then :
26198  $as_echo_n "(cached) " >&6
26199else
26200  case $JAVAC in
26201  [\\/]* | ?:[\\/]*)
26202  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26203  ;;
26204  *)
26205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26206for as_dir in $PATH
26207do
26208  IFS=$as_save_IFS
26209  test -z "$as_dir" && as_dir=.
26210    for ac_exec_ext in '' $ac_executable_extensions; do
26211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26212    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26214    break 2
26215  fi
26216done
26217  done
26218IFS=$as_save_IFS
26219
26220  ;;
26221esac
26222fi
26223JAVAC=$ac_cv_path_JAVAC
26224if test -n "$JAVAC"; then
26225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26226$as_echo "$JAVAC" >&6; }
26227else
26228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26229$as_echo "no" >&6; }
26230fi
26231
26232
26233        if test "x$JAVAC" = x; then
26234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26235        fi
26236      else
26237        # Otherwise we believe it is a complete path. Use it as it is.
26238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26239$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26241$as_echo_n "checking for JAVAC... " >&6; }
26242        if test ! -x "$tool_specified"; then
26243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26244$as_echo "not found" >&6; }
26245          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26246        fi
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26248$as_echo "$tool_specified" >&6; }
26249      fi
26250    fi
26251  fi
26252
26253
26254
26255  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26256
26257  # Publish this variable in the help.
26258
26259
26260  if test "x$JAVAH" = x; then
26261    # The variable is not set by user, try to locate tool using the code snippet
26262
26263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26264$as_echo_n "checking for javah in Boot JDK... " >&6; }
26265      JAVAH=$BOOT_JDK/bin/javah
26266      if test ! -x $JAVAH; then
26267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26268$as_echo "not found" >&6; }
26269        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26270$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26271        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26272      fi
26273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26274$as_echo "ok" >&6; }
26275
26276
26277  else
26278    # The variable is set, but is it from the command line or the environment?
26279
26280    # Try to remove the string !JAVAH! from our list.
26281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26283      # If it failed, the variable was not from the command line. Ignore it,
26284      # but warn the user (except for BASH, which is always set by the calling BASH).
26285      if test "xJAVAH" != xBASH; then
26286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26287$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26288      fi
26289      # Try to locate tool using the code snippet
26290
26291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26292$as_echo_n "checking for javah in Boot JDK... " >&6; }
26293      JAVAH=$BOOT_JDK/bin/javah
26294      if test ! -x $JAVAH; then
26295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26296$as_echo "not found" >&6; }
26297        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26298$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26299        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26300      fi
26301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26302$as_echo "ok" >&6; }
26303
26304
26305    else
26306      # If it succeeded, then it was overridden by the user. We will use it
26307      # for the tool.
26308
26309      # First remove it from the list of overridden variables, so we can test
26310      # for unknown variables in the end.
26311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26312
26313      # Check if the provided tool contains a complete path.
26314      tool_specified="$JAVAH"
26315      tool_basename="${tool_specified##*/}"
26316      if test "x$tool_basename" = "x$tool_specified"; then
26317        # A command without a complete path is provided, search $PATH.
26318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26319$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26320        # Extract the first word of "$tool_basename", so it can be a program name with args.
26321set dummy $tool_basename; ac_word=$2
26322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26323$as_echo_n "checking for $ac_word... " >&6; }
26324if ${ac_cv_path_JAVAH+:} false; then :
26325  $as_echo_n "(cached) " >&6
26326else
26327  case $JAVAH in
26328  [\\/]* | ?:[\\/]*)
26329  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26330  ;;
26331  *)
26332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26333for as_dir in $PATH
26334do
26335  IFS=$as_save_IFS
26336  test -z "$as_dir" && as_dir=.
26337    for ac_exec_ext in '' $ac_executable_extensions; do
26338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26339    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26341    break 2
26342  fi
26343done
26344  done
26345IFS=$as_save_IFS
26346
26347  ;;
26348esac
26349fi
26350JAVAH=$ac_cv_path_JAVAH
26351if test -n "$JAVAH"; then
26352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26353$as_echo "$JAVAH" >&6; }
26354else
26355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26356$as_echo "no" >&6; }
26357fi
26358
26359
26360        if test "x$JAVAH" = x; then
26361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26362        fi
26363      else
26364        # Otherwise we believe it is a complete path. Use it as it is.
26365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26366$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26368$as_echo_n "checking for JAVAH... " >&6; }
26369        if test ! -x "$tool_specified"; then
26370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26371$as_echo "not found" >&6; }
26372          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26373        fi
26374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26375$as_echo "$tool_specified" >&6; }
26376      fi
26377    fi
26378  fi
26379
26380
26381
26382  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26383
26384  # Publish this variable in the help.
26385
26386
26387  if test "x$JAR" = x; then
26388    # The variable is not set by user, try to locate tool using the code snippet
26389
26390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26391$as_echo_n "checking for jar in Boot JDK... " >&6; }
26392      JAR=$BOOT_JDK/bin/jar
26393      if test ! -x $JAR; then
26394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26395$as_echo "not found" >&6; }
26396        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26397$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26398        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26399      fi
26400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26401$as_echo "ok" >&6; }
26402
26403
26404  else
26405    # The variable is set, but is it from the command line or the environment?
26406
26407    # Try to remove the string !JAR! from our list.
26408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26410      # If it failed, the variable was not from the command line. Ignore it,
26411      # but warn the user (except for BASH, which is always set by the calling BASH).
26412      if test "xJAR" != xBASH; then
26413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26414$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26415      fi
26416      # Try to locate tool using the code snippet
26417
26418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26419$as_echo_n "checking for jar in Boot JDK... " >&6; }
26420      JAR=$BOOT_JDK/bin/jar
26421      if test ! -x $JAR; then
26422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26423$as_echo "not found" >&6; }
26424        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26425$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26426        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26427      fi
26428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26429$as_echo "ok" >&6; }
26430
26431
26432    else
26433      # If it succeeded, then it was overridden by the user. We will use it
26434      # for the tool.
26435
26436      # First remove it from the list of overridden variables, so we can test
26437      # for unknown variables in the end.
26438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26439
26440      # Check if the provided tool contains a complete path.
26441      tool_specified="$JAR"
26442      tool_basename="${tool_specified##*/}"
26443      if test "x$tool_basename" = "x$tool_specified"; then
26444        # A command without a complete path is provided, search $PATH.
26445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26446$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26447        # Extract the first word of "$tool_basename", so it can be a program name with args.
26448set dummy $tool_basename; ac_word=$2
26449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26450$as_echo_n "checking for $ac_word... " >&6; }
26451if ${ac_cv_path_JAR+:} false; then :
26452  $as_echo_n "(cached) " >&6
26453else
26454  case $JAR in
26455  [\\/]* | ?:[\\/]*)
26456  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26457  ;;
26458  *)
26459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26460for as_dir in $PATH
26461do
26462  IFS=$as_save_IFS
26463  test -z "$as_dir" && as_dir=.
26464    for ac_exec_ext in '' $ac_executable_extensions; do
26465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26466    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26468    break 2
26469  fi
26470done
26471  done
26472IFS=$as_save_IFS
26473
26474  ;;
26475esac
26476fi
26477JAR=$ac_cv_path_JAR
26478if test -n "$JAR"; then
26479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26480$as_echo "$JAR" >&6; }
26481else
26482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26483$as_echo "no" >&6; }
26484fi
26485
26486
26487        if test "x$JAR" = x; then
26488          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26489        fi
26490      else
26491        # Otherwise we believe it is a complete path. Use it as it is.
26492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26493$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26495$as_echo_n "checking for JAR... " >&6; }
26496        if test ! -x "$tool_specified"; then
26497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26498$as_echo "not found" >&6; }
26499          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26500        fi
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26502$as_echo "$tool_specified" >&6; }
26503      fi
26504    fi
26505  fi
26506
26507
26508
26509  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26510
26511  # Publish this variable in the help.
26512
26513
26514  if test "x$JARSIGNER" = x; then
26515    # The variable is not set by user, try to locate tool using the code snippet
26516
26517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26518$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26519      JARSIGNER=$BOOT_JDK/bin/jarsigner
26520      if test ! -x $JARSIGNER; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26522$as_echo "not found" >&6; }
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26524$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26525        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26526      fi
26527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26528$as_echo "ok" >&6; }
26529
26530
26531  else
26532    # The variable is set, but is it from the command line or the environment?
26533
26534    # Try to remove the string !JARSIGNER! from our list.
26535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26537      # If it failed, the variable was not from the command line. Ignore it,
26538      # but warn the user (except for BASH, which is always set by the calling BASH).
26539      if test "xJARSIGNER" != xBASH; then
26540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26541$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26542      fi
26543      # Try to locate tool using the code snippet
26544
26545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26546$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26547      JARSIGNER=$BOOT_JDK/bin/jarsigner
26548      if test ! -x $JARSIGNER; then
26549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26550$as_echo "not found" >&6; }
26551        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26552$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26553        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26554      fi
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26556$as_echo "ok" >&6; }
26557
26558
26559    else
26560      # If it succeeded, then it was overridden by the user. We will use it
26561      # for the tool.
26562
26563      # First remove it from the list of overridden variables, so we can test
26564      # for unknown variables in the end.
26565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26566
26567      # Check if the provided tool contains a complete path.
26568      tool_specified="$JARSIGNER"
26569      tool_basename="${tool_specified##*/}"
26570      if test "x$tool_basename" = "x$tool_specified"; then
26571        # A command without a complete path is provided, search $PATH.
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26573$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26574        # Extract the first word of "$tool_basename", so it can be a program name with args.
26575set dummy $tool_basename; ac_word=$2
26576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26577$as_echo_n "checking for $ac_word... " >&6; }
26578if ${ac_cv_path_JARSIGNER+:} false; then :
26579  $as_echo_n "(cached) " >&6
26580else
26581  case $JARSIGNER in
26582  [\\/]* | ?:[\\/]*)
26583  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26584  ;;
26585  *)
26586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26587for as_dir in $PATH
26588do
26589  IFS=$as_save_IFS
26590  test -z "$as_dir" && as_dir=.
26591    for ac_exec_ext in '' $ac_executable_extensions; do
26592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26593    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26595    break 2
26596  fi
26597done
26598  done
26599IFS=$as_save_IFS
26600
26601  ;;
26602esac
26603fi
26604JARSIGNER=$ac_cv_path_JARSIGNER
26605if test -n "$JARSIGNER"; then
26606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26607$as_echo "$JARSIGNER" >&6; }
26608else
26609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26610$as_echo "no" >&6; }
26611fi
26612
26613
26614        if test "x$JARSIGNER" = x; then
26615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26616        fi
26617      else
26618        # Otherwise we believe it is a complete path. Use it as it is.
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26620$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26622$as_echo_n "checking for JARSIGNER... " >&6; }
26623        if test ! -x "$tool_specified"; then
26624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26625$as_echo "not found" >&6; }
26626          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26627        fi
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26629$as_echo "$tool_specified" >&6; }
26630      fi
26631    fi
26632  fi
26633
26634
26635
26636  # Finally, set some other options...
26637
26638  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26639  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26640
26641
26642
26643
26644###############################################################################
26645#
26646# Configure the sources to use. We can add or override individual directories.
26647#
26648###############################################################################
26649
26650
26651  # Where are the sources. Any of these can be overridden
26652  # using --with-override-corba and the likes.
26653  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26654  CORBA_TOPDIR="$SRC_ROOT/corba"
26655  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26656  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26657  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26658  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26659  JDK_TOPDIR="$SRC_ROOT/jdk"
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670  ###############################################################################
26671  #
26672  # Pickup additional source for a component from outside of the source root
26673  # or override source for a component.
26674  #
26675
26676# Check whether --with-add-source-root was given.
26677if test "${with_add_source_root+set}" = set; then :
26678  withval=$with_add_source_root;
26679fi
26680
26681
26682
26683# Check whether --with-override-source-root was given.
26684if test "${with_override_source_root+set}" = set; then :
26685  withval=$with_override_source_root;
26686fi
26687
26688
26689
26690# Check whether --with-adds-and-overrides was given.
26691if test "${with_adds_and_overrides+set}" = set; then :
26692  withval=$with_adds_and_overrides;
26693fi
26694
26695
26696  if test "x$with_adds_and_overrides" != x; then
26697    with_add_source_root="$with_adds_and_overrides/adds"
26698    with_override_source_root="$with_adds_and_overrides/overrides"
26699  fi
26700
26701  if test "x$with_add_source_root" != x; then
26702    if ! test -d $with_add_source_root; then
26703      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26704    fi
26705    CURDIR="$PWD"
26706    cd "$with_add_source_root"
26707    ADD_SRC_ROOT="`pwd`"
26708    cd "$CURDIR"
26709    # Verify that the addon source root does not have any root makefiles.
26710    # If it does, then it is usually an error, prevent this.
26711    if test -f $with_add_source_root/langtools/make/Makefile; then
26712      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
26713    fi
26714    if test -f $with_add_source_root/corba/make/Makefile; then
26715      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
26716    fi
26717    if test -f $with_add_source_root/jaxp/make/Makefile; then
26718      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
26719    fi
26720    if test -f $with_add_source_root/jaxws/make/Makefile; then
26721      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
26722    fi
26723    if test -f $with_add_source_root/hotspot/make/Makefile; then
26724      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
26725    fi
26726    if test -f $with_add_source_root/nashorn/make/Makefile; then
26727      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
26728    fi
26729    if test -f $with_add_source_root/jdk/make/Makefile; then
26730      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
26731    fi
26732  fi
26733
26734
26735  if test "x$with_override_source_root" != x; then
26736    if ! test -d $with_override_source_root; then
26737      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26738    fi
26739    CURDIR="$PWD"
26740    cd "$with_override_source_root"
26741    OVERRIDE_SRC_ROOT="`pwd`"
26742    cd "$CURDIR"
26743    if test -f $with_override_source_root/langtools/make/Makefile; then
26744      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
26745    fi
26746    if test -f $with_override_source_root/corba/make/Makefile; then
26747      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
26748    fi
26749    if test -f $with_override_source_root/jaxp/make/Makefile; then
26750      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
26751    fi
26752    if test -f $with_override_source_root/jaxws/make/Makefile; then
26753      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
26754    fi
26755    if test -f $with_override_source_root/hotspot/make/Makefile; then
26756      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
26757    fi
26758    if test -f $with_override_source_root/nashorn/make/Makefile; then
26759      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
26760    fi
26761    if test -f $with_override_source_root/jdk/make/Makefile; then
26762      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
26763    fi
26764  fi
26765
26766
26767  ###############################################################################
26768  #
26769  # Override a repo completely, this is used for example when you have 3 small
26770  # development sandboxes of the langtools sources and want to avoid having 3 full
26771  # OpenJDK sources checked out on disk.
26772  #
26773  # Assuming that the 3 langtools sandboxes are located here:
26774  # /home/fredrik/sandbox1/langtools
26775  # /home/fredrik/sandbox2/langtools
26776  # /home/fredrik/sandbox3/langtools
26777  #
26778  # From the source root you create build subdirs manually:
26779  #     mkdir -p build1 build2 build3
26780  # in each build directory run:
26781  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26782  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26783  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26784  #
26785
26786
26787# Check whether --with-override-langtools was given.
26788if test "${with_override_langtools+set}" = set; then :
26789  withval=$with_override_langtools;
26790fi
26791
26792
26793
26794# Check whether --with-override-corba was given.
26795if test "${with_override_corba+set}" = set; then :
26796  withval=$with_override_corba;
26797fi
26798
26799
26800
26801# Check whether --with-override-jaxp was given.
26802if test "${with_override_jaxp+set}" = set; then :
26803  withval=$with_override_jaxp;
26804fi
26805
26806
26807
26808# Check whether --with-override-jaxws was given.
26809if test "${with_override_jaxws+set}" = set; then :
26810  withval=$with_override_jaxws;
26811fi
26812
26813
26814
26815# Check whether --with-override-hotspot was given.
26816if test "${with_override_hotspot+set}" = set; then :
26817  withval=$with_override_hotspot;
26818fi
26819
26820
26821
26822# Check whether --with-override-nashorn was given.
26823if test "${with_override_nashorn+set}" = set; then :
26824  withval=$with_override_nashorn;
26825fi
26826
26827
26828
26829# Check whether --with-override-jdk was given.
26830if test "${with_override_jdk+set}" = set; then :
26831  withval=$with_override_jdk;
26832fi
26833
26834
26835  if test "x$with_override_langtools" != x; then
26836    CURDIR="$PWD"
26837    cd "$with_override_langtools"
26838    LANGTOOLS_TOPDIR="`pwd`"
26839    cd "$CURDIR"
26840    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26841      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26842    fi
26843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26844$as_echo_n "checking if langtools should be overridden... " >&6; }
26845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26846$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26847  fi
26848  if test "x$with_override_corba" != x; then
26849    CURDIR="$PWD"
26850    cd "$with_override_corba"
26851    CORBA_TOPDIR="`pwd`"
26852    cd "$CURDIR"
26853    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26854      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26855    fi
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26857$as_echo_n "checking if corba should be overridden... " >&6; }
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26859$as_echo "yes with $CORBA_TOPDIR" >&6; }
26860  fi
26861  if test "x$with_override_jaxp" != x; then
26862    CURDIR="$PWD"
26863    cd "$with_override_jaxp"
26864    JAXP_TOPDIR="`pwd`"
26865    cd "$CURDIR"
26866    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26867      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26868    fi
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26870$as_echo_n "checking if jaxp should be overridden... " >&6; }
26871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26872$as_echo "yes with $JAXP_TOPDIR" >&6; }
26873  fi
26874  if test "x$with_override_jaxws" != x; then
26875    CURDIR="$PWD"
26876    cd "$with_override_jaxws"
26877    JAXWS_TOPDIR="`pwd`"
26878    cd "$CURDIR"
26879    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26880      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26881    fi
26882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26883$as_echo_n "checking if jaxws should be overridden... " >&6; }
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26885$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26886  fi
26887  if test "x$with_override_hotspot" != x; then
26888    CURDIR="$PWD"
26889    cd "$with_override_hotspot"
26890    HOTSPOT_TOPDIR="`pwd`"
26891    cd "$CURDIR"
26892    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26893      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26894    fi
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26896$as_echo_n "checking if hotspot should be overridden... " >&6; }
26897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26898$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26899  fi
26900  if test "x$with_override_nashorn" != x; then
26901    CURDIR="$PWD"
26902    cd "$with_override_nashorn"
26903    NASHORN_TOPDIR="`pwd`"
26904    cd "$CURDIR"
26905    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26906      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26907    fi
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26909$as_echo_n "checking if nashorn should be overridden... " >&6; }
26910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26911$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26912  fi
26913  if test "x$with_override_jdk" != x; then
26914    CURDIR="$PWD"
26915    cd "$with_override_jdk"
26916    JDK_TOPDIR="`pwd`"
26917    cd "$CURDIR"
26918    if ! test -f $JDK_TOPDIR/make/Makefile; then
26919      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26920    fi
26921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26922$as_echo_n "checking if JDK should be overridden... " >&6; }
26923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26924$as_echo "yes with $JDK_TOPDIR" >&6; }
26925  fi
26926
26927
26928  BUILD_OUTPUT="$OUTPUT_ROOT"
26929
26930
26931  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26932  BUILD_HOTSPOT=true
26933
26934
26935
26936# Check whether --with-import-hotspot was given.
26937if test "${with_import_hotspot+set}" = set; then :
26938  withval=$with_import_hotspot;
26939fi
26940
26941  if test "x$with_import_hotspot" != x; then
26942    CURDIR="$PWD"
26943    cd "$with_import_hotspot"
26944    HOTSPOT_DIST="`pwd`"
26945    cd "$CURDIR"
26946    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26947      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26948    fi
26949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26950$as_echo_n "checking if hotspot should be imported... " >&6; }
26951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26952$as_echo "yes from $HOTSPOT_DIST" >&6; }
26953    BUILD_HOTSPOT=false
26954  fi
26955
26956  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26957
26958
26959###############################################################################
26960#
26961# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26962# native code.
26963#
26964###############################################################################
26965
26966# First determine the toolchain type (compiler family)
26967
26968
26969# Check whether --with-toolchain-type was given.
26970if test "${with_toolchain_type+set}" = set; then :
26971  withval=$with_toolchain_type;
26972fi
26973
26974
26975  # Use indirect variable referencing
26976  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26977  VALID_TOOLCHAINS=${!toolchain_var_name}
26978
26979  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26980    if test -n "$XCODEBUILD"; then
26981      # On Mac OS X, default toolchain to clang after Xcode 5
26982      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26983      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26984      if test $? -ne 0; then
26985        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26986      fi
26987      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26988          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26989          $CUT -f 1 -d .`
26990      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26991$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26992      if test $XCODE_MAJOR_VERSION -ge 5; then
26993          DEFAULT_TOOLCHAIN="clang"
26994      else
26995          DEFAULT_TOOLCHAIN="gcc"
26996      fi
26997    else
26998      # If Xcode is not installed, but the command line tools are
26999      # then we can't run xcodebuild. On these systems we should
27000      # default to clang
27001      DEFAULT_TOOLCHAIN="clang"
27002    fi
27003  else
27004    # First toolchain type in the list is the default
27005    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27006  fi
27007
27008  if test "x$with_toolchain_type" = xlist; then
27009    # List all toolchains
27010    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27011$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27012    for toolchain in $VALID_TOOLCHAINS; do
27013      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27014      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27015      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27016    done
27017
27018    exit 0
27019  elif test "x$with_toolchain_type" != x; then
27020    # User override; check that it is valid
27021    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27022      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27023$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27024      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27025$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27026      as_fn_error $? "Cannot continue." "$LINENO" 5
27027    fi
27028    TOOLCHAIN_TYPE=$with_toolchain_type
27029  else
27030    # No flag given, use default
27031    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27032  fi
27033
27034
27035  TOOLCHAIN_CC_BINARY_clang="clang"
27036  TOOLCHAIN_CC_BINARY_gcc="gcc"
27037  TOOLCHAIN_CC_BINARY_microsoft="cl"
27038  TOOLCHAIN_CC_BINARY_solstudio="cc"
27039  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27040
27041  TOOLCHAIN_CXX_BINARY_clang="clang++"
27042  TOOLCHAIN_CXX_BINARY_gcc="g++"
27043  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27044  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27045  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27046
27047  # Use indirect variable referencing
27048  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27049  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27050  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27051  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27052  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27053  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27054
27055
27056  # Define filename patterns
27057  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27058    LIBRARY_PREFIX=
27059    SHARED_LIBRARY_SUFFIX='.dll'
27060    STATIC_LIBRARY_SUFFIX='.lib'
27061    SHARED_LIBRARY='$1.dll'
27062    STATIC_LIBRARY='$1.lib'
27063    OBJ_SUFFIX='.obj'
27064    EXE_SUFFIX='.exe'
27065  else
27066    LIBRARY_PREFIX=lib
27067    SHARED_LIBRARY_SUFFIX='.so'
27068    STATIC_LIBRARY_SUFFIX='.a'
27069    SHARED_LIBRARY='lib$1.so'
27070    STATIC_LIBRARY='lib$1.a'
27071    OBJ_SUFFIX='.o'
27072    EXE_SUFFIX=''
27073    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27074      SHARED_LIBRARY='lib$1.dylib'
27075      SHARED_LIBRARY_SUFFIX='.dylib'
27076    fi
27077  fi
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27089    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27090$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27091  else
27092    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27093$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27094  fi
27095
27096
27097# Then detect the actual binaries needed
27098
27099  # FIXME: Is this needed?
27100  ac_ext=cpp
27101ac_cpp='$CXXCPP $CPPFLAGS'
27102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27105
27106
27107  # Store the CFLAGS etc passed to the configure script.
27108  ORG_CFLAGS="$CFLAGS"
27109  ORG_CXXFLAGS="$CXXFLAGS"
27110
27111  # autoconf magic only relies on PATH, so update it if tools dir is specified
27112  OLD_PATH="$PATH"
27113
27114  # On Windows, we need to detect the visual studio installation first.
27115  # This will change the PATH, but we need to keep that new PATH even
27116  # after toolchain detection is done, since the compiler (on x86) uses
27117  # it for DLL resolution in runtime.
27118  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27119      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27120
27121  # Store path to cygwin link.exe to help excluding it when searching for
27122  # VS linker. This must be done before changing the PATH when looking for VS.
27123  # Extract the first word of "link", so it can be a program name with args.
27124set dummy link; ac_word=$2
27125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27126$as_echo_n "checking for $ac_word... " >&6; }
27127if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27128  $as_echo_n "(cached) " >&6
27129else
27130  case $CYGWIN_LINK in
27131  [\\/]* | ?:[\\/]*)
27132  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27133  ;;
27134  *)
27135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27136for as_dir in $PATH
27137do
27138  IFS=$as_save_IFS
27139  test -z "$as_dir" && as_dir=.
27140    for ac_exec_ext in '' $ac_executable_extensions; do
27141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27142    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27144    break 2
27145  fi
27146done
27147  done
27148IFS=$as_save_IFS
27149
27150  ;;
27151esac
27152fi
27153CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27154if test -n "$CYGWIN_LINK"; then
27155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27156$as_echo "$CYGWIN_LINK" >&6; }
27157else
27158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27159$as_echo "no" >&6; }
27160fi
27161
27162
27163  if test "x$CYGWIN_LINK" != x; then
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27165$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27166    "$CYGWIN_LINK" --version > /dev/null
27167    if test $? -eq 0 ; then
27168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27169$as_echo "yes" >&6; }
27170    else
27171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27172$as_echo "no" >&6; }
27173      # This might be the VS linker. Don't exclude it later on.
27174      CYGWIN_LINK=""
27175    fi
27176  fi
27177
27178  # First-hand choice is to locate and run the vsvars bat file.
27179
27180
27181# Check whether --with-toolchain-version was given.
27182if test "${with_toolchain_version+set}" = set; then :
27183  withval=$with_toolchain_version;
27184fi
27185
27186
27187  if test "x$with_toolchain_version" = xlist; then
27188    # List all toolchains
27189    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27190$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27191    for version in $VALID_VS_VERSIONS; do
27192      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27193      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27194    done
27195
27196    exit 0
27197  elif test "x$DEVKIT_VS_VERSION" != x; then
27198    VS_VERSION=$DEVKIT_VS_VERSION
27199    TOOLCHAIN_VERSION=$VS_VERSION
27200    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27201    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27202    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27203    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27204    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27205    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27206
27207    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27208    # can still be exported as INCLUDE for compiler invocations without
27209    # SYSROOT_CFLAGS
27210    OLDIFS="$IFS"
27211    IFS=";"
27212    for i in $DEVKIT_VS_INCLUDE; do
27213      ipath=$i
27214
27215  unix_path="$ipath"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    windows_path=`$CYGPATH -m "$unix_path"`
27218    ipath="$windows_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    windows_path=`cmd //c echo $unix_path`
27221    ipath="$windows_path"
27222  fi
27223
27224      VS_INCLUDE="$VS_INCLUDE;$ipath"
27225    done
27226    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27227    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27228    for i in $DEVKIT_VS_LIB; do
27229      libpath=$i
27230
27231  unix_path="$libpath"
27232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27233    windows_path=`$CYGPATH -m "$unix_path"`
27234    libpath="$windows_path"
27235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27236    windows_path=`cmd //c echo $unix_path`
27237    libpath="$windows_path"
27238  fi
27239
27240      VS_LIB="$VS_LIB;$libpath"
27241    done
27242    IFS="$OLDIFS"
27243
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27245$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27246
27247  elif test "x$with_toolchain_version" != x; then
27248    # User override; check that it is valid
27249    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27250      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27251$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27252      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27253$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27254      as_fn_error $? "Cannot continue." "$LINENO" 5
27255    fi
27256    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27257  else
27258    # No flag given, use default
27259    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27260  fi
27261
27262  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27263
27264  VS_VERSION="$VS_VERSION"
27265  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27266  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27267  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27268  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27269
27270  # When using --with-tools-dir, assume it points to the correct and default
27271  # version of Visual Studio or that --with-toolchain-version was also set.
27272  if test "x$with_tools_dir" != x; then
27273
27274  if test "x$VS_ENV_CMD" = x; then
27275    VS_VERSION="${VS_VERSION}"
27276    VS_BASE="$with_tools_dir/../.."
27277    METHOD="--with-tools-dir"
27278
27279    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27280      VCVARSFILE="vc/bin/vcvars32.bat"
27281    else
27282      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27283    fi
27284
27285
27286  windows_path="$VS_BASE"
27287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27288    unix_path=`$CYGPATH -u "$windows_path"`
27289    VS_BASE="$unix_path"
27290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27292    VS_BASE="$unix_path"
27293  fi
27294
27295    if test -d "$VS_BASE"; then
27296      if test -f "$VS_BASE/$VCVARSFILE"; then
27297        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27298$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27299        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27300        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27301        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27302        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27303      else
27304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27305$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27307$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27308      fi
27309    fi
27310  fi
27311
27312
27313  if test "x$VS_ENV_CMD" = x; then
27314    VS_VERSION="${VS_VERSION}"
27315    VS_BASE="$with_tools_dir/../../.."
27316    METHOD="--with-tools-dir"
27317
27318    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27319      VCVARSFILE="vc/bin/vcvars32.bat"
27320    else
27321      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27322    fi
27323
27324
27325  windows_path="$VS_BASE"
27326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27327    unix_path=`$CYGPATH -u "$windows_path"`
27328    VS_BASE="$unix_path"
27329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27331    VS_BASE="$unix_path"
27332  fi
27333
27334    if test -d "$VS_BASE"; then
27335      if test -f "$VS_BASE/$VCVARSFILE"; then
27336        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27337$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27338        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27339        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27340        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27341        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27342      else
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27344$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27345        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27346$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27347      fi
27348    fi
27349  fi
27350
27351    if test "x$VS_ENV_CMD" = x; then
27352      # Having specified an argument which is incorrect will produce an instant failure;
27353      # we should not go on looking
27354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27355$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27356      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27357$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27358      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27359$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27360      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27361    fi
27362  fi
27363
27364  VS_ENV_CMD=""
27365  VS_ENV_ARGS=""
27366
27367  if test "x$VS_COMNTOOLS" != x; then
27368
27369  if test "x$VS_ENV_CMD" = x; then
27370    VS_VERSION="${VS_VERSION}"
27371    VS_BASE="$VS_COMNTOOLS/../.."
27372    METHOD="$VS_COMNTOOLS_VAR variable"
27373
27374    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27375      VCVARSFILE="vc/bin/vcvars32.bat"
27376    else
27377      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27378    fi
27379
27380
27381  windows_path="$VS_BASE"
27382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27383    unix_path=`$CYGPATH -u "$windows_path"`
27384    VS_BASE="$unix_path"
27385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27387    VS_BASE="$unix_path"
27388  fi
27389
27390    if test -d "$VS_BASE"; then
27391      if test -f "$VS_BASE/$VCVARSFILE"; then
27392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27393$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27394        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27395        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27396        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27397        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27398      else
27399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27400$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27401        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27402$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27403      fi
27404    fi
27405  fi
27406
27407  fi
27408  if test "x$PROGRAMFILES" != x; then
27409
27410  if test "x$VS_ENV_CMD" = x; then
27411    VS_VERSION="${VS_VERSION}"
27412    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27413    METHOD="well-known name"
27414
27415    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27416      VCVARSFILE="vc/bin/vcvars32.bat"
27417    else
27418      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27419    fi
27420
27421
27422  windows_path="$VS_BASE"
27423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27424    unix_path=`$CYGPATH -u "$windows_path"`
27425    VS_BASE="$unix_path"
27426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27428    VS_BASE="$unix_path"
27429  fi
27430
27431    if test -d "$VS_BASE"; then
27432      if test -f "$VS_BASE/$VCVARSFILE"; then
27433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27434$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27435        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27436        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27437        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27438        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27439      else
27440        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27441$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27442        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27443$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27444      fi
27445    fi
27446  fi
27447
27448  fi
27449  # Work around the insanely named ProgramFiles(x86) env variable
27450  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27451  if test "x$PROGRAMFILES_X86" != x; then
27452
27453  if test "x$VS_ENV_CMD" = x; then
27454    VS_VERSION="${VS_VERSION}"
27455    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27456    METHOD="well-known name"
27457
27458    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27459      VCVARSFILE="vc/bin/vcvars32.bat"
27460    else
27461      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27462    fi
27463
27464
27465  windows_path="$VS_BASE"
27466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27467    unix_path=`$CYGPATH -u "$windows_path"`
27468    VS_BASE="$unix_path"
27469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27471    VS_BASE="$unix_path"
27472  fi
27473
27474    if test -d "$VS_BASE"; then
27475      if test -f "$VS_BASE/$VCVARSFILE"; then
27476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27477$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27478        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27479        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27480        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27481        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27482      else
27483        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27484$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27485        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27486$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27487      fi
27488    fi
27489  fi
27490
27491  fi
27492
27493  if test "x$VS_ENV_CMD" = x; then
27494    VS_VERSION="${VS_VERSION}"
27495    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27496    METHOD="well-known name"
27497
27498    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27499      VCVARSFILE="vc/bin/vcvars32.bat"
27500    else
27501      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27502    fi
27503
27504
27505  windows_path="$VS_BASE"
27506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27507    unix_path=`$CYGPATH -u "$windows_path"`
27508    VS_BASE="$unix_path"
27509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27511    VS_BASE="$unix_path"
27512  fi
27513
27514    if test -d "$VS_BASE"; then
27515      if test -f "$VS_BASE/$VCVARSFILE"; then
27516        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27517$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27518        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27519        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27520        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27521        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27522      else
27523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27524$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27525        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27526$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27527      fi
27528    fi
27529  fi
27530
27531
27532  if test "x$VS_ENV_CMD" = x; then
27533    VS_VERSION="${VS_VERSION}"
27534    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27535    METHOD="well-known name"
27536
27537    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27538      VCVARSFILE="vc/bin/vcvars32.bat"
27539    else
27540      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27541    fi
27542
27543
27544  windows_path="$VS_BASE"
27545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546    unix_path=`$CYGPATH -u "$windows_path"`
27547    VS_BASE="$unix_path"
27548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27550    VS_BASE="$unix_path"
27551  fi
27552
27553    if test -d "$VS_BASE"; then
27554      if test -f "$VS_BASE/$VCVARSFILE"; then
27555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27556$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27557        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27558        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27559        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27560        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27561      else
27562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27563$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27565$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27566      fi
27567    fi
27568  fi
27569
27570
27571  if test "x$SDK_INSTALL_DIR" != x; then
27572    if test "x$ProgramW6432" != x; then
27573
27574  if test "x$VS_ENV_CMD" = x; then
27575    VS_VERSION="${VS_VERSION}"
27576    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27577    METHOD="well-known name"
27578
27579  windows_path="$WIN_SDK_BASE"
27580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27581    unix_path=`$CYGPATH -u "$windows_path"`
27582    WIN_SDK_BASE="$unix_path"
27583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27585    WIN_SDK_BASE="$unix_path"
27586  fi
27587
27588    if test -d "$WIN_SDK_BASE"; then
27589      # There have been cases of partial or broken SDK installations. A missing
27590      # lib dir is not going to work.
27591      if test ! -d "$WIN_SDK_BASE/lib"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27593$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27595$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27596      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27599        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27600        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27601          VS_ENV_ARGS="/x86"
27602        else
27603          VS_ENV_ARGS="/x64"
27604        fi
27605        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27606        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27607        # TODO: improve detection for other versions of SDK
27608        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27609      else
27610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27613$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27614      fi
27615    fi
27616  fi
27617
27618    fi
27619    if test "x$PROGRAMW6432" != x; then
27620
27621  if test "x$VS_ENV_CMD" = x; then
27622    VS_VERSION="${VS_VERSION}"
27623    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27624    METHOD="well-known name"
27625
27626  windows_path="$WIN_SDK_BASE"
27627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628    unix_path=`$CYGPATH -u "$windows_path"`
27629    WIN_SDK_BASE="$unix_path"
27630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27632    WIN_SDK_BASE="$unix_path"
27633  fi
27634
27635    if test -d "$WIN_SDK_BASE"; then
27636      # There have been cases of partial or broken SDK installations. A missing
27637      # lib dir is not going to work.
27638      if test ! -d "$WIN_SDK_BASE/lib"; then
27639        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27640$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27642$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27643      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27646        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27647        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27648          VS_ENV_ARGS="/x86"
27649        else
27650          VS_ENV_ARGS="/x64"
27651        fi
27652        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27653        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27654        # TODO: improve detection for other versions of SDK
27655        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27656      else
27657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27660$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27661      fi
27662    fi
27663  fi
27664
27665    fi
27666    if test "x$PROGRAMFILES" != x; then
27667
27668  if test "x$VS_ENV_CMD" = x; then
27669    VS_VERSION="${VS_VERSION}"
27670    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27671    METHOD="well-known name"
27672
27673  windows_path="$WIN_SDK_BASE"
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675    unix_path=`$CYGPATH -u "$windows_path"`
27676    WIN_SDK_BASE="$unix_path"
27677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27679    WIN_SDK_BASE="$unix_path"
27680  fi
27681
27682    if test -d "$WIN_SDK_BASE"; then
27683      # There have been cases of partial or broken SDK installations. A missing
27684      # lib dir is not going to work.
27685      if test ! -d "$WIN_SDK_BASE/lib"; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27687$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27688        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27689$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27690      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27692$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27693        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27694        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27695          VS_ENV_ARGS="/x86"
27696        else
27697          VS_ENV_ARGS="/x64"
27698        fi
27699        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27700        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27701        # TODO: improve detection for other versions of SDK
27702        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27703      else
27704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27705$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27707$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27708      fi
27709    fi
27710  fi
27711
27712    fi
27713
27714  if test "x$VS_ENV_CMD" = x; then
27715    VS_VERSION="${VS_VERSION}"
27716    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27717    METHOD="well-known name"
27718
27719  windows_path="$WIN_SDK_BASE"
27720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27721    unix_path=`$CYGPATH -u "$windows_path"`
27722    WIN_SDK_BASE="$unix_path"
27723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27725    WIN_SDK_BASE="$unix_path"
27726  fi
27727
27728    if test -d "$WIN_SDK_BASE"; then
27729      # There have been cases of partial or broken SDK installations. A missing
27730      # lib dir is not going to work.
27731      if test ! -d "$WIN_SDK_BASE/lib"; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27733$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27734        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27735$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27736      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27738$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27739        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27740        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27741          VS_ENV_ARGS="/x86"
27742        else
27743          VS_ENV_ARGS="/x64"
27744        fi
27745        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27746        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27747        # TODO: improve detection for other versions of SDK
27748        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27749      else
27750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27752        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27753$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27754      fi
27755    fi
27756  fi
27757
27758
27759  if test "x$VS_ENV_CMD" = x; then
27760    VS_VERSION="${VS_VERSION}"
27761    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27762    METHOD="well-known name"
27763
27764  windows_path="$WIN_SDK_BASE"
27765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27766    unix_path=`$CYGPATH -u "$windows_path"`
27767    WIN_SDK_BASE="$unix_path"
27768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27770    WIN_SDK_BASE="$unix_path"
27771  fi
27772
27773    if test -d "$WIN_SDK_BASE"; then
27774      # There have been cases of partial or broken SDK installations. A missing
27775      # lib dir is not going to work.
27776      if test ! -d "$WIN_SDK_BASE/lib"; then
27777        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27778$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27779        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27780$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27781      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27784        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27785        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27786          VS_ENV_ARGS="/x86"
27787        else
27788          VS_ENV_ARGS="/x64"
27789        fi
27790        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27791        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27792        # TODO: improve detection for other versions of SDK
27793        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27794      else
27795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27796$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27798$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27799      fi
27800    fi
27801  fi
27802
27803  fi
27804
27805    if test "x$VS_ENV_CMD" != x; then
27806      TOOLCHAIN_VERSION=$VS_VERSION
27807      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27808      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27809      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27810      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27811      # The rest of the variables are already evaled while probing
27812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27813$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27814      break
27815    fi
27816  done
27817
27818
27819  # If we have a devkit, skip all of the below.
27820  if test "x$DEVKIT_VS_VERSION" = x; then
27821    if test "x$VS_ENV_CMD" != x; then
27822      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27823
27824  # Only process if variable expands to non-empty
27825
27826  if test "x$VS_ENV_CMD" != x; then
27827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828
27829  # First separate the path from the arguments. This will split at the first
27830  # space.
27831  complete="$VS_ENV_CMD"
27832  path="${complete%% *}"
27833  tmp="$complete EOL"
27834  arguments="${tmp#* }"
27835
27836  # Input might be given as Windows format, start by converting to
27837  # unix format.
27838  new_path=`$CYGPATH -u "$path"`
27839
27840  # Now try to locate executable using which
27841  new_path=`$WHICH "$new_path" 2> /dev/null`
27842  # bat and cmd files are not always considered executable in cygwin causing which
27843  # to not find them
27844  if test "x$new_path" = x \
27845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27847    new_path=`$CYGPATH -u "$path"`
27848  fi
27849  if test "x$new_path" = x; then
27850    # Oops. Which didn't find the executable.
27851    # The splitting of arguments from the executable at a space might have been incorrect,
27852    # since paths with space are more likely in Windows. Give it another try with the whole
27853    # argument.
27854    path="$complete"
27855    arguments="EOL"
27856    new_path=`$CYGPATH -u "$path"`
27857    new_path=`$WHICH "$new_path" 2> /dev/null`
27858    # bat and cmd files are not always considered executable in cygwin causing which
27859    # to not find them
27860    if test "x$new_path" = x \
27861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27863      new_path=`$CYGPATH -u "$path"`
27864    fi
27865    if test "x$new_path" = x; then
27866      # It's still not found. Now this is an unrecoverable error.
27867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27868$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27869      has_space=`$ECHO "$complete" | $GREP " "`
27870      if test "x$has_space" != x; then
27871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27873      fi
27874      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27875    fi
27876  fi
27877
27878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27881  # "foo.exe" is OK but "foo" is an error.
27882  #
27883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27884  # It is also a way to make sure we got the proper file name for the real test later on.
27885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27886  if test "x$test_shortpath" = x; then
27887    # Short path failed, file does not exist as specified.
27888    # Try adding .exe or .cmd
27889    if test -f "${new_path}.exe"; then
27890      input_to_shortpath="${new_path}.exe"
27891    elif test -f "${new_path}.cmd"; then
27892      input_to_shortpath="${new_path}.cmd"
27893    else
27894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27895$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27898      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27899    fi
27900  else
27901    input_to_shortpath="$new_path"
27902  fi
27903
27904  # Call helper function which possibly converts this using DOS-style short mode.
27905  # If so, the updated path is stored in $new_path.
27906  new_path="$input_to_shortpath"
27907
27908  input_path="$input_to_shortpath"
27909  # Check if we need to convert this using DOS-style short mode. If the path
27910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27911  # take no chances and rewrite it.
27912  # Note: m4 eats our [], so we need to use [ and ] instead.
27913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27914  if test "x$has_forbidden_chars" != x; then
27915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27919      # Going to short mode and back again did indeed matter. Since short mode is
27920      # case insensitive, let's make it lowercase to improve readability.
27921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27922      # Now convert it back to Unix-style (cygpath)
27923      input_path=`$CYGPATH -u "$shortmode_path"`
27924      new_path="$input_path"
27925    fi
27926  fi
27927
27928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27929  if test "x$test_cygdrive_prefix" = x; then
27930    # As a simple fix, exclude /usr/bin since it's not a real path.
27931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27933      # a path prefixed by /cygdrive for fixpath to work.
27934      new_path="$CYGWIN_ROOT_PATH$input_path"
27935    fi
27936  fi
27937
27938  # remove trailing .exe if any
27939  new_path="${new_path/%.exe/}"
27940
27941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27942
27943  # First separate the path from the arguments. This will split at the first
27944  # space.
27945  complete="$VS_ENV_CMD"
27946  path="${complete%% *}"
27947  tmp="$complete EOL"
27948  arguments="${tmp#* }"
27949
27950  # Input might be given as Windows format, start by converting to
27951  # unix format.
27952  new_path="$path"
27953
27954  windows_path="$new_path"
27955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27956    unix_path=`$CYGPATH -u "$windows_path"`
27957    new_path="$unix_path"
27958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27960    new_path="$unix_path"
27961  fi
27962
27963
27964  # Now try to locate executable using which
27965  new_path=`$WHICH "$new_path" 2> /dev/null`
27966
27967  if test "x$new_path" = x; then
27968    # Oops. Which didn't find the executable.
27969    # The splitting of arguments from the executable at a space might have been incorrect,
27970    # since paths with space are more likely in Windows. Give it another try with the whole
27971    # argument.
27972    path="$complete"
27973    arguments="EOL"
27974    new_path="$path"
27975
27976  windows_path="$new_path"
27977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27978    unix_path=`$CYGPATH -u "$windows_path"`
27979    new_path="$unix_path"
27980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27982    new_path="$unix_path"
27983  fi
27984
27985
27986    new_path=`$WHICH "$new_path" 2> /dev/null`
27987    # bat and cmd files are not always considered executable in MSYS causing which
27988    # to not find them
27989    if test "x$new_path" = x \
27990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27992      new_path="$path"
27993
27994  windows_path="$new_path"
27995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27996    unix_path=`$CYGPATH -u "$windows_path"`
27997    new_path="$unix_path"
27998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28000    new_path="$unix_path"
28001  fi
28002
28003    fi
28004
28005    if test "x$new_path" = x; then
28006      # It's still not found. Now this is an unrecoverable error.
28007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28008$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28009      has_space=`$ECHO "$complete" | $GREP " "`
28010      if test "x$has_space" != x; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28013      fi
28014      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28015    fi
28016  fi
28017
28018  # Now new_path has a complete unix path to the binary
28019  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28020    # Keep paths in /bin as-is, but remove trailing .exe if any
28021    new_path="${new_path/%.exe/}"
28022    # Do not save /bin paths to all_fixpath_prefixes!
28023  else
28024    # Not in mixed or Windows style, start by that.
28025    new_path=`cmd //c echo $new_path`
28026
28027  input_path="$new_path"
28028  # Check if we need to convert this using DOS-style short mode. If the path
28029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28030  # take no chances and rewrite it.
28031  # Note: m4 eats our [], so we need to use [ and ] instead.
28032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28033  if test "x$has_forbidden_chars" != x; then
28034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28036  fi
28037
28038    # Output is in $new_path
28039
28040  windows_path="$new_path"
28041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28042    unix_path=`$CYGPATH -u "$windows_path"`
28043    new_path="$unix_path"
28044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28046    new_path="$unix_path"
28047  fi
28048
28049    # remove trailing .exe if any
28050    new_path="${new_path/%.exe/}"
28051
28052    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28053    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28054  fi
28055
28056    else
28057      # We're on a unix platform. Hooray! :)
28058      # First separate the path from the arguments. This will split at the first
28059      # space.
28060      complete="$VS_ENV_CMD"
28061      path="${complete%% *}"
28062      tmp="$complete EOL"
28063      arguments="${tmp#* }"
28064
28065      # Cannot rely on the command "which" here since it doesn't always work.
28066      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28067      if test -z "$is_absolute_path"; then
28068        # Path to executable is not absolute. Find it.
28069        IFS_save="$IFS"
28070        IFS=:
28071        for p in $PATH; do
28072          if test -f "$p/$path" && test -x "$p/$path"; then
28073            new_path="$p/$path"
28074            break
28075          fi
28076        done
28077        IFS="$IFS_save"
28078      else
28079        # This is an absolute path, we can use it without further modifications.
28080        new_path="$path"
28081      fi
28082
28083      if test "x$new_path" = x; then
28084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28085$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28086        has_space=`$ECHO "$complete" | $GREP " "`
28087        if test "x$has_space" != x; then
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28089$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28090        fi
28091        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28092      fi
28093    fi
28094
28095    # Now join together the path and the arguments once again
28096    if test "x$arguments" != xEOL; then
28097      new_complete="$new_path ${arguments% *}"
28098    else
28099      new_complete="$new_path"
28100    fi
28101
28102    if test "x$complete" != "x$new_complete"; then
28103      VS_ENV_CMD="$new_complete"
28104      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28105$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28106    fi
28107  fi
28108
28109
28110      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28111      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28112$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28113
28114      # We need to create a couple of temporary files.
28115      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28116      $MKDIR -p $VS_ENV_TMP_DIR
28117
28118      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28119      # Instead create a shell script which will set the relevant variables when run.
28120      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28121
28122  unix_path="$WINPATH_VS_ENV_CMD"
28123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28124    windows_path=`$CYGPATH -m "$unix_path"`
28125    WINPATH_VS_ENV_CMD="$windows_path"
28126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28127    windows_path=`cmd //c echo $unix_path`
28128    WINPATH_VS_ENV_CMD="$windows_path"
28129  fi
28130
28131      WINPATH_BASH="$BASH"
28132
28133  unix_path="$WINPATH_BASH"
28134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28135    windows_path=`$CYGPATH -m "$unix_path"`
28136    WINPATH_BASH="$windows_path"
28137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28138    windows_path=`cmd //c echo $unix_path`
28139    WINPATH_BASH="$windows_path"
28140  fi
28141
28142
28143      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28144      # script (executable by bash) that will setup the important variables.
28145      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28146      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28147      # This will end up something like:
28148      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28149      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28150      # These will end up something like:
28151      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28152      # The trailing space for everyone except PATH is no typo, but is needed due
28153      # to trailing \ in the Windows paths. These will be stripped later.
28154      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28155          >> $EXTRACT_VC_ENV_BAT_FILE
28156      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28157          >> $EXTRACT_VC_ENV_BAT_FILE
28158      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28159          >> $EXTRACT_VC_ENV_BAT_FILE
28160      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28161          >> $EXTRACT_VC_ENV_BAT_FILE
28162      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28163          >> $EXTRACT_VC_ENV_BAT_FILE
28164      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28165          >> $EXTRACT_VC_ENV_BAT_FILE
28166
28167      # Now execute the newly created bat file.
28168      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28169      # Change directory so we don't need to mess with Windows paths in redirects.
28170      cd $VS_ENV_TMP_DIR
28171      cmd /c extract-vs-env.bat | $CAT
28172      cd $CURDIR
28173
28174      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28176$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28177        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28178$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28179        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28180$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28181        as_fn_error $? "Cannot continue" "$LINENO" 5
28182      fi
28183
28184      # Now set all paths and other env variables. This will allow the rest of
28185      # the configure script to find and run the compiler in the proper way.
28186      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28187$as_echo "$as_me: Setting extracted environment variables" >&6;}
28188      . $VS_ENV_TMP_DIR/set-vs-env.sh
28189      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28190      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28191    else
28192      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28193      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28194$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28195    fi
28196  fi
28197
28198  # At this point, we should have correct variables in the environment, or we can't continue.
28199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28200$as_echo_n "checking for Visual Studio variables... " >&6; }
28201
28202  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28203      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28204    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28206$as_echo "present but broken" >&6; }
28207      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28208    else
28209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28210$as_echo "ok" >&6; }
28211      # Remove any trailing "\" ";" and " " from the variables.
28212      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28213      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28214      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28215      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28216      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28217      # Remove any paths containing # (typically F#) as that messes up make. This
28218      # is needed if visual studio was installed with F# support.
28219      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28220
28221
28222
28223
28224
28225      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28226      OLDIFS="$IFS"
28227      IFS=";"
28228      for i in $VS_INCLUDE; do
28229        ipath=$i
28230        # Only process non-empty elements
28231        if test "x$ipath" != x; then
28232          IFS="$OLDIFS"
28233          # Check that directory exists before calling fixup_path
28234          testpath=$ipath
28235
28236  windows_path="$testpath"
28237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28238    unix_path=`$CYGPATH -u "$windows_path"`
28239    testpath="$unix_path"
28240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28242    testpath="$unix_path"
28243  fi
28244
28245          if test -d "$testpath"; then
28246
28247  # Only process if variable expands to non-empty
28248
28249  if test "x$ipath" != x; then
28250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28251
28252  # Input might be given as Windows format, start by converting to
28253  # unix format.
28254  path="$ipath"
28255  new_path=`$CYGPATH -u "$path"`
28256
28257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28260  # "foo.exe" is OK but "foo" is an error.
28261  #
28262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28263  # It is also a way to make sure we got the proper file name for the real test later on.
28264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28265  if test "x$test_shortpath" = x; then
28266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28267$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28268    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28269  fi
28270
28271  # Call helper function which possibly converts this using DOS-style short mode.
28272  # If so, the updated path is stored in $new_path.
28273
28274  input_path="$new_path"
28275  # Check if we need to convert this using DOS-style short mode. If the path
28276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28277  # take no chances and rewrite it.
28278  # Note: m4 eats our [], so we need to use [ and ] instead.
28279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28280  if test "x$has_forbidden_chars" != x; then
28281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28285      # Going to short mode and back again did indeed matter. Since short mode is
28286      # case insensitive, let's make it lowercase to improve readability.
28287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28288      # Now convert it back to Unix-style (cygpath)
28289      input_path=`$CYGPATH -u "$shortmode_path"`
28290      new_path="$input_path"
28291    fi
28292  fi
28293
28294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28295  if test "x$test_cygdrive_prefix" = x; then
28296    # As a simple fix, exclude /usr/bin since it's not a real path.
28297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28299      # a path prefixed by /cygdrive for fixpath to work.
28300      new_path="$CYGWIN_ROOT_PATH$input_path"
28301    fi
28302  fi
28303
28304
28305  if test "x$path" != "x$new_path"; then
28306    ipath="$new_path"
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28308$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28309  fi
28310
28311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28312
28313  path="$ipath"
28314  has_colon=`$ECHO $path | $GREP ^.:`
28315  new_path="$path"
28316  if test "x$has_colon" = x; then
28317    # Not in mixed or Windows style, start by that.
28318    new_path=`cmd //c echo $path`
28319  fi
28320
28321
28322  input_path="$new_path"
28323  # Check if we need to convert this using DOS-style short mode. If the path
28324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28325  # take no chances and rewrite it.
28326  # Note: m4 eats our [], so we need to use [ and ] instead.
28327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28328  if test "x$has_forbidden_chars" != x; then
28329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28331  fi
28332
28333
28334  windows_path="$new_path"
28335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28336    unix_path=`$CYGPATH -u "$windows_path"`
28337    new_path="$unix_path"
28338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28340    new_path="$unix_path"
28341  fi
28342
28343  if test "x$path" != "x$new_path"; then
28344    ipath="$new_path"
28345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28346$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28347  fi
28348
28349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28351
28352    else
28353      # We're on a unix platform. Hooray! :)
28354      path="$ipath"
28355      has_space=`$ECHO "$path" | $GREP " "`
28356      if test "x$has_space" != x; then
28357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28358$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28360      fi
28361
28362      # Use eval to expand a potential ~
28363      eval path="$path"
28364      if test ! -f "$path" && test ! -d "$path"; then
28365        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28366      fi
28367
28368      ipath="`cd "$path"; $THEPWDCMD -L`"
28369    fi
28370  fi
28371
28372            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28373          fi
28374          IFS=";"
28375        fi
28376      done
28377      # Convert VS_LIB into SYSROOT_LDFLAGS
28378      for i in $VS_LIB; do
28379        libpath=$i
28380        # Only process non-empty elements
28381        if test "x$libpath" != x; then
28382          IFS="$OLDIFS"
28383          # Check that directory exists before calling fixup_path
28384          testpath=$libpath
28385
28386  windows_path="$testpath"
28387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388    unix_path=`$CYGPATH -u "$windows_path"`
28389    testpath="$unix_path"
28390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28392    testpath="$unix_path"
28393  fi
28394
28395          if test -d "$testpath"; then
28396
28397  # Only process if variable expands to non-empty
28398
28399  if test "x$libpath" != x; then
28400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28401
28402  # Input might be given as Windows format, start by converting to
28403  # unix format.
28404  path="$libpath"
28405  new_path=`$CYGPATH -u "$path"`
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28417$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28418    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423
28424  input_path="$new_path"
28425  # Check if we need to convert this using DOS-style short mode. If the path
28426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28427  # take no chances and rewrite it.
28428  # Note: m4 eats our [], so we need to use [ and ] instead.
28429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28430  if test "x$has_forbidden_chars" != x; then
28431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28435      # Going to short mode and back again did indeed matter. Since short mode is
28436      # case insensitive, let's make it lowercase to improve readability.
28437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28438      # Now convert it back to Unix-style (cygpath)
28439      input_path=`$CYGPATH -u "$shortmode_path"`
28440      new_path="$input_path"
28441    fi
28442  fi
28443
28444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28445  if test "x$test_cygdrive_prefix" = x; then
28446    # As a simple fix, exclude /usr/bin since it's not a real path.
28447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28449      # a path prefixed by /cygdrive for fixpath to work.
28450      new_path="$CYGWIN_ROOT_PATH$input_path"
28451    fi
28452  fi
28453
28454
28455  if test "x$path" != "x$new_path"; then
28456    libpath="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28459  fi
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  path="$libpath"
28464  has_colon=`$ECHO $path | $GREP ^.:`
28465  new_path="$path"
28466  if test "x$has_colon" = x; then
28467    # Not in mixed or Windows style, start by that.
28468    new_path=`cmd //c echo $path`
28469  fi
28470
28471
28472  input_path="$new_path"
28473  # Check if we need to convert this using DOS-style short mode. If the path
28474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28475  # take no chances and rewrite it.
28476  # Note: m4 eats our [], so we need to use [ and ] instead.
28477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28478  if test "x$has_forbidden_chars" != x; then
28479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481  fi
28482
28483
28484  windows_path="$new_path"
28485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486    unix_path=`$CYGPATH -u "$windows_path"`
28487    new_path="$unix_path"
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28490    new_path="$unix_path"
28491  fi
28492
28493  if test "x$path" != "x$new_path"; then
28494    libpath="$new_path"
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28496$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28497  fi
28498
28499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28501
28502    else
28503      # We're on a unix platform. Hooray! :)
28504      path="$libpath"
28505      has_space=`$ECHO "$path" | $GREP " "`
28506      if test "x$has_space" != x; then
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28508$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28510      fi
28511
28512      # Use eval to expand a potential ~
28513      eval path="$path"
28514      if test ! -f "$path" && test ! -d "$path"; then
28515        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28516      fi
28517
28518      libpath="`cd "$path"; $THEPWDCMD -L`"
28519    fi
28520  fi
28521
28522            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28523          fi
28524          IFS=";"
28525        fi
28526      done
28527      IFS="$OLDIFS"
28528    fi
28529  else
28530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28531$as_echo "not found" >&6; }
28532
28533    if test "x$VS_ENV_CMD" = x; then
28534      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28535$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28536      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28537$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28538    else
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28540$as_echo "$as_me: Running the extraction script failed." >&6;}
28541    fi
28542    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28543$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28544    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28545$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28546    as_fn_error $? "Cannot continue" "$LINENO" 5
28547  fi
28548
28549    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28550    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28551    PATH="$VS_PATH"
28552    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28553    export INCLUDE="$VS_INCLUDE"
28554    export LIB="$VS_LIB"
28555  fi
28556
28557  # For solaris we really need solaris tools, and not the GNU equivalent.
28558  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28559  # so add that to path before starting to probe.
28560  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28561  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28562    PATH="/usr/ccs/bin:$PATH"
28563  fi
28564
28565  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28566  # override all other locations.
28567  if test "x$TOOLCHAIN_PATH" != x; then
28568    PATH=$TOOLCHAIN_PATH:$PATH
28569  fi
28570
28571
28572  #
28573  # Setup the compilers (CC and CXX)
28574  #
28575
28576  COMPILER_NAME=C
28577  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28578
28579  if test "x$CC" != x; then
28580    # User has supplied compiler name already, always let that override.
28581    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28582$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28583    if test "x`basename $CC`" = "x$CC"; then
28584      # A command without a complete path is provided, search $PATH.
28585
28586      for ac_prog in $CC
28587do
28588  # Extract the first word of "$ac_prog", so it can be a program name with args.
28589set dummy $ac_prog; ac_word=$2
28590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28591$as_echo_n "checking for $ac_word... " >&6; }
28592if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28593  $as_echo_n "(cached) " >&6
28594else
28595  case $POTENTIAL_CC in
28596  [\\/]* | ?:[\\/]*)
28597  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28598  ;;
28599  *)
28600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28601for as_dir in $PATH
28602do
28603  IFS=$as_save_IFS
28604  test -z "$as_dir" && as_dir=.
28605    for ac_exec_ext in '' $ac_executable_extensions; do
28606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28607    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28609    break 2
28610  fi
28611done
28612  done
28613IFS=$as_save_IFS
28614
28615  ;;
28616esac
28617fi
28618POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28619if test -n "$POTENTIAL_CC"; then
28620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28621$as_echo "$POTENTIAL_CC" >&6; }
28622else
28623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28624$as_echo "no" >&6; }
28625fi
28626
28627
28628  test -n "$POTENTIAL_CC" && break
28629done
28630
28631      if test "x$POTENTIAL_CC" != x; then
28632        CC=$POTENTIAL_CC
28633      else
28634        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28635      fi
28636    else
28637      # Otherwise it might already be a complete path
28638      if test ! -x "$CC"; then
28639        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28640      fi
28641    fi
28642  else
28643    # No user supplied value. Locate compiler ourselves.
28644
28645    # If we are cross compiling, assume cross compilation tools follows the
28646    # cross compilation standard where they are prefixed with the autoconf
28647    # standard name for the target. For example the binary
28648    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28649    # If we are not cross compiling, then the default compiler name will be
28650    # used.
28651
28652    CC=
28653    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28654    # before checking the rest of the PATH.
28655    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28656    # step, this should not be necessary.
28657    if test -n "$TOOLCHAIN_PATH"; then
28658      PATH_save="$PATH"
28659      PATH="$TOOLCHAIN_PATH"
28660      for ac_prog in $SEARCH_LIST
28661do
28662  # Extract the first word of "$ac_prog", so it can be a program name with args.
28663set dummy $ac_prog; ac_word=$2
28664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28665$as_echo_n "checking for $ac_word... " >&6; }
28666if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28667  $as_echo_n "(cached) " >&6
28668else
28669  case $TOOLCHAIN_PATH_CC in
28670  [\\/]* | ?:[\\/]*)
28671  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28672  ;;
28673  *)
28674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28675for as_dir in $PATH
28676do
28677  IFS=$as_save_IFS
28678  test -z "$as_dir" && as_dir=.
28679    for ac_exec_ext in '' $ac_executable_extensions; do
28680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28681    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28683    break 2
28684  fi
28685done
28686  done
28687IFS=$as_save_IFS
28688
28689  ;;
28690esac
28691fi
28692TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28693if test -n "$TOOLCHAIN_PATH_CC"; then
28694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28695$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28696else
28697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28698$as_echo "no" >&6; }
28699fi
28700
28701
28702  test -n "$TOOLCHAIN_PATH_CC" && break
28703done
28704
28705      CC=$TOOLCHAIN_PATH_CC
28706      PATH="$PATH_save"
28707    fi
28708
28709    # AC_PATH_PROGS can't be run multiple times with the same variable,
28710    # so create a new name for this run.
28711    if test "x$CC" = x; then
28712      for ac_prog in $SEARCH_LIST
28713do
28714  # Extract the first word of "$ac_prog", so it can be a program name with args.
28715set dummy $ac_prog; ac_word=$2
28716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28717$as_echo_n "checking for $ac_word... " >&6; }
28718if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28719  $as_echo_n "(cached) " >&6
28720else
28721  case $POTENTIAL_CC in
28722  [\\/]* | ?:[\\/]*)
28723  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28724  ;;
28725  *)
28726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28727for as_dir in $PATH
28728do
28729  IFS=$as_save_IFS
28730  test -z "$as_dir" && as_dir=.
28731    for ac_exec_ext in '' $ac_executable_extensions; do
28732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28733    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28735    break 2
28736  fi
28737done
28738  done
28739IFS=$as_save_IFS
28740
28741  ;;
28742esac
28743fi
28744POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28745if test -n "$POTENTIAL_CC"; then
28746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28747$as_echo "$POTENTIAL_CC" >&6; }
28748else
28749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28750$as_echo "no" >&6; }
28751fi
28752
28753
28754  test -n "$POTENTIAL_CC" && break
28755done
28756
28757      CC=$POTENTIAL_CC
28758    fi
28759
28760    if test "x$CC" = x; then
28761
28762  # Print a helpful message on how to acquire the necessary build dependency.
28763  # devkit is the help tag: freetype, cups, pulse, alsa etc
28764  MISSING_DEPENDENCY=devkit
28765
28766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767    cygwin_help $MISSING_DEPENDENCY
28768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28769    msys_help $MISSING_DEPENDENCY
28770  else
28771    PKGHANDLER_COMMAND=
28772
28773    case $PKGHANDLER in
28774      apt-get)
28775        apt_help     $MISSING_DEPENDENCY ;;
28776      yum)
28777        yum_help     $MISSING_DEPENDENCY ;;
28778      port)
28779        port_help    $MISSING_DEPENDENCY ;;
28780      pkgutil)
28781        pkgutil_help $MISSING_DEPENDENCY ;;
28782      pkgadd)
28783        pkgadd_help  $MISSING_DEPENDENCY ;;
28784    esac
28785
28786    if test "x$PKGHANDLER_COMMAND" != x; then
28787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28788    fi
28789  fi
28790
28791      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28792    fi
28793  fi
28794
28795  # Now we have a compiler binary in CC. Make sure it's okay.
28796
28797  # Only process if variable expands to non-empty
28798
28799  if test "x$CC" != x; then
28800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28801
28802  # First separate the path from the arguments. This will split at the first
28803  # space.
28804  complete="$CC"
28805  path="${complete%% *}"
28806  tmp="$complete EOL"
28807  arguments="${tmp#* }"
28808
28809  # Input might be given as Windows format, start by converting to
28810  # unix format.
28811  new_path=`$CYGPATH -u "$path"`
28812
28813  # Now try to locate executable using which
28814  new_path=`$WHICH "$new_path" 2> /dev/null`
28815  # bat and cmd files are not always considered executable in cygwin causing which
28816  # to not find them
28817  if test "x$new_path" = x \
28818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28820    new_path=`$CYGPATH -u "$path"`
28821  fi
28822  if test "x$new_path" = x; then
28823    # Oops. Which didn't find the executable.
28824    # The splitting of arguments from the executable at a space might have been incorrect,
28825    # since paths with space are more likely in Windows. Give it another try with the whole
28826    # argument.
28827    path="$complete"
28828    arguments="EOL"
28829    new_path=`$CYGPATH -u "$path"`
28830    new_path=`$WHICH "$new_path" 2> /dev/null`
28831    # bat and cmd files are not always considered executable in cygwin causing which
28832    # to not find them
28833    if test "x$new_path" = x \
28834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28836      new_path=`$CYGPATH -u "$path"`
28837    fi
28838    if test "x$new_path" = x; then
28839      # It's still not found. Now this is an unrecoverable error.
28840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28841$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28842      has_space=`$ECHO "$complete" | $GREP " "`
28843      if test "x$has_space" != x; then
28844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28846      fi
28847      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28848    fi
28849  fi
28850
28851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28854  # "foo.exe" is OK but "foo" is an error.
28855  #
28856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28857  # It is also a way to make sure we got the proper file name for the real test later on.
28858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28859  if test "x$test_shortpath" = x; then
28860    # Short path failed, file does not exist as specified.
28861    # Try adding .exe or .cmd
28862    if test -f "${new_path}.exe"; then
28863      input_to_shortpath="${new_path}.exe"
28864    elif test -f "${new_path}.cmd"; then
28865      input_to_shortpath="${new_path}.cmd"
28866    else
28867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28868$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28871      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28872    fi
28873  else
28874    input_to_shortpath="$new_path"
28875  fi
28876
28877  # Call helper function which possibly converts this using DOS-style short mode.
28878  # If so, the updated path is stored in $new_path.
28879  new_path="$input_to_shortpath"
28880
28881  input_path="$input_to_shortpath"
28882  # Check if we need to convert this using DOS-style short mode. If the path
28883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28884  # take no chances and rewrite it.
28885  # Note: m4 eats our [], so we need to use [ and ] instead.
28886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28887  if test "x$has_forbidden_chars" != x; then
28888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28892      # Going to short mode and back again did indeed matter. Since short mode is
28893      # case insensitive, let's make it lowercase to improve readability.
28894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28895      # Now convert it back to Unix-style (cygpath)
28896      input_path=`$CYGPATH -u "$shortmode_path"`
28897      new_path="$input_path"
28898    fi
28899  fi
28900
28901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28902  if test "x$test_cygdrive_prefix" = x; then
28903    # As a simple fix, exclude /usr/bin since it's not a real path.
28904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28906      # a path prefixed by /cygdrive for fixpath to work.
28907      new_path="$CYGWIN_ROOT_PATH$input_path"
28908    fi
28909  fi
28910
28911  # remove trailing .exe if any
28912  new_path="${new_path/%.exe/}"
28913
28914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28915
28916  # First separate the path from the arguments. This will split at the first
28917  # space.
28918  complete="$CC"
28919  path="${complete%% *}"
28920  tmp="$complete EOL"
28921  arguments="${tmp#* }"
28922
28923  # Input might be given as Windows format, start by converting to
28924  # unix format.
28925  new_path="$path"
28926
28927  windows_path="$new_path"
28928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28929    unix_path=`$CYGPATH -u "$windows_path"`
28930    new_path="$unix_path"
28931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28933    new_path="$unix_path"
28934  fi
28935
28936
28937  # Now try to locate executable using which
28938  new_path=`$WHICH "$new_path" 2> /dev/null`
28939
28940  if test "x$new_path" = x; then
28941    # Oops. Which didn't find the executable.
28942    # The splitting of arguments from the executable at a space might have been incorrect,
28943    # since paths with space are more likely in Windows. Give it another try with the whole
28944    # argument.
28945    path="$complete"
28946    arguments="EOL"
28947    new_path="$path"
28948
28949  windows_path="$new_path"
28950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28951    unix_path=`$CYGPATH -u "$windows_path"`
28952    new_path="$unix_path"
28953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28955    new_path="$unix_path"
28956  fi
28957
28958
28959    new_path=`$WHICH "$new_path" 2> /dev/null`
28960    # bat and cmd files are not always considered executable in MSYS causing which
28961    # to not find them
28962    if test "x$new_path" = x \
28963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28965      new_path="$path"
28966
28967  windows_path="$new_path"
28968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28969    unix_path=`$CYGPATH -u "$windows_path"`
28970    new_path="$unix_path"
28971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28973    new_path="$unix_path"
28974  fi
28975
28976    fi
28977
28978    if test "x$new_path" = x; then
28979      # It's still not found. Now this is an unrecoverable error.
28980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28981$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28982      has_space=`$ECHO "$complete" | $GREP " "`
28983      if test "x$has_space" != x; then
28984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28986      fi
28987      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28988    fi
28989  fi
28990
28991  # Now new_path has a complete unix path to the binary
28992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28993    # Keep paths in /bin as-is, but remove trailing .exe if any
28994    new_path="${new_path/%.exe/}"
28995    # Do not save /bin paths to all_fixpath_prefixes!
28996  else
28997    # Not in mixed or Windows style, start by that.
28998    new_path=`cmd //c echo $new_path`
28999
29000  input_path="$new_path"
29001  # Check if we need to convert this using DOS-style short mode. If the path
29002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29003  # take no chances and rewrite it.
29004  # Note: m4 eats our [], so we need to use [ and ] instead.
29005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29006  if test "x$has_forbidden_chars" != x; then
29007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29009  fi
29010
29011    # Output is in $new_path
29012
29013  windows_path="$new_path"
29014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29015    unix_path=`$CYGPATH -u "$windows_path"`
29016    new_path="$unix_path"
29017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29019    new_path="$unix_path"
29020  fi
29021
29022    # remove trailing .exe if any
29023    new_path="${new_path/%.exe/}"
29024
29025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29027  fi
29028
29029    else
29030      # We're on a unix platform. Hooray! :)
29031      # First separate the path from the arguments. This will split at the first
29032      # space.
29033      complete="$CC"
29034      path="${complete%% *}"
29035      tmp="$complete EOL"
29036      arguments="${tmp#* }"
29037
29038      # Cannot rely on the command "which" here since it doesn't always work.
29039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29040      if test -z "$is_absolute_path"; then
29041        # Path to executable is not absolute. Find it.
29042        IFS_save="$IFS"
29043        IFS=:
29044        for p in $PATH; do
29045          if test -f "$p/$path" && test -x "$p/$path"; then
29046            new_path="$p/$path"
29047            break
29048          fi
29049        done
29050        IFS="$IFS_save"
29051      else
29052        # This is an absolute path, we can use it without further modifications.
29053        new_path="$path"
29054      fi
29055
29056      if test "x$new_path" = x; then
29057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29058$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29059        has_space=`$ECHO "$complete" | $GREP " "`
29060        if test "x$has_space" != x; then
29061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29063        fi
29064        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29065      fi
29066    fi
29067
29068    # Now join together the path and the arguments once again
29069    if test "x$arguments" != xEOL; then
29070      new_complete="$new_path ${arguments% *}"
29071    else
29072      new_complete="$new_path"
29073    fi
29074
29075    if test "x$complete" != "x$new_complete"; then
29076      CC="$new_complete"
29077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29078$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29079    fi
29080  fi
29081
29082  TEST_COMPILER="$CC"
29083  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29084  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29085  if test "x$OPENJDK_BUILD_OS" != xaix; then
29086    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29088$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29089
29090  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29091    # Follow a chain of symbolic links. Use readlink
29092    # where it exists, else fall back to horribly
29093    # complicated shell code.
29094    if test "x$READLINK_TESTED" != yes; then
29095      # On MacOSX there is a readlink tool with a different
29096      # purpose than the GNU readlink tool. Check the found readlink.
29097      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29098      if test "x$ISGNU" = x; then
29099        # A readlink that we do not know how to use.
29100        # Are there other non-GNU readlinks out there?
29101        READLINK_TESTED=yes
29102        READLINK=
29103      fi
29104    fi
29105
29106    if test "x$READLINK" != x; then
29107      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29108    else
29109      # Save the current directory for restoring afterwards
29110      STARTDIR=$PWD
29111      COUNTER=0
29112      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29113      sym_link_file=`$BASENAME $TEST_COMPILER`
29114      cd $sym_link_dir
29115      # Use -P flag to resolve symlinks in directories.
29116      cd `$THEPWDCMD -P`
29117      sym_link_dir=`$THEPWDCMD -P`
29118      # Resolve file symlinks
29119      while test $COUNTER -lt 20; do
29120        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29121        if test "x$ISLINK" == x; then
29122          # This is not a symbolic link! We are done!
29123          break
29124        fi
29125        # Again resolve directory symlinks since the target of the just found
29126        # link could be in a different directory
29127        cd `$DIRNAME $ISLINK`
29128        sym_link_dir=`$THEPWDCMD -P`
29129        sym_link_file=`$BASENAME $ISLINK`
29130        let COUNTER=COUNTER+1
29131      done
29132      cd $STARTDIR
29133      TEST_COMPILER=$sym_link_dir/$sym_link_file
29134    fi
29135  fi
29136
29137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29138$as_echo "$TEST_COMPILER" >&6; }
29139  fi
29140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29141$as_echo_n "checking if CC is disguised ccache... " >&6; }
29142
29143  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29144  if test "x$COMPILER_BASENAME" = "xccache"; then
29145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29146$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29147    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29148    # We want to control ccache invocation ourselves, so ignore this cc and try
29149    # searching again.
29150
29151    # Remove the path to the fake ccache cc from the PATH
29152    RETRY_COMPILER_SAVED_PATH="$PATH"
29153    COMPILER_DIRNAME=`$DIRNAME $CC`
29154    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29155
29156    # Try again looking for our compiler
29157    if test -n "$ac_tool_prefix"; then
29158  for ac_prog in $TOOLCHAIN_CC_BINARY
29159  do
29160    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29163$as_echo_n "checking for $ac_word... " >&6; }
29164if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29165  $as_echo_n "(cached) " >&6
29166else
29167  if test -n "$PROPER_COMPILER_CC"; then
29168  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29169else
29170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29171for as_dir in $PATH
29172do
29173  IFS=$as_save_IFS
29174  test -z "$as_dir" && as_dir=.
29175    for ac_exec_ext in '' $ac_executable_extensions; do
29176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29177    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29179    break 2
29180  fi
29181done
29182  done
29183IFS=$as_save_IFS
29184
29185fi
29186fi
29187PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29188if test -n "$PROPER_COMPILER_CC"; then
29189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29190$as_echo "$PROPER_COMPILER_CC" >&6; }
29191else
29192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29193$as_echo "no" >&6; }
29194fi
29195
29196
29197    test -n "$PROPER_COMPILER_CC" && break
29198  done
29199fi
29200if test -z "$PROPER_COMPILER_CC"; then
29201  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29202  for ac_prog in $TOOLCHAIN_CC_BINARY
29203do
29204  # Extract the first word of "$ac_prog", so it can be a program name with args.
29205set dummy $ac_prog; ac_word=$2
29206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29207$as_echo_n "checking for $ac_word... " >&6; }
29208if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29209  $as_echo_n "(cached) " >&6
29210else
29211  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29212  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29213else
29214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29215for as_dir in $PATH
29216do
29217  IFS=$as_save_IFS
29218  test -z "$as_dir" && as_dir=.
29219    for ac_exec_ext in '' $ac_executable_extensions; do
29220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29221    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29223    break 2
29224  fi
29225done
29226  done
29227IFS=$as_save_IFS
29228
29229fi
29230fi
29231ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29232if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29234$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29235else
29236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29237$as_echo "no" >&6; }
29238fi
29239
29240
29241  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29242done
29243
29244  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29245    PROPER_COMPILER_CC=""
29246  else
29247    case $cross_compiling:$ac_tool_warned in
29248yes:)
29249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29251ac_tool_warned=yes ;;
29252esac
29253    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29254  fi
29255fi
29256
29257
29258  # Only process if variable expands to non-empty
29259
29260  if test "x$PROPER_COMPILER_CC" != x; then
29261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29262
29263  # First separate the path from the arguments. This will split at the first
29264  # space.
29265  complete="$PROPER_COMPILER_CC"
29266  path="${complete%% *}"
29267  tmp="$complete EOL"
29268  arguments="${tmp#* }"
29269
29270  # Input might be given as Windows format, start by converting to
29271  # unix format.
29272  new_path=`$CYGPATH -u "$path"`
29273
29274  # Now try to locate executable using which
29275  new_path=`$WHICH "$new_path" 2> /dev/null`
29276  # bat and cmd files are not always considered executable in cygwin causing which
29277  # to not find them
29278  if test "x$new_path" = x \
29279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29281    new_path=`$CYGPATH -u "$path"`
29282  fi
29283  if test "x$new_path" = x; then
29284    # Oops. Which didn't find the executable.
29285    # The splitting of arguments from the executable at a space might have been incorrect,
29286    # since paths with space are more likely in Windows. Give it another try with the whole
29287    # argument.
29288    path="$complete"
29289    arguments="EOL"
29290    new_path=`$CYGPATH -u "$path"`
29291    new_path=`$WHICH "$new_path" 2> /dev/null`
29292    # bat and cmd files are not always considered executable in cygwin causing which
29293    # to not find them
29294    if test "x$new_path" = x \
29295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29297      new_path=`$CYGPATH -u "$path"`
29298    fi
29299    if test "x$new_path" = x; then
29300      # It's still not found. Now this is an unrecoverable error.
29301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29302$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29303      has_space=`$ECHO "$complete" | $GREP " "`
29304      if test "x$has_space" != x; then
29305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29307      fi
29308      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29309    fi
29310  fi
29311
29312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29315  # "foo.exe" is OK but "foo" is an error.
29316  #
29317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29318  # It is also a way to make sure we got the proper file name for the real test later on.
29319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29320  if test "x$test_shortpath" = x; then
29321    # Short path failed, file does not exist as specified.
29322    # Try adding .exe or .cmd
29323    if test -f "${new_path}.exe"; then
29324      input_to_shortpath="${new_path}.exe"
29325    elif test -f "${new_path}.cmd"; then
29326      input_to_shortpath="${new_path}.cmd"
29327    else
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29329$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29333    fi
29334  else
29335    input_to_shortpath="$new_path"
29336  fi
29337
29338  # Call helper function which possibly converts this using DOS-style short mode.
29339  # If so, the updated path is stored in $new_path.
29340  new_path="$input_to_shortpath"
29341
29342  input_path="$input_to_shortpath"
29343  # Check if we need to convert this using DOS-style short mode. If the path
29344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29345  # take no chances and rewrite it.
29346  # Note: m4 eats our [], so we need to use [ and ] instead.
29347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29348  if test "x$has_forbidden_chars" != x; then
29349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29353      # Going to short mode and back again did indeed matter. Since short mode is
29354      # case insensitive, let's make it lowercase to improve readability.
29355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29356      # Now convert it back to Unix-style (cygpath)
29357      input_path=`$CYGPATH -u "$shortmode_path"`
29358      new_path="$input_path"
29359    fi
29360  fi
29361
29362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29363  if test "x$test_cygdrive_prefix" = x; then
29364    # As a simple fix, exclude /usr/bin since it's not a real path.
29365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29367      # a path prefixed by /cygdrive for fixpath to work.
29368      new_path="$CYGWIN_ROOT_PATH$input_path"
29369    fi
29370  fi
29371
29372  # remove trailing .exe if any
29373  new_path="${new_path/%.exe/}"
29374
29375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29376
29377  # First separate the path from the arguments. This will split at the first
29378  # space.
29379  complete="$PROPER_COMPILER_CC"
29380  path="${complete%% *}"
29381  tmp="$complete EOL"
29382  arguments="${tmp#* }"
29383
29384  # Input might be given as Windows format, start by converting to
29385  # unix format.
29386  new_path="$path"
29387
29388  windows_path="$new_path"
29389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29390    unix_path=`$CYGPATH -u "$windows_path"`
29391    new_path="$unix_path"
29392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29394    new_path="$unix_path"
29395  fi
29396
29397
29398  # Now try to locate executable using which
29399  new_path=`$WHICH "$new_path" 2> /dev/null`
29400
29401  if test "x$new_path" = x; then
29402    # Oops. Which didn't find the executable.
29403    # The splitting of arguments from the executable at a space might have been incorrect,
29404    # since paths with space are more likely in Windows. Give it another try with the whole
29405    # argument.
29406    path="$complete"
29407    arguments="EOL"
29408    new_path="$path"
29409
29410  windows_path="$new_path"
29411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29412    unix_path=`$CYGPATH -u "$windows_path"`
29413    new_path="$unix_path"
29414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29416    new_path="$unix_path"
29417  fi
29418
29419
29420    new_path=`$WHICH "$new_path" 2> /dev/null`
29421    # bat and cmd files are not always considered executable in MSYS causing which
29422    # to not find them
29423    if test "x$new_path" = x \
29424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29426      new_path="$path"
29427
29428  windows_path="$new_path"
29429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29430    unix_path=`$CYGPATH -u "$windows_path"`
29431    new_path="$unix_path"
29432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29434    new_path="$unix_path"
29435  fi
29436
29437    fi
29438
29439    if test "x$new_path" = x; then
29440      # It's still not found. Now this is an unrecoverable error.
29441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29442$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29443      has_space=`$ECHO "$complete" | $GREP " "`
29444      if test "x$has_space" != x; then
29445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29447      fi
29448      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29449    fi
29450  fi
29451
29452  # Now new_path has a complete unix path to the binary
29453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29454    # Keep paths in /bin as-is, but remove trailing .exe if any
29455    new_path="${new_path/%.exe/}"
29456    # Do not save /bin paths to all_fixpath_prefixes!
29457  else
29458    # Not in mixed or Windows style, start by that.
29459    new_path=`cmd //c echo $new_path`
29460
29461  input_path="$new_path"
29462  # Check if we need to convert this using DOS-style short mode. If the path
29463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29464  # take no chances and rewrite it.
29465  # Note: m4 eats our [], so we need to use [ and ] instead.
29466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29467  if test "x$has_forbidden_chars" != x; then
29468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29470  fi
29471
29472    # Output is in $new_path
29473
29474  windows_path="$new_path"
29475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29476    unix_path=`$CYGPATH -u "$windows_path"`
29477    new_path="$unix_path"
29478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29480    new_path="$unix_path"
29481  fi
29482
29483    # remove trailing .exe if any
29484    new_path="${new_path/%.exe/}"
29485
29486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29488  fi
29489
29490    else
29491      # We're on a unix platform. Hooray! :)
29492      # First separate the path from the arguments. This will split at the first
29493      # space.
29494      complete="$PROPER_COMPILER_CC"
29495      path="${complete%% *}"
29496      tmp="$complete EOL"
29497      arguments="${tmp#* }"
29498
29499      # Cannot rely on the command "which" here since it doesn't always work.
29500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29501      if test -z "$is_absolute_path"; then
29502        # Path to executable is not absolute. Find it.
29503        IFS_save="$IFS"
29504        IFS=:
29505        for p in $PATH; do
29506          if test -f "$p/$path" && test -x "$p/$path"; then
29507            new_path="$p/$path"
29508            break
29509          fi
29510        done
29511        IFS="$IFS_save"
29512      else
29513        # This is an absolute path, we can use it without further modifications.
29514        new_path="$path"
29515      fi
29516
29517      if test "x$new_path" = x; then
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29519$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29520        has_space=`$ECHO "$complete" | $GREP " "`
29521        if test "x$has_space" != x; then
29522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29524        fi
29525        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29526      fi
29527    fi
29528
29529    # Now join together the path and the arguments once again
29530    if test "x$arguments" != xEOL; then
29531      new_complete="$new_path ${arguments% *}"
29532    else
29533      new_complete="$new_path"
29534    fi
29535
29536    if test "x$complete" != "x$new_complete"; then
29537      PROPER_COMPILER_CC="$new_complete"
29538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29539$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29540    fi
29541  fi
29542
29543    PATH="$RETRY_COMPILER_SAVED_PATH"
29544
29545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29546$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29547
29548  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29549    # Follow a chain of symbolic links. Use readlink
29550    # where it exists, else fall back to horribly
29551    # complicated shell code.
29552    if test "x$READLINK_TESTED" != yes; then
29553      # On MacOSX there is a readlink tool with a different
29554      # purpose than the GNU readlink tool. Check the found readlink.
29555      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29556      if test "x$ISGNU" = x; then
29557        # A readlink that we do not know how to use.
29558        # Are there other non-GNU readlinks out there?
29559        READLINK_TESTED=yes
29560        READLINK=
29561      fi
29562    fi
29563
29564    if test "x$READLINK" != x; then
29565      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29566    else
29567      # Save the current directory for restoring afterwards
29568      STARTDIR=$PWD
29569      COUNTER=0
29570      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29571      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29572      cd $sym_link_dir
29573      # Use -P flag to resolve symlinks in directories.
29574      cd `$THEPWDCMD -P`
29575      sym_link_dir=`$THEPWDCMD -P`
29576      # Resolve file symlinks
29577      while test $COUNTER -lt 20; do
29578        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29579        if test "x$ISLINK" == x; then
29580          # This is not a symbolic link! We are done!
29581          break
29582        fi
29583        # Again resolve directory symlinks since the target of the just found
29584        # link could be in a different directory
29585        cd `$DIRNAME $ISLINK`
29586        sym_link_dir=`$THEPWDCMD -P`
29587        sym_link_file=`$BASENAME $ISLINK`
29588        let COUNTER=COUNTER+1
29589      done
29590      cd $STARTDIR
29591      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29592    fi
29593  fi
29594
29595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29596$as_echo "$PROPER_COMPILER_CC" >&6; }
29597    CC="$PROPER_COMPILER_CC"
29598  else
29599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29600$as_echo "no, keeping CC" >&6; }
29601  fi
29602
29603
29604  COMPILER=$CC
29605  COMPILER_NAME=$COMPILER_NAME
29606
29607  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29608    # cc -V output typically looks like
29609    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29610    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29611    # Check that this is likely to be the Solaris Studio cc.
29612    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29613    if test $? -ne 0; then
29614      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29615      { $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
29616$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29618$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29620$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29621      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29622    fi
29623    # Remove usage instructions (if present), and
29624    # collapse compiler output into a single line
29625    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29626        $SED -e 's/ *[Uu]sage:.*//'`
29627    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29628        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29629  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29630    # xlc -qversion output typically looks like
29631    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29632    #     Version: 11.01.0000.0015
29633    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29634    # Check that this is likely to be the IBM XL C compiler.
29635    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29636    if test $? -ne 0; then
29637      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29638      { $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
29639$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29640      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29641$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29642      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29643$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29644      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29645    fi
29646    # Collapse compiler output into a single line
29647    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29648    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29649        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29650  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29651    # There is no specific version flag, but all output starts with a version string.
29652    # First line typically looks something like:
29653    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29654    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29655    # Check that this is likely to be Microsoft CL.EXE.
29656    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29657    if test $? -ne 0; then
29658      { $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
29659$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29661$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29662      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29663    fi
29664    # Collapse compiler output into a single line
29665    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29666    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29667        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29668  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29669    # gcc --version output typically looks like
29670    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29671    #     Copyright (C) 2013 Free Software Foundation, Inc.
29672    #     This is free software; see the source for copying conditions.  There is NO
29673    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29674    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29675    # Check that this is likely to be GCC.
29676    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29677    if test $? -ne 0; then
29678      { $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
29679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29681$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29682      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29683    fi
29684    # Remove Copyright and legalese from version string, and
29685    # collapse into a single line
29686    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29687        $SED -e 's/ *Copyright .*//'`
29688    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29689        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29690  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29691    # clang --version output typically looks like
29692    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29693    #    clang version 3.3 (tags/RELEASE_33/final)
29694    # or
29695    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29696    #    Target: x86_64-pc-linux-gnu
29697    #    Thread model: posix
29698    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29699    # Check that this is likely to be clang
29700    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29701    if test $? -ne 0; then
29702      { $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
29703$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29704      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29705$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29706      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29707    fi
29708    # Collapse compiler output into a single line
29709    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29710    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29711        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29712  else
29713      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29714  fi
29715  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29716  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29717  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29718  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29719
29720  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29721$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29722
29723
29724  # Now that we have resolved CC ourself, let autoconf have its go at it
29725  ac_ext=c
29726ac_cpp='$CPP $CPPFLAGS'
29727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29729ac_compiler_gnu=$ac_cv_c_compiler_gnu
29730if test -n "$ac_tool_prefix"; then
29731  for ac_prog in $CC
29732  do
29733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29736$as_echo_n "checking for $ac_word... " >&6; }
29737if ${ac_cv_prog_CC+:} false; then :
29738  $as_echo_n "(cached) " >&6
29739else
29740  if test -n "$CC"; then
29741  ac_cv_prog_CC="$CC" # Let the user override the test.
29742else
29743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29744for as_dir in $PATH
29745do
29746  IFS=$as_save_IFS
29747  test -z "$as_dir" && as_dir=.
29748    for ac_exec_ext in '' $ac_executable_extensions; do
29749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29750    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29752    break 2
29753  fi
29754done
29755  done
29756IFS=$as_save_IFS
29757
29758fi
29759fi
29760CC=$ac_cv_prog_CC
29761if test -n "$CC"; then
29762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29763$as_echo "$CC" >&6; }
29764else
29765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29766$as_echo "no" >&6; }
29767fi
29768
29769
29770    test -n "$CC" && break
29771  done
29772fi
29773if test -z "$CC"; then
29774  ac_ct_CC=$CC
29775  for ac_prog in $CC
29776do
29777  # Extract the first word of "$ac_prog", so it can be a program name with args.
29778set dummy $ac_prog; ac_word=$2
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29780$as_echo_n "checking for $ac_word... " >&6; }
29781if ${ac_cv_prog_ac_ct_CC+:} false; then :
29782  $as_echo_n "(cached) " >&6
29783else
29784  if test -n "$ac_ct_CC"; then
29785  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29786else
29787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29788for as_dir in $PATH
29789do
29790  IFS=$as_save_IFS
29791  test -z "$as_dir" && as_dir=.
29792    for ac_exec_ext in '' $ac_executable_extensions; do
29793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29794    ac_cv_prog_ac_ct_CC="$ac_prog"
29795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29796    break 2
29797  fi
29798done
29799  done
29800IFS=$as_save_IFS
29801
29802fi
29803fi
29804ac_ct_CC=$ac_cv_prog_ac_ct_CC
29805if test -n "$ac_ct_CC"; then
29806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29807$as_echo "$ac_ct_CC" >&6; }
29808else
29809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29810$as_echo "no" >&6; }
29811fi
29812
29813
29814  test -n "$ac_ct_CC" && break
29815done
29816
29817  if test "x$ac_ct_CC" = x; then
29818    CC=""
29819  else
29820    case $cross_compiling:$ac_tool_warned in
29821yes:)
29822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29824ac_tool_warned=yes ;;
29825esac
29826    CC=$ac_ct_CC
29827  fi
29828fi
29829
29830
29831test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29833as_fn_error $? "no acceptable C compiler found in \$PATH
29834See \`config.log' for more details" "$LINENO" 5; }
29835
29836# Provide some information about the compiler.
29837$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29838set X $ac_compile
29839ac_compiler=$2
29840for ac_option in --version -v -V -qversion; do
29841  { { ac_try="$ac_compiler $ac_option >&5"
29842case "(($ac_try" in
29843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29844  *) ac_try_echo=$ac_try;;
29845esac
29846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29847$as_echo "$ac_try_echo"; } >&5
29848  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29849  ac_status=$?
29850  if test -s conftest.err; then
29851    sed '10a\
29852... rest of stderr output deleted ...
29853         10q' conftest.err >conftest.er1
29854    cat conftest.er1 >&5
29855  fi
29856  rm -f conftest.er1 conftest.err
29857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29858  test $ac_status = 0; }
29859done
29860
29861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29862/* end confdefs.h.  */
29863
29864int
29865main ()
29866{
29867
29868  ;
29869  return 0;
29870}
29871_ACEOF
29872ac_clean_files_save=$ac_clean_files
29873ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29874# Try to create an executable without -o first, disregard a.out.
29875# It will help us diagnose broken compilers, and finding out an intuition
29876# of exeext.
29877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29878$as_echo_n "checking whether the C compiler works... " >&6; }
29879ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29880
29881# The possible output files:
29882ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29883
29884ac_rmfiles=
29885for ac_file in $ac_files
29886do
29887  case $ac_file in
29888    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29889    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29890  esac
29891done
29892rm -f $ac_rmfiles
29893
29894if { { ac_try="$ac_link_default"
29895case "(($ac_try" in
29896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29897  *) ac_try_echo=$ac_try;;
29898esac
29899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29900$as_echo "$ac_try_echo"; } >&5
29901  (eval "$ac_link_default") 2>&5
29902  ac_status=$?
29903  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29904  test $ac_status = 0; }; then :
29905  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29906# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29907# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29908# so that the user can short-circuit this test for compilers unknown to
29909# Autoconf.
29910for ac_file in $ac_files ''
29911do
29912  test -f "$ac_file" || continue
29913  case $ac_file in
29914    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29915	;;
29916    [ab].out )
29917	# We found the default executable, but exeext='' is most
29918	# certainly right.
29919	break;;
29920    *.* )
29921	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29922	then :; else
29923	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29924	fi
29925	# We set ac_cv_exeext here because the later test for it is not
29926	# safe: cross compilers may not add the suffix if given an `-o'
29927	# argument, so we may need to know it at that point already.
29928	# Even if this section looks crufty: it has the advantage of
29929	# actually working.
29930	break;;
29931    * )
29932	break;;
29933  esac
29934done
29935test "$ac_cv_exeext" = no && ac_cv_exeext=
29936
29937else
29938  ac_file=''
29939fi
29940if test -z "$ac_file"; then :
29941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29942$as_echo "no" >&6; }
29943$as_echo "$as_me: failed program was:" >&5
29944sed 's/^/| /' conftest.$ac_ext >&5
29945
29946{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29948as_fn_error 77 "C compiler cannot create executables
29949See \`config.log' for more details" "$LINENO" 5; }
29950else
29951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29952$as_echo "yes" >&6; }
29953fi
29954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29955$as_echo_n "checking for C compiler default output file name... " >&6; }
29956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29957$as_echo "$ac_file" >&6; }
29958ac_exeext=$ac_cv_exeext
29959
29960rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29961ac_clean_files=$ac_clean_files_save
29962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29963$as_echo_n "checking for suffix of executables... " >&6; }
29964if { { ac_try="$ac_link"
29965case "(($ac_try" in
29966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29967  *) ac_try_echo=$ac_try;;
29968esac
29969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29970$as_echo "$ac_try_echo"; } >&5
29971  (eval "$ac_link") 2>&5
29972  ac_status=$?
29973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29974  test $ac_status = 0; }; then :
29975  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29976# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29977# work properly (i.e., refer to `conftest.exe'), while it won't with
29978# `rm'.
29979for ac_file in conftest.exe conftest conftest.*; do
29980  test -f "$ac_file" || continue
29981  case $ac_file in
29982    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29983    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29984	  break;;
29985    * ) break;;
29986  esac
29987done
29988else
29989  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29992See \`config.log' for more details" "$LINENO" 5; }
29993fi
29994rm -f conftest conftest$ac_cv_exeext
29995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29996$as_echo "$ac_cv_exeext" >&6; }
29997
29998rm -f conftest.$ac_ext
29999EXEEXT=$ac_cv_exeext
30000ac_exeext=$EXEEXT
30001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30002/* end confdefs.h.  */
30003#include <stdio.h>
30004int
30005main ()
30006{
30007FILE *f = fopen ("conftest.out", "w");
30008 return ferror (f) || fclose (f) != 0;
30009
30010  ;
30011  return 0;
30012}
30013_ACEOF
30014ac_clean_files="$ac_clean_files conftest.out"
30015# Check that the compiler produces executables we can run.  If not, either
30016# the compiler is broken, or we cross compile.
30017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30018$as_echo_n "checking whether we are cross compiling... " >&6; }
30019if test "$cross_compiling" != yes; then
30020  { { ac_try="$ac_link"
30021case "(($ac_try" in
30022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30023  *) ac_try_echo=$ac_try;;
30024esac
30025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30026$as_echo "$ac_try_echo"; } >&5
30027  (eval "$ac_link") 2>&5
30028  ac_status=$?
30029  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30030  test $ac_status = 0; }
30031  if { ac_try='./conftest$ac_cv_exeext'
30032  { { case "(($ac_try" in
30033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30034  *) ac_try_echo=$ac_try;;
30035esac
30036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30037$as_echo "$ac_try_echo"; } >&5
30038  (eval "$ac_try") 2>&5
30039  ac_status=$?
30040  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30041  test $ac_status = 0; }; }; then
30042    cross_compiling=no
30043  else
30044    if test "$cross_compiling" = maybe; then
30045	cross_compiling=yes
30046    else
30047	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30049as_fn_error $? "cannot run C compiled programs.
30050If you meant to cross compile, use \`--host'.
30051See \`config.log' for more details" "$LINENO" 5; }
30052    fi
30053  fi
30054fi
30055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30056$as_echo "$cross_compiling" >&6; }
30057
30058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30059ac_clean_files=$ac_clean_files_save
30060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30061$as_echo_n "checking for suffix of object files... " >&6; }
30062if ${ac_cv_objext+:} false; then :
30063  $as_echo_n "(cached) " >&6
30064else
30065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30066/* end confdefs.h.  */
30067
30068int
30069main ()
30070{
30071
30072  ;
30073  return 0;
30074}
30075_ACEOF
30076rm -f conftest.o conftest.obj
30077if { { ac_try="$ac_compile"
30078case "(($ac_try" in
30079  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30080  *) ac_try_echo=$ac_try;;
30081esac
30082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30083$as_echo "$ac_try_echo"; } >&5
30084  (eval "$ac_compile") 2>&5
30085  ac_status=$?
30086  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30087  test $ac_status = 0; }; then :
30088  for ac_file in conftest.o conftest.obj conftest.*; do
30089  test -f "$ac_file" || continue;
30090  case $ac_file in
30091    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30092    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30093       break;;
30094  esac
30095done
30096else
30097  $as_echo "$as_me: failed program was:" >&5
30098sed 's/^/| /' conftest.$ac_ext >&5
30099
30100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30102as_fn_error $? "cannot compute suffix of object files: cannot compile
30103See \`config.log' for more details" "$LINENO" 5; }
30104fi
30105rm -f conftest.$ac_cv_objext conftest.$ac_ext
30106fi
30107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30108$as_echo "$ac_cv_objext" >&6; }
30109OBJEXT=$ac_cv_objext
30110ac_objext=$OBJEXT
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30112$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30113if ${ac_cv_c_compiler_gnu+:} false; then :
30114  $as_echo_n "(cached) " >&6
30115else
30116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30117/* end confdefs.h.  */
30118
30119int
30120main ()
30121{
30122#ifndef __GNUC__
30123       choke me
30124#endif
30125
30126  ;
30127  return 0;
30128}
30129_ACEOF
30130if ac_fn_c_try_compile "$LINENO"; then :
30131  ac_compiler_gnu=yes
30132else
30133  ac_compiler_gnu=no
30134fi
30135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30136ac_cv_c_compiler_gnu=$ac_compiler_gnu
30137
30138fi
30139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30140$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30141if test $ac_compiler_gnu = yes; then
30142  GCC=yes
30143else
30144  GCC=
30145fi
30146ac_test_CFLAGS=${CFLAGS+set}
30147ac_save_CFLAGS=$CFLAGS
30148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30149$as_echo_n "checking whether $CC accepts -g... " >&6; }
30150if ${ac_cv_prog_cc_g+:} false; then :
30151  $as_echo_n "(cached) " >&6
30152else
30153  ac_save_c_werror_flag=$ac_c_werror_flag
30154   ac_c_werror_flag=yes
30155   ac_cv_prog_cc_g=no
30156   CFLAGS="-g"
30157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30158/* end confdefs.h.  */
30159
30160int
30161main ()
30162{
30163
30164  ;
30165  return 0;
30166}
30167_ACEOF
30168if ac_fn_c_try_compile "$LINENO"; then :
30169  ac_cv_prog_cc_g=yes
30170else
30171  CFLAGS=""
30172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30173/* end confdefs.h.  */
30174
30175int
30176main ()
30177{
30178
30179  ;
30180  return 0;
30181}
30182_ACEOF
30183if ac_fn_c_try_compile "$LINENO"; then :
30184
30185else
30186  ac_c_werror_flag=$ac_save_c_werror_flag
30187	 CFLAGS="-g"
30188	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30189/* end confdefs.h.  */
30190
30191int
30192main ()
30193{
30194
30195  ;
30196  return 0;
30197}
30198_ACEOF
30199if ac_fn_c_try_compile "$LINENO"; then :
30200  ac_cv_prog_cc_g=yes
30201fi
30202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30203fi
30204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30205fi
30206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30207   ac_c_werror_flag=$ac_save_c_werror_flag
30208fi
30209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30210$as_echo "$ac_cv_prog_cc_g" >&6; }
30211if test "$ac_test_CFLAGS" = set; then
30212  CFLAGS=$ac_save_CFLAGS
30213elif test $ac_cv_prog_cc_g = yes; then
30214  if test "$GCC" = yes; then
30215    CFLAGS="-g -O2"
30216  else
30217    CFLAGS="-g"
30218  fi
30219else
30220  if test "$GCC" = yes; then
30221    CFLAGS="-O2"
30222  else
30223    CFLAGS=
30224  fi
30225fi
30226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30227$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30228if ${ac_cv_prog_cc_c89+:} false; then :
30229  $as_echo_n "(cached) " >&6
30230else
30231  ac_cv_prog_cc_c89=no
30232ac_save_CC=$CC
30233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30234/* end confdefs.h.  */
30235#include <stdarg.h>
30236#include <stdio.h>
30237struct stat;
30238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30239struct buf { int x; };
30240FILE * (*rcsopen) (struct buf *, struct stat *, int);
30241static char *e (p, i)
30242     char **p;
30243     int i;
30244{
30245  return p[i];
30246}
30247static char *f (char * (*g) (char **, int), char **p, ...)
30248{
30249  char *s;
30250  va_list v;
30251  va_start (v,p);
30252  s = g (p, va_arg (v,int));
30253  va_end (v);
30254  return s;
30255}
30256
30257/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30258   function prototypes and stuff, but not '\xHH' hex character constants.
30259   These don't provoke an error unfortunately, instead are silently treated
30260   as 'x'.  The following induces an error, until -std is added to get
30261   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30262   array size at least.  It's necessary to write '\x00'==0 to get something
30263   that's true only with -std.  */
30264int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30265
30266/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30267   inside strings and character constants.  */
30268#define FOO(x) 'x'
30269int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30270
30271int test (int i, double x);
30272struct s1 {int (*f) (int a);};
30273struct s2 {int (*f) (double a);};
30274int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30275int argc;
30276char **argv;
30277int
30278main ()
30279{
30280return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30281  ;
30282  return 0;
30283}
30284_ACEOF
30285for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30286	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30287do
30288  CC="$ac_save_CC $ac_arg"
30289  if ac_fn_c_try_compile "$LINENO"; then :
30290  ac_cv_prog_cc_c89=$ac_arg
30291fi
30292rm -f core conftest.err conftest.$ac_objext
30293  test "x$ac_cv_prog_cc_c89" != "xno" && break
30294done
30295rm -f conftest.$ac_ext
30296CC=$ac_save_CC
30297
30298fi
30299# AC_CACHE_VAL
30300case "x$ac_cv_prog_cc_c89" in
30301  x)
30302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30303$as_echo "none needed" >&6; } ;;
30304  xno)
30305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30306$as_echo "unsupported" >&6; } ;;
30307  *)
30308    CC="$CC $ac_cv_prog_cc_c89"
30309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30310$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30311esac
30312if test "x$ac_cv_prog_cc_c89" != xno; then :
30313
30314fi
30315
30316ac_ext=cpp
30317ac_cpp='$CXXCPP $CPPFLAGS'
30318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30321
30322
30323
30324  COMPILER_NAME=C++
30325  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30326
30327  if test "x$CXX" != x; then
30328    # User has supplied compiler name already, always let that override.
30329    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30330$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30331    if test "x`basename $CXX`" = "x$CXX"; then
30332      # A command without a complete path is provided, search $PATH.
30333
30334      for ac_prog in $CXX
30335do
30336  # Extract the first word of "$ac_prog", so it can be a program name with args.
30337set dummy $ac_prog; ac_word=$2
30338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30339$as_echo_n "checking for $ac_word... " >&6; }
30340if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30341  $as_echo_n "(cached) " >&6
30342else
30343  case $POTENTIAL_CXX in
30344  [\\/]* | ?:[\\/]*)
30345  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30346  ;;
30347  *)
30348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30349for as_dir in $PATH
30350do
30351  IFS=$as_save_IFS
30352  test -z "$as_dir" && as_dir=.
30353    for ac_exec_ext in '' $ac_executable_extensions; do
30354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30355    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30357    break 2
30358  fi
30359done
30360  done
30361IFS=$as_save_IFS
30362
30363  ;;
30364esac
30365fi
30366POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30367if test -n "$POTENTIAL_CXX"; then
30368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30369$as_echo "$POTENTIAL_CXX" >&6; }
30370else
30371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30372$as_echo "no" >&6; }
30373fi
30374
30375
30376  test -n "$POTENTIAL_CXX" && break
30377done
30378
30379      if test "x$POTENTIAL_CXX" != x; then
30380        CXX=$POTENTIAL_CXX
30381      else
30382        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30383      fi
30384    else
30385      # Otherwise it might already be a complete path
30386      if test ! -x "$CXX"; then
30387        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30388      fi
30389    fi
30390  else
30391    # No user supplied value. Locate compiler ourselves.
30392
30393    # If we are cross compiling, assume cross compilation tools follows the
30394    # cross compilation standard where they are prefixed with the autoconf
30395    # standard name for the target. For example the binary
30396    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30397    # If we are not cross compiling, then the default compiler name will be
30398    # used.
30399
30400    CXX=
30401    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30402    # before checking the rest of the PATH.
30403    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30404    # step, this should not be necessary.
30405    if test -n "$TOOLCHAIN_PATH"; then
30406      PATH_save="$PATH"
30407      PATH="$TOOLCHAIN_PATH"
30408      for ac_prog in $SEARCH_LIST
30409do
30410  # Extract the first word of "$ac_prog", so it can be a program name with args.
30411set dummy $ac_prog; ac_word=$2
30412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30413$as_echo_n "checking for $ac_word... " >&6; }
30414if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30415  $as_echo_n "(cached) " >&6
30416else
30417  case $TOOLCHAIN_PATH_CXX in
30418  [\\/]* | ?:[\\/]*)
30419  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30420  ;;
30421  *)
30422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30423for as_dir in $PATH
30424do
30425  IFS=$as_save_IFS
30426  test -z "$as_dir" && as_dir=.
30427    for ac_exec_ext in '' $ac_executable_extensions; do
30428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30429    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30431    break 2
30432  fi
30433done
30434  done
30435IFS=$as_save_IFS
30436
30437  ;;
30438esac
30439fi
30440TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30441if test -n "$TOOLCHAIN_PATH_CXX"; then
30442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30443$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30444else
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30446$as_echo "no" >&6; }
30447fi
30448
30449
30450  test -n "$TOOLCHAIN_PATH_CXX" && break
30451done
30452
30453      CXX=$TOOLCHAIN_PATH_CXX
30454      PATH="$PATH_save"
30455    fi
30456
30457    # AC_PATH_PROGS can't be run multiple times with the same variable,
30458    # so create a new name for this run.
30459    if test "x$CXX" = x; then
30460      for ac_prog in $SEARCH_LIST
30461do
30462  # Extract the first word of "$ac_prog", so it can be a program name with args.
30463set dummy $ac_prog; ac_word=$2
30464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30465$as_echo_n "checking for $ac_word... " >&6; }
30466if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30467  $as_echo_n "(cached) " >&6
30468else
30469  case $POTENTIAL_CXX in
30470  [\\/]* | ?:[\\/]*)
30471  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30472  ;;
30473  *)
30474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30475for as_dir in $PATH
30476do
30477  IFS=$as_save_IFS
30478  test -z "$as_dir" && as_dir=.
30479    for ac_exec_ext in '' $ac_executable_extensions; do
30480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30481    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30483    break 2
30484  fi
30485done
30486  done
30487IFS=$as_save_IFS
30488
30489  ;;
30490esac
30491fi
30492POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30493if test -n "$POTENTIAL_CXX"; then
30494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30495$as_echo "$POTENTIAL_CXX" >&6; }
30496else
30497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30498$as_echo "no" >&6; }
30499fi
30500
30501
30502  test -n "$POTENTIAL_CXX" && break
30503done
30504
30505      CXX=$POTENTIAL_CXX
30506    fi
30507
30508    if test "x$CXX" = x; then
30509
30510  # Print a helpful message on how to acquire the necessary build dependency.
30511  # devkit is the help tag: freetype, cups, pulse, alsa etc
30512  MISSING_DEPENDENCY=devkit
30513
30514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30515    cygwin_help $MISSING_DEPENDENCY
30516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30517    msys_help $MISSING_DEPENDENCY
30518  else
30519    PKGHANDLER_COMMAND=
30520
30521    case $PKGHANDLER in
30522      apt-get)
30523        apt_help     $MISSING_DEPENDENCY ;;
30524      yum)
30525        yum_help     $MISSING_DEPENDENCY ;;
30526      port)
30527        port_help    $MISSING_DEPENDENCY ;;
30528      pkgutil)
30529        pkgutil_help $MISSING_DEPENDENCY ;;
30530      pkgadd)
30531        pkgadd_help  $MISSING_DEPENDENCY ;;
30532    esac
30533
30534    if test "x$PKGHANDLER_COMMAND" != x; then
30535      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30536    fi
30537  fi
30538
30539      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30540    fi
30541  fi
30542
30543  # Now we have a compiler binary in CXX. Make sure it's okay.
30544
30545  # Only process if variable expands to non-empty
30546
30547  if test "x$CXX" != x; then
30548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30549
30550  # First separate the path from the arguments. This will split at the first
30551  # space.
30552  complete="$CXX"
30553  path="${complete%% *}"
30554  tmp="$complete EOL"
30555  arguments="${tmp#* }"
30556
30557  # Input might be given as Windows format, start by converting to
30558  # unix format.
30559  new_path=`$CYGPATH -u "$path"`
30560
30561  # Now try to locate executable using which
30562  new_path=`$WHICH "$new_path" 2> /dev/null`
30563  # bat and cmd files are not always considered executable in cygwin causing which
30564  # to not find them
30565  if test "x$new_path" = x \
30566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30568    new_path=`$CYGPATH -u "$path"`
30569  fi
30570  if test "x$new_path" = x; then
30571    # Oops. Which didn't find the executable.
30572    # The splitting of arguments from the executable at a space might have been incorrect,
30573    # since paths with space are more likely in Windows. Give it another try with the whole
30574    # argument.
30575    path="$complete"
30576    arguments="EOL"
30577    new_path=`$CYGPATH -u "$path"`
30578    new_path=`$WHICH "$new_path" 2> /dev/null`
30579    # bat and cmd files are not always considered executable in cygwin causing which
30580    # to not find them
30581    if test "x$new_path" = x \
30582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30584      new_path=`$CYGPATH -u "$path"`
30585    fi
30586    if test "x$new_path" = x; then
30587      # It's still not found. Now this is an unrecoverable error.
30588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30589$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30590      has_space=`$ECHO "$complete" | $GREP " "`
30591      if test "x$has_space" != x; then
30592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30594      fi
30595      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30596    fi
30597  fi
30598
30599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30602  # "foo.exe" is OK but "foo" is an error.
30603  #
30604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30605  # It is also a way to make sure we got the proper file name for the real test later on.
30606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30607  if test "x$test_shortpath" = x; then
30608    # Short path failed, file does not exist as specified.
30609    # Try adding .exe or .cmd
30610    if test -f "${new_path}.exe"; then
30611      input_to_shortpath="${new_path}.exe"
30612    elif test -f "${new_path}.cmd"; then
30613      input_to_shortpath="${new_path}.cmd"
30614    else
30615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30616$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30619      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30620    fi
30621  else
30622    input_to_shortpath="$new_path"
30623  fi
30624
30625  # Call helper function which possibly converts this using DOS-style short mode.
30626  # If so, the updated path is stored in $new_path.
30627  new_path="$input_to_shortpath"
30628
30629  input_path="$input_to_shortpath"
30630  # Check if we need to convert this using DOS-style short mode. If the path
30631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30632  # take no chances and rewrite it.
30633  # Note: m4 eats our [], so we need to use [ and ] instead.
30634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30635  if test "x$has_forbidden_chars" != x; then
30636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30640      # Going to short mode and back again did indeed matter. Since short mode is
30641      # case insensitive, let's make it lowercase to improve readability.
30642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30643      # Now convert it back to Unix-style (cygpath)
30644      input_path=`$CYGPATH -u "$shortmode_path"`
30645      new_path="$input_path"
30646    fi
30647  fi
30648
30649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30650  if test "x$test_cygdrive_prefix" = x; then
30651    # As a simple fix, exclude /usr/bin since it's not a real path.
30652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30654      # a path prefixed by /cygdrive for fixpath to work.
30655      new_path="$CYGWIN_ROOT_PATH$input_path"
30656    fi
30657  fi
30658
30659  # remove trailing .exe if any
30660  new_path="${new_path/%.exe/}"
30661
30662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663
30664  # First separate the path from the arguments. This will split at the first
30665  # space.
30666  complete="$CXX"
30667  path="${complete%% *}"
30668  tmp="$complete EOL"
30669  arguments="${tmp#* }"
30670
30671  # Input might be given as Windows format, start by converting to
30672  # unix format.
30673  new_path="$path"
30674
30675  windows_path="$new_path"
30676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30677    unix_path=`$CYGPATH -u "$windows_path"`
30678    new_path="$unix_path"
30679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30681    new_path="$unix_path"
30682  fi
30683
30684
30685  # Now try to locate executable using which
30686  new_path=`$WHICH "$new_path" 2> /dev/null`
30687
30688  if test "x$new_path" = x; then
30689    # Oops. Which didn't find the executable.
30690    # The splitting of arguments from the executable at a space might have been incorrect,
30691    # since paths with space are more likely in Windows. Give it another try with the whole
30692    # argument.
30693    path="$complete"
30694    arguments="EOL"
30695    new_path="$path"
30696
30697  windows_path="$new_path"
30698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30699    unix_path=`$CYGPATH -u "$windows_path"`
30700    new_path="$unix_path"
30701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30703    new_path="$unix_path"
30704  fi
30705
30706
30707    new_path=`$WHICH "$new_path" 2> /dev/null`
30708    # bat and cmd files are not always considered executable in MSYS causing which
30709    # to not find them
30710    if test "x$new_path" = x \
30711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30713      new_path="$path"
30714
30715  windows_path="$new_path"
30716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30717    unix_path=`$CYGPATH -u "$windows_path"`
30718    new_path="$unix_path"
30719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30721    new_path="$unix_path"
30722  fi
30723
30724    fi
30725
30726    if test "x$new_path" = x; then
30727      # It's still not found. Now this is an unrecoverable error.
30728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30729$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30730      has_space=`$ECHO "$complete" | $GREP " "`
30731      if test "x$has_space" != x; then
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30734      fi
30735      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30736    fi
30737  fi
30738
30739  # Now new_path has a complete unix path to the binary
30740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30741    # Keep paths in /bin as-is, but remove trailing .exe if any
30742    new_path="${new_path/%.exe/}"
30743    # Do not save /bin paths to all_fixpath_prefixes!
30744  else
30745    # Not in mixed or Windows style, start by that.
30746    new_path=`cmd //c echo $new_path`
30747
30748  input_path="$new_path"
30749  # Check if we need to convert this using DOS-style short mode. If the path
30750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30751  # take no chances and rewrite it.
30752  # Note: m4 eats our [], so we need to use [ and ] instead.
30753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30754  if test "x$has_forbidden_chars" != x; then
30755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30757  fi
30758
30759    # Output is in $new_path
30760
30761  windows_path="$new_path"
30762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30763    unix_path=`$CYGPATH -u "$windows_path"`
30764    new_path="$unix_path"
30765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30767    new_path="$unix_path"
30768  fi
30769
30770    # remove trailing .exe if any
30771    new_path="${new_path/%.exe/}"
30772
30773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30775  fi
30776
30777    else
30778      # We're on a unix platform. Hooray! :)
30779      # First separate the path from the arguments. This will split at the first
30780      # space.
30781      complete="$CXX"
30782      path="${complete%% *}"
30783      tmp="$complete EOL"
30784      arguments="${tmp#* }"
30785
30786      # Cannot rely on the command "which" here since it doesn't always work.
30787      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30788      if test -z "$is_absolute_path"; then
30789        # Path to executable is not absolute. Find it.
30790        IFS_save="$IFS"
30791        IFS=:
30792        for p in $PATH; do
30793          if test -f "$p/$path" && test -x "$p/$path"; then
30794            new_path="$p/$path"
30795            break
30796          fi
30797        done
30798        IFS="$IFS_save"
30799      else
30800        # This is an absolute path, we can use it without further modifications.
30801        new_path="$path"
30802      fi
30803
30804      if test "x$new_path" = x; then
30805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30806$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30807        has_space=`$ECHO "$complete" | $GREP " "`
30808        if test "x$has_space" != x; then
30809          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30811        fi
30812        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30813      fi
30814    fi
30815
30816    # Now join together the path and the arguments once again
30817    if test "x$arguments" != xEOL; then
30818      new_complete="$new_path ${arguments% *}"
30819    else
30820      new_complete="$new_path"
30821    fi
30822
30823    if test "x$complete" != "x$new_complete"; then
30824      CXX="$new_complete"
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30826$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30827    fi
30828  fi
30829
30830  TEST_COMPILER="$CXX"
30831  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30832  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30833  if test "x$OPENJDK_BUILD_OS" != xaix; then
30834    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30836$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30837
30838  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30839    # Follow a chain of symbolic links. Use readlink
30840    # where it exists, else fall back to horribly
30841    # complicated shell code.
30842    if test "x$READLINK_TESTED" != yes; then
30843      # On MacOSX there is a readlink tool with a different
30844      # purpose than the GNU readlink tool. Check the found readlink.
30845      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30846      if test "x$ISGNU" = x; then
30847        # A readlink that we do not know how to use.
30848        # Are there other non-GNU readlinks out there?
30849        READLINK_TESTED=yes
30850        READLINK=
30851      fi
30852    fi
30853
30854    if test "x$READLINK" != x; then
30855      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30856    else
30857      # Save the current directory for restoring afterwards
30858      STARTDIR=$PWD
30859      COUNTER=0
30860      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30861      sym_link_file=`$BASENAME $TEST_COMPILER`
30862      cd $sym_link_dir
30863      # Use -P flag to resolve symlinks in directories.
30864      cd `$THEPWDCMD -P`
30865      sym_link_dir=`$THEPWDCMD -P`
30866      # Resolve file symlinks
30867      while test $COUNTER -lt 20; do
30868        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30869        if test "x$ISLINK" == x; then
30870          # This is not a symbolic link! We are done!
30871          break
30872        fi
30873        # Again resolve directory symlinks since the target of the just found
30874        # link could be in a different directory
30875        cd `$DIRNAME $ISLINK`
30876        sym_link_dir=`$THEPWDCMD -P`
30877        sym_link_file=`$BASENAME $ISLINK`
30878        let COUNTER=COUNTER+1
30879      done
30880      cd $STARTDIR
30881      TEST_COMPILER=$sym_link_dir/$sym_link_file
30882    fi
30883  fi
30884
30885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30886$as_echo "$TEST_COMPILER" >&6; }
30887  fi
30888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30889$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30890
30891  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30892  if test "x$COMPILER_BASENAME" = "xccache"; then
30893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30894$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30895    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30896    # We want to control ccache invocation ourselves, so ignore this cc and try
30897    # searching again.
30898
30899    # Remove the path to the fake ccache cc from the PATH
30900    RETRY_COMPILER_SAVED_PATH="$PATH"
30901    COMPILER_DIRNAME=`$DIRNAME $CXX`
30902    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30903
30904    # Try again looking for our compiler
30905    if test -n "$ac_tool_prefix"; then
30906  for ac_prog in $TOOLCHAIN_CXX_BINARY
30907  do
30908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30911$as_echo_n "checking for $ac_word... " >&6; }
30912if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30913  $as_echo_n "(cached) " >&6
30914else
30915  if test -n "$PROPER_COMPILER_CXX"; then
30916  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30917else
30918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30919for as_dir in $PATH
30920do
30921  IFS=$as_save_IFS
30922  test -z "$as_dir" && as_dir=.
30923    for ac_exec_ext in '' $ac_executable_extensions; do
30924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30925    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30927    break 2
30928  fi
30929done
30930  done
30931IFS=$as_save_IFS
30932
30933fi
30934fi
30935PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30936if test -n "$PROPER_COMPILER_CXX"; then
30937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30938$as_echo "$PROPER_COMPILER_CXX" >&6; }
30939else
30940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30941$as_echo "no" >&6; }
30942fi
30943
30944
30945    test -n "$PROPER_COMPILER_CXX" && break
30946  done
30947fi
30948if test -z "$PROPER_COMPILER_CXX"; then
30949  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30950  for ac_prog in $TOOLCHAIN_CXX_BINARY
30951do
30952  # Extract the first word of "$ac_prog", so it can be a program name with args.
30953set dummy $ac_prog; ac_word=$2
30954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30955$as_echo_n "checking for $ac_word... " >&6; }
30956if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30957  $as_echo_n "(cached) " >&6
30958else
30959  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30960  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30961else
30962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30963for as_dir in $PATH
30964do
30965  IFS=$as_save_IFS
30966  test -z "$as_dir" && as_dir=.
30967    for ac_exec_ext in '' $ac_executable_extensions; do
30968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30969    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30971    break 2
30972  fi
30973done
30974  done
30975IFS=$as_save_IFS
30976
30977fi
30978fi
30979ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30980if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30982$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30983else
30984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30985$as_echo "no" >&6; }
30986fi
30987
30988
30989  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30990done
30991
30992  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30993    PROPER_COMPILER_CXX=""
30994  else
30995    case $cross_compiling:$ac_tool_warned in
30996yes:)
30997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30999ac_tool_warned=yes ;;
31000esac
31001    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31002  fi
31003fi
31004
31005
31006  # Only process if variable expands to non-empty
31007
31008  if test "x$PROPER_COMPILER_CXX" != x; then
31009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31010
31011  # First separate the path from the arguments. This will split at the first
31012  # space.
31013  complete="$PROPER_COMPILER_CXX"
31014  path="${complete%% *}"
31015  tmp="$complete EOL"
31016  arguments="${tmp#* }"
31017
31018  # Input might be given as Windows format, start by converting to
31019  # unix format.
31020  new_path=`$CYGPATH -u "$path"`
31021
31022  # Now try to locate executable using which
31023  new_path=`$WHICH "$new_path" 2> /dev/null`
31024  # bat and cmd files are not always considered executable in cygwin causing which
31025  # to not find them
31026  if test "x$new_path" = x \
31027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31029    new_path=`$CYGPATH -u "$path"`
31030  fi
31031  if test "x$new_path" = x; then
31032    # Oops. Which didn't find the executable.
31033    # The splitting of arguments from the executable at a space might have been incorrect,
31034    # since paths with space are more likely in Windows. Give it another try with the whole
31035    # argument.
31036    path="$complete"
31037    arguments="EOL"
31038    new_path=`$CYGPATH -u "$path"`
31039    new_path=`$WHICH "$new_path" 2> /dev/null`
31040    # bat and cmd files are not always considered executable in cygwin causing which
31041    # to not find them
31042    if test "x$new_path" = x \
31043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31045      new_path=`$CYGPATH -u "$path"`
31046    fi
31047    if test "x$new_path" = x; then
31048      # It's still not found. Now this is an unrecoverable error.
31049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31050$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31051      has_space=`$ECHO "$complete" | $GREP " "`
31052      if test "x$has_space" != x; then
31053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31055      fi
31056      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31057    fi
31058  fi
31059
31060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31063  # "foo.exe" is OK but "foo" is an error.
31064  #
31065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31066  # It is also a way to make sure we got the proper file name for the real test later on.
31067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31068  if test "x$test_shortpath" = x; then
31069    # Short path failed, file does not exist as specified.
31070    # Try adding .exe or .cmd
31071    if test -f "${new_path}.exe"; then
31072      input_to_shortpath="${new_path}.exe"
31073    elif test -f "${new_path}.cmd"; then
31074      input_to_shortpath="${new_path}.cmd"
31075    else
31076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31077$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31080      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31081    fi
31082  else
31083    input_to_shortpath="$new_path"
31084  fi
31085
31086  # Call helper function which possibly converts this using DOS-style short mode.
31087  # If so, the updated path is stored in $new_path.
31088  new_path="$input_to_shortpath"
31089
31090  input_path="$input_to_shortpath"
31091  # Check if we need to convert this using DOS-style short mode. If the path
31092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31093  # take no chances and rewrite it.
31094  # Note: m4 eats our [], so we need to use [ and ] instead.
31095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31096  if test "x$has_forbidden_chars" != x; then
31097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31101      # Going to short mode and back again did indeed matter. Since short mode is
31102      # case insensitive, let's make it lowercase to improve readability.
31103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31104      # Now convert it back to Unix-style (cygpath)
31105      input_path=`$CYGPATH -u "$shortmode_path"`
31106      new_path="$input_path"
31107    fi
31108  fi
31109
31110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31111  if test "x$test_cygdrive_prefix" = x; then
31112    # As a simple fix, exclude /usr/bin since it's not a real path.
31113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31115      # a path prefixed by /cygdrive for fixpath to work.
31116      new_path="$CYGWIN_ROOT_PATH$input_path"
31117    fi
31118  fi
31119
31120  # remove trailing .exe if any
31121  new_path="${new_path/%.exe/}"
31122
31123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124
31125  # First separate the path from the arguments. This will split at the first
31126  # space.
31127  complete="$PROPER_COMPILER_CXX"
31128  path="${complete%% *}"
31129  tmp="$complete EOL"
31130  arguments="${tmp#* }"
31131
31132  # Input might be given as Windows format, start by converting to
31133  # unix format.
31134  new_path="$path"
31135
31136  windows_path="$new_path"
31137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31138    unix_path=`$CYGPATH -u "$windows_path"`
31139    new_path="$unix_path"
31140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31142    new_path="$unix_path"
31143  fi
31144
31145
31146  # Now try to locate executable using which
31147  new_path=`$WHICH "$new_path" 2> /dev/null`
31148
31149  if test "x$new_path" = x; then
31150    # Oops. Which didn't find the executable.
31151    # The splitting of arguments from the executable at a space might have been incorrect,
31152    # since paths with space are more likely in Windows. Give it another try with the whole
31153    # argument.
31154    path="$complete"
31155    arguments="EOL"
31156    new_path="$path"
31157
31158  windows_path="$new_path"
31159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31160    unix_path=`$CYGPATH -u "$windows_path"`
31161    new_path="$unix_path"
31162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31164    new_path="$unix_path"
31165  fi
31166
31167
31168    new_path=`$WHICH "$new_path" 2> /dev/null`
31169    # bat and cmd files are not always considered executable in MSYS causing which
31170    # to not find them
31171    if test "x$new_path" = x \
31172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31174      new_path="$path"
31175
31176  windows_path="$new_path"
31177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31178    unix_path=`$CYGPATH -u "$windows_path"`
31179    new_path="$unix_path"
31180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31182    new_path="$unix_path"
31183  fi
31184
31185    fi
31186
31187    if test "x$new_path" = x; then
31188      # It's still not found. Now this is an unrecoverable error.
31189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31190$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31191      has_space=`$ECHO "$complete" | $GREP " "`
31192      if test "x$has_space" != x; then
31193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31195      fi
31196      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31197    fi
31198  fi
31199
31200  # Now new_path has a complete unix path to the binary
31201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31202    # Keep paths in /bin as-is, but remove trailing .exe if any
31203    new_path="${new_path/%.exe/}"
31204    # Do not save /bin paths to all_fixpath_prefixes!
31205  else
31206    # Not in mixed or Windows style, start by that.
31207    new_path=`cmd //c echo $new_path`
31208
31209  input_path="$new_path"
31210  # Check if we need to convert this using DOS-style short mode. If the path
31211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31212  # take no chances and rewrite it.
31213  # Note: m4 eats our [], so we need to use [ and ] instead.
31214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31215  if test "x$has_forbidden_chars" != x; then
31216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31218  fi
31219
31220    # Output is in $new_path
31221
31222  windows_path="$new_path"
31223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31224    unix_path=`$CYGPATH -u "$windows_path"`
31225    new_path="$unix_path"
31226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31228    new_path="$unix_path"
31229  fi
31230
31231    # remove trailing .exe if any
31232    new_path="${new_path/%.exe/}"
31233
31234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31236  fi
31237
31238    else
31239      # We're on a unix platform. Hooray! :)
31240      # First separate the path from the arguments. This will split at the first
31241      # space.
31242      complete="$PROPER_COMPILER_CXX"
31243      path="${complete%% *}"
31244      tmp="$complete EOL"
31245      arguments="${tmp#* }"
31246
31247      # Cannot rely on the command "which" here since it doesn't always work.
31248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31249      if test -z "$is_absolute_path"; then
31250        # Path to executable is not absolute. Find it.
31251        IFS_save="$IFS"
31252        IFS=:
31253        for p in $PATH; do
31254          if test -f "$p/$path" && test -x "$p/$path"; then
31255            new_path="$p/$path"
31256            break
31257          fi
31258        done
31259        IFS="$IFS_save"
31260      else
31261        # This is an absolute path, we can use it without further modifications.
31262        new_path="$path"
31263      fi
31264
31265      if test "x$new_path" = x; then
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31267$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31268        has_space=`$ECHO "$complete" | $GREP " "`
31269        if test "x$has_space" != x; then
31270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31272        fi
31273        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31274      fi
31275    fi
31276
31277    # Now join together the path and the arguments once again
31278    if test "x$arguments" != xEOL; then
31279      new_complete="$new_path ${arguments% *}"
31280    else
31281      new_complete="$new_path"
31282    fi
31283
31284    if test "x$complete" != "x$new_complete"; then
31285      PROPER_COMPILER_CXX="$new_complete"
31286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31287$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31288    fi
31289  fi
31290
31291    PATH="$RETRY_COMPILER_SAVED_PATH"
31292
31293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31294$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31295
31296  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31297    # Follow a chain of symbolic links. Use readlink
31298    # where it exists, else fall back to horribly
31299    # complicated shell code.
31300    if test "x$READLINK_TESTED" != yes; then
31301      # On MacOSX there is a readlink tool with a different
31302      # purpose than the GNU readlink tool. Check the found readlink.
31303      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31304      if test "x$ISGNU" = x; then
31305        # A readlink that we do not know how to use.
31306        # Are there other non-GNU readlinks out there?
31307        READLINK_TESTED=yes
31308        READLINK=
31309      fi
31310    fi
31311
31312    if test "x$READLINK" != x; then
31313      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31314    else
31315      # Save the current directory for restoring afterwards
31316      STARTDIR=$PWD
31317      COUNTER=0
31318      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31319      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31320      cd $sym_link_dir
31321      # Use -P flag to resolve symlinks in directories.
31322      cd `$THEPWDCMD -P`
31323      sym_link_dir=`$THEPWDCMD -P`
31324      # Resolve file symlinks
31325      while test $COUNTER -lt 20; do
31326        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31327        if test "x$ISLINK" == x; then
31328          # This is not a symbolic link! We are done!
31329          break
31330        fi
31331        # Again resolve directory symlinks since the target of the just found
31332        # link could be in a different directory
31333        cd `$DIRNAME $ISLINK`
31334        sym_link_dir=`$THEPWDCMD -P`
31335        sym_link_file=`$BASENAME $ISLINK`
31336        let COUNTER=COUNTER+1
31337      done
31338      cd $STARTDIR
31339      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31340    fi
31341  fi
31342
31343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31344$as_echo "$PROPER_COMPILER_CXX" >&6; }
31345    CXX="$PROPER_COMPILER_CXX"
31346  else
31347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31348$as_echo "no, keeping CXX" >&6; }
31349  fi
31350
31351
31352  COMPILER=$CXX
31353  COMPILER_NAME=$COMPILER_NAME
31354
31355  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31356    # cc -V output typically looks like
31357    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31358    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31359    # Check that this is likely to be the Solaris Studio cc.
31360    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31361    if test $? -ne 0; then
31362      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31363      { $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
31364$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31365      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31366$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31367      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31368$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31369      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31370    fi
31371    # Remove usage instructions (if present), and
31372    # collapse compiler output into a single line
31373    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31374        $SED -e 's/ *[Uu]sage:.*//'`
31375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31376        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31377  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31378    # xlc -qversion output typically looks like
31379    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31380    #     Version: 11.01.0000.0015
31381    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31382    # Check that this is likely to be the IBM XL C compiler.
31383    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31384    if test $? -ne 0; then
31385      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31386      { $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
31387$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31388      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31389$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31391$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31392      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31393    fi
31394    # Collapse compiler output into a single line
31395    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31396    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31397        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31398  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31399    # There is no specific version flag, but all output starts with a version string.
31400    # First line typically looks something like:
31401    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31402    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31403    # Check that this is likely to be Microsoft CL.EXE.
31404    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31405    if test $? -ne 0; then
31406      { $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
31407$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31408      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31409$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31410      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31411    fi
31412    # Collapse compiler output into a single line
31413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31414    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31415        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31416  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31417    # gcc --version output typically looks like
31418    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31419    #     Copyright (C) 2013 Free Software Foundation, Inc.
31420    #     This is free software; see the source for copying conditions.  There is NO
31421    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31422    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31423    # Check that this is likely to be GCC.
31424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31425    if test $? -ne 0; then
31426      { $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
31427$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31428      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31429$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31430      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31431    fi
31432    # Remove Copyright and legalese from version string, and
31433    # collapse into a single line
31434    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31435        $SED -e 's/ *Copyright .*//'`
31436    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31437        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31438  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31439    # clang --version output typically looks like
31440    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31441    #    clang version 3.3 (tags/RELEASE_33/final)
31442    # or
31443    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31444    #    Target: x86_64-pc-linux-gnu
31445    #    Thread model: posix
31446    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31447    # Check that this is likely to be clang
31448    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31449    if test $? -ne 0; then
31450      { $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
31451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31453$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31454      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31455    fi
31456    # Collapse compiler output into a single line
31457    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31458    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31459        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31460  else
31461      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31462  fi
31463  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31464  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31465  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31466  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31467
31468  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31469$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31470
31471
31472  # Now that we have resolved CXX ourself, let autoconf have its go at it
31473  ac_ext=cpp
31474ac_cpp='$CXXCPP $CPPFLAGS'
31475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31478if test -z "$CXX"; then
31479  if test -n "$CCC"; then
31480    CXX=$CCC
31481  else
31482    if test -n "$ac_tool_prefix"; then
31483  for ac_prog in $CXX
31484  do
31485    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31486set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31488$as_echo_n "checking for $ac_word... " >&6; }
31489if ${ac_cv_prog_CXX+:} false; then :
31490  $as_echo_n "(cached) " >&6
31491else
31492  if test -n "$CXX"; then
31493  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31494else
31495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31496for as_dir in $PATH
31497do
31498  IFS=$as_save_IFS
31499  test -z "$as_dir" && as_dir=.
31500    for ac_exec_ext in '' $ac_executable_extensions; do
31501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31502    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31504    break 2
31505  fi
31506done
31507  done
31508IFS=$as_save_IFS
31509
31510fi
31511fi
31512CXX=$ac_cv_prog_CXX
31513if test -n "$CXX"; then
31514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31515$as_echo "$CXX" >&6; }
31516else
31517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31518$as_echo "no" >&6; }
31519fi
31520
31521
31522    test -n "$CXX" && break
31523  done
31524fi
31525if test -z "$CXX"; then
31526  ac_ct_CXX=$CXX
31527  for ac_prog in $CXX
31528do
31529  # Extract the first word of "$ac_prog", so it can be a program name with args.
31530set dummy $ac_prog; ac_word=$2
31531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31532$as_echo_n "checking for $ac_word... " >&6; }
31533if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31534  $as_echo_n "(cached) " >&6
31535else
31536  if test -n "$ac_ct_CXX"; then
31537  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31538else
31539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31540for as_dir in $PATH
31541do
31542  IFS=$as_save_IFS
31543  test -z "$as_dir" && as_dir=.
31544    for ac_exec_ext in '' $ac_executable_extensions; do
31545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31546    ac_cv_prog_ac_ct_CXX="$ac_prog"
31547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31548    break 2
31549  fi
31550done
31551  done
31552IFS=$as_save_IFS
31553
31554fi
31555fi
31556ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31557if test -n "$ac_ct_CXX"; then
31558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31559$as_echo "$ac_ct_CXX" >&6; }
31560else
31561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31562$as_echo "no" >&6; }
31563fi
31564
31565
31566  test -n "$ac_ct_CXX" && break
31567done
31568
31569  if test "x$ac_ct_CXX" = x; then
31570    CXX="g++"
31571  else
31572    case $cross_compiling:$ac_tool_warned in
31573yes:)
31574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31576ac_tool_warned=yes ;;
31577esac
31578    CXX=$ac_ct_CXX
31579  fi
31580fi
31581
31582  fi
31583fi
31584# Provide some information about the compiler.
31585$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31586set X $ac_compile
31587ac_compiler=$2
31588for ac_option in --version -v -V -qversion; do
31589  { { ac_try="$ac_compiler $ac_option >&5"
31590case "(($ac_try" in
31591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31592  *) ac_try_echo=$ac_try;;
31593esac
31594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31595$as_echo "$ac_try_echo"; } >&5
31596  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31597  ac_status=$?
31598  if test -s conftest.err; then
31599    sed '10a\
31600... rest of stderr output deleted ...
31601         10q' conftest.err >conftest.er1
31602    cat conftest.er1 >&5
31603  fi
31604  rm -f conftest.er1 conftest.err
31605  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31606  test $ac_status = 0; }
31607done
31608
31609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31610$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31611if ${ac_cv_cxx_compiler_gnu+:} false; then :
31612  $as_echo_n "(cached) " >&6
31613else
31614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31615/* end confdefs.h.  */
31616
31617int
31618main ()
31619{
31620#ifndef __GNUC__
31621       choke me
31622#endif
31623
31624  ;
31625  return 0;
31626}
31627_ACEOF
31628if ac_fn_cxx_try_compile "$LINENO"; then :
31629  ac_compiler_gnu=yes
31630else
31631  ac_compiler_gnu=no
31632fi
31633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31634ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31635
31636fi
31637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31638$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31639if test $ac_compiler_gnu = yes; then
31640  GXX=yes
31641else
31642  GXX=
31643fi
31644ac_test_CXXFLAGS=${CXXFLAGS+set}
31645ac_save_CXXFLAGS=$CXXFLAGS
31646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31647$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31648if ${ac_cv_prog_cxx_g+:} false; then :
31649  $as_echo_n "(cached) " >&6
31650else
31651  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31652   ac_cxx_werror_flag=yes
31653   ac_cv_prog_cxx_g=no
31654   CXXFLAGS="-g"
31655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31656/* end confdefs.h.  */
31657
31658int
31659main ()
31660{
31661
31662  ;
31663  return 0;
31664}
31665_ACEOF
31666if ac_fn_cxx_try_compile "$LINENO"; then :
31667  ac_cv_prog_cxx_g=yes
31668else
31669  CXXFLAGS=""
31670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31671/* end confdefs.h.  */
31672
31673int
31674main ()
31675{
31676
31677  ;
31678  return 0;
31679}
31680_ACEOF
31681if ac_fn_cxx_try_compile "$LINENO"; then :
31682
31683else
31684  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31685	 CXXFLAGS="-g"
31686	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31687/* end confdefs.h.  */
31688
31689int
31690main ()
31691{
31692
31693  ;
31694  return 0;
31695}
31696_ACEOF
31697if ac_fn_cxx_try_compile "$LINENO"; then :
31698  ac_cv_prog_cxx_g=yes
31699fi
31700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31701fi
31702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31703fi
31704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31705   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31706fi
31707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31708$as_echo "$ac_cv_prog_cxx_g" >&6; }
31709if test "$ac_test_CXXFLAGS" = set; then
31710  CXXFLAGS=$ac_save_CXXFLAGS
31711elif test $ac_cv_prog_cxx_g = yes; then
31712  if test "$GXX" = yes; then
31713    CXXFLAGS="-g -O2"
31714  else
31715    CXXFLAGS="-g"
31716  fi
31717else
31718  if test "$GXX" = yes; then
31719    CXXFLAGS="-O2"
31720  else
31721    CXXFLAGS=
31722  fi
31723fi
31724ac_ext=cpp
31725ac_cpp='$CXXCPP $CPPFLAGS'
31726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31729
31730
31731  #
31732  # Setup the preprocessor (CPP and CXXCPP)
31733  #
31734  ac_ext=c
31735ac_cpp='$CPP $CPPFLAGS'
31736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31738ac_compiler_gnu=$ac_cv_c_compiler_gnu
31739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31740$as_echo_n "checking how to run the C preprocessor... " >&6; }
31741# On Suns, sometimes $CPP names a directory.
31742if test -n "$CPP" && test -d "$CPP"; then
31743  CPP=
31744fi
31745if test -z "$CPP"; then
31746  if ${ac_cv_prog_CPP+:} false; then :
31747  $as_echo_n "(cached) " >&6
31748else
31749      # Double quotes because CPP needs to be expanded
31750    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31751    do
31752      ac_preproc_ok=false
31753for ac_c_preproc_warn_flag in '' yes
31754do
31755  # Use a header file that comes with gcc, so configuring glibc
31756  # with a fresh cross-compiler works.
31757  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31758  # <limits.h> exists even on freestanding compilers.
31759  # On the NeXT, cc -E runs the code through the compiler's parser,
31760  # not just through cpp. "Syntax error" is here to catch this case.
31761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31762/* end confdefs.h.  */
31763#ifdef __STDC__
31764# include <limits.h>
31765#else
31766# include <assert.h>
31767#endif
31768		     Syntax error
31769_ACEOF
31770if ac_fn_c_try_cpp "$LINENO"; then :
31771
31772else
31773  # Broken: fails on valid input.
31774continue
31775fi
31776rm -f conftest.err conftest.i conftest.$ac_ext
31777
31778  # OK, works on sane cases.  Now check whether nonexistent headers
31779  # can be detected and how.
31780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31781/* end confdefs.h.  */
31782#include <ac_nonexistent.h>
31783_ACEOF
31784if ac_fn_c_try_cpp "$LINENO"; then :
31785  # Broken: success on invalid input.
31786continue
31787else
31788  # Passes both tests.
31789ac_preproc_ok=:
31790break
31791fi
31792rm -f conftest.err conftest.i conftest.$ac_ext
31793
31794done
31795# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31796rm -f conftest.i conftest.err conftest.$ac_ext
31797if $ac_preproc_ok; then :
31798  break
31799fi
31800
31801    done
31802    ac_cv_prog_CPP=$CPP
31803
31804fi
31805  CPP=$ac_cv_prog_CPP
31806else
31807  ac_cv_prog_CPP=$CPP
31808fi
31809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31810$as_echo "$CPP" >&6; }
31811ac_preproc_ok=false
31812for ac_c_preproc_warn_flag in '' yes
31813do
31814  # Use a header file that comes with gcc, so configuring glibc
31815  # with a fresh cross-compiler works.
31816  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31817  # <limits.h> exists even on freestanding compilers.
31818  # On the NeXT, cc -E runs the code through the compiler's parser,
31819  # not just through cpp. "Syntax error" is here to catch this case.
31820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31821/* end confdefs.h.  */
31822#ifdef __STDC__
31823# include <limits.h>
31824#else
31825# include <assert.h>
31826#endif
31827		     Syntax error
31828_ACEOF
31829if ac_fn_c_try_cpp "$LINENO"; then :
31830
31831else
31832  # Broken: fails on valid input.
31833continue
31834fi
31835rm -f conftest.err conftest.i conftest.$ac_ext
31836
31837  # OK, works on sane cases.  Now check whether nonexistent headers
31838  # can be detected and how.
31839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31840/* end confdefs.h.  */
31841#include <ac_nonexistent.h>
31842_ACEOF
31843if ac_fn_c_try_cpp "$LINENO"; then :
31844  # Broken: success on invalid input.
31845continue
31846else
31847  # Passes both tests.
31848ac_preproc_ok=:
31849break
31850fi
31851rm -f conftest.err conftest.i conftest.$ac_ext
31852
31853done
31854# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31855rm -f conftest.i conftest.err conftest.$ac_ext
31856if $ac_preproc_ok; then :
31857
31858else
31859  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31861as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31862See \`config.log' for more details" "$LINENO" 5; }
31863fi
31864
31865ac_ext=cpp
31866ac_cpp='$CXXCPP $CPPFLAGS'
31867ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31868ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31869ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31870
31871
31872  # Only process if variable expands to non-empty
31873
31874  if test "x$CPP" != x; then
31875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31876
31877  # First separate the path from the arguments. This will split at the first
31878  # space.
31879  complete="$CPP"
31880  path="${complete%% *}"
31881  tmp="$complete EOL"
31882  arguments="${tmp#* }"
31883
31884  # Input might be given as Windows format, start by converting to
31885  # unix format.
31886  new_path=`$CYGPATH -u "$path"`
31887
31888  # Now try to locate executable using which
31889  new_path=`$WHICH "$new_path" 2> /dev/null`
31890  # bat and cmd files are not always considered executable in cygwin causing which
31891  # to not find them
31892  if test "x$new_path" = x \
31893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31895    new_path=`$CYGPATH -u "$path"`
31896  fi
31897  if test "x$new_path" = x; then
31898    # Oops. Which didn't find the executable.
31899    # The splitting of arguments from the executable at a space might have been incorrect,
31900    # since paths with space are more likely in Windows. Give it another try with the whole
31901    # argument.
31902    path="$complete"
31903    arguments="EOL"
31904    new_path=`$CYGPATH -u "$path"`
31905    new_path=`$WHICH "$new_path" 2> /dev/null`
31906    # bat and cmd files are not always considered executable in cygwin causing which
31907    # to not find them
31908    if test "x$new_path" = x \
31909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31911      new_path=`$CYGPATH -u "$path"`
31912    fi
31913    if test "x$new_path" = x; then
31914      # It's still not found. Now this is an unrecoverable error.
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31916$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31917      has_space=`$ECHO "$complete" | $GREP " "`
31918      if test "x$has_space" != x; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31921      fi
31922      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31923    fi
31924  fi
31925
31926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31929  # "foo.exe" is OK but "foo" is an error.
31930  #
31931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31932  # It is also a way to make sure we got the proper file name for the real test later on.
31933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31934  if test "x$test_shortpath" = x; then
31935    # Short path failed, file does not exist as specified.
31936    # Try adding .exe or .cmd
31937    if test -f "${new_path}.exe"; then
31938      input_to_shortpath="${new_path}.exe"
31939    elif test -f "${new_path}.cmd"; then
31940      input_to_shortpath="${new_path}.cmd"
31941    else
31942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31943$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31946      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31947    fi
31948  else
31949    input_to_shortpath="$new_path"
31950  fi
31951
31952  # Call helper function which possibly converts this using DOS-style short mode.
31953  # If so, the updated path is stored in $new_path.
31954  new_path="$input_to_shortpath"
31955
31956  input_path="$input_to_shortpath"
31957  # Check if we need to convert this using DOS-style short mode. If the path
31958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31959  # take no chances and rewrite it.
31960  # Note: m4 eats our [], so we need to use [ and ] instead.
31961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31962  if test "x$has_forbidden_chars" != x; then
31963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31967      # Going to short mode and back again did indeed matter. Since short mode is
31968      # case insensitive, let's make it lowercase to improve readability.
31969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31970      # Now convert it back to Unix-style (cygpath)
31971      input_path=`$CYGPATH -u "$shortmode_path"`
31972      new_path="$input_path"
31973    fi
31974  fi
31975
31976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31977  if test "x$test_cygdrive_prefix" = x; then
31978    # As a simple fix, exclude /usr/bin since it's not a real path.
31979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31981      # a path prefixed by /cygdrive for fixpath to work.
31982      new_path="$CYGWIN_ROOT_PATH$input_path"
31983    fi
31984  fi
31985
31986  # remove trailing .exe if any
31987  new_path="${new_path/%.exe/}"
31988
31989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990
31991  # First separate the path from the arguments. This will split at the first
31992  # space.
31993  complete="$CPP"
31994  path="${complete%% *}"
31995  tmp="$complete EOL"
31996  arguments="${tmp#* }"
31997
31998  # Input might be given as Windows format, start by converting to
31999  # unix format.
32000  new_path="$path"
32001
32002  windows_path="$new_path"
32003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32004    unix_path=`$CYGPATH -u "$windows_path"`
32005    new_path="$unix_path"
32006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32008    new_path="$unix_path"
32009  fi
32010
32011
32012  # Now try to locate executable using which
32013  new_path=`$WHICH "$new_path" 2> /dev/null`
32014
32015  if test "x$new_path" = x; then
32016    # Oops. Which didn't find the executable.
32017    # The splitting of arguments from the executable at a space might have been incorrect,
32018    # since paths with space are more likely in Windows. Give it another try with the whole
32019    # argument.
32020    path="$complete"
32021    arguments="EOL"
32022    new_path="$path"
32023
32024  windows_path="$new_path"
32025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026    unix_path=`$CYGPATH -u "$windows_path"`
32027    new_path="$unix_path"
32028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32030    new_path="$unix_path"
32031  fi
32032
32033
32034    new_path=`$WHICH "$new_path" 2> /dev/null`
32035    # bat and cmd files are not always considered executable in MSYS causing which
32036    # to not find them
32037    if test "x$new_path" = x \
32038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32040      new_path="$path"
32041
32042  windows_path="$new_path"
32043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32044    unix_path=`$CYGPATH -u "$windows_path"`
32045    new_path="$unix_path"
32046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32048    new_path="$unix_path"
32049  fi
32050
32051    fi
32052
32053    if test "x$new_path" = x; then
32054      # It's still not found. Now this is an unrecoverable error.
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32056$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32057      has_space=`$ECHO "$complete" | $GREP " "`
32058      if test "x$has_space" != x; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32061      fi
32062      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32063    fi
32064  fi
32065
32066  # Now new_path has a complete unix path to the binary
32067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32068    # Keep paths in /bin as-is, but remove trailing .exe if any
32069    new_path="${new_path/%.exe/}"
32070    # Do not save /bin paths to all_fixpath_prefixes!
32071  else
32072    # Not in mixed or Windows style, start by that.
32073    new_path=`cmd //c echo $new_path`
32074
32075  input_path="$new_path"
32076  # Check if we need to convert this using DOS-style short mode. If the path
32077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32078  # take no chances and rewrite it.
32079  # Note: m4 eats our [], so we need to use [ and ] instead.
32080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32081  if test "x$has_forbidden_chars" != x; then
32082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32084  fi
32085
32086    # Output is in $new_path
32087
32088  windows_path="$new_path"
32089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32090    unix_path=`$CYGPATH -u "$windows_path"`
32091    new_path="$unix_path"
32092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32094    new_path="$unix_path"
32095  fi
32096
32097    # remove trailing .exe if any
32098    new_path="${new_path/%.exe/}"
32099
32100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32102  fi
32103
32104    else
32105      # We're on a unix platform. Hooray! :)
32106      # First separate the path from the arguments. This will split at the first
32107      # space.
32108      complete="$CPP"
32109      path="${complete%% *}"
32110      tmp="$complete EOL"
32111      arguments="${tmp#* }"
32112
32113      # Cannot rely on the command "which" here since it doesn't always work.
32114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32115      if test -z "$is_absolute_path"; then
32116        # Path to executable is not absolute. Find it.
32117        IFS_save="$IFS"
32118        IFS=:
32119        for p in $PATH; do
32120          if test -f "$p/$path" && test -x "$p/$path"; then
32121            new_path="$p/$path"
32122            break
32123          fi
32124        done
32125        IFS="$IFS_save"
32126      else
32127        # This is an absolute path, we can use it without further modifications.
32128        new_path="$path"
32129      fi
32130
32131      if test "x$new_path" = x; then
32132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32133$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32134        has_space=`$ECHO "$complete" | $GREP " "`
32135        if test "x$has_space" != x; then
32136          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32137$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32138        fi
32139        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32140      fi
32141    fi
32142
32143    # Now join together the path and the arguments once again
32144    if test "x$arguments" != xEOL; then
32145      new_complete="$new_path ${arguments% *}"
32146    else
32147      new_complete="$new_path"
32148    fi
32149
32150    if test "x$complete" != "x$new_complete"; then
32151      CPP="$new_complete"
32152      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32153$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32154    fi
32155  fi
32156
32157  ac_ext=cpp
32158ac_cpp='$CXXCPP $CPPFLAGS'
32159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32163$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32164if test -z "$CXXCPP"; then
32165  if ${ac_cv_prog_CXXCPP+:} false; then :
32166  $as_echo_n "(cached) " >&6
32167else
32168      # Double quotes because CXXCPP needs to be expanded
32169    for CXXCPP in "$CXX -E" "/lib/cpp"
32170    do
32171      ac_preproc_ok=false
32172for ac_cxx_preproc_warn_flag in '' yes
32173do
32174  # Use a header file that comes with gcc, so configuring glibc
32175  # with a fresh cross-compiler works.
32176  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32177  # <limits.h> exists even on freestanding compilers.
32178  # On the NeXT, cc -E runs the code through the compiler's parser,
32179  # not just through cpp. "Syntax error" is here to catch this case.
32180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32181/* end confdefs.h.  */
32182#ifdef __STDC__
32183# include <limits.h>
32184#else
32185# include <assert.h>
32186#endif
32187		     Syntax error
32188_ACEOF
32189if ac_fn_cxx_try_cpp "$LINENO"; then :
32190
32191else
32192  # Broken: fails on valid input.
32193continue
32194fi
32195rm -f conftest.err conftest.i conftest.$ac_ext
32196
32197  # OK, works on sane cases.  Now check whether nonexistent headers
32198  # can be detected and how.
32199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32200/* end confdefs.h.  */
32201#include <ac_nonexistent.h>
32202_ACEOF
32203if ac_fn_cxx_try_cpp "$LINENO"; then :
32204  # Broken: success on invalid input.
32205continue
32206else
32207  # Passes both tests.
32208ac_preproc_ok=:
32209break
32210fi
32211rm -f conftest.err conftest.i conftest.$ac_ext
32212
32213done
32214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32215rm -f conftest.i conftest.err conftest.$ac_ext
32216if $ac_preproc_ok; then :
32217  break
32218fi
32219
32220    done
32221    ac_cv_prog_CXXCPP=$CXXCPP
32222
32223fi
32224  CXXCPP=$ac_cv_prog_CXXCPP
32225else
32226  ac_cv_prog_CXXCPP=$CXXCPP
32227fi
32228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32229$as_echo "$CXXCPP" >&6; }
32230ac_preproc_ok=false
32231for ac_cxx_preproc_warn_flag in '' yes
32232do
32233  # Use a header file that comes with gcc, so configuring glibc
32234  # with a fresh cross-compiler works.
32235  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32236  # <limits.h> exists even on freestanding compilers.
32237  # On the NeXT, cc -E runs the code through the compiler's parser,
32238  # not just through cpp. "Syntax error" is here to catch this case.
32239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32240/* end confdefs.h.  */
32241#ifdef __STDC__
32242# include <limits.h>
32243#else
32244# include <assert.h>
32245#endif
32246		     Syntax error
32247_ACEOF
32248if ac_fn_cxx_try_cpp "$LINENO"; then :
32249
32250else
32251  # Broken: fails on valid input.
32252continue
32253fi
32254rm -f conftest.err conftest.i conftest.$ac_ext
32255
32256  # OK, works on sane cases.  Now check whether nonexistent headers
32257  # can be detected and how.
32258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32259/* end confdefs.h.  */
32260#include <ac_nonexistent.h>
32261_ACEOF
32262if ac_fn_cxx_try_cpp "$LINENO"; then :
32263  # Broken: success on invalid input.
32264continue
32265else
32266  # Passes both tests.
32267ac_preproc_ok=:
32268break
32269fi
32270rm -f conftest.err conftest.i conftest.$ac_ext
32271
32272done
32273# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32274rm -f conftest.i conftest.err conftest.$ac_ext
32275if $ac_preproc_ok; then :
32276
32277else
32278  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32280as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32281See \`config.log' for more details" "$LINENO" 5; }
32282fi
32283
32284ac_ext=cpp
32285ac_cpp='$CXXCPP $CPPFLAGS'
32286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32289
32290
32291  # Only process if variable expands to non-empty
32292
32293  if test "x$CXXCPP" != x; then
32294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295
32296  # First separate the path from the arguments. This will split at the first
32297  # space.
32298  complete="$CXXCPP"
32299  path="${complete%% *}"
32300  tmp="$complete EOL"
32301  arguments="${tmp#* }"
32302
32303  # Input might be given as Windows format, start by converting to
32304  # unix format.
32305  new_path=`$CYGPATH -u "$path"`
32306
32307  # Now try to locate executable using which
32308  new_path=`$WHICH "$new_path" 2> /dev/null`
32309  # bat and cmd files are not always considered executable in cygwin causing which
32310  # to not find them
32311  if test "x$new_path" = x \
32312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32314    new_path=`$CYGPATH -u "$path"`
32315  fi
32316  if test "x$new_path" = x; then
32317    # Oops. Which didn't find the executable.
32318    # The splitting of arguments from the executable at a space might have been incorrect,
32319    # since paths with space are more likely in Windows. Give it another try with the whole
32320    # argument.
32321    path="$complete"
32322    arguments="EOL"
32323    new_path=`$CYGPATH -u "$path"`
32324    new_path=`$WHICH "$new_path" 2> /dev/null`
32325    # bat and cmd files are not always considered executable in cygwin causing which
32326    # to not find them
32327    if test "x$new_path" = x \
32328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32330      new_path=`$CYGPATH -u "$path"`
32331    fi
32332    if test "x$new_path" = x; then
32333      # It's still not found. Now this is an unrecoverable error.
32334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32335$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32336      has_space=`$ECHO "$complete" | $GREP " "`
32337      if test "x$has_space" != x; then
32338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32340      fi
32341      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32342    fi
32343  fi
32344
32345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32348  # "foo.exe" is OK but "foo" is an error.
32349  #
32350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32351  # It is also a way to make sure we got the proper file name for the real test later on.
32352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32353  if test "x$test_shortpath" = x; then
32354    # Short path failed, file does not exist as specified.
32355    # Try adding .exe or .cmd
32356    if test -f "${new_path}.exe"; then
32357      input_to_shortpath="${new_path}.exe"
32358    elif test -f "${new_path}.cmd"; then
32359      input_to_shortpath="${new_path}.cmd"
32360    else
32361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32362$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32365      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32366    fi
32367  else
32368    input_to_shortpath="$new_path"
32369  fi
32370
32371  # Call helper function which possibly converts this using DOS-style short mode.
32372  # If so, the updated path is stored in $new_path.
32373  new_path="$input_to_shortpath"
32374
32375  input_path="$input_to_shortpath"
32376  # Check if we need to convert this using DOS-style short mode. If the path
32377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32378  # take no chances and rewrite it.
32379  # Note: m4 eats our [], so we need to use [ and ] instead.
32380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32381  if test "x$has_forbidden_chars" != x; then
32382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32386      # Going to short mode and back again did indeed matter. Since short mode is
32387      # case insensitive, let's make it lowercase to improve readability.
32388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32389      # Now convert it back to Unix-style (cygpath)
32390      input_path=`$CYGPATH -u "$shortmode_path"`
32391      new_path="$input_path"
32392    fi
32393  fi
32394
32395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32396  if test "x$test_cygdrive_prefix" = x; then
32397    # As a simple fix, exclude /usr/bin since it's not a real path.
32398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32400      # a path prefixed by /cygdrive for fixpath to work.
32401      new_path="$CYGWIN_ROOT_PATH$input_path"
32402    fi
32403  fi
32404
32405  # remove trailing .exe if any
32406  new_path="${new_path/%.exe/}"
32407
32408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409
32410  # First separate the path from the arguments. This will split at the first
32411  # space.
32412  complete="$CXXCPP"
32413  path="${complete%% *}"
32414  tmp="$complete EOL"
32415  arguments="${tmp#* }"
32416
32417  # Input might be given as Windows format, start by converting to
32418  # unix format.
32419  new_path="$path"
32420
32421  windows_path="$new_path"
32422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423    unix_path=`$CYGPATH -u "$windows_path"`
32424    new_path="$unix_path"
32425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427    new_path="$unix_path"
32428  fi
32429
32430
32431  # Now try to locate executable using which
32432  new_path=`$WHICH "$new_path" 2> /dev/null`
32433
32434  if test "x$new_path" = x; then
32435    # Oops. Which didn't find the executable.
32436    # The splitting of arguments from the executable at a space might have been incorrect,
32437    # since paths with space are more likely in Windows. Give it another try with the whole
32438    # argument.
32439    path="$complete"
32440    arguments="EOL"
32441    new_path="$path"
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452
32453    new_path=`$WHICH "$new_path" 2> /dev/null`
32454    # bat and cmd files are not always considered executable in MSYS causing which
32455    # to not find them
32456    if test "x$new_path" = x \
32457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32459      new_path="$path"
32460
32461  windows_path="$new_path"
32462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32463    unix_path=`$CYGPATH -u "$windows_path"`
32464    new_path="$unix_path"
32465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32467    new_path="$unix_path"
32468  fi
32469
32470    fi
32471
32472    if test "x$new_path" = x; then
32473      # It's still not found. Now this is an unrecoverable error.
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32475$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32476      has_space=`$ECHO "$complete" | $GREP " "`
32477      if test "x$has_space" != x; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32480      fi
32481      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32482    fi
32483  fi
32484
32485  # Now new_path has a complete unix path to the binary
32486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32487    # Keep paths in /bin as-is, but remove trailing .exe if any
32488    new_path="${new_path/%.exe/}"
32489    # Do not save /bin paths to all_fixpath_prefixes!
32490  else
32491    # Not in mixed or Windows style, start by that.
32492    new_path=`cmd //c echo $new_path`
32493
32494  input_path="$new_path"
32495  # Check if we need to convert this using DOS-style short mode. If the path
32496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32497  # take no chances and rewrite it.
32498  # Note: m4 eats our [], so we need to use [ and ] instead.
32499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32500  if test "x$has_forbidden_chars" != x; then
32501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32503  fi
32504
32505    # Output is in $new_path
32506
32507  windows_path="$new_path"
32508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32509    unix_path=`$CYGPATH -u "$windows_path"`
32510    new_path="$unix_path"
32511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32513    new_path="$unix_path"
32514  fi
32515
32516    # remove trailing .exe if any
32517    new_path="${new_path/%.exe/}"
32518
32519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32521  fi
32522
32523    else
32524      # We're on a unix platform. Hooray! :)
32525      # First separate the path from the arguments. This will split at the first
32526      # space.
32527      complete="$CXXCPP"
32528      path="${complete%% *}"
32529      tmp="$complete EOL"
32530      arguments="${tmp#* }"
32531
32532      # Cannot rely on the command "which" here since it doesn't always work.
32533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32534      if test -z "$is_absolute_path"; then
32535        # Path to executable is not absolute. Find it.
32536        IFS_save="$IFS"
32537        IFS=:
32538        for p in $PATH; do
32539          if test -f "$p/$path" && test -x "$p/$path"; then
32540            new_path="$p/$path"
32541            break
32542          fi
32543        done
32544        IFS="$IFS_save"
32545      else
32546        # This is an absolute path, we can use it without further modifications.
32547        new_path="$path"
32548      fi
32549
32550      if test "x$new_path" = x; then
32551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32552$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32553        has_space=`$ECHO "$complete" | $GREP " "`
32554        if test "x$has_space" != x; then
32555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32557        fi
32558        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32559      fi
32560    fi
32561
32562    # Now join together the path and the arguments once again
32563    if test "x$arguments" != xEOL; then
32564      new_complete="$new_path ${arguments% *}"
32565    else
32566      new_complete="$new_path"
32567    fi
32568
32569    if test "x$complete" != "x$new_complete"; then
32570      CXXCPP="$new_complete"
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32572$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32573    fi
32574  fi
32575
32576
32577  #
32578  # Setup the linker (LD)
32579  #
32580  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32581    # In the Microsoft toolchain we have a separate LD command "link".
32582    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32583    # a cygwin program for something completely different.
32584    # Extract the first word of "link", so it can be a program name with args.
32585set dummy link; ac_word=$2
32586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32587$as_echo_n "checking for $ac_word... " >&6; }
32588if ${ac_cv_prog_LD+:} false; then :
32589  $as_echo_n "(cached) " >&6
32590else
32591  if test -n "$LD"; then
32592  ac_cv_prog_LD="$LD" # Let the user override the test.
32593else
32594  ac_prog_rejected=no
32595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32596for as_dir in $PATH
32597do
32598  IFS=$as_save_IFS
32599  test -z "$as_dir" && as_dir=.
32600    for ac_exec_ext in '' $ac_executable_extensions; do
32601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32602    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32603       ac_prog_rejected=yes
32604       continue
32605     fi
32606    ac_cv_prog_LD="link"
32607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32608    break 2
32609  fi
32610done
32611  done
32612IFS=$as_save_IFS
32613
32614if test $ac_prog_rejected = yes; then
32615  # We found a bogon in the path, so make sure we never use it.
32616  set dummy $ac_cv_prog_LD
32617  shift
32618  if test $# != 0; then
32619    # We chose a different compiler from the bogus one.
32620    # However, it has the same basename, so the bogon will be chosen
32621    # first if we set LD to just the basename; use the full file name.
32622    shift
32623    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32624  fi
32625fi
32626fi
32627fi
32628LD=$ac_cv_prog_LD
32629if test -n "$LD"; then
32630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32631$as_echo "$LD" >&6; }
32632else
32633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32634$as_echo "no" >&6; }
32635fi
32636
32637
32638
32639  # Only process if variable expands to non-empty
32640
32641  if test "x$LD" != x; then
32642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643
32644  # First separate the path from the arguments. This will split at the first
32645  # space.
32646  complete="$LD"
32647  path="${complete%% *}"
32648  tmp="$complete EOL"
32649  arguments="${tmp#* }"
32650
32651  # Input might be given as Windows format, start by converting to
32652  # unix format.
32653  new_path=`$CYGPATH -u "$path"`
32654
32655  # Now try to locate executable using which
32656  new_path=`$WHICH "$new_path" 2> /dev/null`
32657  # bat and cmd files are not always considered executable in cygwin causing which
32658  # to not find them
32659  if test "x$new_path" = x \
32660      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32661      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32662    new_path=`$CYGPATH -u "$path"`
32663  fi
32664  if test "x$new_path" = x; then
32665    # Oops. Which didn't find the executable.
32666    # The splitting of arguments from the executable at a space might have been incorrect,
32667    # since paths with space are more likely in Windows. Give it another try with the whole
32668    # argument.
32669    path="$complete"
32670    arguments="EOL"
32671    new_path=`$CYGPATH -u "$path"`
32672    new_path=`$WHICH "$new_path" 2> /dev/null`
32673    # bat and cmd files are not always considered executable in cygwin causing which
32674    # to not find them
32675    if test "x$new_path" = x \
32676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32678      new_path=`$CYGPATH -u "$path"`
32679    fi
32680    if test "x$new_path" = x; then
32681      # It's still not found. Now this is an unrecoverable error.
32682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32683$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32684      has_space=`$ECHO "$complete" | $GREP " "`
32685      if test "x$has_space" != x; then
32686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32688      fi
32689      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32690    fi
32691  fi
32692
32693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32696  # "foo.exe" is OK but "foo" is an error.
32697  #
32698  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32699  # It is also a way to make sure we got the proper file name for the real test later on.
32700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32701  if test "x$test_shortpath" = x; then
32702    # Short path failed, file does not exist as specified.
32703    # Try adding .exe or .cmd
32704    if test -f "${new_path}.exe"; then
32705      input_to_shortpath="${new_path}.exe"
32706    elif test -f "${new_path}.cmd"; then
32707      input_to_shortpath="${new_path}.cmd"
32708    else
32709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32710$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32713      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32714    fi
32715  else
32716    input_to_shortpath="$new_path"
32717  fi
32718
32719  # Call helper function which possibly converts this using DOS-style short mode.
32720  # If so, the updated path is stored in $new_path.
32721  new_path="$input_to_shortpath"
32722
32723  input_path="$input_to_shortpath"
32724  # Check if we need to convert this using DOS-style short mode. If the path
32725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32726  # take no chances and rewrite it.
32727  # Note: m4 eats our [], so we need to use [ and ] instead.
32728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32729  if test "x$has_forbidden_chars" != x; then
32730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32734      # Going to short mode and back again did indeed matter. Since short mode is
32735      # case insensitive, let's make it lowercase to improve readability.
32736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32737      # Now convert it back to Unix-style (cygpath)
32738      input_path=`$CYGPATH -u "$shortmode_path"`
32739      new_path="$input_path"
32740    fi
32741  fi
32742
32743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32744  if test "x$test_cygdrive_prefix" = x; then
32745    # As a simple fix, exclude /usr/bin since it's not a real path.
32746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32748      # a path prefixed by /cygdrive for fixpath to work.
32749      new_path="$CYGWIN_ROOT_PATH$input_path"
32750    fi
32751  fi
32752
32753  # remove trailing .exe if any
32754  new_path="${new_path/%.exe/}"
32755
32756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32757
32758  # First separate the path from the arguments. This will split at the first
32759  # space.
32760  complete="$LD"
32761  path="${complete%% *}"
32762  tmp="$complete EOL"
32763  arguments="${tmp#* }"
32764
32765  # Input might be given as Windows format, start by converting to
32766  # unix format.
32767  new_path="$path"
32768
32769  windows_path="$new_path"
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771    unix_path=`$CYGPATH -u "$windows_path"`
32772    new_path="$unix_path"
32773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32775    new_path="$unix_path"
32776  fi
32777
32778
32779  # Now try to locate executable using which
32780  new_path=`$WHICH "$new_path" 2> /dev/null`
32781
32782  if test "x$new_path" = x; then
32783    # Oops. Which didn't find the executable.
32784    # The splitting of arguments from the executable at a space might have been incorrect,
32785    # since paths with space are more likely in Windows. Give it another try with the whole
32786    # argument.
32787    path="$complete"
32788    arguments="EOL"
32789    new_path="$path"
32790
32791  windows_path="$new_path"
32792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32793    unix_path=`$CYGPATH -u "$windows_path"`
32794    new_path="$unix_path"
32795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32797    new_path="$unix_path"
32798  fi
32799
32800
32801    new_path=`$WHICH "$new_path" 2> /dev/null`
32802    # bat and cmd files are not always considered executable in MSYS causing which
32803    # to not find them
32804    if test "x$new_path" = x \
32805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32807      new_path="$path"
32808
32809  windows_path="$new_path"
32810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32811    unix_path=`$CYGPATH -u "$windows_path"`
32812    new_path="$unix_path"
32813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32815    new_path="$unix_path"
32816  fi
32817
32818    fi
32819
32820    if test "x$new_path" = x; then
32821      # It's still not found. Now this is an unrecoverable error.
32822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32823$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32824      has_space=`$ECHO "$complete" | $GREP " "`
32825      if test "x$has_space" != x; then
32826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32828      fi
32829      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32830    fi
32831  fi
32832
32833  # Now new_path has a complete unix path to the binary
32834  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32835    # Keep paths in /bin as-is, but remove trailing .exe if any
32836    new_path="${new_path/%.exe/}"
32837    # Do not save /bin paths to all_fixpath_prefixes!
32838  else
32839    # Not in mixed or Windows style, start by that.
32840    new_path=`cmd //c echo $new_path`
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32851  fi
32852
32853    # Output is in $new_path
32854
32855  windows_path="$new_path"
32856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32857    unix_path=`$CYGPATH -u "$windows_path"`
32858    new_path="$unix_path"
32859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32861    new_path="$unix_path"
32862  fi
32863
32864    # remove trailing .exe if any
32865    new_path="${new_path/%.exe/}"
32866
32867    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32868    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32869  fi
32870
32871    else
32872      # We're on a unix platform. Hooray! :)
32873      # First separate the path from the arguments. This will split at the first
32874      # space.
32875      complete="$LD"
32876      path="${complete%% *}"
32877      tmp="$complete EOL"
32878      arguments="${tmp#* }"
32879
32880      # Cannot rely on the command "which" here since it doesn't always work.
32881      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32882      if test -z "$is_absolute_path"; then
32883        # Path to executable is not absolute. Find it.
32884        IFS_save="$IFS"
32885        IFS=:
32886        for p in $PATH; do
32887          if test -f "$p/$path" && test -x "$p/$path"; then
32888            new_path="$p/$path"
32889            break
32890          fi
32891        done
32892        IFS="$IFS_save"
32893      else
32894        # This is an absolute path, we can use it without further modifications.
32895        new_path="$path"
32896      fi
32897
32898      if test "x$new_path" = x; then
32899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32900$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32901        has_space=`$ECHO "$complete" | $GREP " "`
32902        if test "x$has_space" != x; then
32903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32905        fi
32906        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32907      fi
32908    fi
32909
32910    # Now join together the path and the arguments once again
32911    if test "x$arguments" != xEOL; then
32912      new_complete="$new_path ${arguments% *}"
32913    else
32914      new_complete="$new_path"
32915    fi
32916
32917    if test "x$complete" != "x$new_complete"; then
32918      LD="$new_complete"
32919      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32920$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32921    fi
32922  fi
32923
32924    # Verify that we indeed succeeded with this trick.
32925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32926$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32927    "$LD" --version > /dev/null
32928    if test $? -eq 0 ; then
32929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32930$as_echo "no" >&6; }
32931      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32932    else
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32934$as_echo "yes" >&6; }
32935    fi
32936    LDCXX="$LD"
32937  else
32938    # All other toolchains use the compiler to link.
32939    LD="$CC"
32940    LDCXX="$CXX"
32941  fi
32942
32943  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32944
32945
32946  #
32947  # Setup the assembler (AS)
32948  #
32949  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32950    # FIXME: should this really be solaris, or solstudio?
32951
32952
32953  # Publish this variable in the help.
32954
32955
32956  if test "x$AS" = x; then
32957    # The variable is not set by user, try to locate tool using the code snippet
32958    for ac_prog in as
32959do
32960  # Extract the first word of "$ac_prog", so it can be a program name with args.
32961set dummy $ac_prog; ac_word=$2
32962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32963$as_echo_n "checking for $ac_word... " >&6; }
32964if ${ac_cv_path_AS+:} false; then :
32965  $as_echo_n "(cached) " >&6
32966else
32967  case $AS in
32968  [\\/]* | ?:[\\/]*)
32969  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32970  ;;
32971  *)
32972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32973for as_dir in $PATH
32974do
32975  IFS=$as_save_IFS
32976  test -z "$as_dir" && as_dir=.
32977    for ac_exec_ext in '' $ac_executable_extensions; do
32978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32979    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32981    break 2
32982  fi
32983done
32984  done
32985IFS=$as_save_IFS
32986
32987  ;;
32988esac
32989fi
32990AS=$ac_cv_path_AS
32991if test -n "$AS"; then
32992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32993$as_echo "$AS" >&6; }
32994else
32995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32996$as_echo "no" >&6; }
32997fi
32998
32999
33000  test -n "$AS" && break
33001done
33002
33003  else
33004    # The variable is set, but is it from the command line or the environment?
33005
33006    # Try to remove the string !AS! from our list.
33007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33009      # If it failed, the variable was not from the command line. Ignore it,
33010      # but warn the user (except for BASH, which is always set by the calling BASH).
33011      if test "xAS" != xBASH; then
33012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33013$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33014      fi
33015      # Try to locate tool using the code snippet
33016      for ac_prog in as
33017do
33018  # Extract the first word of "$ac_prog", so it can be a program name with args.
33019set dummy $ac_prog; ac_word=$2
33020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33021$as_echo_n "checking for $ac_word... " >&6; }
33022if ${ac_cv_path_AS+:} false; then :
33023  $as_echo_n "(cached) " >&6
33024else
33025  case $AS in
33026  [\\/]* | ?:[\\/]*)
33027  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33028  ;;
33029  *)
33030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33031for as_dir in $PATH
33032do
33033  IFS=$as_save_IFS
33034  test -z "$as_dir" && as_dir=.
33035    for ac_exec_ext in '' $ac_executable_extensions; do
33036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33037    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33039    break 2
33040  fi
33041done
33042  done
33043IFS=$as_save_IFS
33044
33045  ;;
33046esac
33047fi
33048AS=$ac_cv_path_AS
33049if test -n "$AS"; then
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33051$as_echo "$AS" >&6; }
33052else
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33054$as_echo "no" >&6; }
33055fi
33056
33057
33058  test -n "$AS" && break
33059done
33060
33061    else
33062      # If it succeeded, then it was overridden by the user. We will use it
33063      # for the tool.
33064
33065      # First remove it from the list of overridden variables, so we can test
33066      # for unknown variables in the end.
33067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33068
33069      # Check if the provided tool contains a complete path.
33070      tool_specified="$AS"
33071      tool_basename="${tool_specified##*/}"
33072      if test "x$tool_basename" = "x$tool_specified"; then
33073        # A command without a complete path is provided, search $PATH.
33074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33075$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33076        # Extract the first word of "$tool_basename", so it can be a program name with args.
33077set dummy $tool_basename; ac_word=$2
33078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33079$as_echo_n "checking for $ac_word... " >&6; }
33080if ${ac_cv_path_AS+:} false; then :
33081  $as_echo_n "(cached) " >&6
33082else
33083  case $AS in
33084  [\\/]* | ?:[\\/]*)
33085  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33086  ;;
33087  *)
33088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33089for as_dir in $PATH
33090do
33091  IFS=$as_save_IFS
33092  test -z "$as_dir" && as_dir=.
33093    for ac_exec_ext in '' $ac_executable_extensions; do
33094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33095    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33097    break 2
33098  fi
33099done
33100  done
33101IFS=$as_save_IFS
33102
33103  ;;
33104esac
33105fi
33106AS=$ac_cv_path_AS
33107if test -n "$AS"; then
33108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33109$as_echo "$AS" >&6; }
33110else
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113fi
33114
33115
33116        if test "x$AS" = x; then
33117          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33118        fi
33119      else
33120        # Otherwise we believe it is a complete path. Use it as it is.
33121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33122$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33123        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33124$as_echo_n "checking for AS... " >&6; }
33125        if test ! -x "$tool_specified"; then
33126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33127$as_echo "not found" >&6; }
33128          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33129        fi
33130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33131$as_echo "$tool_specified" >&6; }
33132      fi
33133    fi
33134  fi
33135
33136
33137
33138  # Only process if variable expands to non-empty
33139
33140  if test "x$AS" != x; then
33141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33142
33143  # First separate the path from the arguments. This will split at the first
33144  # space.
33145  complete="$AS"
33146  path="${complete%% *}"
33147  tmp="$complete EOL"
33148  arguments="${tmp#* }"
33149
33150  # Input might be given as Windows format, start by converting to
33151  # unix format.
33152  new_path=`$CYGPATH -u "$path"`
33153
33154  # Now try to locate executable using which
33155  new_path=`$WHICH "$new_path" 2> /dev/null`
33156  # bat and cmd files are not always considered executable in cygwin causing which
33157  # to not find them
33158  if test "x$new_path" = x \
33159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33161    new_path=`$CYGPATH -u "$path"`
33162  fi
33163  if test "x$new_path" = x; then
33164    # Oops. Which didn't find the executable.
33165    # The splitting of arguments from the executable at a space might have been incorrect,
33166    # since paths with space are more likely in Windows. Give it another try with the whole
33167    # argument.
33168    path="$complete"
33169    arguments="EOL"
33170    new_path=`$CYGPATH -u "$path"`
33171    new_path=`$WHICH "$new_path" 2> /dev/null`
33172    # bat and cmd files are not always considered executable in cygwin causing which
33173    # to not find them
33174    if test "x$new_path" = x \
33175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33177      new_path=`$CYGPATH -u "$path"`
33178    fi
33179    if test "x$new_path" = x; then
33180      # It's still not found. Now this is an unrecoverable error.
33181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33182$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33183      has_space=`$ECHO "$complete" | $GREP " "`
33184      if test "x$has_space" != x; then
33185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33187      fi
33188      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33189    fi
33190  fi
33191
33192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33195  # "foo.exe" is OK but "foo" is an error.
33196  #
33197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33198  # It is also a way to make sure we got the proper file name for the real test later on.
33199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33200  if test "x$test_shortpath" = x; then
33201    # Short path failed, file does not exist as specified.
33202    # Try adding .exe or .cmd
33203    if test -f "${new_path}.exe"; then
33204      input_to_shortpath="${new_path}.exe"
33205    elif test -f "${new_path}.cmd"; then
33206      input_to_shortpath="${new_path}.cmd"
33207    else
33208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33209$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33212      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33213    fi
33214  else
33215    input_to_shortpath="$new_path"
33216  fi
33217
33218  # Call helper function which possibly converts this using DOS-style short mode.
33219  # If so, the updated path is stored in $new_path.
33220  new_path="$input_to_shortpath"
33221
33222  input_path="$input_to_shortpath"
33223  # Check if we need to convert this using DOS-style short mode. If the path
33224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33225  # take no chances and rewrite it.
33226  # Note: m4 eats our [], so we need to use [ and ] instead.
33227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33228  if test "x$has_forbidden_chars" != x; then
33229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33233      # Going to short mode and back again did indeed matter. Since short mode is
33234      # case insensitive, let's make it lowercase to improve readability.
33235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33236      # Now convert it back to Unix-style (cygpath)
33237      input_path=`$CYGPATH -u "$shortmode_path"`
33238      new_path="$input_path"
33239    fi
33240  fi
33241
33242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33243  if test "x$test_cygdrive_prefix" = x; then
33244    # As a simple fix, exclude /usr/bin since it's not a real path.
33245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33247      # a path prefixed by /cygdrive for fixpath to work.
33248      new_path="$CYGWIN_ROOT_PATH$input_path"
33249    fi
33250  fi
33251
33252  # remove trailing .exe if any
33253  new_path="${new_path/%.exe/}"
33254
33255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33256
33257  # First separate the path from the arguments. This will split at the first
33258  # space.
33259  complete="$AS"
33260  path="${complete%% *}"
33261  tmp="$complete EOL"
33262  arguments="${tmp#* }"
33263
33264  # Input might be given as Windows format, start by converting to
33265  # unix format.
33266  new_path="$path"
33267
33268  windows_path="$new_path"
33269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270    unix_path=`$CYGPATH -u "$windows_path"`
33271    new_path="$unix_path"
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33274    new_path="$unix_path"
33275  fi
33276
33277
33278  # Now try to locate executable using which
33279  new_path=`$WHICH "$new_path" 2> /dev/null`
33280
33281  if test "x$new_path" = x; then
33282    # Oops. Which didn't find the executable.
33283    # The splitting of arguments from the executable at a space might have been incorrect,
33284    # since paths with space are more likely in Windows. Give it another try with the whole
33285    # argument.
33286    path="$complete"
33287    arguments="EOL"
33288    new_path="$path"
33289
33290  windows_path="$new_path"
33291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33292    unix_path=`$CYGPATH -u "$windows_path"`
33293    new_path="$unix_path"
33294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33296    new_path="$unix_path"
33297  fi
33298
33299
33300    new_path=`$WHICH "$new_path" 2> /dev/null`
33301    # bat and cmd files are not always considered executable in MSYS causing which
33302    # to not find them
33303    if test "x$new_path" = x \
33304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33306      new_path="$path"
33307
33308  windows_path="$new_path"
33309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33310    unix_path=`$CYGPATH -u "$windows_path"`
33311    new_path="$unix_path"
33312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33314    new_path="$unix_path"
33315  fi
33316
33317    fi
33318
33319    if test "x$new_path" = x; then
33320      # It's still not found. Now this is an unrecoverable error.
33321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33322$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33323      has_space=`$ECHO "$complete" | $GREP " "`
33324      if test "x$has_space" != x; then
33325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33327      fi
33328      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33329    fi
33330  fi
33331
33332  # Now new_path has a complete unix path to the binary
33333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33334    # Keep paths in /bin as-is, but remove trailing .exe if any
33335    new_path="${new_path/%.exe/}"
33336    # Do not save /bin paths to all_fixpath_prefixes!
33337  else
33338    # Not in mixed or Windows style, start by that.
33339    new_path=`cmd //c echo $new_path`
33340
33341  input_path="$new_path"
33342  # Check if we need to convert this using DOS-style short mode. If the path
33343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33344  # take no chances and rewrite it.
33345  # Note: m4 eats our [], so we need to use [ and ] instead.
33346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33347  if test "x$has_forbidden_chars" != x; then
33348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33350  fi
33351
33352    # Output is in $new_path
33353
33354  windows_path="$new_path"
33355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33356    unix_path=`$CYGPATH -u "$windows_path"`
33357    new_path="$unix_path"
33358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33360    new_path="$unix_path"
33361  fi
33362
33363    # remove trailing .exe if any
33364    new_path="${new_path/%.exe/}"
33365
33366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33368  fi
33369
33370    else
33371      # We're on a unix platform. Hooray! :)
33372      # First separate the path from the arguments. This will split at the first
33373      # space.
33374      complete="$AS"
33375      path="${complete%% *}"
33376      tmp="$complete EOL"
33377      arguments="${tmp#* }"
33378
33379      # Cannot rely on the command "which" here since it doesn't always work.
33380      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33381      if test -z "$is_absolute_path"; then
33382        # Path to executable is not absolute. Find it.
33383        IFS_save="$IFS"
33384        IFS=:
33385        for p in $PATH; do
33386          if test -f "$p/$path" && test -x "$p/$path"; then
33387            new_path="$p/$path"
33388            break
33389          fi
33390        done
33391        IFS="$IFS_save"
33392      else
33393        # This is an absolute path, we can use it without further modifications.
33394        new_path="$path"
33395      fi
33396
33397      if test "x$new_path" = x; then
33398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33399$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33400        has_space=`$ECHO "$complete" | $GREP " "`
33401        if test "x$has_space" != x; then
33402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33404        fi
33405        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33406      fi
33407    fi
33408
33409    # Now join together the path and the arguments once again
33410    if test "x$arguments" != xEOL; then
33411      new_complete="$new_path ${arguments% *}"
33412    else
33413      new_complete="$new_path"
33414    fi
33415
33416    if test "x$complete" != "x$new_complete"; then
33417      AS="$new_complete"
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33419$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33420    fi
33421  fi
33422
33423  else
33424    # FIXME: is this correct for microsoft?
33425    AS="$CC -c"
33426  fi
33427
33428
33429  #
33430  # Setup the archiver (AR)
33431  #
33432  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33433    # The corresponding ar tool is lib.exe (used to create static libraries)
33434    # Extract the first word of "lib", so it can be a program name with args.
33435set dummy lib; ac_word=$2
33436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33437$as_echo_n "checking for $ac_word... " >&6; }
33438if ${ac_cv_prog_AR+:} false; then :
33439  $as_echo_n "(cached) " >&6
33440else
33441  if test -n "$AR"; then
33442  ac_cv_prog_AR="$AR" # Let the user override the test.
33443else
33444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33445for as_dir in $PATH
33446do
33447  IFS=$as_save_IFS
33448  test -z "$as_dir" && as_dir=.
33449    for ac_exec_ext in '' $ac_executable_extensions; do
33450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33451    ac_cv_prog_AR="lib"
33452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33453    break 2
33454  fi
33455done
33456  done
33457IFS=$as_save_IFS
33458
33459fi
33460fi
33461AR=$ac_cv_prog_AR
33462if test -n "$AR"; then
33463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33464$as_echo "$AR" >&6; }
33465else
33466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33467$as_echo "no" >&6; }
33468fi
33469
33470
33471  else
33472
33473
33474  # Publish this variable in the help.
33475
33476
33477  if test "x$AR" = x; then
33478    # The variable is not set by user, try to locate tool using the code snippet
33479    if test -n "$ac_tool_prefix"; then
33480  for ac_prog in ar
33481  do
33482    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33485$as_echo_n "checking for $ac_word... " >&6; }
33486if ${ac_cv_prog_AR+:} false; then :
33487  $as_echo_n "(cached) " >&6
33488else
33489  if test -n "$AR"; then
33490  ac_cv_prog_AR="$AR" # Let the user override the test.
33491else
33492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33493for as_dir in $PATH
33494do
33495  IFS=$as_save_IFS
33496  test -z "$as_dir" && as_dir=.
33497    for ac_exec_ext in '' $ac_executable_extensions; do
33498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33499    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33501    break 2
33502  fi
33503done
33504  done
33505IFS=$as_save_IFS
33506
33507fi
33508fi
33509AR=$ac_cv_prog_AR
33510if test -n "$AR"; then
33511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33512$as_echo "$AR" >&6; }
33513else
33514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33515$as_echo "no" >&6; }
33516fi
33517
33518
33519    test -n "$AR" && break
33520  done
33521fi
33522if test -z "$AR"; then
33523  ac_ct_AR=$AR
33524  for ac_prog in ar
33525do
33526  # Extract the first word of "$ac_prog", so it can be a program name with args.
33527set dummy $ac_prog; ac_word=$2
33528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33529$as_echo_n "checking for $ac_word... " >&6; }
33530if ${ac_cv_prog_ac_ct_AR+:} false; then :
33531  $as_echo_n "(cached) " >&6
33532else
33533  if test -n "$ac_ct_AR"; then
33534  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33535else
33536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33537for as_dir in $PATH
33538do
33539  IFS=$as_save_IFS
33540  test -z "$as_dir" && as_dir=.
33541    for ac_exec_ext in '' $ac_executable_extensions; do
33542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33543    ac_cv_prog_ac_ct_AR="$ac_prog"
33544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33545    break 2
33546  fi
33547done
33548  done
33549IFS=$as_save_IFS
33550
33551fi
33552fi
33553ac_ct_AR=$ac_cv_prog_ac_ct_AR
33554if test -n "$ac_ct_AR"; then
33555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33556$as_echo "$ac_ct_AR" >&6; }
33557else
33558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33559$as_echo "no" >&6; }
33560fi
33561
33562
33563  test -n "$ac_ct_AR" && break
33564done
33565
33566  if test "x$ac_ct_AR" = x; then
33567    AR=""
33568  else
33569    case $cross_compiling:$ac_tool_warned in
33570yes:)
33571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33573ac_tool_warned=yes ;;
33574esac
33575    AR=$ac_ct_AR
33576  fi
33577fi
33578
33579  else
33580    # The variable is set, but is it from the command line or the environment?
33581
33582    # Try to remove the string !AR! from our list.
33583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33585      # If it failed, the variable was not from the command line. Ignore it,
33586      # but warn the user (except for BASH, which is always set by the calling BASH).
33587      if test "xAR" != xBASH; then
33588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33589$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33590      fi
33591      # Try to locate tool using the code snippet
33592      if test -n "$ac_tool_prefix"; then
33593  for ac_prog in ar
33594  do
33595    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33596set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33598$as_echo_n "checking for $ac_word... " >&6; }
33599if ${ac_cv_prog_AR+:} false; then :
33600  $as_echo_n "(cached) " >&6
33601else
33602  if test -n "$AR"; then
33603  ac_cv_prog_AR="$AR" # Let the user override the test.
33604else
33605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33606for as_dir in $PATH
33607do
33608  IFS=$as_save_IFS
33609  test -z "$as_dir" && as_dir=.
33610    for ac_exec_ext in '' $ac_executable_extensions; do
33611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33612    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33614    break 2
33615  fi
33616done
33617  done
33618IFS=$as_save_IFS
33619
33620fi
33621fi
33622AR=$ac_cv_prog_AR
33623if test -n "$AR"; then
33624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33625$as_echo "$AR" >&6; }
33626else
33627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33628$as_echo "no" >&6; }
33629fi
33630
33631
33632    test -n "$AR" && break
33633  done
33634fi
33635if test -z "$AR"; then
33636  ac_ct_AR=$AR
33637  for ac_prog in ar
33638do
33639  # Extract the first word of "$ac_prog", so it can be a program name with args.
33640set dummy $ac_prog; ac_word=$2
33641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33642$as_echo_n "checking for $ac_word... " >&6; }
33643if ${ac_cv_prog_ac_ct_AR+:} false; then :
33644  $as_echo_n "(cached) " >&6
33645else
33646  if test -n "$ac_ct_AR"; then
33647  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33648else
33649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33650for as_dir in $PATH
33651do
33652  IFS=$as_save_IFS
33653  test -z "$as_dir" && as_dir=.
33654    for ac_exec_ext in '' $ac_executable_extensions; do
33655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33656    ac_cv_prog_ac_ct_AR="$ac_prog"
33657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33658    break 2
33659  fi
33660done
33661  done
33662IFS=$as_save_IFS
33663
33664fi
33665fi
33666ac_ct_AR=$ac_cv_prog_ac_ct_AR
33667if test -n "$ac_ct_AR"; then
33668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33669$as_echo "$ac_ct_AR" >&6; }
33670else
33671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33672$as_echo "no" >&6; }
33673fi
33674
33675
33676  test -n "$ac_ct_AR" && break
33677done
33678
33679  if test "x$ac_ct_AR" = x; then
33680    AR=""
33681  else
33682    case $cross_compiling:$ac_tool_warned in
33683yes:)
33684{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33686ac_tool_warned=yes ;;
33687esac
33688    AR=$ac_ct_AR
33689  fi
33690fi
33691
33692    else
33693      # If it succeeded, then it was overridden by the user. We will use it
33694      # for the tool.
33695
33696      # First remove it from the list of overridden variables, so we can test
33697      # for unknown variables in the end.
33698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33699
33700      # Check if the provided tool contains a complete path.
33701      tool_specified="$AR"
33702      tool_basename="${tool_specified##*/}"
33703      if test "x$tool_basename" = "x$tool_specified"; then
33704        # A command without a complete path is provided, search $PATH.
33705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33706$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33707        # Extract the first word of "$tool_basename", so it can be a program name with args.
33708set dummy $tool_basename; ac_word=$2
33709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33710$as_echo_n "checking for $ac_word... " >&6; }
33711if ${ac_cv_path_AR+:} false; then :
33712  $as_echo_n "(cached) " >&6
33713else
33714  case $AR in
33715  [\\/]* | ?:[\\/]*)
33716  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33717  ;;
33718  *)
33719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33720for as_dir in $PATH
33721do
33722  IFS=$as_save_IFS
33723  test -z "$as_dir" && as_dir=.
33724    for ac_exec_ext in '' $ac_executable_extensions; do
33725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33726    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33728    break 2
33729  fi
33730done
33731  done
33732IFS=$as_save_IFS
33733
33734  ;;
33735esac
33736fi
33737AR=$ac_cv_path_AR
33738if test -n "$AR"; then
33739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33740$as_echo "$AR" >&6; }
33741else
33742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33743$as_echo "no" >&6; }
33744fi
33745
33746
33747        if test "x$AR" = x; then
33748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33749        fi
33750      else
33751        # Otherwise we believe it is a complete path. Use it as it is.
33752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33753$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33755$as_echo_n "checking for AR... " >&6; }
33756        if test ! -x "$tool_specified"; then
33757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33758$as_echo "not found" >&6; }
33759          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33760        fi
33761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33762$as_echo "$tool_specified" >&6; }
33763      fi
33764    fi
33765  fi
33766
33767
33768  fi
33769
33770  # Only process if variable expands to non-empty
33771
33772  if test "x$AR" != x; then
33773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33774
33775  # First separate the path from the arguments. This will split at the first
33776  # space.
33777  complete="$AR"
33778  path="${complete%% *}"
33779  tmp="$complete EOL"
33780  arguments="${tmp#* }"
33781
33782  # Input might be given as Windows format, start by converting to
33783  # unix format.
33784  new_path=`$CYGPATH -u "$path"`
33785
33786  # Now try to locate executable using which
33787  new_path=`$WHICH "$new_path" 2> /dev/null`
33788  # bat and cmd files are not always considered executable in cygwin causing which
33789  # to not find them
33790  if test "x$new_path" = x \
33791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33793    new_path=`$CYGPATH -u "$path"`
33794  fi
33795  if test "x$new_path" = x; then
33796    # Oops. Which didn't find the executable.
33797    # The splitting of arguments from the executable at a space might have been incorrect,
33798    # since paths with space are more likely in Windows. Give it another try with the whole
33799    # argument.
33800    path="$complete"
33801    arguments="EOL"
33802    new_path=`$CYGPATH -u "$path"`
33803    new_path=`$WHICH "$new_path" 2> /dev/null`
33804    # bat and cmd files are not always considered executable in cygwin causing which
33805    # to not find them
33806    if test "x$new_path" = x \
33807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33809      new_path=`$CYGPATH -u "$path"`
33810    fi
33811    if test "x$new_path" = x; then
33812      # It's still not found. Now this is an unrecoverable error.
33813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33814$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33815      has_space=`$ECHO "$complete" | $GREP " "`
33816      if test "x$has_space" != x; then
33817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33819      fi
33820      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33821    fi
33822  fi
33823
33824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33827  # "foo.exe" is OK but "foo" is an error.
33828  #
33829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33830  # It is also a way to make sure we got the proper file name for the real test later on.
33831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33832  if test "x$test_shortpath" = x; then
33833    # Short path failed, file does not exist as specified.
33834    # Try adding .exe or .cmd
33835    if test -f "${new_path}.exe"; then
33836      input_to_shortpath="${new_path}.exe"
33837    elif test -f "${new_path}.cmd"; then
33838      input_to_shortpath="${new_path}.cmd"
33839    else
33840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33841$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33844      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33845    fi
33846  else
33847    input_to_shortpath="$new_path"
33848  fi
33849
33850  # Call helper function which possibly converts this using DOS-style short mode.
33851  # If so, the updated path is stored in $new_path.
33852  new_path="$input_to_shortpath"
33853
33854  input_path="$input_to_shortpath"
33855  # Check if we need to convert this using DOS-style short mode. If the path
33856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33857  # take no chances and rewrite it.
33858  # Note: m4 eats our [], so we need to use [ and ] instead.
33859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33860  if test "x$has_forbidden_chars" != x; then
33861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33865      # Going to short mode and back again did indeed matter. Since short mode is
33866      # case insensitive, let's make it lowercase to improve readability.
33867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33868      # Now convert it back to Unix-style (cygpath)
33869      input_path=`$CYGPATH -u "$shortmode_path"`
33870      new_path="$input_path"
33871    fi
33872  fi
33873
33874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33875  if test "x$test_cygdrive_prefix" = x; then
33876    # As a simple fix, exclude /usr/bin since it's not a real path.
33877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33879      # a path prefixed by /cygdrive for fixpath to work.
33880      new_path="$CYGWIN_ROOT_PATH$input_path"
33881    fi
33882  fi
33883
33884  # remove trailing .exe if any
33885  new_path="${new_path/%.exe/}"
33886
33887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33888
33889  # First separate the path from the arguments. This will split at the first
33890  # space.
33891  complete="$AR"
33892  path="${complete%% *}"
33893  tmp="$complete EOL"
33894  arguments="${tmp#* }"
33895
33896  # Input might be given as Windows format, start by converting to
33897  # unix format.
33898  new_path="$path"
33899
33900  windows_path="$new_path"
33901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902    unix_path=`$CYGPATH -u "$windows_path"`
33903    new_path="$unix_path"
33904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33906    new_path="$unix_path"
33907  fi
33908
33909
33910  # Now try to locate executable using which
33911  new_path=`$WHICH "$new_path" 2> /dev/null`
33912
33913  if test "x$new_path" = x; then
33914    # Oops. Which didn't find the executable.
33915    # The splitting of arguments from the executable at a space might have been incorrect,
33916    # since paths with space are more likely in Windows. Give it another try with the whole
33917    # argument.
33918    path="$complete"
33919    arguments="EOL"
33920    new_path="$path"
33921
33922  windows_path="$new_path"
33923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924    unix_path=`$CYGPATH -u "$windows_path"`
33925    new_path="$unix_path"
33926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33928    new_path="$unix_path"
33929  fi
33930
33931
33932    new_path=`$WHICH "$new_path" 2> /dev/null`
33933    # bat and cmd files are not always considered executable in MSYS causing which
33934    # to not find them
33935    if test "x$new_path" = x \
33936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33938      new_path="$path"
33939
33940  windows_path="$new_path"
33941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33942    unix_path=`$CYGPATH -u "$windows_path"`
33943    new_path="$unix_path"
33944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33946    new_path="$unix_path"
33947  fi
33948
33949    fi
33950
33951    if test "x$new_path" = x; then
33952      # It's still not found. Now this is an unrecoverable error.
33953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33954$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33955      has_space=`$ECHO "$complete" | $GREP " "`
33956      if test "x$has_space" != x; then
33957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33959      fi
33960      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33961    fi
33962  fi
33963
33964  # Now new_path has a complete unix path to the binary
33965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33966    # Keep paths in /bin as-is, but remove trailing .exe if any
33967    new_path="${new_path/%.exe/}"
33968    # Do not save /bin paths to all_fixpath_prefixes!
33969  else
33970    # Not in mixed or Windows style, start by that.
33971    new_path=`cmd //c echo $new_path`
33972
33973  input_path="$new_path"
33974  # Check if we need to convert this using DOS-style short mode. If the path
33975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33976  # take no chances and rewrite it.
33977  # Note: m4 eats our [], so we need to use [ and ] instead.
33978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33979  if test "x$has_forbidden_chars" != x; then
33980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33982  fi
33983
33984    # Output is in $new_path
33985
33986  windows_path="$new_path"
33987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33988    unix_path=`$CYGPATH -u "$windows_path"`
33989    new_path="$unix_path"
33990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33992    new_path="$unix_path"
33993  fi
33994
33995    # remove trailing .exe if any
33996    new_path="${new_path/%.exe/}"
33997
33998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34000  fi
34001
34002    else
34003      # We're on a unix platform. Hooray! :)
34004      # First separate the path from the arguments. This will split at the first
34005      # space.
34006      complete="$AR"
34007      path="${complete%% *}"
34008      tmp="$complete EOL"
34009      arguments="${tmp#* }"
34010
34011      # Cannot rely on the command "which" here since it doesn't always work.
34012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34013      if test -z "$is_absolute_path"; then
34014        # Path to executable is not absolute. Find it.
34015        IFS_save="$IFS"
34016        IFS=:
34017        for p in $PATH; do
34018          if test -f "$p/$path" && test -x "$p/$path"; then
34019            new_path="$p/$path"
34020            break
34021          fi
34022        done
34023        IFS="$IFS_save"
34024      else
34025        # This is an absolute path, we can use it without further modifications.
34026        new_path="$path"
34027      fi
34028
34029      if test "x$new_path" = x; then
34030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34031$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34032        has_space=`$ECHO "$complete" | $GREP " "`
34033        if test "x$has_space" != x; then
34034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34036        fi
34037        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34038      fi
34039    fi
34040
34041    # Now join together the path and the arguments once again
34042    if test "x$arguments" != xEOL; then
34043      new_complete="$new_path ${arguments% *}"
34044    else
34045      new_complete="$new_path"
34046    fi
34047
34048    if test "x$complete" != "x$new_complete"; then
34049      AR="$new_complete"
34050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34051$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34052    fi
34053  fi
34054
34055
34056
34057  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34058
34059
34060  # Publish this variable in the help.
34061
34062
34063  if test "x$LIPO" = x; then
34064    # The variable is not set by user, try to locate tool using the code snippet
34065    for ac_prog in lipo
34066do
34067  # Extract the first word of "$ac_prog", so it can be a program name with args.
34068set dummy $ac_prog; ac_word=$2
34069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34070$as_echo_n "checking for $ac_word... " >&6; }
34071if ${ac_cv_path_LIPO+:} false; then :
34072  $as_echo_n "(cached) " >&6
34073else
34074  case $LIPO in
34075  [\\/]* | ?:[\\/]*)
34076  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34077  ;;
34078  *)
34079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34080for as_dir in $PATH
34081do
34082  IFS=$as_save_IFS
34083  test -z "$as_dir" && as_dir=.
34084    for ac_exec_ext in '' $ac_executable_extensions; do
34085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34086    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34088    break 2
34089  fi
34090done
34091  done
34092IFS=$as_save_IFS
34093
34094  ;;
34095esac
34096fi
34097LIPO=$ac_cv_path_LIPO
34098if test -n "$LIPO"; then
34099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34100$as_echo "$LIPO" >&6; }
34101else
34102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34103$as_echo "no" >&6; }
34104fi
34105
34106
34107  test -n "$LIPO" && break
34108done
34109
34110  else
34111    # The variable is set, but is it from the command line or the environment?
34112
34113    # Try to remove the string !LIPO! from our list.
34114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34116      # If it failed, the variable was not from the command line. Ignore it,
34117      # but warn the user (except for BASH, which is always set by the calling BASH).
34118      if test "xLIPO" != xBASH; then
34119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34120$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34121      fi
34122      # Try to locate tool using the code snippet
34123      for ac_prog in lipo
34124do
34125  # Extract the first word of "$ac_prog", so it can be a program name with args.
34126set dummy $ac_prog; ac_word=$2
34127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34128$as_echo_n "checking for $ac_word... " >&6; }
34129if ${ac_cv_path_LIPO+:} false; then :
34130  $as_echo_n "(cached) " >&6
34131else
34132  case $LIPO in
34133  [\\/]* | ?:[\\/]*)
34134  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34135  ;;
34136  *)
34137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34138for as_dir in $PATH
34139do
34140  IFS=$as_save_IFS
34141  test -z "$as_dir" && as_dir=.
34142    for ac_exec_ext in '' $ac_executable_extensions; do
34143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34144    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34146    break 2
34147  fi
34148done
34149  done
34150IFS=$as_save_IFS
34151
34152  ;;
34153esac
34154fi
34155LIPO=$ac_cv_path_LIPO
34156if test -n "$LIPO"; then
34157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34158$as_echo "$LIPO" >&6; }
34159else
34160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34161$as_echo "no" >&6; }
34162fi
34163
34164
34165  test -n "$LIPO" && break
34166done
34167
34168    else
34169      # If it succeeded, then it was overridden by the user. We will use it
34170      # for the tool.
34171
34172      # First remove it from the list of overridden variables, so we can test
34173      # for unknown variables in the end.
34174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34175
34176      # Check if the provided tool contains a complete path.
34177      tool_specified="$LIPO"
34178      tool_basename="${tool_specified##*/}"
34179      if test "x$tool_basename" = "x$tool_specified"; then
34180        # A command without a complete path is provided, search $PATH.
34181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34182$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34183        # Extract the first word of "$tool_basename", so it can be a program name with args.
34184set dummy $tool_basename; ac_word=$2
34185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34186$as_echo_n "checking for $ac_word... " >&6; }
34187if ${ac_cv_path_LIPO+:} false; then :
34188  $as_echo_n "(cached) " >&6
34189else
34190  case $LIPO in
34191  [\\/]* | ?:[\\/]*)
34192  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34193  ;;
34194  *)
34195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34196for as_dir in $PATH
34197do
34198  IFS=$as_save_IFS
34199  test -z "$as_dir" && as_dir=.
34200    for ac_exec_ext in '' $ac_executable_extensions; do
34201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34202    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34204    break 2
34205  fi
34206done
34207  done
34208IFS=$as_save_IFS
34209
34210  ;;
34211esac
34212fi
34213LIPO=$ac_cv_path_LIPO
34214if test -n "$LIPO"; then
34215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34216$as_echo "$LIPO" >&6; }
34217else
34218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34219$as_echo "no" >&6; }
34220fi
34221
34222
34223        if test "x$LIPO" = x; then
34224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34225        fi
34226      else
34227        # Otherwise we believe it is a complete path. Use it as it is.
34228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34229$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34231$as_echo_n "checking for LIPO... " >&6; }
34232        if test ! -x "$tool_specified"; then
34233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34234$as_echo "not found" >&6; }
34235          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34236        fi
34237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34238$as_echo "$tool_specified" >&6; }
34239      fi
34240    fi
34241  fi
34242
34243
34244
34245  # Only process if variable expands to non-empty
34246
34247  if test "x$LIPO" != x; then
34248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34249
34250  # First separate the path from the arguments. This will split at the first
34251  # space.
34252  complete="$LIPO"
34253  path="${complete%% *}"
34254  tmp="$complete EOL"
34255  arguments="${tmp#* }"
34256
34257  # Input might be given as Windows format, start by converting to
34258  # unix format.
34259  new_path=`$CYGPATH -u "$path"`
34260
34261  # Now try to locate executable using which
34262  new_path=`$WHICH "$new_path" 2> /dev/null`
34263  # bat and cmd files are not always considered executable in cygwin causing which
34264  # to not find them
34265  if test "x$new_path" = x \
34266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34268    new_path=`$CYGPATH -u "$path"`
34269  fi
34270  if test "x$new_path" = x; then
34271    # Oops. Which didn't find the executable.
34272    # The splitting of arguments from the executable at a space might have been incorrect,
34273    # since paths with space are more likely in Windows. Give it another try with the whole
34274    # argument.
34275    path="$complete"
34276    arguments="EOL"
34277    new_path=`$CYGPATH -u "$path"`
34278    new_path=`$WHICH "$new_path" 2> /dev/null`
34279    # bat and cmd files are not always considered executable in cygwin causing which
34280    # to not find them
34281    if test "x$new_path" = x \
34282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34284      new_path=`$CYGPATH -u "$path"`
34285    fi
34286    if test "x$new_path" = x; then
34287      # It's still not found. Now this is an unrecoverable error.
34288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34289$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34290      has_space=`$ECHO "$complete" | $GREP " "`
34291      if test "x$has_space" != x; then
34292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34294      fi
34295      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34296    fi
34297  fi
34298
34299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34302  # "foo.exe" is OK but "foo" is an error.
34303  #
34304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34305  # It is also a way to make sure we got the proper file name for the real test later on.
34306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34307  if test "x$test_shortpath" = x; then
34308    # Short path failed, file does not exist as specified.
34309    # Try adding .exe or .cmd
34310    if test -f "${new_path}.exe"; then
34311      input_to_shortpath="${new_path}.exe"
34312    elif test -f "${new_path}.cmd"; then
34313      input_to_shortpath="${new_path}.cmd"
34314    else
34315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34316$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34319      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34320    fi
34321  else
34322    input_to_shortpath="$new_path"
34323  fi
34324
34325  # Call helper function which possibly converts this using DOS-style short mode.
34326  # If so, the updated path is stored in $new_path.
34327  new_path="$input_to_shortpath"
34328
34329  input_path="$input_to_shortpath"
34330  # Check if we need to convert this using DOS-style short mode. If the path
34331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34332  # take no chances and rewrite it.
34333  # Note: m4 eats our [], so we need to use [ and ] instead.
34334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34335  if test "x$has_forbidden_chars" != x; then
34336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34340      # Going to short mode and back again did indeed matter. Since short mode is
34341      # case insensitive, let's make it lowercase to improve readability.
34342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34343      # Now convert it back to Unix-style (cygpath)
34344      input_path=`$CYGPATH -u "$shortmode_path"`
34345      new_path="$input_path"
34346    fi
34347  fi
34348
34349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34350  if test "x$test_cygdrive_prefix" = x; then
34351    # As a simple fix, exclude /usr/bin since it's not a real path.
34352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34354      # a path prefixed by /cygdrive for fixpath to work.
34355      new_path="$CYGWIN_ROOT_PATH$input_path"
34356    fi
34357  fi
34358
34359  # remove trailing .exe if any
34360  new_path="${new_path/%.exe/}"
34361
34362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363
34364  # First separate the path from the arguments. This will split at the first
34365  # space.
34366  complete="$LIPO"
34367  path="${complete%% *}"
34368  tmp="$complete EOL"
34369  arguments="${tmp#* }"
34370
34371  # Input might be given as Windows format, start by converting to
34372  # unix format.
34373  new_path="$path"
34374
34375  windows_path="$new_path"
34376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34377    unix_path=`$CYGPATH -u "$windows_path"`
34378    new_path="$unix_path"
34379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34381    new_path="$unix_path"
34382  fi
34383
34384
34385  # Now try to locate executable using which
34386  new_path=`$WHICH "$new_path" 2> /dev/null`
34387
34388  if test "x$new_path" = x; then
34389    # Oops. Which didn't find the executable.
34390    # The splitting of arguments from the executable at a space might have been incorrect,
34391    # since paths with space are more likely in Windows. Give it another try with the whole
34392    # argument.
34393    path="$complete"
34394    arguments="EOL"
34395    new_path="$path"
34396
34397  windows_path="$new_path"
34398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34399    unix_path=`$CYGPATH -u "$windows_path"`
34400    new_path="$unix_path"
34401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34403    new_path="$unix_path"
34404  fi
34405
34406
34407    new_path=`$WHICH "$new_path" 2> /dev/null`
34408    # bat and cmd files are not always considered executable in MSYS causing which
34409    # to not find them
34410    if test "x$new_path" = x \
34411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34413      new_path="$path"
34414
34415  windows_path="$new_path"
34416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34417    unix_path=`$CYGPATH -u "$windows_path"`
34418    new_path="$unix_path"
34419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34421    new_path="$unix_path"
34422  fi
34423
34424    fi
34425
34426    if test "x$new_path" = x; then
34427      # It's still not found. Now this is an unrecoverable error.
34428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34429$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34430      has_space=`$ECHO "$complete" | $GREP " "`
34431      if test "x$has_space" != x; then
34432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34434      fi
34435      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34436    fi
34437  fi
34438
34439  # Now new_path has a complete unix path to the binary
34440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34441    # Keep paths in /bin as-is, but remove trailing .exe if any
34442    new_path="${new_path/%.exe/}"
34443    # Do not save /bin paths to all_fixpath_prefixes!
34444  else
34445    # Not in mixed or Windows style, start by that.
34446    new_path=`cmd //c echo $new_path`
34447
34448  input_path="$new_path"
34449  # Check if we need to convert this using DOS-style short mode. If the path
34450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34451  # take no chances and rewrite it.
34452  # Note: m4 eats our [], so we need to use [ and ] instead.
34453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34454  if test "x$has_forbidden_chars" != x; then
34455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34457  fi
34458
34459    # Output is in $new_path
34460
34461  windows_path="$new_path"
34462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34463    unix_path=`$CYGPATH -u "$windows_path"`
34464    new_path="$unix_path"
34465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34467    new_path="$unix_path"
34468  fi
34469
34470    # remove trailing .exe if any
34471    new_path="${new_path/%.exe/}"
34472
34473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34475  fi
34476
34477    else
34478      # We're on a unix platform. Hooray! :)
34479      # First separate the path from the arguments. This will split at the first
34480      # space.
34481      complete="$LIPO"
34482      path="${complete%% *}"
34483      tmp="$complete EOL"
34484      arguments="${tmp#* }"
34485
34486      # Cannot rely on the command "which" here since it doesn't always work.
34487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34488      if test -z "$is_absolute_path"; then
34489        # Path to executable is not absolute. Find it.
34490        IFS_save="$IFS"
34491        IFS=:
34492        for p in $PATH; do
34493          if test -f "$p/$path" && test -x "$p/$path"; then
34494            new_path="$p/$path"
34495            break
34496          fi
34497        done
34498        IFS="$IFS_save"
34499      else
34500        # This is an absolute path, we can use it without further modifications.
34501        new_path="$path"
34502      fi
34503
34504      if test "x$new_path" = x; then
34505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34506$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34507        has_space=`$ECHO "$complete" | $GREP " "`
34508        if test "x$has_space" != x; then
34509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34511        fi
34512        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34513      fi
34514    fi
34515
34516    # Now join together the path and the arguments once again
34517    if test "x$arguments" != xEOL; then
34518      new_complete="$new_path ${arguments% *}"
34519    else
34520      new_complete="$new_path"
34521    fi
34522
34523    if test "x$complete" != "x$new_complete"; then
34524      LIPO="$new_complete"
34525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34526$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34527    fi
34528  fi
34529
34530  fi
34531
34532  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34533    # Extract the first word of "mt", so it can be a program name with args.
34534set dummy mt; ac_word=$2
34535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34536$as_echo_n "checking for $ac_word... " >&6; }
34537if ${ac_cv_prog_MT+:} false; then :
34538  $as_echo_n "(cached) " >&6
34539else
34540  if test -n "$MT"; then
34541  ac_cv_prog_MT="$MT" # Let the user override the test.
34542else
34543  ac_prog_rejected=no
34544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34545for as_dir in $PATH
34546do
34547  IFS=$as_save_IFS
34548  test -z "$as_dir" && as_dir=.
34549    for ac_exec_ext in '' $ac_executable_extensions; do
34550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34551    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34552       ac_prog_rejected=yes
34553       continue
34554     fi
34555    ac_cv_prog_MT="mt"
34556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34557    break 2
34558  fi
34559done
34560  done
34561IFS=$as_save_IFS
34562
34563if test $ac_prog_rejected = yes; then
34564  # We found a bogon in the path, so make sure we never use it.
34565  set dummy $ac_cv_prog_MT
34566  shift
34567  if test $# != 0; then
34568    # We chose a different compiler from the bogus one.
34569    # However, it has the same basename, so the bogon will be chosen
34570    # first if we set MT to just the basename; use the full file name.
34571    shift
34572    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34573  fi
34574fi
34575fi
34576fi
34577MT=$ac_cv_prog_MT
34578if test -n "$MT"; then
34579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34580$as_echo "$MT" >&6; }
34581else
34582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34583$as_echo "no" >&6; }
34584fi
34585
34586
34587
34588  # Only process if variable expands to non-empty
34589
34590  if test "x$MT" != x; then
34591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34592
34593  # First separate the path from the arguments. This will split at the first
34594  # space.
34595  complete="$MT"
34596  path="${complete%% *}"
34597  tmp="$complete EOL"
34598  arguments="${tmp#* }"
34599
34600  # Input might be given as Windows format, start by converting to
34601  # unix format.
34602  new_path=`$CYGPATH -u "$path"`
34603
34604  # Now try to locate executable using which
34605  new_path=`$WHICH "$new_path" 2> /dev/null`
34606  # bat and cmd files are not always considered executable in cygwin causing which
34607  # to not find them
34608  if test "x$new_path" = x \
34609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34611    new_path=`$CYGPATH -u "$path"`
34612  fi
34613  if test "x$new_path" = x; then
34614    # Oops. Which didn't find the executable.
34615    # The splitting of arguments from the executable at a space might have been incorrect,
34616    # since paths with space are more likely in Windows. Give it another try with the whole
34617    # argument.
34618    path="$complete"
34619    arguments="EOL"
34620    new_path=`$CYGPATH -u "$path"`
34621    new_path=`$WHICH "$new_path" 2> /dev/null`
34622    # bat and cmd files are not always considered executable in cygwin causing which
34623    # to not find them
34624    if test "x$new_path" = x \
34625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34627      new_path=`$CYGPATH -u "$path"`
34628    fi
34629    if test "x$new_path" = x; then
34630      # It's still not found. Now this is an unrecoverable error.
34631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34632$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34633      has_space=`$ECHO "$complete" | $GREP " "`
34634      if test "x$has_space" != x; then
34635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34637      fi
34638      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34639    fi
34640  fi
34641
34642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34645  # "foo.exe" is OK but "foo" is an error.
34646  #
34647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34648  # It is also a way to make sure we got the proper file name for the real test later on.
34649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34650  if test "x$test_shortpath" = x; then
34651    # Short path failed, file does not exist as specified.
34652    # Try adding .exe or .cmd
34653    if test -f "${new_path}.exe"; then
34654      input_to_shortpath="${new_path}.exe"
34655    elif test -f "${new_path}.cmd"; then
34656      input_to_shortpath="${new_path}.cmd"
34657    else
34658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34659$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34662      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34663    fi
34664  else
34665    input_to_shortpath="$new_path"
34666  fi
34667
34668  # Call helper function which possibly converts this using DOS-style short mode.
34669  # If so, the updated path is stored in $new_path.
34670  new_path="$input_to_shortpath"
34671
34672  input_path="$input_to_shortpath"
34673  # Check if we need to convert this using DOS-style short mode. If the path
34674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34675  # take no chances and rewrite it.
34676  # Note: m4 eats our [], so we need to use [ and ] instead.
34677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34678  if test "x$has_forbidden_chars" != x; then
34679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34683      # Going to short mode and back again did indeed matter. Since short mode is
34684      # case insensitive, let's make it lowercase to improve readability.
34685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34686      # Now convert it back to Unix-style (cygpath)
34687      input_path=`$CYGPATH -u "$shortmode_path"`
34688      new_path="$input_path"
34689    fi
34690  fi
34691
34692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34693  if test "x$test_cygdrive_prefix" = x; then
34694    # As a simple fix, exclude /usr/bin since it's not a real path.
34695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34697      # a path prefixed by /cygdrive for fixpath to work.
34698      new_path="$CYGWIN_ROOT_PATH$input_path"
34699    fi
34700  fi
34701
34702  # remove trailing .exe if any
34703  new_path="${new_path/%.exe/}"
34704
34705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34706
34707  # First separate the path from the arguments. This will split at the first
34708  # space.
34709  complete="$MT"
34710  path="${complete%% *}"
34711  tmp="$complete EOL"
34712  arguments="${tmp#* }"
34713
34714  # Input might be given as Windows format, start by converting to
34715  # unix format.
34716  new_path="$path"
34717
34718  windows_path="$new_path"
34719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34720    unix_path=`$CYGPATH -u "$windows_path"`
34721    new_path="$unix_path"
34722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34724    new_path="$unix_path"
34725  fi
34726
34727
34728  # Now try to locate executable using which
34729  new_path=`$WHICH "$new_path" 2> /dev/null`
34730
34731  if test "x$new_path" = x; then
34732    # Oops. Which didn't find the executable.
34733    # The splitting of arguments from the executable at a space might have been incorrect,
34734    # since paths with space are more likely in Windows. Give it another try with the whole
34735    # argument.
34736    path="$complete"
34737    arguments="EOL"
34738    new_path="$path"
34739
34740  windows_path="$new_path"
34741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34742    unix_path=`$CYGPATH -u "$windows_path"`
34743    new_path="$unix_path"
34744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34746    new_path="$unix_path"
34747  fi
34748
34749
34750    new_path=`$WHICH "$new_path" 2> /dev/null`
34751    # bat and cmd files are not always considered executable in MSYS causing which
34752    # to not find them
34753    if test "x$new_path" = x \
34754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34756      new_path="$path"
34757
34758  windows_path="$new_path"
34759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34760    unix_path=`$CYGPATH -u "$windows_path"`
34761    new_path="$unix_path"
34762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34764    new_path="$unix_path"
34765  fi
34766
34767    fi
34768
34769    if test "x$new_path" = x; then
34770      # It's still not found. Now this is an unrecoverable error.
34771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34772$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34773      has_space=`$ECHO "$complete" | $GREP " "`
34774      if test "x$has_space" != x; then
34775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34777      fi
34778      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34779    fi
34780  fi
34781
34782  # Now new_path has a complete unix path to the binary
34783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34784    # Keep paths in /bin as-is, but remove trailing .exe if any
34785    new_path="${new_path/%.exe/}"
34786    # Do not save /bin paths to all_fixpath_prefixes!
34787  else
34788    # Not in mixed or Windows style, start by that.
34789    new_path=`cmd //c echo $new_path`
34790
34791  input_path="$new_path"
34792  # Check if we need to convert this using DOS-style short mode. If the path
34793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34794  # take no chances and rewrite it.
34795  # Note: m4 eats our [], so we need to use [ and ] instead.
34796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34797  if test "x$has_forbidden_chars" != x; then
34798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34800  fi
34801
34802    # Output is in $new_path
34803
34804  windows_path="$new_path"
34805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34806    unix_path=`$CYGPATH -u "$windows_path"`
34807    new_path="$unix_path"
34808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34810    new_path="$unix_path"
34811  fi
34812
34813    # remove trailing .exe if any
34814    new_path="${new_path/%.exe/}"
34815
34816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34818  fi
34819
34820    else
34821      # We're on a unix platform. Hooray! :)
34822      # First separate the path from the arguments. This will split at the first
34823      # space.
34824      complete="$MT"
34825      path="${complete%% *}"
34826      tmp="$complete EOL"
34827      arguments="${tmp#* }"
34828
34829      # Cannot rely on the command "which" here since it doesn't always work.
34830      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34831      if test -z "$is_absolute_path"; then
34832        # Path to executable is not absolute. Find it.
34833        IFS_save="$IFS"
34834        IFS=:
34835        for p in $PATH; do
34836          if test -f "$p/$path" && test -x "$p/$path"; then
34837            new_path="$p/$path"
34838            break
34839          fi
34840        done
34841        IFS="$IFS_save"
34842      else
34843        # This is an absolute path, we can use it without further modifications.
34844        new_path="$path"
34845      fi
34846
34847      if test "x$new_path" = x; then
34848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34849$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34850        has_space=`$ECHO "$complete" | $GREP " "`
34851        if test "x$has_space" != x; then
34852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34854        fi
34855        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34856      fi
34857    fi
34858
34859    # Now join together the path and the arguments once again
34860    if test "x$arguments" != xEOL; then
34861      new_complete="$new_path ${arguments% *}"
34862    else
34863      new_complete="$new_path"
34864    fi
34865
34866    if test "x$complete" != "x$new_complete"; then
34867      MT="$new_complete"
34868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34869$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34870    fi
34871  fi
34872
34873    # Setup the resource compiler (RC)
34874    # Extract the first word of "rc", so it can be a program name with args.
34875set dummy rc; ac_word=$2
34876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34877$as_echo_n "checking for $ac_word... " >&6; }
34878if ${ac_cv_prog_RC+:} false; then :
34879  $as_echo_n "(cached) " >&6
34880else
34881  if test -n "$RC"; then
34882  ac_cv_prog_RC="$RC" # Let the user override the test.
34883else
34884  ac_prog_rejected=no
34885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34886for as_dir in $PATH
34887do
34888  IFS=$as_save_IFS
34889  test -z "$as_dir" && as_dir=.
34890    for ac_exec_ext in '' $ac_executable_extensions; do
34891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34892    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34893       ac_prog_rejected=yes
34894       continue
34895     fi
34896    ac_cv_prog_RC="rc"
34897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34898    break 2
34899  fi
34900done
34901  done
34902IFS=$as_save_IFS
34903
34904if test $ac_prog_rejected = yes; then
34905  # We found a bogon in the path, so make sure we never use it.
34906  set dummy $ac_cv_prog_RC
34907  shift
34908  if test $# != 0; then
34909    # We chose a different compiler from the bogus one.
34910    # However, it has the same basename, so the bogon will be chosen
34911    # first if we set RC to just the basename; use the full file name.
34912    shift
34913    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34914  fi
34915fi
34916fi
34917fi
34918RC=$ac_cv_prog_RC
34919if test -n "$RC"; then
34920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34921$as_echo "$RC" >&6; }
34922else
34923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34924$as_echo "no" >&6; }
34925fi
34926
34927
34928
34929  # Only process if variable expands to non-empty
34930
34931  if test "x$RC" != x; then
34932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34933
34934  # First separate the path from the arguments. This will split at the first
34935  # space.
34936  complete="$RC"
34937  path="${complete%% *}"
34938  tmp="$complete EOL"
34939  arguments="${tmp#* }"
34940
34941  # Input might be given as Windows format, start by converting to
34942  # unix format.
34943  new_path=`$CYGPATH -u "$path"`
34944
34945  # Now try to locate executable using which
34946  new_path=`$WHICH "$new_path" 2> /dev/null`
34947  # bat and cmd files are not always considered executable in cygwin causing which
34948  # to not find them
34949  if test "x$new_path" = x \
34950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34952    new_path=`$CYGPATH -u "$path"`
34953  fi
34954  if test "x$new_path" = x; then
34955    # Oops. Which didn't find the executable.
34956    # The splitting of arguments from the executable at a space might have been incorrect,
34957    # since paths with space are more likely in Windows. Give it another try with the whole
34958    # argument.
34959    path="$complete"
34960    arguments="EOL"
34961    new_path=`$CYGPATH -u "$path"`
34962    new_path=`$WHICH "$new_path" 2> /dev/null`
34963    # bat and cmd files are not always considered executable in cygwin causing which
34964    # to not find them
34965    if test "x$new_path" = x \
34966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34968      new_path=`$CYGPATH -u "$path"`
34969    fi
34970    if test "x$new_path" = x; then
34971      # It's still not found. Now this is an unrecoverable error.
34972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34973$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34974      has_space=`$ECHO "$complete" | $GREP " "`
34975      if test "x$has_space" != x; then
34976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34978      fi
34979      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34980    fi
34981  fi
34982
34983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34986  # "foo.exe" is OK but "foo" is an error.
34987  #
34988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34989  # It is also a way to make sure we got the proper file name for the real test later on.
34990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34991  if test "x$test_shortpath" = x; then
34992    # Short path failed, file does not exist as specified.
34993    # Try adding .exe or .cmd
34994    if test -f "${new_path}.exe"; then
34995      input_to_shortpath="${new_path}.exe"
34996    elif test -f "${new_path}.cmd"; then
34997      input_to_shortpath="${new_path}.cmd"
34998    else
34999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35000$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35003      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35004    fi
35005  else
35006    input_to_shortpath="$new_path"
35007  fi
35008
35009  # Call helper function which possibly converts this using DOS-style short mode.
35010  # If so, the updated path is stored in $new_path.
35011  new_path="$input_to_shortpath"
35012
35013  input_path="$input_to_shortpath"
35014  # Check if we need to convert this using DOS-style short mode. If the path
35015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35016  # take no chances and rewrite it.
35017  # Note: m4 eats our [], so we need to use [ and ] instead.
35018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35019  if test "x$has_forbidden_chars" != x; then
35020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35024      # Going to short mode and back again did indeed matter. Since short mode is
35025      # case insensitive, let's make it lowercase to improve readability.
35026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35027      # Now convert it back to Unix-style (cygpath)
35028      input_path=`$CYGPATH -u "$shortmode_path"`
35029      new_path="$input_path"
35030    fi
35031  fi
35032
35033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35034  if test "x$test_cygdrive_prefix" = x; then
35035    # As a simple fix, exclude /usr/bin since it's not a real path.
35036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35038      # a path prefixed by /cygdrive for fixpath to work.
35039      new_path="$CYGWIN_ROOT_PATH$input_path"
35040    fi
35041  fi
35042
35043  # remove trailing .exe if any
35044  new_path="${new_path/%.exe/}"
35045
35046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35047
35048  # First separate the path from the arguments. This will split at the first
35049  # space.
35050  complete="$RC"
35051  path="${complete%% *}"
35052  tmp="$complete EOL"
35053  arguments="${tmp#* }"
35054
35055  # Input might be given as Windows format, start by converting to
35056  # unix format.
35057  new_path="$path"
35058
35059  windows_path="$new_path"
35060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35061    unix_path=`$CYGPATH -u "$windows_path"`
35062    new_path="$unix_path"
35063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35065    new_path="$unix_path"
35066  fi
35067
35068
35069  # Now try to locate executable using which
35070  new_path=`$WHICH "$new_path" 2> /dev/null`
35071
35072  if test "x$new_path" = x; then
35073    # Oops. Which didn't find the executable.
35074    # The splitting of arguments from the executable at a space might have been incorrect,
35075    # since paths with space are more likely in Windows. Give it another try with the whole
35076    # argument.
35077    path="$complete"
35078    arguments="EOL"
35079    new_path="$path"
35080
35081  windows_path="$new_path"
35082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35083    unix_path=`$CYGPATH -u "$windows_path"`
35084    new_path="$unix_path"
35085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35087    new_path="$unix_path"
35088  fi
35089
35090
35091    new_path=`$WHICH "$new_path" 2> /dev/null`
35092    # bat and cmd files are not always considered executable in MSYS causing which
35093    # to not find them
35094    if test "x$new_path" = x \
35095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35097      new_path="$path"
35098
35099  windows_path="$new_path"
35100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35101    unix_path=`$CYGPATH -u "$windows_path"`
35102    new_path="$unix_path"
35103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35105    new_path="$unix_path"
35106  fi
35107
35108    fi
35109
35110    if test "x$new_path" = x; then
35111      # It's still not found. Now this is an unrecoverable error.
35112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35113$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35114      has_space=`$ECHO "$complete" | $GREP " "`
35115      if test "x$has_space" != x; then
35116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35118      fi
35119      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35120    fi
35121  fi
35122
35123  # Now new_path has a complete unix path to the binary
35124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35125    # Keep paths in /bin as-is, but remove trailing .exe if any
35126    new_path="${new_path/%.exe/}"
35127    # Do not save /bin paths to all_fixpath_prefixes!
35128  else
35129    # Not in mixed or Windows style, start by that.
35130    new_path=`cmd //c echo $new_path`
35131
35132  input_path="$new_path"
35133  # Check if we need to convert this using DOS-style short mode. If the path
35134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35135  # take no chances and rewrite it.
35136  # Note: m4 eats our [], so we need to use [ and ] instead.
35137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35138  if test "x$has_forbidden_chars" != x; then
35139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35141  fi
35142
35143    # Output is in $new_path
35144
35145  windows_path="$new_path"
35146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35147    unix_path=`$CYGPATH -u "$windows_path"`
35148    new_path="$unix_path"
35149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35151    new_path="$unix_path"
35152  fi
35153
35154    # remove trailing .exe if any
35155    new_path="${new_path/%.exe/}"
35156
35157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35159  fi
35160
35161    else
35162      # We're on a unix platform. Hooray! :)
35163      # First separate the path from the arguments. This will split at the first
35164      # space.
35165      complete="$RC"
35166      path="${complete%% *}"
35167      tmp="$complete EOL"
35168      arguments="${tmp#* }"
35169
35170      # Cannot rely on the command "which" here since it doesn't always work.
35171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35172      if test -z "$is_absolute_path"; then
35173        # Path to executable is not absolute. Find it.
35174        IFS_save="$IFS"
35175        IFS=:
35176        for p in $PATH; do
35177          if test -f "$p/$path" && test -x "$p/$path"; then
35178            new_path="$p/$path"
35179            break
35180          fi
35181        done
35182        IFS="$IFS_save"
35183      else
35184        # This is an absolute path, we can use it without further modifications.
35185        new_path="$path"
35186      fi
35187
35188      if test "x$new_path" = x; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35190$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35191        has_space=`$ECHO "$complete" | $GREP " "`
35192        if test "x$has_space" != x; then
35193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35195        fi
35196        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35197      fi
35198    fi
35199
35200    # Now join together the path and the arguments once again
35201    if test "x$arguments" != xEOL; then
35202      new_complete="$new_path ${arguments% *}"
35203    else
35204      new_complete="$new_path"
35205    fi
35206
35207    if test "x$complete" != "x$new_complete"; then
35208      RC="$new_complete"
35209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35210$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35211    fi
35212  fi
35213
35214    # Extract the first word of "dumpbin", so it can be a program name with args.
35215set dummy dumpbin; ac_word=$2
35216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35217$as_echo_n "checking for $ac_word... " >&6; }
35218if ${ac_cv_prog_DUMPBIN+:} false; then :
35219  $as_echo_n "(cached) " >&6
35220else
35221  if test -n "$DUMPBIN"; then
35222  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35223else
35224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35225for as_dir in $PATH
35226do
35227  IFS=$as_save_IFS
35228  test -z "$as_dir" && as_dir=.
35229    for ac_exec_ext in '' $ac_executable_extensions; do
35230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35231    ac_cv_prog_DUMPBIN="dumpbin"
35232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35233    break 2
35234  fi
35235done
35236  done
35237IFS=$as_save_IFS
35238
35239fi
35240fi
35241DUMPBIN=$ac_cv_prog_DUMPBIN
35242if test -n "$DUMPBIN"; then
35243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35244$as_echo "$DUMPBIN" >&6; }
35245else
35246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35247$as_echo "no" >&6; }
35248fi
35249
35250
35251
35252  # Only process if variable expands to non-empty
35253
35254  if test "x$DUMPBIN" != x; then
35255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35256
35257  # First separate the path from the arguments. This will split at the first
35258  # space.
35259  complete="$DUMPBIN"
35260  path="${complete%% *}"
35261  tmp="$complete EOL"
35262  arguments="${tmp#* }"
35263
35264  # Input might be given as Windows format, start by converting to
35265  # unix format.
35266  new_path=`$CYGPATH -u "$path"`
35267
35268  # Now try to locate executable using which
35269  new_path=`$WHICH "$new_path" 2> /dev/null`
35270  # bat and cmd files are not always considered executable in cygwin causing which
35271  # to not find them
35272  if test "x$new_path" = x \
35273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35275    new_path=`$CYGPATH -u "$path"`
35276  fi
35277  if test "x$new_path" = x; then
35278    # Oops. Which didn't find the executable.
35279    # The splitting of arguments from the executable at a space might have been incorrect,
35280    # since paths with space are more likely in Windows. Give it another try with the whole
35281    # argument.
35282    path="$complete"
35283    arguments="EOL"
35284    new_path=`$CYGPATH -u "$path"`
35285    new_path=`$WHICH "$new_path" 2> /dev/null`
35286    # bat and cmd files are not always considered executable in cygwin causing which
35287    # to not find them
35288    if test "x$new_path" = x \
35289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35291      new_path=`$CYGPATH -u "$path"`
35292    fi
35293    if test "x$new_path" = x; then
35294      # It's still not found. Now this is an unrecoverable error.
35295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35296$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35297      has_space=`$ECHO "$complete" | $GREP " "`
35298      if test "x$has_space" != x; then
35299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35301      fi
35302      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35303    fi
35304  fi
35305
35306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35309  # "foo.exe" is OK but "foo" is an error.
35310  #
35311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35312  # It is also a way to make sure we got the proper file name for the real test later on.
35313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35314  if test "x$test_shortpath" = x; then
35315    # Short path failed, file does not exist as specified.
35316    # Try adding .exe or .cmd
35317    if test -f "${new_path}.exe"; then
35318      input_to_shortpath="${new_path}.exe"
35319    elif test -f "${new_path}.cmd"; then
35320      input_to_shortpath="${new_path}.cmd"
35321    else
35322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35323$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35326      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35327    fi
35328  else
35329    input_to_shortpath="$new_path"
35330  fi
35331
35332  # Call helper function which possibly converts this using DOS-style short mode.
35333  # If so, the updated path is stored in $new_path.
35334  new_path="$input_to_shortpath"
35335
35336  input_path="$input_to_shortpath"
35337  # Check if we need to convert this using DOS-style short mode. If the path
35338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35339  # take no chances and rewrite it.
35340  # Note: m4 eats our [], so we need to use [ and ] instead.
35341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35342  if test "x$has_forbidden_chars" != x; then
35343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35347      # Going to short mode and back again did indeed matter. Since short mode is
35348      # case insensitive, let's make it lowercase to improve readability.
35349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35350      # Now convert it back to Unix-style (cygpath)
35351      input_path=`$CYGPATH -u "$shortmode_path"`
35352      new_path="$input_path"
35353    fi
35354  fi
35355
35356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35357  if test "x$test_cygdrive_prefix" = x; then
35358    # As a simple fix, exclude /usr/bin since it's not a real path.
35359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35361      # a path prefixed by /cygdrive for fixpath to work.
35362      new_path="$CYGWIN_ROOT_PATH$input_path"
35363    fi
35364  fi
35365
35366  # remove trailing .exe if any
35367  new_path="${new_path/%.exe/}"
35368
35369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370
35371  # First separate the path from the arguments. This will split at the first
35372  # space.
35373  complete="$DUMPBIN"
35374  path="${complete%% *}"
35375  tmp="$complete EOL"
35376  arguments="${tmp#* }"
35377
35378  # Input might be given as Windows format, start by converting to
35379  # unix format.
35380  new_path="$path"
35381
35382  windows_path="$new_path"
35383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35384    unix_path=`$CYGPATH -u "$windows_path"`
35385    new_path="$unix_path"
35386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35388    new_path="$unix_path"
35389  fi
35390
35391
35392  # Now try to locate executable using which
35393  new_path=`$WHICH "$new_path" 2> /dev/null`
35394
35395  if test "x$new_path" = x; then
35396    # Oops. Which didn't find the executable.
35397    # The splitting of arguments from the executable at a space might have been incorrect,
35398    # since paths with space are more likely in Windows. Give it another try with the whole
35399    # argument.
35400    path="$complete"
35401    arguments="EOL"
35402    new_path="$path"
35403
35404  windows_path="$new_path"
35405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35406    unix_path=`$CYGPATH -u "$windows_path"`
35407    new_path="$unix_path"
35408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35410    new_path="$unix_path"
35411  fi
35412
35413
35414    new_path=`$WHICH "$new_path" 2> /dev/null`
35415    # bat and cmd files are not always considered executable in MSYS causing which
35416    # to not find them
35417    if test "x$new_path" = x \
35418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35420      new_path="$path"
35421
35422  windows_path="$new_path"
35423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35424    unix_path=`$CYGPATH -u "$windows_path"`
35425    new_path="$unix_path"
35426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35428    new_path="$unix_path"
35429  fi
35430
35431    fi
35432
35433    if test "x$new_path" = x; then
35434      # It's still not found. Now this is an unrecoverable error.
35435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35436$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35437      has_space=`$ECHO "$complete" | $GREP " "`
35438      if test "x$has_space" != x; then
35439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35441      fi
35442      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35443    fi
35444  fi
35445
35446  # Now new_path has a complete unix path to the binary
35447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35448    # Keep paths in /bin as-is, but remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450    # Do not save /bin paths to all_fixpath_prefixes!
35451  else
35452    # Not in mixed or Windows style, start by that.
35453    new_path=`cmd //c echo $new_path`
35454
35455  input_path="$new_path"
35456  # Check if we need to convert this using DOS-style short mode. If the path
35457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35458  # take no chances and rewrite it.
35459  # Note: m4 eats our [], so we need to use [ and ] instead.
35460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35461  if test "x$has_forbidden_chars" != x; then
35462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464  fi
35465
35466    # Output is in $new_path
35467
35468  windows_path="$new_path"
35469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35470    unix_path=`$CYGPATH -u "$windows_path"`
35471    new_path="$unix_path"
35472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35474    new_path="$unix_path"
35475  fi
35476
35477    # remove trailing .exe if any
35478    new_path="${new_path/%.exe/}"
35479
35480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35482  fi
35483
35484    else
35485      # We're on a unix platform. Hooray! :)
35486      # First separate the path from the arguments. This will split at the first
35487      # space.
35488      complete="$DUMPBIN"
35489      path="${complete%% *}"
35490      tmp="$complete EOL"
35491      arguments="${tmp#* }"
35492
35493      # Cannot rely on the command "which" here since it doesn't always work.
35494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35495      if test -z "$is_absolute_path"; then
35496        # Path to executable is not absolute. Find it.
35497        IFS_save="$IFS"
35498        IFS=:
35499        for p in $PATH; do
35500          if test -f "$p/$path" && test -x "$p/$path"; then
35501            new_path="$p/$path"
35502            break
35503          fi
35504        done
35505        IFS="$IFS_save"
35506      else
35507        # This is an absolute path, we can use it without further modifications.
35508        new_path="$path"
35509      fi
35510
35511      if test "x$new_path" = x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35513$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35514        has_space=`$ECHO "$complete" | $GREP " "`
35515        if test "x$has_space" != x; then
35516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35518        fi
35519        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35520      fi
35521    fi
35522
35523    # Now join together the path and the arguments once again
35524    if test "x$arguments" != xEOL; then
35525      new_complete="$new_path ${arguments% *}"
35526    else
35527      new_complete="$new_path"
35528    fi
35529
35530    if test "x$complete" != "x$new_complete"; then
35531      DUMPBIN="$new_complete"
35532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35533$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35534    fi
35535  fi
35536
35537    # We need to check for 'msbuild.exe' because at the place where we expect to
35538    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35539    # won't find the 'msbuild.exe' executable in that case (and the
35540    # 'ac_executable_extensions' is unusable due to performance reasons).
35541    # Notice that we intentionally don't fix up the path to MSBUILD because we
35542    # will call it in a DOS shell during freetype detection on Windows (see
35543    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35544    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35545set dummy msbuild.exe; ac_word=$2
35546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35547$as_echo_n "checking for $ac_word... " >&6; }
35548if ${ac_cv_prog_MSBUILD+:} false; then :
35549  $as_echo_n "(cached) " >&6
35550else
35551  if test -n "$MSBUILD"; then
35552  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35553else
35554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35555for as_dir in $PATH
35556do
35557  IFS=$as_save_IFS
35558  test -z "$as_dir" && as_dir=.
35559    for ac_exec_ext in '' $ac_executable_extensions; do
35560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35561    ac_cv_prog_MSBUILD="msbuild.exe"
35562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35563    break 2
35564  fi
35565done
35566  done
35567IFS=$as_save_IFS
35568
35569fi
35570fi
35571MSBUILD=$ac_cv_prog_MSBUILD
35572if test -n "$MSBUILD"; then
35573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35574$as_echo "$MSBUILD" >&6; }
35575else
35576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35577$as_echo "no" >&6; }
35578fi
35579
35580
35581  fi
35582
35583  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35584
35585
35586  # Publish this variable in the help.
35587
35588
35589  if test "x$STRIP" = x; then
35590    # The variable is not set by user, try to locate tool using the code snippet
35591    for ac_prog in strip
35592do
35593  # Extract the first word of "$ac_prog", so it can be a program name with args.
35594set dummy $ac_prog; ac_word=$2
35595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35596$as_echo_n "checking for $ac_word... " >&6; }
35597if ${ac_cv_path_STRIP+:} false; then :
35598  $as_echo_n "(cached) " >&6
35599else
35600  case $STRIP in
35601  [\\/]* | ?:[\\/]*)
35602  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35603  ;;
35604  *)
35605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35606for as_dir in $PATH
35607do
35608  IFS=$as_save_IFS
35609  test -z "$as_dir" && as_dir=.
35610    for ac_exec_ext in '' $ac_executable_extensions; do
35611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35612    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35614    break 2
35615  fi
35616done
35617  done
35618IFS=$as_save_IFS
35619
35620  ;;
35621esac
35622fi
35623STRIP=$ac_cv_path_STRIP
35624if test -n "$STRIP"; then
35625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35626$as_echo "$STRIP" >&6; }
35627else
35628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35629$as_echo "no" >&6; }
35630fi
35631
35632
35633  test -n "$STRIP" && break
35634done
35635
35636  else
35637    # The variable is set, but is it from the command line or the environment?
35638
35639    # Try to remove the string !STRIP! from our list.
35640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35642      # If it failed, the variable was not from the command line. Ignore it,
35643      # but warn the user (except for BASH, which is always set by the calling BASH).
35644      if test "xSTRIP" != xBASH; then
35645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35646$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35647      fi
35648      # Try to locate tool using the code snippet
35649      for ac_prog in strip
35650do
35651  # Extract the first word of "$ac_prog", so it can be a program name with args.
35652set dummy $ac_prog; ac_word=$2
35653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35654$as_echo_n "checking for $ac_word... " >&6; }
35655if ${ac_cv_path_STRIP+:} false; then :
35656  $as_echo_n "(cached) " >&6
35657else
35658  case $STRIP in
35659  [\\/]* | ?:[\\/]*)
35660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35661  ;;
35662  *)
35663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35664for as_dir in $PATH
35665do
35666  IFS=$as_save_IFS
35667  test -z "$as_dir" && as_dir=.
35668    for ac_exec_ext in '' $ac_executable_extensions; do
35669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35672    break 2
35673  fi
35674done
35675  done
35676IFS=$as_save_IFS
35677
35678  ;;
35679esac
35680fi
35681STRIP=$ac_cv_path_STRIP
35682if test -n "$STRIP"; then
35683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35684$as_echo "$STRIP" >&6; }
35685else
35686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35687$as_echo "no" >&6; }
35688fi
35689
35690
35691  test -n "$STRIP" && break
35692done
35693
35694    else
35695      # If it succeeded, then it was overridden by the user. We will use it
35696      # for the tool.
35697
35698      # First remove it from the list of overridden variables, so we can test
35699      # for unknown variables in the end.
35700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35701
35702      # Check if the provided tool contains a complete path.
35703      tool_specified="$STRIP"
35704      tool_basename="${tool_specified##*/}"
35705      if test "x$tool_basename" = "x$tool_specified"; then
35706        # A command without a complete path is provided, search $PATH.
35707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35708$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35709        # Extract the first word of "$tool_basename", so it can be a program name with args.
35710set dummy $tool_basename; ac_word=$2
35711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35712$as_echo_n "checking for $ac_word... " >&6; }
35713if ${ac_cv_path_STRIP+:} false; then :
35714  $as_echo_n "(cached) " >&6
35715else
35716  case $STRIP in
35717  [\\/]* | ?:[\\/]*)
35718  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35719  ;;
35720  *)
35721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35722for as_dir in $PATH
35723do
35724  IFS=$as_save_IFS
35725  test -z "$as_dir" && as_dir=.
35726    for ac_exec_ext in '' $ac_executable_extensions; do
35727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35728    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35730    break 2
35731  fi
35732done
35733  done
35734IFS=$as_save_IFS
35735
35736  ;;
35737esac
35738fi
35739STRIP=$ac_cv_path_STRIP
35740if test -n "$STRIP"; then
35741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35742$as_echo "$STRIP" >&6; }
35743else
35744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35745$as_echo "no" >&6; }
35746fi
35747
35748
35749        if test "x$STRIP" = x; then
35750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35751        fi
35752      else
35753        # Otherwise we believe it is a complete path. Use it as it is.
35754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35755$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35757$as_echo_n "checking for STRIP... " >&6; }
35758        if test ! -x "$tool_specified"; then
35759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35760$as_echo "not found" >&6; }
35761          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35762        fi
35763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35764$as_echo "$tool_specified" >&6; }
35765      fi
35766    fi
35767  fi
35768
35769
35770
35771  # Only process if variable expands to non-empty
35772
35773  if test "x$STRIP" != x; then
35774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35775
35776  # First separate the path from the arguments. This will split at the first
35777  # space.
35778  complete="$STRIP"
35779  path="${complete%% *}"
35780  tmp="$complete EOL"
35781  arguments="${tmp#* }"
35782
35783  # Input might be given as Windows format, start by converting to
35784  # unix format.
35785  new_path=`$CYGPATH -u "$path"`
35786
35787  # Now try to locate executable using which
35788  new_path=`$WHICH "$new_path" 2> /dev/null`
35789  # bat and cmd files are not always considered executable in cygwin causing which
35790  # to not find them
35791  if test "x$new_path" = x \
35792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35794    new_path=`$CYGPATH -u "$path"`
35795  fi
35796  if test "x$new_path" = x; then
35797    # Oops. Which didn't find the executable.
35798    # The splitting of arguments from the executable at a space might have been incorrect,
35799    # since paths with space are more likely in Windows. Give it another try with the whole
35800    # argument.
35801    path="$complete"
35802    arguments="EOL"
35803    new_path=`$CYGPATH -u "$path"`
35804    new_path=`$WHICH "$new_path" 2> /dev/null`
35805    # bat and cmd files are not always considered executable in cygwin causing which
35806    # to not find them
35807    if test "x$new_path" = x \
35808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35810      new_path=`$CYGPATH -u "$path"`
35811    fi
35812    if test "x$new_path" = x; then
35813      # It's still not found. Now this is an unrecoverable error.
35814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35815$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35816      has_space=`$ECHO "$complete" | $GREP " "`
35817      if test "x$has_space" != x; then
35818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35820      fi
35821      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35822    fi
35823  fi
35824
35825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35828  # "foo.exe" is OK but "foo" is an error.
35829  #
35830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35831  # It is also a way to make sure we got the proper file name for the real test later on.
35832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35833  if test "x$test_shortpath" = x; then
35834    # Short path failed, file does not exist as specified.
35835    # Try adding .exe or .cmd
35836    if test -f "${new_path}.exe"; then
35837      input_to_shortpath="${new_path}.exe"
35838    elif test -f "${new_path}.cmd"; then
35839      input_to_shortpath="${new_path}.cmd"
35840    else
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35842$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35845      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35846    fi
35847  else
35848    input_to_shortpath="$new_path"
35849  fi
35850
35851  # Call helper function which possibly converts this using DOS-style short mode.
35852  # If so, the updated path is stored in $new_path.
35853  new_path="$input_to_shortpath"
35854
35855  input_path="$input_to_shortpath"
35856  # Check if we need to convert this using DOS-style short mode. If the path
35857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35858  # take no chances and rewrite it.
35859  # Note: m4 eats our [], so we need to use [ and ] instead.
35860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35861  if test "x$has_forbidden_chars" != x; then
35862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35866      # Going to short mode and back again did indeed matter. Since short mode is
35867      # case insensitive, let's make it lowercase to improve readability.
35868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35869      # Now convert it back to Unix-style (cygpath)
35870      input_path=`$CYGPATH -u "$shortmode_path"`
35871      new_path="$input_path"
35872    fi
35873  fi
35874
35875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35876  if test "x$test_cygdrive_prefix" = x; then
35877    # As a simple fix, exclude /usr/bin since it's not a real path.
35878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35880      # a path prefixed by /cygdrive for fixpath to work.
35881      new_path="$CYGWIN_ROOT_PATH$input_path"
35882    fi
35883  fi
35884
35885  # remove trailing .exe if any
35886  new_path="${new_path/%.exe/}"
35887
35888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35889
35890  # First separate the path from the arguments. This will split at the first
35891  # space.
35892  complete="$STRIP"
35893  path="${complete%% *}"
35894  tmp="$complete EOL"
35895  arguments="${tmp#* }"
35896
35897  # Input might be given as Windows format, start by converting to
35898  # unix format.
35899  new_path="$path"
35900
35901  windows_path="$new_path"
35902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35903    unix_path=`$CYGPATH -u "$windows_path"`
35904    new_path="$unix_path"
35905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35907    new_path="$unix_path"
35908  fi
35909
35910
35911  # Now try to locate executable using which
35912  new_path=`$WHICH "$new_path" 2> /dev/null`
35913
35914  if test "x$new_path" = x; then
35915    # Oops. Which didn't find the executable.
35916    # The splitting of arguments from the executable at a space might have been incorrect,
35917    # since paths with space are more likely in Windows. Give it another try with the whole
35918    # argument.
35919    path="$complete"
35920    arguments="EOL"
35921    new_path="$path"
35922
35923  windows_path="$new_path"
35924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35925    unix_path=`$CYGPATH -u "$windows_path"`
35926    new_path="$unix_path"
35927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35929    new_path="$unix_path"
35930  fi
35931
35932
35933    new_path=`$WHICH "$new_path" 2> /dev/null`
35934    # bat and cmd files are not always considered executable in MSYS causing which
35935    # to not find them
35936    if test "x$new_path" = x \
35937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35939      new_path="$path"
35940
35941  windows_path="$new_path"
35942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35943    unix_path=`$CYGPATH -u "$windows_path"`
35944    new_path="$unix_path"
35945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35947    new_path="$unix_path"
35948  fi
35949
35950    fi
35951
35952    if test "x$new_path" = x; then
35953      # It's still not found. Now this is an unrecoverable error.
35954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35955$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35956      has_space=`$ECHO "$complete" | $GREP " "`
35957      if test "x$has_space" != x; then
35958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35960      fi
35961      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35962    fi
35963  fi
35964
35965  # Now new_path has a complete unix path to the binary
35966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35967    # Keep paths in /bin as-is, but remove trailing .exe if any
35968    new_path="${new_path/%.exe/}"
35969    # Do not save /bin paths to all_fixpath_prefixes!
35970  else
35971    # Not in mixed or Windows style, start by that.
35972    new_path=`cmd //c echo $new_path`
35973
35974  input_path="$new_path"
35975  # Check if we need to convert this using DOS-style short mode. If the path
35976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35977  # take no chances and rewrite it.
35978  # Note: m4 eats our [], so we need to use [ and ] instead.
35979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35980  if test "x$has_forbidden_chars" != x; then
35981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35983  fi
35984
35985    # Output is in $new_path
35986
35987  windows_path="$new_path"
35988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35989    unix_path=`$CYGPATH -u "$windows_path"`
35990    new_path="$unix_path"
35991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35993    new_path="$unix_path"
35994  fi
35995
35996    # remove trailing .exe if any
35997    new_path="${new_path/%.exe/}"
35998
35999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36001  fi
36002
36003    else
36004      # We're on a unix platform. Hooray! :)
36005      # First separate the path from the arguments. This will split at the first
36006      # space.
36007      complete="$STRIP"
36008      path="${complete%% *}"
36009      tmp="$complete EOL"
36010      arguments="${tmp#* }"
36011
36012      # Cannot rely on the command "which" here since it doesn't always work.
36013      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36014      if test -z "$is_absolute_path"; then
36015        # Path to executable is not absolute. Find it.
36016        IFS_save="$IFS"
36017        IFS=:
36018        for p in $PATH; do
36019          if test -f "$p/$path" && test -x "$p/$path"; then
36020            new_path="$p/$path"
36021            break
36022          fi
36023        done
36024        IFS="$IFS_save"
36025      else
36026        # This is an absolute path, we can use it without further modifications.
36027        new_path="$path"
36028      fi
36029
36030      if test "x$new_path" = x; then
36031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36032$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36033        has_space=`$ECHO "$complete" | $GREP " "`
36034        if test "x$has_space" != x; then
36035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36037        fi
36038        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36039      fi
36040    fi
36041
36042    # Now join together the path and the arguments once again
36043    if test "x$arguments" != xEOL; then
36044      new_complete="$new_path ${arguments% *}"
36045    else
36046      new_complete="$new_path"
36047    fi
36048
36049    if test "x$complete" != "x$new_complete"; then
36050      STRIP="$new_complete"
36051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36052$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36053    fi
36054  fi
36055
36056
36057
36058  # Publish this variable in the help.
36059
36060
36061  if test "x$NM" = x; then
36062    # The variable is not set by user, try to locate tool using the code snippet
36063    for ac_prog in nm
36064do
36065  # Extract the first word of "$ac_prog", so it can be a program name with args.
36066set dummy $ac_prog; ac_word=$2
36067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36068$as_echo_n "checking for $ac_word... " >&6; }
36069if ${ac_cv_path_NM+:} false; then :
36070  $as_echo_n "(cached) " >&6
36071else
36072  case $NM in
36073  [\\/]* | ?:[\\/]*)
36074  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36075  ;;
36076  *)
36077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36078for as_dir in $PATH
36079do
36080  IFS=$as_save_IFS
36081  test -z "$as_dir" && as_dir=.
36082    for ac_exec_ext in '' $ac_executable_extensions; do
36083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36084    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36086    break 2
36087  fi
36088done
36089  done
36090IFS=$as_save_IFS
36091
36092  ;;
36093esac
36094fi
36095NM=$ac_cv_path_NM
36096if test -n "$NM"; then
36097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36098$as_echo "$NM" >&6; }
36099else
36100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36101$as_echo "no" >&6; }
36102fi
36103
36104
36105  test -n "$NM" && break
36106done
36107
36108  else
36109    # The variable is set, but is it from the command line or the environment?
36110
36111    # Try to remove the string !NM! from our list.
36112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36114      # If it failed, the variable was not from the command line. Ignore it,
36115      # but warn the user (except for BASH, which is always set by the calling BASH).
36116      if test "xNM" != xBASH; then
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36118$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36119      fi
36120      # Try to locate tool using the code snippet
36121      for ac_prog in nm
36122do
36123  # Extract the first word of "$ac_prog", so it can be a program name with args.
36124set dummy $ac_prog; ac_word=$2
36125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36126$as_echo_n "checking for $ac_word... " >&6; }
36127if ${ac_cv_path_NM+:} false; then :
36128  $as_echo_n "(cached) " >&6
36129else
36130  case $NM in
36131  [\\/]* | ?:[\\/]*)
36132  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36133  ;;
36134  *)
36135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36136for as_dir in $PATH
36137do
36138  IFS=$as_save_IFS
36139  test -z "$as_dir" && as_dir=.
36140    for ac_exec_ext in '' $ac_executable_extensions; do
36141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36142    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36144    break 2
36145  fi
36146done
36147  done
36148IFS=$as_save_IFS
36149
36150  ;;
36151esac
36152fi
36153NM=$ac_cv_path_NM
36154if test -n "$NM"; then
36155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36156$as_echo "$NM" >&6; }
36157else
36158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36159$as_echo "no" >&6; }
36160fi
36161
36162
36163  test -n "$NM" && break
36164done
36165
36166    else
36167      # If it succeeded, then it was overridden by the user. We will use it
36168      # for the tool.
36169
36170      # First remove it from the list of overridden variables, so we can test
36171      # for unknown variables in the end.
36172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36173
36174      # Check if the provided tool contains a complete path.
36175      tool_specified="$NM"
36176      tool_basename="${tool_specified##*/}"
36177      if test "x$tool_basename" = "x$tool_specified"; then
36178        # A command without a complete path is provided, search $PATH.
36179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36180$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36181        # Extract the first word of "$tool_basename", so it can be a program name with args.
36182set dummy $tool_basename; ac_word=$2
36183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36184$as_echo_n "checking for $ac_word... " >&6; }
36185if ${ac_cv_path_NM+:} false; then :
36186  $as_echo_n "(cached) " >&6
36187else
36188  case $NM in
36189  [\\/]* | ?:[\\/]*)
36190  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36191  ;;
36192  *)
36193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36194for as_dir in $PATH
36195do
36196  IFS=$as_save_IFS
36197  test -z "$as_dir" && as_dir=.
36198    for ac_exec_ext in '' $ac_executable_extensions; do
36199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36200    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36202    break 2
36203  fi
36204done
36205  done
36206IFS=$as_save_IFS
36207
36208  ;;
36209esac
36210fi
36211NM=$ac_cv_path_NM
36212if test -n "$NM"; then
36213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36214$as_echo "$NM" >&6; }
36215else
36216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36217$as_echo "no" >&6; }
36218fi
36219
36220
36221        if test "x$NM" = x; then
36222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36223        fi
36224      else
36225        # Otherwise we believe it is a complete path. Use it as it is.
36226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36227$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36229$as_echo_n "checking for NM... " >&6; }
36230        if test ! -x "$tool_specified"; then
36231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36232$as_echo "not found" >&6; }
36233          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36234        fi
36235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36236$as_echo "$tool_specified" >&6; }
36237      fi
36238    fi
36239  fi
36240
36241
36242
36243  # Only process if variable expands to non-empty
36244
36245  if test "x$NM" != x; then
36246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36247
36248  # First separate the path from the arguments. This will split at the first
36249  # space.
36250  complete="$NM"
36251  path="${complete%% *}"
36252  tmp="$complete EOL"
36253  arguments="${tmp#* }"
36254
36255  # Input might be given as Windows format, start by converting to
36256  # unix format.
36257  new_path=`$CYGPATH -u "$path"`
36258
36259  # Now try to locate executable using which
36260  new_path=`$WHICH "$new_path" 2> /dev/null`
36261  # bat and cmd files are not always considered executable in cygwin causing which
36262  # to not find them
36263  if test "x$new_path" = x \
36264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36266    new_path=`$CYGPATH -u "$path"`
36267  fi
36268  if test "x$new_path" = x; then
36269    # Oops. Which didn't find the executable.
36270    # The splitting of arguments from the executable at a space might have been incorrect,
36271    # since paths with space are more likely in Windows. Give it another try with the whole
36272    # argument.
36273    path="$complete"
36274    arguments="EOL"
36275    new_path=`$CYGPATH -u "$path"`
36276    new_path=`$WHICH "$new_path" 2> /dev/null`
36277    # bat and cmd files are not always considered executable in cygwin causing which
36278    # to not find them
36279    if test "x$new_path" = x \
36280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36282      new_path=`$CYGPATH -u "$path"`
36283    fi
36284    if test "x$new_path" = x; then
36285      # It's still not found. Now this is an unrecoverable error.
36286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36287$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36288      has_space=`$ECHO "$complete" | $GREP " "`
36289      if test "x$has_space" != x; then
36290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36292      fi
36293      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36294    fi
36295  fi
36296
36297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36300  # "foo.exe" is OK but "foo" is an error.
36301  #
36302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36303  # It is also a way to make sure we got the proper file name for the real test later on.
36304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36305  if test "x$test_shortpath" = x; then
36306    # Short path failed, file does not exist as specified.
36307    # Try adding .exe or .cmd
36308    if test -f "${new_path}.exe"; then
36309      input_to_shortpath="${new_path}.exe"
36310    elif test -f "${new_path}.cmd"; then
36311      input_to_shortpath="${new_path}.cmd"
36312    else
36313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36314$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36317      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36318    fi
36319  else
36320    input_to_shortpath="$new_path"
36321  fi
36322
36323  # Call helper function which possibly converts this using DOS-style short mode.
36324  # If so, the updated path is stored in $new_path.
36325  new_path="$input_to_shortpath"
36326
36327  input_path="$input_to_shortpath"
36328  # Check if we need to convert this using DOS-style short mode. If the path
36329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36330  # take no chances and rewrite it.
36331  # Note: m4 eats our [], so we need to use [ and ] instead.
36332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36333  if test "x$has_forbidden_chars" != x; then
36334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36338      # Going to short mode and back again did indeed matter. Since short mode is
36339      # case insensitive, let's make it lowercase to improve readability.
36340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36341      # Now convert it back to Unix-style (cygpath)
36342      input_path=`$CYGPATH -u "$shortmode_path"`
36343      new_path="$input_path"
36344    fi
36345  fi
36346
36347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36348  if test "x$test_cygdrive_prefix" = x; then
36349    # As a simple fix, exclude /usr/bin since it's not a real path.
36350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36352      # a path prefixed by /cygdrive for fixpath to work.
36353      new_path="$CYGWIN_ROOT_PATH$input_path"
36354    fi
36355  fi
36356
36357  # remove trailing .exe if any
36358  new_path="${new_path/%.exe/}"
36359
36360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36361
36362  # First separate the path from the arguments. This will split at the first
36363  # space.
36364  complete="$NM"
36365  path="${complete%% *}"
36366  tmp="$complete EOL"
36367  arguments="${tmp#* }"
36368
36369  # Input might be given as Windows format, start by converting to
36370  # unix format.
36371  new_path="$path"
36372
36373  windows_path="$new_path"
36374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36375    unix_path=`$CYGPATH -u "$windows_path"`
36376    new_path="$unix_path"
36377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36379    new_path="$unix_path"
36380  fi
36381
36382
36383  # Now try to locate executable using which
36384  new_path=`$WHICH "$new_path" 2> /dev/null`
36385
36386  if test "x$new_path" = x; then
36387    # Oops. Which didn't find the executable.
36388    # The splitting of arguments from the executable at a space might have been incorrect,
36389    # since paths with space are more likely in Windows. Give it another try with the whole
36390    # argument.
36391    path="$complete"
36392    arguments="EOL"
36393    new_path="$path"
36394
36395  windows_path="$new_path"
36396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36397    unix_path=`$CYGPATH -u "$windows_path"`
36398    new_path="$unix_path"
36399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36401    new_path="$unix_path"
36402  fi
36403
36404
36405    new_path=`$WHICH "$new_path" 2> /dev/null`
36406    # bat and cmd files are not always considered executable in MSYS causing which
36407    # to not find them
36408    if test "x$new_path" = x \
36409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36411      new_path="$path"
36412
36413  windows_path="$new_path"
36414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415    unix_path=`$CYGPATH -u "$windows_path"`
36416    new_path="$unix_path"
36417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36419    new_path="$unix_path"
36420  fi
36421
36422    fi
36423
36424    if test "x$new_path" = x; then
36425      # It's still not found. Now this is an unrecoverable error.
36426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36427$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36428      has_space=`$ECHO "$complete" | $GREP " "`
36429      if test "x$has_space" != x; then
36430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36432      fi
36433      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36434    fi
36435  fi
36436
36437  # Now new_path has a complete unix path to the binary
36438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36439    # Keep paths in /bin as-is, but remove trailing .exe if any
36440    new_path="${new_path/%.exe/}"
36441    # Do not save /bin paths to all_fixpath_prefixes!
36442  else
36443    # Not in mixed or Windows style, start by that.
36444    new_path=`cmd //c echo $new_path`
36445
36446  input_path="$new_path"
36447  # Check if we need to convert this using DOS-style short mode. If the path
36448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36449  # take no chances and rewrite it.
36450  # Note: m4 eats our [], so we need to use [ and ] instead.
36451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36452  if test "x$has_forbidden_chars" != x; then
36453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36455  fi
36456
36457    # Output is in $new_path
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468    # remove trailing .exe if any
36469    new_path="${new_path/%.exe/}"
36470
36471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36473  fi
36474
36475    else
36476      # We're on a unix platform. Hooray! :)
36477      # First separate the path from the arguments. This will split at the first
36478      # space.
36479      complete="$NM"
36480      path="${complete%% *}"
36481      tmp="$complete EOL"
36482      arguments="${tmp#* }"
36483
36484      # Cannot rely on the command "which" here since it doesn't always work.
36485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36486      if test -z "$is_absolute_path"; then
36487        # Path to executable is not absolute. Find it.
36488        IFS_save="$IFS"
36489        IFS=:
36490        for p in $PATH; do
36491          if test -f "$p/$path" && test -x "$p/$path"; then
36492            new_path="$p/$path"
36493            break
36494          fi
36495        done
36496        IFS="$IFS_save"
36497      else
36498        # This is an absolute path, we can use it without further modifications.
36499        new_path="$path"
36500      fi
36501
36502      if test "x$new_path" = x; then
36503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36504$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36505        has_space=`$ECHO "$complete" | $GREP " "`
36506        if test "x$has_space" != x; then
36507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36509        fi
36510        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36511      fi
36512    fi
36513
36514    # Now join together the path and the arguments once again
36515    if test "x$arguments" != xEOL; then
36516      new_complete="$new_path ${arguments% *}"
36517    else
36518      new_complete="$new_path"
36519    fi
36520
36521    if test "x$complete" != "x$new_complete"; then
36522      NM="$new_complete"
36523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36524$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36525    fi
36526  fi
36527
36528
36529
36530  # Publish this variable in the help.
36531
36532
36533  if test "x$GNM" = x; then
36534    # The variable is not set by user, try to locate tool using the code snippet
36535    for ac_prog in gnm
36536do
36537  # Extract the first word of "$ac_prog", so it can be a program name with args.
36538set dummy $ac_prog; ac_word=$2
36539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36540$as_echo_n "checking for $ac_word... " >&6; }
36541if ${ac_cv_path_GNM+:} false; then :
36542  $as_echo_n "(cached) " >&6
36543else
36544  case $GNM in
36545  [\\/]* | ?:[\\/]*)
36546  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36547  ;;
36548  *)
36549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36550for as_dir in $PATH
36551do
36552  IFS=$as_save_IFS
36553  test -z "$as_dir" && as_dir=.
36554    for ac_exec_ext in '' $ac_executable_extensions; do
36555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36556    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36558    break 2
36559  fi
36560done
36561  done
36562IFS=$as_save_IFS
36563
36564  ;;
36565esac
36566fi
36567GNM=$ac_cv_path_GNM
36568if test -n "$GNM"; then
36569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36570$as_echo "$GNM" >&6; }
36571else
36572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574fi
36575
36576
36577  test -n "$GNM" && break
36578done
36579
36580  else
36581    # The variable is set, but is it from the command line or the environment?
36582
36583    # Try to remove the string !GNM! from our list.
36584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36586      # If it failed, the variable was not from the command line. Ignore it,
36587      # but warn the user (except for BASH, which is always set by the calling BASH).
36588      if test "xGNM" != xBASH; then
36589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36590$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36591      fi
36592      # Try to locate tool using the code snippet
36593      for ac_prog in gnm
36594do
36595  # Extract the first word of "$ac_prog", so it can be a program name with args.
36596set dummy $ac_prog; ac_word=$2
36597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36598$as_echo_n "checking for $ac_word... " >&6; }
36599if ${ac_cv_path_GNM+:} false; then :
36600  $as_echo_n "(cached) " >&6
36601else
36602  case $GNM in
36603  [\\/]* | ?:[\\/]*)
36604  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36605  ;;
36606  *)
36607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36608for as_dir in $PATH
36609do
36610  IFS=$as_save_IFS
36611  test -z "$as_dir" && as_dir=.
36612    for ac_exec_ext in '' $ac_executable_extensions; do
36613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36614    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36616    break 2
36617  fi
36618done
36619  done
36620IFS=$as_save_IFS
36621
36622  ;;
36623esac
36624fi
36625GNM=$ac_cv_path_GNM
36626if test -n "$GNM"; then
36627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36628$as_echo "$GNM" >&6; }
36629else
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36631$as_echo "no" >&6; }
36632fi
36633
36634
36635  test -n "$GNM" && break
36636done
36637
36638    else
36639      # If it succeeded, then it was overridden by the user. We will use it
36640      # for the tool.
36641
36642      # First remove it from the list of overridden variables, so we can test
36643      # for unknown variables in the end.
36644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36645
36646      # Check if the provided tool contains a complete path.
36647      tool_specified="$GNM"
36648      tool_basename="${tool_specified##*/}"
36649      if test "x$tool_basename" = "x$tool_specified"; then
36650        # A command without a complete path is provided, search $PATH.
36651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36652$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36653        # Extract the first word of "$tool_basename", so it can be a program name with args.
36654set dummy $tool_basename; ac_word=$2
36655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36656$as_echo_n "checking for $ac_word... " >&6; }
36657if ${ac_cv_path_GNM+:} false; then :
36658  $as_echo_n "(cached) " >&6
36659else
36660  case $GNM in
36661  [\\/]* | ?:[\\/]*)
36662  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36663  ;;
36664  *)
36665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36666for as_dir in $PATH
36667do
36668  IFS=$as_save_IFS
36669  test -z "$as_dir" && as_dir=.
36670    for ac_exec_ext in '' $ac_executable_extensions; do
36671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36672    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36674    break 2
36675  fi
36676done
36677  done
36678IFS=$as_save_IFS
36679
36680  ;;
36681esac
36682fi
36683GNM=$ac_cv_path_GNM
36684if test -n "$GNM"; then
36685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36686$as_echo "$GNM" >&6; }
36687else
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36689$as_echo "no" >&6; }
36690fi
36691
36692
36693        if test "x$GNM" = x; then
36694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36695        fi
36696      else
36697        # Otherwise we believe it is a complete path. Use it as it is.
36698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36699$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36701$as_echo_n "checking for GNM... " >&6; }
36702        if test ! -x "$tool_specified"; then
36703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36704$as_echo "not found" >&6; }
36705          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36706        fi
36707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36708$as_echo "$tool_specified" >&6; }
36709      fi
36710    fi
36711  fi
36712
36713
36714
36715  # Only process if variable expands to non-empty
36716
36717  if test "x$GNM" != x; then
36718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36719
36720  # First separate the path from the arguments. This will split at the first
36721  # space.
36722  complete="$GNM"
36723  path="${complete%% *}"
36724  tmp="$complete EOL"
36725  arguments="${tmp#* }"
36726
36727  # Input might be given as Windows format, start by converting to
36728  # unix format.
36729  new_path=`$CYGPATH -u "$path"`
36730
36731  # Now try to locate executable using which
36732  new_path=`$WHICH "$new_path" 2> /dev/null`
36733  # bat and cmd files are not always considered executable in cygwin causing which
36734  # to not find them
36735  if test "x$new_path" = x \
36736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36738    new_path=`$CYGPATH -u "$path"`
36739  fi
36740  if test "x$new_path" = x; then
36741    # Oops. Which didn't find the executable.
36742    # The splitting of arguments from the executable at a space might have been incorrect,
36743    # since paths with space are more likely in Windows. Give it another try with the whole
36744    # argument.
36745    path="$complete"
36746    arguments="EOL"
36747    new_path=`$CYGPATH -u "$path"`
36748    new_path=`$WHICH "$new_path" 2> /dev/null`
36749    # bat and cmd files are not always considered executable in cygwin causing which
36750    # to not find them
36751    if test "x$new_path" = x \
36752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36754      new_path=`$CYGPATH -u "$path"`
36755    fi
36756    if test "x$new_path" = x; then
36757      # It's still not found. Now this is an unrecoverable error.
36758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36759$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36760      has_space=`$ECHO "$complete" | $GREP " "`
36761      if test "x$has_space" != x; then
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36764      fi
36765      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36766    fi
36767  fi
36768
36769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36772  # "foo.exe" is OK but "foo" is an error.
36773  #
36774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36775  # It is also a way to make sure we got the proper file name for the real test later on.
36776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36777  if test "x$test_shortpath" = x; then
36778    # Short path failed, file does not exist as specified.
36779    # Try adding .exe or .cmd
36780    if test -f "${new_path}.exe"; then
36781      input_to_shortpath="${new_path}.exe"
36782    elif test -f "${new_path}.cmd"; then
36783      input_to_shortpath="${new_path}.cmd"
36784    else
36785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36786$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36789      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36790    fi
36791  else
36792    input_to_shortpath="$new_path"
36793  fi
36794
36795  # Call helper function which possibly converts this using DOS-style short mode.
36796  # If so, the updated path is stored in $new_path.
36797  new_path="$input_to_shortpath"
36798
36799  input_path="$input_to_shortpath"
36800  # Check if we need to convert this using DOS-style short mode. If the path
36801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36802  # take no chances and rewrite it.
36803  # Note: m4 eats our [], so we need to use [ and ] instead.
36804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36805  if test "x$has_forbidden_chars" != x; then
36806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36810      # Going to short mode and back again did indeed matter. Since short mode is
36811      # case insensitive, let's make it lowercase to improve readability.
36812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36813      # Now convert it back to Unix-style (cygpath)
36814      input_path=`$CYGPATH -u "$shortmode_path"`
36815      new_path="$input_path"
36816    fi
36817  fi
36818
36819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36820  if test "x$test_cygdrive_prefix" = x; then
36821    # As a simple fix, exclude /usr/bin since it's not a real path.
36822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36824      # a path prefixed by /cygdrive for fixpath to work.
36825      new_path="$CYGWIN_ROOT_PATH$input_path"
36826    fi
36827  fi
36828
36829  # remove trailing .exe if any
36830  new_path="${new_path/%.exe/}"
36831
36832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833
36834  # First separate the path from the arguments. This will split at the first
36835  # space.
36836  complete="$GNM"
36837  path="${complete%% *}"
36838  tmp="$complete EOL"
36839  arguments="${tmp#* }"
36840
36841  # Input might be given as Windows format, start by converting to
36842  # unix format.
36843  new_path="$path"
36844
36845  windows_path="$new_path"
36846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36847    unix_path=`$CYGPATH -u "$windows_path"`
36848    new_path="$unix_path"
36849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36851    new_path="$unix_path"
36852  fi
36853
36854
36855  # Now try to locate executable using which
36856  new_path=`$WHICH "$new_path" 2> /dev/null`
36857
36858  if test "x$new_path" = x; then
36859    # Oops. Which didn't find the executable.
36860    # The splitting of arguments from the executable at a space might have been incorrect,
36861    # since paths with space are more likely in Windows. Give it another try with the whole
36862    # argument.
36863    path="$complete"
36864    arguments="EOL"
36865    new_path="$path"
36866
36867  windows_path="$new_path"
36868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36869    unix_path=`$CYGPATH -u "$windows_path"`
36870    new_path="$unix_path"
36871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36873    new_path="$unix_path"
36874  fi
36875
36876
36877    new_path=`$WHICH "$new_path" 2> /dev/null`
36878    # bat and cmd files are not always considered executable in MSYS causing which
36879    # to not find them
36880    if test "x$new_path" = x \
36881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36883      new_path="$path"
36884
36885  windows_path="$new_path"
36886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36887    unix_path=`$CYGPATH -u "$windows_path"`
36888    new_path="$unix_path"
36889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36891    new_path="$unix_path"
36892  fi
36893
36894    fi
36895
36896    if test "x$new_path" = x; then
36897      # It's still not found. Now this is an unrecoverable error.
36898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36899$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36900      has_space=`$ECHO "$complete" | $GREP " "`
36901      if test "x$has_space" != x; then
36902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36904      fi
36905      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36906    fi
36907  fi
36908
36909  # Now new_path has a complete unix path to the binary
36910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36911    # Keep paths in /bin as-is, but remove trailing .exe if any
36912    new_path="${new_path/%.exe/}"
36913    # Do not save /bin paths to all_fixpath_prefixes!
36914  else
36915    # Not in mixed or Windows style, start by that.
36916    new_path=`cmd //c echo $new_path`
36917
36918  input_path="$new_path"
36919  # Check if we need to convert this using DOS-style short mode. If the path
36920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36921  # take no chances and rewrite it.
36922  # Note: m4 eats our [], so we need to use [ and ] instead.
36923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36924  if test "x$has_forbidden_chars" != x; then
36925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36927  fi
36928
36929    # Output is in $new_path
36930
36931  windows_path="$new_path"
36932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36933    unix_path=`$CYGPATH -u "$windows_path"`
36934    new_path="$unix_path"
36935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36937    new_path="$unix_path"
36938  fi
36939
36940    # remove trailing .exe if any
36941    new_path="${new_path/%.exe/}"
36942
36943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36945  fi
36946
36947    else
36948      # We're on a unix platform. Hooray! :)
36949      # First separate the path from the arguments. This will split at the first
36950      # space.
36951      complete="$GNM"
36952      path="${complete%% *}"
36953      tmp="$complete EOL"
36954      arguments="${tmp#* }"
36955
36956      # Cannot rely on the command "which" here since it doesn't always work.
36957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36958      if test -z "$is_absolute_path"; then
36959        # Path to executable is not absolute. Find it.
36960        IFS_save="$IFS"
36961        IFS=:
36962        for p in $PATH; do
36963          if test -f "$p/$path" && test -x "$p/$path"; then
36964            new_path="$p/$path"
36965            break
36966          fi
36967        done
36968        IFS="$IFS_save"
36969      else
36970        # This is an absolute path, we can use it without further modifications.
36971        new_path="$path"
36972      fi
36973
36974      if test "x$new_path" = x; then
36975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36976$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36977        has_space=`$ECHO "$complete" | $GREP " "`
36978        if test "x$has_space" != x; then
36979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36981        fi
36982        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36983      fi
36984    fi
36985
36986    # Now join together the path and the arguments once again
36987    if test "x$arguments" != xEOL; then
36988      new_complete="$new_path ${arguments% *}"
36989    else
36990      new_complete="$new_path"
36991    fi
36992
36993    if test "x$complete" != "x$new_complete"; then
36994      GNM="$new_complete"
36995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36996$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36997    fi
36998  fi
36999
37000  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37001    # FIXME: we should unify this with the solaris case above.
37002
37003
37004  # Publish this variable in the help.
37005
37006
37007  if test "x$STRIP" = x; then
37008    # The variable is not set by user, try to locate tool using the code snippet
37009    if test -n "$ac_tool_prefix"; then
37010  for ac_prog in strip
37011  do
37012    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37013set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37015$as_echo_n "checking for $ac_word... " >&6; }
37016if ${ac_cv_prog_STRIP+:} false; then :
37017  $as_echo_n "(cached) " >&6
37018else
37019  if test -n "$STRIP"; then
37020  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37021else
37022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37023for as_dir in $PATH
37024do
37025  IFS=$as_save_IFS
37026  test -z "$as_dir" && as_dir=.
37027    for ac_exec_ext in '' $ac_executable_extensions; do
37028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37029    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37031    break 2
37032  fi
37033done
37034  done
37035IFS=$as_save_IFS
37036
37037fi
37038fi
37039STRIP=$ac_cv_prog_STRIP
37040if test -n "$STRIP"; then
37041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37042$as_echo "$STRIP" >&6; }
37043else
37044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37045$as_echo "no" >&6; }
37046fi
37047
37048
37049    test -n "$STRIP" && break
37050  done
37051fi
37052if test -z "$STRIP"; then
37053  ac_ct_STRIP=$STRIP
37054  for ac_prog in strip
37055do
37056  # Extract the first word of "$ac_prog", so it can be a program name with args.
37057set dummy $ac_prog; ac_word=$2
37058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37059$as_echo_n "checking for $ac_word... " >&6; }
37060if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37061  $as_echo_n "(cached) " >&6
37062else
37063  if test -n "$ac_ct_STRIP"; then
37064  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37065else
37066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37067for as_dir in $PATH
37068do
37069  IFS=$as_save_IFS
37070  test -z "$as_dir" && as_dir=.
37071    for ac_exec_ext in '' $ac_executable_extensions; do
37072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37073    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37075    break 2
37076  fi
37077done
37078  done
37079IFS=$as_save_IFS
37080
37081fi
37082fi
37083ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37084if test -n "$ac_ct_STRIP"; then
37085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37086$as_echo "$ac_ct_STRIP" >&6; }
37087else
37088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37089$as_echo "no" >&6; }
37090fi
37091
37092
37093  test -n "$ac_ct_STRIP" && break
37094done
37095
37096  if test "x$ac_ct_STRIP" = x; then
37097    STRIP=""
37098  else
37099    case $cross_compiling:$ac_tool_warned in
37100yes:)
37101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37103ac_tool_warned=yes ;;
37104esac
37105    STRIP=$ac_ct_STRIP
37106  fi
37107fi
37108
37109  else
37110    # The variable is set, but is it from the command line or the environment?
37111
37112    # Try to remove the string !STRIP! from our list.
37113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37115      # If it failed, the variable was not from the command line. Ignore it,
37116      # but warn the user (except for BASH, which is always set by the calling BASH).
37117      if test "xSTRIP" != xBASH; then
37118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37119$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37120      fi
37121      # Try to locate tool using the code snippet
37122      if test -n "$ac_tool_prefix"; then
37123  for ac_prog in strip
37124  do
37125    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37126set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37128$as_echo_n "checking for $ac_word... " >&6; }
37129if ${ac_cv_prog_STRIP+:} false; then :
37130  $as_echo_n "(cached) " >&6
37131else
37132  if test -n "$STRIP"; then
37133  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37134else
37135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37136for as_dir in $PATH
37137do
37138  IFS=$as_save_IFS
37139  test -z "$as_dir" && as_dir=.
37140    for ac_exec_ext in '' $ac_executable_extensions; do
37141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37142    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37144    break 2
37145  fi
37146done
37147  done
37148IFS=$as_save_IFS
37149
37150fi
37151fi
37152STRIP=$ac_cv_prog_STRIP
37153if test -n "$STRIP"; then
37154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37155$as_echo "$STRIP" >&6; }
37156else
37157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37158$as_echo "no" >&6; }
37159fi
37160
37161
37162    test -n "$STRIP" && break
37163  done
37164fi
37165if test -z "$STRIP"; then
37166  ac_ct_STRIP=$STRIP
37167  for ac_prog in strip
37168do
37169  # Extract the first word of "$ac_prog", so it can be a program name with args.
37170set dummy $ac_prog; ac_word=$2
37171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37172$as_echo_n "checking for $ac_word... " >&6; }
37173if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37174  $as_echo_n "(cached) " >&6
37175else
37176  if test -n "$ac_ct_STRIP"; then
37177  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37178else
37179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37180for as_dir in $PATH
37181do
37182  IFS=$as_save_IFS
37183  test -z "$as_dir" && as_dir=.
37184    for ac_exec_ext in '' $ac_executable_extensions; do
37185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37186    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37188    break 2
37189  fi
37190done
37191  done
37192IFS=$as_save_IFS
37193
37194fi
37195fi
37196ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37197if test -n "$ac_ct_STRIP"; then
37198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37199$as_echo "$ac_ct_STRIP" >&6; }
37200else
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37202$as_echo "no" >&6; }
37203fi
37204
37205
37206  test -n "$ac_ct_STRIP" && break
37207done
37208
37209  if test "x$ac_ct_STRIP" = x; then
37210    STRIP=""
37211  else
37212    case $cross_compiling:$ac_tool_warned in
37213yes:)
37214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37216ac_tool_warned=yes ;;
37217esac
37218    STRIP=$ac_ct_STRIP
37219  fi
37220fi
37221
37222    else
37223      # If it succeeded, then it was overridden by the user. We will use it
37224      # for the tool.
37225
37226      # First remove it from the list of overridden variables, so we can test
37227      # for unknown variables in the end.
37228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37229
37230      # Check if the provided tool contains a complete path.
37231      tool_specified="$STRIP"
37232      tool_basename="${tool_specified##*/}"
37233      if test "x$tool_basename" = "x$tool_specified"; then
37234        # A command without a complete path is provided, search $PATH.
37235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37236$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37237        # Extract the first word of "$tool_basename", so it can be a program name with args.
37238set dummy $tool_basename; ac_word=$2
37239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37240$as_echo_n "checking for $ac_word... " >&6; }
37241if ${ac_cv_path_STRIP+:} false; then :
37242  $as_echo_n "(cached) " >&6
37243else
37244  case $STRIP in
37245  [\\/]* | ?:[\\/]*)
37246  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37247  ;;
37248  *)
37249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264  ;;
37265esac
37266fi
37267STRIP=$ac_cv_path_STRIP
37268if test -n "$STRIP"; then
37269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37270$as_echo "$STRIP" >&6; }
37271else
37272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37273$as_echo "no" >&6; }
37274fi
37275
37276
37277        if test "x$STRIP" = x; then
37278          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37279        fi
37280      else
37281        # Otherwise we believe it is a complete path. Use it as it is.
37282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37283$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37285$as_echo_n "checking for STRIP... " >&6; }
37286        if test ! -x "$tool_specified"; then
37287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37288$as_echo "not found" >&6; }
37289          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37290        fi
37291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37292$as_echo "$tool_specified" >&6; }
37293      fi
37294    fi
37295  fi
37296
37297
37298
37299  # Only process if variable expands to non-empty
37300
37301  if test "x$STRIP" != x; then
37302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37303
37304  # First separate the path from the arguments. This will split at the first
37305  # space.
37306  complete="$STRIP"
37307  path="${complete%% *}"
37308  tmp="$complete EOL"
37309  arguments="${tmp#* }"
37310
37311  # Input might be given as Windows format, start by converting to
37312  # unix format.
37313  new_path=`$CYGPATH -u "$path"`
37314
37315  # Now try to locate executable using which
37316  new_path=`$WHICH "$new_path" 2> /dev/null`
37317  # bat and cmd files are not always considered executable in cygwin causing which
37318  # to not find them
37319  if test "x$new_path" = x \
37320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37322    new_path=`$CYGPATH -u "$path"`
37323  fi
37324  if test "x$new_path" = x; then
37325    # Oops. Which didn't find the executable.
37326    # The splitting of arguments from the executable at a space might have been incorrect,
37327    # since paths with space are more likely in Windows. Give it another try with the whole
37328    # argument.
37329    path="$complete"
37330    arguments="EOL"
37331    new_path=`$CYGPATH -u "$path"`
37332    new_path=`$WHICH "$new_path" 2> /dev/null`
37333    # bat and cmd files are not always considered executable in cygwin causing which
37334    # to not find them
37335    if test "x$new_path" = x \
37336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37338      new_path=`$CYGPATH -u "$path"`
37339    fi
37340    if test "x$new_path" = x; then
37341      # It's still not found. Now this is an unrecoverable error.
37342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37343$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37344      has_space=`$ECHO "$complete" | $GREP " "`
37345      if test "x$has_space" != x; then
37346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37348      fi
37349      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37350    fi
37351  fi
37352
37353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37356  # "foo.exe" is OK but "foo" is an error.
37357  #
37358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37359  # It is also a way to make sure we got the proper file name for the real test later on.
37360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37361  if test "x$test_shortpath" = x; then
37362    # Short path failed, file does not exist as specified.
37363    # Try adding .exe or .cmd
37364    if test -f "${new_path}.exe"; then
37365      input_to_shortpath="${new_path}.exe"
37366    elif test -f "${new_path}.cmd"; then
37367      input_to_shortpath="${new_path}.cmd"
37368    else
37369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37370$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37373      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37374    fi
37375  else
37376    input_to_shortpath="$new_path"
37377  fi
37378
37379  # Call helper function which possibly converts this using DOS-style short mode.
37380  # If so, the updated path is stored in $new_path.
37381  new_path="$input_to_shortpath"
37382
37383  input_path="$input_to_shortpath"
37384  # Check if we need to convert this using DOS-style short mode. If the path
37385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37386  # take no chances and rewrite it.
37387  # Note: m4 eats our [], so we need to use [ and ] instead.
37388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37389  if test "x$has_forbidden_chars" != x; then
37390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37394      # Going to short mode and back again did indeed matter. Since short mode is
37395      # case insensitive, let's make it lowercase to improve readability.
37396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37397      # Now convert it back to Unix-style (cygpath)
37398      input_path=`$CYGPATH -u "$shortmode_path"`
37399      new_path="$input_path"
37400    fi
37401  fi
37402
37403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37404  if test "x$test_cygdrive_prefix" = x; then
37405    # As a simple fix, exclude /usr/bin since it's not a real path.
37406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37408      # a path prefixed by /cygdrive for fixpath to work.
37409      new_path="$CYGWIN_ROOT_PATH$input_path"
37410    fi
37411  fi
37412
37413  # remove trailing .exe if any
37414  new_path="${new_path/%.exe/}"
37415
37416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37417
37418  # First separate the path from the arguments. This will split at the first
37419  # space.
37420  complete="$STRIP"
37421  path="${complete%% *}"
37422  tmp="$complete EOL"
37423  arguments="${tmp#* }"
37424
37425  # Input might be given as Windows format, start by converting to
37426  # unix format.
37427  new_path="$path"
37428
37429  windows_path="$new_path"
37430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37431    unix_path=`$CYGPATH -u "$windows_path"`
37432    new_path="$unix_path"
37433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37435    new_path="$unix_path"
37436  fi
37437
37438
37439  # Now try to locate executable using which
37440  new_path=`$WHICH "$new_path" 2> /dev/null`
37441
37442  if test "x$new_path" = x; then
37443    # Oops. Which didn't find the executable.
37444    # The splitting of arguments from the executable at a space might have been incorrect,
37445    # since paths with space are more likely in Windows. Give it another try with the whole
37446    # argument.
37447    path="$complete"
37448    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
37462    # bat and cmd files are not always considered executable in MSYS causing which
37463    # to not find them
37464    if test "x$new_path" = x \
37465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37467      new_path="$path"
37468
37469  windows_path="$new_path"
37470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37471    unix_path=`$CYGPATH -u "$windows_path"`
37472    new_path="$unix_path"
37473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37475    new_path="$unix_path"
37476  fi
37477
37478    fi
37479
37480    if test "x$new_path" = x; then
37481      # It's still not found. Now this is an unrecoverable error.
37482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37483$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37484      has_space=`$ECHO "$complete" | $GREP " "`
37485      if test "x$has_space" != x; then
37486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37488      fi
37489      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37490    fi
37491  fi
37492
37493  # Now new_path has a complete unix path to the binary
37494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37495    # Keep paths in /bin as-is, but remove trailing .exe if any
37496    new_path="${new_path/%.exe/}"
37497    # Do not save /bin paths to all_fixpath_prefixes!
37498  else
37499    # Not in mixed or Windows style, start by that.
37500    new_path=`cmd //c echo $new_path`
37501
37502  input_path="$new_path"
37503  # Check if we need to convert this using DOS-style short mode. If the path
37504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37505  # take no chances and rewrite it.
37506  # Note: m4 eats our [], so we need to use [ and ] instead.
37507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37508  if test "x$has_forbidden_chars" != x; then
37509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37511  fi
37512
37513    # Output is in $new_path
37514
37515  windows_path="$new_path"
37516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37517    unix_path=`$CYGPATH -u "$windows_path"`
37518    new_path="$unix_path"
37519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37521    new_path="$unix_path"
37522  fi
37523
37524    # remove trailing .exe if any
37525    new_path="${new_path/%.exe/}"
37526
37527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37529  fi
37530
37531    else
37532      # We're on a unix platform. Hooray! :)
37533      # First separate the path from the arguments. This will split at the first
37534      # space.
37535      complete="$STRIP"
37536      path="${complete%% *}"
37537      tmp="$complete EOL"
37538      arguments="${tmp#* }"
37539
37540      # Cannot rely on the command "which" here since it doesn't always work.
37541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37542      if test -z "$is_absolute_path"; then
37543        # Path to executable is not absolute. Find it.
37544        IFS_save="$IFS"
37545        IFS=:
37546        for p in $PATH; do
37547          if test -f "$p/$path" && test -x "$p/$path"; then
37548            new_path="$p/$path"
37549            break
37550          fi
37551        done
37552        IFS="$IFS_save"
37553      else
37554        # This is an absolute path, we can use it without further modifications.
37555        new_path="$path"
37556      fi
37557
37558      if test "x$new_path" = x; then
37559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37560$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37561        has_space=`$ECHO "$complete" | $GREP " "`
37562        if test "x$has_space" != x; then
37563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37565        fi
37566        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37567      fi
37568    fi
37569
37570    # Now join together the path and the arguments once again
37571    if test "x$arguments" != xEOL; then
37572      new_complete="$new_path ${arguments% *}"
37573    else
37574      new_complete="$new_path"
37575    fi
37576
37577    if test "x$complete" != "x$new_complete"; then
37578      STRIP="$new_complete"
37579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37580$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37581    fi
37582  fi
37583
37584
37585
37586  # Publish this variable in the help.
37587
37588
37589  if test "x$NM" = x; then
37590    # The variable is not set by user, try to locate tool using the code snippet
37591    if test -n "$ac_tool_prefix"; then
37592  for ac_prog in nm
37593  do
37594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37597$as_echo_n "checking for $ac_word... " >&6; }
37598if ${ac_cv_prog_NM+:} false; then :
37599  $as_echo_n "(cached) " >&6
37600else
37601  if test -n "$NM"; then
37602  ac_cv_prog_NM="$NM" # Let the user override the test.
37603else
37604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37605for as_dir in $PATH
37606do
37607  IFS=$as_save_IFS
37608  test -z "$as_dir" && as_dir=.
37609    for ac_exec_ext in '' $ac_executable_extensions; do
37610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37611    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37613    break 2
37614  fi
37615done
37616  done
37617IFS=$as_save_IFS
37618
37619fi
37620fi
37621NM=$ac_cv_prog_NM
37622if test -n "$NM"; then
37623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37624$as_echo "$NM" >&6; }
37625else
37626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37627$as_echo "no" >&6; }
37628fi
37629
37630
37631    test -n "$NM" && break
37632  done
37633fi
37634if test -z "$NM"; then
37635  ac_ct_NM=$NM
37636  for ac_prog in nm
37637do
37638  # Extract the first word of "$ac_prog", so it can be a program name with args.
37639set dummy $ac_prog; ac_word=$2
37640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37641$as_echo_n "checking for $ac_word... " >&6; }
37642if ${ac_cv_prog_ac_ct_NM+:} false; then :
37643  $as_echo_n "(cached) " >&6
37644else
37645  if test -n "$ac_ct_NM"; then
37646  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37647else
37648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37649for as_dir in $PATH
37650do
37651  IFS=$as_save_IFS
37652  test -z "$as_dir" && as_dir=.
37653    for ac_exec_ext in '' $ac_executable_extensions; do
37654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37655    ac_cv_prog_ac_ct_NM="$ac_prog"
37656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37657    break 2
37658  fi
37659done
37660  done
37661IFS=$as_save_IFS
37662
37663fi
37664fi
37665ac_ct_NM=$ac_cv_prog_ac_ct_NM
37666if test -n "$ac_ct_NM"; then
37667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37668$as_echo "$ac_ct_NM" >&6; }
37669else
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37671$as_echo "no" >&6; }
37672fi
37673
37674
37675  test -n "$ac_ct_NM" && break
37676done
37677
37678  if test "x$ac_ct_NM" = x; then
37679    NM=""
37680  else
37681    case $cross_compiling:$ac_tool_warned in
37682yes:)
37683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37685ac_tool_warned=yes ;;
37686esac
37687    NM=$ac_ct_NM
37688  fi
37689fi
37690
37691  else
37692    # The variable is set, but is it from the command line or the environment?
37693
37694    # Try to remove the string !NM! from our list.
37695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37697      # If it failed, the variable was not from the command line. Ignore it,
37698      # but warn the user (except for BASH, which is always set by the calling BASH).
37699      if test "xNM" != xBASH; then
37700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37701$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37702      fi
37703      # Try to locate tool using the code snippet
37704      if test -n "$ac_tool_prefix"; then
37705  for ac_prog in nm
37706  do
37707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37710$as_echo_n "checking for $ac_word... " >&6; }
37711if ${ac_cv_prog_NM+:} false; then :
37712  $as_echo_n "(cached) " >&6
37713else
37714  if test -n "$NM"; then
37715  ac_cv_prog_NM="$NM" # Let the user override the test.
37716else
37717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37718for as_dir in $PATH
37719do
37720  IFS=$as_save_IFS
37721  test -z "$as_dir" && as_dir=.
37722    for ac_exec_ext in '' $ac_executable_extensions; do
37723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37724    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37726    break 2
37727  fi
37728done
37729  done
37730IFS=$as_save_IFS
37731
37732fi
37733fi
37734NM=$ac_cv_prog_NM
37735if test -n "$NM"; then
37736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37737$as_echo "$NM" >&6; }
37738else
37739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37740$as_echo "no" >&6; }
37741fi
37742
37743
37744    test -n "$NM" && break
37745  done
37746fi
37747if test -z "$NM"; then
37748  ac_ct_NM=$NM
37749  for ac_prog in nm
37750do
37751  # Extract the first word of "$ac_prog", so it can be a program name with args.
37752set dummy $ac_prog; ac_word=$2
37753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37754$as_echo_n "checking for $ac_word... " >&6; }
37755if ${ac_cv_prog_ac_ct_NM+:} false; then :
37756  $as_echo_n "(cached) " >&6
37757else
37758  if test -n "$ac_ct_NM"; then
37759  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37760else
37761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37762for as_dir in $PATH
37763do
37764  IFS=$as_save_IFS
37765  test -z "$as_dir" && as_dir=.
37766    for ac_exec_ext in '' $ac_executable_extensions; do
37767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37768    ac_cv_prog_ac_ct_NM="$ac_prog"
37769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37770    break 2
37771  fi
37772done
37773  done
37774IFS=$as_save_IFS
37775
37776fi
37777fi
37778ac_ct_NM=$ac_cv_prog_ac_ct_NM
37779if test -n "$ac_ct_NM"; then
37780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37781$as_echo "$ac_ct_NM" >&6; }
37782else
37783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37784$as_echo "no" >&6; }
37785fi
37786
37787
37788  test -n "$ac_ct_NM" && break
37789done
37790
37791  if test "x$ac_ct_NM" = x; then
37792    NM=""
37793  else
37794    case $cross_compiling:$ac_tool_warned in
37795yes:)
37796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37798ac_tool_warned=yes ;;
37799esac
37800    NM=$ac_ct_NM
37801  fi
37802fi
37803
37804    else
37805      # If it succeeded, then it was overridden by the user. We will use it
37806      # for the tool.
37807
37808      # First remove it from the list of overridden variables, so we can test
37809      # for unknown variables in the end.
37810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37811
37812      # Check if the provided tool contains a complete path.
37813      tool_specified="$NM"
37814      tool_basename="${tool_specified##*/}"
37815      if test "x$tool_basename" = "x$tool_specified"; then
37816        # A command without a complete path is provided, search $PATH.
37817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37818$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37819        # Extract the first word of "$tool_basename", so it can be a program name with args.
37820set dummy $tool_basename; ac_word=$2
37821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37822$as_echo_n "checking for $ac_word... " >&6; }
37823if ${ac_cv_path_NM+:} false; then :
37824  $as_echo_n "(cached) " >&6
37825else
37826  case $NM in
37827  [\\/]* | ?:[\\/]*)
37828  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37829  ;;
37830  *)
37831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37832for as_dir in $PATH
37833do
37834  IFS=$as_save_IFS
37835  test -z "$as_dir" && as_dir=.
37836    for ac_exec_ext in '' $ac_executable_extensions; do
37837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37838    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37840    break 2
37841  fi
37842done
37843  done
37844IFS=$as_save_IFS
37845
37846  ;;
37847esac
37848fi
37849NM=$ac_cv_path_NM
37850if test -n "$NM"; then
37851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37852$as_echo "$NM" >&6; }
37853else
37854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37855$as_echo "no" >&6; }
37856fi
37857
37858
37859        if test "x$NM" = x; then
37860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37861        fi
37862      else
37863        # Otherwise we believe it is a complete path. Use it as it is.
37864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37865$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37867$as_echo_n "checking for NM... " >&6; }
37868        if test ! -x "$tool_specified"; then
37869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37870$as_echo "not found" >&6; }
37871          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37872        fi
37873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37874$as_echo "$tool_specified" >&6; }
37875      fi
37876    fi
37877  fi
37878
37879
37880
37881  # Only process if variable expands to non-empty
37882
37883  if test "x$NM" != x; then
37884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37885
37886  # First separate the path from the arguments. This will split at the first
37887  # space.
37888  complete="$NM"
37889  path="${complete%% *}"
37890  tmp="$complete EOL"
37891  arguments="${tmp#* }"
37892
37893  # Input might be given as Windows format, start by converting to
37894  # unix format.
37895  new_path=`$CYGPATH -u "$path"`
37896
37897  # Now try to locate executable using which
37898  new_path=`$WHICH "$new_path" 2> /dev/null`
37899  # bat and cmd files are not always considered executable in cygwin causing which
37900  # to not find them
37901  if test "x$new_path" = x \
37902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37904    new_path=`$CYGPATH -u "$path"`
37905  fi
37906  if test "x$new_path" = x; then
37907    # Oops. Which didn't find the executable.
37908    # The splitting of arguments from the executable at a space might have been incorrect,
37909    # since paths with space are more likely in Windows. Give it another try with the whole
37910    # argument.
37911    path="$complete"
37912    arguments="EOL"
37913    new_path=`$CYGPATH -u "$path"`
37914    new_path=`$WHICH "$new_path" 2> /dev/null`
37915    # bat and cmd files are not always considered executable in cygwin causing which
37916    # to not find them
37917    if test "x$new_path" = x \
37918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37920      new_path=`$CYGPATH -u "$path"`
37921    fi
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37938  # "foo.exe" is OK but "foo" is an error.
37939  #
37940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37941  # It is also a way to make sure we got the proper file name for the real test later on.
37942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37943  if test "x$test_shortpath" = x; then
37944    # Short path failed, file does not exist as specified.
37945    # Try adding .exe or .cmd
37946    if test -f "${new_path}.exe"; then
37947      input_to_shortpath="${new_path}.exe"
37948    elif test -f "${new_path}.cmd"; then
37949      input_to_shortpath="${new_path}.cmd"
37950    else
37951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37952$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37955      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37956    fi
37957  else
37958    input_to_shortpath="$new_path"
37959  fi
37960
37961  # Call helper function which possibly converts this using DOS-style short mode.
37962  # If so, the updated path is stored in $new_path.
37963  new_path="$input_to_shortpath"
37964
37965  input_path="$input_to_shortpath"
37966  # Check if we need to convert this using DOS-style short mode. If the path
37967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37968  # take no chances and rewrite it.
37969  # Note: m4 eats our [], so we need to use [ and ] instead.
37970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37971  if test "x$has_forbidden_chars" != x; then
37972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37976      # Going to short mode and back again did indeed matter. Since short mode is
37977      # case insensitive, let's make it lowercase to improve readability.
37978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37979      # Now convert it back to Unix-style (cygpath)
37980      input_path=`$CYGPATH -u "$shortmode_path"`
37981      new_path="$input_path"
37982    fi
37983  fi
37984
37985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37986  if test "x$test_cygdrive_prefix" = x; then
37987    # As a simple fix, exclude /usr/bin since it's not a real path.
37988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37990      # a path prefixed by /cygdrive for fixpath to work.
37991      new_path="$CYGWIN_ROOT_PATH$input_path"
37992    fi
37993  fi
37994
37995  # remove trailing .exe if any
37996  new_path="${new_path/%.exe/}"
37997
37998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37999
38000  # First separate the path from the arguments. This will split at the first
38001  # space.
38002  complete="$NM"
38003  path="${complete%% *}"
38004  tmp="$complete EOL"
38005  arguments="${tmp#* }"
38006
38007  # Input might be given as Windows format, start by converting to
38008  # unix format.
38009  new_path="$path"
38010
38011  windows_path="$new_path"
38012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38013    unix_path=`$CYGPATH -u "$windows_path"`
38014    new_path="$unix_path"
38015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38017    new_path="$unix_path"
38018  fi
38019
38020
38021  # Now try to locate executable using which
38022  new_path=`$WHICH "$new_path" 2> /dev/null`
38023
38024  if test "x$new_path" = x; then
38025    # Oops. Which didn't find the executable.
38026    # The splitting of arguments from the executable at a space might have been incorrect,
38027    # since paths with space are more likely in Windows. Give it another try with the whole
38028    # argument.
38029    path="$complete"
38030    arguments="EOL"
38031    new_path="$path"
38032
38033  windows_path="$new_path"
38034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38035    unix_path=`$CYGPATH -u "$windows_path"`
38036    new_path="$unix_path"
38037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38039    new_path="$unix_path"
38040  fi
38041
38042
38043    new_path=`$WHICH "$new_path" 2> /dev/null`
38044    # bat and cmd files are not always considered executable in MSYS causing which
38045    # to not find them
38046    if test "x$new_path" = x \
38047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38049      new_path="$path"
38050
38051  windows_path="$new_path"
38052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38053    unix_path=`$CYGPATH -u "$windows_path"`
38054    new_path="$unix_path"
38055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38057    new_path="$unix_path"
38058  fi
38059
38060    fi
38061
38062    if test "x$new_path" = x; then
38063      # It's still not found. Now this is an unrecoverable error.
38064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38065$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38066      has_space=`$ECHO "$complete" | $GREP " "`
38067      if test "x$has_space" != x; then
38068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38070      fi
38071      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38072    fi
38073  fi
38074
38075  # Now new_path has a complete unix path to the binary
38076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38077    # Keep paths in /bin as-is, but remove trailing .exe if any
38078    new_path="${new_path/%.exe/}"
38079    # Do not save /bin paths to all_fixpath_prefixes!
38080  else
38081    # Not in mixed or Windows style, start by that.
38082    new_path=`cmd //c echo $new_path`
38083
38084  input_path="$new_path"
38085  # Check if we need to convert this using DOS-style short mode. If the path
38086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38087  # take no chances and rewrite it.
38088  # Note: m4 eats our [], so we need to use [ and ] instead.
38089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38090  if test "x$has_forbidden_chars" != x; then
38091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38093  fi
38094
38095    # Output is in $new_path
38096
38097  windows_path="$new_path"
38098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38099    unix_path=`$CYGPATH -u "$windows_path"`
38100    new_path="$unix_path"
38101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38103    new_path="$unix_path"
38104  fi
38105
38106    # remove trailing .exe if any
38107    new_path="${new_path/%.exe/}"
38108
38109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38111  fi
38112
38113    else
38114      # We're on a unix platform. Hooray! :)
38115      # First separate the path from the arguments. This will split at the first
38116      # space.
38117      complete="$NM"
38118      path="${complete%% *}"
38119      tmp="$complete EOL"
38120      arguments="${tmp#* }"
38121
38122      # Cannot rely on the command "which" here since it doesn't always work.
38123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38124      if test -z "$is_absolute_path"; then
38125        # Path to executable is not absolute. Find it.
38126        IFS_save="$IFS"
38127        IFS=:
38128        for p in $PATH; do
38129          if test -f "$p/$path" && test -x "$p/$path"; then
38130            new_path="$p/$path"
38131            break
38132          fi
38133        done
38134        IFS="$IFS_save"
38135      else
38136        # This is an absolute path, we can use it without further modifications.
38137        new_path="$path"
38138      fi
38139
38140      if test "x$new_path" = x; then
38141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38142$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38143        has_space=`$ECHO "$complete" | $GREP " "`
38144        if test "x$has_space" != x; then
38145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38147        fi
38148        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38149      fi
38150    fi
38151
38152    # Now join together the path and the arguments once again
38153    if test "x$arguments" != xEOL; then
38154      new_complete="$new_path ${arguments% *}"
38155    else
38156      new_complete="$new_path"
38157    fi
38158
38159    if test "x$complete" != "x$new_complete"; then
38160      NM="$new_complete"
38161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38162$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38163    fi
38164  fi
38165
38166    GNM="$NM"
38167
38168  fi
38169
38170  # objcopy is used for moving debug symbols to separate files when
38171  # full debug symbols are enabled.
38172  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38173
38174
38175  # Publish this variable in the help.
38176
38177
38178  if test "x$OBJCOPY" = x; then
38179    # The variable is not set by user, try to locate tool using the code snippet
38180    if test -n "$ac_tool_prefix"; then
38181  for ac_prog in gobjcopy objcopy
38182  do
38183    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38184set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38186$as_echo_n "checking for $ac_word... " >&6; }
38187if ${ac_cv_prog_OBJCOPY+:} false; then :
38188  $as_echo_n "(cached) " >&6
38189else
38190  if test -n "$OBJCOPY"; then
38191  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38192else
38193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38194for as_dir in $PATH
38195do
38196  IFS=$as_save_IFS
38197  test -z "$as_dir" && as_dir=.
38198    for ac_exec_ext in '' $ac_executable_extensions; do
38199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38200    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38202    break 2
38203  fi
38204done
38205  done
38206IFS=$as_save_IFS
38207
38208fi
38209fi
38210OBJCOPY=$ac_cv_prog_OBJCOPY
38211if test -n "$OBJCOPY"; then
38212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38213$as_echo "$OBJCOPY" >&6; }
38214else
38215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38216$as_echo "no" >&6; }
38217fi
38218
38219
38220    test -n "$OBJCOPY" && break
38221  done
38222fi
38223if test -z "$OBJCOPY"; then
38224  ac_ct_OBJCOPY=$OBJCOPY
38225  for ac_prog in gobjcopy objcopy
38226do
38227  # Extract the first word of "$ac_prog", so it can be a program name with args.
38228set dummy $ac_prog; ac_word=$2
38229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38230$as_echo_n "checking for $ac_word... " >&6; }
38231if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38232  $as_echo_n "(cached) " >&6
38233else
38234  if test -n "$ac_ct_OBJCOPY"; then
38235  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38236else
38237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38238for as_dir in $PATH
38239do
38240  IFS=$as_save_IFS
38241  test -z "$as_dir" && as_dir=.
38242    for ac_exec_ext in '' $ac_executable_extensions; do
38243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38244    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38246    break 2
38247  fi
38248done
38249  done
38250IFS=$as_save_IFS
38251
38252fi
38253fi
38254ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38255if test -n "$ac_ct_OBJCOPY"; then
38256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38257$as_echo "$ac_ct_OBJCOPY" >&6; }
38258else
38259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38260$as_echo "no" >&6; }
38261fi
38262
38263
38264  test -n "$ac_ct_OBJCOPY" && break
38265done
38266
38267  if test "x$ac_ct_OBJCOPY" = x; then
38268    OBJCOPY=""
38269  else
38270    case $cross_compiling:$ac_tool_warned in
38271yes:)
38272{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38273$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38274ac_tool_warned=yes ;;
38275esac
38276    OBJCOPY=$ac_ct_OBJCOPY
38277  fi
38278fi
38279
38280  else
38281    # The variable is set, but is it from the command line or the environment?
38282
38283    # Try to remove the string !OBJCOPY! from our list.
38284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38286      # If it failed, the variable was not from the command line. Ignore it,
38287      # but warn the user (except for BASH, which is always set by the calling BASH).
38288      if test "xOBJCOPY" != xBASH; then
38289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38290$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38291      fi
38292      # Try to locate tool using the code snippet
38293      if test -n "$ac_tool_prefix"; then
38294  for ac_prog in gobjcopy objcopy
38295  do
38296    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38297set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38299$as_echo_n "checking for $ac_word... " >&6; }
38300if ${ac_cv_prog_OBJCOPY+:} false; then :
38301  $as_echo_n "(cached) " >&6
38302else
38303  if test -n "$OBJCOPY"; then
38304  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38305else
38306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38307for as_dir in $PATH
38308do
38309  IFS=$as_save_IFS
38310  test -z "$as_dir" && as_dir=.
38311    for ac_exec_ext in '' $ac_executable_extensions; do
38312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38313    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38315    break 2
38316  fi
38317done
38318  done
38319IFS=$as_save_IFS
38320
38321fi
38322fi
38323OBJCOPY=$ac_cv_prog_OBJCOPY
38324if test -n "$OBJCOPY"; then
38325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38326$as_echo "$OBJCOPY" >&6; }
38327else
38328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38329$as_echo "no" >&6; }
38330fi
38331
38332
38333    test -n "$OBJCOPY" && break
38334  done
38335fi
38336if test -z "$OBJCOPY"; then
38337  ac_ct_OBJCOPY=$OBJCOPY
38338  for ac_prog in gobjcopy objcopy
38339do
38340  # Extract the first word of "$ac_prog", so it can be a program name with args.
38341set dummy $ac_prog; ac_word=$2
38342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38343$as_echo_n "checking for $ac_word... " >&6; }
38344if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38345  $as_echo_n "(cached) " >&6
38346else
38347  if test -n "$ac_ct_OBJCOPY"; then
38348  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38349else
38350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38351for as_dir in $PATH
38352do
38353  IFS=$as_save_IFS
38354  test -z "$as_dir" && as_dir=.
38355    for ac_exec_ext in '' $ac_executable_extensions; do
38356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38357    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38359    break 2
38360  fi
38361done
38362  done
38363IFS=$as_save_IFS
38364
38365fi
38366fi
38367ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38368if test -n "$ac_ct_OBJCOPY"; then
38369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38370$as_echo "$ac_ct_OBJCOPY" >&6; }
38371else
38372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38373$as_echo "no" >&6; }
38374fi
38375
38376
38377  test -n "$ac_ct_OBJCOPY" && break
38378done
38379
38380  if test "x$ac_ct_OBJCOPY" = x; then
38381    OBJCOPY=""
38382  else
38383    case $cross_compiling:$ac_tool_warned in
38384yes:)
38385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38387ac_tool_warned=yes ;;
38388esac
38389    OBJCOPY=$ac_ct_OBJCOPY
38390  fi
38391fi
38392
38393    else
38394      # If it succeeded, then it was overridden by the user. We will use it
38395      # for the tool.
38396
38397      # First remove it from the list of overridden variables, so we can test
38398      # for unknown variables in the end.
38399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38400
38401      # Check if the provided tool contains a complete path.
38402      tool_specified="$OBJCOPY"
38403      tool_basename="${tool_specified##*/}"
38404      if test "x$tool_basename" = "x$tool_specified"; then
38405        # A command without a complete path is provided, search $PATH.
38406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38407$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38408        # Extract the first word of "$tool_basename", so it can be a program name with args.
38409set dummy $tool_basename; ac_word=$2
38410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38411$as_echo_n "checking for $ac_word... " >&6; }
38412if ${ac_cv_path_OBJCOPY+:} false; then :
38413  $as_echo_n "(cached) " >&6
38414else
38415  case $OBJCOPY in
38416  [\\/]* | ?:[\\/]*)
38417  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38418  ;;
38419  *)
38420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38421for as_dir in $PATH
38422do
38423  IFS=$as_save_IFS
38424  test -z "$as_dir" && as_dir=.
38425    for ac_exec_ext in '' $ac_executable_extensions; do
38426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38427    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38429    break 2
38430  fi
38431done
38432  done
38433IFS=$as_save_IFS
38434
38435  ;;
38436esac
38437fi
38438OBJCOPY=$ac_cv_path_OBJCOPY
38439if test -n "$OBJCOPY"; then
38440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38441$as_echo "$OBJCOPY" >&6; }
38442else
38443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38444$as_echo "no" >&6; }
38445fi
38446
38447
38448        if test "x$OBJCOPY" = x; then
38449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38450        fi
38451      else
38452        # Otherwise we believe it is a complete path. Use it as it is.
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38454$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38456$as_echo_n "checking for OBJCOPY... " >&6; }
38457        if test ! -x "$tool_specified"; then
38458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38459$as_echo "not found" >&6; }
38460          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38461        fi
38462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38463$as_echo "$tool_specified" >&6; }
38464      fi
38465    fi
38466  fi
38467
38468
38469    # Only call fixup if objcopy was found.
38470    if test -n "$OBJCOPY"; then
38471
38472  # Only process if variable expands to non-empty
38473
38474  if test "x$OBJCOPY" != x; then
38475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38476
38477  # First separate the path from the arguments. This will split at the first
38478  # space.
38479  complete="$OBJCOPY"
38480  path="${complete%% *}"
38481  tmp="$complete EOL"
38482  arguments="${tmp#* }"
38483
38484  # Input might be given as Windows format, start by converting to
38485  # unix format.
38486  new_path=`$CYGPATH -u "$path"`
38487
38488  # Now try to locate executable using which
38489  new_path=`$WHICH "$new_path" 2> /dev/null`
38490  # bat and cmd files are not always considered executable in cygwin causing which
38491  # to not find them
38492  if test "x$new_path" = x \
38493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38495    new_path=`$CYGPATH -u "$path"`
38496  fi
38497  if test "x$new_path" = x; then
38498    # Oops. Which didn't find the executable.
38499    # The splitting of arguments from the executable at a space might have been incorrect,
38500    # since paths with space are more likely in Windows. Give it another try with the whole
38501    # argument.
38502    path="$complete"
38503    arguments="EOL"
38504    new_path=`$CYGPATH -u "$path"`
38505    new_path=`$WHICH "$new_path" 2> /dev/null`
38506    # bat and cmd files are not always considered executable in cygwin causing which
38507    # to not find them
38508    if test "x$new_path" = x \
38509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38511      new_path=`$CYGPATH -u "$path"`
38512    fi
38513    if test "x$new_path" = x; then
38514      # It's still not found. Now this is an unrecoverable error.
38515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38516$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38517      has_space=`$ECHO "$complete" | $GREP " "`
38518      if test "x$has_space" != x; then
38519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38521      fi
38522      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38523    fi
38524  fi
38525
38526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38529  # "foo.exe" is OK but "foo" is an error.
38530  #
38531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38532  # It is also a way to make sure we got the proper file name for the real test later on.
38533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38534  if test "x$test_shortpath" = x; then
38535    # Short path failed, file does not exist as specified.
38536    # Try adding .exe or .cmd
38537    if test -f "${new_path}.exe"; then
38538      input_to_shortpath="${new_path}.exe"
38539    elif test -f "${new_path}.cmd"; then
38540      input_to_shortpath="${new_path}.cmd"
38541    else
38542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38543$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38546      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38547    fi
38548  else
38549    input_to_shortpath="$new_path"
38550  fi
38551
38552  # Call helper function which possibly converts this using DOS-style short mode.
38553  # If so, the updated path is stored in $new_path.
38554  new_path="$input_to_shortpath"
38555
38556  input_path="$input_to_shortpath"
38557  # Check if we need to convert this using DOS-style short mode. If the path
38558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38559  # take no chances and rewrite it.
38560  # Note: m4 eats our [], so we need to use [ and ] instead.
38561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38562  if test "x$has_forbidden_chars" != x; then
38563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38567      # Going to short mode and back again did indeed matter. Since short mode is
38568      # case insensitive, let's make it lowercase to improve readability.
38569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38570      # Now convert it back to Unix-style (cygpath)
38571      input_path=`$CYGPATH -u "$shortmode_path"`
38572      new_path="$input_path"
38573    fi
38574  fi
38575
38576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38577  if test "x$test_cygdrive_prefix" = x; then
38578    # As a simple fix, exclude /usr/bin since it's not a real path.
38579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38581      # a path prefixed by /cygdrive for fixpath to work.
38582      new_path="$CYGWIN_ROOT_PATH$input_path"
38583    fi
38584  fi
38585
38586  # remove trailing .exe if any
38587  new_path="${new_path/%.exe/}"
38588
38589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38590
38591  # First separate the path from the arguments. This will split at the first
38592  # space.
38593  complete="$OBJCOPY"
38594  path="${complete%% *}"
38595  tmp="$complete EOL"
38596  arguments="${tmp#* }"
38597
38598  # Input might be given as Windows format, start by converting to
38599  # unix format.
38600  new_path="$path"
38601
38602  windows_path="$new_path"
38603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604    unix_path=`$CYGPATH -u "$windows_path"`
38605    new_path="$unix_path"
38606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38608    new_path="$unix_path"
38609  fi
38610
38611
38612  # Now try to locate executable using which
38613  new_path=`$WHICH "$new_path" 2> /dev/null`
38614
38615  if test "x$new_path" = x; then
38616    # Oops. Which didn't find the executable.
38617    # The splitting of arguments from the executable at a space might have been incorrect,
38618    # since paths with space are more likely in Windows. Give it another try with the whole
38619    # argument.
38620    path="$complete"
38621    arguments="EOL"
38622    new_path="$path"
38623
38624  windows_path="$new_path"
38625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38626    unix_path=`$CYGPATH -u "$windows_path"`
38627    new_path="$unix_path"
38628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38630    new_path="$unix_path"
38631  fi
38632
38633
38634    new_path=`$WHICH "$new_path" 2> /dev/null`
38635    # bat and cmd files are not always considered executable in MSYS causing which
38636    # to not find them
38637    if test "x$new_path" = x \
38638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38640      new_path="$path"
38641
38642  windows_path="$new_path"
38643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38644    unix_path=`$CYGPATH -u "$windows_path"`
38645    new_path="$unix_path"
38646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38648    new_path="$unix_path"
38649  fi
38650
38651    fi
38652
38653    if test "x$new_path" = x; then
38654      # It's still not found. Now this is an unrecoverable error.
38655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38656$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38657      has_space=`$ECHO "$complete" | $GREP " "`
38658      if test "x$has_space" != x; then
38659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38661      fi
38662      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38663    fi
38664  fi
38665
38666  # Now new_path has a complete unix path to the binary
38667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38668    # Keep paths in /bin as-is, but remove trailing .exe if any
38669    new_path="${new_path/%.exe/}"
38670    # Do not save /bin paths to all_fixpath_prefixes!
38671  else
38672    # Not in mixed or Windows style, start by that.
38673    new_path=`cmd //c echo $new_path`
38674
38675  input_path="$new_path"
38676  # Check if we need to convert this using DOS-style short mode. If the path
38677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38678  # take no chances and rewrite it.
38679  # Note: m4 eats our [], so we need to use [ and ] instead.
38680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38681  if test "x$has_forbidden_chars" != x; then
38682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38684  fi
38685
38686    # Output is in $new_path
38687
38688  windows_path="$new_path"
38689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38690    unix_path=`$CYGPATH -u "$windows_path"`
38691    new_path="$unix_path"
38692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38694    new_path="$unix_path"
38695  fi
38696
38697    # remove trailing .exe if any
38698    new_path="${new_path/%.exe/}"
38699
38700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38702  fi
38703
38704    else
38705      # We're on a unix platform. Hooray! :)
38706      # First separate the path from the arguments. This will split at the first
38707      # space.
38708      complete="$OBJCOPY"
38709      path="${complete%% *}"
38710      tmp="$complete EOL"
38711      arguments="${tmp#* }"
38712
38713      # Cannot rely on the command "which" here since it doesn't always work.
38714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38715      if test -z "$is_absolute_path"; then
38716        # Path to executable is not absolute. Find it.
38717        IFS_save="$IFS"
38718        IFS=:
38719        for p in $PATH; do
38720          if test -f "$p/$path" && test -x "$p/$path"; then
38721            new_path="$p/$path"
38722            break
38723          fi
38724        done
38725        IFS="$IFS_save"
38726      else
38727        # This is an absolute path, we can use it without further modifications.
38728        new_path="$path"
38729      fi
38730
38731      if test "x$new_path" = x; then
38732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38733$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38734        has_space=`$ECHO "$complete" | $GREP " "`
38735        if test "x$has_space" != x; then
38736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38738        fi
38739        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38740      fi
38741    fi
38742
38743    # Now join together the path and the arguments once again
38744    if test "x$arguments" != xEOL; then
38745      new_complete="$new_path ${arguments% *}"
38746    else
38747      new_complete="$new_path"
38748    fi
38749
38750    if test "x$complete" != "x$new_complete"; then
38751      OBJCOPY="$new_complete"
38752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38753$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38754    fi
38755  fi
38756
38757    fi
38758  fi
38759
38760
38761
38762  # Publish this variable in the help.
38763
38764
38765  if test "x$OBJDUMP" = x; then
38766    # The variable is not set by user, try to locate tool using the code snippet
38767    if test -n "$ac_tool_prefix"; then
38768  for ac_prog in gobjdump objdump
38769  do
38770    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38773$as_echo_n "checking for $ac_word... " >&6; }
38774if ${ac_cv_prog_OBJDUMP+:} false; then :
38775  $as_echo_n "(cached) " >&6
38776else
38777  if test -n "$OBJDUMP"; then
38778  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38779else
38780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38781for as_dir in $PATH
38782do
38783  IFS=$as_save_IFS
38784  test -z "$as_dir" && as_dir=.
38785    for ac_exec_ext in '' $ac_executable_extensions; do
38786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38787    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38789    break 2
38790  fi
38791done
38792  done
38793IFS=$as_save_IFS
38794
38795fi
38796fi
38797OBJDUMP=$ac_cv_prog_OBJDUMP
38798if test -n "$OBJDUMP"; then
38799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38800$as_echo "$OBJDUMP" >&6; }
38801else
38802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38803$as_echo "no" >&6; }
38804fi
38805
38806
38807    test -n "$OBJDUMP" && break
38808  done
38809fi
38810if test -z "$OBJDUMP"; then
38811  ac_ct_OBJDUMP=$OBJDUMP
38812  for ac_prog in gobjdump objdump
38813do
38814  # Extract the first word of "$ac_prog", so it can be a program name with args.
38815set dummy $ac_prog; ac_word=$2
38816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38817$as_echo_n "checking for $ac_word... " >&6; }
38818if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38819  $as_echo_n "(cached) " >&6
38820else
38821  if test -n "$ac_ct_OBJDUMP"; then
38822  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38823else
38824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38825for as_dir in $PATH
38826do
38827  IFS=$as_save_IFS
38828  test -z "$as_dir" && as_dir=.
38829    for ac_exec_ext in '' $ac_executable_extensions; do
38830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38831    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38833    break 2
38834  fi
38835done
38836  done
38837IFS=$as_save_IFS
38838
38839fi
38840fi
38841ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38842if test -n "$ac_ct_OBJDUMP"; then
38843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38844$as_echo "$ac_ct_OBJDUMP" >&6; }
38845else
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38847$as_echo "no" >&6; }
38848fi
38849
38850
38851  test -n "$ac_ct_OBJDUMP" && break
38852done
38853
38854  if test "x$ac_ct_OBJDUMP" = x; then
38855    OBJDUMP=""
38856  else
38857    case $cross_compiling:$ac_tool_warned in
38858yes:)
38859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38861ac_tool_warned=yes ;;
38862esac
38863    OBJDUMP=$ac_ct_OBJDUMP
38864  fi
38865fi
38866
38867  else
38868    # The variable is set, but is it from the command line or the environment?
38869
38870    # Try to remove the string !OBJDUMP! from our list.
38871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38873      # If it failed, the variable was not from the command line. Ignore it,
38874      # but warn the user (except for BASH, which is always set by the calling BASH).
38875      if test "xOBJDUMP" != xBASH; then
38876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38877$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38878      fi
38879      # Try to locate tool using the code snippet
38880      if test -n "$ac_tool_prefix"; then
38881  for ac_prog in gobjdump objdump
38882  do
38883    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38884set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38886$as_echo_n "checking for $ac_word... " >&6; }
38887if ${ac_cv_prog_OBJDUMP+:} false; then :
38888  $as_echo_n "(cached) " >&6
38889else
38890  if test -n "$OBJDUMP"; then
38891  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38892else
38893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38894for as_dir in $PATH
38895do
38896  IFS=$as_save_IFS
38897  test -z "$as_dir" && as_dir=.
38898    for ac_exec_ext in '' $ac_executable_extensions; do
38899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38900    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38902    break 2
38903  fi
38904done
38905  done
38906IFS=$as_save_IFS
38907
38908fi
38909fi
38910OBJDUMP=$ac_cv_prog_OBJDUMP
38911if test -n "$OBJDUMP"; then
38912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38913$as_echo "$OBJDUMP" >&6; }
38914else
38915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38916$as_echo "no" >&6; }
38917fi
38918
38919
38920    test -n "$OBJDUMP" && break
38921  done
38922fi
38923if test -z "$OBJDUMP"; then
38924  ac_ct_OBJDUMP=$OBJDUMP
38925  for ac_prog in gobjdump objdump
38926do
38927  # Extract the first word of "$ac_prog", so it can be a program name with args.
38928set dummy $ac_prog; ac_word=$2
38929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38930$as_echo_n "checking for $ac_word... " >&6; }
38931if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38932  $as_echo_n "(cached) " >&6
38933else
38934  if test -n "$ac_ct_OBJDUMP"; then
38935  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38936else
38937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38938for as_dir in $PATH
38939do
38940  IFS=$as_save_IFS
38941  test -z "$as_dir" && as_dir=.
38942    for ac_exec_ext in '' $ac_executable_extensions; do
38943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38944    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38946    break 2
38947  fi
38948done
38949  done
38950IFS=$as_save_IFS
38951
38952fi
38953fi
38954ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38955if test -n "$ac_ct_OBJDUMP"; then
38956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38957$as_echo "$ac_ct_OBJDUMP" >&6; }
38958else
38959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38960$as_echo "no" >&6; }
38961fi
38962
38963
38964  test -n "$ac_ct_OBJDUMP" && break
38965done
38966
38967  if test "x$ac_ct_OBJDUMP" = x; then
38968    OBJDUMP=""
38969  else
38970    case $cross_compiling:$ac_tool_warned in
38971yes:)
38972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38974ac_tool_warned=yes ;;
38975esac
38976    OBJDUMP=$ac_ct_OBJDUMP
38977  fi
38978fi
38979
38980    else
38981      # If it succeeded, then it was overridden by the user. We will use it
38982      # for the tool.
38983
38984      # First remove it from the list of overridden variables, so we can test
38985      # for unknown variables in the end.
38986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38987
38988      # Check if the provided tool contains a complete path.
38989      tool_specified="$OBJDUMP"
38990      tool_basename="${tool_specified##*/}"
38991      if test "x$tool_basename" = "x$tool_specified"; then
38992        # A command without a complete path is provided, search $PATH.
38993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38994$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38995        # Extract the first word of "$tool_basename", so it can be a program name with args.
38996set dummy $tool_basename; ac_word=$2
38997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38998$as_echo_n "checking for $ac_word... " >&6; }
38999if ${ac_cv_path_OBJDUMP+:} false; then :
39000  $as_echo_n "(cached) " >&6
39001else
39002  case $OBJDUMP in
39003  [\\/]* | ?:[\\/]*)
39004  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39005  ;;
39006  *)
39007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39008for as_dir in $PATH
39009do
39010  IFS=$as_save_IFS
39011  test -z "$as_dir" && as_dir=.
39012    for ac_exec_ext in '' $ac_executable_extensions; do
39013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39014    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39016    break 2
39017  fi
39018done
39019  done
39020IFS=$as_save_IFS
39021
39022  ;;
39023esac
39024fi
39025OBJDUMP=$ac_cv_path_OBJDUMP
39026if test -n "$OBJDUMP"; then
39027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39028$as_echo "$OBJDUMP" >&6; }
39029else
39030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39031$as_echo "no" >&6; }
39032fi
39033
39034
39035        if test "x$OBJDUMP" = x; then
39036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39037        fi
39038      else
39039        # Otherwise we believe it is a complete path. Use it as it is.
39040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39041$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39043$as_echo_n "checking for OBJDUMP... " >&6; }
39044        if test ! -x "$tool_specified"; then
39045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39046$as_echo "not found" >&6; }
39047          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39048        fi
39049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39050$as_echo "$tool_specified" >&6; }
39051      fi
39052    fi
39053  fi
39054
39055
39056  if test "x$OBJDUMP" != x; then
39057    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39058    # bails if argument is missing.
39059
39060  # Only process if variable expands to non-empty
39061
39062  if test "x$OBJDUMP" != x; then
39063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39064
39065  # First separate the path from the arguments. This will split at the first
39066  # space.
39067  complete="$OBJDUMP"
39068  path="${complete%% *}"
39069  tmp="$complete EOL"
39070  arguments="${tmp#* }"
39071
39072  # Input might be given as Windows format, start by converting to
39073  # unix format.
39074  new_path=`$CYGPATH -u "$path"`
39075
39076  # Now try to locate executable using which
39077  new_path=`$WHICH "$new_path" 2> /dev/null`
39078  # bat and cmd files are not always considered executable in cygwin causing which
39079  # to not find them
39080  if test "x$new_path" = x \
39081      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39082      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39083    new_path=`$CYGPATH -u "$path"`
39084  fi
39085  if test "x$new_path" = x; then
39086    # Oops. Which didn't find the executable.
39087    # The splitting of arguments from the executable at a space might have been incorrect,
39088    # since paths with space are more likely in Windows. Give it another try with the whole
39089    # argument.
39090    path="$complete"
39091    arguments="EOL"
39092    new_path=`$CYGPATH -u "$path"`
39093    new_path=`$WHICH "$new_path" 2> /dev/null`
39094    # bat and cmd files are not always considered executable in cygwin causing which
39095    # to not find them
39096    if test "x$new_path" = x \
39097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39099      new_path=`$CYGPATH -u "$path"`
39100    fi
39101    if test "x$new_path" = x; then
39102      # It's still not found. Now this is an unrecoverable error.
39103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39104$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39105      has_space=`$ECHO "$complete" | $GREP " "`
39106      if test "x$has_space" != x; then
39107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39109      fi
39110      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39111    fi
39112  fi
39113
39114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39117  # "foo.exe" is OK but "foo" is an error.
39118  #
39119  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39120  # It is also a way to make sure we got the proper file name for the real test later on.
39121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39122  if test "x$test_shortpath" = x; then
39123    # Short path failed, file does not exist as specified.
39124    # Try adding .exe or .cmd
39125    if test -f "${new_path}.exe"; then
39126      input_to_shortpath="${new_path}.exe"
39127    elif test -f "${new_path}.cmd"; then
39128      input_to_shortpath="${new_path}.cmd"
39129    else
39130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39131$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39132      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39133$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39134      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39135    fi
39136  else
39137    input_to_shortpath="$new_path"
39138  fi
39139
39140  # Call helper function which possibly converts this using DOS-style short mode.
39141  # If so, the updated path is stored in $new_path.
39142  new_path="$input_to_shortpath"
39143
39144  input_path="$input_to_shortpath"
39145  # Check if we need to convert this using DOS-style short mode. If the path
39146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39147  # take no chances and rewrite it.
39148  # Note: m4 eats our [], so we need to use [ and ] instead.
39149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39150  if test "x$has_forbidden_chars" != x; then
39151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39155      # Going to short mode and back again did indeed matter. Since short mode is
39156      # case insensitive, let's make it lowercase to improve readability.
39157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39158      # Now convert it back to Unix-style (cygpath)
39159      input_path=`$CYGPATH -u "$shortmode_path"`
39160      new_path="$input_path"
39161    fi
39162  fi
39163
39164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39165  if test "x$test_cygdrive_prefix" = x; then
39166    # As a simple fix, exclude /usr/bin since it's not a real path.
39167    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39169      # a path prefixed by /cygdrive for fixpath to work.
39170      new_path="$CYGWIN_ROOT_PATH$input_path"
39171    fi
39172  fi
39173
39174  # remove trailing .exe if any
39175  new_path="${new_path/%.exe/}"
39176
39177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39178
39179  # First separate the path from the arguments. This will split at the first
39180  # space.
39181  complete="$OBJDUMP"
39182  path="${complete%% *}"
39183  tmp="$complete EOL"
39184  arguments="${tmp#* }"
39185
39186  # Input might be given as Windows format, start by converting to
39187  # unix format.
39188  new_path="$path"
39189
39190  windows_path="$new_path"
39191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39192    unix_path=`$CYGPATH -u "$windows_path"`
39193    new_path="$unix_path"
39194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39196    new_path="$unix_path"
39197  fi
39198
39199
39200  # Now try to locate executable using which
39201  new_path=`$WHICH "$new_path" 2> /dev/null`
39202
39203  if test "x$new_path" = x; then
39204    # Oops. Which didn't find the executable.
39205    # The splitting of arguments from the executable at a space might have been incorrect,
39206    # since paths with space are more likely in Windows. Give it another try with the whole
39207    # argument.
39208    path="$complete"
39209    arguments="EOL"
39210    new_path="$path"
39211
39212  windows_path="$new_path"
39213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39214    unix_path=`$CYGPATH -u "$windows_path"`
39215    new_path="$unix_path"
39216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39218    new_path="$unix_path"
39219  fi
39220
39221
39222    new_path=`$WHICH "$new_path" 2> /dev/null`
39223    # bat and cmd files are not always considered executable in MSYS causing which
39224    # to not find them
39225    if test "x$new_path" = x \
39226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39228      new_path="$path"
39229
39230  windows_path="$new_path"
39231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39232    unix_path=`$CYGPATH -u "$windows_path"`
39233    new_path="$unix_path"
39234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39236    new_path="$unix_path"
39237  fi
39238
39239    fi
39240
39241    if test "x$new_path" = x; then
39242      # It's still not found. Now this is an unrecoverable error.
39243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39244$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39245      has_space=`$ECHO "$complete" | $GREP " "`
39246      if test "x$has_space" != x; then
39247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39249      fi
39250      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39251    fi
39252  fi
39253
39254  # Now new_path has a complete unix path to the binary
39255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39256    # Keep paths in /bin as-is, but remove trailing .exe if any
39257    new_path="${new_path/%.exe/}"
39258    # Do not save /bin paths to all_fixpath_prefixes!
39259  else
39260    # Not in mixed or Windows style, start by that.
39261    new_path=`cmd //c echo $new_path`
39262
39263  input_path="$new_path"
39264  # Check if we need to convert this using DOS-style short mode. If the path
39265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39266  # take no chances and rewrite it.
39267  # Note: m4 eats our [], so we need to use [ and ] instead.
39268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39269  if test "x$has_forbidden_chars" != x; then
39270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39272  fi
39273
39274    # Output is in $new_path
39275
39276  windows_path="$new_path"
39277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39278    unix_path=`$CYGPATH -u "$windows_path"`
39279    new_path="$unix_path"
39280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39282    new_path="$unix_path"
39283  fi
39284
39285    # remove trailing .exe if any
39286    new_path="${new_path/%.exe/}"
39287
39288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39290  fi
39291
39292    else
39293      # We're on a unix platform. Hooray! :)
39294      # First separate the path from the arguments. This will split at the first
39295      # space.
39296      complete="$OBJDUMP"
39297      path="${complete%% *}"
39298      tmp="$complete EOL"
39299      arguments="${tmp#* }"
39300
39301      # Cannot rely on the command "which" here since it doesn't always work.
39302      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39303      if test -z "$is_absolute_path"; then
39304        # Path to executable is not absolute. Find it.
39305        IFS_save="$IFS"
39306        IFS=:
39307        for p in $PATH; do
39308          if test -f "$p/$path" && test -x "$p/$path"; then
39309            new_path="$p/$path"
39310            break
39311          fi
39312        done
39313        IFS="$IFS_save"
39314      else
39315        # This is an absolute path, we can use it without further modifications.
39316        new_path="$path"
39317      fi
39318
39319      if test "x$new_path" = x; then
39320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39321$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39322        has_space=`$ECHO "$complete" | $GREP " "`
39323        if test "x$has_space" != x; then
39324          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39326        fi
39327        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39328      fi
39329    fi
39330
39331    # Now join together the path and the arguments once again
39332    if test "x$arguments" != xEOL; then
39333      new_complete="$new_path ${arguments% *}"
39334    else
39335      new_complete="$new_path"
39336    fi
39337
39338    if test "x$complete" != "x$new_complete"; then
39339      OBJDUMP="$new_complete"
39340      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39341$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39342    fi
39343  fi
39344
39345  fi
39346
39347
39348  # Restore old path.
39349  PATH="$OLD_PATH"
39350
39351  # Restore the flags to the user specified values.
39352  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39353  CFLAGS="$ORG_CFLAGS"
39354  CXXFLAGS="$ORG_CXXFLAGS"
39355
39356
39357# Finally do some processing after the detection phase
39358
39359  if test "x$COMPILE_TYPE" = "xcross"; then
39360    # Now we need to find a C/C++ compiler that can build executables for the
39361    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39362    # used once. Also, we need to do this without adding a tools dir to the
39363    # path, otherwise we might pick up cross-compilers which don't use standard
39364    # naming.
39365
39366    # FIXME: we should list the discovered compilers as an exclude pattern!
39367    # If we do that, we can do this detection before POST_DETECTION, and still
39368    # find the build compilers in the tools dir, if needed.
39369
39370
39371  # Publish this variable in the help.
39372
39373
39374  if test "x$BUILD_CC" = x; then
39375    # The variable is not set by user, try to locate tool using the code snippet
39376    for ac_prog in cl cc gcc
39377do
39378  # Extract the first word of "$ac_prog", so it can be a program name with args.
39379set dummy $ac_prog; ac_word=$2
39380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39381$as_echo_n "checking for $ac_word... " >&6; }
39382if ${ac_cv_path_BUILD_CC+:} false; then :
39383  $as_echo_n "(cached) " >&6
39384else
39385  case $BUILD_CC in
39386  [\\/]* | ?:[\\/]*)
39387  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39388  ;;
39389  *)
39390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39391for as_dir in $PATH
39392do
39393  IFS=$as_save_IFS
39394  test -z "$as_dir" && as_dir=.
39395    for ac_exec_ext in '' $ac_executable_extensions; do
39396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39397    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39399    break 2
39400  fi
39401done
39402  done
39403IFS=$as_save_IFS
39404
39405  ;;
39406esac
39407fi
39408BUILD_CC=$ac_cv_path_BUILD_CC
39409if test -n "$BUILD_CC"; then
39410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39411$as_echo "$BUILD_CC" >&6; }
39412else
39413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39414$as_echo "no" >&6; }
39415fi
39416
39417
39418  test -n "$BUILD_CC" && break
39419done
39420
39421  else
39422    # The variable is set, but is it from the command line or the environment?
39423
39424    # Try to remove the string !BUILD_CC! from our list.
39425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39427      # If it failed, the variable was not from the command line. Ignore it,
39428      # but warn the user (except for BASH, which is always set by the calling BASH).
39429      if test "xBUILD_CC" != xBASH; then
39430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39431$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39432      fi
39433      # Try to locate tool using the code snippet
39434      for ac_prog in cl cc gcc
39435do
39436  # Extract the first word of "$ac_prog", so it can be a program name with args.
39437set dummy $ac_prog; ac_word=$2
39438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39439$as_echo_n "checking for $ac_word... " >&6; }
39440if ${ac_cv_path_BUILD_CC+:} false; then :
39441  $as_echo_n "(cached) " >&6
39442else
39443  case $BUILD_CC in
39444  [\\/]* | ?:[\\/]*)
39445  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39446  ;;
39447  *)
39448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39449for as_dir in $PATH
39450do
39451  IFS=$as_save_IFS
39452  test -z "$as_dir" && as_dir=.
39453    for ac_exec_ext in '' $ac_executable_extensions; do
39454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39455    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39457    break 2
39458  fi
39459done
39460  done
39461IFS=$as_save_IFS
39462
39463  ;;
39464esac
39465fi
39466BUILD_CC=$ac_cv_path_BUILD_CC
39467if test -n "$BUILD_CC"; then
39468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39469$as_echo "$BUILD_CC" >&6; }
39470else
39471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39472$as_echo "no" >&6; }
39473fi
39474
39475
39476  test -n "$BUILD_CC" && break
39477done
39478
39479    else
39480      # If it succeeded, then it was overridden by the user. We will use it
39481      # for the tool.
39482
39483      # First remove it from the list of overridden variables, so we can test
39484      # for unknown variables in the end.
39485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39486
39487      # Check if the provided tool contains a complete path.
39488      tool_specified="$BUILD_CC"
39489      tool_basename="${tool_specified##*/}"
39490      if test "x$tool_basename" = "x$tool_specified"; then
39491        # A command without a complete path is provided, search $PATH.
39492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39493$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39494        # Extract the first word of "$tool_basename", so it can be a program name with args.
39495set dummy $tool_basename; ac_word=$2
39496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39497$as_echo_n "checking for $ac_word... " >&6; }
39498if ${ac_cv_path_BUILD_CC+:} false; then :
39499  $as_echo_n "(cached) " >&6
39500else
39501  case $BUILD_CC in
39502  [\\/]* | ?:[\\/]*)
39503  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39504  ;;
39505  *)
39506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39507for as_dir in $PATH
39508do
39509  IFS=$as_save_IFS
39510  test -z "$as_dir" && as_dir=.
39511    for ac_exec_ext in '' $ac_executable_extensions; do
39512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39513    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39515    break 2
39516  fi
39517done
39518  done
39519IFS=$as_save_IFS
39520
39521  ;;
39522esac
39523fi
39524BUILD_CC=$ac_cv_path_BUILD_CC
39525if test -n "$BUILD_CC"; then
39526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39527$as_echo "$BUILD_CC" >&6; }
39528else
39529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39530$as_echo "no" >&6; }
39531fi
39532
39533
39534        if test "x$BUILD_CC" = x; then
39535          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39536        fi
39537      else
39538        # Otherwise we believe it is a complete path. Use it as it is.
39539        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39540$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39542$as_echo_n "checking for BUILD_CC... " >&6; }
39543        if test ! -x "$tool_specified"; then
39544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39545$as_echo "not found" >&6; }
39546          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39547        fi
39548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39549$as_echo "$tool_specified" >&6; }
39550      fi
39551    fi
39552  fi
39553
39554
39555
39556  # Only process if variable expands to non-empty
39557
39558  if test "x$BUILD_CC" != x; then
39559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39560
39561  # First separate the path from the arguments. This will split at the first
39562  # space.
39563  complete="$BUILD_CC"
39564  path="${complete%% *}"
39565  tmp="$complete EOL"
39566  arguments="${tmp#* }"
39567
39568  # Input might be given as Windows format, start by converting to
39569  # unix format.
39570  new_path=`$CYGPATH -u "$path"`
39571
39572  # Now try to locate executable using which
39573  new_path=`$WHICH "$new_path" 2> /dev/null`
39574  # bat and cmd files are not always considered executable in cygwin causing which
39575  # to not find them
39576  if test "x$new_path" = x \
39577      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39578      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39579    new_path=`$CYGPATH -u "$path"`
39580  fi
39581  if test "x$new_path" = x; then
39582    # Oops. Which didn't find the executable.
39583    # The splitting of arguments from the executable at a space might have been incorrect,
39584    # since paths with space are more likely in Windows. Give it another try with the whole
39585    # argument.
39586    path="$complete"
39587    arguments="EOL"
39588    new_path=`$CYGPATH -u "$path"`
39589    new_path=`$WHICH "$new_path" 2> /dev/null`
39590    # bat and cmd files are not always considered executable in cygwin causing which
39591    # to not find them
39592    if test "x$new_path" = x \
39593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39595      new_path=`$CYGPATH -u "$path"`
39596    fi
39597    if test "x$new_path" = x; then
39598      # It's still not found. Now this is an unrecoverable error.
39599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39600$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39601      has_space=`$ECHO "$complete" | $GREP " "`
39602      if test "x$has_space" != x; then
39603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39605      fi
39606      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39607    fi
39608  fi
39609
39610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39613  # "foo.exe" is OK but "foo" is an error.
39614  #
39615  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39616  # It is also a way to make sure we got the proper file name for the real test later on.
39617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39618  if test "x$test_shortpath" = x; then
39619    # Short path failed, file does not exist as specified.
39620    # Try adding .exe or .cmd
39621    if test -f "${new_path}.exe"; then
39622      input_to_shortpath="${new_path}.exe"
39623    elif test -f "${new_path}.cmd"; then
39624      input_to_shortpath="${new_path}.cmd"
39625    else
39626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39627$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39628      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39629$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39630      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39631    fi
39632  else
39633    input_to_shortpath="$new_path"
39634  fi
39635
39636  # Call helper function which possibly converts this using DOS-style short mode.
39637  # If so, the updated path is stored in $new_path.
39638  new_path="$input_to_shortpath"
39639
39640  input_path="$input_to_shortpath"
39641  # Check if we need to convert this using DOS-style short mode. If the path
39642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39643  # take no chances and rewrite it.
39644  # Note: m4 eats our [], so we need to use [ and ] instead.
39645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39646  if test "x$has_forbidden_chars" != x; then
39647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39651      # Going to short mode and back again did indeed matter. Since short mode is
39652      # case insensitive, let's make it lowercase to improve readability.
39653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39654      # Now convert it back to Unix-style (cygpath)
39655      input_path=`$CYGPATH -u "$shortmode_path"`
39656      new_path="$input_path"
39657    fi
39658  fi
39659
39660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39661  if test "x$test_cygdrive_prefix" = x; then
39662    # As a simple fix, exclude /usr/bin since it's not a real path.
39663    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39665      # a path prefixed by /cygdrive for fixpath to work.
39666      new_path="$CYGWIN_ROOT_PATH$input_path"
39667    fi
39668  fi
39669
39670  # remove trailing .exe if any
39671  new_path="${new_path/%.exe/}"
39672
39673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39674
39675  # First separate the path from the arguments. This will split at the first
39676  # space.
39677  complete="$BUILD_CC"
39678  path="${complete%% *}"
39679  tmp="$complete EOL"
39680  arguments="${tmp#* }"
39681
39682  # Input might be given as Windows format, start by converting to
39683  # unix format.
39684  new_path="$path"
39685
39686  windows_path="$new_path"
39687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39688    unix_path=`$CYGPATH -u "$windows_path"`
39689    new_path="$unix_path"
39690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39692    new_path="$unix_path"
39693  fi
39694
39695
39696  # Now try to locate executable using which
39697  new_path=`$WHICH "$new_path" 2> /dev/null`
39698
39699  if test "x$new_path" = x; then
39700    # Oops. Which didn't find the executable.
39701    # The splitting of arguments from the executable at a space might have been incorrect,
39702    # since paths with space are more likely in Windows. Give it another try with the whole
39703    # argument.
39704    path="$complete"
39705    arguments="EOL"
39706    new_path="$path"
39707
39708  windows_path="$new_path"
39709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39710    unix_path=`$CYGPATH -u "$windows_path"`
39711    new_path="$unix_path"
39712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39714    new_path="$unix_path"
39715  fi
39716
39717
39718    new_path=`$WHICH "$new_path" 2> /dev/null`
39719    # bat and cmd files are not always considered executable in MSYS causing which
39720    # to not find them
39721    if test "x$new_path" = x \
39722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39724      new_path="$path"
39725
39726  windows_path="$new_path"
39727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39728    unix_path=`$CYGPATH -u "$windows_path"`
39729    new_path="$unix_path"
39730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39732    new_path="$unix_path"
39733  fi
39734
39735    fi
39736
39737    if test "x$new_path" = x; then
39738      # It's still not found. Now this is an unrecoverable error.
39739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39740$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39741      has_space=`$ECHO "$complete" | $GREP " "`
39742      if test "x$has_space" != x; then
39743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39745      fi
39746      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39747    fi
39748  fi
39749
39750  # Now new_path has a complete unix path to the binary
39751  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39752    # Keep paths in /bin as-is, but remove trailing .exe if any
39753    new_path="${new_path/%.exe/}"
39754    # Do not save /bin paths to all_fixpath_prefixes!
39755  else
39756    # Not in mixed or Windows style, start by that.
39757    new_path=`cmd //c echo $new_path`
39758
39759  input_path="$new_path"
39760  # Check if we need to convert this using DOS-style short mode. If the path
39761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39762  # take no chances and rewrite it.
39763  # Note: m4 eats our [], so we need to use [ and ] instead.
39764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39765  if test "x$has_forbidden_chars" != x; then
39766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39768  fi
39769
39770    # Output is in $new_path
39771
39772  windows_path="$new_path"
39773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39774    unix_path=`$CYGPATH -u "$windows_path"`
39775    new_path="$unix_path"
39776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39778    new_path="$unix_path"
39779  fi
39780
39781    # remove trailing .exe if any
39782    new_path="${new_path/%.exe/}"
39783
39784    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39785    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39786  fi
39787
39788    else
39789      # We're on a unix platform. Hooray! :)
39790      # First separate the path from the arguments. This will split at the first
39791      # space.
39792      complete="$BUILD_CC"
39793      path="${complete%% *}"
39794      tmp="$complete EOL"
39795      arguments="${tmp#* }"
39796
39797      # Cannot rely on the command "which" here since it doesn't always work.
39798      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39799      if test -z "$is_absolute_path"; then
39800        # Path to executable is not absolute. Find it.
39801        IFS_save="$IFS"
39802        IFS=:
39803        for p in $PATH; do
39804          if test -f "$p/$path" && test -x "$p/$path"; then
39805            new_path="$p/$path"
39806            break
39807          fi
39808        done
39809        IFS="$IFS_save"
39810      else
39811        # This is an absolute path, we can use it without further modifications.
39812        new_path="$path"
39813      fi
39814
39815      if test "x$new_path" = x; then
39816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39817$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39818        has_space=`$ECHO "$complete" | $GREP " "`
39819        if test "x$has_space" != x; then
39820          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39821$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39822        fi
39823        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39824      fi
39825    fi
39826
39827    # Now join together the path and the arguments once again
39828    if test "x$arguments" != xEOL; then
39829      new_complete="$new_path ${arguments% *}"
39830    else
39831      new_complete="$new_path"
39832    fi
39833
39834    if test "x$complete" != "x$new_complete"; then
39835      BUILD_CC="$new_complete"
39836      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39837$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39838    fi
39839  fi
39840
39841
39842
39843  # Publish this variable in the help.
39844
39845
39846  if test "x$BUILD_CXX" = x; then
39847    # The variable is not set by user, try to locate tool using the code snippet
39848    for ac_prog in cl CC g++
39849do
39850  # Extract the first word of "$ac_prog", so it can be a program name with args.
39851set dummy $ac_prog; ac_word=$2
39852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39853$as_echo_n "checking for $ac_word... " >&6; }
39854if ${ac_cv_path_BUILD_CXX+:} false; then :
39855  $as_echo_n "(cached) " >&6
39856else
39857  case $BUILD_CXX in
39858  [\\/]* | ?:[\\/]*)
39859  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39860  ;;
39861  *)
39862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39863for as_dir in $PATH
39864do
39865  IFS=$as_save_IFS
39866  test -z "$as_dir" && as_dir=.
39867    for ac_exec_ext in '' $ac_executable_extensions; do
39868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39869    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39871    break 2
39872  fi
39873done
39874  done
39875IFS=$as_save_IFS
39876
39877  ;;
39878esac
39879fi
39880BUILD_CXX=$ac_cv_path_BUILD_CXX
39881if test -n "$BUILD_CXX"; then
39882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39883$as_echo "$BUILD_CXX" >&6; }
39884else
39885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39886$as_echo "no" >&6; }
39887fi
39888
39889
39890  test -n "$BUILD_CXX" && break
39891done
39892
39893  else
39894    # The variable is set, but is it from the command line or the environment?
39895
39896    # Try to remove the string !BUILD_CXX! from our list.
39897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39899      # If it failed, the variable was not from the command line. Ignore it,
39900      # but warn the user (except for BASH, which is always set by the calling BASH).
39901      if test "xBUILD_CXX" != xBASH; then
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39903$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39904      fi
39905      # Try to locate tool using the code snippet
39906      for ac_prog in cl CC g++
39907do
39908  # Extract the first word of "$ac_prog", so it can be a program name with args.
39909set dummy $ac_prog; ac_word=$2
39910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39911$as_echo_n "checking for $ac_word... " >&6; }
39912if ${ac_cv_path_BUILD_CXX+:} false; then :
39913  $as_echo_n "(cached) " >&6
39914else
39915  case $BUILD_CXX in
39916  [\\/]* | ?:[\\/]*)
39917  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39918  ;;
39919  *)
39920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39921for as_dir in $PATH
39922do
39923  IFS=$as_save_IFS
39924  test -z "$as_dir" && as_dir=.
39925    for ac_exec_ext in '' $ac_executable_extensions; do
39926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39927    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39929    break 2
39930  fi
39931done
39932  done
39933IFS=$as_save_IFS
39934
39935  ;;
39936esac
39937fi
39938BUILD_CXX=$ac_cv_path_BUILD_CXX
39939if test -n "$BUILD_CXX"; then
39940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39941$as_echo "$BUILD_CXX" >&6; }
39942else
39943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39944$as_echo "no" >&6; }
39945fi
39946
39947
39948  test -n "$BUILD_CXX" && break
39949done
39950
39951    else
39952      # If it succeeded, then it was overridden by the user. We will use it
39953      # for the tool.
39954
39955      # First remove it from the list of overridden variables, so we can test
39956      # for unknown variables in the end.
39957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39958
39959      # Check if the provided tool contains a complete path.
39960      tool_specified="$BUILD_CXX"
39961      tool_basename="${tool_specified##*/}"
39962      if test "x$tool_basename" = "x$tool_specified"; then
39963        # A command without a complete path is provided, search $PATH.
39964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39965$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39966        # Extract the first word of "$tool_basename", so it can be a program name with args.
39967set dummy $tool_basename; ac_word=$2
39968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39969$as_echo_n "checking for $ac_word... " >&6; }
39970if ${ac_cv_path_BUILD_CXX+:} false; then :
39971  $as_echo_n "(cached) " >&6
39972else
39973  case $BUILD_CXX in
39974  [\\/]* | ?:[\\/]*)
39975  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39976  ;;
39977  *)
39978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39979for as_dir in $PATH
39980do
39981  IFS=$as_save_IFS
39982  test -z "$as_dir" && as_dir=.
39983    for ac_exec_ext in '' $ac_executable_extensions; do
39984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39985    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39987    break 2
39988  fi
39989done
39990  done
39991IFS=$as_save_IFS
39992
39993  ;;
39994esac
39995fi
39996BUILD_CXX=$ac_cv_path_BUILD_CXX
39997if test -n "$BUILD_CXX"; then
39998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39999$as_echo "$BUILD_CXX" >&6; }
40000else
40001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40002$as_echo "no" >&6; }
40003fi
40004
40005
40006        if test "x$BUILD_CXX" = x; then
40007          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40008        fi
40009      else
40010        # Otherwise we believe it is a complete path. Use it as it is.
40011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40012$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40014$as_echo_n "checking for BUILD_CXX... " >&6; }
40015        if test ! -x "$tool_specified"; then
40016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40017$as_echo "not found" >&6; }
40018          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40019        fi
40020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40021$as_echo "$tool_specified" >&6; }
40022      fi
40023    fi
40024  fi
40025
40026
40027
40028  # Only process if variable expands to non-empty
40029
40030  if test "x$BUILD_CXX" != x; then
40031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40032
40033  # First separate the path from the arguments. This will split at the first
40034  # space.
40035  complete="$BUILD_CXX"
40036  path="${complete%% *}"
40037  tmp="$complete EOL"
40038  arguments="${tmp#* }"
40039
40040  # Input might be given as Windows format, start by converting to
40041  # unix format.
40042  new_path=`$CYGPATH -u "$path"`
40043
40044  # Now try to locate executable using which
40045  new_path=`$WHICH "$new_path" 2> /dev/null`
40046  # bat and cmd files are not always considered executable in cygwin causing which
40047  # to not find them
40048  if test "x$new_path" = x \
40049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40051    new_path=`$CYGPATH -u "$path"`
40052  fi
40053  if test "x$new_path" = x; then
40054    # Oops. Which didn't find the executable.
40055    # The splitting of arguments from the executable at a space might have been incorrect,
40056    # since paths with space are more likely in Windows. Give it another try with the whole
40057    # argument.
40058    path="$complete"
40059    arguments="EOL"
40060    new_path=`$CYGPATH -u "$path"`
40061    new_path=`$WHICH "$new_path" 2> /dev/null`
40062    # bat and cmd files are not always considered executable in cygwin causing which
40063    # to not find them
40064    if test "x$new_path" = x \
40065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40067      new_path=`$CYGPATH -u "$path"`
40068    fi
40069    if test "x$new_path" = x; then
40070      # It's still not found. Now this is an unrecoverable error.
40071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40072$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40073      has_space=`$ECHO "$complete" | $GREP " "`
40074      if test "x$has_space" != x; then
40075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40077      fi
40078      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40079    fi
40080  fi
40081
40082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40085  # "foo.exe" is OK but "foo" is an error.
40086  #
40087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40088  # It is also a way to make sure we got the proper file name for the real test later on.
40089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40090  if test "x$test_shortpath" = x; then
40091    # Short path failed, file does not exist as specified.
40092    # Try adding .exe or .cmd
40093    if test -f "${new_path}.exe"; then
40094      input_to_shortpath="${new_path}.exe"
40095    elif test -f "${new_path}.cmd"; then
40096      input_to_shortpath="${new_path}.cmd"
40097    else
40098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40099$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40102      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40103    fi
40104  else
40105    input_to_shortpath="$new_path"
40106  fi
40107
40108  # Call helper function which possibly converts this using DOS-style short mode.
40109  # If so, the updated path is stored in $new_path.
40110  new_path="$input_to_shortpath"
40111
40112  input_path="$input_to_shortpath"
40113  # Check if we need to convert this using DOS-style short mode. If the path
40114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40115  # take no chances and rewrite it.
40116  # Note: m4 eats our [], so we need to use [ and ] instead.
40117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40118  if test "x$has_forbidden_chars" != x; then
40119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40123      # Going to short mode and back again did indeed matter. Since short mode is
40124      # case insensitive, let's make it lowercase to improve readability.
40125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40126      # Now convert it back to Unix-style (cygpath)
40127      input_path=`$CYGPATH -u "$shortmode_path"`
40128      new_path="$input_path"
40129    fi
40130  fi
40131
40132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40133  if test "x$test_cygdrive_prefix" = x; then
40134    # As a simple fix, exclude /usr/bin since it's not a real path.
40135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40137      # a path prefixed by /cygdrive for fixpath to work.
40138      new_path="$CYGWIN_ROOT_PATH$input_path"
40139    fi
40140  fi
40141
40142  # remove trailing .exe if any
40143  new_path="${new_path/%.exe/}"
40144
40145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40146
40147  # First separate the path from the arguments. This will split at the first
40148  # space.
40149  complete="$BUILD_CXX"
40150  path="${complete%% *}"
40151  tmp="$complete EOL"
40152  arguments="${tmp#* }"
40153
40154  # Input might be given as Windows format, start by converting to
40155  # unix format.
40156  new_path="$path"
40157
40158  windows_path="$new_path"
40159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40160    unix_path=`$CYGPATH -u "$windows_path"`
40161    new_path="$unix_path"
40162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40164    new_path="$unix_path"
40165  fi
40166
40167
40168  # Now try to locate executable using which
40169  new_path=`$WHICH "$new_path" 2> /dev/null`
40170
40171  if test "x$new_path" = x; then
40172    # Oops. Which didn't find the executable.
40173    # The splitting of arguments from the executable at a space might have been incorrect,
40174    # since paths with space are more likely in Windows. Give it another try with the whole
40175    # argument.
40176    path="$complete"
40177    arguments="EOL"
40178    new_path="$path"
40179
40180  windows_path="$new_path"
40181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40182    unix_path=`$CYGPATH -u "$windows_path"`
40183    new_path="$unix_path"
40184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40186    new_path="$unix_path"
40187  fi
40188
40189
40190    new_path=`$WHICH "$new_path" 2> /dev/null`
40191    # bat and cmd files are not always considered executable in MSYS causing which
40192    # to not find them
40193    if test "x$new_path" = x \
40194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40196      new_path="$path"
40197
40198  windows_path="$new_path"
40199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40200    unix_path=`$CYGPATH -u "$windows_path"`
40201    new_path="$unix_path"
40202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40204    new_path="$unix_path"
40205  fi
40206
40207    fi
40208
40209    if test "x$new_path" = x; then
40210      # It's still not found. Now this is an unrecoverable error.
40211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40212$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40213      has_space=`$ECHO "$complete" | $GREP " "`
40214      if test "x$has_space" != x; then
40215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40217      fi
40218      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40219    fi
40220  fi
40221
40222  # Now new_path has a complete unix path to the binary
40223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40224    # Keep paths in /bin as-is, but remove trailing .exe if any
40225    new_path="${new_path/%.exe/}"
40226    # Do not save /bin paths to all_fixpath_prefixes!
40227  else
40228    # Not in mixed or Windows style, start by that.
40229    new_path=`cmd //c echo $new_path`
40230
40231  input_path="$new_path"
40232  # Check if we need to convert this using DOS-style short mode. If the path
40233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40234  # take no chances and rewrite it.
40235  # Note: m4 eats our [], so we need to use [ and ] instead.
40236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40237  if test "x$has_forbidden_chars" != x; then
40238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40240  fi
40241
40242    # Output is in $new_path
40243
40244  windows_path="$new_path"
40245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40246    unix_path=`$CYGPATH -u "$windows_path"`
40247    new_path="$unix_path"
40248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40250    new_path="$unix_path"
40251  fi
40252
40253    # remove trailing .exe if any
40254    new_path="${new_path/%.exe/}"
40255
40256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40258  fi
40259
40260    else
40261      # We're on a unix platform. Hooray! :)
40262      # First separate the path from the arguments. This will split at the first
40263      # space.
40264      complete="$BUILD_CXX"
40265      path="${complete%% *}"
40266      tmp="$complete EOL"
40267      arguments="${tmp#* }"
40268
40269      # Cannot rely on the command "which" here since it doesn't always work.
40270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40271      if test -z "$is_absolute_path"; then
40272        # Path to executable is not absolute. Find it.
40273        IFS_save="$IFS"
40274        IFS=:
40275        for p in $PATH; do
40276          if test -f "$p/$path" && test -x "$p/$path"; then
40277            new_path="$p/$path"
40278            break
40279          fi
40280        done
40281        IFS="$IFS_save"
40282      else
40283        # This is an absolute path, we can use it without further modifications.
40284        new_path="$path"
40285      fi
40286
40287      if test "x$new_path" = x; then
40288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40289$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40290        has_space=`$ECHO "$complete" | $GREP " "`
40291        if test "x$has_space" != x; then
40292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40294        fi
40295        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40296      fi
40297    fi
40298
40299    # Now join together the path and the arguments once again
40300    if test "x$arguments" != xEOL; then
40301      new_complete="$new_path ${arguments% *}"
40302    else
40303      new_complete="$new_path"
40304    fi
40305
40306    if test "x$complete" != "x$new_complete"; then
40307      BUILD_CXX="$new_complete"
40308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40309$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40310    fi
40311  fi
40312
40313
40314
40315  # Publish this variable in the help.
40316
40317
40318  if test "x$BUILD_LD" = x; then
40319    # The variable is not set by user, try to locate tool using the code snippet
40320    for ac_prog in ld
40321do
40322  # Extract the first word of "$ac_prog", so it can be a program name with args.
40323set dummy $ac_prog; ac_word=$2
40324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40325$as_echo_n "checking for $ac_word... " >&6; }
40326if ${ac_cv_path_BUILD_LD+:} false; then :
40327  $as_echo_n "(cached) " >&6
40328else
40329  case $BUILD_LD in
40330  [\\/]* | ?:[\\/]*)
40331  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40332  ;;
40333  *)
40334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40335for as_dir in $PATH
40336do
40337  IFS=$as_save_IFS
40338  test -z "$as_dir" && as_dir=.
40339    for ac_exec_ext in '' $ac_executable_extensions; do
40340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40341    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40343    break 2
40344  fi
40345done
40346  done
40347IFS=$as_save_IFS
40348
40349  ;;
40350esac
40351fi
40352BUILD_LD=$ac_cv_path_BUILD_LD
40353if test -n "$BUILD_LD"; then
40354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40355$as_echo "$BUILD_LD" >&6; }
40356else
40357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40358$as_echo "no" >&6; }
40359fi
40360
40361
40362  test -n "$BUILD_LD" && break
40363done
40364
40365  else
40366    # The variable is set, but is it from the command line or the environment?
40367
40368    # Try to remove the string !BUILD_LD! from our list.
40369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40371      # If it failed, the variable was not from the command line. Ignore it,
40372      # but warn the user (except for BASH, which is always set by the calling BASH).
40373      if test "xBUILD_LD" != xBASH; then
40374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40375$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40376      fi
40377      # Try to locate tool using the code snippet
40378      for ac_prog in ld
40379do
40380  # Extract the first word of "$ac_prog", so it can be a program name with args.
40381set dummy $ac_prog; ac_word=$2
40382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40383$as_echo_n "checking for $ac_word... " >&6; }
40384if ${ac_cv_path_BUILD_LD+:} false; then :
40385  $as_echo_n "(cached) " >&6
40386else
40387  case $BUILD_LD in
40388  [\\/]* | ?:[\\/]*)
40389  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40390  ;;
40391  *)
40392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40393for as_dir in $PATH
40394do
40395  IFS=$as_save_IFS
40396  test -z "$as_dir" && as_dir=.
40397    for ac_exec_ext in '' $ac_executable_extensions; do
40398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40399    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40401    break 2
40402  fi
40403done
40404  done
40405IFS=$as_save_IFS
40406
40407  ;;
40408esac
40409fi
40410BUILD_LD=$ac_cv_path_BUILD_LD
40411if test -n "$BUILD_LD"; then
40412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40413$as_echo "$BUILD_LD" >&6; }
40414else
40415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40416$as_echo "no" >&6; }
40417fi
40418
40419
40420  test -n "$BUILD_LD" && break
40421done
40422
40423    else
40424      # If it succeeded, then it was overridden by the user. We will use it
40425      # for the tool.
40426
40427      # First remove it from the list of overridden variables, so we can test
40428      # for unknown variables in the end.
40429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40430
40431      # Check if the provided tool contains a complete path.
40432      tool_specified="$BUILD_LD"
40433      tool_basename="${tool_specified##*/}"
40434      if test "x$tool_basename" = "x$tool_specified"; then
40435        # A command without a complete path is provided, search $PATH.
40436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40437$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40438        # Extract the first word of "$tool_basename", so it can be a program name with args.
40439set dummy $tool_basename; ac_word=$2
40440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40441$as_echo_n "checking for $ac_word... " >&6; }
40442if ${ac_cv_path_BUILD_LD+:} false; then :
40443  $as_echo_n "(cached) " >&6
40444else
40445  case $BUILD_LD in
40446  [\\/]* | ?:[\\/]*)
40447  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40448  ;;
40449  *)
40450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40451for as_dir in $PATH
40452do
40453  IFS=$as_save_IFS
40454  test -z "$as_dir" && as_dir=.
40455    for ac_exec_ext in '' $ac_executable_extensions; do
40456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40457    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40459    break 2
40460  fi
40461done
40462  done
40463IFS=$as_save_IFS
40464
40465  ;;
40466esac
40467fi
40468BUILD_LD=$ac_cv_path_BUILD_LD
40469if test -n "$BUILD_LD"; then
40470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40471$as_echo "$BUILD_LD" >&6; }
40472else
40473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40474$as_echo "no" >&6; }
40475fi
40476
40477
40478        if test "x$BUILD_LD" = x; then
40479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40480        fi
40481      else
40482        # Otherwise we believe it is a complete path. Use it as it is.
40483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40484$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40486$as_echo_n "checking for BUILD_LD... " >&6; }
40487        if test ! -x "$tool_specified"; then
40488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40489$as_echo "not found" >&6; }
40490          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40491        fi
40492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40493$as_echo "$tool_specified" >&6; }
40494      fi
40495    fi
40496  fi
40497
40498
40499
40500  # Only process if variable expands to non-empty
40501
40502  if test "x$BUILD_LD" != x; then
40503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40504
40505  # First separate the path from the arguments. This will split at the first
40506  # space.
40507  complete="$BUILD_LD"
40508  path="${complete%% *}"
40509  tmp="$complete EOL"
40510  arguments="${tmp#* }"
40511
40512  # Input might be given as Windows format, start by converting to
40513  # unix format.
40514  new_path=`$CYGPATH -u "$path"`
40515
40516  # Now try to locate executable using which
40517  new_path=`$WHICH "$new_path" 2> /dev/null`
40518  # bat and cmd files are not always considered executable in cygwin causing which
40519  # to not find them
40520  if test "x$new_path" = x \
40521      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40522      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40523    new_path=`$CYGPATH -u "$path"`
40524  fi
40525  if test "x$new_path" = x; then
40526    # Oops. Which didn't find the executable.
40527    # The splitting of arguments from the executable at a space might have been incorrect,
40528    # since paths with space are more likely in Windows. Give it another try with the whole
40529    # argument.
40530    path="$complete"
40531    arguments="EOL"
40532    new_path=`$CYGPATH -u "$path"`
40533    new_path=`$WHICH "$new_path" 2> /dev/null`
40534    # bat and cmd files are not always considered executable in cygwin causing which
40535    # to not find them
40536    if test "x$new_path" = x \
40537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40539      new_path=`$CYGPATH -u "$path"`
40540    fi
40541    if test "x$new_path" = x; then
40542      # It's still not found. Now this is an unrecoverable error.
40543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40544$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40545      has_space=`$ECHO "$complete" | $GREP " "`
40546      if test "x$has_space" != x; then
40547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40549      fi
40550      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40551    fi
40552  fi
40553
40554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40557  # "foo.exe" is OK but "foo" is an error.
40558  #
40559  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40560  # It is also a way to make sure we got the proper file name for the real test later on.
40561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40562  if test "x$test_shortpath" = x; then
40563    # Short path failed, file does not exist as specified.
40564    # Try adding .exe or .cmd
40565    if test -f "${new_path}.exe"; then
40566      input_to_shortpath="${new_path}.exe"
40567    elif test -f "${new_path}.cmd"; then
40568      input_to_shortpath="${new_path}.cmd"
40569    else
40570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40571$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40574      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40575    fi
40576  else
40577    input_to_shortpath="$new_path"
40578  fi
40579
40580  # Call helper function which possibly converts this using DOS-style short mode.
40581  # If so, the updated path is stored in $new_path.
40582  new_path="$input_to_shortpath"
40583
40584  input_path="$input_to_shortpath"
40585  # Check if we need to convert this using DOS-style short mode. If the path
40586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40587  # take no chances and rewrite it.
40588  # Note: m4 eats our [], so we need to use [ and ] instead.
40589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40590  if test "x$has_forbidden_chars" != x; then
40591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40595      # Going to short mode and back again did indeed matter. Since short mode is
40596      # case insensitive, let's make it lowercase to improve readability.
40597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40598      # Now convert it back to Unix-style (cygpath)
40599      input_path=`$CYGPATH -u "$shortmode_path"`
40600      new_path="$input_path"
40601    fi
40602  fi
40603
40604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40605  if test "x$test_cygdrive_prefix" = x; then
40606    # As a simple fix, exclude /usr/bin since it's not a real path.
40607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40609      # a path prefixed by /cygdrive for fixpath to work.
40610      new_path="$CYGWIN_ROOT_PATH$input_path"
40611    fi
40612  fi
40613
40614  # remove trailing .exe if any
40615  new_path="${new_path/%.exe/}"
40616
40617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40618
40619  # First separate the path from the arguments. This will split at the first
40620  # space.
40621  complete="$BUILD_LD"
40622  path="${complete%% *}"
40623  tmp="$complete EOL"
40624  arguments="${tmp#* }"
40625
40626  # Input might be given as Windows format, start by converting to
40627  # unix format.
40628  new_path="$path"
40629
40630  windows_path="$new_path"
40631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40632    unix_path=`$CYGPATH -u "$windows_path"`
40633    new_path="$unix_path"
40634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40636    new_path="$unix_path"
40637  fi
40638
40639
40640  # Now try to locate executable using which
40641  new_path=`$WHICH "$new_path" 2> /dev/null`
40642
40643  if test "x$new_path" = x; then
40644    # Oops. Which didn't find the executable.
40645    # The splitting of arguments from the executable at a space might have been incorrect,
40646    # since paths with space are more likely in Windows. Give it another try with the whole
40647    # argument.
40648    path="$complete"
40649    arguments="EOL"
40650    new_path="$path"
40651
40652  windows_path="$new_path"
40653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40654    unix_path=`$CYGPATH -u "$windows_path"`
40655    new_path="$unix_path"
40656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40658    new_path="$unix_path"
40659  fi
40660
40661
40662    new_path=`$WHICH "$new_path" 2> /dev/null`
40663    # bat and cmd files are not always considered executable in MSYS causing which
40664    # to not find them
40665    if test "x$new_path" = x \
40666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40668      new_path="$path"
40669
40670  windows_path="$new_path"
40671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40672    unix_path=`$CYGPATH -u "$windows_path"`
40673    new_path="$unix_path"
40674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40676    new_path="$unix_path"
40677  fi
40678
40679    fi
40680
40681    if test "x$new_path" = x; then
40682      # It's still not found. Now this is an unrecoverable error.
40683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40684$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40685      has_space=`$ECHO "$complete" | $GREP " "`
40686      if test "x$has_space" != x; then
40687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40689      fi
40690      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40691    fi
40692  fi
40693
40694  # Now new_path has a complete unix path to the binary
40695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40696    # Keep paths in /bin as-is, but remove trailing .exe if any
40697    new_path="${new_path/%.exe/}"
40698    # Do not save /bin paths to all_fixpath_prefixes!
40699  else
40700    # Not in mixed or Windows style, start by that.
40701    new_path=`cmd //c echo $new_path`
40702
40703  input_path="$new_path"
40704  # Check if we need to convert this using DOS-style short mode. If the path
40705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40706  # take no chances and rewrite it.
40707  # Note: m4 eats our [], so we need to use [ and ] instead.
40708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40709  if test "x$has_forbidden_chars" != x; then
40710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40712  fi
40713
40714    # Output is in $new_path
40715
40716  windows_path="$new_path"
40717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40718    unix_path=`$CYGPATH -u "$windows_path"`
40719    new_path="$unix_path"
40720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40722    new_path="$unix_path"
40723  fi
40724
40725    # remove trailing .exe if any
40726    new_path="${new_path/%.exe/}"
40727
40728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40730  fi
40731
40732    else
40733      # We're on a unix platform. Hooray! :)
40734      # First separate the path from the arguments. This will split at the first
40735      # space.
40736      complete="$BUILD_LD"
40737      path="${complete%% *}"
40738      tmp="$complete EOL"
40739      arguments="${tmp#* }"
40740
40741      # Cannot rely on the command "which" here since it doesn't always work.
40742      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40743      if test -z "$is_absolute_path"; then
40744        # Path to executable is not absolute. Find it.
40745        IFS_save="$IFS"
40746        IFS=:
40747        for p in $PATH; do
40748          if test -f "$p/$path" && test -x "$p/$path"; then
40749            new_path="$p/$path"
40750            break
40751          fi
40752        done
40753        IFS="$IFS_save"
40754      else
40755        # This is an absolute path, we can use it without further modifications.
40756        new_path="$path"
40757      fi
40758
40759      if test "x$new_path" = x; then
40760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40761$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40762        has_space=`$ECHO "$complete" | $GREP " "`
40763        if test "x$has_space" != x; then
40764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40766        fi
40767        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40768      fi
40769    fi
40770
40771    # Now join together the path and the arguments once again
40772    if test "x$arguments" != xEOL; then
40773      new_complete="$new_path ${arguments% *}"
40774    else
40775      new_complete="$new_path"
40776    fi
40777
40778    if test "x$complete" != "x$new_complete"; then
40779      BUILD_LD="$new_complete"
40780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40781$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40782    fi
40783  fi
40784
40785  else
40786    # If we are not cross compiling, use the normal target compilers for
40787    # building the build platform executables.
40788    BUILD_CC="$CC"
40789    BUILD_CXX="$CXX"
40790    BUILD_LD="$LD"
40791  fi
40792
40793
40794
40795
40796
40797
40798  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40799    # For hotspot, we need these in Windows mixed path,
40800    # so rewrite them all. Need added .exe suffix.
40801    HOTSPOT_CXX="$CXX.exe"
40802    HOTSPOT_LD="$LD.exe"
40803    HOTSPOT_MT="$MT.exe"
40804    HOTSPOT_RC="$RC.exe"
40805
40806  unix_path="$HOTSPOT_CXX"
40807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40808    windows_path=`$CYGPATH -m "$unix_path"`
40809    HOTSPOT_CXX="$windows_path"
40810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40811    windows_path=`cmd //c echo $unix_path`
40812    HOTSPOT_CXX="$windows_path"
40813  fi
40814
40815
40816  unix_path="$HOTSPOT_LD"
40817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40818    windows_path=`$CYGPATH -m "$unix_path"`
40819    HOTSPOT_LD="$windows_path"
40820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40821    windows_path=`cmd //c echo $unix_path`
40822    HOTSPOT_LD="$windows_path"
40823  fi
40824
40825
40826  unix_path="$HOTSPOT_MT"
40827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40828    windows_path=`$CYGPATH -m "$unix_path"`
40829    HOTSPOT_MT="$windows_path"
40830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40831    windows_path=`cmd //c echo $unix_path`
40832    HOTSPOT_MT="$windows_path"
40833  fi
40834
40835
40836  unix_path="$HOTSPOT_RC"
40837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40838    windows_path=`$CYGPATH -m "$unix_path"`
40839    HOTSPOT_RC="$windows_path"
40840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40841    windows_path=`cmd //c echo $unix_path`
40842    HOTSPOT_RC="$windows_path"
40843  fi
40844
40845
40846
40847  else
40848    HOTSPOT_CXX="$CXX"
40849    HOTSPOT_LD="$LD"
40850  fi
40851
40852
40853
40854  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40855    USE_CLANG=true
40856  fi
40857
40858
40859
40860
40861
40862  # The package path is used only on macosx?
40863  # FIXME: clean this up, and/or move it elsewhere.
40864  PACKAGE_PATH=/opt/local
40865
40866
40867  # Check for extra potential brokenness.
40868  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40869    # On Windows, double-check that we got the right compiler.
40870    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40871    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40872    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40873      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40874        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
40875      fi
40876    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40877      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40878        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40879      fi
40880    fi
40881  fi
40882
40883  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40884    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40885    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40886    # This is later checked when setting flags.
40887
40888    # "-Og" suppported for GCC 4.8 and later
40889    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40890
40891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40892$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40893  supports=yes
40894
40895  saved_cflags="$CFLAGS"
40896  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40897  ac_ext=c
40898ac_cpp='$CPP $CPPFLAGS'
40899ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40900ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40901ac_compiler_gnu=$ac_cv_c_compiler_gnu
40902
40903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40904/* end confdefs.h.  */
40905int i;
40906_ACEOF
40907if ac_fn_c_try_compile "$LINENO"; then :
40908
40909else
40910  supports=no
40911fi
40912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40913  ac_ext=cpp
40914ac_cpp='$CXXCPP $CPPFLAGS'
40915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40918
40919  CFLAGS="$saved_cflags"
40920
40921  saved_cxxflags="$CXXFLAGS"
40922  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40923  ac_ext=cpp
40924ac_cpp='$CXXCPP $CPPFLAGS'
40925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40928
40929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40930/* end confdefs.h.  */
40931int i;
40932_ACEOF
40933if ac_fn_cxx_try_compile "$LINENO"; then :
40934
40935else
40936  supports=no
40937fi
40938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40939  ac_ext=cpp
40940ac_cpp='$CXXCPP $CPPFLAGS'
40941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40944
40945  CXXFLAGS="$saved_cxxflags"
40946
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40948$as_echo "$supports" >&6; }
40949  if test "x$supports" = "xyes" ; then
40950    HAS_CFLAG_OPTIMIZE_DEBUG=true
40951  else
40952    HAS_CFLAG_OPTIMIZE_DEBUG=false
40953  fi
40954
40955
40956    # "-z relro" supported in GNU binutils 2.17 and later
40957    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40958
40959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40960$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40961  supports=yes
40962
40963  saved_ldflags="$LDFLAGS"
40964  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40965  ac_ext=c
40966ac_cpp='$CPP $CPPFLAGS'
40967ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40968ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40969ac_compiler_gnu=$ac_cv_c_compiler_gnu
40970
40971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40972/* end confdefs.h.  */
40973
40974int
40975main ()
40976{
40977
40978  ;
40979  return 0;
40980}
40981_ACEOF
40982if ac_fn_c_try_link "$LINENO"; then :
40983
40984else
40985  supports=no
40986fi
40987rm -f core conftest.err conftest.$ac_objext \
40988    conftest$ac_exeext conftest.$ac_ext
40989  ac_ext=cpp
40990ac_cpp='$CXXCPP $CPPFLAGS'
40991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40994
40995  LDFLAGS="$saved_ldflags"
40996
40997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40998$as_echo "$supports" >&6; }
40999  if test "x$supports" = "xyes" ; then
41000    HAS_LINKER_RELRO=true
41001  else
41002    HAS_LINKER_RELRO=false
41003  fi
41004
41005
41006    # "-z now" supported in GNU binutils 2.11 and later
41007    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41008
41009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41010$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41011  supports=yes
41012
41013  saved_ldflags="$LDFLAGS"
41014  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41015  ac_ext=c
41016ac_cpp='$CPP $CPPFLAGS'
41017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41019ac_compiler_gnu=$ac_cv_c_compiler_gnu
41020
41021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41022/* end confdefs.h.  */
41023
41024int
41025main ()
41026{
41027
41028  ;
41029  return 0;
41030}
41031_ACEOF
41032if ac_fn_c_try_link "$LINENO"; then :
41033
41034else
41035  supports=no
41036fi
41037rm -f core conftest.err conftest.$ac_objext \
41038    conftest$ac_exeext conftest.$ac_ext
41039  ac_ext=cpp
41040ac_cpp='$CXXCPP $CPPFLAGS'
41041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41044
41045  LDFLAGS="$saved_ldflags"
41046
41047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41048$as_echo "$supports" >&6; }
41049  if test "x$supports" = "xyes" ; then
41050    HAS_LINKER_NOW=true
41051  else
41052    HAS_LINKER_NOW=false
41053  fi
41054
41055  fi
41056
41057  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41058  # in executable.'
41059  USING_BROKEN_SUSE_LD=no
41060  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41062$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41063    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41064    $ECHO "int main() { }" > main.c
41065    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41067$as_echo "no" >&6; }
41068      USING_BROKEN_SUSE_LD=no
41069    else
41070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41071$as_echo "yes" >&6; }
41072      USING_BROKEN_SUSE_LD=yes
41073    fi
41074    rm -rf version-script.map main.c a.out
41075  fi
41076
41077
41078
41079# Setup the JTReg Regression Test Harness.
41080
41081
41082# Check whether --with-jtreg was given.
41083if test "${with_jtreg+set}" = set; then :
41084  withval=$with_jtreg;
41085else
41086  with_jtreg=no
41087fi
41088
41089
41090  if test "x$with_jtreg" = xno; then
41091    # jtreg disabled
41092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41093$as_echo_n "checking for jtreg... " >&6; }
41094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41095$as_echo "no" >&6; }
41096  else
41097    if test "x$with_jtreg" != xyes; then
41098      # with path specified.
41099      JT_HOME="$with_jtreg"
41100    fi
41101
41102    if test "x$JT_HOME" != x; then
41103      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41104$as_echo_n "checking for jtreg... " >&6; }
41105
41106      # use JT_HOME enviroment var.
41107
41108  # Only process if variable expands to non-empty
41109
41110  if test "x$JT_HOME" != x; then
41111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41112
41113  # Input might be given as Windows format, start by converting to
41114  # unix format.
41115  path="$JT_HOME"
41116  new_path=`$CYGPATH -u "$path"`
41117
41118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41121  # "foo.exe" is OK but "foo" is an error.
41122  #
41123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41124  # It is also a way to make sure we got the proper file name for the real test later on.
41125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41126  if test "x$test_shortpath" = x; then
41127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41128$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41129    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41130  fi
41131
41132  # Call helper function which possibly converts this using DOS-style short mode.
41133  # If so, the updated path is stored in $new_path.
41134
41135  input_path="$new_path"
41136  # Check if we need to convert this using DOS-style short mode. If the path
41137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41138  # take no chances and rewrite it.
41139  # Note: m4 eats our [], so we need to use [ and ] instead.
41140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41141  if test "x$has_forbidden_chars" != x; then
41142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41146      # Going to short mode and back again did indeed matter. Since short mode is
41147      # case insensitive, let's make it lowercase to improve readability.
41148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41149      # Now convert it back to Unix-style (cygpath)
41150      input_path=`$CYGPATH -u "$shortmode_path"`
41151      new_path="$input_path"
41152    fi
41153  fi
41154
41155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41156  if test "x$test_cygdrive_prefix" = x; then
41157    # As a simple fix, exclude /usr/bin since it's not a real path.
41158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41160      # a path prefixed by /cygdrive for fixpath to work.
41161      new_path="$CYGWIN_ROOT_PATH$input_path"
41162    fi
41163  fi
41164
41165
41166  if test "x$path" != "x$new_path"; then
41167    JT_HOME="$new_path"
41168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41169$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41170  fi
41171
41172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41173
41174  path="$JT_HOME"
41175  has_colon=`$ECHO $path | $GREP ^.:`
41176  new_path="$path"
41177  if test "x$has_colon" = x; then
41178    # Not in mixed or Windows style, start by that.
41179    new_path=`cmd //c echo $path`
41180  fi
41181
41182
41183  input_path="$new_path"
41184  # Check if we need to convert this using DOS-style short mode. If the path
41185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41186  # take no chances and rewrite it.
41187  # Note: m4 eats our [], so we need to use [ and ] instead.
41188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41189  if test "x$has_forbidden_chars" != x; then
41190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41192  fi
41193
41194
41195  windows_path="$new_path"
41196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41197    unix_path=`$CYGPATH -u "$windows_path"`
41198    new_path="$unix_path"
41199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41201    new_path="$unix_path"
41202  fi
41203
41204  if test "x$path" != "x$new_path"; then
41205    JT_HOME="$new_path"
41206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41207$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41208  fi
41209
41210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41212
41213    else
41214      # We're on a unix platform. Hooray! :)
41215      path="$JT_HOME"
41216      has_space=`$ECHO "$path" | $GREP " "`
41217      if test "x$has_space" != x; then
41218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41219$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41221      fi
41222
41223      # Use eval to expand a potential ~
41224      eval path="$path"
41225      if test ! -f "$path" && test ! -d "$path"; then
41226        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41227      fi
41228
41229      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41230    fi
41231  fi
41232
41233
41234      # jtreg win32 script works for everybody
41235      JTREGEXE="$JT_HOME/bin/jtreg"
41236
41237      if test ! -f "$JTREGEXE"; then
41238        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41239      fi
41240
41241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41242$as_echo "$JTREGEXE" >&6; }
41243    else
41244      # try to find jtreg on path
41245
41246
41247
41248  # Publish this variable in the help.
41249
41250
41251  if test "x$JTREGEXE" = x; then
41252    # The variable is not set by user, try to locate tool using the code snippet
41253    for ac_prog in jtreg
41254do
41255  # Extract the first word of "$ac_prog", so it can be a program name with args.
41256set dummy $ac_prog; ac_word=$2
41257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41258$as_echo_n "checking for $ac_word... " >&6; }
41259if ${ac_cv_path_JTREGEXE+:} false; then :
41260  $as_echo_n "(cached) " >&6
41261else
41262  case $JTREGEXE in
41263  [\\/]* | ?:[\\/]*)
41264  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41265  ;;
41266  *)
41267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41268for as_dir in $PATH
41269do
41270  IFS=$as_save_IFS
41271  test -z "$as_dir" && as_dir=.
41272    for ac_exec_ext in '' $ac_executable_extensions; do
41273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41274    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41276    break 2
41277  fi
41278done
41279  done
41280IFS=$as_save_IFS
41281
41282  ;;
41283esac
41284fi
41285JTREGEXE=$ac_cv_path_JTREGEXE
41286if test -n "$JTREGEXE"; then
41287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41288$as_echo "$JTREGEXE" >&6; }
41289else
41290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41291$as_echo "no" >&6; }
41292fi
41293
41294
41295  test -n "$JTREGEXE" && break
41296done
41297
41298  else
41299    # The variable is set, but is it from the command line or the environment?
41300
41301    # Try to remove the string !JTREGEXE! from our list.
41302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41304      # If it failed, the variable was not from the command line. Ignore it,
41305      # but warn the user (except for BASH, which is always set by the calling BASH).
41306      if test "xJTREGEXE" != xBASH; then
41307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41308$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41309      fi
41310      # Try to locate tool using the code snippet
41311      for ac_prog in jtreg
41312do
41313  # Extract the first word of "$ac_prog", so it can be a program name with args.
41314set dummy $ac_prog; ac_word=$2
41315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41316$as_echo_n "checking for $ac_word... " >&6; }
41317if ${ac_cv_path_JTREGEXE+:} false; then :
41318  $as_echo_n "(cached) " >&6
41319else
41320  case $JTREGEXE in
41321  [\\/]* | ?:[\\/]*)
41322  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41323  ;;
41324  *)
41325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41326for as_dir in $PATH
41327do
41328  IFS=$as_save_IFS
41329  test -z "$as_dir" && as_dir=.
41330    for ac_exec_ext in '' $ac_executable_extensions; do
41331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41332    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41334    break 2
41335  fi
41336done
41337  done
41338IFS=$as_save_IFS
41339
41340  ;;
41341esac
41342fi
41343JTREGEXE=$ac_cv_path_JTREGEXE
41344if test -n "$JTREGEXE"; then
41345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41346$as_echo "$JTREGEXE" >&6; }
41347else
41348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41349$as_echo "no" >&6; }
41350fi
41351
41352
41353  test -n "$JTREGEXE" && break
41354done
41355
41356    else
41357      # If it succeeded, then it was overridden by the user. We will use it
41358      # for the tool.
41359
41360      # First remove it from the list of overridden variables, so we can test
41361      # for unknown variables in the end.
41362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41363
41364      # Check if the provided tool contains a complete path.
41365      tool_specified="$JTREGEXE"
41366      tool_basename="${tool_specified##*/}"
41367      if test "x$tool_basename" = "x$tool_specified"; then
41368        # A command without a complete path is provided, search $PATH.
41369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41370$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41371        # Extract the first word of "$tool_basename", so it can be a program name with args.
41372set dummy $tool_basename; ac_word=$2
41373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41374$as_echo_n "checking for $ac_word... " >&6; }
41375if ${ac_cv_path_JTREGEXE+:} false; then :
41376  $as_echo_n "(cached) " >&6
41377else
41378  case $JTREGEXE in
41379  [\\/]* | ?:[\\/]*)
41380  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41381  ;;
41382  *)
41383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41384for as_dir in $PATH
41385do
41386  IFS=$as_save_IFS
41387  test -z "$as_dir" && as_dir=.
41388    for ac_exec_ext in '' $ac_executable_extensions; do
41389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41390    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41392    break 2
41393  fi
41394done
41395  done
41396IFS=$as_save_IFS
41397
41398  ;;
41399esac
41400fi
41401JTREGEXE=$ac_cv_path_JTREGEXE
41402if test -n "$JTREGEXE"; then
41403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41404$as_echo "$JTREGEXE" >&6; }
41405else
41406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41407$as_echo "no" >&6; }
41408fi
41409
41410
41411        if test "x$JTREGEXE" = x; then
41412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41413        fi
41414      else
41415        # Otherwise we believe it is a complete path. Use it as it is.
41416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41417$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41419$as_echo_n "checking for JTREGEXE... " >&6; }
41420        if test ! -x "$tool_specified"; then
41421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41422$as_echo "not found" >&6; }
41423          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41424        fi
41425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41426$as_echo "$tool_specified" >&6; }
41427      fi
41428    fi
41429  fi
41430
41431
41432
41433  if test "x$JTREGEXE" = x; then
41434    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41435  fi
41436
41437
41438      JT_HOME="`$DIRNAME $JTREGEXE`"
41439    fi
41440  fi
41441
41442
41443
41444
41445
41446
41447  # Option used to tell the compiler whether to create 32- or 64-bit executables
41448  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41449    COMPILER_TARGET_BITS_FLAG="-q"
41450  else
41451    COMPILER_TARGET_BITS_FLAG="-m"
41452  fi
41453
41454
41455  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41456  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41457    ARFLAGS="-r"
41458  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41459    ARFLAGS="-X64"
41460  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41461    # lib.exe is used as AR to create static libraries.
41462    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41463  else
41464    ARFLAGS=""
41465  fi
41466
41467
41468  ## Setup strip.
41469  # FIXME: should this really be per platform, or should it be per toolchain type?
41470  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41471  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41472  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41473    STRIPFLAGS="-g"
41474  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41475    STRIPFLAGS="-x"
41476  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41477    STRIPFLAGS="-S"
41478  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41479    STRIPFLAGS="-X32_64"
41480  fi
41481
41482  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41483    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41484  fi
41485
41486
41487  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41488    CC_OUT_OPTION=-Fo
41489    EXE_OUT_OPTION=-out:
41490    LD_OUT_OPTION=-out:
41491    AR_OUT_OPTION=-out:
41492  else
41493    # The option used to specify the target .o,.a or .so file.
41494    # When compiling, how to specify the to be created object file.
41495    CC_OUT_OPTION='-o$(SPACE)'
41496    # When linking, how to specify the to be created executable.
41497    EXE_OUT_OPTION='-o$(SPACE)'
41498    # When linking, how to specify the to be created dynamically linkable library.
41499    LD_OUT_OPTION='-o$(SPACE)'
41500    # When archiving, how to specify the to be create static archive for object files.
41501    AR_OUT_OPTION='rcs$(SPACE)'
41502  fi
41503
41504
41505
41506
41507
41508  # On Windows, we need to set RC flags.
41509  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41510    RC_FLAGS="-nologo -l0x409"
41511    if test "x$VARIANT" = xOPT; then
41512      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41513    fi
41514
41515    # The version variables used to create RC_FLAGS may be overridden
41516    # in a custom configure script, or possibly the command line.
41517    # Let those variables be expanded at make time in spec.gmk.
41518    # The \$ are escaped to the shell, and the $(...) variables
41519    # are evaluated by make.
41520    RC_FLAGS="$RC_FLAGS \
41521        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41522        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41523        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41524        -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
41525        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41526        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41527        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41528  fi
41529
41530
41531  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41532    # silence copyright notice and other headers.
41533    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41534  fi
41535
41536  if test "x$SYSROOT" != "x"; then
41537    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41538      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41539        # Solaris Studio does not have a concept of sysroot. Instead we must
41540        # make sure the default include and lib dirs are appended to each
41541        # compile and link command line.
41542        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41543        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41544            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41545            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41546      fi
41547    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41548      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41549      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41550      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41551    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41552      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41553      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41554    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41555      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41556      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41557    fi
41558    # Propagate the sysroot args to hotspot
41559    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41560    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41561    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41562  fi
41563
41564  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41565  # set this here so it doesn't have to be peppered throughout the forest
41566  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41567    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41568    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41569  fi
41570
41571
41572
41573
41574
41575# FIXME: Currently we must test this after toolchain but before flags. Fix!
41576
41577# Now we can test some aspects on the target using configure macros.
41578
41579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41580$as_echo_n "checking for ANSI C header files... " >&6; }
41581if ${ac_cv_header_stdc+:} false; then :
41582  $as_echo_n "(cached) " >&6
41583else
41584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41585/* end confdefs.h.  */
41586#include <stdlib.h>
41587#include <stdarg.h>
41588#include <string.h>
41589#include <float.h>
41590
41591int
41592main ()
41593{
41594
41595  ;
41596  return 0;
41597}
41598_ACEOF
41599if ac_fn_cxx_try_compile "$LINENO"; then :
41600  ac_cv_header_stdc=yes
41601else
41602  ac_cv_header_stdc=no
41603fi
41604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41605
41606if test $ac_cv_header_stdc = yes; then
41607  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41609/* end confdefs.h.  */
41610#include <string.h>
41611
41612_ACEOF
41613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41614  $EGREP "memchr" >/dev/null 2>&1; then :
41615
41616else
41617  ac_cv_header_stdc=no
41618fi
41619rm -f conftest*
41620
41621fi
41622
41623if test $ac_cv_header_stdc = yes; then
41624  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41626/* end confdefs.h.  */
41627#include <stdlib.h>
41628
41629_ACEOF
41630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41631  $EGREP "free" >/dev/null 2>&1; then :
41632
41633else
41634  ac_cv_header_stdc=no
41635fi
41636rm -f conftest*
41637
41638fi
41639
41640if test $ac_cv_header_stdc = yes; then
41641  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41642  if test "$cross_compiling" = yes; then :
41643  :
41644else
41645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41646/* end confdefs.h.  */
41647#include <ctype.h>
41648#include <stdlib.h>
41649#if ((' ' & 0x0FF) == 0x020)
41650# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41651# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41652#else
41653# define ISLOWER(c) \
41654		   (('a' <= (c) && (c) <= 'i') \
41655		     || ('j' <= (c) && (c) <= 'r') \
41656		     || ('s' <= (c) && (c) <= 'z'))
41657# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41658#endif
41659
41660#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41661int
41662main ()
41663{
41664  int i;
41665  for (i = 0; i < 256; i++)
41666    if (XOR (islower (i), ISLOWER (i))
41667	|| toupper (i) != TOUPPER (i))
41668      return 2;
41669  return 0;
41670}
41671_ACEOF
41672if ac_fn_cxx_try_run "$LINENO"; then :
41673
41674else
41675  ac_cv_header_stdc=no
41676fi
41677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41678  conftest.$ac_objext conftest.beam conftest.$ac_ext
41679fi
41680
41681fi
41682fi
41683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41684$as_echo "$ac_cv_header_stdc" >&6; }
41685if test $ac_cv_header_stdc = yes; then
41686
41687$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41688
41689fi
41690
41691# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41692for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41693		  inttypes.h stdint.h unistd.h
41694do :
41695  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41696ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41697"
41698if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41699  cat >>confdefs.h <<_ACEOF
41700#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41701_ACEOF
41702
41703fi
41704
41705done
41706
41707
41708
41709  ###############################################################################
41710  #
41711  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41712  # (The JVM can use 32 or 64 bit Java pointers but that decision
41713  # is made at runtime.)
41714  #
41715
41716  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41717    # Always specify -m flag on Solaris
41718    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41719
41720  # When we add flags to the "official" CFLAGS etc, we need to
41721  # keep track of these additions in ADDED_CFLAGS etc. These
41722  # will later be checked to make sure only controlled additions
41723  # have been made to CFLAGS etc.
41724  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41725  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41726  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41727
41728  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41729  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41730  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41731
41732  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41733  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41734  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41735
41736  elif test "x$COMPILE_TYPE" = xreduced; then
41737    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41738      # Specify -m if running reduced on unix platforms
41739
41740  # When we add flags to the "official" CFLAGS etc, we need to
41741  # keep track of these additions in ADDED_CFLAGS etc. These
41742  # will later be checked to make sure only controlled additions
41743  # have been made to CFLAGS etc.
41744  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41745  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41746  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41747
41748  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41749  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41750  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41751
41752  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41753  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41754  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41755
41756    fi
41757  fi
41758
41759  # Make compilation sanity check
41760  for ac_header in stdio.h
41761do :
41762  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41763if test "x$ac_cv_header_stdio_h" = xyes; then :
41764  cat >>confdefs.h <<_ACEOF
41765#define HAVE_STDIO_H 1
41766_ACEOF
41767
41768else
41769
41770    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41771$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41772    if test "x$COMPILE_TYPE" = xreduced; then
41773      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41774$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41775    elif test "x$COMPILE_TYPE" = xcross; then
41776      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41777$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41778    fi
41779    as_fn_error $? "Cannot continue." "$LINENO" 5
41780
41781fi
41782
41783done
41784
41785
41786  # The cast to long int works around a bug in the HP C Compiler
41787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41789# This bug is HP SR number 8606223364.
41790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41791$as_echo_n "checking size of int *... " >&6; }
41792if ${ac_cv_sizeof_int_p+:} false; then :
41793  $as_echo_n "(cached) " >&6
41794else
41795  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41796
41797else
41798  if test "$ac_cv_type_int_p" = yes; then
41799     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41801as_fn_error 77 "cannot compute sizeof (int *)
41802See \`config.log' for more details" "$LINENO" 5; }
41803   else
41804     ac_cv_sizeof_int_p=0
41805   fi
41806fi
41807
41808fi
41809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41810$as_echo "$ac_cv_sizeof_int_p" >&6; }
41811
41812
41813
41814cat >>confdefs.h <<_ACEOF
41815#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41816_ACEOF
41817
41818
41819
41820  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41821  if test "x$ac_cv_sizeof_int_p" = x; then
41822    # The test failed, lets stick to the assumed value.
41823    { $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
41824$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41825  else
41826    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41827
41828    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41829      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41830      # Let's try to implicitely set the compilers target architecture and retry the test
41831      { $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
41832$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;}
41833      { $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
41834$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;}
41835
41836  # When we add flags to the "official" CFLAGS etc, we need to
41837  # keep track of these additions in ADDED_CFLAGS etc. These
41838  # will later be checked to make sure only controlled additions
41839  # have been made to CFLAGS etc.
41840  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41841  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41842  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41843
41844  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41845  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41846  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41847
41848  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41849  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41850  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41851
41852
41853      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41854      unset ac_cv_sizeof_int_p
41855      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41856      cat >>confdefs.h <<_ACEOF
41857#undef SIZEOF_INT_P
41858_ACEOF
41859
41860      # The cast to long int works around a bug in the HP C Compiler
41861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41863# This bug is HP SR number 8606223364.
41864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41865$as_echo_n "checking size of int *... " >&6; }
41866if ${ac_cv_sizeof_int_p+:} false; then :
41867  $as_echo_n "(cached) " >&6
41868else
41869  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41870
41871else
41872  if test "$ac_cv_type_int_p" = yes; then
41873     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41875as_fn_error 77 "cannot compute sizeof (int *)
41876See \`config.log' for more details" "$LINENO" 5; }
41877   else
41878     ac_cv_sizeof_int_p=0
41879   fi
41880fi
41881
41882fi
41883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41884$as_echo "$ac_cv_sizeof_int_p" >&6; }
41885
41886
41887
41888cat >>confdefs.h <<_ACEOF
41889#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41890_ACEOF
41891
41892
41893
41894      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41895
41896      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41897        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
41898      fi
41899    fi
41900  fi
41901
41902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41903$as_echo_n "checking for target address size... " >&6; }
41904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41905$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41906
41907
41908  ###############################################################################
41909  #
41910  # Is the target little of big endian?
41911  #
41912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41913$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41914if ${ac_cv_c_bigendian+:} false; then :
41915  $as_echo_n "(cached) " >&6
41916else
41917  ac_cv_c_bigendian=unknown
41918    # See if we're dealing with a universal compiler.
41919    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41920/* end confdefs.h.  */
41921#ifndef __APPLE_CC__
41922	       not a universal capable compiler
41923	     #endif
41924	     typedef int dummy;
41925
41926_ACEOF
41927if ac_fn_cxx_try_compile "$LINENO"; then :
41928
41929	# Check for potential -arch flags.  It is not universal unless
41930	# there are at least two -arch flags with different values.
41931	ac_arch=
41932	ac_prev=
41933	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41934	 if test -n "$ac_prev"; then
41935	   case $ac_word in
41936	     i?86 | x86_64 | ppc | ppc64)
41937	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41938		 ac_arch=$ac_word
41939	       else
41940		 ac_cv_c_bigendian=universal
41941		 break
41942	       fi
41943	       ;;
41944	   esac
41945	   ac_prev=
41946	 elif test "x$ac_word" = "x-arch"; then
41947	   ac_prev=arch
41948	 fi
41949       done
41950fi
41951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41952    if test $ac_cv_c_bigendian = unknown; then
41953      # See if sys/param.h defines the BYTE_ORDER macro.
41954      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41955/* end confdefs.h.  */
41956#include <sys/types.h>
41957	     #include <sys/param.h>
41958
41959int
41960main ()
41961{
41962#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41963		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41964		     && LITTLE_ENDIAN)
41965	      bogus endian macros
41966	     #endif
41967
41968  ;
41969  return 0;
41970}
41971_ACEOF
41972if ac_fn_cxx_try_compile "$LINENO"; then :
41973  # It does; now see whether it defined to BIG_ENDIAN or not.
41974	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41975/* end confdefs.h.  */
41976#include <sys/types.h>
41977		#include <sys/param.h>
41978
41979int
41980main ()
41981{
41982#if BYTE_ORDER != BIG_ENDIAN
41983		 not big endian
41984		#endif
41985
41986  ;
41987  return 0;
41988}
41989_ACEOF
41990if ac_fn_cxx_try_compile "$LINENO"; then :
41991  ac_cv_c_bigendian=yes
41992else
41993  ac_cv_c_bigendian=no
41994fi
41995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41996fi
41997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41998    fi
41999    if test $ac_cv_c_bigendian = unknown; then
42000      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42001      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42002/* end confdefs.h.  */
42003#include <limits.h>
42004
42005int
42006main ()
42007{
42008#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42009	      bogus endian macros
42010	     #endif
42011
42012  ;
42013  return 0;
42014}
42015_ACEOF
42016if ac_fn_cxx_try_compile "$LINENO"; then :
42017  # It does; now see whether it defined to _BIG_ENDIAN or not.
42018	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42019/* end confdefs.h.  */
42020#include <limits.h>
42021
42022int
42023main ()
42024{
42025#ifndef _BIG_ENDIAN
42026		 not big endian
42027		#endif
42028
42029  ;
42030  return 0;
42031}
42032_ACEOF
42033if ac_fn_cxx_try_compile "$LINENO"; then :
42034  ac_cv_c_bigendian=yes
42035else
42036  ac_cv_c_bigendian=no
42037fi
42038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42039fi
42040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42041    fi
42042    if test $ac_cv_c_bigendian = unknown; then
42043      # Compile a test program.
42044      if test "$cross_compiling" = yes; then :
42045  # Try to guess by grepping values from an object file.
42046	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42047/* end confdefs.h.  */
42048short int ascii_mm[] =
42049		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42050		short int ascii_ii[] =
42051		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42052		int use_ascii (int i) {
42053		  return ascii_mm[i] + ascii_ii[i];
42054		}
42055		short int ebcdic_ii[] =
42056		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42057		short int ebcdic_mm[] =
42058		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42059		int use_ebcdic (int i) {
42060		  return ebcdic_mm[i] + ebcdic_ii[i];
42061		}
42062		extern int foo;
42063
42064int
42065main ()
42066{
42067return use_ascii (foo) == use_ebcdic (foo);
42068  ;
42069  return 0;
42070}
42071_ACEOF
42072if ac_fn_cxx_try_compile "$LINENO"; then :
42073  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42074	      ac_cv_c_bigendian=yes
42075	    fi
42076	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42077	      if test "$ac_cv_c_bigendian" = unknown; then
42078		ac_cv_c_bigendian=no
42079	      else
42080		# finding both strings is unlikely to happen, but who knows?
42081		ac_cv_c_bigendian=unknown
42082	      fi
42083	    fi
42084fi
42085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42086else
42087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42088/* end confdefs.h.  */
42089$ac_includes_default
42090int
42091main ()
42092{
42093
42094	     /* Are we little or big endian?  From Harbison&Steele.  */
42095	     union
42096	     {
42097	       long int l;
42098	       char c[sizeof (long int)];
42099	     } u;
42100	     u.l = 1;
42101	     return u.c[sizeof (long int) - 1] == 1;
42102
42103  ;
42104  return 0;
42105}
42106_ACEOF
42107if ac_fn_cxx_try_run "$LINENO"; then :
42108  ac_cv_c_bigendian=no
42109else
42110  ac_cv_c_bigendian=yes
42111fi
42112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42113  conftest.$ac_objext conftest.beam conftest.$ac_ext
42114fi
42115
42116    fi
42117fi
42118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42119$as_echo "$ac_cv_c_bigendian" >&6; }
42120 case $ac_cv_c_bigendian in #(
42121   yes)
42122     ENDIAN="big";; #(
42123   no)
42124     ENDIAN="little" ;; #(
42125   universal)
42126     ENDIAN="universal_endianness"
42127     ;; #(
42128   *)
42129     ENDIAN="unknown" ;;
42130 esac
42131
42132
42133  if test "x$ENDIAN" = xuniversal_endianness; then
42134    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42135  fi
42136  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42137    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
42138  fi
42139
42140
42141# Configure flags for the tools
42142
42143  ###############################################################################
42144  #
42145  # How to compile shared libraries.
42146  #
42147
42148  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42149    PICFLAG="-fPIC"
42150    C_FLAG_REORDER=''
42151    CXX_FLAG_REORDER=''
42152
42153    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42154      # Linking is different on MacOSX
42155      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42156      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42157      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42158      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42159      SET_SHARED_LIBRARY_MAPFILE=''
42160    else
42161      # Default works for linux, might work on other platforms as well.
42162      SHARED_LIBRARY_FLAGS='-shared'
42163      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42164      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42165      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42166      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42167    fi
42168  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42169    PICFLAG=''
42170    C_FLAG_REORDER=''
42171    CXX_FLAG_REORDER=''
42172
42173    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42174      # Linking is different on MacOSX
42175      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42176      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42177      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42178      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42179      SET_SHARED_LIBRARY_MAPFILE=''
42180    else
42181      # Default works for linux, might work on other platforms as well.
42182      SHARED_LIBRARY_FLAGS='-shared'
42183      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42184      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42185      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42186      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42187    fi
42188  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42189    PICFLAG="-KPIC"
42190    C_FLAG_REORDER='-xF'
42191    CXX_FLAG_REORDER='-xF'
42192    SHARED_LIBRARY_FLAGS="-G"
42193    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42194    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42195    SET_SHARED_LIBRARY_NAME=''
42196    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42197  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42198    PICFLAG="-qpic=large"
42199    C_FLAG_REORDER=''
42200    CXX_FLAG_REORDER=''
42201    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42202    SET_EXECUTABLE_ORIGIN=""
42203    SET_SHARED_LIBRARY_ORIGIN=''
42204    SET_SHARED_LIBRARY_NAME=''
42205    SET_SHARED_LIBRARY_MAPFILE=''
42206  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42207    PICFLAG=""
42208    C_FLAG_REORDER=''
42209    CXX_FLAG_REORDER=''
42210    SHARED_LIBRARY_FLAGS="-LD"
42211    SET_EXECUTABLE_ORIGIN=''
42212    SET_SHARED_LIBRARY_ORIGIN=''
42213    SET_SHARED_LIBRARY_NAME=''
42214    SET_SHARED_LIBRARY_MAPFILE=''
42215  fi
42216
42217
42218
42219
42220
42221
42222
42223
42224  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42225    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42226    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42227    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42228  fi
42229  # The (cross) compiler is now configured, we can now test capabilities
42230  # of the target platform.
42231
42232
42233
42234  ###############################################################################
42235  #
42236  # Setup the opt flags for different compilers
42237  # and different operating systems.
42238  #
42239
42240  # FIXME: this was indirectly the old default, but just inherited.
42241  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42242  #   C_FLAG_DEPS="-MMD -MF"
42243  # fi
42244
42245  # Generate make dependency files
42246  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42247    C_FLAG_DEPS="-MMD -MF"
42248  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42249    C_FLAG_DEPS="-MMD -MF"
42250  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42251    C_FLAG_DEPS="-xMMD -xMF"
42252  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42253    C_FLAG_DEPS="-qmakedep=gcc -MF"
42254  fi
42255  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42256
42257
42258
42259  # Debug symbols
42260  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42261    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42262      # reduce from default "-g2" option to save space
42263      CFLAGS_DEBUG_SYMBOLS="-g1"
42264      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42265    else
42266      CFLAGS_DEBUG_SYMBOLS="-g"
42267      CXXFLAGS_DEBUG_SYMBOLS="-g"
42268    fi
42269  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42270    CFLAGS_DEBUG_SYMBOLS="-g"
42271    CXXFLAGS_DEBUG_SYMBOLS="-g"
42272  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42273    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42274    # FIXME: likely a bug, this disables debug symbols rather than enables them
42275    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42276  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42277    CFLAGS_DEBUG_SYMBOLS="-g"
42278    CXXFLAGS_DEBUG_SYMBOLS="-g"
42279  fi
42280
42281
42282
42283  # bounds, memory and behavior checking options
42284  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42285    case $DEBUG_LEVEL in
42286    release )
42287      # no adjustment
42288      ;;
42289    fastdebug )
42290      # no adjustment
42291      ;;
42292    slowdebug )
42293      # Add runtime stack smashing and undefined behavior checks.
42294      # Not all versions of gcc support -fstack-protector
42295      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42296
42297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42298$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42299  supports=yes
42300
42301  saved_cflags="$CFLAGS"
42302  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42303  ac_ext=c
42304ac_cpp='$CPP $CPPFLAGS'
42305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42307ac_compiler_gnu=$ac_cv_c_compiler_gnu
42308
42309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42310/* end confdefs.h.  */
42311int i;
42312_ACEOF
42313if ac_fn_c_try_compile "$LINENO"; then :
42314
42315else
42316  supports=no
42317fi
42318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42319  ac_ext=cpp
42320ac_cpp='$CXXCPP $CPPFLAGS'
42321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42324
42325  CFLAGS="$saved_cflags"
42326
42327  saved_cxxflags="$CXXFLAGS"
42328  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42329  ac_ext=cpp
42330ac_cpp='$CXXCPP $CPPFLAGS'
42331ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42332ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42333ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42334
42335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42336/* end confdefs.h.  */
42337int i;
42338_ACEOF
42339if ac_fn_cxx_try_compile "$LINENO"; then :
42340
42341else
42342  supports=no
42343fi
42344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42345  ac_ext=cpp
42346ac_cpp='$CXXCPP $CPPFLAGS'
42347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42350
42351  CXXFLAGS="$saved_cxxflags"
42352
42353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42354$as_echo "$supports" >&6; }
42355  if test "x$supports" = "xyes" ; then
42356    :
42357  else
42358    STACK_PROTECTOR_CFLAG=""
42359  fi
42360
42361
42362      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42363      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42364      ;;
42365    esac
42366  fi
42367
42368  # Optimization levels
42369  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42370    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42371
42372    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42373      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42374      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42375      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42376      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42377      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42378      C_O_FLAG_NONE="-xregs=no%frameptr"
42379      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42380      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42381      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42382      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42383      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42384      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42385        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42386        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42387      fi
42388    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42389      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42390      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42391      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42392      C_O_FLAG_DEBUG=""
42393      C_O_FLAG_NONE=""
42394      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42395      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42396      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42397      C_O_FLAG_DEBUG=""
42398      CXX_O_FLAG_NONE=""
42399    fi
42400  else
42401    # The remaining toolchains share opt flags between CC and CXX;
42402    # setup for C and duplicate afterwards.
42403    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42404      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42405        # On MacOSX we optimize for size, something
42406        # we should do for all platforms?
42407        C_O_FLAG_HIGHEST="-Os"
42408        C_O_FLAG_HI="-Os"
42409        C_O_FLAG_NORM="-Os"
42410      else
42411        C_O_FLAG_HIGHEST="-O3"
42412        C_O_FLAG_HI="-O3"
42413        C_O_FLAG_NORM="-O2"
42414      fi
42415      C_O_FLAG_DEBUG="-O0"
42416      C_O_FLAG_NONE="-O0"
42417    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42418      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42419        # On MacOSX we optimize for size, something
42420        # we should do for all platforms?
42421        C_O_FLAG_HIGHEST="-Os"
42422        C_O_FLAG_HI="-Os"
42423        C_O_FLAG_NORM="-Os"
42424      else
42425        C_O_FLAG_HIGHEST="-O3"
42426        C_O_FLAG_HI="-O3"
42427        C_O_FLAG_NORM="-O2"
42428      fi
42429      C_O_FLAG_DEBUG="-O0"
42430      C_O_FLAG_NONE="-O0"
42431    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42432      C_O_FLAG_HIGHEST="-O3"
42433      C_O_FLAG_HI="-O3 -qstrict"
42434      C_O_FLAG_NORM="-O2"
42435      C_O_FLAG_DEBUG="-qnoopt"
42436      C_O_FLAG_NONE="-qnoop"
42437    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42438      C_O_FLAG_HIGHEST="-O2"
42439      C_O_FLAG_HI="-O1"
42440      C_O_FLAG_NORM="-O1"
42441      C_O_FLAG_DEBUG="-Od"
42442      C_O_FLAG_NONE="-Od"
42443    fi
42444    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42445    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42446    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42447    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42448    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42449  fi
42450
42451  # Adjust optimization flags according to debug level.
42452  case $DEBUG_LEVEL in
42453    release )
42454      # no adjustment
42455      ;;
42456    fastdebug )
42457      # Not quite so much optimization
42458      C_O_FLAG_HI="$C_O_FLAG_NORM"
42459      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42460      ;;
42461    slowdebug )
42462      # Disable optimization
42463      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42464      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42465      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42466      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42467      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42468      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42469      ;;
42470  esac
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484  # Special extras...
42485  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42486    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42487      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42488      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42489    fi
42490    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42491    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42492  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42493    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42494    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42495  fi
42496
42497  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42499$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42500  fi
42501
42502  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42503    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42504$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42505  fi
42506
42507  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42508    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42509$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42510  fi
42511
42512
42513# Check whether --with-extra-cflags was given.
42514if test "${with_extra_cflags+set}" = set; then :
42515  withval=$with_extra_cflags;
42516fi
42517
42518
42519
42520# Check whether --with-extra-cxxflags was given.
42521if test "${with_extra_cxxflags+set}" = set; then :
42522  withval=$with_extra_cxxflags;
42523fi
42524
42525
42526
42527# Check whether --with-extra-ldflags was given.
42528if test "${with_extra_ldflags+set}" = set; then :
42529  withval=$with_extra_ldflags;
42530fi
42531
42532
42533  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42534  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42535  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42536
42537  # Hotspot needs these set in their legacy form
42538  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42539  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42540  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42541
42542
42543
42544
42545
42546  ###############################################################################
42547  #
42548  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42549  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42550  #
42551
42552  # Setup compiler/platform specific flags into
42553  #    CFLAGS_JDK    - C Compiler flags
42554  #    CXXFLAGS_JDK  - C++ Compiler flags
42555  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42556  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42557    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42558      # Force compatibility with i586 on 32 bit intel platforms.
42559      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42560    fi
42561    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42562        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42563    case $OPENJDK_TARGET_CPU_ARCH in
42564      arm )
42565        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42566        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42567        ;;
42568      ppc )
42569        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42570        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42571        ;;
42572      * )
42573        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42574        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42575        ;;
42576    esac
42577  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42578    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42579    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42580      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42581    fi
42582
42583    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42584    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42585  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42586    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42587    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42588  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42589    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42590        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42591        -DWIN32_LEAN_AND_MEAN \
42592        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42593        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42594        -DWIN32 -DIAL"
42595    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42596      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42597    else
42598      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42599    fi
42600    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42601    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42602    # studio.
42603    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42604      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42605          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42606    fi
42607  fi
42608
42609  ###############################################################################
42610
42611  # Adjust flags according to debug level.
42612  case $DEBUG_LEVEL in
42613    fastdebug | slowdebug )
42614      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42615      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42616      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42617      ;;
42618    release )
42619      ;;
42620    * )
42621      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42622      ;;
42623  esac
42624
42625  # Setup LP64
42626  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42627
42628  # Set some common defines. These works for all compilers, but assume
42629  # -D is universally accepted.
42630
42631  # Setup endianness
42632  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42633    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42634    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42635    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42636    #   Note: -Dmacro         is the same as    #define macro 1
42637    #         -Dmacro=        is the same as    #define macro
42638    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42639      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42640    else
42641      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42642    fi
42643  else
42644    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42645    # are defined in the system?
42646    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42647      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42648    else
42649      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42650    fi
42651  fi
42652
42653  # Setup target OS define. Use OS target name but in upper case.
42654  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42655  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42656
42657  # Setup target CPU
42658  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42659
42660  # Setup debug/release defines
42661  if test "x$DEBUG_LEVEL" = xrelease; then
42662    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42663    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42664      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42665    fi
42666  else
42667    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42668  fi
42669
42670  # Set some additional per-OS defines.
42671  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42672    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42673  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42674    # FIXME: PPC64 should not be here.
42675    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42676  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42677    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42678  fi
42679
42680  # Additional macosx handling
42681  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42682    # Setting these parameters makes it an error to link to macosx APIs that are
42683    # newer than the given OS version and makes the linked binaries compatible
42684    # even if built on a newer version of the OS.
42685    # The expected format is X.Y.Z
42686    MACOSX_VERSION_MIN=10.7.0
42687
42688
42689    # The macro takes the version with no dots, ex: 1070
42690    # Let the flags variables get resolved in make for easier override on make
42691    # command line.
42692    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42693    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42694  fi
42695
42696  # Setup some hard coded includes
42697  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42698      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42699      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42700      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42701
42702  # The shared libraries are compiled using the picflag.
42703  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42704  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42705
42706  # Executable flags
42707  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42708  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42709
42710
42711
42712
42713
42714
42715  # Flags for compiling test libraries
42716  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42717  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42718
42719  # Flags for compiling test executables
42720  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42721  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42722
42723
42724
42725
42726
42727
42728  # Setup LDFLAGS et al.
42729  #
42730
42731  # Now this is odd. The JDK native libraries have to link against libjvm.so
42732  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42733  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42734  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42735  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42736  # libraries will link to whatever is in memory. Yuck.
42737  #
42738  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42739  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42740    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42741    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42742      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42743    fi
42744    # TODO: make -debug optional "--disable-full-debug-symbols"
42745    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42746  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42747    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42748    # We have previously set HAS_GNU_HASH if this is the case
42749    if test -n "$HAS_GNU_HASH"; then
42750      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42751    fi
42752    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42753      # And since we now know that the linker is gnu, then add -z defs, to forbid
42754      # undefined symbols in object files.
42755      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42756      case $DEBUG_LEVEL in
42757        release )
42758          # tell linker to optimize libraries.
42759          # Should this be supplied to the OSS linker as well?
42760          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42761          ;;
42762        slowdebug )
42763          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42764            # do relocations at load
42765            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42766            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42767          fi
42768          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42769            # mark relocations read only
42770            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42771            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42772          fi
42773          ;;
42774        fastdebug )
42775          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42776            # mark relocations read only
42777            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42778            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42779          fi
42780          ;;
42781        * )
42782          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42783          ;;
42784        esac
42785    fi
42786  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42787    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42788    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42789  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42790    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42791  fi
42792
42793  # Customize LDFLAGS for executables
42794
42795  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42796
42797  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42798    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42799      LDFLAGS_STACK_SIZE=1048576
42800    else
42801      LDFLAGS_STACK_SIZE=327680
42802    fi
42803    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42804  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42805    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42806  fi
42807
42808  # Customize LDFLAGS for libs
42809  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42810
42811  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42812    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42813    LDFLAGS_JDKLIB_SUFFIX=""
42814  else
42815    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42816        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42817
42818    # On some platforms (mac) the linker warns about non existing -L dirs.
42819    # Add server first if available. Linking aginst client does not always produce the same results.
42820    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42821    # Default to server for other variants.
42822    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42823      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42824    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42825      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42826    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42827      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42828    else
42829      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42830    fi
42831
42832    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42833    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42834      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42835    fi
42836  fi
42837
42838
42839
42840
42841
42842
42843
42844  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42845  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42846  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42847  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42848
42849
42850
42851
42852
42853
42854
42855  # Some Zero and Shark settings.
42856  # ZERO_ARCHFLAG tells the compiler which mode to build for
42857  case "${OPENJDK_TARGET_CPU}" in
42858    s390)
42859      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42860      ;;
42861    *)
42862      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42863  esac
42864
42865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42866$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42867  supports=yes
42868
42869  saved_cflags="$CFLAGS"
42870  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42871  ac_ext=c
42872ac_cpp='$CPP $CPPFLAGS'
42873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42875ac_compiler_gnu=$ac_cv_c_compiler_gnu
42876
42877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42878/* end confdefs.h.  */
42879int i;
42880_ACEOF
42881if ac_fn_c_try_compile "$LINENO"; then :
42882
42883else
42884  supports=no
42885fi
42886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42887  ac_ext=cpp
42888ac_cpp='$CXXCPP $CPPFLAGS'
42889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42892
42893  CFLAGS="$saved_cflags"
42894
42895  saved_cxxflags="$CXXFLAGS"
42896  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42897  ac_ext=cpp
42898ac_cpp='$CXXCPP $CPPFLAGS'
42899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42902
42903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42904/* end confdefs.h.  */
42905int i;
42906_ACEOF
42907if ac_fn_cxx_try_compile "$LINENO"; then :
42908
42909else
42910  supports=no
42911fi
42912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42913  ac_ext=cpp
42914ac_cpp='$CXXCPP $CPPFLAGS'
42915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42918
42919  CXXFLAGS="$saved_cxxflags"
42920
42921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42922$as_echo "$supports" >&6; }
42923  if test "x$supports" = "xyes" ; then
42924    :
42925  else
42926    ZERO_ARCHFLAG=""
42927  fi
42928
42929
42930
42931  # Check that the compiler supports -mX (or -qX on AIX) flags
42932  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42933
42934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42935$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42936  supports=yes
42937
42938  saved_cflags="$CFLAGS"
42939  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42940  ac_ext=c
42941ac_cpp='$CPP $CPPFLAGS'
42942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42943ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42944ac_compiler_gnu=$ac_cv_c_compiler_gnu
42945
42946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42947/* end confdefs.h.  */
42948int i;
42949_ACEOF
42950if ac_fn_c_try_compile "$LINENO"; then :
42951
42952else
42953  supports=no
42954fi
42955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42956  ac_ext=cpp
42957ac_cpp='$CXXCPP $CPPFLAGS'
42958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42961
42962  CFLAGS="$saved_cflags"
42963
42964  saved_cxxflags="$CXXFLAGS"
42965  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42966  ac_ext=cpp
42967ac_cpp='$CXXCPP $CPPFLAGS'
42968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42971
42972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42973/* end confdefs.h.  */
42974int i;
42975_ACEOF
42976if ac_fn_cxx_try_compile "$LINENO"; then :
42977
42978else
42979  supports=no
42980fi
42981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42982  ac_ext=cpp
42983ac_cpp='$CXXCPP $CPPFLAGS'
42984ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42985ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42986ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42987
42988  CXXFLAGS="$saved_cxxflags"
42989
42990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42991$as_echo "$supports" >&6; }
42992  if test "x$supports" = "xyes" ; then
42993    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42994  else
42995    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42996  fi
42997
42998
42999
43000  # Check whether --enable-warnings-as-errors was given.
43001if test "${enable_warnings_as_errors+set}" = set; then :
43002  enableval=$enable_warnings_as_errors;
43003fi
43004
43005
43006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43007$as_echo_n "checking if native warnings are errors... " >&6; }
43008  if test "x$enable_warnings_as_errors" = "xyes"; then
43009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43010$as_echo "yes (explicitely set)" >&6; }
43011    WARNINGS_AS_ERRORS=true
43012  elif test "x$enable_warnings_as_errors" = "xno"; then
43013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43014$as_echo "no" >&6; }
43015    WARNINGS_AS_ERRORS=false
43016  elif test "x$enable_warnings_as_errors" = "x"; then
43017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43018$as_echo "yes (default)" >&6; }
43019    WARNINGS_AS_ERRORS=true
43020  else
43021    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43022  fi
43023
43024
43025  case "${TOOLCHAIN_TYPE}" in
43026    microsoft)
43027      DISABLE_WARNING_PREFIX="-wd"
43028      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43029      ;;
43030    solstudio)
43031      DISABLE_WARNING_PREFIX="-erroff="
43032      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43033      ;;
43034    gcc)
43035      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43036
43037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43038$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43039  supports=yes
43040
43041  saved_cflags="$CFLAGS"
43042  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43043  ac_ext=c
43044ac_cpp='$CPP $CPPFLAGS'
43045ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43046ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43047ac_compiler_gnu=$ac_cv_c_compiler_gnu
43048
43049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43050/* end confdefs.h.  */
43051int i;
43052_ACEOF
43053if ac_fn_c_try_compile "$LINENO"; then :
43054
43055else
43056  supports=no
43057fi
43058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43059  ac_ext=cpp
43060ac_cpp='$CXXCPP $CPPFLAGS'
43061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43064
43065  CFLAGS="$saved_cflags"
43066
43067  saved_cxxflags="$CXXFLAGS"
43068  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43069  ac_ext=cpp
43070ac_cpp='$CXXCPP $CPPFLAGS'
43071ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43072ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43073ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43074
43075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43076/* end confdefs.h.  */
43077int i;
43078_ACEOF
43079if ac_fn_cxx_try_compile "$LINENO"; then :
43080
43081else
43082  supports=no
43083fi
43084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43085  ac_ext=cpp
43086ac_cpp='$CXXCPP $CPPFLAGS'
43087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43090
43091  CXXFLAGS="$saved_cxxflags"
43092
43093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43094$as_echo "$supports" >&6; }
43095  if test "x$supports" = "xyes" ; then
43096    GCC_CAN_DISABLE_WARNINGS=true
43097  else
43098    GCC_CAN_DISABLE_WARNINGS=false
43099
43100  fi
43101
43102      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43103        DISABLE_WARNING_PREFIX="-Wno-"
43104      else
43105        DISABLE_WARNING_PREFIX=
43106      fi
43107      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43108      ;;
43109    clang)
43110      DISABLE_WARNING_PREFIX="-Wno-"
43111      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43112      ;;
43113  esac
43114
43115
43116
43117
43118# Setup debug symbols (need objcopy from the toolchain for that)
43119
43120  #
43121  # ENABLE_DEBUG_SYMBOLS
43122  # This must be done after the toolchain is setup, since we're looking at objcopy.
43123  #
43124  # Check whether --enable-debug-symbols was given.
43125if test "${enable_debug_symbols+set}" = set; then :
43126  enableval=$enable_debug_symbols;
43127fi
43128
43129
43130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43131$as_echo_n "checking if we should generate debug symbols... " >&6; }
43132
43133  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43134    # explicit enabling of enable-debug-symbols and can't find objcopy
43135    #   this is an error
43136    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43137  fi
43138
43139  if test "x$enable_debug_symbols" = "xyes"; then
43140    ENABLE_DEBUG_SYMBOLS=true
43141  elif test "x$enable_debug_symbols" = "xno"; then
43142    ENABLE_DEBUG_SYMBOLS=false
43143  else
43144    # Default is on if objcopy is found
43145    if test "x$OBJCOPY" != x; then
43146      ENABLE_DEBUG_SYMBOLS=true
43147    # MacOS X and Windows don't use objcopy but default is on for those OSes
43148    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43149      ENABLE_DEBUG_SYMBOLS=true
43150    else
43151      ENABLE_DEBUG_SYMBOLS=false
43152    fi
43153  fi
43154
43155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43156$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43157
43158  #
43159  # ZIP_DEBUGINFO_FILES
43160  #
43161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43162$as_echo_n "checking if we should zip debug-info files... " >&6; }
43163  # Check whether --enable-zip-debug-info was given.
43164if test "${enable_zip_debug_info+set}" = set; then :
43165  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43166else
43167  enable_zip_debug_info="yes"
43168fi
43169
43170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43171$as_echo "${enable_zip_debug_info}" >&6; }
43172
43173  if test "x${enable_zip_debug_info}" = "xno"; then
43174    ZIP_DEBUGINFO_FILES=false
43175  else
43176    ZIP_DEBUGINFO_FILES=true
43177  fi
43178
43179
43180
43181
43182
43183  # Check whether --enable-native-coverage was given.
43184if test "${enable_native_coverage+set}" = set; then :
43185  enableval=$enable_native_coverage;
43186fi
43187
43188  GCOV_ENABLED="false"
43189  if test "x$enable_native_coverage" = "xyes"; then
43190    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43192$as_echo_n "checking if native coverage is enabled... " >&6; }
43193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43194$as_echo "yes" >&6; }
43195      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43196      GCOV_LDFLAGS="-fprofile-arcs"
43197      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43198      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43199      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43200      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43201      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43202      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43203      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43204      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43205      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43206      GCOV_ENABLED="true"
43207    else
43208      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43209    fi
43210  elif test "x$enable_native_coverage" = "xno"; then
43211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43212$as_echo_n "checking if native coverage is enabled... " >&6; }
43213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43214$as_echo "no" >&6; }
43215  elif test "x$enable_native_coverage" != "x"; then
43216    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43217  fi
43218
43219
43220
43221
43222###############################################################################
43223#
43224# Check dependencies for external and internal libraries.
43225#
43226###############################################################################
43227
43228# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43229
43230  # When using cygwin or msys, we need a wrapper binary that renames
43231  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43232  # @files and rewrites these too! This wrapper binary is
43233  # called fixpath.
43234  FIXPATH=
43235  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43237$as_echo_n "checking if fixpath can be created... " >&6; }
43238    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43239    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43240    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43241    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43242      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43243      FIXPATH="$FIXPATH_BIN -c"
43244    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43245      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43246      # @ was chosen as separator to minimize risk of other tools messing around with it
43247      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43248          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43249      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43250      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43251    fi
43252    FIXPATH_SRC_W="$FIXPATH_SRC"
43253    FIXPATH_BIN_W="$FIXPATH_BIN"
43254
43255  unix_path="$FIXPATH_SRC_W"
43256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43257    windows_path=`$CYGPATH -m "$unix_path"`
43258    FIXPATH_SRC_W="$windows_path"
43259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43260    windows_path=`cmd //c echo $unix_path`
43261    FIXPATH_SRC_W="$windows_path"
43262  fi
43263
43264
43265  unix_path="$FIXPATH_BIN_W"
43266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43267    windows_path=`$CYGPATH -m "$unix_path"`
43268    FIXPATH_BIN_W="$windows_path"
43269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43270    windows_path=`cmd //c echo $unix_path`
43271    FIXPATH_BIN_W="$windows_path"
43272  fi
43273
43274    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43275    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43276    cd $FIXPATH_DIR
43277    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43278    cd $CURDIR
43279
43280    if test ! -x $FIXPATH_BIN; then
43281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43282$as_echo "no" >&6; }
43283      cat $FIXPATH_DIR/fixpath1.log
43284      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43285    fi
43286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43287$as_echo "yes" >&6; }
43288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43289$as_echo_n "checking if fixpath.exe works... " >&6; }
43290    cd $FIXPATH_DIR
43291    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43292        > $FIXPATH_DIR/fixpath2.log 2>&1
43293    cd $CURDIR
43294    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43296$as_echo "no" >&6; }
43297      cat $FIXPATH_DIR/fixpath2.log
43298      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43299    fi
43300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43301$as_echo "yes" >&6; }
43302  fi
43303
43304
43305
43306
43307
43308
43309  ###############################################################################
43310  #
43311  # OS specific settings that we never will need to probe.
43312  #
43313  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43315$as_echo_n "checking what is not needed on Linux?... " >&6; }
43316    PULSE_NOT_NEEDED=yes
43317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43318$as_echo "pulse" >&6; }
43319  fi
43320
43321  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43323$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43324    ALSA_NOT_NEEDED=yes
43325    PULSE_NOT_NEEDED=yes
43326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43327$as_echo "alsa pulse" >&6; }
43328  fi
43329
43330  if test "x$OPENJDK_TARGET_OS" = xaix; then
43331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43332$as_echo_n "checking what is not needed on AIX?... " >&6; }
43333    ALSA_NOT_NEEDED=yes
43334    PULSE_NOT_NEEDED=yes
43335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43336$as_echo "alsa pulse" >&6; }
43337  fi
43338
43339
43340  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43342$as_echo_n "checking what is not needed on Windows?... " >&6; }
43343    CUPS_NOT_NEEDED=yes
43344    ALSA_NOT_NEEDED=yes
43345    PULSE_NOT_NEEDED=yes
43346    X11_NOT_NEEDED=yes
43347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43348$as_echo "alsa cups pulse x11" >&6; }
43349  fi
43350
43351  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43353$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43354    ALSA_NOT_NEEDED=yes
43355    PULSE_NOT_NEEDED=yes
43356    X11_NOT_NEEDED=yes
43357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43358$as_echo "alsa pulse x11" >&6; }
43359  fi
43360
43361  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43363$as_echo_n "checking what is not needed on bsd?... " >&6; }
43364    ALSA_NOT_NEEDED=yes
43365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43366$as_echo "alsa" >&6; }
43367  fi
43368
43369  if test "x$OPENJDK" = "xfalse"; then
43370    FREETYPE_NOT_NEEDED=yes
43371  fi
43372
43373  if test "x$SUPPORT_HEADFUL" = xno; then
43374    X11_NOT_NEEDED=yes
43375  fi
43376
43377
43378
43379  ###############################################################################
43380  #
43381  # Check for X Windows
43382  #
43383
43384  if test "x$X11_NOT_NEEDED" = xyes; then
43385    if test "x${with_x}" != x; then
43386      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43387$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43388    fi
43389    X_CFLAGS=
43390    X_LIBS=
43391  else
43392    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43393    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43394    # --x-libraries for the sysroot, if that seems to be correct.
43395    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43396      if test "x$SYSROOT" != "x"; then
43397        if test "x$x_includes" = xNONE; then
43398          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43399            x_includes="$SYSROOT/usr/X11R6/include"
43400          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43401            x_includes="$SYSROOT/usr/include"
43402          fi
43403        fi
43404        if test "x$x_libraries" = xNONE; then
43405          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43406            x_libraries="$SYSROOT/usr/X11R6/lib"
43407          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43408            x_libraries="$SYSROOT/usr/lib64"
43409          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43410            x_libraries="$SYSROOT/usr/lib"
43411          fi
43412        fi
43413      fi
43414    fi
43415
43416    # Now let autoconf do it's magic
43417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43418$as_echo_n "checking for X... " >&6; }
43419
43420
43421# Check whether --with-x was given.
43422if test "${with_x+set}" = set; then :
43423  withval=$with_x;
43424fi
43425
43426# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43427if test "x$with_x" = xno; then
43428  # The user explicitly disabled X.
43429  have_x=disabled
43430else
43431  case $x_includes,$x_libraries in #(
43432    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43433    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43434  $as_echo_n "(cached) " >&6
43435else
43436  # One or both of the vars are not set, and there is no cached value.
43437ac_x_includes=no ac_x_libraries=no
43438rm -f -r conftest.dir
43439if mkdir conftest.dir; then
43440  cd conftest.dir
43441  cat >Imakefile <<'_ACEOF'
43442incroot:
43443	@echo incroot='${INCROOT}'
43444usrlibdir:
43445	@echo usrlibdir='${USRLIBDIR}'
43446libdir:
43447	@echo libdir='${LIBDIR}'
43448_ACEOF
43449  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43450    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43451    for ac_var in incroot usrlibdir libdir; do
43452      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43453    done
43454    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43455    for ac_extension in a so sl dylib la dll; do
43456      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43457	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43458	ac_im_usrlibdir=$ac_im_libdir; break
43459      fi
43460    done
43461    # Screen out bogus values from the imake configuration.  They are
43462    # bogus both because they are the default anyway, and because
43463    # using them would break gcc on systems where it needs fixed includes.
43464    case $ac_im_incroot in
43465	/usr/include) ac_x_includes= ;;
43466	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43467    esac
43468    case $ac_im_usrlibdir in
43469	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43470	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43471    esac
43472  fi
43473  cd ..
43474  rm -f -r conftest.dir
43475fi
43476
43477# Standard set of common directories for X headers.
43478# Check X11 before X11Rn because it is often a symlink to the current release.
43479ac_x_header_dirs='
43480/usr/X11/include
43481/usr/X11R7/include
43482/usr/X11R6/include
43483/usr/X11R5/include
43484/usr/X11R4/include
43485
43486/usr/include/X11
43487/usr/include/X11R7
43488/usr/include/X11R6
43489/usr/include/X11R5
43490/usr/include/X11R4
43491
43492/usr/local/X11/include
43493/usr/local/X11R7/include
43494/usr/local/X11R6/include
43495/usr/local/X11R5/include
43496/usr/local/X11R4/include
43497
43498/usr/local/include/X11
43499/usr/local/include/X11R7
43500/usr/local/include/X11R6
43501/usr/local/include/X11R5
43502/usr/local/include/X11R4
43503
43504/usr/X386/include
43505/usr/x386/include
43506/usr/XFree86/include/X11
43507
43508/usr/include
43509/usr/local/include
43510/usr/unsupported/include
43511/usr/athena/include
43512/usr/local/x11r5/include
43513/usr/lpp/Xamples/include
43514
43515/usr/openwin/include
43516/usr/openwin/share/include'
43517
43518if test "$ac_x_includes" = no; then
43519  # Guess where to find include files, by looking for Xlib.h.
43520  # First, try using that file with no special directory specified.
43521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43522/* end confdefs.h.  */
43523#include <X11/Xlib.h>
43524_ACEOF
43525if ac_fn_cxx_try_cpp "$LINENO"; then :
43526  # We can compile using X headers with no special include directory.
43527ac_x_includes=
43528else
43529  for ac_dir in $ac_x_header_dirs; do
43530  if test -r "$ac_dir/X11/Xlib.h"; then
43531    ac_x_includes=$ac_dir
43532    break
43533  fi
43534done
43535fi
43536rm -f conftest.err conftest.i conftest.$ac_ext
43537fi # $ac_x_includes = no
43538
43539if test "$ac_x_libraries" = no; then
43540  # Check for the libraries.
43541  # See if we find them without any special options.
43542  # Don't add to $LIBS permanently.
43543  ac_save_LIBS=$LIBS
43544  LIBS="-lX11 $LIBS"
43545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43546/* end confdefs.h.  */
43547#include <X11/Xlib.h>
43548int
43549main ()
43550{
43551XrmInitialize ()
43552  ;
43553  return 0;
43554}
43555_ACEOF
43556if ac_fn_cxx_try_link "$LINENO"; then :
43557  LIBS=$ac_save_LIBS
43558# We can link X programs with no special library path.
43559ac_x_libraries=
43560else
43561  LIBS=$ac_save_LIBS
43562for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43563do
43564  # Don't even attempt the hair of trying to link an X program!
43565  for ac_extension in a so sl dylib la dll; do
43566    if test -r "$ac_dir/libX11.$ac_extension"; then
43567      ac_x_libraries=$ac_dir
43568      break 2
43569    fi
43570  done
43571done
43572fi
43573rm -f core conftest.err conftest.$ac_objext \
43574    conftest$ac_exeext conftest.$ac_ext
43575fi # $ac_x_libraries = no
43576
43577case $ac_x_includes,$ac_x_libraries in #(
43578  no,* | *,no | *\'*)
43579    # Didn't find X, or a directory has "'" in its name.
43580    ac_cv_have_x="have_x=no";; #(
43581  *)
43582    # Record where we found X for the cache.
43583    ac_cv_have_x="have_x=yes\
43584	ac_x_includes='$ac_x_includes'\
43585	ac_x_libraries='$ac_x_libraries'"
43586esac
43587fi
43588;; #(
43589    *) have_x=yes;;
43590  esac
43591  eval "$ac_cv_have_x"
43592fi # $with_x != no
43593
43594if test "$have_x" != yes; then
43595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43596$as_echo "$have_x" >&6; }
43597  no_x=yes
43598else
43599  # If each of the values was on the command line, it overrides each guess.
43600  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43601  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43602  # Update the cache value to reflect the command line values.
43603  ac_cv_have_x="have_x=yes\
43604	ac_x_includes='$x_includes'\
43605	ac_x_libraries='$x_libraries'"
43606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43607$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43608fi
43609
43610    if test "$no_x" = yes; then
43611  # Not all programs may use this symbol, but it does not hurt to define it.
43612
43613$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43614
43615  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43616else
43617  if test -n "$x_includes"; then
43618    X_CFLAGS="$X_CFLAGS -I$x_includes"
43619  fi
43620
43621  # It would also be nice to do this for all -L options, not just this one.
43622  if test -n "$x_libraries"; then
43623    X_LIBS="$X_LIBS -L$x_libraries"
43624    # For Solaris; some versions of Sun CC require a space after -R and
43625    # others require no space.  Words are not sufficient . . . .
43626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43627$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43628    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43629    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43630    ac_cxx_werror_flag=yes
43631    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43632/* end confdefs.h.  */
43633
43634int
43635main ()
43636{
43637
43638  ;
43639  return 0;
43640}
43641_ACEOF
43642if ac_fn_cxx_try_link "$LINENO"; then :
43643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43644$as_echo "no" >&6; }
43645       X_LIBS="$X_LIBS -R$x_libraries"
43646else
43647  LIBS="$ac_xsave_LIBS -R $x_libraries"
43648       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43649/* end confdefs.h.  */
43650
43651int
43652main ()
43653{
43654
43655  ;
43656  return 0;
43657}
43658_ACEOF
43659if ac_fn_cxx_try_link "$LINENO"; then :
43660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43661$as_echo "yes" >&6; }
43662	  X_LIBS="$X_LIBS -R $x_libraries"
43663else
43664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43665$as_echo "neither works" >&6; }
43666fi
43667rm -f core conftest.err conftest.$ac_objext \
43668    conftest$ac_exeext conftest.$ac_ext
43669fi
43670rm -f core conftest.err conftest.$ac_objext \
43671    conftest$ac_exeext conftest.$ac_ext
43672    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43673    LIBS=$ac_xsave_LIBS
43674  fi
43675
43676  # Check for system-dependent libraries X programs must link with.
43677  # Do this before checking for the system-independent R6 libraries
43678  # (-lICE), since we may need -lsocket or whatever for X linking.
43679
43680  if test "$ISC" = yes; then
43681    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43682  else
43683    # Martyn Johnson says this is needed for Ultrix, if the X
43684    # libraries were built with DECnet support.  And Karl Berry says
43685    # the Alpha needs dnet_stub (dnet does not exist).
43686    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43687    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43688/* end confdefs.h.  */
43689
43690/* Override any GCC internal prototype to avoid an error.
43691   Use char because int might match the return type of a GCC
43692   builtin and then its argument prototype would still apply.  */
43693#ifdef __cplusplus
43694extern "C"
43695#endif
43696char XOpenDisplay ();
43697int
43698main ()
43699{
43700return XOpenDisplay ();
43701  ;
43702  return 0;
43703}
43704_ACEOF
43705if ac_fn_cxx_try_link "$LINENO"; then :
43706
43707else
43708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43709$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43710if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43711  $as_echo_n "(cached) " >&6
43712else
43713  ac_check_lib_save_LIBS=$LIBS
43714LIBS="-ldnet  $LIBS"
43715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43716/* end confdefs.h.  */
43717
43718/* Override any GCC internal prototype to avoid an error.
43719   Use char because int might match the return type of a GCC
43720   builtin and then its argument prototype would still apply.  */
43721#ifdef __cplusplus
43722extern "C"
43723#endif
43724char dnet_ntoa ();
43725int
43726main ()
43727{
43728return dnet_ntoa ();
43729  ;
43730  return 0;
43731}
43732_ACEOF
43733if ac_fn_cxx_try_link "$LINENO"; then :
43734  ac_cv_lib_dnet_dnet_ntoa=yes
43735else
43736  ac_cv_lib_dnet_dnet_ntoa=no
43737fi
43738rm -f core conftest.err conftest.$ac_objext \
43739    conftest$ac_exeext conftest.$ac_ext
43740LIBS=$ac_check_lib_save_LIBS
43741fi
43742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43743$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43744if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43745  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43746fi
43747
43748    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43749      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43750$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43751if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43752  $as_echo_n "(cached) " >&6
43753else
43754  ac_check_lib_save_LIBS=$LIBS
43755LIBS="-ldnet_stub  $LIBS"
43756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43757/* end confdefs.h.  */
43758
43759/* Override any GCC internal prototype to avoid an error.
43760   Use char because int might match the return type of a GCC
43761   builtin and then its argument prototype would still apply.  */
43762#ifdef __cplusplus
43763extern "C"
43764#endif
43765char dnet_ntoa ();
43766int
43767main ()
43768{
43769return dnet_ntoa ();
43770  ;
43771  return 0;
43772}
43773_ACEOF
43774if ac_fn_cxx_try_link "$LINENO"; then :
43775  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43776else
43777  ac_cv_lib_dnet_stub_dnet_ntoa=no
43778fi
43779rm -f core conftest.err conftest.$ac_objext \
43780    conftest$ac_exeext conftest.$ac_ext
43781LIBS=$ac_check_lib_save_LIBS
43782fi
43783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43784$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43785if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43786  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43787fi
43788
43789    fi
43790fi
43791rm -f core conftest.err conftest.$ac_objext \
43792    conftest$ac_exeext conftest.$ac_ext
43793    LIBS="$ac_xsave_LIBS"
43794
43795    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43796    # to get the SysV transport functions.
43797    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43798    # needs -lnsl.
43799    # The nsl library prevents programs from opening the X display
43800    # on Irix 5.2, according to T.E. Dickey.
43801    # The functions gethostbyname, getservbyname, and inet_addr are
43802    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43803    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43804if test "x$ac_cv_func_gethostbyname" = xyes; then :
43805
43806fi
43807
43808    if test $ac_cv_func_gethostbyname = no; then
43809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43810$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43811if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43812  $as_echo_n "(cached) " >&6
43813else
43814  ac_check_lib_save_LIBS=$LIBS
43815LIBS="-lnsl  $LIBS"
43816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43817/* end confdefs.h.  */
43818
43819/* Override any GCC internal prototype to avoid an error.
43820   Use char because int might match the return type of a GCC
43821   builtin and then its argument prototype would still apply.  */
43822#ifdef __cplusplus
43823extern "C"
43824#endif
43825char gethostbyname ();
43826int
43827main ()
43828{
43829return gethostbyname ();
43830  ;
43831  return 0;
43832}
43833_ACEOF
43834if ac_fn_cxx_try_link "$LINENO"; then :
43835  ac_cv_lib_nsl_gethostbyname=yes
43836else
43837  ac_cv_lib_nsl_gethostbyname=no
43838fi
43839rm -f core conftest.err conftest.$ac_objext \
43840    conftest$ac_exeext conftest.$ac_ext
43841LIBS=$ac_check_lib_save_LIBS
43842fi
43843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43844$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43845if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43846  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43847fi
43848
43849      if test $ac_cv_lib_nsl_gethostbyname = no; then
43850	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43851$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43852if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43853  $as_echo_n "(cached) " >&6
43854else
43855  ac_check_lib_save_LIBS=$LIBS
43856LIBS="-lbsd  $LIBS"
43857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43858/* end confdefs.h.  */
43859
43860/* Override any GCC internal prototype to avoid an error.
43861   Use char because int might match the return type of a GCC
43862   builtin and then its argument prototype would still apply.  */
43863#ifdef __cplusplus
43864extern "C"
43865#endif
43866char gethostbyname ();
43867int
43868main ()
43869{
43870return gethostbyname ();
43871  ;
43872  return 0;
43873}
43874_ACEOF
43875if ac_fn_cxx_try_link "$LINENO"; then :
43876  ac_cv_lib_bsd_gethostbyname=yes
43877else
43878  ac_cv_lib_bsd_gethostbyname=no
43879fi
43880rm -f core conftest.err conftest.$ac_objext \
43881    conftest$ac_exeext conftest.$ac_ext
43882LIBS=$ac_check_lib_save_LIBS
43883fi
43884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43885$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43886if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43887  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43888fi
43889
43890      fi
43891    fi
43892
43893    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43894    # socket/setsockopt and other routines are undefined under SCO ODT
43895    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43896    # on later versions), says Simon Leinen: it contains gethostby*
43897    # variants that don't use the name server (or something).  -lsocket
43898    # must be given before -lnsl if both are needed.  We assume that
43899    # if connect needs -lnsl, so does gethostbyname.
43900    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43901if test "x$ac_cv_func_connect" = xyes; then :
43902
43903fi
43904
43905    if test $ac_cv_func_connect = no; then
43906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43907$as_echo_n "checking for connect in -lsocket... " >&6; }
43908if ${ac_cv_lib_socket_connect+:} false; then :
43909  $as_echo_n "(cached) " >&6
43910else
43911  ac_check_lib_save_LIBS=$LIBS
43912LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43914/* end confdefs.h.  */
43915
43916/* Override any GCC internal prototype to avoid an error.
43917   Use char because int might match the return type of a GCC
43918   builtin and then its argument prototype would still apply.  */
43919#ifdef __cplusplus
43920extern "C"
43921#endif
43922char connect ();
43923int
43924main ()
43925{
43926return connect ();
43927  ;
43928  return 0;
43929}
43930_ACEOF
43931if ac_fn_cxx_try_link "$LINENO"; then :
43932  ac_cv_lib_socket_connect=yes
43933else
43934  ac_cv_lib_socket_connect=no
43935fi
43936rm -f core conftest.err conftest.$ac_objext \
43937    conftest$ac_exeext conftest.$ac_ext
43938LIBS=$ac_check_lib_save_LIBS
43939fi
43940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43941$as_echo "$ac_cv_lib_socket_connect" >&6; }
43942if test "x$ac_cv_lib_socket_connect" = xyes; then :
43943  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43944fi
43945
43946    fi
43947
43948    # Guillermo Gomez says -lposix is necessary on A/UX.
43949    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43950if test "x$ac_cv_func_remove" = xyes; then :
43951
43952fi
43953
43954    if test $ac_cv_func_remove = no; then
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43956$as_echo_n "checking for remove in -lposix... " >&6; }
43957if ${ac_cv_lib_posix_remove+:} false; then :
43958  $as_echo_n "(cached) " >&6
43959else
43960  ac_check_lib_save_LIBS=$LIBS
43961LIBS="-lposix  $LIBS"
43962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43963/* end confdefs.h.  */
43964
43965/* Override any GCC internal prototype to avoid an error.
43966   Use char because int might match the return type of a GCC
43967   builtin and then its argument prototype would still apply.  */
43968#ifdef __cplusplus
43969extern "C"
43970#endif
43971char remove ();
43972int
43973main ()
43974{
43975return remove ();
43976  ;
43977  return 0;
43978}
43979_ACEOF
43980if ac_fn_cxx_try_link "$LINENO"; then :
43981  ac_cv_lib_posix_remove=yes
43982else
43983  ac_cv_lib_posix_remove=no
43984fi
43985rm -f core conftest.err conftest.$ac_objext \
43986    conftest$ac_exeext conftest.$ac_ext
43987LIBS=$ac_check_lib_save_LIBS
43988fi
43989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43990$as_echo "$ac_cv_lib_posix_remove" >&6; }
43991if test "x$ac_cv_lib_posix_remove" = xyes; then :
43992  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43993fi
43994
43995    fi
43996
43997    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43998    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43999if test "x$ac_cv_func_shmat" = xyes; then :
44000
44001fi
44002
44003    if test $ac_cv_func_shmat = no; then
44004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44005$as_echo_n "checking for shmat in -lipc... " >&6; }
44006if ${ac_cv_lib_ipc_shmat+:} false; then :
44007  $as_echo_n "(cached) " >&6
44008else
44009  ac_check_lib_save_LIBS=$LIBS
44010LIBS="-lipc  $LIBS"
44011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44012/* end confdefs.h.  */
44013
44014/* Override any GCC internal prototype to avoid an error.
44015   Use char because int might match the return type of a GCC
44016   builtin and then its argument prototype would still apply.  */
44017#ifdef __cplusplus
44018extern "C"
44019#endif
44020char shmat ();
44021int
44022main ()
44023{
44024return shmat ();
44025  ;
44026  return 0;
44027}
44028_ACEOF
44029if ac_fn_cxx_try_link "$LINENO"; then :
44030  ac_cv_lib_ipc_shmat=yes
44031else
44032  ac_cv_lib_ipc_shmat=no
44033fi
44034rm -f core conftest.err conftest.$ac_objext \
44035    conftest$ac_exeext conftest.$ac_ext
44036LIBS=$ac_check_lib_save_LIBS
44037fi
44038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44039$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44040if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44041  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44042fi
44043
44044    fi
44045  fi
44046
44047  # Check for libraries that X11R6 Xt/Xaw programs need.
44048  ac_save_LDFLAGS=$LDFLAGS
44049  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44050  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44051  # check for ICE first), but we must link in the order -lSM -lICE or
44052  # we get undefined symbols.  So assume we have SM if we have ICE.
44053  # These have to be linked with before -lX11, unlike the other
44054  # libraries we check for below, so use a different variable.
44055  # John Interrante, Karl Berry
44056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44057$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44058if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44059  $as_echo_n "(cached) " >&6
44060else
44061  ac_check_lib_save_LIBS=$LIBS
44062LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44064/* end confdefs.h.  */
44065
44066/* Override any GCC internal prototype to avoid an error.
44067   Use char because int might match the return type of a GCC
44068   builtin and then its argument prototype would still apply.  */
44069#ifdef __cplusplus
44070extern "C"
44071#endif
44072char IceConnectionNumber ();
44073int
44074main ()
44075{
44076return IceConnectionNumber ();
44077  ;
44078  return 0;
44079}
44080_ACEOF
44081if ac_fn_cxx_try_link "$LINENO"; then :
44082  ac_cv_lib_ICE_IceConnectionNumber=yes
44083else
44084  ac_cv_lib_ICE_IceConnectionNumber=no
44085fi
44086rm -f core conftest.err conftest.$ac_objext \
44087    conftest$ac_exeext conftest.$ac_ext
44088LIBS=$ac_check_lib_save_LIBS
44089fi
44090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44091$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44092if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44093  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44094fi
44095
44096  LDFLAGS=$ac_save_LDFLAGS
44097
44098fi
44099
44100
44101    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44102    # this doesn't make sense so we remove it.
44103    if test "x$COMPILE_TYPE" = xcross; then
44104      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44105    fi
44106
44107    if test "x$no_x" = xyes; then
44108
44109  # Print a helpful message on how to acquire the necessary build dependency.
44110  # x11 is the help tag: freetype, cups, pulse, alsa etc
44111  MISSING_DEPENDENCY=x11
44112
44113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44114    cygwin_help $MISSING_DEPENDENCY
44115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44116    msys_help $MISSING_DEPENDENCY
44117  else
44118    PKGHANDLER_COMMAND=
44119
44120    case $PKGHANDLER in
44121      apt-get)
44122        apt_help     $MISSING_DEPENDENCY ;;
44123      yum)
44124        yum_help     $MISSING_DEPENDENCY ;;
44125      port)
44126        port_help    $MISSING_DEPENDENCY ;;
44127      pkgutil)
44128        pkgutil_help $MISSING_DEPENDENCY ;;
44129      pkgadd)
44130        pkgadd_help  $MISSING_DEPENDENCY ;;
44131    esac
44132
44133    if test "x$PKGHANDLER_COMMAND" != x; then
44134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44135    fi
44136  fi
44137
44138      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44139    fi
44140
44141    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44142      OPENWIN_HOME="/usr/openwin"
44143      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44144      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44145          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44146          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44147          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44148    fi
44149
44150    ac_ext=c
44151ac_cpp='$CPP $CPPFLAGS'
44152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44154ac_compiler_gnu=$ac_cv_c_compiler_gnu
44155
44156    OLD_CFLAGS="$CFLAGS"
44157    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44158
44159    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44160    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44161do :
44162  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44163ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44164          # include <X11/Xlib.h>
44165          # include <X11/Xutil.h>
44166
44167
44168"
44169if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44170  cat >>confdefs.h <<_ACEOF
44171#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44172_ACEOF
44173 X11_HEADERS_OK=yes
44174else
44175  X11_HEADERS_OK=no; break
44176fi
44177
44178done
44179
44180
44181    if test "x$X11_HEADERS_OK" = xno; then
44182
44183  # Print a helpful message on how to acquire the necessary build dependency.
44184  # x11 is the help tag: freetype, cups, pulse, alsa etc
44185  MISSING_DEPENDENCY=x11
44186
44187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44188    cygwin_help $MISSING_DEPENDENCY
44189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44190    msys_help $MISSING_DEPENDENCY
44191  else
44192    PKGHANDLER_COMMAND=
44193
44194    case $PKGHANDLER in
44195      apt-get)
44196        apt_help     $MISSING_DEPENDENCY ;;
44197      yum)
44198        yum_help     $MISSING_DEPENDENCY ;;
44199      port)
44200        port_help    $MISSING_DEPENDENCY ;;
44201      pkgutil)
44202        pkgutil_help $MISSING_DEPENDENCY ;;
44203      pkgadd)
44204        pkgadd_help  $MISSING_DEPENDENCY ;;
44205    esac
44206
44207    if test "x$PKGHANDLER_COMMAND" != x; then
44208      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44209    fi
44210  fi
44211
44212      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44213    fi
44214
44215    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44216    # defined in libawt_xawt.
44217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44218$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44220/* end confdefs.h.  */
44221#include <X11/extensions/Xrender.h>
44222int
44223main ()
44224{
44225XLinearGradient x;
44226  ;
44227  return 0;
44228}
44229_ACEOF
44230if ac_fn_c_try_compile "$LINENO"; then :
44231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44232$as_echo "yes" >&6; }
44233else
44234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44235$as_echo "no" >&6; }
44236         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44237fi
44238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44239
44240    CFLAGS="$OLD_CFLAGS"
44241    ac_ext=cpp
44242ac_cpp='$CXXCPP $CPPFLAGS'
44243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44246
44247  fi # X11_NOT_NEEDED
44248
44249
44250
44251
44252
44253
44254  ###############################################################################
44255  #
44256  # The common unix printing system cups is used to print from java.
44257  #
44258
44259# Check whether --with-cups was given.
44260if test "${with_cups+set}" = set; then :
44261  withval=$with_cups;
44262fi
44263
44264
44265# Check whether --with-cups-include was given.
44266if test "${with_cups_include+set}" = set; then :
44267  withval=$with_cups_include;
44268fi
44269
44270
44271  if test "x$CUPS_NOT_NEEDED" = xyes; then
44272    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44273      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44274$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44275    fi
44276    CUPS_CFLAGS=
44277  else
44278    CUPS_FOUND=no
44279
44280    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44281      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44282    fi
44283
44284    if test "x${with_cups}" != x; then
44285      CUPS_CFLAGS="-I${with_cups}/include"
44286      CUPS_FOUND=yes
44287    fi
44288    if test "x${with_cups_include}" != x; then
44289      CUPS_CFLAGS="-I${with_cups_include}"
44290      CUPS_FOUND=yes
44291    fi
44292    if test "x$CUPS_FOUND" = xno; then
44293
44294
44295  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44296    # Source the builddeps file again, to make sure it uses the latest variables!
44297    . $builddepsfile
44298    # Look for a target and build machine specific resource!
44299    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44300    if test "x$resource" = x; then
44301      # Ok, lets instead look for a target specific resource
44302      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44303    fi
44304    if test "x$resource" = x; then
44305      # Ok, lets instead look for a build specific resource
44306      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44307    fi
44308    if test "x$resource" = x; then
44309      # Ok, lets instead look for a generic resource
44310      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44311      resource=${builddep_cups}
44312    fi
44313    if test "x$resource" != x; then
44314      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44315$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44316      # If the resource in the builddeps.conf file is an existing directory,
44317      # for example /java/linux/cups
44318      if test -d ${resource}; then
44319        depdir=${resource}
44320      else
44321
44322  # cups is for example mymodule
44323  # $resource is for example libs/general/libmymod_1_2_3.zip
44324  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44325  # $with_builddeps_dir is for example /localhome/builddeps
44326  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44327  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44328  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44329  filename=`basename $resource`
44330  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44331  filebase=${filename%%.*}
44332  extension=${filename#*.}
44333  installdir=$with_builddeps_dir/$filebase
44334  if test ! -f $installdir/$filename.unpacked; then
44335    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44336$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44337    if test ! -d $installdir; then
44338      mkdir -p $installdir
44339    fi
44340    if test ! -d $installdir; then
44341      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44342    fi
44343    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44344    touch $tmpfile
44345    if test ! -f $tmpfile; then
44346      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44347    fi
44348
44349  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44350  # $tmpfile is the local file name for the downloaded file.
44351  VALID_TOOL=no
44352  if test "x$BDEPS_FTP" = xwget; then
44353    VALID_TOOL=yes
44354    wget -O $tmpfile $with_builddeps_server/$resource
44355  fi
44356  if test "x$BDEPS_FTP" = xlftp; then
44357    VALID_TOOL=yes
44358    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44359  fi
44360  if test "x$BDEPS_FTP" = xftp; then
44361    VALID_TOOL=yes
44362    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44363    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44364    FTPUSERPWD=${FTPSERVER%%@*}
44365    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44366      FTPUSER=${userpwd%%:*}
44367      FTPPWD=${userpwd#*@}
44368      FTPSERVER=${FTPSERVER#*@}
44369    else
44370      FTPUSER=ftp
44371      FTPPWD=ftp
44372    fi
44373    # the "pass" command does not work on some
44374    # ftp clients (read ftp.exe) but if it works,
44375    # passive mode is better!
44376    ( \
44377        echo "user $FTPUSER $FTPPWD"        ; \
44378        echo "pass"                         ; \
44379        echo "bin"                          ; \
44380        echo "get $FTPPATH $tmpfile"              ; \
44381    ) | ftp -in $FTPSERVER
44382  fi
44383  if test "x$VALID_TOOL" != xyes; then
44384    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44385  fi
44386
44387    mv $tmpfile $installdir/$filename
44388    if test ! -s $installdir/$filename; then
44389      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44390    fi
44391    case "$extension" in
44392      zip)  echo "Unzipping $installdir/$filename..."
44393        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44394        ;;
44395      tar.gz) echo "Untaring $installdir/$filename..."
44396        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44397        ;;
44398      tgz) echo "Untaring $installdir/$filename..."
44399        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44400        ;;
44401      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44402        ;;
44403    esac
44404  fi
44405  if test -f $installdir/$filename.unpacked; then
44406    depdir=$installdir
44407  fi
44408
44409      fi
44410      # Source the builddeps file again, because in the previous command, the depdir
44411      # was updated to point at the current build dependency install directory.
44412      . $builddepsfile
44413      # Now extract variables from the builddeps.conf files.
44414      theroot=${builddep_cups_ROOT}
44415      thecflags=${builddep_cups_CFLAGS}
44416      thelibs=${builddep_cups_LIBS}
44417      if test "x$depdir" = x; then
44418        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44419      fi
44420      CUPS=$depdir
44421      if test "x$theroot" != x; then
44422        CUPS="$theroot"
44423      fi
44424      if test "x$thecflags" != x; then
44425        CUPS_CFLAGS="$thecflags"
44426      fi
44427      if test "x$thelibs" != x; then
44428        CUPS_LIBS="$thelibs"
44429      fi
44430      CUPS_FOUND=yes
44431
44432    fi
44433
44434  fi
44435
44436    fi
44437    if test "x$CUPS_FOUND" = xno; then
44438      # Are the cups headers installed in the default /usr/include location?
44439      for ac_header in cups/cups.h cups/ppd.h
44440do :
44441  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44442ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44443if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44444  cat >>confdefs.h <<_ACEOF
44445#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44446_ACEOF
44447
44448            CUPS_FOUND=yes
44449            CUPS_CFLAGS=
44450            DEFAULT_CUPS=yes
44451
44452
44453fi
44454
44455done
44456
44457    fi
44458    if test "x$CUPS_FOUND" = xno; then
44459      # Getting nervous now? Lets poke around for standard Solaris third-party
44460      # package installation locations.
44461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44462$as_echo_n "checking for cups headers... " >&6; }
44463      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44464        # An SFW package seems to be installed!
44465        CUPS_FOUND=yes
44466        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44467      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44468        # A CSW package seems to be installed!
44469        CUPS_FOUND=yes
44470        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44471      fi
44472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44473$as_echo "$CUPS_FOUND" >&6; }
44474    fi
44475    if test "x$CUPS_FOUND" = xno; then
44476
44477  # Print a helpful message on how to acquire the necessary build dependency.
44478  # cups is the help tag: freetype, cups, pulse, alsa etc
44479  MISSING_DEPENDENCY=cups
44480
44481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44482    cygwin_help $MISSING_DEPENDENCY
44483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44484    msys_help $MISSING_DEPENDENCY
44485  else
44486    PKGHANDLER_COMMAND=
44487
44488    case $PKGHANDLER in
44489      apt-get)
44490        apt_help     $MISSING_DEPENDENCY ;;
44491      yum)
44492        yum_help     $MISSING_DEPENDENCY ;;
44493      port)
44494        port_help    $MISSING_DEPENDENCY ;;
44495      pkgutil)
44496        pkgutil_help $MISSING_DEPENDENCY ;;
44497      pkgadd)
44498        pkgadd_help  $MISSING_DEPENDENCY ;;
44499    esac
44500
44501    if test "x$PKGHANDLER_COMMAND" != x; then
44502      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44503    fi
44504  fi
44505
44506      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44507    fi
44508  fi
44509
44510
44511
44512
44513
44514
44515  ###############################################################################
44516  #
44517  # The ubiquitous freetype library is used to render fonts.
44518  #
44519
44520# Check whether --with-freetype was given.
44521if test "${with_freetype+set}" = set; then :
44522  withval=$with_freetype;
44523fi
44524
44525
44526# Check whether --with-freetype-include was given.
44527if test "${with_freetype_include+set}" = set; then :
44528  withval=$with_freetype_include;
44529fi
44530
44531
44532# Check whether --with-freetype-lib was given.
44533if test "${with_freetype_lib+set}" = set; then :
44534  withval=$with_freetype_lib;
44535fi
44536
44537
44538# Check whether --with-freetype-src was given.
44539if test "${with_freetype_src+set}" = set; then :
44540  withval=$with_freetype_src;
44541fi
44542
44543  # Check whether --enable-freetype-bundling was given.
44544if test "${enable_freetype_bundling+set}" = set; then :
44545  enableval=$enable_freetype_bundling;
44546fi
44547
44548
44549  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44550  FREETYPE_BASE_NAME=freetype
44551  FREETYPE_CFLAGS=
44552  FREETYPE_LIBS=
44553  FREETYPE_BUNDLE_LIB_PATH=
44554
44555  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44556    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
44557      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44558$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44559    fi
44560    if test "x$enable_freetype_bundling" != x; then
44561      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44562$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44563    fi
44564  else
44565    # freetype is needed to build; go get it!
44566
44567    BUNDLE_FREETYPE="$enable_freetype_bundling"
44568
44569    if  test "x$with_freetype_src" != x; then
44570      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44571        # Try to build freetype if --with-freetype-src was given on Windows
44572
44573  FREETYPE_SRC_PATH="$with_freetype_src"
44574  BUILD_FREETYPE=yes
44575
44576  # Check if the freetype sources are acessible..
44577  if ! test -d $FREETYPE_SRC_PATH; then
44578    { $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
44579$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44580    BUILD_FREETYPE=no
44581  fi
44582  # ..and contain a vc2010 project file
44583  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44584  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44585    { $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
44586$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44587    BUILD_FREETYPE=no
44588  fi
44589  # Now check if configure found a version of 'msbuild.exe'
44590  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44591    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44592$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44593    BUILD_FREETYPE=no
44594  fi
44595
44596  # Ready to go..
44597  if test "x$BUILD_FREETYPE" = xyes; then
44598
44599    # msbuild requires trailing slashes for output directories
44600    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44601    freetype_lib_path_unix="$freetype_lib_path"
44602    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44603
44604  unix_path="$vcxproj_path"
44605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44606    windows_path=`$CYGPATH -m "$unix_path"`
44607    vcxproj_path="$windows_path"
44608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44609    windows_path=`cmd //c echo $unix_path`
44610    vcxproj_path="$windows_path"
44611  fi
44612
44613
44614  unix_path="$freetype_lib_path"
44615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44616    windows_path=`$CYGPATH -m "$unix_path"`
44617    freetype_lib_path="$windows_path"
44618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44619    windows_path=`cmd //c echo $unix_path`
44620    freetype_lib_path="$windows_path"
44621  fi
44622
44623
44624  unix_path="$freetype_obj_path"
44625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44626    windows_path=`$CYGPATH -m "$unix_path"`
44627    freetype_obj_path="$windows_path"
44628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44629    windows_path=`cmd //c echo $unix_path`
44630    freetype_obj_path="$windows_path"
44631  fi
44632
44633    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44634      freetype_platform=x64
44635    else
44636      freetype_platform=win32
44637    fi
44638
44639    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44640    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44641    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44642    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44643    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44644$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44645
44646    # First we try to build the freetype.dll
44647    $ECHO -e "@echo off\n"\
44648	     "$MSBUILD $vcxproj_path "\
44649		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44650		       "/p:Configuration=\"Release Multithreaded\" "\
44651		       "/p:Platform=$freetype_platform "\
44652		       "/p:ConfigurationType=DynamicLibrary "\
44653		       "/p:TargetName=freetype "\
44654		       "/p:OutDir=\"$freetype_lib_path\" "\
44655		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44656    cmd /c freetype.bat
44657
44658    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44659      # If that succeeds we also build freetype.lib
44660      $ECHO -e "@echo off\n"\
44661	       "$MSBUILD $vcxproj_path "\
44662			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44663			 "/p:Configuration=\"Release Multithreaded\" "\
44664			 "/p:Platform=$freetype_platform "\
44665			 "/p:ConfigurationType=StaticLibrary "\
44666			 "/p:TargetName=freetype "\
44667			 "/p:OutDir=\"$freetype_lib_path\" "\
44668			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44669      cmd /c freetype.bat
44670
44671      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44672	# Once we build both, lib and dll, set freetype lib and include path appropriately
44673	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44674	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44675	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44676$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44677      else
44678	BUILD_FREETYPE=no
44679      fi
44680    else
44681      BUILD_FREETYPE=no
44682    fi
44683  fi
44684
44685        if test "x$BUILD_FREETYPE" = xyes; then
44686          # Okay, we built it. Check that it works.
44687
44688  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44689  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44690  METHOD="--with-freetype-src"
44691
44692  # Let's start with an optimistic view of the world :-)
44693  FOUND_FREETYPE=yes
44694
44695  # First look for the canonical freetype main include file ft2build.h.
44696  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44697    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44698    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44699    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44700      # Fail.
44701      FOUND_FREETYPE=no
44702    fi
44703  fi
44704
44705  if test "x$FOUND_FREETYPE" = xyes; then
44706    # Include file found, let's continue the sanity check.
44707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44708$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44709
44710    # Reset to default value
44711    FREETYPE_BASE_NAME=freetype
44712    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44713    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44714      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44716        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44717        # for the .6 version explicitly.
44718        FREETYPE_BASE_NAME=freetype.6
44719        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44720        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44721$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44722      else
44723        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44725        FOUND_FREETYPE=no
44726      fi
44727    else
44728      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44729        # On Windows, we will need both .lib and .dll file.
44730        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44731          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44732$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44733          FOUND_FREETYPE=no
44734        fi
44735      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44737        # Found lib in isa dir, use that instead.
44738        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44739        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44740$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44741      fi
44742    fi
44743  fi
44744
44745  if test "x$FOUND_FREETYPE" = xyes; then
44746
44747  # Only process if variable expands to non-empty
44748
44749  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44751
44752  # Input might be given as Windows format, start by converting to
44753  # unix format.
44754  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44755  new_path=`$CYGPATH -u "$path"`
44756
44757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44760  # "foo.exe" is OK but "foo" is an error.
44761  #
44762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44763  # It is also a way to make sure we got the proper file name for the real test later on.
44764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44765  if test "x$test_shortpath" = x; then
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44768    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44769  fi
44770
44771  # Call helper function which possibly converts this using DOS-style short mode.
44772  # If so, the updated path is stored in $new_path.
44773
44774  input_path="$new_path"
44775  # Check if we need to convert this using DOS-style short mode. If the path
44776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44777  # take no chances and rewrite it.
44778  # Note: m4 eats our [], so we need to use [ and ] instead.
44779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44780  if test "x$has_forbidden_chars" != x; then
44781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44785      # Going to short mode and back again did indeed matter. Since short mode is
44786      # case insensitive, let's make it lowercase to improve readability.
44787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44788      # Now convert it back to Unix-style (cygpath)
44789      input_path=`$CYGPATH -u "$shortmode_path"`
44790      new_path="$input_path"
44791    fi
44792  fi
44793
44794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44795  if test "x$test_cygdrive_prefix" = x; then
44796    # As a simple fix, exclude /usr/bin since it's not a real path.
44797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44799      # a path prefixed by /cygdrive for fixpath to work.
44800      new_path="$CYGWIN_ROOT_PATH$input_path"
44801    fi
44802  fi
44803
44804
44805  if test "x$path" != "x$new_path"; then
44806    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44809  fi
44810
44811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44812
44813  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44814  has_colon=`$ECHO $path | $GREP ^.:`
44815  new_path="$path"
44816  if test "x$has_colon" = x; then
44817    # Not in mixed or Windows style, start by that.
44818    new_path=`cmd //c echo $path`
44819  fi
44820
44821
44822  input_path="$new_path"
44823  # Check if we need to convert this using DOS-style short mode. If the path
44824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44825  # take no chances and rewrite it.
44826  # Note: m4 eats our [], so we need to use [ and ] instead.
44827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44828  if test "x$has_forbidden_chars" != x; then
44829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44831  fi
44832
44833
44834  windows_path="$new_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    unix_path=`$CYGPATH -u "$windows_path"`
44837    new_path="$unix_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44840    new_path="$unix_path"
44841  fi
44842
44843  if test "x$path" != "x$new_path"; then
44844    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44847  fi
44848
44849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44851
44852    else
44853      # We're on a unix platform. Hooray! :)
44854      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44855      has_space=`$ECHO "$path" | $GREP " "`
44856      if test "x$has_space" != x; then
44857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44860      fi
44861
44862      # Use eval to expand a potential ~
44863      eval path="$path"
44864      if test ! -f "$path" && test ! -d "$path"; then
44865        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44866      fi
44867
44868      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44869    fi
44870  fi
44871
44872
44873  # Only process if variable expands to non-empty
44874
44875  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44877
44878  # Input might be given as Windows format, start by converting to
44879  # unix format.
44880  path="$POTENTIAL_FREETYPE_LIB_PATH"
44881  new_path=`$CYGPATH -u "$path"`
44882
44883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44886  # "foo.exe" is OK but "foo" is an error.
44887  #
44888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44889  # It is also a way to make sure we got the proper file name for the real test later on.
44890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44891  if test "x$test_shortpath" = x; then
44892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44894    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44895  fi
44896
44897  # Call helper function which possibly converts this using DOS-style short mode.
44898  # If so, the updated path is stored in $new_path.
44899
44900  input_path="$new_path"
44901  # Check if we need to convert this using DOS-style short mode. If the path
44902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44903  # take no chances and rewrite it.
44904  # Note: m4 eats our [], so we need to use [ and ] instead.
44905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44906  if test "x$has_forbidden_chars" != x; then
44907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44911      # Going to short mode and back again did indeed matter. Since short mode is
44912      # case insensitive, let's make it lowercase to improve readability.
44913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44914      # Now convert it back to Unix-style (cygpath)
44915      input_path=`$CYGPATH -u "$shortmode_path"`
44916      new_path="$input_path"
44917    fi
44918  fi
44919
44920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44921  if test "x$test_cygdrive_prefix" = x; then
44922    # As a simple fix, exclude /usr/bin since it's not a real path.
44923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44925      # a path prefixed by /cygdrive for fixpath to work.
44926      new_path="$CYGWIN_ROOT_PATH$input_path"
44927    fi
44928  fi
44929
44930
44931  if test "x$path" != "x$new_path"; then
44932    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44935  fi
44936
44937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44938
44939  path="$POTENTIAL_FREETYPE_LIB_PATH"
44940  has_colon=`$ECHO $path | $GREP ^.:`
44941  new_path="$path"
44942  if test "x$has_colon" = x; then
44943    # Not in mixed or Windows style, start by that.
44944    new_path=`cmd //c echo $path`
44945  fi
44946
44947
44948  input_path="$new_path"
44949  # Check if we need to convert this using DOS-style short mode. If the path
44950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44951  # take no chances and rewrite it.
44952  # Note: m4 eats our [], so we need to use [ and ] instead.
44953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44954  if test "x$has_forbidden_chars" != x; then
44955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44957  fi
44958
44959
44960  windows_path="$new_path"
44961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44962    unix_path=`$CYGPATH -u "$windows_path"`
44963    new_path="$unix_path"
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44966    new_path="$unix_path"
44967  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44977
44978    else
44979      # We're on a unix platform. Hooray! :)
44980      path="$POTENTIAL_FREETYPE_LIB_PATH"
44981      has_space=`$ECHO "$path" | $GREP " "`
44982      if test "x$has_space" != x; then
44983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44986      fi
44987
44988      # Use eval to expand a potential ~
44989      eval path="$path"
44990      if test ! -f "$path" && test ! -d "$path"; then
44991        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44992      fi
44993
44994      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44995    fi
44996  fi
44997
44998
44999    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45001$as_echo_n "checking for freetype includes... " >&6; }
45002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45003$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45004    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45006$as_echo_n "checking for freetype libraries... " >&6; }
45007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45008$as_echo "$FREETYPE_LIB_PATH" >&6; }
45009  fi
45010
45011          if test "x$FOUND_FREETYPE" != xyes; then
45012            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45013          fi
45014        else
45015          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45016$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45017          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45018        fi
45019      else
45020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45021$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45022      fi
45023    fi
45024
45025    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45026      # User has specified settings
45027
45028      if test "x$BUNDLE_FREETYPE" = x; then
45029        # If not specified, default is to bundle freetype
45030        BUNDLE_FREETYPE=yes
45031      fi
45032
45033      if test "x$with_freetype" != x; then
45034        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45035        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45036      fi
45037
45038      # Allow --with-freetype-lib and --with-freetype-include to override
45039      if test "x$with_freetype_include" != x; then
45040        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45041      fi
45042      if test "x$with_freetype_lib" != x; then
45043        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45044      fi
45045
45046      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45047        # Okay, we got it. Check that it works.
45048
45049  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45050  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45051  METHOD="--with-freetype"
45052
45053  # Let's start with an optimistic view of the world :-)
45054  FOUND_FREETYPE=yes
45055
45056  # First look for the canonical freetype main include file ft2build.h.
45057  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45058    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45059    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45060    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45061      # Fail.
45062      FOUND_FREETYPE=no
45063    fi
45064  fi
45065
45066  if test "x$FOUND_FREETYPE" = xyes; then
45067    # Include file found, let's continue the sanity check.
45068    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45069$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45070
45071    # Reset to default value
45072    FREETYPE_BASE_NAME=freetype
45073    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45074    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45075      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45076          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45077        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45078        # for the .6 version explicitly.
45079        FREETYPE_BASE_NAME=freetype.6
45080        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45081        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45082$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45083      else
45084        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45085$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45086        FOUND_FREETYPE=no
45087      fi
45088    else
45089      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45090        # On Windows, we will need both .lib and .dll file.
45091        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45092          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45093$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45094          FOUND_FREETYPE=no
45095        fi
45096      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45097          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45098        # Found lib in isa dir, use that instead.
45099        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45100        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45101$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45102      fi
45103    fi
45104  fi
45105
45106  if test "x$FOUND_FREETYPE" = xyes; then
45107
45108  # Only process if variable expands to non-empty
45109
45110  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45112
45113  # Input might be given as Windows format, start by converting to
45114  # unix format.
45115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45116  new_path=`$CYGPATH -u "$path"`
45117
45118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45121  # "foo.exe" is OK but "foo" is an error.
45122  #
45123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45124  # It is also a way to make sure we got the proper file name for the real test later on.
45125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45126  if test "x$test_shortpath" = x; then
45127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45129    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45130  fi
45131
45132  # Call helper function which possibly converts this using DOS-style short mode.
45133  # If so, the updated path is stored in $new_path.
45134
45135  input_path="$new_path"
45136  # Check if we need to convert this using DOS-style short mode. If the path
45137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45138  # take no chances and rewrite it.
45139  # Note: m4 eats our [], so we need to use [ and ] instead.
45140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45141  if test "x$has_forbidden_chars" != x; then
45142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45146      # Going to short mode and back again did indeed matter. Since short mode is
45147      # case insensitive, let's make it lowercase to improve readability.
45148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45149      # Now convert it back to Unix-style (cygpath)
45150      input_path=`$CYGPATH -u "$shortmode_path"`
45151      new_path="$input_path"
45152    fi
45153  fi
45154
45155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45156  if test "x$test_cygdrive_prefix" = x; then
45157    # As a simple fix, exclude /usr/bin since it's not a real path.
45158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45160      # a path prefixed by /cygdrive for fixpath to work.
45161      new_path="$CYGWIN_ROOT_PATH$input_path"
45162    fi
45163  fi
45164
45165
45166  if test "x$path" != "x$new_path"; then
45167    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45170  fi
45171
45172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45173
45174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45175  has_colon=`$ECHO $path | $GREP ^.:`
45176  new_path="$path"
45177  if test "x$has_colon" = x; then
45178    # Not in mixed or Windows style, start by that.
45179    new_path=`cmd //c echo $path`
45180  fi
45181
45182
45183  input_path="$new_path"
45184  # Check if we need to convert this using DOS-style short mode. If the path
45185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45186  # take no chances and rewrite it.
45187  # Note: m4 eats our [], so we need to use [ and ] instead.
45188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45189  if test "x$has_forbidden_chars" != x; then
45190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45192  fi
45193
45194
45195  windows_path="$new_path"
45196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45197    unix_path=`$CYGPATH -u "$windows_path"`
45198    new_path="$unix_path"
45199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45201    new_path="$unix_path"
45202  fi
45203
45204  if test "x$path" != "x$new_path"; then
45205    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45208  fi
45209
45210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45212
45213    else
45214      # We're on a unix platform. Hooray! :)
45215      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45216      has_space=`$ECHO "$path" | $GREP " "`
45217      if test "x$has_space" != x; then
45218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45221      fi
45222
45223      # Use eval to expand a potential ~
45224      eval path="$path"
45225      if test ! -f "$path" && test ! -d "$path"; then
45226        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45227      fi
45228
45229      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45230    fi
45231  fi
45232
45233
45234  # Only process if variable expands to non-empty
45235
45236  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45238
45239  # Input might be given as Windows format, start by converting to
45240  # unix format.
45241  path="$POTENTIAL_FREETYPE_LIB_PATH"
45242  new_path=`$CYGPATH -u "$path"`
45243
45244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45247  # "foo.exe" is OK but "foo" is an error.
45248  #
45249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45250  # It is also a way to make sure we got the proper file name for the real test later on.
45251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45252  if test "x$test_shortpath" = x; then
45253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45256  fi
45257
45258  # Call helper function which possibly converts this using DOS-style short mode.
45259  # If so, the updated path is stored in $new_path.
45260
45261  input_path="$new_path"
45262  # Check if we need to convert this using DOS-style short mode. If the path
45263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45264  # take no chances and rewrite it.
45265  # Note: m4 eats our [], so we need to use [ and ] instead.
45266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45267  if test "x$has_forbidden_chars" != x; then
45268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45272      # Going to short mode and back again did indeed matter. Since short mode is
45273      # case insensitive, let's make it lowercase to improve readability.
45274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45275      # Now convert it back to Unix-style (cygpath)
45276      input_path=`$CYGPATH -u "$shortmode_path"`
45277      new_path="$input_path"
45278    fi
45279  fi
45280
45281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45282  if test "x$test_cygdrive_prefix" = x; then
45283    # As a simple fix, exclude /usr/bin since it's not a real path.
45284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45286      # a path prefixed by /cygdrive for fixpath to work.
45287      new_path="$CYGWIN_ROOT_PATH$input_path"
45288    fi
45289  fi
45290
45291
45292  if test "x$path" != "x$new_path"; then
45293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45296  fi
45297
45298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45299
45300  path="$POTENTIAL_FREETYPE_LIB_PATH"
45301  has_colon=`$ECHO $path | $GREP ^.:`
45302  new_path="$path"
45303  if test "x$has_colon" = x; then
45304    # Not in mixed or Windows style, start by that.
45305    new_path=`cmd //c echo $path`
45306  fi
45307
45308
45309  input_path="$new_path"
45310  # Check if we need to convert this using DOS-style short mode. If the path
45311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45312  # take no chances and rewrite it.
45313  # Note: m4 eats our [], so we need to use [ and ] instead.
45314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45315  if test "x$has_forbidden_chars" != x; then
45316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45318  fi
45319
45320
45321  windows_path="$new_path"
45322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45323    unix_path=`$CYGPATH -u "$windows_path"`
45324    new_path="$unix_path"
45325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45327    new_path="$unix_path"
45328  fi
45329
45330  if test "x$path" != "x$new_path"; then
45331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45334  fi
45335
45336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45338
45339    else
45340      # We're on a unix platform. Hooray! :)
45341      path="$POTENTIAL_FREETYPE_LIB_PATH"
45342      has_space=`$ECHO "$path" | $GREP " "`
45343      if test "x$has_space" != x; then
45344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45347      fi
45348
45349      # Use eval to expand a potential ~
45350      eval path="$path"
45351      if test ! -f "$path" && test ! -d "$path"; then
45352        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45353      fi
45354
45355      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45356    fi
45357  fi
45358
45359
45360    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45362$as_echo_n "checking for freetype includes... " >&6; }
45363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45364$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45365    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45367$as_echo_n "checking for freetype libraries... " >&6; }
45368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45369$as_echo "$FREETYPE_LIB_PATH" >&6; }
45370  fi
45371
45372        if test "x$FOUND_FREETYPE" != xyes; then
45373          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45374        fi
45375      else
45376        # User specified only one of lib or include. This is an error.
45377        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45378          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45379$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45380          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45381        else
45382          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45383$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45384          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45385        fi
45386      fi
45387    else
45388      # User did not specify settings, but we need freetype. Try to locate it.
45389
45390      if test "x$BUNDLE_FREETYPE" = x; then
45391        # If not specified, default is to bundle freetype only on windows
45392        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45393          BUNDLE_FREETYPE=yes
45394        else
45395          BUNDLE_FREETYPE=no
45396        fi
45397      fi
45398
45399      if test "x$FOUND_FREETYPE" != xyes; then
45400        # Check builddeps
45401
45402
45403  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45404    # Source the builddeps file again, to make sure it uses the latest variables!
45405    . $builddepsfile
45406    # Look for a target and build machine specific resource!
45407    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45408    if test "x$resource" = x; then
45409      # Ok, lets instead look for a target specific resource
45410      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45411    fi
45412    if test "x$resource" = x; then
45413      # Ok, lets instead look for a build specific resource
45414      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45415    fi
45416    if test "x$resource" = x; then
45417      # Ok, lets instead look for a generic resource
45418      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45419      resource=${builddep_freetype2}
45420    fi
45421    if test "x$resource" != x; then
45422      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45423$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45424      # If the resource in the builddeps.conf file is an existing directory,
45425      # for example /java/linux/cups
45426      if test -d ${resource}; then
45427        depdir=${resource}
45428      else
45429
45430  # freetype2 is for example mymodule
45431  # $resource is for example libs/general/libmymod_1_2_3.zip
45432  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45433  # $with_builddeps_dir is for example /localhome/builddeps
45434  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45435  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45436  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45437  filename=`basename $resource`
45438  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45439  filebase=${filename%%.*}
45440  extension=${filename#*.}
45441  installdir=$with_builddeps_dir/$filebase
45442  if test ! -f $installdir/$filename.unpacked; then
45443    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45444$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45445    if test ! -d $installdir; then
45446      mkdir -p $installdir
45447    fi
45448    if test ! -d $installdir; then
45449      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45450    fi
45451    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45452    touch $tmpfile
45453    if test ! -f $tmpfile; then
45454      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45455    fi
45456
45457  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45458  # $tmpfile is the local file name for the downloaded file.
45459  VALID_TOOL=no
45460  if test "x$BDEPS_FTP" = xwget; then
45461    VALID_TOOL=yes
45462    wget -O $tmpfile $with_builddeps_server/$resource
45463  fi
45464  if test "x$BDEPS_FTP" = xlftp; then
45465    VALID_TOOL=yes
45466    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45467  fi
45468  if test "x$BDEPS_FTP" = xftp; then
45469    VALID_TOOL=yes
45470    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45471    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45472    FTPUSERPWD=${FTPSERVER%%@*}
45473    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45474      FTPUSER=${userpwd%%:*}
45475      FTPPWD=${userpwd#*@}
45476      FTPSERVER=${FTPSERVER#*@}
45477    else
45478      FTPUSER=ftp
45479      FTPPWD=ftp
45480    fi
45481    # the "pass" command does not work on some
45482    # ftp clients (read ftp.exe) but if it works,
45483    # passive mode is better!
45484    ( \
45485        echo "user $FTPUSER $FTPPWD"        ; \
45486        echo "pass"                         ; \
45487        echo "bin"                          ; \
45488        echo "get $FTPPATH $tmpfile"              ; \
45489    ) | ftp -in $FTPSERVER
45490  fi
45491  if test "x$VALID_TOOL" != xyes; then
45492    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45493  fi
45494
45495    mv $tmpfile $installdir/$filename
45496    if test ! -s $installdir/$filename; then
45497      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45498    fi
45499    case "$extension" in
45500      zip)  echo "Unzipping $installdir/$filename..."
45501        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45502        ;;
45503      tar.gz) echo "Untaring $installdir/$filename..."
45504        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45505        ;;
45506      tgz) echo "Untaring $installdir/$filename..."
45507        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45508        ;;
45509      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45510        ;;
45511    esac
45512  fi
45513  if test -f $installdir/$filename.unpacked; then
45514    depdir=$installdir
45515  fi
45516
45517      fi
45518      # Source the builddeps file again, because in the previous command, the depdir
45519      # was updated to point at the current build dependency install directory.
45520      . $builddepsfile
45521      # Now extract variables from the builddeps.conf files.
45522      theroot=${builddep_freetype2_ROOT}
45523      thecflags=${builddep_freetype2_CFLAGS}
45524      thelibs=${builddep_freetype2_LIBS}
45525      if test "x$depdir" = x; then
45526        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45527      fi
45528      FREETYPE=$depdir
45529      if test "x$theroot" != x; then
45530        FREETYPE="$theroot"
45531      fi
45532      if test "x$thecflags" != x; then
45533        FREETYPE_CFLAGS="$thecflags"
45534      fi
45535      if test "x$thelibs" != x; then
45536        FREETYPE_LIBS="$thelibs"
45537      fi
45538      FOUND_FREETYPE=yes
45539      else FOUND_FREETYPE=no
45540
45541    fi
45542    else FOUND_FREETYPE=no
45543
45544  fi
45545
45546        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45547        if test "x$FOUND_FREETYPE" = xyes; then
45548          if test "x$BUNDLE_FREETYPE" = xyes; then
45549            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45550$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45551            FOUND_FREETYPE=no
45552          else
45553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45554$as_echo_n "checking for freetype... " >&6; }
45555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45556$as_echo "yes (using builddeps)" >&6; }
45557          fi
45558        fi
45559      fi
45560
45561      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45562      if test "x$SYSROOT" = x; then
45563        if test "x$FOUND_FREETYPE" != xyes; then
45564          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45565          if test "x$PKG_CONFIG" != x; then
45566
45567pkg_failed=no
45568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45569$as_echo_n "checking for FREETYPE... " >&6; }
45570
45571if test -n "$FREETYPE_CFLAGS"; then
45572    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45573 elif test -n "$PKG_CONFIG"; then
45574    if test -n "$PKG_CONFIG" && \
45575    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45576  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45577  ac_status=$?
45578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45579  test $ac_status = 0; }; then
45580  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45581else
45582  pkg_failed=yes
45583fi
45584 else
45585    pkg_failed=untried
45586fi
45587if test -n "$FREETYPE_LIBS"; then
45588    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45589 elif test -n "$PKG_CONFIG"; then
45590    if test -n "$PKG_CONFIG" && \
45591    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45592  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45593  ac_status=$?
45594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45595  test $ac_status = 0; }; then
45596  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45597else
45598  pkg_failed=yes
45599fi
45600 else
45601    pkg_failed=untried
45602fi
45603
45604
45605
45606if test $pkg_failed = yes; then
45607
45608if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45609        _pkg_short_errors_supported=yes
45610else
45611        _pkg_short_errors_supported=no
45612fi
45613        if test $_pkg_short_errors_supported = yes; then
45614	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45615        else
45616	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45617        fi
45618	# Put the nasty error message in config.log where it belongs
45619	echo "$FREETYPE_PKG_ERRORS" >&5
45620
45621	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45622$as_echo "no" >&6; }
45623                FOUND_FREETYPE=no
45624elif test $pkg_failed = untried; then
45625	FOUND_FREETYPE=no
45626else
45627	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45628	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45630$as_echo "yes" >&6; }
45631	FOUND_FREETYPE=yes
45632fi
45633            if test "x$FOUND_FREETYPE" = xyes; then
45634              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45635              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45636              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45637              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45638                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45639              fi
45640              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45641              if test "x$BUNDLE_FREETYPE" = xyes; then
45642                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45643$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45644                FOUND_FREETYPE=no
45645              else
45646                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45647$as_echo_n "checking for freetype... " >&6; }
45648                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45649$as_echo "yes (using pkg-config)" >&6; }
45650              fi
45651            fi
45652          fi
45653        fi
45654      fi
45655
45656      if test "x$FOUND_FREETYPE" != xyes; then
45657        # Check in well-known locations
45658        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45659          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45660
45661  windows_path="$FREETYPE_BASE_DIR"
45662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45663    unix_path=`$CYGPATH -u "$windows_path"`
45664    FREETYPE_BASE_DIR="$unix_path"
45665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45667    FREETYPE_BASE_DIR="$unix_path"
45668  fi
45669
45670
45671  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45672  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45673  METHOD="well-known location"
45674
45675  # Let's start with an optimistic view of the world :-)
45676  FOUND_FREETYPE=yes
45677
45678  # First look for the canonical freetype main include file ft2build.h.
45679  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45680    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45681    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45682    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45683      # Fail.
45684      FOUND_FREETYPE=no
45685    fi
45686  fi
45687
45688  if test "x$FOUND_FREETYPE" = xyes; then
45689    # Include file found, let's continue the sanity check.
45690    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45691$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45692
45693    # Reset to default value
45694    FREETYPE_BASE_NAME=freetype
45695    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45696    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45697      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45698          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45699        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45700        # for the .6 version explicitly.
45701        FREETYPE_BASE_NAME=freetype.6
45702        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45703        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45704$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45705      else
45706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45708        FOUND_FREETYPE=no
45709      fi
45710    else
45711      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45712        # On Windows, we will need both .lib and .dll file.
45713        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45714          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45716          FOUND_FREETYPE=no
45717        fi
45718      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45720        # Found lib in isa dir, use that instead.
45721        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45722        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45723$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45724      fi
45725    fi
45726  fi
45727
45728  if test "x$FOUND_FREETYPE" = xyes; then
45729
45730  # Only process if variable expands to non-empty
45731
45732  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45734
45735  # Input might be given as Windows format, start by converting to
45736  # unix format.
45737  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45738  new_path=`$CYGPATH -u "$path"`
45739
45740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45743  # "foo.exe" is OK but "foo" is an error.
45744  #
45745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45746  # It is also a way to make sure we got the proper file name for the real test later on.
45747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45748  if test "x$test_shortpath" = x; then
45749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45752  fi
45753
45754  # Call helper function which possibly converts this using DOS-style short mode.
45755  # If so, the updated path is stored in $new_path.
45756
45757  input_path="$new_path"
45758  # Check if we need to convert this using DOS-style short mode. If the path
45759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45760  # take no chances and rewrite it.
45761  # Note: m4 eats our [], so we need to use [ and ] instead.
45762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45763  if test "x$has_forbidden_chars" != x; then
45764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45768      # Going to short mode and back again did indeed matter. Since short mode is
45769      # case insensitive, let's make it lowercase to improve readability.
45770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45771      # Now convert it back to Unix-style (cygpath)
45772      input_path=`$CYGPATH -u "$shortmode_path"`
45773      new_path="$input_path"
45774    fi
45775  fi
45776
45777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45778  if test "x$test_cygdrive_prefix" = x; then
45779    # As a simple fix, exclude /usr/bin since it's not a real path.
45780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45782      # a path prefixed by /cygdrive for fixpath to work.
45783      new_path="$CYGWIN_ROOT_PATH$input_path"
45784    fi
45785  fi
45786
45787
45788  if test "x$path" != "x$new_path"; then
45789    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45792  fi
45793
45794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45795
45796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45797  has_colon=`$ECHO $path | $GREP ^.:`
45798  new_path="$path"
45799  if test "x$has_colon" = x; then
45800    # Not in mixed or Windows style, start by that.
45801    new_path=`cmd //c echo $path`
45802  fi
45803
45804
45805  input_path="$new_path"
45806  # Check if we need to convert this using DOS-style short mode. If the path
45807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45808  # take no chances and rewrite it.
45809  # Note: m4 eats our [], so we need to use [ and ] instead.
45810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45811  if test "x$has_forbidden_chars" != x; then
45812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45814  fi
45815
45816
45817  windows_path="$new_path"
45818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45819    unix_path=`$CYGPATH -u "$windows_path"`
45820    new_path="$unix_path"
45821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45823    new_path="$unix_path"
45824  fi
45825
45826  if test "x$path" != "x$new_path"; then
45827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45830  fi
45831
45832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45834
45835    else
45836      # We're on a unix platform. Hooray! :)
45837      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45838      has_space=`$ECHO "$path" | $GREP " "`
45839      if test "x$has_space" != x; then
45840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45843      fi
45844
45845      # Use eval to expand a potential ~
45846      eval path="$path"
45847      if test ! -f "$path" && test ! -d "$path"; then
45848        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45849      fi
45850
45851      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45852    fi
45853  fi
45854
45855
45856  # Only process if variable expands to non-empty
45857
45858  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860
45861  # Input might be given as Windows format, start by converting to
45862  # unix format.
45863  path="$POTENTIAL_FREETYPE_LIB_PATH"
45864  new_path=`$CYGPATH -u "$path"`
45865
45866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45869  # "foo.exe" is OK but "foo" is an error.
45870  #
45871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45872  # It is also a way to make sure we got the proper file name for the real test later on.
45873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45874  if test "x$test_shortpath" = x; then
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45878  fi
45879
45880  # Call helper function which possibly converts this using DOS-style short mode.
45881  # If so, the updated path is stored in $new_path.
45882
45883  input_path="$new_path"
45884  # Check if we need to convert this using DOS-style short mode. If the path
45885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45886  # take no chances and rewrite it.
45887  # Note: m4 eats our [], so we need to use [ and ] instead.
45888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45889  if test "x$has_forbidden_chars" != x; then
45890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45894      # Going to short mode and back again did indeed matter. Since short mode is
45895      # case insensitive, let's make it lowercase to improve readability.
45896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45897      # Now convert it back to Unix-style (cygpath)
45898      input_path=`$CYGPATH -u "$shortmode_path"`
45899      new_path="$input_path"
45900    fi
45901  fi
45902
45903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45904  if test "x$test_cygdrive_prefix" = x; then
45905    # As a simple fix, exclude /usr/bin since it's not a real path.
45906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45908      # a path prefixed by /cygdrive for fixpath to work.
45909      new_path="$CYGWIN_ROOT_PATH$input_path"
45910    fi
45911  fi
45912
45913
45914  if test "x$path" != "x$new_path"; then
45915    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45918  fi
45919
45920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45921
45922  path="$POTENTIAL_FREETYPE_LIB_PATH"
45923  has_colon=`$ECHO $path | $GREP ^.:`
45924  new_path="$path"
45925  if test "x$has_colon" = x; then
45926    # Not in mixed or Windows style, start by that.
45927    new_path=`cmd //c echo $path`
45928  fi
45929
45930
45931  input_path="$new_path"
45932  # Check if we need to convert this using DOS-style short mode. If the path
45933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45934  # take no chances and rewrite it.
45935  # Note: m4 eats our [], so we need to use [ and ] instead.
45936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45937  if test "x$has_forbidden_chars" != x; then
45938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45940  fi
45941
45942
45943  windows_path="$new_path"
45944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45945    unix_path=`$CYGPATH -u "$windows_path"`
45946    new_path="$unix_path"
45947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45949    new_path="$unix_path"
45950  fi
45951
45952  if test "x$path" != "x$new_path"; then
45953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45956  fi
45957
45958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45960
45961    else
45962      # We're on a unix platform. Hooray! :)
45963      path="$POTENTIAL_FREETYPE_LIB_PATH"
45964      has_space=`$ECHO "$path" | $GREP " "`
45965      if test "x$has_space" != x; then
45966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45969      fi
45970
45971      # Use eval to expand a potential ~
45972      eval path="$path"
45973      if test ! -f "$path" && test ! -d "$path"; then
45974        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45975      fi
45976
45977      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45978    fi
45979  fi
45980
45981
45982    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45984$as_echo_n "checking for freetype includes... " >&6; }
45985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45986$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45987    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45989$as_echo_n "checking for freetype libraries... " >&6; }
45990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45991$as_echo "$FREETYPE_LIB_PATH" >&6; }
45992  fi
45993
45994          if test "x$FOUND_FREETYPE" != xyes; then
45995            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45996
45997  windows_path="$FREETYPE_BASE_DIR"
45998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999    unix_path=`$CYGPATH -u "$windows_path"`
46000    FREETYPE_BASE_DIR="$unix_path"
46001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46003    FREETYPE_BASE_DIR="$unix_path"
46004  fi
46005
46006
46007  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46008  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46009  METHOD="well-known location"
46010
46011  # Let's start with an optimistic view of the world :-)
46012  FOUND_FREETYPE=yes
46013
46014  # First look for the canonical freetype main include file ft2build.h.
46015  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46016    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46017    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46018    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46019      # Fail.
46020      FOUND_FREETYPE=no
46021    fi
46022  fi
46023
46024  if test "x$FOUND_FREETYPE" = xyes; then
46025    # Include file found, let's continue the sanity check.
46026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46027$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46028
46029    # Reset to default value
46030    FREETYPE_BASE_NAME=freetype
46031    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46032    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46033      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46034          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46035        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46036        # for the .6 version explicitly.
46037        FREETYPE_BASE_NAME=freetype.6
46038        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46040$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46041      else
46042        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46044        FOUND_FREETYPE=no
46045      fi
46046    else
46047      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46048        # On Windows, we will need both .lib and .dll file.
46049        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46050          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46052          FOUND_FREETYPE=no
46053        fi
46054      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46055          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46056        # Found lib in isa dir, use that instead.
46057        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46058        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46059$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46060      fi
46061    fi
46062  fi
46063
46064  if test "x$FOUND_FREETYPE" = xyes; then
46065
46066  # Only process if variable expands to non-empty
46067
46068  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46070
46071  # Input might be given as Windows format, start by converting to
46072  # unix format.
46073  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46074  new_path=`$CYGPATH -u "$path"`
46075
46076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46079  # "foo.exe" is OK but "foo" is an error.
46080  #
46081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46082  # It is also a way to make sure we got the proper file name for the real test later on.
46083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46084  if test "x$test_shortpath" = x; then
46085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46088  fi
46089
46090  # Call helper function which possibly converts this using DOS-style short mode.
46091  # If so, the updated path is stored in $new_path.
46092
46093  input_path="$new_path"
46094  # Check if we need to convert this using DOS-style short mode. If the path
46095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46096  # take no chances and rewrite it.
46097  # Note: m4 eats our [], so we need to use [ and ] instead.
46098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46099  if test "x$has_forbidden_chars" != x; then
46100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46104      # Going to short mode and back again did indeed matter. Since short mode is
46105      # case insensitive, let's make it lowercase to improve readability.
46106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46107      # Now convert it back to Unix-style (cygpath)
46108      input_path=`$CYGPATH -u "$shortmode_path"`
46109      new_path="$input_path"
46110    fi
46111  fi
46112
46113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46114  if test "x$test_cygdrive_prefix" = x; then
46115    # As a simple fix, exclude /usr/bin since it's not a real path.
46116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46118      # a path prefixed by /cygdrive for fixpath to work.
46119      new_path="$CYGWIN_ROOT_PATH$input_path"
46120    fi
46121  fi
46122
46123
46124  if test "x$path" != "x$new_path"; then
46125    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46128  fi
46129
46130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46131
46132  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46133  has_colon=`$ECHO $path | $GREP ^.:`
46134  new_path="$path"
46135  if test "x$has_colon" = x; then
46136    # Not in mixed or Windows style, start by that.
46137    new_path=`cmd //c echo $path`
46138  fi
46139
46140
46141  input_path="$new_path"
46142  # Check if we need to convert this using DOS-style short mode. If the path
46143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46144  # take no chances and rewrite it.
46145  # Note: m4 eats our [], so we need to use [ and ] instead.
46146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46147  if test "x$has_forbidden_chars" != x; then
46148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46150  fi
46151
46152
46153  windows_path="$new_path"
46154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46155    unix_path=`$CYGPATH -u "$windows_path"`
46156    new_path="$unix_path"
46157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46159    new_path="$unix_path"
46160  fi
46161
46162  if test "x$path" != "x$new_path"; then
46163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46166  fi
46167
46168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46170
46171    else
46172      # We're on a unix platform. Hooray! :)
46173      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46174      has_space=`$ECHO "$path" | $GREP " "`
46175      if test "x$has_space" != x; then
46176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46179      fi
46180
46181      # Use eval to expand a potential ~
46182      eval path="$path"
46183      if test ! -f "$path" && test ! -d "$path"; then
46184        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46185      fi
46186
46187      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46188    fi
46189  fi
46190
46191
46192  # Only process if variable expands to non-empty
46193
46194  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46196
46197  # Input might be given as Windows format, start by converting to
46198  # unix format.
46199  path="$POTENTIAL_FREETYPE_LIB_PATH"
46200  new_path=`$CYGPATH -u "$path"`
46201
46202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46205  # "foo.exe" is OK but "foo" is an error.
46206  #
46207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46208  # It is also a way to make sure we got the proper file name for the real test later on.
46209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46210  if test "x$test_shortpath" = x; then
46211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46213    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46214  fi
46215
46216  # Call helper function which possibly converts this using DOS-style short mode.
46217  # If so, the updated path is stored in $new_path.
46218
46219  input_path="$new_path"
46220  # Check if we need to convert this using DOS-style short mode. If the path
46221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46222  # take no chances and rewrite it.
46223  # Note: m4 eats our [], so we need to use [ and ] instead.
46224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46225  if test "x$has_forbidden_chars" != x; then
46226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46230      # Going to short mode and back again did indeed matter. Since short mode is
46231      # case insensitive, let's make it lowercase to improve readability.
46232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46233      # Now convert it back to Unix-style (cygpath)
46234      input_path=`$CYGPATH -u "$shortmode_path"`
46235      new_path="$input_path"
46236    fi
46237  fi
46238
46239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46240  if test "x$test_cygdrive_prefix" = x; then
46241    # As a simple fix, exclude /usr/bin since it's not a real path.
46242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46244      # a path prefixed by /cygdrive for fixpath to work.
46245      new_path="$CYGWIN_ROOT_PATH$input_path"
46246    fi
46247  fi
46248
46249
46250  if test "x$path" != "x$new_path"; then
46251    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46254  fi
46255
46256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46257
46258  path="$POTENTIAL_FREETYPE_LIB_PATH"
46259  has_colon=`$ECHO $path | $GREP ^.:`
46260  new_path="$path"
46261  if test "x$has_colon" = x; then
46262    # Not in mixed or Windows style, start by that.
46263    new_path=`cmd //c echo $path`
46264  fi
46265
46266
46267  input_path="$new_path"
46268  # Check if we need to convert this using DOS-style short mode. If the path
46269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46270  # take no chances and rewrite it.
46271  # Note: m4 eats our [], so we need to use [ and ] instead.
46272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46273  if test "x$has_forbidden_chars" != x; then
46274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46276  fi
46277
46278
46279  windows_path="$new_path"
46280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46281    unix_path=`$CYGPATH -u "$windows_path"`
46282    new_path="$unix_path"
46283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46285    new_path="$unix_path"
46286  fi
46287
46288  if test "x$path" != "x$new_path"; then
46289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46292  fi
46293
46294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46296
46297    else
46298      # We're on a unix platform. Hooray! :)
46299      path="$POTENTIAL_FREETYPE_LIB_PATH"
46300      has_space=`$ECHO "$path" | $GREP " "`
46301      if test "x$has_space" != x; then
46302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46305      fi
46306
46307      # Use eval to expand a potential ~
46308      eval path="$path"
46309      if test ! -f "$path" && test ! -d "$path"; then
46310        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46311      fi
46312
46313      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46314    fi
46315  fi
46316
46317
46318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46320$as_echo_n "checking for freetype includes... " >&6; }
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46325$as_echo_n "checking for freetype libraries... " >&6; }
46326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46327$as_echo "$FREETYPE_LIB_PATH" >&6; }
46328  fi
46329
46330          fi
46331        else
46332          FREETYPE_BASE_DIR="$SYSROOT/usr"
46333
46334  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46335  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46336  METHOD="well-known location"
46337
46338  # Let's start with an optimistic view of the world :-)
46339  FOUND_FREETYPE=yes
46340
46341  # First look for the canonical freetype main include file ft2build.h.
46342  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46343    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46344    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46345    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46346      # Fail.
46347      FOUND_FREETYPE=no
46348    fi
46349  fi
46350
46351  if test "x$FOUND_FREETYPE" = xyes; then
46352    # Include file found, let's continue the sanity check.
46353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46354$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46355
46356    # Reset to default value
46357    FREETYPE_BASE_NAME=freetype
46358    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46359    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46360      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46361          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46362        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46363        # for the .6 version explicitly.
46364        FREETYPE_BASE_NAME=freetype.6
46365        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46366        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46367$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46368      else
46369        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46370$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46371        FOUND_FREETYPE=no
46372      fi
46373    else
46374      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46375        # On Windows, we will need both .lib and .dll file.
46376        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46377          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46379          FOUND_FREETYPE=no
46380        fi
46381      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46382          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46383        # Found lib in isa dir, use that instead.
46384        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46385        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46386$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46387      fi
46388    fi
46389  fi
46390
46391  if test "x$FOUND_FREETYPE" = xyes; then
46392
46393  # Only process if variable expands to non-empty
46394
46395  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46397
46398  # Input might be given as Windows format, start by converting to
46399  # unix format.
46400  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46401  new_path=`$CYGPATH -u "$path"`
46402
46403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46406  # "foo.exe" is OK but "foo" is an error.
46407  #
46408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46409  # It is also a way to make sure we got the proper file name for the real test later on.
46410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46411  if test "x$test_shortpath" = x; then
46412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46414    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46415  fi
46416
46417  # Call helper function which possibly converts this using DOS-style short mode.
46418  # If so, the updated path is stored in $new_path.
46419
46420  input_path="$new_path"
46421  # Check if we need to convert this using DOS-style short mode. If the path
46422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46423  # take no chances and rewrite it.
46424  # Note: m4 eats our [], so we need to use [ and ] instead.
46425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46426  if test "x$has_forbidden_chars" != x; then
46427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46431      # Going to short mode and back again did indeed matter. Since short mode is
46432      # case insensitive, let's make it lowercase to improve readability.
46433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46434      # Now convert it back to Unix-style (cygpath)
46435      input_path=`$CYGPATH -u "$shortmode_path"`
46436      new_path="$input_path"
46437    fi
46438  fi
46439
46440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46441  if test "x$test_cygdrive_prefix" = x; then
46442    # As a simple fix, exclude /usr/bin since it's not a real path.
46443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46445      # a path prefixed by /cygdrive for fixpath to work.
46446      new_path="$CYGWIN_ROOT_PATH$input_path"
46447    fi
46448  fi
46449
46450
46451  if test "x$path" != "x$new_path"; then
46452    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46455  fi
46456
46457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46458
46459  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46460  has_colon=`$ECHO $path | $GREP ^.:`
46461  new_path="$path"
46462  if test "x$has_colon" = x; then
46463    # Not in mixed or Windows style, start by that.
46464    new_path=`cmd //c echo $path`
46465  fi
46466
46467
46468  input_path="$new_path"
46469  # Check if we need to convert this using DOS-style short mode. If the path
46470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46471  # take no chances and rewrite it.
46472  # Note: m4 eats our [], so we need to use [ and ] instead.
46473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46474  if test "x$has_forbidden_chars" != x; then
46475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46477  fi
46478
46479
46480  windows_path="$new_path"
46481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46482    unix_path=`$CYGPATH -u "$windows_path"`
46483    new_path="$unix_path"
46484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46486    new_path="$unix_path"
46487  fi
46488
46489  if test "x$path" != "x$new_path"; then
46490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46493  fi
46494
46495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46497
46498    else
46499      # We're on a unix platform. Hooray! :)
46500      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46501      has_space=`$ECHO "$path" | $GREP " "`
46502      if test "x$has_space" != x; then
46503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46506      fi
46507
46508      # Use eval to expand a potential ~
46509      eval path="$path"
46510      if test ! -f "$path" && test ! -d "$path"; then
46511        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46512      fi
46513
46514      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46515    fi
46516  fi
46517
46518
46519  # Only process if variable expands to non-empty
46520
46521  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46523
46524  # Input might be given as Windows format, start by converting to
46525  # unix format.
46526  path="$POTENTIAL_FREETYPE_LIB_PATH"
46527  new_path=`$CYGPATH -u "$path"`
46528
46529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46532  # "foo.exe" is OK but "foo" is an error.
46533  #
46534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46535  # It is also a way to make sure we got the proper file name for the real test later on.
46536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46537  if test "x$test_shortpath" = x; then
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46540    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46541  fi
46542
46543  # Call helper function which possibly converts this using DOS-style short mode.
46544  # If so, the updated path is stored in $new_path.
46545
46546  input_path="$new_path"
46547  # Check if we need to convert this using DOS-style short mode. If the path
46548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46549  # take no chances and rewrite it.
46550  # Note: m4 eats our [], so we need to use [ and ] instead.
46551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46552  if test "x$has_forbidden_chars" != x; then
46553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46557      # Going to short mode and back again did indeed matter. Since short mode is
46558      # case insensitive, let's make it lowercase to improve readability.
46559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46560      # Now convert it back to Unix-style (cygpath)
46561      input_path=`$CYGPATH -u "$shortmode_path"`
46562      new_path="$input_path"
46563    fi
46564  fi
46565
46566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46567  if test "x$test_cygdrive_prefix" = x; then
46568    # As a simple fix, exclude /usr/bin since it's not a real path.
46569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46571      # a path prefixed by /cygdrive for fixpath to work.
46572      new_path="$CYGWIN_ROOT_PATH$input_path"
46573    fi
46574  fi
46575
46576
46577  if test "x$path" != "x$new_path"; then
46578    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46581  fi
46582
46583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46584
46585  path="$POTENTIAL_FREETYPE_LIB_PATH"
46586  has_colon=`$ECHO $path | $GREP ^.:`
46587  new_path="$path"
46588  if test "x$has_colon" = x; then
46589    # Not in mixed or Windows style, start by that.
46590    new_path=`cmd //c echo $path`
46591  fi
46592
46593
46594  input_path="$new_path"
46595  # Check if we need to convert this using DOS-style short mode. If the path
46596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46597  # take no chances and rewrite it.
46598  # Note: m4 eats our [], so we need to use [ and ] instead.
46599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46600  if test "x$has_forbidden_chars" != x; then
46601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46603  fi
46604
46605
46606  windows_path="$new_path"
46607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46608    unix_path=`$CYGPATH -u "$windows_path"`
46609    new_path="$unix_path"
46610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46612    new_path="$unix_path"
46613  fi
46614
46615  if test "x$path" != "x$new_path"; then
46616    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46619  fi
46620
46621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46623
46624    else
46625      # We're on a unix platform. Hooray! :)
46626      path="$POTENTIAL_FREETYPE_LIB_PATH"
46627      has_space=`$ECHO "$path" | $GREP " "`
46628      if test "x$has_space" != x; then
46629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46632      fi
46633
46634      # Use eval to expand a potential ~
46635      eval path="$path"
46636      if test ! -f "$path" && test ! -d "$path"; then
46637        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46638      fi
46639
46640      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46641    fi
46642  fi
46643
46644
46645    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46647$as_echo_n "checking for freetype includes... " >&6; }
46648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46649$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46650    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46652$as_echo_n "checking for freetype libraries... " >&6; }
46653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46654$as_echo "$FREETYPE_LIB_PATH" >&6; }
46655  fi
46656
46657
46658          if test "x$FOUND_FREETYPE" != xyes; then
46659            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46660
46661  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46662  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46663  METHOD="well-known location"
46664
46665  # Let's start with an optimistic view of the world :-)
46666  FOUND_FREETYPE=yes
46667
46668  # First look for the canonical freetype main include file ft2build.h.
46669  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46670    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46671    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46672    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46673      # Fail.
46674      FOUND_FREETYPE=no
46675    fi
46676  fi
46677
46678  if test "x$FOUND_FREETYPE" = xyes; then
46679    # Include file found, let's continue the sanity check.
46680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46681$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46682
46683    # Reset to default value
46684    FREETYPE_BASE_NAME=freetype
46685    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46686    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46687      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46689        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46690        # for the .6 version explicitly.
46691        FREETYPE_BASE_NAME=freetype.6
46692        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46693        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46694$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46695      else
46696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46698        FOUND_FREETYPE=no
46699      fi
46700    else
46701      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46702        # On Windows, we will need both .lib and .dll file.
46703        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46704          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46705$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46706          FOUND_FREETYPE=no
46707        fi
46708      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46709          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46710        # Found lib in isa dir, use that instead.
46711        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46712        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46713$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46714      fi
46715    fi
46716  fi
46717
46718  if test "x$FOUND_FREETYPE" = xyes; then
46719
46720  # Only process if variable expands to non-empty
46721
46722  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46724
46725  # Input might be given as Windows format, start by converting to
46726  # unix format.
46727  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46728  new_path=`$CYGPATH -u "$path"`
46729
46730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46733  # "foo.exe" is OK but "foo" is an error.
46734  #
46735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46736  # It is also a way to make sure we got the proper file name for the real test later on.
46737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46738  if test "x$test_shortpath" = x; then
46739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46741    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46742  fi
46743
46744  # Call helper function which possibly converts this using DOS-style short mode.
46745  # If so, the updated path is stored in $new_path.
46746
46747  input_path="$new_path"
46748  # Check if we need to convert this using DOS-style short mode. If the path
46749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46750  # take no chances and rewrite it.
46751  # Note: m4 eats our [], so we need to use [ and ] instead.
46752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46753  if test "x$has_forbidden_chars" != x; then
46754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46758      # Going to short mode and back again did indeed matter. Since short mode is
46759      # case insensitive, let's make it lowercase to improve readability.
46760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46761      # Now convert it back to Unix-style (cygpath)
46762      input_path=`$CYGPATH -u "$shortmode_path"`
46763      new_path="$input_path"
46764    fi
46765  fi
46766
46767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46768  if test "x$test_cygdrive_prefix" = x; then
46769    # As a simple fix, exclude /usr/bin since it's not a real path.
46770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46772      # a path prefixed by /cygdrive for fixpath to work.
46773      new_path="$CYGWIN_ROOT_PATH$input_path"
46774    fi
46775  fi
46776
46777
46778  if test "x$path" != "x$new_path"; then
46779    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46782  fi
46783
46784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46785
46786  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46787  has_colon=`$ECHO $path | $GREP ^.:`
46788  new_path="$path"
46789  if test "x$has_colon" = x; then
46790    # Not in mixed or Windows style, start by that.
46791    new_path=`cmd //c echo $path`
46792  fi
46793
46794
46795  input_path="$new_path"
46796  # Check if we need to convert this using DOS-style short mode. If the path
46797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46798  # take no chances and rewrite it.
46799  # Note: m4 eats our [], so we need to use [ and ] instead.
46800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46801  if test "x$has_forbidden_chars" != x; then
46802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46804  fi
46805
46806
46807  windows_path="$new_path"
46808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46809    unix_path=`$CYGPATH -u "$windows_path"`
46810    new_path="$unix_path"
46811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46813    new_path="$unix_path"
46814  fi
46815
46816  if test "x$path" != "x$new_path"; then
46817    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46820  fi
46821
46822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46824
46825    else
46826      # We're on a unix platform. Hooray! :)
46827      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46828      has_space=`$ECHO "$path" | $GREP " "`
46829      if test "x$has_space" != x; then
46830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46833      fi
46834
46835      # Use eval to expand a potential ~
46836      eval path="$path"
46837      if test ! -f "$path" && test ! -d "$path"; then
46838        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46839      fi
46840
46841      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46842    fi
46843  fi
46844
46845
46846  # Only process if variable expands to non-empty
46847
46848  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46850
46851  # Input might be given as Windows format, start by converting to
46852  # unix format.
46853  path="$POTENTIAL_FREETYPE_LIB_PATH"
46854  new_path=`$CYGPATH -u "$path"`
46855
46856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46859  # "foo.exe" is OK but "foo" is an error.
46860  #
46861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46862  # It is also a way to make sure we got the proper file name for the real test later on.
46863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46864  if test "x$test_shortpath" = x; then
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46868  fi
46869
46870  # Call helper function which possibly converts this using DOS-style short mode.
46871  # If so, the updated path is stored in $new_path.
46872
46873  input_path="$new_path"
46874  # Check if we need to convert this using DOS-style short mode. If the path
46875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46876  # take no chances and rewrite it.
46877  # Note: m4 eats our [], so we need to use [ and ] instead.
46878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46879  if test "x$has_forbidden_chars" != x; then
46880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46884      # Going to short mode and back again did indeed matter. Since short mode is
46885      # case insensitive, let's make it lowercase to improve readability.
46886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46887      # Now convert it back to Unix-style (cygpath)
46888      input_path=`$CYGPATH -u "$shortmode_path"`
46889      new_path="$input_path"
46890    fi
46891  fi
46892
46893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46894  if test "x$test_cygdrive_prefix" = x; then
46895    # As a simple fix, exclude /usr/bin since it's not a real path.
46896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46898      # a path prefixed by /cygdrive for fixpath to work.
46899      new_path="$CYGWIN_ROOT_PATH$input_path"
46900    fi
46901  fi
46902
46903
46904  if test "x$path" != "x$new_path"; then
46905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46908  fi
46909
46910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46911
46912  path="$POTENTIAL_FREETYPE_LIB_PATH"
46913  has_colon=`$ECHO $path | $GREP ^.:`
46914  new_path="$path"
46915  if test "x$has_colon" = x; then
46916    # Not in mixed or Windows style, start by that.
46917    new_path=`cmd //c echo $path`
46918  fi
46919
46920
46921  input_path="$new_path"
46922  # Check if we need to convert this using DOS-style short mode. If the path
46923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46924  # take no chances and rewrite it.
46925  # Note: m4 eats our [], so we need to use [ and ] instead.
46926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46927  if test "x$has_forbidden_chars" != x; then
46928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46930  fi
46931
46932
46933  windows_path="$new_path"
46934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46935    unix_path=`$CYGPATH -u "$windows_path"`
46936    new_path="$unix_path"
46937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46939    new_path="$unix_path"
46940  fi
46941
46942  if test "x$path" != "x$new_path"; then
46943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46946  fi
46947
46948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46950
46951    else
46952      # We're on a unix platform. Hooray! :)
46953      path="$POTENTIAL_FREETYPE_LIB_PATH"
46954      has_space=`$ECHO "$path" | $GREP " "`
46955      if test "x$has_space" != x; then
46956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46959      fi
46960
46961      # Use eval to expand a potential ~
46962      eval path="$path"
46963      if test ! -f "$path" && test ! -d "$path"; then
46964        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46965      fi
46966
46967      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46968    fi
46969  fi
46970
46971
46972    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46974$as_echo_n "checking for freetype includes... " >&6; }
46975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46976$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46977    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46979$as_echo_n "checking for freetype libraries... " >&6; }
46980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46981$as_echo "$FREETYPE_LIB_PATH" >&6; }
46982  fi
46983
46984          fi
46985
46986          if test "x$FOUND_FREETYPE" != xyes; then
46987            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46988
46989  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46990  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46991  METHOD="well-known location"
46992
46993  # Let's start with an optimistic view of the world :-)
46994  FOUND_FREETYPE=yes
46995
46996  # First look for the canonical freetype main include file ft2build.h.
46997  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46998    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46999    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47000    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47001      # Fail.
47002      FOUND_FREETYPE=no
47003    fi
47004  fi
47005
47006  if test "x$FOUND_FREETYPE" = xyes; then
47007    # Include file found, let's continue the sanity check.
47008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47009$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47010
47011    # Reset to default value
47012    FREETYPE_BASE_NAME=freetype
47013    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47014    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47015      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47017        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47018        # for the .6 version explicitly.
47019        FREETYPE_BASE_NAME=freetype.6
47020        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47021        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47022$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47023      else
47024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47026        FOUND_FREETYPE=no
47027      fi
47028    else
47029      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47030        # On Windows, we will need both .lib and .dll file.
47031        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47032          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47033$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47034          FOUND_FREETYPE=no
47035        fi
47036      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47038        # Found lib in isa dir, use that instead.
47039        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47040        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47041$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47042      fi
47043    fi
47044  fi
47045
47046  if test "x$FOUND_FREETYPE" = xyes; then
47047
47048  # Only process if variable expands to non-empty
47049
47050  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47052
47053  # Input might be given as Windows format, start by converting to
47054  # unix format.
47055  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47056  new_path=`$CYGPATH -u "$path"`
47057
47058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47061  # "foo.exe" is OK but "foo" is an error.
47062  #
47063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47064  # It is also a way to make sure we got the proper file name for the real test later on.
47065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47066  if test "x$test_shortpath" = x; then
47067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47070  fi
47071
47072  # Call helper function which possibly converts this using DOS-style short mode.
47073  # If so, the updated path is stored in $new_path.
47074
47075  input_path="$new_path"
47076  # Check if we need to convert this using DOS-style short mode. If the path
47077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47078  # take no chances and rewrite it.
47079  # Note: m4 eats our [], so we need to use [ and ] instead.
47080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47081  if test "x$has_forbidden_chars" != x; then
47082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47086      # Going to short mode and back again did indeed matter. Since short mode is
47087      # case insensitive, let's make it lowercase to improve readability.
47088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47089      # Now convert it back to Unix-style (cygpath)
47090      input_path=`$CYGPATH -u "$shortmode_path"`
47091      new_path="$input_path"
47092    fi
47093  fi
47094
47095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47096  if test "x$test_cygdrive_prefix" = x; then
47097    # As a simple fix, exclude /usr/bin since it's not a real path.
47098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47100      # a path prefixed by /cygdrive for fixpath to work.
47101      new_path="$CYGWIN_ROOT_PATH$input_path"
47102    fi
47103  fi
47104
47105
47106  if test "x$path" != "x$new_path"; then
47107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47110  fi
47111
47112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47113
47114  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47115  has_colon=`$ECHO $path | $GREP ^.:`
47116  new_path="$path"
47117  if test "x$has_colon" = x; then
47118    # Not in mixed or Windows style, start by that.
47119    new_path=`cmd //c echo $path`
47120  fi
47121
47122
47123  input_path="$new_path"
47124  # Check if we need to convert this using DOS-style short mode. If the path
47125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47126  # take no chances and rewrite it.
47127  # Note: m4 eats our [], so we need to use [ and ] instead.
47128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47129  if test "x$has_forbidden_chars" != x; then
47130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47132  fi
47133
47134
47135  windows_path="$new_path"
47136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47137    unix_path=`$CYGPATH -u "$windows_path"`
47138    new_path="$unix_path"
47139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47141    new_path="$unix_path"
47142  fi
47143
47144  if test "x$path" != "x$new_path"; then
47145    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47148  fi
47149
47150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47152
47153    else
47154      # We're on a unix platform. Hooray! :)
47155      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47156      has_space=`$ECHO "$path" | $GREP " "`
47157      if test "x$has_space" != x; then
47158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47161      fi
47162
47163      # Use eval to expand a potential ~
47164      eval path="$path"
47165      if test ! -f "$path" && test ! -d "$path"; then
47166        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47167      fi
47168
47169      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47170    fi
47171  fi
47172
47173
47174  # Only process if variable expands to non-empty
47175
47176  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47178
47179  # Input might be given as Windows format, start by converting to
47180  # unix format.
47181  path="$POTENTIAL_FREETYPE_LIB_PATH"
47182  new_path=`$CYGPATH -u "$path"`
47183
47184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47187  # "foo.exe" is OK but "foo" is an error.
47188  #
47189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47190  # It is also a way to make sure we got the proper file name for the real test later on.
47191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47192  if test "x$test_shortpath" = x; then
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47196  fi
47197
47198  # Call helper function which possibly converts this using DOS-style short mode.
47199  # If so, the updated path is stored in $new_path.
47200
47201  input_path="$new_path"
47202  # Check if we need to convert this using DOS-style short mode. If the path
47203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47204  # take no chances and rewrite it.
47205  # Note: m4 eats our [], so we need to use [ and ] instead.
47206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47207  if test "x$has_forbidden_chars" != x; then
47208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47212      # Going to short mode and back again did indeed matter. Since short mode is
47213      # case insensitive, let's make it lowercase to improve readability.
47214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47215      # Now convert it back to Unix-style (cygpath)
47216      input_path=`$CYGPATH -u "$shortmode_path"`
47217      new_path="$input_path"
47218    fi
47219  fi
47220
47221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47222  if test "x$test_cygdrive_prefix" = x; then
47223    # As a simple fix, exclude /usr/bin since it's not a real path.
47224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47226      # a path prefixed by /cygdrive for fixpath to work.
47227      new_path="$CYGWIN_ROOT_PATH$input_path"
47228    fi
47229  fi
47230
47231
47232  if test "x$path" != "x$new_path"; then
47233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47236  fi
47237
47238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47239
47240  path="$POTENTIAL_FREETYPE_LIB_PATH"
47241  has_colon=`$ECHO $path | $GREP ^.:`
47242  new_path="$path"
47243  if test "x$has_colon" = x; then
47244    # Not in mixed or Windows style, start by that.
47245    new_path=`cmd //c echo $path`
47246  fi
47247
47248
47249  input_path="$new_path"
47250  # Check if we need to convert this using DOS-style short mode. If the path
47251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47252  # take no chances and rewrite it.
47253  # Note: m4 eats our [], so we need to use [ and ] instead.
47254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47255  if test "x$has_forbidden_chars" != x; then
47256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47258  fi
47259
47260
47261  windows_path="$new_path"
47262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47263    unix_path=`$CYGPATH -u "$windows_path"`
47264    new_path="$unix_path"
47265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47267    new_path="$unix_path"
47268  fi
47269
47270  if test "x$path" != "x$new_path"; then
47271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47274  fi
47275
47276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47278
47279    else
47280      # We're on a unix platform. Hooray! :)
47281      path="$POTENTIAL_FREETYPE_LIB_PATH"
47282      has_space=`$ECHO "$path" | $GREP " "`
47283      if test "x$has_space" != x; then
47284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47287      fi
47288
47289      # Use eval to expand a potential ~
47290      eval path="$path"
47291      if test ! -f "$path" && test ! -d "$path"; then
47292        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47293      fi
47294
47295      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47296    fi
47297  fi
47298
47299
47300    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47302$as_echo_n "checking for freetype includes... " >&6; }
47303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47304$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47305    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47307$as_echo_n "checking for freetype libraries... " >&6; }
47308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47309$as_echo "$FREETYPE_LIB_PATH" >&6; }
47310  fi
47311
47312          fi
47313
47314          if test "x$FOUND_FREETYPE" != xyes; then
47315            FREETYPE_BASE_DIR="$SYSROOT/usr"
47316            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47317
47318  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47319  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47320  METHOD="well-known location"
47321
47322  # Let's start with an optimistic view of the world :-)
47323  FOUND_FREETYPE=yes
47324
47325  # First look for the canonical freetype main include file ft2build.h.
47326  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47327    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47328    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47329    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47330      # Fail.
47331      FOUND_FREETYPE=no
47332    fi
47333  fi
47334
47335  if test "x$FOUND_FREETYPE" = xyes; then
47336    # Include file found, let's continue the sanity check.
47337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47338$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47339
47340    # Reset to default value
47341    FREETYPE_BASE_NAME=freetype
47342    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47343    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47344      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47345          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47346        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47347        # for the .6 version explicitly.
47348        FREETYPE_BASE_NAME=freetype.6
47349        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47350        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47351$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47352      else
47353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47354$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47355        FOUND_FREETYPE=no
47356      fi
47357    else
47358      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47359        # On Windows, we will need both .lib and .dll file.
47360        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47361          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47362$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47363          FOUND_FREETYPE=no
47364        fi
47365      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47367        # Found lib in isa dir, use that instead.
47368        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47369        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47370$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47371      fi
47372    fi
47373  fi
47374
47375  if test "x$FOUND_FREETYPE" = xyes; then
47376
47377  # Only process if variable expands to non-empty
47378
47379  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47381
47382  # Input might be given as Windows format, start by converting to
47383  # unix format.
47384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47385  new_path=`$CYGPATH -u "$path"`
47386
47387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47390  # "foo.exe" is OK but "foo" is an error.
47391  #
47392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47393  # It is also a way to make sure we got the proper file name for the real test later on.
47394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47395  if test "x$test_shortpath" = x; then
47396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47398    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47399  fi
47400
47401  # Call helper function which possibly converts this using DOS-style short mode.
47402  # If so, the updated path is stored in $new_path.
47403
47404  input_path="$new_path"
47405  # Check if we need to convert this using DOS-style short mode. If the path
47406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47407  # take no chances and rewrite it.
47408  # Note: m4 eats our [], so we need to use [ and ] instead.
47409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47410  if test "x$has_forbidden_chars" != x; then
47411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47415      # Going to short mode and back again did indeed matter. Since short mode is
47416      # case insensitive, let's make it lowercase to improve readability.
47417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47418      # Now convert it back to Unix-style (cygpath)
47419      input_path=`$CYGPATH -u "$shortmode_path"`
47420      new_path="$input_path"
47421    fi
47422  fi
47423
47424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47425  if test "x$test_cygdrive_prefix" = x; then
47426    # As a simple fix, exclude /usr/bin since it's not a real path.
47427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47429      # a path prefixed by /cygdrive for fixpath to work.
47430      new_path="$CYGWIN_ROOT_PATH$input_path"
47431    fi
47432  fi
47433
47434
47435  if test "x$path" != "x$new_path"; then
47436    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47439  fi
47440
47441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47442
47443  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47444  has_colon=`$ECHO $path | $GREP ^.:`
47445  new_path="$path"
47446  if test "x$has_colon" = x; then
47447    # Not in mixed or Windows style, start by that.
47448    new_path=`cmd //c echo $path`
47449  fi
47450
47451
47452  input_path="$new_path"
47453  # Check if we need to convert this using DOS-style short mode. If the path
47454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47455  # take no chances and rewrite it.
47456  # Note: m4 eats our [], so we need to use [ and ] instead.
47457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47458  if test "x$has_forbidden_chars" != x; then
47459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47461  fi
47462
47463
47464  windows_path="$new_path"
47465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47466    unix_path=`$CYGPATH -u "$windows_path"`
47467    new_path="$unix_path"
47468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47470    new_path="$unix_path"
47471  fi
47472
47473  if test "x$path" != "x$new_path"; then
47474    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47477  fi
47478
47479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47481
47482    else
47483      # We're on a unix platform. Hooray! :)
47484      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47485      has_space=`$ECHO "$path" | $GREP " "`
47486      if test "x$has_space" != x; then
47487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47490      fi
47491
47492      # Use eval to expand a potential ~
47493      eval path="$path"
47494      if test ! -f "$path" && test ! -d "$path"; then
47495        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47496      fi
47497
47498      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47499    fi
47500  fi
47501
47502
47503  # Only process if variable expands to non-empty
47504
47505  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47507
47508  # Input might be given as Windows format, start by converting to
47509  # unix format.
47510  path="$POTENTIAL_FREETYPE_LIB_PATH"
47511  new_path=`$CYGPATH -u "$path"`
47512
47513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47516  # "foo.exe" is OK but "foo" is an error.
47517  #
47518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47519  # It is also a way to make sure we got the proper file name for the real test later on.
47520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47521  if test "x$test_shortpath" = x; then
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47525  fi
47526
47527  # Call helper function which possibly converts this using DOS-style short mode.
47528  # If so, the updated path is stored in $new_path.
47529
47530  input_path="$new_path"
47531  # Check if we need to convert this using DOS-style short mode. If the path
47532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47533  # take no chances and rewrite it.
47534  # Note: m4 eats our [], so we need to use [ and ] instead.
47535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47536  if test "x$has_forbidden_chars" != x; then
47537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47541      # Going to short mode and back again did indeed matter. Since short mode is
47542      # case insensitive, let's make it lowercase to improve readability.
47543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47544      # Now convert it back to Unix-style (cygpath)
47545      input_path=`$CYGPATH -u "$shortmode_path"`
47546      new_path="$input_path"
47547    fi
47548  fi
47549
47550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47551  if test "x$test_cygdrive_prefix" = x; then
47552    # As a simple fix, exclude /usr/bin since it's not a real path.
47553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47555      # a path prefixed by /cygdrive for fixpath to work.
47556      new_path="$CYGWIN_ROOT_PATH$input_path"
47557    fi
47558  fi
47559
47560
47561  if test "x$path" != "x$new_path"; then
47562    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47565  fi
47566
47567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47568
47569  path="$POTENTIAL_FREETYPE_LIB_PATH"
47570  has_colon=`$ECHO $path | $GREP ^.:`
47571  new_path="$path"
47572  if test "x$has_colon" = x; then
47573    # Not in mixed or Windows style, start by that.
47574    new_path=`cmd //c echo $path`
47575  fi
47576
47577
47578  input_path="$new_path"
47579  # Check if we need to convert this using DOS-style short mode. If the path
47580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47581  # take no chances and rewrite it.
47582  # Note: m4 eats our [], so we need to use [ and ] instead.
47583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47584  if test "x$has_forbidden_chars" != x; then
47585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47587  fi
47588
47589
47590  windows_path="$new_path"
47591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47592    unix_path=`$CYGPATH -u "$windows_path"`
47593    new_path="$unix_path"
47594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47596    new_path="$unix_path"
47597  fi
47598
47599  if test "x$path" != "x$new_path"; then
47600    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47603  fi
47604
47605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47607
47608    else
47609      # We're on a unix platform. Hooray! :)
47610      path="$POTENTIAL_FREETYPE_LIB_PATH"
47611      has_space=`$ECHO "$path" | $GREP " "`
47612      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
47616      fi
47617
47618      # Use eval to expand a potential ~
47619      eval path="$path"
47620      if test ! -f "$path" && test ! -d "$path"; then
47621        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47622      fi
47623
47624      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47625    fi
47626  fi
47627
47628
47629    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47631$as_echo_n "checking for freetype includes... " >&6; }
47632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47633$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47634    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47636$as_echo_n "checking for freetype libraries... " >&6; }
47637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47638$as_echo "$FREETYPE_LIB_PATH" >&6; }
47639  fi
47640
47641            else
47642
47643  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47644  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47645  METHOD="well-known location"
47646
47647  # Let's start with an optimistic view of the world :-)
47648  FOUND_FREETYPE=yes
47649
47650  # First look for the canonical freetype main include file ft2build.h.
47651  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47652    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47653    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47654    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47655      # Fail.
47656      FOUND_FREETYPE=no
47657    fi
47658  fi
47659
47660  if test "x$FOUND_FREETYPE" = xyes; then
47661    # Include file found, let's continue the sanity check.
47662    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47663$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47664
47665    # Reset to default value
47666    FREETYPE_BASE_NAME=freetype
47667    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47668    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47669      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47670          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47671        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47672        # for the .6 version explicitly.
47673        FREETYPE_BASE_NAME=freetype.6
47674        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47675        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47676$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47677      else
47678        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47679$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47680        FOUND_FREETYPE=no
47681      fi
47682    else
47683      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47684        # On Windows, we will need both .lib and .dll file.
47685        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47686          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47687$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47688          FOUND_FREETYPE=no
47689        fi
47690      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47691          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47692        # Found lib in isa dir, use that instead.
47693        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47694        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47695$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47696      fi
47697    fi
47698  fi
47699
47700  if test "x$FOUND_FREETYPE" = xyes; then
47701
47702  # Only process if variable expands to non-empty
47703
47704  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47706
47707  # Input might be given as Windows format, start by converting to
47708  # unix format.
47709  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47710  new_path=`$CYGPATH -u "$path"`
47711
47712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47715  # "foo.exe" is OK but "foo" is an error.
47716  #
47717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47718  # It is also a way to make sure we got the proper file name for the real test later on.
47719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47720  if test "x$test_shortpath" = x; then
47721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47723    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47724  fi
47725
47726  # Call helper function which possibly converts this using DOS-style short mode.
47727  # If so, the updated path is stored in $new_path.
47728
47729  input_path="$new_path"
47730  # Check if we need to convert this using DOS-style short mode. If the path
47731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47732  # take no chances and rewrite it.
47733  # Note: m4 eats our [], so we need to use [ and ] instead.
47734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47735  if test "x$has_forbidden_chars" != x; then
47736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47740      # Going to short mode and back again did indeed matter. Since short mode is
47741      # case insensitive, let's make it lowercase to improve readability.
47742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47743      # Now convert it back to Unix-style (cygpath)
47744      input_path=`$CYGPATH -u "$shortmode_path"`
47745      new_path="$input_path"
47746    fi
47747  fi
47748
47749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47750  if test "x$test_cygdrive_prefix" = x; then
47751    # As a simple fix, exclude /usr/bin since it's not a real path.
47752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47754      # a path prefixed by /cygdrive for fixpath to work.
47755      new_path="$CYGWIN_ROOT_PATH$input_path"
47756    fi
47757  fi
47758
47759
47760  if test "x$path" != "x$new_path"; then
47761    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47764  fi
47765
47766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47767
47768  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47769  has_colon=`$ECHO $path | $GREP ^.:`
47770  new_path="$path"
47771  if test "x$has_colon" = x; then
47772    # Not in mixed or Windows style, start by that.
47773    new_path=`cmd //c echo $path`
47774  fi
47775
47776
47777  input_path="$new_path"
47778  # Check if we need to convert this using DOS-style short mode. If the path
47779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47780  # take no chances and rewrite it.
47781  # Note: m4 eats our [], so we need to use [ and ] instead.
47782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47783  if test "x$has_forbidden_chars" != x; then
47784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47786  fi
47787
47788
47789  windows_path="$new_path"
47790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47791    unix_path=`$CYGPATH -u "$windows_path"`
47792    new_path="$unix_path"
47793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47795    new_path="$unix_path"
47796  fi
47797
47798  if test "x$path" != "x$new_path"; then
47799    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47802  fi
47803
47804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47806
47807    else
47808      # We're on a unix platform. Hooray! :)
47809      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47810      has_space=`$ECHO "$path" | $GREP " "`
47811      if test "x$has_space" != x; then
47812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47813$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47815      fi
47816
47817      # Use eval to expand a potential ~
47818      eval path="$path"
47819      if test ! -f "$path" && test ! -d "$path"; then
47820        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47821      fi
47822
47823      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47824    fi
47825  fi
47826
47827
47828  # Only process if variable expands to non-empty
47829
47830  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47832
47833  # Input might be given as Windows format, start by converting to
47834  # unix format.
47835  path="$POTENTIAL_FREETYPE_LIB_PATH"
47836  new_path=`$CYGPATH -u "$path"`
47837
47838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47841  # "foo.exe" is OK but "foo" is an error.
47842  #
47843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47844  # It is also a way to make sure we got the proper file name for the real test later on.
47845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47846  if test "x$test_shortpath" = x; then
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47850  fi
47851
47852  # Call helper function which possibly converts this using DOS-style short mode.
47853  # If so, the updated path is stored in $new_path.
47854
47855  input_path="$new_path"
47856  # Check if we need to convert this using DOS-style short mode. If the path
47857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47858  # take no chances and rewrite it.
47859  # Note: m4 eats our [], so we need to use [ and ] instead.
47860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47861  if test "x$has_forbidden_chars" != x; then
47862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47866      # Going to short mode and back again did indeed matter. Since short mode is
47867      # case insensitive, let's make it lowercase to improve readability.
47868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47869      # Now convert it back to Unix-style (cygpath)
47870      input_path=`$CYGPATH -u "$shortmode_path"`
47871      new_path="$input_path"
47872    fi
47873  fi
47874
47875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47876  if test "x$test_cygdrive_prefix" = x; then
47877    # As a simple fix, exclude /usr/bin since it's not a real path.
47878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47880      # a path prefixed by /cygdrive for fixpath to work.
47881      new_path="$CYGWIN_ROOT_PATH$input_path"
47882    fi
47883  fi
47884
47885
47886  if test "x$path" != "x$new_path"; then
47887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47890  fi
47891
47892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47893
47894  path="$POTENTIAL_FREETYPE_LIB_PATH"
47895  has_colon=`$ECHO $path | $GREP ^.:`
47896  new_path="$path"
47897  if test "x$has_colon" = x; then
47898    # Not in mixed or Windows style, start by that.
47899    new_path=`cmd //c echo $path`
47900  fi
47901
47902
47903  input_path="$new_path"
47904  # Check if we need to convert this using DOS-style short mode. If the path
47905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47906  # take no chances and rewrite it.
47907  # Note: m4 eats our [], so we need to use [ and ] instead.
47908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47909  if test "x$has_forbidden_chars" != x; then
47910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47912  fi
47913
47914
47915  windows_path="$new_path"
47916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47917    unix_path=`$CYGPATH -u "$windows_path"`
47918    new_path="$unix_path"
47919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47921    new_path="$unix_path"
47922  fi
47923
47924  if test "x$path" != "x$new_path"; then
47925    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47928  fi
47929
47930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47932
47933    else
47934      # We're on a unix platform. Hooray! :)
47935      path="$POTENTIAL_FREETYPE_LIB_PATH"
47936      has_space=`$ECHO "$path" | $GREP " "`
47937      if test "x$has_space" != x; then
47938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47941      fi
47942
47943      # Use eval to expand a potential ~
47944      eval path="$path"
47945      if test ! -f "$path" && test ! -d "$path"; then
47946        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47947      fi
47948
47949      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47950    fi
47951  fi
47952
47953
47954    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47956$as_echo_n "checking for freetype includes... " >&6; }
47957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47958$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47959    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47961$as_echo_n "checking for freetype libraries... " >&6; }
47962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47963$as_echo "$FREETYPE_LIB_PATH" >&6; }
47964  fi
47965
47966              if test "x$FOUND_FREETYPE" != xyes; then
47967
47968  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47969  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47970  METHOD="well-known location"
47971
47972  # Let's start with an optimistic view of the world :-)
47973  FOUND_FREETYPE=yes
47974
47975  # First look for the canonical freetype main include file ft2build.h.
47976  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47977    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47978    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47979    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47980      # Fail.
47981      FOUND_FREETYPE=no
47982    fi
47983  fi
47984
47985  if test "x$FOUND_FREETYPE" = xyes; then
47986    # Include file found, let's continue the sanity check.
47987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47988$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47989
47990    # Reset to default value
47991    FREETYPE_BASE_NAME=freetype
47992    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47993    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47994      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47995          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47996        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47997        # for the .6 version explicitly.
47998        FREETYPE_BASE_NAME=freetype.6
47999        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48000        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48001$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48002      else
48003        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48004$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48005        FOUND_FREETYPE=no
48006      fi
48007    else
48008      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48009        # On Windows, we will need both .lib and .dll file.
48010        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48011          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48012$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48013          FOUND_FREETYPE=no
48014        fi
48015      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48017        # Found lib in isa dir, use that instead.
48018        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48019        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48020$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48021      fi
48022    fi
48023  fi
48024
48025  if test "x$FOUND_FREETYPE" = xyes; then
48026
48027  # Only process if variable expands to non-empty
48028
48029  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48031
48032  # Input might be given as Windows format, start by converting to
48033  # unix format.
48034  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48035  new_path=`$CYGPATH -u "$path"`
48036
48037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48040  # "foo.exe" is OK but "foo" is an error.
48041  #
48042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48043  # It is also a way to make sure we got the proper file name for the real test later on.
48044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48045  if test "x$test_shortpath" = x; then
48046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48048    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48049  fi
48050
48051  # Call helper function which possibly converts this using DOS-style short mode.
48052  # If so, the updated path is stored in $new_path.
48053
48054  input_path="$new_path"
48055  # Check if we need to convert this using DOS-style short mode. If the path
48056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48057  # take no chances and rewrite it.
48058  # Note: m4 eats our [], so we need to use [ and ] instead.
48059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48060  if test "x$has_forbidden_chars" != x; then
48061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48065      # Going to short mode and back again did indeed matter. Since short mode is
48066      # case insensitive, let's make it lowercase to improve readability.
48067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48068      # Now convert it back to Unix-style (cygpath)
48069      input_path=`$CYGPATH -u "$shortmode_path"`
48070      new_path="$input_path"
48071    fi
48072  fi
48073
48074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48075  if test "x$test_cygdrive_prefix" = x; then
48076    # As a simple fix, exclude /usr/bin since it's not a real path.
48077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48079      # a path prefixed by /cygdrive for fixpath to work.
48080      new_path="$CYGWIN_ROOT_PATH$input_path"
48081    fi
48082  fi
48083
48084
48085  if test "x$path" != "x$new_path"; then
48086    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48089  fi
48090
48091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48092
48093  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48094  has_colon=`$ECHO $path | $GREP ^.:`
48095  new_path="$path"
48096  if test "x$has_colon" = x; then
48097    # Not in mixed or Windows style, start by that.
48098    new_path=`cmd //c echo $path`
48099  fi
48100
48101
48102  input_path="$new_path"
48103  # Check if we need to convert this using DOS-style short mode. If the path
48104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48105  # take no chances and rewrite it.
48106  # Note: m4 eats our [], so we need to use [ and ] instead.
48107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48108  if test "x$has_forbidden_chars" != x; then
48109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48111  fi
48112
48113
48114  windows_path="$new_path"
48115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48116    unix_path=`$CYGPATH -u "$windows_path"`
48117    new_path="$unix_path"
48118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48120    new_path="$unix_path"
48121  fi
48122
48123  if test "x$path" != "x$new_path"; then
48124    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48127  fi
48128
48129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48131
48132    else
48133      # We're on a unix platform. Hooray! :)
48134      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48135      has_space=`$ECHO "$path" | $GREP " "`
48136      if test "x$has_space" != x; then
48137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48140      fi
48141
48142      # Use eval to expand a potential ~
48143      eval path="$path"
48144      if test ! -f "$path" && test ! -d "$path"; then
48145        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48146      fi
48147
48148      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48149    fi
48150  fi
48151
48152
48153  # Only process if variable expands to non-empty
48154
48155  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48157
48158  # Input might be given as Windows format, start by converting to
48159  # unix format.
48160  path="$POTENTIAL_FREETYPE_LIB_PATH"
48161  new_path=`$CYGPATH -u "$path"`
48162
48163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48166  # "foo.exe" is OK but "foo" is an error.
48167  #
48168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48169  # It is also a way to make sure we got the proper file name for the real test later on.
48170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48171  if test "x$test_shortpath" = x; then
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48174    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48175  fi
48176
48177  # Call helper function which possibly converts this using DOS-style short mode.
48178  # If so, the updated path is stored in $new_path.
48179
48180  input_path="$new_path"
48181  # Check if we need to convert this using DOS-style short mode. If the path
48182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48183  # take no chances and rewrite it.
48184  # Note: m4 eats our [], so we need to use [ and ] instead.
48185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48186  if test "x$has_forbidden_chars" != x; then
48187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48191      # Going to short mode and back again did indeed matter. Since short mode is
48192      # case insensitive, let's make it lowercase to improve readability.
48193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48194      # Now convert it back to Unix-style (cygpath)
48195      input_path=`$CYGPATH -u "$shortmode_path"`
48196      new_path="$input_path"
48197    fi
48198  fi
48199
48200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48201  if test "x$test_cygdrive_prefix" = x; then
48202    # As a simple fix, exclude /usr/bin since it's not a real path.
48203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48205      # a path prefixed by /cygdrive for fixpath to work.
48206      new_path="$CYGWIN_ROOT_PATH$input_path"
48207    fi
48208  fi
48209
48210
48211  if test "x$path" != "x$new_path"; then
48212    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48215  fi
48216
48217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48218
48219  path="$POTENTIAL_FREETYPE_LIB_PATH"
48220  has_colon=`$ECHO $path | $GREP ^.:`
48221  new_path="$path"
48222  if test "x$has_colon" = x; then
48223    # Not in mixed or Windows style, start by that.
48224    new_path=`cmd //c echo $path`
48225  fi
48226
48227
48228  input_path="$new_path"
48229  # Check if we need to convert this using DOS-style short mode. If the path
48230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48231  # take no chances and rewrite it.
48232  # Note: m4 eats our [], so we need to use [ and ] instead.
48233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48234  if test "x$has_forbidden_chars" != x; then
48235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48237  fi
48238
48239
48240  windows_path="$new_path"
48241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48242    unix_path=`$CYGPATH -u "$windows_path"`
48243    new_path="$unix_path"
48244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48246    new_path="$unix_path"
48247  fi
48248
48249  if test "x$path" != "x$new_path"; then
48250    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48253  fi
48254
48255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48257
48258    else
48259      # We're on a unix platform. Hooray! :)
48260      path="$POTENTIAL_FREETYPE_LIB_PATH"
48261      has_space=`$ECHO "$path" | $GREP " "`
48262      if test "x$has_space" != x; then
48263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48266      fi
48267
48268      # Use eval to expand a potential ~
48269      eval path="$path"
48270      if test ! -f "$path" && test ! -d "$path"; then
48271        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48272      fi
48273
48274      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48275    fi
48276  fi
48277
48278
48279    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48281$as_echo_n "checking for freetype includes... " >&6; }
48282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48283$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48284    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48286$as_echo_n "checking for freetype libraries... " >&6; }
48287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48288$as_echo "$FREETYPE_LIB_PATH" >&6; }
48289  fi
48290
48291              fi
48292            fi
48293          fi
48294        fi
48295      fi # end check in well-known locations
48296
48297      if test "x$FOUND_FREETYPE" != xyes; then
48298
48299  # Print a helpful message on how to acquire the necessary build dependency.
48300  # freetype is the help tag: freetype, cups, pulse, alsa etc
48301  MISSING_DEPENDENCY=freetype
48302
48303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48304    cygwin_help $MISSING_DEPENDENCY
48305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48306    msys_help $MISSING_DEPENDENCY
48307  else
48308    PKGHANDLER_COMMAND=
48309
48310    case $PKGHANDLER in
48311      apt-get)
48312        apt_help     $MISSING_DEPENDENCY ;;
48313      yum)
48314        yum_help     $MISSING_DEPENDENCY ;;
48315      port)
48316        port_help    $MISSING_DEPENDENCY ;;
48317      pkgutil)
48318        pkgutil_help $MISSING_DEPENDENCY ;;
48319      pkgadd)
48320        pkgadd_help  $MISSING_DEPENDENCY ;;
48321    esac
48322
48323    if test "x$PKGHANDLER_COMMAND" != x; then
48324      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48325    fi
48326  fi
48327
48328        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48329      fi
48330    fi # end user specified settings
48331
48332    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48333    if test "x$FREETYPE_CFLAGS" = x; then
48334
48335  # Only process if variable expands to non-empty
48336
48337  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48339
48340  # Input might be given as Windows format, start by converting to
48341  # unix format.
48342  path="$FREETYPE_INCLUDE_PATH"
48343  new_path=`$CYGPATH -u "$path"`
48344
48345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48348  # "foo.exe" is OK but "foo" is an error.
48349  #
48350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48351  # It is also a way to make sure we got the proper file name for the real test later on.
48352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48353  if test "x$test_shortpath" = x; then
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48355$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48356    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48357  fi
48358
48359  # Call helper function which possibly converts this using DOS-style short mode.
48360  # If so, the updated path is stored in $new_path.
48361
48362  input_path="$new_path"
48363  # Check if we need to convert this using DOS-style short mode. If the path
48364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48365  # take no chances and rewrite it.
48366  # Note: m4 eats our [], so we need to use [ and ] instead.
48367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48368  if test "x$has_forbidden_chars" != x; then
48369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48373      # Going to short mode and back again did indeed matter. Since short mode is
48374      # case insensitive, let's make it lowercase to improve readability.
48375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48376      # Now convert it back to Unix-style (cygpath)
48377      input_path=`$CYGPATH -u "$shortmode_path"`
48378      new_path="$input_path"
48379    fi
48380  fi
48381
48382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48383  if test "x$test_cygdrive_prefix" = x; then
48384    # As a simple fix, exclude /usr/bin since it's not a real path.
48385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48387      # a path prefixed by /cygdrive for fixpath to work.
48388      new_path="$CYGWIN_ROOT_PATH$input_path"
48389    fi
48390  fi
48391
48392
48393  if test "x$path" != "x$new_path"; then
48394    FREETYPE_INCLUDE_PATH="$new_path"
48395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48396$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48397  fi
48398
48399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48400
48401  path="$FREETYPE_INCLUDE_PATH"
48402  has_colon=`$ECHO $path | $GREP ^.:`
48403  new_path="$path"
48404  if test "x$has_colon" = x; then
48405    # Not in mixed or Windows style, start by that.
48406    new_path=`cmd //c echo $path`
48407  fi
48408
48409
48410  input_path="$new_path"
48411  # Check if we need to convert this using DOS-style short mode. If the path
48412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48413  # take no chances and rewrite it.
48414  # Note: m4 eats our [], so we need to use [ and ] instead.
48415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48416  if test "x$has_forbidden_chars" != x; then
48417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48419  fi
48420
48421
48422  windows_path="$new_path"
48423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48424    unix_path=`$CYGPATH -u "$windows_path"`
48425    new_path="$unix_path"
48426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48428    new_path="$unix_path"
48429  fi
48430
48431  if test "x$path" != "x$new_path"; then
48432    FREETYPE_INCLUDE_PATH="$new_path"
48433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48434$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48435  fi
48436
48437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48439
48440    else
48441      # We're on a unix platform. Hooray! :)
48442      path="$FREETYPE_INCLUDE_PATH"
48443      has_space=`$ECHO "$path" | $GREP " "`
48444      if test "x$has_space" != x; then
48445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48446$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48448      fi
48449
48450      # Use eval to expand a potential ~
48451      eval path="$path"
48452      if test ! -f "$path" && test ! -d "$path"; then
48453        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48454      fi
48455
48456      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48457    fi
48458  fi
48459
48460      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48461        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48462      else
48463        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48464      fi
48465    fi
48466
48467    if test "x$FREETYPE_LIBS" = x; then
48468
48469  # Only process if variable expands to non-empty
48470
48471  if test "x$FREETYPE_LIB_PATH" != x; then
48472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48473
48474  # Input might be given as Windows format, start by converting to
48475  # unix format.
48476  path="$FREETYPE_LIB_PATH"
48477  new_path=`$CYGPATH -u "$path"`
48478
48479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48482  # "foo.exe" is OK but "foo" is an error.
48483  #
48484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48485  # It is also a way to make sure we got the proper file name for the real test later on.
48486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48487  if test "x$test_shortpath" = x; then
48488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48489$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48490    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48491  fi
48492
48493  # Call helper function which possibly converts this using DOS-style short mode.
48494  # If so, the updated path is stored in $new_path.
48495
48496  input_path="$new_path"
48497  # Check if we need to convert this using DOS-style short mode. If the path
48498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48499  # take no chances and rewrite it.
48500  # Note: m4 eats our [], so we need to use [ and ] instead.
48501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48502  if test "x$has_forbidden_chars" != x; then
48503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48507      # Going to short mode and back again did indeed matter. Since short mode is
48508      # case insensitive, let's make it lowercase to improve readability.
48509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48510      # Now convert it back to Unix-style (cygpath)
48511      input_path=`$CYGPATH -u "$shortmode_path"`
48512      new_path="$input_path"
48513    fi
48514  fi
48515
48516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48517  if test "x$test_cygdrive_prefix" = x; then
48518    # As a simple fix, exclude /usr/bin since it's not a real path.
48519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48521      # a path prefixed by /cygdrive for fixpath to work.
48522      new_path="$CYGWIN_ROOT_PATH$input_path"
48523    fi
48524  fi
48525
48526
48527  if test "x$path" != "x$new_path"; then
48528    FREETYPE_LIB_PATH="$new_path"
48529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48530$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48531  fi
48532
48533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48534
48535  path="$FREETYPE_LIB_PATH"
48536  has_colon=`$ECHO $path | $GREP ^.:`
48537  new_path="$path"
48538  if test "x$has_colon" = x; then
48539    # Not in mixed or Windows style, start by that.
48540    new_path=`cmd //c echo $path`
48541  fi
48542
48543
48544  input_path="$new_path"
48545  # Check if we need to convert this using DOS-style short mode. If the path
48546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48547  # take no chances and rewrite it.
48548  # Note: m4 eats our [], so we need to use [ and ] instead.
48549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48550  if test "x$has_forbidden_chars" != x; then
48551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48553  fi
48554
48555
48556  windows_path="$new_path"
48557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48558    unix_path=`$CYGPATH -u "$windows_path"`
48559    new_path="$unix_path"
48560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48562    new_path="$unix_path"
48563  fi
48564
48565  if test "x$path" != "x$new_path"; then
48566    FREETYPE_LIB_PATH="$new_path"
48567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48568$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48569  fi
48570
48571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48573
48574    else
48575      # We're on a unix platform. Hooray! :)
48576      path="$FREETYPE_LIB_PATH"
48577      has_space=`$ECHO "$path" | $GREP " "`
48578      if test "x$has_space" != x; then
48579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48580$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48582      fi
48583
48584      # Use eval to expand a potential ~
48585      eval path="$path"
48586      if test ! -f "$path" && test ! -d "$path"; then
48587        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48588      fi
48589
48590      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48591    fi
48592  fi
48593
48594      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48595        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48596      else
48597        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48598      fi
48599    fi
48600
48601    # Try to compile it
48602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48603$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48604    ac_ext=cpp
48605ac_cpp='$CXXCPP $CPPFLAGS'
48606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48609
48610    PREV_CXXCFLAGS="$CXXFLAGS"
48611    PREV_LIBS="$LIBS"
48612    PREV_CXX="$CXX"
48613    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48614    LIBS="$LIBS $FREETYPE_LIBS"
48615    CXX="$FIXPATH $CXX"
48616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48617/* end confdefs.h.  */
48618
48619          #include<ft2build.h>
48620          #include FT_FREETYPE_H
48621          int main () {
48622            FT_Init_FreeType(NULL);
48623            return 0;
48624          }
48625
48626_ACEOF
48627if ac_fn_cxx_try_link "$LINENO"; then :
48628
48629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48630$as_echo "yes" >&6; }
48631
48632else
48633
48634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48635$as_echo "no" >&6; }
48636          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48637$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48638          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48639$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48640
48641
48642  # Print a helpful message on how to acquire the necessary build dependency.
48643  # freetype is the help tag: freetype, cups, pulse, alsa etc
48644  MISSING_DEPENDENCY=freetype
48645
48646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48647    cygwin_help $MISSING_DEPENDENCY
48648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48649    msys_help $MISSING_DEPENDENCY
48650  else
48651    PKGHANDLER_COMMAND=
48652
48653    case $PKGHANDLER in
48654      apt-get)
48655        apt_help     $MISSING_DEPENDENCY ;;
48656      yum)
48657        yum_help     $MISSING_DEPENDENCY ;;
48658      port)
48659        port_help    $MISSING_DEPENDENCY ;;
48660      pkgutil)
48661        pkgutil_help $MISSING_DEPENDENCY ;;
48662      pkgadd)
48663        pkgadd_help  $MISSING_DEPENDENCY ;;
48664    esac
48665
48666    if test "x$PKGHANDLER_COMMAND" != x; then
48667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48668    fi
48669  fi
48670
48671
48672          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48673
48674
48675fi
48676rm -f core conftest.err conftest.$ac_objext \
48677    conftest$ac_exeext conftest.$ac_ext
48678    CXXCFLAGS="$PREV_CXXFLAGS"
48679    LIBS="$PREV_LIBS"
48680    CXX="$PREV_CXX"
48681    ac_ext=cpp
48682ac_cpp='$CXXCPP $CPPFLAGS'
48683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48686
48687
48688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48689$as_echo_n "checking if we should bundle freetype... " >&6; }
48690    if test "x$BUNDLE_FREETYPE" = xyes; then
48691      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48692    fi
48693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48694$as_echo "$BUNDLE_FREETYPE" >&6; }
48695
48696  fi # end freetype needed
48697
48698
48699
48700
48701
48702
48703
48704  ###############################################################################
48705  #
48706  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48707  #
48708
48709# Check whether --with-alsa was given.
48710if test "${with_alsa+set}" = set; then :
48711  withval=$with_alsa;
48712fi
48713
48714
48715# Check whether --with-alsa-include was given.
48716if test "${with_alsa_include+set}" = set; then :
48717  withval=$with_alsa_include;
48718fi
48719
48720
48721# Check whether --with-alsa-lib was given.
48722if test "${with_alsa_lib+set}" = set; then :
48723  withval=$with_alsa_lib;
48724fi
48725
48726
48727  if test "x$ALSA_NOT_NEEDED" = xyes; then
48728    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48729      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48730$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48731    fi
48732    ALSA_CFLAGS=
48733    ALSA_LIBS=
48734  else
48735    ALSA_FOUND=no
48736
48737    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48738      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48739    fi
48740
48741    if test "x${with_alsa}" != x; then
48742      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48743      ALSA_CFLAGS="-I${with_alsa}/include"
48744      ALSA_FOUND=yes
48745    fi
48746    if test "x${with_alsa_include}" != x; then
48747      ALSA_CFLAGS="-I${with_alsa_include}"
48748      ALSA_FOUND=yes
48749    fi
48750    if test "x${with_alsa_lib}" != x; then
48751      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48752      ALSA_FOUND=yes
48753    fi
48754    if test "x$ALSA_FOUND" = xno; then
48755
48756
48757  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48758    # Source the builddeps file again, to make sure it uses the latest variables!
48759    . $builddepsfile
48760    # Look for a target and build machine specific resource!
48761    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48762    if test "x$resource" = x; then
48763      # Ok, lets instead look for a target specific resource
48764      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48765    fi
48766    if test "x$resource" = x; then
48767      # Ok, lets instead look for a build specific resource
48768      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48769    fi
48770    if test "x$resource" = x; then
48771      # Ok, lets instead look for a generic resource
48772      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48773      resource=${builddep_alsa}
48774    fi
48775    if test "x$resource" != x; then
48776      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48777$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48778      # If the resource in the builddeps.conf file is an existing directory,
48779      # for example /java/linux/cups
48780      if test -d ${resource}; then
48781        depdir=${resource}
48782      else
48783
48784  # alsa is for example mymodule
48785  # $resource is for example libs/general/libmymod_1_2_3.zip
48786  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48787  # $with_builddeps_dir is for example /localhome/builddeps
48788  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48789  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48790  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48791  filename=`basename $resource`
48792  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48793  filebase=${filename%%.*}
48794  extension=${filename#*.}
48795  installdir=$with_builddeps_dir/$filebase
48796  if test ! -f $installdir/$filename.unpacked; then
48797    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48798$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48799    if test ! -d $installdir; then
48800      mkdir -p $installdir
48801    fi
48802    if test ! -d $installdir; then
48803      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48804    fi
48805    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48806    touch $tmpfile
48807    if test ! -f $tmpfile; then
48808      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48809    fi
48810
48811  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48812  # $tmpfile is the local file name for the downloaded file.
48813  VALID_TOOL=no
48814  if test "x$BDEPS_FTP" = xwget; then
48815    VALID_TOOL=yes
48816    wget -O $tmpfile $with_builddeps_server/$resource
48817  fi
48818  if test "x$BDEPS_FTP" = xlftp; then
48819    VALID_TOOL=yes
48820    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48821  fi
48822  if test "x$BDEPS_FTP" = xftp; then
48823    VALID_TOOL=yes
48824    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48825    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48826    FTPUSERPWD=${FTPSERVER%%@*}
48827    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48828      FTPUSER=${userpwd%%:*}
48829      FTPPWD=${userpwd#*@}
48830      FTPSERVER=${FTPSERVER#*@}
48831    else
48832      FTPUSER=ftp
48833      FTPPWD=ftp
48834    fi
48835    # the "pass" command does not work on some
48836    # ftp clients (read ftp.exe) but if it works,
48837    # passive mode is better!
48838    ( \
48839        echo "user $FTPUSER $FTPPWD"        ; \
48840        echo "pass"                         ; \
48841        echo "bin"                          ; \
48842        echo "get $FTPPATH $tmpfile"              ; \
48843    ) | ftp -in $FTPSERVER
48844  fi
48845  if test "x$VALID_TOOL" != xyes; then
48846    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48847  fi
48848
48849    mv $tmpfile $installdir/$filename
48850    if test ! -s $installdir/$filename; then
48851      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48852    fi
48853    case "$extension" in
48854      zip)  echo "Unzipping $installdir/$filename..."
48855        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48856        ;;
48857      tar.gz) echo "Untaring $installdir/$filename..."
48858        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48859        ;;
48860      tgz) echo "Untaring $installdir/$filename..."
48861        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48862        ;;
48863      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48864        ;;
48865    esac
48866  fi
48867  if test -f $installdir/$filename.unpacked; then
48868    depdir=$installdir
48869  fi
48870
48871      fi
48872      # Source the builddeps file again, because in the previous command, the depdir
48873      # was updated to point at the current build dependency install directory.
48874      . $builddepsfile
48875      # Now extract variables from the builddeps.conf files.
48876      theroot=${builddep_alsa_ROOT}
48877      thecflags=${builddep_alsa_CFLAGS}
48878      thelibs=${builddep_alsa_LIBS}
48879      if test "x$depdir" = x; then
48880        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48881      fi
48882      ALSA=$depdir
48883      if test "x$theroot" != x; then
48884        ALSA="$theroot"
48885      fi
48886      if test "x$thecflags" != x; then
48887        ALSA_CFLAGS="$thecflags"
48888      fi
48889      if test "x$thelibs" != x; then
48890        ALSA_LIBS="$thelibs"
48891      fi
48892      ALSA_FOUND=yes
48893      else ALSA_FOUND=no
48894
48895    fi
48896    else ALSA_FOUND=no
48897
48898  fi
48899
48900    fi
48901    # Do not try pkg-config if we have a sysroot set.
48902    if test "x$SYSROOT" = x; then
48903      if test "x$ALSA_FOUND" = xno; then
48904
48905pkg_failed=no
48906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48907$as_echo_n "checking for ALSA... " >&6; }
48908
48909if test -n "$ALSA_CFLAGS"; then
48910    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48911 elif test -n "$PKG_CONFIG"; then
48912    if test -n "$PKG_CONFIG" && \
48913    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48914  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48915  ac_status=$?
48916  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48917  test $ac_status = 0; }; then
48918  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48919else
48920  pkg_failed=yes
48921fi
48922 else
48923    pkg_failed=untried
48924fi
48925if test -n "$ALSA_LIBS"; then
48926    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48927 elif test -n "$PKG_CONFIG"; then
48928    if test -n "$PKG_CONFIG" && \
48929    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48930  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48931  ac_status=$?
48932  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48933  test $ac_status = 0; }; then
48934  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48935else
48936  pkg_failed=yes
48937fi
48938 else
48939    pkg_failed=untried
48940fi
48941
48942
48943
48944if test $pkg_failed = yes; then
48945
48946if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48947        _pkg_short_errors_supported=yes
48948else
48949        _pkg_short_errors_supported=no
48950fi
48951        if test $_pkg_short_errors_supported = yes; then
48952	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48953        else
48954	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48955        fi
48956	# Put the nasty error message in config.log where it belongs
48957	echo "$ALSA_PKG_ERRORS" >&5
48958
48959	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48960$as_echo "no" >&6; }
48961                ALSA_FOUND=no
48962elif test $pkg_failed = untried; then
48963	ALSA_FOUND=no
48964else
48965	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48966	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48968$as_echo "yes" >&6; }
48969	ALSA_FOUND=yes
48970fi
48971      fi
48972    fi
48973    if test "x$ALSA_FOUND" = xno; then
48974      for ac_header in alsa/asoundlib.h
48975do :
48976  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48977if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48978  cat >>confdefs.h <<_ACEOF
48979#define HAVE_ALSA_ASOUNDLIB_H 1
48980_ACEOF
48981
48982            ALSA_FOUND=yes
48983            ALSA_CFLAGS=-Iignoreme
48984            ALSA_LIBS=-lasound
48985            DEFAULT_ALSA=yes
48986
48987else
48988  ALSA_FOUND=no
48989fi
48990
48991done
48992
48993    fi
48994    if test "x$ALSA_FOUND" = xno; then
48995
48996  # Print a helpful message on how to acquire the necessary build dependency.
48997  # alsa is the help tag: freetype, cups, pulse, alsa etc
48998  MISSING_DEPENDENCY=alsa
48999
49000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49001    cygwin_help $MISSING_DEPENDENCY
49002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49003    msys_help $MISSING_DEPENDENCY
49004  else
49005    PKGHANDLER_COMMAND=
49006
49007    case $PKGHANDLER in
49008      apt-get)
49009        apt_help     $MISSING_DEPENDENCY ;;
49010      yum)
49011        yum_help     $MISSING_DEPENDENCY ;;
49012      port)
49013        port_help    $MISSING_DEPENDENCY ;;
49014      pkgutil)
49015        pkgutil_help $MISSING_DEPENDENCY ;;
49016      pkgadd)
49017        pkgadd_help  $MISSING_DEPENDENCY ;;
49018    esac
49019
49020    if test "x$PKGHANDLER_COMMAND" != x; then
49021      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49022    fi
49023  fi
49024
49025      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49026    fi
49027  fi
49028
49029
49030
49031
49032
49033
49034  ###############################################################################
49035  #
49036  # Check for the jpeg library
49037  #
49038
49039
49040# Check whether --with-libjpeg was given.
49041if test "${with_libjpeg+set}" = set; then :
49042  withval=$with_libjpeg;
49043fi
49044
49045
49046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49047$as_echo_n "checking for which libjpeg to use... " >&6; }
49048
49049  # default is bundled
49050  DEFAULT_LIBJPEG=bundled
49051
49052  #
49053  # if user didn't specify, use DEFAULT_LIBJPEG
49054  #
49055  if test "x${with_libjpeg}" = "x"; then
49056    with_libjpeg=${DEFAULT_LIBJPEG}
49057  fi
49058
49059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49060$as_echo "${with_libjpeg}" >&6; }
49061
49062  if test "x${with_libjpeg}" = "xbundled"; then
49063    USE_EXTERNAL_LIBJPEG=false
49064  elif test "x${with_libjpeg}" = "xsystem"; then
49065    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49066if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49067
49068else
49069   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49070fi
49071
49072
49073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49074$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49075if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49076  $as_echo_n "(cached) " >&6
49077else
49078  ac_check_lib_save_LIBS=$LIBS
49079LIBS="-ljpeg  $LIBS"
49080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49081/* end confdefs.h.  */
49082
49083/* Override any GCC internal prototype to avoid an error.
49084   Use char because int might match the return type of a GCC
49085   builtin and then its argument prototype would still apply.  */
49086#ifdef __cplusplus
49087extern "C"
49088#endif
49089char jpeg_CreateDecompress ();
49090int
49091main ()
49092{
49093return jpeg_CreateDecompress ();
49094  ;
49095  return 0;
49096}
49097_ACEOF
49098if ac_fn_cxx_try_link "$LINENO"; then :
49099  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49100else
49101  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49102fi
49103rm -f core conftest.err conftest.$ac_objext \
49104    conftest$ac_exeext conftest.$ac_ext
49105LIBS=$ac_check_lib_save_LIBS
49106fi
49107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49108$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49109if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49110  cat >>confdefs.h <<_ACEOF
49111#define HAVE_LIBJPEG 1
49112_ACEOF
49113
49114  LIBS="-ljpeg $LIBS"
49115
49116else
49117   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49118fi
49119
49120
49121    USE_EXTERNAL_LIBJPEG=true
49122  else
49123    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49124  fi
49125
49126
49127
49128  ###############################################################################
49129  #
49130  # Check for the gif library
49131  #
49132
49133
49134# Check whether --with-giflib was given.
49135if test "${with_giflib+set}" = set; then :
49136  withval=$with_giflib;
49137fi
49138
49139
49140
49141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49142$as_echo_n "checking for which giflib to use... " >&6; }
49143
49144  # default is bundled
49145  DEFAULT_GIFLIB=bundled
49146
49147  #
49148  # if user didn't specify, use DEFAULT_GIFLIB
49149  #
49150  if test "x${with_giflib}" = "x"; then
49151    with_giflib=${DEFAULT_GIFLIB}
49152  fi
49153
49154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49155$as_echo "${with_giflib}" >&6; }
49156
49157  if test "x${with_giflib}" = "xbundled"; then
49158    USE_EXTERNAL_LIBGIF=false
49159  elif test "x${with_giflib}" = "xsystem"; then
49160    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49161if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49162
49163else
49164   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49165fi
49166
49167
49168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49169$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49170if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49171  $as_echo_n "(cached) " >&6
49172else
49173  ac_check_lib_save_LIBS=$LIBS
49174LIBS="-lgif  $LIBS"
49175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49176/* end confdefs.h.  */
49177
49178/* Override any GCC internal prototype to avoid an error.
49179   Use char because int might match the return type of a GCC
49180   builtin and then its argument prototype would still apply.  */
49181#ifdef __cplusplus
49182extern "C"
49183#endif
49184char DGifGetCode ();
49185int
49186main ()
49187{
49188return DGifGetCode ();
49189  ;
49190  return 0;
49191}
49192_ACEOF
49193if ac_fn_cxx_try_link "$LINENO"; then :
49194  ac_cv_lib_gif_DGifGetCode=yes
49195else
49196  ac_cv_lib_gif_DGifGetCode=no
49197fi
49198rm -f core conftest.err conftest.$ac_objext \
49199    conftest$ac_exeext conftest.$ac_ext
49200LIBS=$ac_check_lib_save_LIBS
49201fi
49202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49203$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49204if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49205  cat >>confdefs.h <<_ACEOF
49206#define HAVE_LIBGIF 1
49207_ACEOF
49208
49209  LIBS="-lgif $LIBS"
49210
49211else
49212   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49213fi
49214
49215
49216    USE_EXTERNAL_LIBGIF=true
49217  else
49218    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49219  fi
49220
49221
49222  ###############################################################################
49223  #
49224  # Check for the lcms2 library
49225  #
49226
49227
49228# Check whether --with-lcms was given.
49229if test "${with_lcms+set}" = set; then :
49230  withval=$with_lcms;
49231fi
49232
49233
49234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49235$as_echo_n "checking for which lcms to use... " >&6; }
49236
49237  DEFAULT_LCMS=bundled
49238
49239  #
49240  # If user didn't specify, use DEFAULT_LCMS
49241  #
49242  if test "x${with_lcms}" = "x"; then
49243      with_lcms=${DEFAULT_LCMS}
49244  fi
49245
49246  if test "x${with_lcms}" = "xbundled"; then
49247    USE_EXTERNAL_LCMS=false
49248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49249$as_echo "bundled" >&6; }
49250  elif test "x${with_lcms}" = "xsystem"; then
49251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49252$as_echo "system" >&6; }
49253
49254pkg_failed=no
49255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49256$as_echo_n "checking for LCMS... " >&6; }
49257
49258if test -n "$LCMS_CFLAGS"; then
49259    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49260 elif test -n "$PKG_CONFIG"; then
49261    if test -n "$PKG_CONFIG" && \
49262    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49263  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49264  ac_status=$?
49265  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49266  test $ac_status = 0; }; then
49267  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49268else
49269  pkg_failed=yes
49270fi
49271 else
49272    pkg_failed=untried
49273fi
49274if test -n "$LCMS_LIBS"; then
49275    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49276 elif test -n "$PKG_CONFIG"; then
49277    if test -n "$PKG_CONFIG" && \
49278    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49279  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49280  ac_status=$?
49281  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49282  test $ac_status = 0; }; then
49283  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49284else
49285  pkg_failed=yes
49286fi
49287 else
49288    pkg_failed=untried
49289fi
49290
49291
49292
49293if test $pkg_failed = yes; then
49294
49295if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49296        _pkg_short_errors_supported=yes
49297else
49298        _pkg_short_errors_supported=no
49299fi
49300        if test $_pkg_short_errors_supported = yes; then
49301	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49302        else
49303	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49304        fi
49305	# Put the nasty error message in config.log where it belongs
49306	echo "$LCMS_PKG_ERRORS" >&5
49307
49308	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49309$as_echo "no" >&6; }
49310                LCMS_FOUND=no
49311elif test $pkg_failed = untried; then
49312	LCMS_FOUND=no
49313else
49314	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49315	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49317$as_echo "yes" >&6; }
49318	LCMS_FOUND=yes
49319fi
49320    if test "x${LCMS_FOUND}" = "xyes"; then
49321      USE_EXTERNAL_LCMS=true
49322    else
49323      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49324    fi
49325  else
49326    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49327  fi
49328
49329
49330
49331  ###############################################################################
49332  #
49333  # Check for the png library
49334  #
49335
49336
49337# Check whether --with-libpng was given.
49338if test "${with_libpng+set}" = set; then :
49339  withval=$with_libpng;
49340fi
49341
49342
49343
49344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49345$as_echo_n "checking for which libpng to use... " >&6; }
49346
49347  # default is bundled
49348  DEFAULT_LIBPNG=bundled
49349
49350  #
49351  # if user didn't specify, use DEFAULT_LIBPNG
49352  #
49353  if test "x${with_libpng}" = "x"; then
49354      with_libpng=${DEFAULT_LIBPNG}
49355  fi
49356
49357  if test "x${with_libpng}" = "xbundled"; then
49358      USE_EXTERNAL_LIBPNG=false
49359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49360$as_echo "bundled" >&6; }
49361  elif test "x${with_libpng}" = "xsystem"; then
49362
49363pkg_failed=no
49364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49365$as_echo_n "checking for PNG... " >&6; }
49366
49367if test -n "$PNG_CFLAGS"; then
49368    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49369 elif test -n "$PKG_CONFIG"; then
49370    if test -n "$PKG_CONFIG" && \
49371    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49372  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49373  ac_status=$?
49374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49375  test $ac_status = 0; }; then
49376  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49377else
49378  pkg_failed=yes
49379fi
49380 else
49381    pkg_failed=untried
49382fi
49383if test -n "$PNG_LIBS"; then
49384    pkg_cv_PNG_LIBS="$PNG_LIBS"
49385 elif test -n "$PKG_CONFIG"; then
49386    if test -n "$PKG_CONFIG" && \
49387    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49388  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49389  ac_status=$?
49390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49391  test $ac_status = 0; }; then
49392  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49393else
49394  pkg_failed=yes
49395fi
49396 else
49397    pkg_failed=untried
49398fi
49399
49400
49401
49402if test $pkg_failed = yes; then
49403
49404if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49405        _pkg_short_errors_supported=yes
49406else
49407        _pkg_short_errors_supported=no
49408fi
49409        if test $_pkg_short_errors_supported = yes; then
49410	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49411        else
49412	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49413        fi
49414	# Put the nasty error message in config.log where it belongs
49415	echo "$PNG_PKG_ERRORS" >&5
49416
49417	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49418$as_echo "no" >&6; }
49419                 LIBPNG_FOUND=no
49420elif test $pkg_failed = untried; then
49421	 LIBPNG_FOUND=no
49422else
49423	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49424	PNG_LIBS=$pkg_cv_PNG_LIBS
49425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49426$as_echo "yes" >&6; }
49427	 LIBPNG_FOUND=yes
49428fi
49429      if test "x${LIBPNG_FOUND}" = "xyes"; then
49430          USE_EXTERNAL_LIBPNG=true
49431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49432$as_echo "system" >&6; }
49433      else
49434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49435$as_echo "system not found" >&6; }
49436          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49437      fi
49438  else
49439      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49440  fi
49441
49442
49443  ###############################################################################
49444  #
49445  # Check for the zlib library
49446  #
49447
49448
49449# Check whether --with-zlib was given.
49450if test "${with_zlib+set}" = set; then :
49451  withval=$with_zlib;
49452fi
49453
49454
49455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49456$as_echo_n "checking for compress in -lz... " >&6; }
49457if ${ac_cv_lib_z_compress+:} false; then :
49458  $as_echo_n "(cached) " >&6
49459else
49460  ac_check_lib_save_LIBS=$LIBS
49461LIBS="-lz  $LIBS"
49462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49463/* end confdefs.h.  */
49464
49465/* Override any GCC internal prototype to avoid an error.
49466   Use char because int might match the return type of a GCC
49467   builtin and then its argument prototype would still apply.  */
49468#ifdef __cplusplus
49469extern "C"
49470#endif
49471char compress ();
49472int
49473main ()
49474{
49475return compress ();
49476  ;
49477  return 0;
49478}
49479_ACEOF
49480if ac_fn_cxx_try_link "$LINENO"; then :
49481  ac_cv_lib_z_compress=yes
49482else
49483  ac_cv_lib_z_compress=no
49484fi
49485rm -f core conftest.err conftest.$ac_objext \
49486    conftest$ac_exeext conftest.$ac_ext
49487LIBS=$ac_check_lib_save_LIBS
49488fi
49489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49490$as_echo "$ac_cv_lib_z_compress" >&6; }
49491if test "x$ac_cv_lib_z_compress" = xyes; then :
49492   ZLIB_FOUND=yes
49493else
49494   ZLIB_FOUND=no
49495fi
49496
49497
49498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49499$as_echo_n "checking for which zlib to use... " >&6; }
49500
49501  DEFAULT_ZLIB=bundled
49502  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49503    #
49504    # On macosx default is system...on others default is
49505    #
49506    DEFAULT_ZLIB=system
49507  fi
49508
49509  if test "x${ZLIB_FOUND}" != "xyes"; then
49510    #
49511    # If we don't find any system...set default to bundled
49512    #
49513    DEFAULT_ZLIB=bundled
49514  fi
49515
49516  #
49517  # If user didn't specify, use DEFAULT_ZLIB
49518  #
49519  if test "x${with_zlib}" = "x"; then
49520    with_zlib=${DEFAULT_ZLIB}
49521  fi
49522
49523  if test "x${with_zlib}" = "xbundled"; then
49524    USE_EXTERNAL_LIBZ=false
49525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49526$as_echo "bundled" >&6; }
49527  elif test "x${with_zlib}" = "xsystem"; then
49528    if test "x${ZLIB_FOUND}" = "xyes"; then
49529      USE_EXTERNAL_LIBZ=true
49530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49531$as_echo "system" >&6; }
49532    else
49533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49534$as_echo "system not found" >&6; }
49535      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49536    fi
49537  else
49538    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49539  fi
49540
49541
49542
49543  ###############################################################################
49544  LIBZIP_CAN_USE_MMAP=true
49545
49546
49547
49548  ###############################################################################
49549  #
49550  # Check if altzone exists in time.h
49551  #
49552
49553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49554/* end confdefs.h.  */
49555#include <time.h>
49556int
49557main ()
49558{
49559return (int)altzone;
49560  ;
49561  return 0;
49562}
49563_ACEOF
49564if ac_fn_cxx_try_link "$LINENO"; then :
49565  has_altzone=yes
49566else
49567  has_altzone=no
49568fi
49569rm -f core conftest.err conftest.$ac_objext \
49570    conftest$ac_exeext conftest.$ac_ext
49571  if test "x$has_altzone" = xyes; then
49572
49573$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49574
49575  fi
49576
49577  ###############################################################################
49578  #
49579  # Check the maths library
49580  #
49581
49582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49583$as_echo_n "checking for cos in -lm... " >&6; }
49584if ${ac_cv_lib_m_cos+:} false; then :
49585  $as_echo_n "(cached) " >&6
49586else
49587  ac_check_lib_save_LIBS=$LIBS
49588LIBS="-lm  $LIBS"
49589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49590/* end confdefs.h.  */
49591
49592/* Override any GCC internal prototype to avoid an error.
49593   Use char because int might match the return type of a GCC
49594   builtin and then its argument prototype would still apply.  */
49595#ifdef __cplusplus
49596extern "C"
49597#endif
49598char cos ();
49599int
49600main ()
49601{
49602return cos ();
49603  ;
49604  return 0;
49605}
49606_ACEOF
49607if ac_fn_cxx_try_link "$LINENO"; then :
49608  ac_cv_lib_m_cos=yes
49609else
49610  ac_cv_lib_m_cos=no
49611fi
49612rm -f core conftest.err conftest.$ac_objext \
49613    conftest$ac_exeext conftest.$ac_ext
49614LIBS=$ac_check_lib_save_LIBS
49615fi
49616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49617$as_echo "$ac_cv_lib_m_cos" >&6; }
49618if test "x$ac_cv_lib_m_cos" = xyes; then :
49619  cat >>confdefs.h <<_ACEOF
49620#define HAVE_LIBM 1
49621_ACEOF
49622
49623  LIBS="-lm $LIBS"
49624
49625else
49626
49627        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49628$as_echo "$as_me: Maths library was not found" >&6;}
49629
49630
49631fi
49632
49633
49634
49635  ###############################################################################
49636  #
49637  # Check for libdl.so
49638
49639  save_LIBS="$LIBS"
49640  LIBS=""
49641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49642$as_echo_n "checking for dlopen in -ldl... " >&6; }
49643if ${ac_cv_lib_dl_dlopen+:} false; then :
49644  $as_echo_n "(cached) " >&6
49645else
49646  ac_check_lib_save_LIBS=$LIBS
49647LIBS="-ldl  $LIBS"
49648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49649/* end confdefs.h.  */
49650
49651/* Override any GCC internal prototype to avoid an error.
49652   Use char because int might match the return type of a GCC
49653   builtin and then its argument prototype would still apply.  */
49654#ifdef __cplusplus
49655extern "C"
49656#endif
49657char dlopen ();
49658int
49659main ()
49660{
49661return dlopen ();
49662  ;
49663  return 0;
49664}
49665_ACEOF
49666if ac_fn_cxx_try_link "$LINENO"; then :
49667  ac_cv_lib_dl_dlopen=yes
49668else
49669  ac_cv_lib_dl_dlopen=no
49670fi
49671rm -f core conftest.err conftest.$ac_objext \
49672    conftest$ac_exeext conftest.$ac_ext
49673LIBS=$ac_check_lib_save_LIBS
49674fi
49675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49676$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49677if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49678  cat >>confdefs.h <<_ACEOF
49679#define HAVE_LIBDL 1
49680_ACEOF
49681
49682  LIBS="-ldl $LIBS"
49683
49684fi
49685
49686  LIBDL="$LIBS"
49687
49688  LIBS="$save_LIBS"
49689
49690
49691  ###############################################################################
49692  #
49693  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49694  # dynamic build is configured on command line.
49695  #
49696
49697# Check whether --with-stdc++lib was given.
49698if test "${with_stdc__lib+set}" = set; then :
49699  withval=$with_stdc__lib;
49700        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49701                && test "x$with_stdc__lib" != xdefault; then
49702          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49703        fi
49704
49705else
49706  with_stdc__lib=default
49707
49708fi
49709
49710
49711  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49712    # Test if -lstdc++ works.
49713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49714$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49715    ac_ext=cpp
49716ac_cpp='$CXXCPP $CPPFLAGS'
49717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49720
49721    OLD_CXXFLAGS="$CXXFLAGS"
49722    CXXFLAGS="$CXXFLAGS -lstdc++"
49723    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49724/* end confdefs.h.  */
49725
49726int
49727main ()
49728{
49729return 0;
49730  ;
49731  return 0;
49732}
49733_ACEOF
49734if ac_fn_cxx_try_link "$LINENO"; then :
49735  has_dynamic_libstdcxx=yes
49736else
49737  has_dynamic_libstdcxx=no
49738fi
49739rm -f core conftest.err conftest.$ac_objext \
49740    conftest$ac_exeext conftest.$ac_ext
49741    CXXFLAGS="$OLD_CXXFLAGS"
49742    ac_ext=cpp
49743ac_cpp='$CXXCPP $CPPFLAGS'
49744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49747
49748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49749$as_echo "$has_dynamic_libstdcxx" >&6; }
49750
49751    # Test if stdc++ can be linked statically.
49752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49753$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49754    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49755    ac_ext=cpp
49756ac_cpp='$CXXCPP $CPPFLAGS'
49757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49760
49761    OLD_LIBS="$LIBS"
49762    OLD_CXX="$CXX"
49763    LIBS="$STATIC_STDCXX_FLAGS"
49764    CXX="$CC"
49765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49766/* end confdefs.h.  */
49767
49768int
49769main ()
49770{
49771return 0;
49772  ;
49773  return 0;
49774}
49775_ACEOF
49776if ac_fn_cxx_try_link "$LINENO"; then :
49777  has_static_libstdcxx=yes
49778else
49779  has_static_libstdcxx=no
49780fi
49781rm -f core conftest.err conftest.$ac_objext \
49782    conftest$ac_exeext conftest.$ac_ext
49783    LIBS="$OLD_LIBS"
49784    CXX="$OLD_CXX"
49785    ac_ext=cpp
49786ac_cpp='$CXXCPP $CPPFLAGS'
49787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49790
49791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49792$as_echo "$has_static_libstdcxx" >&6; }
49793
49794    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49795      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49796    fi
49797
49798    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49799      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49800    fi
49801
49802    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49803      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49804    fi
49805
49806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49807$as_echo_n "checking how to link with libstdc++... " >&6; }
49808    # If dynamic was requested, it's available since it would fail above otherwise.
49809    # If dynamic wasn't requested, go with static unless it isn't available.
49810    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49811      LIBCXX="$LIBCXX -lstdc++"
49812      LDCXX="$CXX"
49813      STATIC_CXX_SETTING="STATIC_CXX=false"
49814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49815$as_echo "dynamic" >&6; }
49816    else
49817      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49818      LDCXX="$CC"
49819      STATIC_CXX_SETTING="STATIC_CXX=true"
49820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49821$as_echo "static" >&6; }
49822    fi
49823  fi
49824
49825
49826  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49827    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49828
49829pkg_failed=no
49830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49831$as_echo_n "checking for LIBFFI... " >&6; }
49832
49833if test -n "$LIBFFI_CFLAGS"; then
49834    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49835 elif test -n "$PKG_CONFIG"; then
49836    if test -n "$PKG_CONFIG" && \
49837    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49838  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49839  ac_status=$?
49840  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49841  test $ac_status = 0; }; then
49842  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49843else
49844  pkg_failed=yes
49845fi
49846 else
49847    pkg_failed=untried
49848fi
49849if test -n "$LIBFFI_LIBS"; then
49850    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49851 elif test -n "$PKG_CONFIG"; then
49852    if test -n "$PKG_CONFIG" && \
49853    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49854  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49855  ac_status=$?
49856  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49857  test $ac_status = 0; }; then
49858  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49859else
49860  pkg_failed=yes
49861fi
49862 else
49863    pkg_failed=untried
49864fi
49865
49866
49867
49868if test $pkg_failed = yes; then
49869
49870if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49871        _pkg_short_errors_supported=yes
49872else
49873        _pkg_short_errors_supported=no
49874fi
49875        if test $_pkg_short_errors_supported = yes; then
49876	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49877        else
49878	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49879        fi
49880	# Put the nasty error message in config.log where it belongs
49881	echo "$LIBFFI_PKG_ERRORS" >&5
49882
49883	as_fn_error $? "Package requirements (libffi) were not met:
49884
49885$LIBFFI_PKG_ERRORS
49886
49887Consider adjusting the PKG_CONFIG_PATH environment variable if you
49888installed software in a non-standard prefix.
49889
49890Alternatively, you may set the environment variables LIBFFI_CFLAGS
49891and LIBFFI_LIBS to avoid the need to call pkg-config.
49892See the pkg-config man page for more details.
49893" "$LINENO" 5
49894elif test $pkg_failed = untried; then
49895	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49897as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49898is in your PATH or set the PKG_CONFIG environment variable to the full
49899path to pkg-config.
49900
49901Alternatively, you may set the environment variables LIBFFI_CFLAGS
49902and LIBFFI_LIBS to avoid the need to call pkg-config.
49903See the pkg-config man page for more details.
49904
49905To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49906See \`config.log' for more details" "$LINENO" 5; }
49907else
49908	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49909	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49911$as_echo "yes" >&6; }
49912	:
49913fi
49914
49915  fi
49916
49917  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49918    # Extract the first word of "llvm-config", so it can be a program name with args.
49919set dummy llvm-config; ac_word=$2
49920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49921$as_echo_n "checking for $ac_word... " >&6; }
49922if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49923  $as_echo_n "(cached) " >&6
49924else
49925  if test -n "$LLVM_CONFIG"; then
49926  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49927else
49928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49929for as_dir in $PATH
49930do
49931  IFS=$as_save_IFS
49932  test -z "$as_dir" && as_dir=.
49933    for ac_exec_ext in '' $ac_executable_extensions; do
49934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49935    ac_cv_prog_LLVM_CONFIG="llvm-config"
49936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49937    break 2
49938  fi
49939done
49940  done
49941IFS=$as_save_IFS
49942
49943fi
49944fi
49945LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49946if test -n "$LLVM_CONFIG"; then
49947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49948$as_echo "$LLVM_CONFIG" >&6; }
49949else
49950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49951$as_echo "no" >&6; }
49952fi
49953
49954
49955
49956    if test "x$LLVM_CONFIG" != xllvm-config; then
49957      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49958    fi
49959
49960    llvm_components="jit mcjit engine nativecodegen native"
49961    unset LLVM_CFLAGS
49962    for flag in $("$LLVM_CONFIG" --cxxflags); do
49963      if echo "${flag}" | grep -q '^-[ID]'; then
49964        if test "${flag}" != "-D_DEBUG" ; then
49965          if test "${LLVM_CFLAGS}" != "" ; then
49966            LLVM_CFLAGS="${LLVM_CFLAGS} "
49967          fi
49968          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49969        fi
49970      fi
49971    done
49972    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49973    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49974
49975    unset LLVM_LDFLAGS
49976    for flag in $("${LLVM_CONFIG}" --ldflags); do
49977      if echo "${flag}" | grep -q '^-L'; then
49978        if test "${LLVM_LDFLAGS}" != ""; then
49979          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49980        fi
49981        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49982      fi
49983    done
49984
49985    unset LLVM_LIBS
49986    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49987      if echo "${flag}" | grep -q '^-l'; then
49988        if test "${LLVM_LIBS}" != ""; then
49989          LLVM_LIBS="${LLVM_LIBS} "
49990        fi
49991        LLVM_LIBS="${LLVM_LIBS}${flag}"
49992      fi
49993    done
49994
49995
49996
49997
49998  fi
49999
50000  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50001  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50002    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50003  fi
50004
50005  # TODO better (platform agnostic) test
50006  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50007    LIBCXX="-lstdc++"
50008  fi
50009
50010
50011
50012
50013  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50014
50015
50016# Check whether --with-msvcr-dll was given.
50017if test "${with_msvcr_dll+set}" = set; then :
50018  withval=$with_msvcr_dll;
50019fi
50020
50021
50022  if test "x$with_msvcr_dll" != x; then
50023    # If given explicitely by user, do not probe. If not present, fail directly.
50024
50025  DLL_NAME="$MSVCR_NAME"
50026  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50027  METHOD="--with-msvcr-dll"
50028  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50029    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50030$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50031
50032    # Need to check if the found msvcr is correct architecture
50033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50034$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50035    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50037      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50038      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50039      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50040        CORRECT_MSVCR_ARCH="PE32 executable"
50041      else
50042        CORRECT_MSVCR_ARCH="PE32+ executable"
50043      fi
50044    else
50045      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50046        CORRECT_MSVCR_ARCH=386
50047      else
50048        CORRECT_MSVCR_ARCH=x86-64
50049      fi
50050    fi
50051    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50053$as_echo "ok" >&6; }
50054      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50055
50056  # Only process if variable expands to non-empty
50057
50058  if test "x$MSVC_DLL" != x; then
50059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50060
50061  # Input might be given as Windows format, start by converting to
50062  # unix format.
50063  path="$MSVC_DLL"
50064  new_path=`$CYGPATH -u "$path"`
50065
50066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50069  # "foo.exe" is OK but "foo" is an error.
50070  #
50071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50072  # It is also a way to make sure we got the proper file name for the real test later on.
50073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50074  if test "x$test_shortpath" = x; then
50075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50076$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50077    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50078  fi
50079
50080  # Call helper function which possibly converts this using DOS-style short mode.
50081  # If so, the updated path is stored in $new_path.
50082
50083  input_path="$new_path"
50084  # Check if we need to convert this using DOS-style short mode. If the path
50085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50086  # take no chances and rewrite it.
50087  # Note: m4 eats our [], so we need to use [ and ] instead.
50088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50089  if test "x$has_forbidden_chars" != x; then
50090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50094      # Going to short mode and back again did indeed matter. Since short mode is
50095      # case insensitive, let's make it lowercase to improve readability.
50096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50097      # Now convert it back to Unix-style (cygpath)
50098      input_path=`$CYGPATH -u "$shortmode_path"`
50099      new_path="$input_path"
50100    fi
50101  fi
50102
50103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50104  if test "x$test_cygdrive_prefix" = x; then
50105    # As a simple fix, exclude /usr/bin since it's not a real path.
50106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50108      # a path prefixed by /cygdrive for fixpath to work.
50109      new_path="$CYGWIN_ROOT_PATH$input_path"
50110    fi
50111  fi
50112
50113
50114  if test "x$path" != "x$new_path"; then
50115    MSVC_DLL="$new_path"
50116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50117$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50118  fi
50119
50120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50121
50122  path="$MSVC_DLL"
50123  has_colon=`$ECHO $path | $GREP ^.:`
50124  new_path="$path"
50125  if test "x$has_colon" = x; then
50126    # Not in mixed or Windows style, start by that.
50127    new_path=`cmd //c echo $path`
50128  fi
50129
50130
50131  input_path="$new_path"
50132  # Check if we need to convert this using DOS-style short mode. If the path
50133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50134  # take no chances and rewrite it.
50135  # Note: m4 eats our [], so we need to use [ and ] instead.
50136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50137  if test "x$has_forbidden_chars" != x; then
50138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50140  fi
50141
50142
50143  windows_path="$new_path"
50144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50145    unix_path=`$CYGPATH -u "$windows_path"`
50146    new_path="$unix_path"
50147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50149    new_path="$unix_path"
50150  fi
50151
50152  if test "x$path" != "x$new_path"; then
50153    MSVC_DLL="$new_path"
50154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50155$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50156  fi
50157
50158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50160
50161    else
50162      # We're on a unix platform. Hooray! :)
50163      path="$MSVC_DLL"
50164      has_space=`$ECHO "$path" | $GREP " "`
50165      if test "x$has_space" != x; then
50166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50167$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50168        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50169      fi
50170
50171      # Use eval to expand a potential ~
50172      eval path="$path"
50173      if test ! -f "$path" && test ! -d "$path"; then
50174        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50175      fi
50176
50177      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50178    fi
50179  fi
50180
50181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50182$as_echo_n "checking for $DLL_NAME... " >&6; }
50183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50184$as_echo "$MSVC_DLL" >&6; }
50185    else
50186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50187$as_echo "incorrect, ignoring" >&6; }
50188      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50189$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50190    fi
50191  fi
50192
50193    if test "x$MSVC_DLL" = x; then
50194      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50195    fi
50196    MSVCR_DLL="$MSVC_DLL"
50197  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50198
50199  DLL_NAME="$MSVCR_NAME"
50200  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50201  METHOD="devkit"
50202  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50203    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50204$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50205
50206    # Need to check if the found msvcr is correct architecture
50207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50208$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50209    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50211      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50212      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50213      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50214        CORRECT_MSVCR_ARCH="PE32 executable"
50215      else
50216        CORRECT_MSVCR_ARCH="PE32+ executable"
50217      fi
50218    else
50219      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50220        CORRECT_MSVCR_ARCH=386
50221      else
50222        CORRECT_MSVCR_ARCH=x86-64
50223      fi
50224    fi
50225    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50227$as_echo "ok" >&6; }
50228      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50229
50230  # Only process if variable expands to non-empty
50231
50232  if test "x$MSVC_DLL" != x; then
50233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50234
50235  # Input might be given as Windows format, start by converting to
50236  # unix format.
50237  path="$MSVC_DLL"
50238  new_path=`$CYGPATH -u "$path"`
50239
50240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50243  # "foo.exe" is OK but "foo" is an error.
50244  #
50245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50246  # It is also a way to make sure we got the proper file name for the real test later on.
50247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50248  if test "x$test_shortpath" = x; then
50249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50250$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50251    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50252  fi
50253
50254  # Call helper function which possibly converts this using DOS-style short mode.
50255  # If so, the updated path is stored in $new_path.
50256
50257  input_path="$new_path"
50258  # Check if we need to convert this using DOS-style short mode. If the path
50259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50260  # take no chances and rewrite it.
50261  # Note: m4 eats our [], so we need to use [ and ] instead.
50262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50263  if test "x$has_forbidden_chars" != x; then
50264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50268      # Going to short mode and back again did indeed matter. Since short mode is
50269      # case insensitive, let's make it lowercase to improve readability.
50270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50271      # Now convert it back to Unix-style (cygpath)
50272      input_path=`$CYGPATH -u "$shortmode_path"`
50273      new_path="$input_path"
50274    fi
50275  fi
50276
50277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50278  if test "x$test_cygdrive_prefix" = x; then
50279    # As a simple fix, exclude /usr/bin since it's not a real path.
50280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50282      # a path prefixed by /cygdrive for fixpath to work.
50283      new_path="$CYGWIN_ROOT_PATH$input_path"
50284    fi
50285  fi
50286
50287
50288  if test "x$path" != "x$new_path"; then
50289    MSVC_DLL="$new_path"
50290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50291$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50292  fi
50293
50294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50295
50296  path="$MSVC_DLL"
50297  has_colon=`$ECHO $path | $GREP ^.:`
50298  new_path="$path"
50299  if test "x$has_colon" = x; then
50300    # Not in mixed or Windows style, start by that.
50301    new_path=`cmd //c echo $path`
50302  fi
50303
50304
50305  input_path="$new_path"
50306  # Check if we need to convert this using DOS-style short mode. If the path
50307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50308  # take no chances and rewrite it.
50309  # Note: m4 eats our [], so we need to use [ and ] instead.
50310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50311  if test "x$has_forbidden_chars" != x; then
50312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50314  fi
50315
50316
50317  windows_path="$new_path"
50318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50319    unix_path=`$CYGPATH -u "$windows_path"`
50320    new_path="$unix_path"
50321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50323    new_path="$unix_path"
50324  fi
50325
50326  if test "x$path" != "x$new_path"; then
50327    MSVC_DLL="$new_path"
50328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50329$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50330  fi
50331
50332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50334
50335    else
50336      # We're on a unix platform. Hooray! :)
50337      path="$MSVC_DLL"
50338      has_space=`$ECHO "$path" | $GREP " "`
50339      if test "x$has_space" != x; then
50340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50341$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50343      fi
50344
50345      # Use eval to expand a potential ~
50346      eval path="$path"
50347      if test ! -f "$path" && test ! -d "$path"; then
50348        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50349      fi
50350
50351      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50352    fi
50353  fi
50354
50355      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50356$as_echo_n "checking for $DLL_NAME... " >&6; }
50357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50358$as_echo "$MSVC_DLL" >&6; }
50359    else
50360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50361$as_echo "incorrect, ignoring" >&6; }
50362      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50363$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50364    fi
50365  fi
50366
50367    if test "x$MSVC_DLL" = x; then
50368      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50369    fi
50370    MSVCR_DLL="$MSVC_DLL"
50371  else
50372
50373  DLL_NAME="${MSVCR_NAME}"
50374  MSVC_DLL=
50375
50376  if test "x$MSVC_DLL" = x; then
50377    # Probe: Using well-known location from Visual Studio 10.0
50378    if test "x$VCINSTALLDIR" != x; then
50379      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50380
50381  windows_path="$CYGWIN_VC_INSTALL_DIR"
50382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50383    unix_path=`$CYGPATH -u "$windows_path"`
50384    CYGWIN_VC_INSTALL_DIR="$unix_path"
50385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50387    CYGWIN_VC_INSTALL_DIR="$unix_path"
50388  fi
50389
50390      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50391        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50392      else
50393        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50394      fi
50395      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50396
50397  DLL_NAME="$DLL_NAME"
50398  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50399  METHOD="well-known location in VCINSTALLDIR"
50400  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50402$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50403
50404    # Need to check if the found msvcr is correct architecture
50405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50406$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50407    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50409      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50410      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50411      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50412        CORRECT_MSVCR_ARCH="PE32 executable"
50413      else
50414        CORRECT_MSVCR_ARCH="PE32+ executable"
50415      fi
50416    else
50417      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50418        CORRECT_MSVCR_ARCH=386
50419      else
50420        CORRECT_MSVCR_ARCH=x86-64
50421      fi
50422    fi
50423    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50425$as_echo "ok" >&6; }
50426      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50427
50428  # Only process if variable expands to non-empty
50429
50430  if test "x$MSVC_DLL" != x; then
50431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50432
50433  # Input might be given as Windows format, start by converting to
50434  # unix format.
50435  path="$MSVC_DLL"
50436  new_path=`$CYGPATH -u "$path"`
50437
50438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50441  # "foo.exe" is OK but "foo" is an error.
50442  #
50443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50444  # It is also a way to make sure we got the proper file name for the real test later on.
50445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50446  if test "x$test_shortpath" = x; then
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50448$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50449    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50450  fi
50451
50452  # Call helper function which possibly converts this using DOS-style short mode.
50453  # If so, the updated path is stored in $new_path.
50454
50455  input_path="$new_path"
50456  # Check if we need to convert this using DOS-style short mode. If the path
50457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50458  # take no chances and rewrite it.
50459  # Note: m4 eats our [], so we need to use [ and ] instead.
50460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50461  if test "x$has_forbidden_chars" != x; then
50462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50466      # Going to short mode and back again did indeed matter. Since short mode is
50467      # case insensitive, let's make it lowercase to improve readability.
50468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50469      # Now convert it back to Unix-style (cygpath)
50470      input_path=`$CYGPATH -u "$shortmode_path"`
50471      new_path="$input_path"
50472    fi
50473  fi
50474
50475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50476  if test "x$test_cygdrive_prefix" = x; then
50477    # As a simple fix, exclude /usr/bin since it's not a real path.
50478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50480      # a path prefixed by /cygdrive for fixpath to work.
50481      new_path="$CYGWIN_ROOT_PATH$input_path"
50482    fi
50483  fi
50484
50485
50486  if test "x$path" != "x$new_path"; then
50487    MSVC_DLL="$new_path"
50488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50489$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50490  fi
50491
50492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50493
50494  path="$MSVC_DLL"
50495  has_colon=`$ECHO $path | $GREP ^.:`
50496  new_path="$path"
50497  if test "x$has_colon" = x; then
50498    # Not in mixed or Windows style, start by that.
50499    new_path=`cmd //c echo $path`
50500  fi
50501
50502
50503  input_path="$new_path"
50504  # Check if we need to convert this using DOS-style short mode. If the path
50505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50506  # take no chances and rewrite it.
50507  # Note: m4 eats our [], so we need to use [ and ] instead.
50508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50509  if test "x$has_forbidden_chars" != x; then
50510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50512  fi
50513
50514
50515  windows_path="$new_path"
50516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50517    unix_path=`$CYGPATH -u "$windows_path"`
50518    new_path="$unix_path"
50519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50521    new_path="$unix_path"
50522  fi
50523
50524  if test "x$path" != "x$new_path"; then
50525    MSVC_DLL="$new_path"
50526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50527$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50528  fi
50529
50530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50532
50533    else
50534      # We're on a unix platform. Hooray! :)
50535      path="$MSVC_DLL"
50536      has_space=`$ECHO "$path" | $GREP " "`
50537      if test "x$has_space" != x; then
50538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50539$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50541      fi
50542
50543      # Use eval to expand a potential ~
50544      eval path="$path"
50545      if test ! -f "$path" && test ! -d "$path"; then
50546        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50547      fi
50548
50549      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50550    fi
50551  fi
50552
50553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50554$as_echo_n "checking for $DLL_NAME... " >&6; }
50555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50556$as_echo "$MSVC_DLL" >&6; }
50557    else
50558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50559$as_echo "incorrect, ignoring" >&6; }
50560      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50561$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50562    fi
50563  fi
50564
50565    fi
50566  fi
50567
50568  if test "x$MSVC_DLL" = x; then
50569    # Probe: Check in the Boot JDK directory.
50570    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50571
50572  DLL_NAME="$DLL_NAME"
50573  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50574  METHOD="well-known location in Boot JDK"
50575  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50576    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50577$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50578
50579    # Need to check if the found msvcr is correct architecture
50580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50581$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50582    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50584      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50585      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50586      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50587        CORRECT_MSVCR_ARCH="PE32 executable"
50588      else
50589        CORRECT_MSVCR_ARCH="PE32+ executable"
50590      fi
50591    else
50592      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50593        CORRECT_MSVCR_ARCH=386
50594      else
50595        CORRECT_MSVCR_ARCH=x86-64
50596      fi
50597    fi
50598    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50600$as_echo "ok" >&6; }
50601      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50602
50603  # Only process if variable expands to non-empty
50604
50605  if test "x$MSVC_DLL" != x; then
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 unix 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  fi
50727
50728      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50729$as_echo_n "checking for $DLL_NAME... " >&6; }
50730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50731$as_echo "$MSVC_DLL" >&6; }
50732    else
50733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50734$as_echo "incorrect, ignoring" >&6; }
50735      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50736$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50737    fi
50738  fi
50739
50740  fi
50741
50742  if test "x$MSVC_DLL" = x; then
50743    # Probe: Look in the Windows system32 directory
50744    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50745
50746  windows_path="$CYGWIN_SYSTEMROOT"
50747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50748    unix_path=`$CYGPATH -u "$windows_path"`
50749    CYGWIN_SYSTEMROOT="$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_SYSTEMROOT="$unix_path"
50753  fi
50754
50755    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50756
50757  DLL_NAME="$DLL_NAME"
50758  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50759  METHOD="well-known location in SYSTEMROOT"
50760  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50761    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50762$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50763
50764    # Need to check if the found msvcr is correct architecture
50765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50766$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50767    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50769      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50770      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50771      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50772        CORRECT_MSVCR_ARCH="PE32 executable"
50773      else
50774        CORRECT_MSVCR_ARCH="PE32+ executable"
50775      fi
50776    else
50777      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50778        CORRECT_MSVCR_ARCH=386
50779      else
50780        CORRECT_MSVCR_ARCH=x86-64
50781      fi
50782    fi
50783    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50785$as_echo "ok" >&6; }
50786      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50787
50788  # Only process if variable expands to non-empty
50789
50790  if test "x$MSVC_DLL" != x; then
50791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50792
50793  # Input might be given as Windows format, start by converting to
50794  # unix format.
50795  path="$MSVC_DLL"
50796  new_path=`$CYGPATH -u "$path"`
50797
50798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50801  # "foo.exe" is OK but "foo" is an error.
50802  #
50803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50804  # It is also a way to make sure we got the proper file name for the real test later on.
50805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50806  if test "x$test_shortpath" = x; then
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50808$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50809    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50810  fi
50811
50812  # Call helper function which possibly converts this using DOS-style short mode.
50813  # If so, the updated path is stored in $new_path.
50814
50815  input_path="$new_path"
50816  # Check if we need to convert this using DOS-style short mode. If the path
50817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50818  # take no chances and rewrite it.
50819  # Note: m4 eats our [], so we need to use [ and ] instead.
50820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50821  if test "x$has_forbidden_chars" != x; then
50822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50826      # Going to short mode and back again did indeed matter. Since short mode is
50827      # case insensitive, let's make it lowercase to improve readability.
50828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50829      # Now convert it back to Unix-style (cygpath)
50830      input_path=`$CYGPATH -u "$shortmode_path"`
50831      new_path="$input_path"
50832    fi
50833  fi
50834
50835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50836  if test "x$test_cygdrive_prefix" = x; then
50837    # As a simple fix, exclude /usr/bin since it's not a real path.
50838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50840      # a path prefixed by /cygdrive for fixpath to work.
50841      new_path="$CYGWIN_ROOT_PATH$input_path"
50842    fi
50843  fi
50844
50845
50846  if test "x$path" != "x$new_path"; then
50847    MSVC_DLL="$new_path"
50848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50849$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50850  fi
50851
50852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50853
50854  path="$MSVC_DLL"
50855  has_colon=`$ECHO $path | $GREP ^.:`
50856  new_path="$path"
50857  if test "x$has_colon" = x; then
50858    # Not in mixed or Windows style, start by that.
50859    new_path=`cmd //c echo $path`
50860  fi
50861
50862
50863  input_path="$new_path"
50864  # Check if we need to convert this using DOS-style short mode. If the path
50865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50866  # take no chances and rewrite it.
50867  # Note: m4 eats our [], so we need to use [ and ] instead.
50868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50869  if test "x$has_forbidden_chars" != x; then
50870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50872  fi
50873
50874
50875  windows_path="$new_path"
50876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50877    unix_path=`$CYGPATH -u "$windows_path"`
50878    new_path="$unix_path"
50879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50881    new_path="$unix_path"
50882  fi
50883
50884  if test "x$path" != "x$new_path"; then
50885    MSVC_DLL="$new_path"
50886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50887$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50888  fi
50889
50890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50892
50893    else
50894      # We're on a unix platform. Hooray! :)
50895      path="$MSVC_DLL"
50896      has_space=`$ECHO "$path" | $GREP " "`
50897      if test "x$has_space" != x; then
50898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50899$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50901      fi
50902
50903      # Use eval to expand a potential ~
50904      eval path="$path"
50905      if test ! -f "$path" && test ! -d "$path"; then
50906        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50907      fi
50908
50909      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50910    fi
50911  fi
50912
50913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50914$as_echo_n "checking for $DLL_NAME... " >&6; }
50915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50916$as_echo "$MSVC_DLL" >&6; }
50917    else
50918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50919$as_echo "incorrect, ignoring" >&6; }
50920      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50921$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50922    fi
50923  fi
50924
50925  fi
50926
50927  if test "x$MSVC_DLL" = x; then
50928    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50929    if test "x$VS100COMNTOOLS" != x; then
50930      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50931
50932  windows_path="$CYGWIN_VS_TOOLS_DIR"
50933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50934    unix_path=`$CYGPATH -u "$windows_path"`
50935    CYGWIN_VS_TOOLS_DIR="$unix_path"
50936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50938    CYGWIN_VS_TOOLS_DIR="$unix_path"
50939  fi
50940
50941      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50942        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50943	    | $GREP -i /x64/ | $HEAD --lines 1`
50944      else
50945        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50946	    | $GREP -i /x86/ | $HEAD --lines 1`
50947      fi
50948
50949  DLL_NAME="$DLL_NAME"
50950  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50951  METHOD="search of VS100COMNTOOLS"
50952  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50954$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50955
50956    # Need to check if the found msvcr is correct architecture
50957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50958$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50959    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50961      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50962      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50963      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50964        CORRECT_MSVCR_ARCH="PE32 executable"
50965      else
50966        CORRECT_MSVCR_ARCH="PE32+ executable"
50967      fi
50968    else
50969      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50970        CORRECT_MSVCR_ARCH=386
50971      else
50972        CORRECT_MSVCR_ARCH=x86-64
50973      fi
50974    fi
50975    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50977$as_echo "ok" >&6; }
50978      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50979
50980  # Only process if variable expands to non-empty
50981
50982  if test "x$MSVC_DLL" != x; then
50983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50984
50985  # Input might be given as Windows format, start by converting to
50986  # unix format.
50987  path="$MSVC_DLL"
50988  new_path=`$CYGPATH -u "$path"`
50989
50990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50993  # "foo.exe" is OK but "foo" is an error.
50994  #
50995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50996  # It is also a way to make sure we got the proper file name for the real test later on.
50997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50998  if test "x$test_shortpath" = x; then
50999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51000$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51001    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51002  fi
51003
51004  # Call helper function which possibly converts this using DOS-style short mode.
51005  # If so, the updated path is stored in $new_path.
51006
51007  input_path="$new_path"
51008  # Check if we need to convert this using DOS-style short mode. If the path
51009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51010  # take no chances and rewrite it.
51011  # Note: m4 eats our [], so we need to use [ and ] instead.
51012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51013  if test "x$has_forbidden_chars" != x; then
51014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51018      # Going to short mode and back again did indeed matter. Since short mode is
51019      # case insensitive, let's make it lowercase to improve readability.
51020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51021      # Now convert it back to Unix-style (cygpath)
51022      input_path=`$CYGPATH -u "$shortmode_path"`
51023      new_path="$input_path"
51024    fi
51025  fi
51026
51027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51028  if test "x$test_cygdrive_prefix" = x; then
51029    # As a simple fix, exclude /usr/bin since it's not a real path.
51030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51032      # a path prefixed by /cygdrive for fixpath to work.
51033      new_path="$CYGWIN_ROOT_PATH$input_path"
51034    fi
51035  fi
51036
51037
51038  if test "x$path" != "x$new_path"; then
51039    MSVC_DLL="$new_path"
51040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51042  fi
51043
51044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51045
51046  path="$MSVC_DLL"
51047  has_colon=`$ECHO $path | $GREP ^.:`
51048  new_path="$path"
51049  if test "x$has_colon" = x; then
51050    # Not in mixed or Windows style, start by that.
51051    new_path=`cmd //c echo $path`
51052  fi
51053
51054
51055  input_path="$new_path"
51056  # Check if we need to convert this using DOS-style short mode. If the path
51057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51058  # take no chances and rewrite it.
51059  # Note: m4 eats our [], so we need to use [ and ] instead.
51060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51061  if test "x$has_forbidden_chars" != x; then
51062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51064  fi
51065
51066
51067  windows_path="$new_path"
51068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51069    unix_path=`$CYGPATH -u "$windows_path"`
51070    new_path="$unix_path"
51071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51073    new_path="$unix_path"
51074  fi
51075
51076  if test "x$path" != "x$new_path"; then
51077    MSVC_DLL="$new_path"
51078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51079$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51080  fi
51081
51082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51084
51085    else
51086      # We're on a unix platform. Hooray! :)
51087      path="$MSVC_DLL"
51088      has_space=`$ECHO "$path" | $GREP " "`
51089      if test "x$has_space" != x; then
51090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51091$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51093      fi
51094
51095      # Use eval to expand a potential ~
51096      eval path="$path"
51097      if test ! -f "$path" && test ! -d "$path"; then
51098        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51099      fi
51100
51101      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51102    fi
51103  fi
51104
51105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51106$as_echo_n "checking for $DLL_NAME... " >&6; }
51107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51108$as_echo "$MSVC_DLL" >&6; }
51109    else
51110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51111$as_echo "incorrect, ignoring" >&6; }
51112      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51113$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51114    fi
51115  fi
51116
51117    fi
51118  fi
51119
51120  if test "x$MSVC_DLL" = x; then
51121    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51122    # (This was the original behaviour; kept since it might turn something up)
51123    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51124      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51125        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51126	    | $GREP x64 | $HEAD --lines 1`
51127      else
51128        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51129	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51130        if test "x$POSSIBLE_MSVC_DLL" = x; then
51131          # We're grasping at straws now...
51132          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51133	      | $HEAD --lines 1`
51134        fi
51135      fi
51136
51137
51138  DLL_NAME="$DLL_NAME"
51139  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51140  METHOD="search of VCINSTALLDIR"
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  # Only process if variable expands to non-empty
51170
51171  if test "x$MSVC_DLL" != x; then
51172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51173
51174  # Input might be given as Windows format, start by converting to
51175  # unix format.
51176  path="$MSVC_DLL"
51177  new_path=`$CYGPATH -u "$path"`
51178
51179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51182  # "foo.exe" is OK but "foo" is an error.
51183  #
51184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51185  # It is also a way to make sure we got the proper file name for the real test later on.
51186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51187  if test "x$test_shortpath" = x; then
51188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51190    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51191  fi
51192
51193  # Call helper function which possibly converts this using DOS-style short mode.
51194  # If so, the updated path is stored in $new_path.
51195
51196  input_path="$new_path"
51197  # Check if we need to convert this using DOS-style short mode. If the path
51198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51199  # take no chances and rewrite it.
51200  # Note: m4 eats our [], so we need to use [ and ] instead.
51201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51202  if test "x$has_forbidden_chars" != x; then
51203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51207      # Going to short mode and back again did indeed matter. Since short mode is
51208      # case insensitive, let's make it lowercase to improve readability.
51209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51210      # Now convert it back to Unix-style (cygpath)
51211      input_path=`$CYGPATH -u "$shortmode_path"`
51212      new_path="$input_path"
51213    fi
51214  fi
51215
51216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51217  if test "x$test_cygdrive_prefix" = x; then
51218    # As a simple fix, exclude /usr/bin since it's not a real path.
51219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51221      # a path prefixed by /cygdrive for fixpath to work.
51222      new_path="$CYGWIN_ROOT_PATH$input_path"
51223    fi
51224  fi
51225
51226
51227  if test "x$path" != "x$new_path"; then
51228    MSVC_DLL="$new_path"
51229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51231  fi
51232
51233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51234
51235  path="$MSVC_DLL"
51236  has_colon=`$ECHO $path | $GREP ^.:`
51237  new_path="$path"
51238  if test "x$has_colon" = x; then
51239    # Not in mixed or Windows style, start by that.
51240    new_path=`cmd //c echo $path`
51241  fi
51242
51243
51244  input_path="$new_path"
51245  # Check if we need to convert this using DOS-style short mode. If the path
51246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51247  # take no chances and rewrite it.
51248  # Note: m4 eats our [], so we need to use [ and ] instead.
51249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51250  if test "x$has_forbidden_chars" != x; then
51251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51253  fi
51254
51255
51256  windows_path="$new_path"
51257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51258    unix_path=`$CYGPATH -u "$windows_path"`
51259    new_path="$unix_path"
51260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51262    new_path="$unix_path"
51263  fi
51264
51265  if test "x$path" != "x$new_path"; then
51266    MSVC_DLL="$new_path"
51267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51269  fi
51270
51271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51273
51274    else
51275      # We're on a unix platform. Hooray! :)
51276      path="$MSVC_DLL"
51277      has_space=`$ECHO "$path" | $GREP " "`
51278      if test "x$has_space" != x; then
51279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51282      fi
51283
51284      # Use eval to expand a potential ~
51285      eval path="$path"
51286      if test ! -f "$path" && test ! -d "$path"; then
51287        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51288      fi
51289
51290      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51291    fi
51292  fi
51293
51294      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51295$as_echo_n "checking for $DLL_NAME... " >&6; }
51296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51297$as_echo "$MSVC_DLL" >&6; }
51298    else
51299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51300$as_echo "incorrect, ignoring" >&6; }
51301      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51302$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51303    fi
51304  fi
51305
51306    fi
51307  fi
51308
51309  if test "x$MSVC_DLL" = x; then
51310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51311$as_echo_n "checking for $DLL_NAME... " >&6; }
51312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51313$as_echo "no" >&6; }
51314    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51315  fi
51316
51317    MSVCR_DLL="$MSVC_DLL"
51318  fi
51319
51320
51321
51322# Check whether --with-msvcp-dll was given.
51323if test "${with_msvcp_dll+set}" = set; then :
51324  withval=$with_msvcp_dll;
51325fi
51326
51327
51328  if test "x$MSVCP_NAME" != "x"; then
51329    if test "x$with_msvcp_dll" != x; then
51330      # If given explicitely by user, do not probe. If not present, fail directly.
51331
51332  DLL_NAME="$MSVCP_NAME"
51333  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51334  METHOD="--with-msvcp-dll"
51335  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51336    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51337$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51338
51339    # Need to check if the found msvcr is correct architecture
51340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51341$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51342    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51344      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51345      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51346      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51347        CORRECT_MSVCR_ARCH="PE32 executable"
51348      else
51349        CORRECT_MSVCR_ARCH="PE32+ executable"
51350      fi
51351    else
51352      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51353        CORRECT_MSVCR_ARCH=386
51354      else
51355        CORRECT_MSVCR_ARCH=x86-64
51356      fi
51357    fi
51358    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51360$as_echo "ok" >&6; }
51361      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51362
51363  # Only process if variable expands to non-empty
51364
51365  if test "x$MSVC_DLL" != x; then
51366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51367
51368  # Input might be given as Windows format, start by converting to
51369  # unix format.
51370  path="$MSVC_DLL"
51371  new_path=`$CYGPATH -u "$path"`
51372
51373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51376  # "foo.exe" is OK but "foo" is an error.
51377  #
51378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51379  # It is also a way to make sure we got the proper file name for the real test later on.
51380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51381  if test "x$test_shortpath" = x; then
51382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51384    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51385  fi
51386
51387  # Call helper function which possibly converts this using DOS-style short mode.
51388  # If so, the updated path is stored in $new_path.
51389
51390  input_path="$new_path"
51391  # Check if we need to convert this using DOS-style short mode. If the path
51392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51393  # take no chances and rewrite it.
51394  # Note: m4 eats our [], so we need to use [ and ] instead.
51395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51396  if test "x$has_forbidden_chars" != x; then
51397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51401      # Going to short mode and back again did indeed matter. Since short mode is
51402      # case insensitive, let's make it lowercase to improve readability.
51403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51404      # Now convert it back to Unix-style (cygpath)
51405      input_path=`$CYGPATH -u "$shortmode_path"`
51406      new_path="$input_path"
51407    fi
51408  fi
51409
51410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51411  if test "x$test_cygdrive_prefix" = x; then
51412    # As a simple fix, exclude /usr/bin since it's not a real path.
51413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51415      # a path prefixed by /cygdrive for fixpath to work.
51416      new_path="$CYGWIN_ROOT_PATH$input_path"
51417    fi
51418  fi
51419
51420
51421  if test "x$path" != "x$new_path"; then
51422    MSVC_DLL="$new_path"
51423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51424$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51425  fi
51426
51427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51428
51429  path="$MSVC_DLL"
51430  has_colon=`$ECHO $path | $GREP ^.:`
51431  new_path="$path"
51432  if test "x$has_colon" = x; then
51433    # Not in mixed or Windows style, start by that.
51434    new_path=`cmd //c echo $path`
51435  fi
51436
51437
51438  input_path="$new_path"
51439  # Check if we need to convert this using DOS-style short mode. If the path
51440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51441  # take no chances and rewrite it.
51442  # Note: m4 eats our [], so we need to use [ and ] instead.
51443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51444  if test "x$has_forbidden_chars" != x; then
51445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51447  fi
51448
51449
51450  windows_path="$new_path"
51451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51452    unix_path=`$CYGPATH -u "$windows_path"`
51453    new_path="$unix_path"
51454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51456    new_path="$unix_path"
51457  fi
51458
51459  if test "x$path" != "x$new_path"; then
51460    MSVC_DLL="$new_path"
51461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51462$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51463  fi
51464
51465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51467
51468    else
51469      # We're on a unix platform. Hooray! :)
51470      path="$MSVC_DLL"
51471      has_space=`$ECHO "$path" | $GREP " "`
51472      if test "x$has_space" != x; then
51473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51474$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51476      fi
51477
51478      # Use eval to expand a potential ~
51479      eval path="$path"
51480      if test ! -f "$path" && test ! -d "$path"; then
51481        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51482      fi
51483
51484      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51485    fi
51486  fi
51487
51488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51489$as_echo_n "checking for $DLL_NAME... " >&6; }
51490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51491$as_echo "$MSVC_DLL" >&6; }
51492    else
51493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51494$as_echo "incorrect, ignoring" >&6; }
51495      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51496$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51497    fi
51498  fi
51499
51500      if test "x$MSVC_DLL" = x; then
51501        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51502      fi
51503      MSVCP_DLL="$MSVC_DLL"
51504    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51505
51506  DLL_NAME="$MSVCP_NAME"
51507  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51508  METHOD="devkit"
51509  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51510    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51511$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51512
51513    # Need to check if the found msvcr is correct architecture
51514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51515$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51516    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51518      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51519      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51520      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51521        CORRECT_MSVCR_ARCH="PE32 executable"
51522      else
51523        CORRECT_MSVCR_ARCH="PE32+ executable"
51524      fi
51525    else
51526      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51527        CORRECT_MSVCR_ARCH=386
51528      else
51529        CORRECT_MSVCR_ARCH=x86-64
51530      fi
51531    fi
51532    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51534$as_echo "ok" >&6; }
51535      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51536
51537  # Only process if variable expands to non-empty
51538
51539  if test "x$MSVC_DLL" != x; then
51540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51541
51542  # Input might be given as Windows format, start by converting to
51543  # unix format.
51544  path="$MSVC_DLL"
51545  new_path=`$CYGPATH -u "$path"`
51546
51547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51550  # "foo.exe" is OK but "foo" is an error.
51551  #
51552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51553  # It is also a way to make sure we got the proper file name for the real test later on.
51554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51555  if test "x$test_shortpath" = x; then
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51557$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51558    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51559  fi
51560
51561  # Call helper function which possibly converts this using DOS-style short mode.
51562  # If so, the updated path is stored in $new_path.
51563
51564  input_path="$new_path"
51565  # Check if we need to convert this using DOS-style short mode. If the path
51566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51567  # take no chances and rewrite it.
51568  # Note: m4 eats our [], so we need to use [ and ] instead.
51569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51570  if test "x$has_forbidden_chars" != x; then
51571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51575      # Going to short mode and back again did indeed matter. Since short mode is
51576      # case insensitive, let's make it lowercase to improve readability.
51577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51578      # Now convert it back to Unix-style (cygpath)
51579      input_path=`$CYGPATH -u "$shortmode_path"`
51580      new_path="$input_path"
51581    fi
51582  fi
51583
51584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51585  if test "x$test_cygdrive_prefix" = x; then
51586    # As a simple fix, exclude /usr/bin since it's not a real path.
51587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51589      # a path prefixed by /cygdrive for fixpath to work.
51590      new_path="$CYGWIN_ROOT_PATH$input_path"
51591    fi
51592  fi
51593
51594
51595  if test "x$path" != "x$new_path"; then
51596    MSVC_DLL="$new_path"
51597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51598$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51599  fi
51600
51601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51602
51603  path="$MSVC_DLL"
51604  has_colon=`$ECHO $path | $GREP ^.:`
51605  new_path="$path"
51606  if test "x$has_colon" = x; then
51607    # Not in mixed or Windows style, start by that.
51608    new_path=`cmd //c echo $path`
51609  fi
51610
51611
51612  input_path="$new_path"
51613  # Check if we need to convert this using DOS-style short mode. If the path
51614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51615  # take no chances and rewrite it.
51616  # Note: m4 eats our [], so we need to use [ and ] instead.
51617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51618  if test "x$has_forbidden_chars" != x; then
51619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51621  fi
51622
51623
51624  windows_path="$new_path"
51625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51626    unix_path=`$CYGPATH -u "$windows_path"`
51627    new_path="$unix_path"
51628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51630    new_path="$unix_path"
51631  fi
51632
51633  if test "x$path" != "x$new_path"; then
51634    MSVC_DLL="$new_path"
51635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51636$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51637  fi
51638
51639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51641
51642    else
51643      # We're on a unix platform. Hooray! :)
51644      path="$MSVC_DLL"
51645      has_space=`$ECHO "$path" | $GREP " "`
51646      if test "x$has_space" != x; then
51647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51648$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51650      fi
51651
51652      # Use eval to expand a potential ~
51653      eval path="$path"
51654      if test ! -f "$path" && test ! -d "$path"; then
51655        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51656      fi
51657
51658      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51659    fi
51660  fi
51661
51662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51663$as_echo_n "checking for $DLL_NAME... " >&6; }
51664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51665$as_echo "$MSVC_DLL" >&6; }
51666    else
51667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51668$as_echo "incorrect, ignoring" >&6; }
51669      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51670$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51671    fi
51672  fi
51673
51674      if test "x$MSVC_DLL" = x; then
51675        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51676      fi
51677      MSVCP_DLL="$MSVC_DLL"
51678    else
51679
51680  DLL_NAME="${MSVCP_NAME}"
51681  MSVC_DLL=
51682
51683  if test "x$MSVC_DLL" = x; then
51684    # Probe: Using well-known location from Visual Studio 10.0
51685    if test "x$VCINSTALLDIR" != x; then
51686      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51687
51688  windows_path="$CYGWIN_VC_INSTALL_DIR"
51689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51690    unix_path=`$CYGPATH -u "$windows_path"`
51691    CYGWIN_VC_INSTALL_DIR="$unix_path"
51692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51694    CYGWIN_VC_INSTALL_DIR="$unix_path"
51695  fi
51696
51697      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51698        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51699      else
51700        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51701      fi
51702      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51703
51704  DLL_NAME="$DLL_NAME"
51705  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51706  METHOD="well-known location in VCINSTALLDIR"
51707  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51709$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51710
51711    # Need to check if the found msvcr is correct architecture
51712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51713$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51714    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51716      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51717      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51718      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51719        CORRECT_MSVCR_ARCH="PE32 executable"
51720      else
51721        CORRECT_MSVCR_ARCH="PE32+ executable"
51722      fi
51723    else
51724      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51725        CORRECT_MSVCR_ARCH=386
51726      else
51727        CORRECT_MSVCR_ARCH=x86-64
51728      fi
51729    fi
51730    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51732$as_echo "ok" >&6; }
51733      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51734
51735  # Only process if variable expands to non-empty
51736
51737  if test "x$MSVC_DLL" != x; then
51738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51739
51740  # Input might be given as Windows format, start by converting to
51741  # unix format.
51742  path="$MSVC_DLL"
51743  new_path=`$CYGPATH -u "$path"`
51744
51745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51748  # "foo.exe" is OK but "foo" is an error.
51749  #
51750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51751  # It is also a way to make sure we got the proper file name for the real test later on.
51752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51753  if test "x$test_shortpath" = x; then
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51755$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51756    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51757  fi
51758
51759  # Call helper function which possibly converts this using DOS-style short mode.
51760  # If so, the updated path is stored in $new_path.
51761
51762  input_path="$new_path"
51763  # Check if we need to convert this using DOS-style short mode. If the path
51764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51765  # take no chances and rewrite it.
51766  # Note: m4 eats our [], so we need to use [ and ] instead.
51767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51768  if test "x$has_forbidden_chars" != x; then
51769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51773      # Going to short mode and back again did indeed matter. Since short mode is
51774      # case insensitive, let's make it lowercase to improve readability.
51775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51776      # Now convert it back to Unix-style (cygpath)
51777      input_path=`$CYGPATH -u "$shortmode_path"`
51778      new_path="$input_path"
51779    fi
51780  fi
51781
51782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51783  if test "x$test_cygdrive_prefix" = x; then
51784    # As a simple fix, exclude /usr/bin since it's not a real path.
51785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51787      # a path prefixed by /cygdrive for fixpath to work.
51788      new_path="$CYGWIN_ROOT_PATH$input_path"
51789    fi
51790  fi
51791
51792
51793  if test "x$path" != "x$new_path"; then
51794    MSVC_DLL="$new_path"
51795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51796$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51797  fi
51798
51799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51800
51801  path="$MSVC_DLL"
51802  has_colon=`$ECHO $path | $GREP ^.:`
51803  new_path="$path"
51804  if test "x$has_colon" = x; then
51805    # Not in mixed or Windows style, start by that.
51806    new_path=`cmd //c echo $path`
51807  fi
51808
51809
51810  input_path="$new_path"
51811  # Check if we need to convert this using DOS-style short mode. If the path
51812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51813  # take no chances and rewrite it.
51814  # Note: m4 eats our [], so we need to use [ and ] instead.
51815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51816  if test "x$has_forbidden_chars" != x; then
51817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51819  fi
51820
51821
51822  windows_path="$new_path"
51823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51824    unix_path=`$CYGPATH -u "$windows_path"`
51825    new_path="$unix_path"
51826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51828    new_path="$unix_path"
51829  fi
51830
51831  if test "x$path" != "x$new_path"; then
51832    MSVC_DLL="$new_path"
51833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51835  fi
51836
51837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51839
51840    else
51841      # We're on a unix platform. Hooray! :)
51842      path="$MSVC_DLL"
51843      has_space=`$ECHO "$path" | $GREP " "`
51844      if test "x$has_space" != x; then
51845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51846$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51848      fi
51849
51850      # Use eval to expand a potential ~
51851      eval path="$path"
51852      if test ! -f "$path" && test ! -d "$path"; then
51853        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51854      fi
51855
51856      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51857    fi
51858  fi
51859
51860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51861$as_echo_n "checking for $DLL_NAME... " >&6; }
51862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51863$as_echo "$MSVC_DLL" >&6; }
51864    else
51865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51866$as_echo "incorrect, ignoring" >&6; }
51867      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51868$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51869    fi
51870  fi
51871
51872    fi
51873  fi
51874
51875  if test "x$MSVC_DLL" = x; then
51876    # Probe: Check in the Boot JDK directory.
51877    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51878
51879  DLL_NAME="$DLL_NAME"
51880  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51881  METHOD="well-known location in Boot JDK"
51882  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51883    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51884$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51885
51886    # Need to check if the found msvcr is correct architecture
51887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51888$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51889    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51891      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51892      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51893      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51894        CORRECT_MSVCR_ARCH="PE32 executable"
51895      else
51896        CORRECT_MSVCR_ARCH="PE32+ executable"
51897      fi
51898    else
51899      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51900        CORRECT_MSVCR_ARCH=386
51901      else
51902        CORRECT_MSVCR_ARCH=x86-64
51903      fi
51904    fi
51905    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51907$as_echo "ok" >&6; }
51908      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51909
51910  # Only process if variable expands to non-empty
51911
51912  if test "x$MSVC_DLL" != x; then
51913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51914
51915  # Input might be given as Windows format, start by converting to
51916  # unix format.
51917  path="$MSVC_DLL"
51918  new_path=`$CYGPATH -u "$path"`
51919
51920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51923  # "foo.exe" is OK but "foo" is an error.
51924  #
51925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51926  # It is also a way to make sure we got the proper file name for the real test later on.
51927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51928  if test "x$test_shortpath" = x; then
51929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51930$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51931    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51932  fi
51933
51934  # Call helper function which possibly converts this using DOS-style short mode.
51935  # If so, the updated path is stored in $new_path.
51936
51937  input_path="$new_path"
51938  # Check if we need to convert this using DOS-style short mode. If the path
51939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51940  # take no chances and rewrite it.
51941  # Note: m4 eats our [], so we need to use [ and ] instead.
51942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51943  if test "x$has_forbidden_chars" != x; then
51944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51948      # Going to short mode and back again did indeed matter. Since short mode is
51949      # case insensitive, let's make it lowercase to improve readability.
51950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51951      # Now convert it back to Unix-style (cygpath)
51952      input_path=`$CYGPATH -u "$shortmode_path"`
51953      new_path="$input_path"
51954    fi
51955  fi
51956
51957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51958  if test "x$test_cygdrive_prefix" = x; then
51959    # As a simple fix, exclude /usr/bin since it's not a real path.
51960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51962      # a path prefixed by /cygdrive for fixpath to work.
51963      new_path="$CYGWIN_ROOT_PATH$input_path"
51964    fi
51965  fi
51966
51967
51968  if test "x$path" != "x$new_path"; then
51969    MSVC_DLL="$new_path"
51970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51971$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51972  fi
51973
51974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51975
51976  path="$MSVC_DLL"
51977  has_colon=`$ECHO $path | $GREP ^.:`
51978  new_path="$path"
51979  if test "x$has_colon" = x; then
51980    # Not in mixed or Windows style, start by that.
51981    new_path=`cmd //c echo $path`
51982  fi
51983
51984
51985  input_path="$new_path"
51986  # Check if we need to convert this using DOS-style short mode. If the path
51987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51988  # take no chances and rewrite it.
51989  # Note: m4 eats our [], so we need to use [ and ] instead.
51990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51991  if test "x$has_forbidden_chars" != x; then
51992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51994  fi
51995
51996
51997  windows_path="$new_path"
51998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51999    unix_path=`$CYGPATH -u "$windows_path"`
52000    new_path="$unix_path"
52001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52003    new_path="$unix_path"
52004  fi
52005
52006  if test "x$path" != "x$new_path"; then
52007    MSVC_DLL="$new_path"
52008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52009$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52010  fi
52011
52012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52014
52015    else
52016      # We're on a unix platform. Hooray! :)
52017      path="$MSVC_DLL"
52018      has_space=`$ECHO "$path" | $GREP " "`
52019      if test "x$has_space" != x; then
52020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52021$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52023      fi
52024
52025      # Use eval to expand a potential ~
52026      eval path="$path"
52027      if test ! -f "$path" && test ! -d "$path"; then
52028        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52029      fi
52030
52031      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52032    fi
52033  fi
52034
52035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52036$as_echo_n "checking for $DLL_NAME... " >&6; }
52037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52038$as_echo "$MSVC_DLL" >&6; }
52039    else
52040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52041$as_echo "incorrect, ignoring" >&6; }
52042      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52043$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52044    fi
52045  fi
52046
52047  fi
52048
52049  if test "x$MSVC_DLL" = x; then
52050    # Probe: Look in the Windows system32 directory
52051    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52052
52053  windows_path="$CYGWIN_SYSTEMROOT"
52054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52055    unix_path=`$CYGPATH -u "$windows_path"`
52056    CYGWIN_SYSTEMROOT="$unix_path"
52057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52059    CYGWIN_SYSTEMROOT="$unix_path"
52060  fi
52061
52062    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52063
52064  DLL_NAME="$DLL_NAME"
52065  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52066  METHOD="well-known location in SYSTEMROOT"
52067  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52068    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52069$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52070
52071    # Need to check if the found msvcr is correct architecture
52072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52073$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52074    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52076      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52077      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52078      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52079        CORRECT_MSVCR_ARCH="PE32 executable"
52080      else
52081        CORRECT_MSVCR_ARCH="PE32+ executable"
52082      fi
52083    else
52084      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52085        CORRECT_MSVCR_ARCH=386
52086      else
52087        CORRECT_MSVCR_ARCH=x86-64
52088      fi
52089    fi
52090    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52092$as_echo "ok" >&6; }
52093      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52094
52095  # Only process if variable expands to non-empty
52096
52097  if test "x$MSVC_DLL" != x; then
52098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52099
52100  # Input might be given as Windows format, start by converting to
52101  # unix format.
52102  path="$MSVC_DLL"
52103  new_path=`$CYGPATH -u "$path"`
52104
52105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52108  # "foo.exe" is OK but "foo" is an error.
52109  #
52110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52111  # It is also a way to make sure we got the proper file name for the real test later on.
52112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52113  if test "x$test_shortpath" = x; then
52114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52115$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52116    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52117  fi
52118
52119  # Call helper function which possibly converts this using DOS-style short mode.
52120  # If so, the updated path is stored in $new_path.
52121
52122  input_path="$new_path"
52123  # Check if we need to convert this using DOS-style short mode. If the path
52124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52125  # take no chances and rewrite it.
52126  # Note: m4 eats our [], so we need to use [ and ] instead.
52127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52128  if test "x$has_forbidden_chars" != x; then
52129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52133      # Going to short mode and back again did indeed matter. Since short mode is
52134      # case insensitive, let's make it lowercase to improve readability.
52135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52136      # Now convert it back to Unix-style (cygpath)
52137      input_path=`$CYGPATH -u "$shortmode_path"`
52138      new_path="$input_path"
52139    fi
52140  fi
52141
52142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52143  if test "x$test_cygdrive_prefix" = x; then
52144    # As a simple fix, exclude /usr/bin since it's not a real path.
52145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52147      # a path prefixed by /cygdrive for fixpath to work.
52148      new_path="$CYGWIN_ROOT_PATH$input_path"
52149    fi
52150  fi
52151
52152
52153  if test "x$path" != "x$new_path"; then
52154    MSVC_DLL="$new_path"
52155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52156$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52157  fi
52158
52159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52160
52161  path="$MSVC_DLL"
52162  has_colon=`$ECHO $path | $GREP ^.:`
52163  new_path="$path"
52164  if test "x$has_colon" = x; then
52165    # Not in mixed or Windows style, start by that.
52166    new_path=`cmd //c echo $path`
52167  fi
52168
52169
52170  input_path="$new_path"
52171  # Check if we need to convert this using DOS-style short mode. If the path
52172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52173  # take no chances and rewrite it.
52174  # Note: m4 eats our [], so we need to use [ and ] instead.
52175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52176  if test "x$has_forbidden_chars" != x; then
52177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52179  fi
52180
52181
52182  windows_path="$new_path"
52183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52184    unix_path=`$CYGPATH -u "$windows_path"`
52185    new_path="$unix_path"
52186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52188    new_path="$unix_path"
52189  fi
52190
52191  if test "x$path" != "x$new_path"; then
52192    MSVC_DLL="$new_path"
52193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52194$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52195  fi
52196
52197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52199
52200    else
52201      # We're on a unix platform. Hooray! :)
52202      path="$MSVC_DLL"
52203      has_space=`$ECHO "$path" | $GREP " "`
52204      if test "x$has_space" != x; then
52205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52206$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52208      fi
52209
52210      # Use eval to expand a potential ~
52211      eval path="$path"
52212      if test ! -f "$path" && test ! -d "$path"; then
52213        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52214      fi
52215
52216      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52217    fi
52218  fi
52219
52220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52221$as_echo_n "checking for $DLL_NAME... " >&6; }
52222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52223$as_echo "$MSVC_DLL" >&6; }
52224    else
52225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52226$as_echo "incorrect, ignoring" >&6; }
52227      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52228$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52229    fi
52230  fi
52231
52232  fi
52233
52234  if test "x$MSVC_DLL" = x; then
52235    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52236    if test "x$VS100COMNTOOLS" != x; then
52237      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52238
52239  windows_path="$CYGWIN_VS_TOOLS_DIR"
52240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52241    unix_path=`$CYGPATH -u "$windows_path"`
52242    CYGWIN_VS_TOOLS_DIR="$unix_path"
52243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52245    CYGWIN_VS_TOOLS_DIR="$unix_path"
52246  fi
52247
52248      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52249        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52250	    | $GREP -i /x64/ | $HEAD --lines 1`
52251      else
52252        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52253	    | $GREP -i /x86/ | $HEAD --lines 1`
52254      fi
52255
52256  DLL_NAME="$DLL_NAME"
52257  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52258  METHOD="search of VS100COMNTOOLS"
52259  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52261$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52262
52263    # Need to check if the found msvcr is correct architecture
52264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52265$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52266    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52268      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52269      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52271        CORRECT_MSVCR_ARCH="PE32 executable"
52272      else
52273        CORRECT_MSVCR_ARCH="PE32+ executable"
52274      fi
52275    else
52276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52277        CORRECT_MSVCR_ARCH=386
52278      else
52279        CORRECT_MSVCR_ARCH=x86-64
52280      fi
52281    fi
52282    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52284$as_echo "ok" >&6; }
52285      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52286
52287  # Only process if variable expands to non-empty
52288
52289  if test "x$MSVC_DLL" != x; then
52290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52291
52292  # Input might be given as Windows format, start by converting to
52293  # unix format.
52294  path="$MSVC_DLL"
52295  new_path=`$CYGPATH -u "$path"`
52296
52297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52300  # "foo.exe" is OK but "foo" is an error.
52301  #
52302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52303  # It is also a way to make sure we got the proper file name for the real test later on.
52304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52305  if test "x$test_shortpath" = x; then
52306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52307$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52308    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52309  fi
52310
52311  # Call helper function which possibly converts this using DOS-style short mode.
52312  # If so, the updated path is stored in $new_path.
52313
52314  input_path="$new_path"
52315  # Check if we need to convert this using DOS-style short mode. If the path
52316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52317  # take no chances and rewrite it.
52318  # Note: m4 eats our [], so we need to use [ and ] instead.
52319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52320  if test "x$has_forbidden_chars" != x; then
52321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52325      # Going to short mode and back again did indeed matter. Since short mode is
52326      # case insensitive, let's make it lowercase to improve readability.
52327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52328      # Now convert it back to Unix-style (cygpath)
52329      input_path=`$CYGPATH -u "$shortmode_path"`
52330      new_path="$input_path"
52331    fi
52332  fi
52333
52334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52335  if test "x$test_cygdrive_prefix" = x; then
52336    # As a simple fix, exclude /usr/bin since it's not a real path.
52337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52339      # a path prefixed by /cygdrive for fixpath to work.
52340      new_path="$CYGWIN_ROOT_PATH$input_path"
52341    fi
52342  fi
52343
52344
52345  if test "x$path" != "x$new_path"; then
52346    MSVC_DLL="$new_path"
52347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52348$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52349  fi
52350
52351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52352
52353  path="$MSVC_DLL"
52354  has_colon=`$ECHO $path | $GREP ^.:`
52355  new_path="$path"
52356  if test "x$has_colon" = x; then
52357    # Not in mixed or Windows style, start by that.
52358    new_path=`cmd //c echo $path`
52359  fi
52360
52361
52362  input_path="$new_path"
52363  # Check if we need to convert this using DOS-style short mode. If the path
52364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52365  # take no chances and rewrite it.
52366  # Note: m4 eats our [], so we need to use [ and ] instead.
52367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52368  if test "x$has_forbidden_chars" != x; then
52369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52371  fi
52372
52373
52374  windows_path="$new_path"
52375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52376    unix_path=`$CYGPATH -u "$windows_path"`
52377    new_path="$unix_path"
52378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52380    new_path="$unix_path"
52381  fi
52382
52383  if test "x$path" != "x$new_path"; then
52384    MSVC_DLL="$new_path"
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52387  fi
52388
52389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52391
52392    else
52393      # We're on a unix platform. Hooray! :)
52394      path="$MSVC_DLL"
52395      has_space=`$ECHO "$path" | $GREP " "`
52396      if test "x$has_space" != x; then
52397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52398$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52400      fi
52401
52402      # Use eval to expand a potential ~
52403      eval path="$path"
52404      if test ! -f "$path" && test ! -d "$path"; then
52405        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52406      fi
52407
52408      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52409    fi
52410  fi
52411
52412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52413$as_echo_n "checking for $DLL_NAME... " >&6; }
52414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52415$as_echo "$MSVC_DLL" >&6; }
52416    else
52417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52418$as_echo "incorrect, ignoring" >&6; }
52419      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52420$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52421    fi
52422  fi
52423
52424    fi
52425  fi
52426
52427  if test "x$MSVC_DLL" = x; then
52428    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52429    # (This was the original behaviour; kept since it might turn something up)
52430    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52431      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52432        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52433	    | $GREP x64 | $HEAD --lines 1`
52434      else
52435        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52436	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52437        if test "x$POSSIBLE_MSVC_DLL" = x; then
52438          # We're grasping at straws now...
52439          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52440	      | $HEAD --lines 1`
52441        fi
52442      fi
52443
52444
52445  DLL_NAME="$DLL_NAME"
52446  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52447  METHOD="search of VCINSTALLDIR"
52448  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52449    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52450$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52451
52452    # Need to check if the found msvcr is correct architecture
52453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52454$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52455    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52457      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52458      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52459      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52460        CORRECT_MSVCR_ARCH="PE32 executable"
52461      else
52462        CORRECT_MSVCR_ARCH="PE32+ executable"
52463      fi
52464    else
52465      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52466        CORRECT_MSVCR_ARCH=386
52467      else
52468        CORRECT_MSVCR_ARCH=x86-64
52469      fi
52470    fi
52471    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52473$as_echo "ok" >&6; }
52474      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52475
52476  # Only process if variable expands to non-empty
52477
52478  if test "x$MSVC_DLL" != x; then
52479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52480
52481  # Input might be given as Windows format, start by converting to
52482  # unix format.
52483  path="$MSVC_DLL"
52484  new_path=`$CYGPATH -u "$path"`
52485
52486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52489  # "foo.exe" is OK but "foo" is an error.
52490  #
52491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52492  # It is also a way to make sure we got the proper file name for the real test later on.
52493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52494  if test "x$test_shortpath" = x; then
52495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52496$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52497    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52498  fi
52499
52500  # Call helper function which possibly converts this using DOS-style short mode.
52501  # If so, the updated path is stored in $new_path.
52502
52503  input_path="$new_path"
52504  # Check if we need to convert this using DOS-style short mode. If the path
52505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52506  # take no chances and rewrite it.
52507  # Note: m4 eats our [], so we need to use [ and ] instead.
52508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52509  if test "x$has_forbidden_chars" != x; then
52510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52514      # Going to short mode and back again did indeed matter. Since short mode is
52515      # case insensitive, let's make it lowercase to improve readability.
52516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52517      # Now convert it back to Unix-style (cygpath)
52518      input_path=`$CYGPATH -u "$shortmode_path"`
52519      new_path="$input_path"
52520    fi
52521  fi
52522
52523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52524  if test "x$test_cygdrive_prefix" = x; then
52525    # As a simple fix, exclude /usr/bin since it's not a real path.
52526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52528      # a path prefixed by /cygdrive for fixpath to work.
52529      new_path="$CYGWIN_ROOT_PATH$input_path"
52530    fi
52531  fi
52532
52533
52534  if test "x$path" != "x$new_path"; then
52535    MSVC_DLL="$new_path"
52536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52537$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52538  fi
52539
52540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52541
52542  path="$MSVC_DLL"
52543  has_colon=`$ECHO $path | $GREP ^.:`
52544  new_path="$path"
52545  if test "x$has_colon" = x; then
52546    # Not in mixed or Windows style, start by that.
52547    new_path=`cmd //c echo $path`
52548  fi
52549
52550
52551  input_path="$new_path"
52552  # Check if we need to convert this using DOS-style short mode. If the path
52553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52554  # take no chances and rewrite it.
52555  # Note: m4 eats our [], so we need to use [ and ] instead.
52556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52557  if test "x$has_forbidden_chars" != x; then
52558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52560  fi
52561
52562
52563  windows_path="$new_path"
52564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52565    unix_path=`$CYGPATH -u "$windows_path"`
52566    new_path="$unix_path"
52567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52569    new_path="$unix_path"
52570  fi
52571
52572  if test "x$path" != "x$new_path"; then
52573    MSVC_DLL="$new_path"
52574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52575$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52576  fi
52577
52578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52580
52581    else
52582      # We're on a unix platform. Hooray! :)
52583      path="$MSVC_DLL"
52584      has_space=`$ECHO "$path" | $GREP " "`
52585      if test "x$has_space" != x; then
52586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52587$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52588        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52589      fi
52590
52591      # Use eval to expand a potential ~
52592      eval path="$path"
52593      if test ! -f "$path" && test ! -d "$path"; then
52594        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52595      fi
52596
52597      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52598    fi
52599  fi
52600
52601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52602$as_echo_n "checking for $DLL_NAME... " >&6; }
52603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52604$as_echo "$MSVC_DLL" >&6; }
52605    else
52606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52607$as_echo "incorrect, ignoring" >&6; }
52608      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52609$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52610    fi
52611  fi
52612
52613    fi
52614  fi
52615
52616  if test "x$MSVC_DLL" = x; then
52617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52618$as_echo_n "checking for $DLL_NAME... " >&6; }
52619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52620$as_echo "no" >&6; }
52621    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52622  fi
52623
52624      MSVCP_DLL="$MSVC_DLL"
52625    fi
52626
52627  fi
52628
52629
52630
52631# Check whether --with-dxsdk was given.
52632if test "${with_dxsdk+set}" = set; then :
52633  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52634$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52635fi
52636
52637
52638
52639
52640# Check whether --with-dxsdk-lib was given.
52641if test "${with_dxsdk_lib+set}" = set; then :
52642  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52643$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52644fi
52645
52646
52647
52648
52649# Check whether --with-dxsdk-include was given.
52650if test "${with_dxsdk_include+set}" = set; then :
52651  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52652$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52653fi
52654
52655
52656  fi
52657
52658
52659###############################################################################
52660#
52661# We need to do some final tweaking, when everything else is done.
52662#
52663###############################################################################
52664
52665
52666  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52667
52668
52669  # The name of the Service Agent jar.
52670  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52671  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52672    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52673  fi
52674
52675
52676
52677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52678$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52679
52680  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52681    ENABLE_INTREE_EC=yes
52682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52683$as_echo "yes" >&6; }
52684  else
52685    ENABLE_INTREE_EC=no
52686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52687$as_echo "no" >&6; }
52688  fi
52689
52690
52691
52692
52693###############################################################################
52694#
52695# Configure parts of the build that only affect the build performance,
52696# not the result.
52697#
52698###############################################################################
52699
52700
52701  # How many cores do we have on this build system?
52702
52703# Check whether --with-num-cores was given.
52704if test "${with_num_cores+set}" = set; then :
52705  withval=$with_num_cores;
52706fi
52707
52708  if test "x$with_num_cores" = x; then
52709    # The number of cores were not specified, try to probe them.
52710
52711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52712$as_echo_n "checking for number of cores... " >&6; }
52713  NUM_CORES=1
52714  FOUND_CORES=no
52715
52716  if test -f /proc/cpuinfo; then
52717    # Looks like a Linux (or cygwin) system
52718    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52719    FOUND_CORES=yes
52720  elif test -x /usr/sbin/psrinfo; then
52721    # Looks like a Solaris system
52722    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52723    FOUND_CORES=yes
52724  elif test -x /usr/sbin/system_profiler; then
52725    # Looks like a MacOSX system
52726    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52727    FOUND_CORES=yes
52728  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52729    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52730    FOUND_CORES=yes
52731  elif test -n "$NUMBER_OF_PROCESSORS"; then
52732    # On windows, look in the env
52733    NUM_CORES=$NUMBER_OF_PROCESSORS
52734    FOUND_CORES=yes
52735  fi
52736
52737  if test "x$FOUND_CORES" = xyes; then
52738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52739$as_echo "$NUM_CORES" >&6; }
52740  else
52741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52742$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52743    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52744$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52745  fi
52746
52747  else
52748    NUM_CORES=$with_num_cores
52749  fi
52750
52751
52752
52753  # How much memory do we have on this build system?
52754
52755# Check whether --with-memory-size was given.
52756if test "${with_memory_size+set}" = set; then :
52757  withval=$with_memory_size;
52758fi
52759
52760  if test "x$with_memory_size" = x; then
52761    # The memory size was not specified, try to probe it.
52762
52763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52764$as_echo_n "checking for memory size... " >&6; }
52765  # Default to 1024 MB
52766  MEMORY_SIZE=1024
52767  FOUND_MEM=no
52768
52769  if test -f /proc/meminfo; then
52770    # Looks like a Linux (or cygwin) system
52771    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52772    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52773    FOUND_MEM=yes
52774  elif test -x /usr/sbin/prtconf; then
52775    # Looks like a Solaris or AIX system
52776    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52777    FOUND_MEM=yes
52778  elif test -x /usr/sbin/system_profiler; then
52779    # Looks like a MacOSX system
52780    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52781    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52782    FOUND_MEM=yes
52783  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52784    # Windows, but without cygwin
52785    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52786    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52787    FOUND_MEM=yes
52788  fi
52789
52790  if test "x$FOUND_MEM" = xyes; then
52791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52792$as_echo "$MEMORY_SIZE MB" >&6; }
52793  else
52794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52795$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52796    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52797$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52798  fi
52799
52800  else
52801    MEMORY_SIZE=$with_memory_size
52802  fi
52803
52804
52805
52806  # Provide a decent default number of parallel jobs for make depending on
52807  # number of cores, amount of memory and machine architecture.
52808
52809# Check whether --with-jobs was given.
52810if test "${with_jobs+set}" = set; then :
52811  withval=$with_jobs;
52812fi
52813
52814  if test "x$with_jobs" = x; then
52815    # Number of jobs was not specified, calculate.
52816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52817$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52818    # Approximate memory in GB.
52819    memory_gb=`expr $MEMORY_SIZE / 1024`
52820    # Pick the lowest of memory in gb and number of cores.
52821    if test "$memory_gb" -lt "$NUM_CORES"; then
52822      JOBS="$memory_gb"
52823    else
52824      JOBS="$NUM_CORES"
52825      # On bigger machines, leave some room for other processes to run
52826      if test "$JOBS" -gt "4"; then
52827        JOBS=`expr $JOBS '*' 90 / 100`
52828      fi
52829    fi
52830    # Cap number of jobs to 16
52831    if test "$JOBS" -gt "16"; then
52832      JOBS=16
52833    fi
52834    if test "$JOBS" -eq "0"; then
52835      JOBS=1
52836    fi
52837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52838$as_echo "$JOBS" >&6; }
52839  else
52840    JOBS=$with_jobs
52841  fi
52842
52843
52844
52845# Setup arguments for the boot jdk (after cores and memory have been setup)
52846
52847  ##############################################################################
52848  #
52849  # Specify jvm options for anything that is run with the Boot JDK.
52850  # Not all JVM:s accept the same arguments on the command line.
52851  #
52852
52853# Check whether --with-boot-jdk-jvmargs was given.
52854if test "${with_boot_jdk_jvmargs+set}" = set; then :
52855  withval=$with_boot_jdk_jvmargs;
52856fi
52857
52858
52859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52860$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52861
52862  # Disable special log output when a debug build is used as Boot JDK...
52863
52864  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52865  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52866  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52867  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52868  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52869  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52870    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52871    JVM_ARG_OK=true
52872  else
52873    $ECHO "Arg failed:" >&5
52874    $ECHO "$OUTPUT" >&5
52875    JVM_ARG_OK=false
52876  fi
52877
52878
52879  # Apply user provided options.
52880
52881  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52882  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52883  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52884  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52885  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52886  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52887    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52888    JVM_ARG_OK=true
52889  else
52890    $ECHO "Arg failed:" >&5
52891    $ECHO "$OUTPUT" >&5
52892    JVM_ARG_OK=false
52893  fi
52894
52895
52896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52897$as_echo "$boot_jdk_jvmargs" >&6; }
52898
52899  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52900  JAVA_FLAGS=$boot_jdk_jvmargs
52901
52902
52903
52904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52905$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52906
52907  # Starting amount of heap memory.
52908
52909  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52910  $ECHO "Command: $JAVA -Xms64M -version" >&5
52911  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52912  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52913  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52914  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52915    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52916    JVM_ARG_OK=true
52917  else
52918    $ECHO "Arg failed:" >&5
52919    $ECHO "$OUTPUT" >&5
52920    JVM_ARG_OK=false
52921  fi
52922
52923
52924  # Maximum amount of heap memory.
52925  # Maximum stack size.
52926  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52927  if test "x$BUILD_NUM_BITS" = x32; then
52928    if test "$JVM_MAX_HEAP" -gt "1100"; then
52929      JVM_MAX_HEAP=1100
52930    elif test "$JVM_MAX_HEAP" -lt "512"; then
52931      JVM_MAX_HEAP=512
52932    fi
52933    STACK_SIZE=768
52934  else
52935    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52936    # pointers are used. Apparently, we need to increase the heap and stack
52937    # space for the jvm. More specifically, when running javac to build huge
52938    # jdk batch
52939    if test "$JVM_MAX_HEAP" -gt "1600"; then
52940      JVM_MAX_HEAP=1600
52941    elif test "$JVM_MAX_HEAP" -lt "512"; then
52942      JVM_MAX_HEAP=512
52943    fi
52944    STACK_SIZE=1536
52945  fi
52946
52947  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52948  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52949  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52950  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52951  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52952  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52953    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52954    JVM_ARG_OK=true
52955  else
52956    $ECHO "Arg failed:" >&5
52957    $ECHO "$OUTPUT" >&5
52958    JVM_ARG_OK=false
52959  fi
52960
52961
52962  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52963  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52964  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52965  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52966  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52967  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52968    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52969    JVM_ARG_OK=true
52970  else
52971    $ECHO "Arg failed:" >&5
52972    $ECHO "$OUTPUT" >&5
52973    JVM_ARG_OK=false
52974  fi
52975
52976
52977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52978$as_echo "$boot_jdk_jvmargs_big" >&6; }
52979
52980  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52981
52982
52983
52984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52985$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52986
52987  # Use serial gc for small short lived tools if possible
52988
52989  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52990  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52991  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52992  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52993  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52994  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52995    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52996    JVM_ARG_OK=true
52997  else
52998    $ECHO "Arg failed:" >&5
52999    $ECHO "$OUTPUT" >&5
53000    JVM_ARG_OK=false
53001  fi
53002
53003
53004  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53005  $ECHO "Command: $JAVA -Xms32M -version" >&5
53006  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53007  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53008  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53009  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53010    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53011    JVM_ARG_OK=true
53012  else
53013    $ECHO "Arg failed:" >&5
53014    $ECHO "$OUTPUT" >&5
53015    JVM_ARG_OK=false
53016  fi
53017
53018
53019  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53020  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53021  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53022  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53023  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53024  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53025    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53026    JVM_ARG_OK=true
53027  else
53028    $ECHO "Arg failed:" >&5
53029    $ECHO "$OUTPUT" >&5
53030    JVM_ARG_OK=false
53031  fi
53032
53033
53034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53035$as_echo "$boot_jdk_jvmargs_small" >&6; }
53036
53037  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53038
53039
53040  JAVA_TOOL_FLAGS_SMALL=""
53041  for f in $JAVA_FLAGS_SMALL; do
53042    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53043  done
53044
53045
53046
53047# Setup smart javac (after cores and memory have been setup)
53048
53049
53050# Check whether --with-sjavac-server-java was given.
53051if test "${with_sjavac_server_java+set}" = set; then :
53052  withval=$with_sjavac_server_java;
53053fi
53054
53055
53056  if test "x$with_sjavac_server_java" != x; then
53057    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53058    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53059    if test "x$FOUND_VERSION" = x; then
53060      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53061    fi
53062  else
53063    SJAVAC_SERVER_JAVA="$JAVA"
53064  fi
53065
53066
53067  if test "$MEMORY_SIZE" -gt "3000"; then
53068
53069  $ECHO "Check if jvm arg is ok: -d64" >&5
53070  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53071  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53072  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53073  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53074  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53075    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53076    JVM_ARG_OK=true
53077  else
53078    $ECHO "Arg failed:" >&5
53079    $ECHO "$OUTPUT" >&5
53080    JVM_ARG_OK=false
53081  fi
53082
53083    if test "$JVM_ARG_OK" = true; then
53084      JVM_64BIT=true
53085      JVM_ARG_OK=false
53086    fi
53087  fi
53088
53089  MX_VALUE=`expr $MEMORY_SIZE / 2`
53090  if test "$JVM_64BIT" = true; then
53091    # Set ms lower than mx since more than one instance of the server might
53092    # get launched at the same time before they figure out which instance won.
53093    MS_VALUE=512
53094    if test "$MX_VALUE" -gt "2048"; then
53095      MX_VALUE=2048
53096    fi
53097  else
53098    MS_VALUE=256
53099    if test "$MX_VALUE" -gt "1500"; then
53100      MX_VALUE=1500
53101    fi
53102  fi
53103  if test "$MX_VALUE" -lt "512"; then
53104    MX_VALUE=512
53105  fi
53106
53107  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53108  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53109  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53113    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53114    JVM_ARG_OK=true
53115  else
53116    $ECHO "Arg failed:" >&5
53117    $ECHO "$OUTPUT" >&5
53118    JVM_ARG_OK=false
53119  fi
53120
53121
53122
53123  # Check whether --enable-sjavac was given.
53124if test "${enable_sjavac+set}" = set; then :
53125  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53126else
53127  ENABLE_SJAVAC='no'
53128fi
53129
53130  if test "x$JVM_ARG_OK" = "xfalse"; then
53131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53132$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53133    ENABLE_SJAVAC=no;
53134  fi
53135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53136$as_echo_n "checking whether to use sjavac... " >&6; }
53137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53138$as_echo "$ENABLE_SJAVAC" >&6; }
53139
53140
53141
53142# Can the C/C++ compiler use precompiled headers?
53143
53144
53145  ###############################################################################
53146  #
53147  # Can the C/C++ compiler use precompiled headers?
53148  #
53149  # Check whether --enable-precompiled-headers was given.
53150if test "${enable_precompiled_headers+set}" = set; then :
53151  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53152else
53153  ENABLE_PRECOMPH=yes
53154fi
53155
53156
53157  USE_PRECOMPILED_HEADER=1
53158  if test "x$ENABLE_PRECOMPH" = xno; then
53159    USE_PRECOMPILED_HEADER=0
53160  fi
53161
53162  if test "x$ENABLE_PRECOMPH" = xyes; then
53163    # Check that the compiler actually supports precomp headers.
53164    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53166$as_echo_n "checking that precompiled headers work... " >&6; }
53167      echo "int alfa();" > conftest.h
53168      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53169      if test ! -f conftest.hpp.gch; then
53170        USE_PRECOMPILED_HEADER=0
53171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53172$as_echo "no" >&6; }
53173      else
53174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53175$as_echo "yes" >&6; }
53176      fi
53177      rm -f conftest.h conftest.hpp.gch
53178    fi
53179  fi
53180
53181
53182
53183
53184# Setup use of ccache, if available
53185
53186  # Check whether --enable-ccache was given.
53187if test "${enable_ccache+set}" = set; then :
53188  enableval=$enable_ccache;
53189fi
53190
53191
53192  CCACHE=
53193  CCACHE_STATUS=
53194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53195$as_echo_n "checking is ccache enabled... " >&6; }
53196  if test "x$enable_ccache" = xyes; then
53197    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53199$as_echo "yes" >&6; }
53200      OLD_PATH="$PATH"
53201      if test "x$TOOLCHAIN_PATH" != x; then
53202        PATH=$TOOLCHAIN_PATH:$PATH
53203      fi
53204
53205
53206
53207  # Publish this variable in the help.
53208
53209
53210  if test "x$CCACHE" = x; then
53211    # The variable is not set by user, try to locate tool using the code snippet
53212    for ac_prog in ccache
53213do
53214  # Extract the first word of "$ac_prog", so it can be a program name with args.
53215set dummy $ac_prog; ac_word=$2
53216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53217$as_echo_n "checking for $ac_word... " >&6; }
53218if ${ac_cv_path_CCACHE+:} false; then :
53219  $as_echo_n "(cached) " >&6
53220else
53221  case $CCACHE in
53222  [\\/]* | ?:[\\/]*)
53223  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53224  ;;
53225  *)
53226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53227for as_dir in $PATH
53228do
53229  IFS=$as_save_IFS
53230  test -z "$as_dir" && as_dir=.
53231    for ac_exec_ext in '' $ac_executable_extensions; do
53232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53233    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53235    break 2
53236  fi
53237done
53238  done
53239IFS=$as_save_IFS
53240
53241  ;;
53242esac
53243fi
53244CCACHE=$ac_cv_path_CCACHE
53245if test -n "$CCACHE"; then
53246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53247$as_echo "$CCACHE" >&6; }
53248else
53249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53250$as_echo "no" >&6; }
53251fi
53252
53253
53254  test -n "$CCACHE" && break
53255done
53256
53257  else
53258    # The variable is set, but is it from the command line or the environment?
53259
53260    # Try to remove the string !CCACHE! from our list.
53261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53263      # If it failed, the variable was not from the command line. Ignore it,
53264      # but warn the user (except for BASH, which is always set by the calling BASH).
53265      if test "xCCACHE" != xBASH; then
53266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53267$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53268      fi
53269      # Try to locate tool using the code snippet
53270      for ac_prog in ccache
53271do
53272  # Extract the first word of "$ac_prog", so it can be a program name with args.
53273set dummy $ac_prog; ac_word=$2
53274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53275$as_echo_n "checking for $ac_word... " >&6; }
53276if ${ac_cv_path_CCACHE+:} false; then :
53277  $as_echo_n "(cached) " >&6
53278else
53279  case $CCACHE in
53280  [\\/]* | ?:[\\/]*)
53281  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53282  ;;
53283  *)
53284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53285for as_dir in $PATH
53286do
53287  IFS=$as_save_IFS
53288  test -z "$as_dir" && as_dir=.
53289    for ac_exec_ext in '' $ac_executable_extensions; do
53290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53291    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53293    break 2
53294  fi
53295done
53296  done
53297IFS=$as_save_IFS
53298
53299  ;;
53300esac
53301fi
53302CCACHE=$ac_cv_path_CCACHE
53303if test -n "$CCACHE"; then
53304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53305$as_echo "$CCACHE" >&6; }
53306else
53307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53308$as_echo "no" >&6; }
53309fi
53310
53311
53312  test -n "$CCACHE" && break
53313done
53314
53315    else
53316      # If it succeeded, then it was overridden by the user. We will use it
53317      # for the tool.
53318
53319      # First remove it from the list of overridden variables, so we can test
53320      # for unknown variables in the end.
53321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53322
53323      # Check if the provided tool contains a complete path.
53324      tool_specified="$CCACHE"
53325      tool_basename="${tool_specified##*/}"
53326      if test "x$tool_basename" = "x$tool_specified"; then
53327        # A command without a complete path is provided, search $PATH.
53328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53329$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53330        # Extract the first word of "$tool_basename", so it can be a program name with args.
53331set dummy $tool_basename; ac_word=$2
53332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53333$as_echo_n "checking for $ac_word... " >&6; }
53334if ${ac_cv_path_CCACHE+:} false; then :
53335  $as_echo_n "(cached) " >&6
53336else
53337  case $CCACHE in
53338  [\\/]* | ?:[\\/]*)
53339  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53340  ;;
53341  *)
53342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53343for as_dir in $PATH
53344do
53345  IFS=$as_save_IFS
53346  test -z "$as_dir" && as_dir=.
53347    for ac_exec_ext in '' $ac_executable_extensions; do
53348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53349    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53351    break 2
53352  fi
53353done
53354  done
53355IFS=$as_save_IFS
53356
53357  ;;
53358esac
53359fi
53360CCACHE=$ac_cv_path_CCACHE
53361if test -n "$CCACHE"; then
53362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53363$as_echo "$CCACHE" >&6; }
53364else
53365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53366$as_echo "no" >&6; }
53367fi
53368
53369
53370        if test "x$CCACHE" = x; then
53371          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53372        fi
53373      else
53374        # Otherwise we believe it is a complete path. Use it as it is.
53375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53376$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53378$as_echo_n "checking for CCACHE... " >&6; }
53379        if test ! -x "$tool_specified"; then
53380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53381$as_echo "not found" >&6; }
53382          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53383        fi
53384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53385$as_echo "$tool_specified" >&6; }
53386      fi
53387    fi
53388  fi
53389
53390
53391
53392  if test "x$CCACHE" = x; then
53393    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53394  fi
53395
53396
53397      PATH="$OLD_PATH"
53398      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53399      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53400    else
53401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53402$as_echo "no" >&6; }
53403      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53404$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53405    fi
53406  elif test "x$enable_ccache" = xno; then
53407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53408$as_echo "no, explicitly disabled" >&6; }
53409    CCACHE_STATUS="Disabled"
53410  elif test "x$enable_ccache" = x; then
53411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53412$as_echo "no" >&6; }
53413  else
53414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53415$as_echo "unknown" >&6; }
53416    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53417  fi
53418
53419
53420
53421# Check whether --with-ccache-dir was given.
53422if test "${with_ccache_dir+set}" = set; then :
53423  withval=$with_ccache_dir;
53424fi
53425
53426
53427  if test "x$with_ccache_dir" != x; then
53428    # When using a non home ccache directory, assume the use is to share ccache files
53429    # with other users. Thus change the umask.
53430    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53431    if test "x$CCACHE" = x; then
53432      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53433$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53434    fi
53435  fi
53436
53437  if test "x$CCACHE" != x; then
53438
53439  if test "x$CCACHE" != x; then
53440    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53441      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53442          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53443      if test "x$HAS_BAD_CCACHE" != "x"; then
53444        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53445      fi
53446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53447$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53448      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53449      PUSHED_FLAGS="$CXXFLAGS"
53450      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53451      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53452/* end confdefs.h.  */
53453
53454int
53455main ()
53456{
53457
53458  ;
53459  return 0;
53460}
53461_ACEOF
53462if ac_fn_cxx_try_compile "$LINENO"; then :
53463  CC_KNOWS_CCACHE_TRICK=yes
53464else
53465  CC_KNOWS_CCACHE_TRICK=no
53466fi
53467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53468      CXXFLAGS="$PUSHED_FLAGS"
53469      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53471$as_echo "yes" >&6; }
53472        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53473
53474        CCACHE_SLOPPINESS=pch_defines,time_macros
53475      else
53476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53477$as_echo "no" >&6; }
53478        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53479      fi
53480    fi
53481
53482    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53483        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53484
53485    if test "x$SET_CCACHE_DIR" != x; then
53486      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53487      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53488    fi
53489  fi
53490
53491  fi
53492
53493
53494###############################################################################
53495#
53496# And now the finish...
53497#
53498###############################################################################
53499
53500# Check for some common pitfalls
53501
53502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53503    file_to_test="$SRC_ROOT/LICENSE"
53504    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53505      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
53506    fi
53507  fi
53508
53509
53510  # Did user specify any unknown variables?
53511
53512  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53513    # Replace the separating ! with spaces before presenting for end user.
53514    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53515    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53516$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53517  fi
53518
53519
53520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53521$as_echo_n "checking if build directory is on local disk... " >&6; }
53522
53523  # df -l lists only local disks; if the given directory is not found then
53524  # a non-zero exit code is given
53525  if test "x$DF" = x; then
53526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53527      # msys does not have df; use Windows "net use" instead.
53528      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53529      if test "x$IS_NETWORK_DISK" = x; then
53530        OUTPUT_DIR_IS_LOCAL="yes"
53531      else
53532        OUTPUT_DIR_IS_LOCAL="no"
53533      fi
53534    else
53535      # No df here, say it's local
53536      OUTPUT_DIR_IS_LOCAL="yes"
53537    fi
53538  else
53539    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53540      OUTPUT_DIR_IS_LOCAL="yes"
53541    else
53542      OUTPUT_DIR_IS_LOCAL="no"
53543    fi
53544  fi
53545
53546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53547$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53548
53549
53550
53551  # Check if the user has any old-style ALT_ variables set.
53552  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53553
53554  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53555  # Since we can't properly handle the dependencies for this, warn the user about the situation
53556  if test -e $OUTPUT_ROOT/spec.gmk; then
53557    IS_RECONFIGURE=yes
53558  else
53559    IS_RECONFIGURE=no
53560  fi
53561
53562
53563# At the end, call the custom hook. (Dummy macro if no custom sources available)
53564
53565
53566# We're messing a bit with internal autoconf variables to put the config.status
53567# in the output directory instead of the current directory.
53568CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53569
53570# Create the actual output files. Now the main work of configure is done.
53571cat >confcache <<\_ACEOF
53572# This file is a shell script that caches the results of configure
53573# tests run on this system so they can be shared between configure
53574# scripts and configure runs, see configure's option --config-cache.
53575# It is not useful on other systems.  If it contains results you don't
53576# want to keep, you may remove or edit it.
53577#
53578# config.status only pays attention to the cache file if you give it
53579# the --recheck option to rerun configure.
53580#
53581# `ac_cv_env_foo' variables (set or unset) will be overridden when
53582# loading this file, other *unset* `ac_cv_foo' will be assigned the
53583# following values.
53584
53585_ACEOF
53586
53587# The following way of writing the cache mishandles newlines in values,
53588# but we know of no workaround that is simple, portable, and efficient.
53589# So, we kill variables containing newlines.
53590# Ultrix sh set writes to stderr and can't be redirected directly,
53591# and sets the high bit in the cache file unless we assign to the vars.
53592(
53593  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53594    eval ac_val=\$$ac_var
53595    case $ac_val in #(
53596    *${as_nl}*)
53597      case $ac_var in #(
53598      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53600      esac
53601      case $ac_var in #(
53602      _ | IFS | as_nl) ;; #(
53603      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53604      *) { eval $ac_var=; unset $ac_var;} ;;
53605      esac ;;
53606    esac
53607  done
53608
53609  (set) 2>&1 |
53610    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53611    *${as_nl}ac_space=\ *)
53612      # `set' does not quote correctly, so add quotes: double-quote
53613      # substitution turns \\\\ into \\, and sed turns \\ into \.
53614      sed -n \
53615	"s/'/'\\\\''/g;
53616	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53617      ;; #(
53618    *)
53619      # `set' quotes correctly as required by POSIX, so do not add quotes.
53620      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53621      ;;
53622    esac |
53623    sort
53624) |
53625  sed '
53626     /^ac_cv_env_/b end
53627     t clear
53628     :clear
53629     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53630     t end
53631     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53632     :end' >>confcache
53633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53634  if test -w "$cache_file"; then
53635    if test "x$cache_file" != "x/dev/null"; then
53636      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53637$as_echo "$as_me: updating cache $cache_file" >&6;}
53638      if test ! -f "$cache_file" || test -h "$cache_file"; then
53639	cat confcache >"$cache_file"
53640      else
53641        case $cache_file in #(
53642        */* | ?:*)
53643	  mv -f confcache "$cache_file"$$ &&
53644	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53645        *)
53646	  mv -f confcache "$cache_file" ;;
53647	esac
53648      fi
53649    fi
53650  else
53651    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53652$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53653  fi
53654fi
53655rm -f confcache
53656
53657test "x$prefix" = xNONE && prefix=$ac_default_prefix
53658# Let make expand exec_prefix.
53659test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53660
53661# Transform confdefs.h into DEFS.
53662# Protect against shell expansion while executing Makefile rules.
53663# Protect against Makefile macro expansion.
53664#
53665# If the first sed substitution is executed (which looks for macros that
53666# take arguments), then branch to the quote section.  Otherwise,
53667# look for a macro that doesn't take arguments.
53668ac_script='
53669:mline
53670/\\$/{
53671 N
53672 s,\\\n,,
53673 b mline
53674}
53675t clear
53676:clear
53677s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53678t quote
53679s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53680t quote
53681b any
53682:quote
53683s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53684s/\[/\\&/g
53685s/\]/\\&/g
53686s/\$/$$/g
53687H
53688:any
53689${
53690	g
53691	s/^\n//
53692	s/\n/ /g
53693	p
53694}
53695'
53696DEFS=`sed -n "$ac_script" confdefs.h`
53697
53698
53699ac_libobjs=
53700ac_ltlibobjs=
53701U=
53702for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53703  # 1. Remove the extension, and $U if already installed.
53704  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53705  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53706  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53707  #    will be set to the directory where LIBOBJS objects are built.
53708  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53709  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53710done
53711LIBOBJS=$ac_libobjs
53712
53713LTLIBOBJS=$ac_ltlibobjs
53714
53715
53716
53717: "${CONFIG_STATUS=./config.status}"
53718ac_write_fail=0
53719ac_clean_files_save=$ac_clean_files
53720ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53721{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53722$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53723as_write_fail=0
53724cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53725#! $SHELL
53726# Generated by $as_me.
53727# Run this file to recreate the current configuration.
53728# Compiler output produced by configure, useful for debugging
53729# configure, is in config.log if it exists.
53730
53731debug=false
53732ac_cs_recheck=false
53733ac_cs_silent=false
53734
53735SHELL=\${CONFIG_SHELL-$SHELL}
53736export SHELL
53737_ASEOF
53738cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53739## -------------------- ##
53740## M4sh Initialization. ##
53741## -------------------- ##
53742
53743# Be more Bourne compatible
53744DUALCASE=1; export DUALCASE # for MKS sh
53745if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53746  emulate sh
53747  NULLCMD=:
53748  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53749  # is contrary to our usage.  Disable this feature.
53750  alias -g '${1+"$@"}'='"$@"'
53751  setopt NO_GLOB_SUBST
53752else
53753  case `(set -o) 2>/dev/null` in #(
53754  *posix*) :
53755    set -o posix ;; #(
53756  *) :
53757     ;;
53758esac
53759fi
53760
53761
53762as_nl='
53763'
53764export as_nl
53765# Printing a long string crashes Solaris 7 /usr/bin/printf.
53766as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53767as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53768as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53769# Prefer a ksh shell builtin over an external printf program on Solaris,
53770# but without wasting forks for bash or zsh.
53771if test -z "$BASH_VERSION$ZSH_VERSION" \
53772    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53773  as_echo='print -r --'
53774  as_echo_n='print -rn --'
53775elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53776  as_echo='printf %s\n'
53777  as_echo_n='printf %s'
53778else
53779  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53780    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53781    as_echo_n='/usr/ucb/echo -n'
53782  else
53783    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53784    as_echo_n_body='eval
53785      arg=$1;
53786      case $arg in #(
53787      *"$as_nl"*)
53788	expr "X$arg" : "X\\(.*\\)$as_nl";
53789	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53790      esac;
53791      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53792    '
53793    export as_echo_n_body
53794    as_echo_n='sh -c $as_echo_n_body as_echo'
53795  fi
53796  export as_echo_body
53797  as_echo='sh -c $as_echo_body as_echo'
53798fi
53799
53800# The user is always right.
53801if test "${PATH_SEPARATOR+set}" != set; then
53802  PATH_SEPARATOR=:
53803  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53804    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53805      PATH_SEPARATOR=';'
53806  }
53807fi
53808
53809
53810# IFS
53811# We need space, tab and new line, in precisely that order.  Quoting is
53812# there to prevent editors from complaining about space-tab.
53813# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53814# splitting by setting IFS to empty value.)
53815IFS=" ""	$as_nl"
53816
53817# Find who we are.  Look in the path if we contain no directory separator.
53818as_myself=
53819case $0 in #((
53820  *[\\/]* ) as_myself=$0 ;;
53821  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53822for as_dir in $PATH
53823do
53824  IFS=$as_save_IFS
53825  test -z "$as_dir" && as_dir=.
53826    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53827  done
53828IFS=$as_save_IFS
53829
53830     ;;
53831esac
53832# We did not find ourselves, most probably we were run as `sh COMMAND'
53833# in which case we are not to be found in the path.
53834if test "x$as_myself" = x; then
53835  as_myself=$0
53836fi
53837if test ! -f "$as_myself"; then
53838  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53839  exit 1
53840fi
53841
53842# Unset variables that we do not need and which cause bugs (e.g. in
53843# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53844# suppresses any "Segmentation fault" message there.  '((' could
53845# trigger a bug in pdksh 5.2.14.
53846for as_var in BASH_ENV ENV MAIL MAILPATH
53847do eval test x\${$as_var+set} = xset \
53848  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53849done
53850PS1='$ '
53851PS2='> '
53852PS4='+ '
53853
53854# NLS nuisances.
53855LC_ALL=C
53856export LC_ALL
53857LANGUAGE=C
53858export LANGUAGE
53859
53860# CDPATH.
53861(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53862
53863
53864# as_fn_error STATUS ERROR [LINENO LOG_FD]
53865# ----------------------------------------
53866# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53867# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53868# script with STATUS, using 1 if that was 0.
53869as_fn_error ()
53870{
53871  as_status=$1; test $as_status -eq 0 && as_status=1
53872  if test "$4"; then
53873    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53874    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53875  fi
53876  $as_echo "$as_me: error: $2" >&2
53877  as_fn_exit $as_status
53878} # as_fn_error
53879
53880
53881# as_fn_set_status STATUS
53882# -----------------------
53883# Set $? to STATUS, without forking.
53884as_fn_set_status ()
53885{
53886  return $1
53887} # as_fn_set_status
53888
53889# as_fn_exit STATUS
53890# -----------------
53891# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53892as_fn_exit ()
53893{
53894  set +e
53895  as_fn_set_status $1
53896  exit $1
53897} # as_fn_exit
53898
53899# as_fn_unset VAR
53900# ---------------
53901# Portably unset VAR.
53902as_fn_unset ()
53903{
53904  { eval $1=; unset $1;}
53905}
53906as_unset=as_fn_unset
53907# as_fn_append VAR VALUE
53908# ----------------------
53909# Append the text in VALUE to the end of the definition contained in VAR. Take
53910# advantage of any shell optimizations that allow amortized linear growth over
53911# repeated appends, instead of the typical quadratic growth present in naive
53912# implementations.
53913if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53914  eval 'as_fn_append ()
53915  {
53916    eval $1+=\$2
53917  }'
53918else
53919  as_fn_append ()
53920  {
53921    eval $1=\$$1\$2
53922  }
53923fi # as_fn_append
53924
53925# as_fn_arith ARG...
53926# ------------------
53927# Perform arithmetic evaluation on the ARGs, and store the result in the
53928# global $as_val. Take advantage of shells that can avoid forks. The arguments
53929# must be portable across $(()) and expr.
53930if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53931  eval 'as_fn_arith ()
53932  {
53933    as_val=$(( $* ))
53934  }'
53935else
53936  as_fn_arith ()
53937  {
53938    as_val=`expr "$@" || test $? -eq 1`
53939  }
53940fi # as_fn_arith
53941
53942
53943if expr a : '\(a\)' >/dev/null 2>&1 &&
53944   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53945  as_expr=expr
53946else
53947  as_expr=false
53948fi
53949
53950if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53951  as_basename=basename
53952else
53953  as_basename=false
53954fi
53955
53956if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53957  as_dirname=dirname
53958else
53959  as_dirname=false
53960fi
53961
53962as_me=`$as_basename -- "$0" ||
53963$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53964	 X"$0" : 'X\(//\)$' \| \
53965	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53966$as_echo X/"$0" |
53967    sed '/^.*\/\([^/][^/]*\)\/*$/{
53968	    s//\1/
53969	    q
53970	  }
53971	  /^X\/\(\/\/\)$/{
53972	    s//\1/
53973	    q
53974	  }
53975	  /^X\/\(\/\).*/{
53976	    s//\1/
53977	    q
53978	  }
53979	  s/.*/./; q'`
53980
53981# Avoid depending upon Character Ranges.
53982as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53983as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53984as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53985as_cr_digits='0123456789'
53986as_cr_alnum=$as_cr_Letters$as_cr_digits
53987
53988ECHO_C= ECHO_N= ECHO_T=
53989case `echo -n x` in #(((((
53990-n*)
53991  case `echo 'xy\c'` in
53992  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53993  xy)  ECHO_C='\c';;
53994  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53995       ECHO_T='	';;
53996  esac;;
53997*)
53998  ECHO_N='-n';;
53999esac
54000
54001rm -f conf$$ conf$$.exe conf$$.file
54002if test -d conf$$.dir; then
54003  rm -f conf$$.dir/conf$$.file
54004else
54005  rm -f conf$$.dir
54006  mkdir conf$$.dir 2>/dev/null
54007fi
54008if (echo >conf$$.file) 2>/dev/null; then
54009  if ln -s conf$$.file conf$$ 2>/dev/null; then
54010    as_ln_s='ln -s'
54011    # ... but there are two gotchas:
54012    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54013    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54014    # In both cases, we have to default to `cp -pR'.
54015    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54016      as_ln_s='cp -pR'
54017  elif ln conf$$.file conf$$ 2>/dev/null; then
54018    as_ln_s=ln
54019  else
54020    as_ln_s='cp -pR'
54021  fi
54022else
54023  as_ln_s='cp -pR'
54024fi
54025rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54026rmdir conf$$.dir 2>/dev/null
54027
54028
54029# as_fn_mkdir_p
54030# -------------
54031# Create "$as_dir" as a directory, including parents if necessary.
54032as_fn_mkdir_p ()
54033{
54034
54035  case $as_dir in #(
54036  -*) as_dir=./$as_dir;;
54037  esac
54038  test -d "$as_dir" || eval $as_mkdir_p || {
54039    as_dirs=
54040    while :; do
54041      case $as_dir in #(
54042      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54043      *) as_qdir=$as_dir;;
54044      esac
54045      as_dirs="'$as_qdir' $as_dirs"
54046      as_dir=`$as_dirname -- "$as_dir" ||
54047$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54048	 X"$as_dir" : 'X\(//\)[^/]' \| \
54049	 X"$as_dir" : 'X\(//\)$' \| \
54050	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54051$as_echo X"$as_dir" |
54052    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54053	    s//\1/
54054	    q
54055	  }
54056	  /^X\(\/\/\)[^/].*/{
54057	    s//\1/
54058	    q
54059	  }
54060	  /^X\(\/\/\)$/{
54061	    s//\1/
54062	    q
54063	  }
54064	  /^X\(\/\).*/{
54065	    s//\1/
54066	    q
54067	  }
54068	  s/.*/./; q'`
54069      test -d "$as_dir" && break
54070    done
54071    test -z "$as_dirs" || eval "mkdir $as_dirs"
54072  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54073
54074
54075} # as_fn_mkdir_p
54076if mkdir -p . 2>/dev/null; then
54077  as_mkdir_p='mkdir -p "$as_dir"'
54078else
54079  test -d ./-p && rmdir ./-p
54080  as_mkdir_p=false
54081fi
54082
54083
54084# as_fn_executable_p FILE
54085# -----------------------
54086# Test if FILE is an executable regular file.
54087as_fn_executable_p ()
54088{
54089  test -f "$1" && test -x "$1"
54090} # as_fn_executable_p
54091as_test_x='test -x'
54092as_executable_p=as_fn_executable_p
54093
54094# Sed expression to map a string onto a valid CPP name.
54095as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54096
54097# Sed expression to map a string onto a valid variable name.
54098as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54099
54100
54101exec 6>&1
54102## ----------------------------------- ##
54103## Main body of $CONFIG_STATUS script. ##
54104## ----------------------------------- ##
54105_ASEOF
54106test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54107
54108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54109# Save the log message, to keep $0 and so on meaningful, and to
54110# report actual input values of CONFIG_FILES etc. instead of their
54111# values after options handling.
54112ac_log="
54113This file was extended by OpenJDK $as_me jdk9, which was
54114generated by GNU Autoconf 2.69.  Invocation command line was
54115
54116  CONFIG_FILES    = $CONFIG_FILES
54117  CONFIG_HEADERS  = $CONFIG_HEADERS
54118  CONFIG_LINKS    = $CONFIG_LINKS
54119  CONFIG_COMMANDS = $CONFIG_COMMANDS
54120  $ $0 $@
54121
54122on `(hostname || uname -n) 2>/dev/null | sed 1q`
54123"
54124
54125_ACEOF
54126
54127case $ac_config_files in *"
54128"*) set x $ac_config_files; shift; ac_config_files=$*;;
54129esac
54130
54131
54132
54133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54134# Files that config.status was made for.
54135config_files="$ac_config_files"
54136
54137_ACEOF
54138
54139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54140ac_cs_usage="\
54141\`$as_me' instantiates files and other configuration actions
54142from templates according to the current configuration.  Unless the files
54143and actions are specified as TAGs, all are instantiated by default.
54144
54145Usage: $0 [OPTION]... [TAG]...
54146
54147  -h, --help       print this help, then exit
54148  -V, --version    print version number and configuration settings, then exit
54149      --config     print configuration, then exit
54150  -q, --quiet, --silent
54151                   do not print progress messages
54152  -d, --debug      don't remove temporary files
54153      --recheck    update $as_me by reconfiguring in the same conditions
54154      --file=FILE[:TEMPLATE]
54155                   instantiate the configuration file FILE
54156
54157Configuration files:
54158$config_files
54159
54160Report bugs to <build-dev@openjdk.java.net>.
54161OpenJDK home page: <http://openjdk.java.net>."
54162
54163_ACEOF
54164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54165ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54166ac_cs_version="\\
54167OpenJDK config.status jdk9
54168configured by $0, generated by GNU Autoconf 2.69,
54169  with options \\"\$ac_cs_config\\"
54170
54171Copyright (C) 2012 Free Software Foundation, Inc.
54172This config.status script is free software; the Free Software Foundation
54173gives unlimited permission to copy, distribute and modify it."
54174
54175ac_pwd='$ac_pwd'
54176srcdir='$srcdir'
54177AWK='$AWK'
54178test -n "\$AWK" || AWK=awk
54179_ACEOF
54180
54181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54182# The default lists apply if the user does not specify any file.
54183ac_need_defaults=:
54184while test $# != 0
54185do
54186  case $1 in
54187  --*=?*)
54188    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54189    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54190    ac_shift=:
54191    ;;
54192  --*=)
54193    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54194    ac_optarg=
54195    ac_shift=:
54196    ;;
54197  *)
54198    ac_option=$1
54199    ac_optarg=$2
54200    ac_shift=shift
54201    ;;
54202  esac
54203
54204  case $ac_option in
54205  # Handling of the options.
54206  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54207    ac_cs_recheck=: ;;
54208  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54209    $as_echo "$ac_cs_version"; exit ;;
54210  --config | --confi | --conf | --con | --co | --c )
54211    $as_echo "$ac_cs_config"; exit ;;
54212  --debug | --debu | --deb | --de | --d | -d )
54213    debug=: ;;
54214  --file | --fil | --fi | --f )
54215    $ac_shift
54216    case $ac_optarg in
54217    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54218    '') as_fn_error $? "missing file argument" ;;
54219    esac
54220    as_fn_append CONFIG_FILES " '$ac_optarg'"
54221    ac_need_defaults=false;;
54222  --he | --h |  --help | --hel | -h )
54223    $as_echo "$ac_cs_usage"; exit ;;
54224  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54225  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54226    ac_cs_silent=: ;;
54227
54228  # This is an error.
54229  -*) as_fn_error $? "unrecognized option: \`$1'
54230Try \`$0 --help' for more information." ;;
54231
54232  *) as_fn_append ac_config_targets " $1"
54233     ac_need_defaults=false ;;
54234
54235  esac
54236  shift
54237done
54238
54239ac_configure_extra_args=
54240
54241if $ac_cs_silent; then
54242  exec 6>/dev/null
54243  ac_configure_extra_args="$ac_configure_extra_args --silent"
54244fi
54245
54246_ACEOF
54247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54248if \$ac_cs_recheck; then
54249  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54250  shift
54251  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54252  CONFIG_SHELL='$SHELL'
54253  export CONFIG_SHELL
54254  exec "\$@"
54255fi
54256
54257_ACEOF
54258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54259exec 5>>config.log
54260{
54261  echo
54262  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54263## Running $as_me. ##
54264_ASBOX
54265  $as_echo "$ac_log"
54266} >&5
54267
54268_ACEOF
54269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54270_ACEOF
54271
54272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54273
54274# Handling of arguments.
54275for ac_config_target in $ac_config_targets
54276do
54277  case $ac_config_target in
54278    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54279    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54280    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54281    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54282    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54283
54284  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54285  esac
54286done
54287
54288
54289# If the user did not use the arguments to specify the items to instantiate,
54290# then the envvar interface is used.  Set only those that are not.
54291# We use the long form for the default assignment because of an extremely
54292# bizarre bug on SunOS 4.1.3.
54293if $ac_need_defaults; then
54294  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54295fi
54296
54297# Have a temporary directory for convenience.  Make it in the build tree
54298# simply because there is no reason against having it here, and in addition,
54299# creating and moving files from /tmp can sometimes cause problems.
54300# Hook for its removal unless debugging.
54301# Note that there is a small window in which the directory will not be cleaned:
54302# after its creation but before its name has been assigned to `$tmp'.
54303$debug ||
54304{
54305  tmp= ac_tmp=
54306  trap 'exit_status=$?
54307  : "${ac_tmp:=$tmp}"
54308  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54309' 0
54310  trap 'as_fn_exit 1' 1 2 13 15
54311}
54312# Create a (secure) tmp directory for tmp files.
54313
54314{
54315  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54316  test -d "$tmp"
54317}  ||
54318{
54319  tmp=./conf$$-$RANDOM
54320  (umask 077 && mkdir "$tmp")
54321} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54322ac_tmp=$tmp
54323
54324# Set up the scripts for CONFIG_FILES section.
54325# No need to generate them if there are no CONFIG_FILES.
54326# This happens for instance with `./config.status config.h'.
54327if test -n "$CONFIG_FILES"; then
54328
54329
54330ac_cr=`echo X | tr X '\015'`
54331# On cygwin, bash can eat \r inside `` if the user requested igncr.
54332# But we know of no other shell where ac_cr would be empty at this
54333# point, so we can use a bashism as a fallback.
54334if test "x$ac_cr" = x; then
54335  eval ac_cr=\$\'\\r\'
54336fi
54337ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54338if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54339  ac_cs_awk_cr='\\r'
54340else
54341  ac_cs_awk_cr=$ac_cr
54342fi
54343
54344echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54345_ACEOF
54346
54347
54348{
54349  echo "cat >conf$$subs.awk <<_ACEOF" &&
54350  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54351  echo "_ACEOF"
54352} >conf$$subs.sh ||
54353  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54354ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54355ac_delim='%!_!# '
54356for ac_last_try in false false false false false :; do
54357  . ./conf$$subs.sh ||
54358    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54359
54360  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54361  if test $ac_delim_n = $ac_delim_num; then
54362    break
54363  elif $ac_last_try; then
54364    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54365  else
54366    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54367  fi
54368done
54369rm -f conf$$subs.sh
54370
54371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54372cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54373_ACEOF
54374sed -n '
54375h
54376s/^/S["/; s/!.*/"]=/
54377p
54378g
54379s/^[^!]*!//
54380:repl
54381t repl
54382s/'"$ac_delim"'$//
54383t delim
54384:nl
54385h
54386s/\(.\{148\}\)..*/\1/
54387t more1
54388s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54389p
54390n
54391b repl
54392:more1
54393s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54394p
54395g
54396s/.\{148\}//
54397t nl
54398:delim
54399h
54400s/\(.\{148\}\)..*/\1/
54401t more2
54402s/["\\]/\\&/g; s/^/"/; s/$/"/
54403p
54404b
54405:more2
54406s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54407p
54408g
54409s/.\{148\}//
54410t delim
54411' <conf$$subs.awk | sed '
54412/^[^""]/{
54413  N
54414  s/\n//
54415}
54416' >>$CONFIG_STATUS || ac_write_fail=1
54417rm -f conf$$subs.awk
54418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54419_ACAWK
54420cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54421  for (key in S) S_is_set[key] = 1
54422  FS = ""
54423
54424}
54425{
54426  line = $ 0
54427  nfields = split(line, field, "@")
54428  substed = 0
54429  len = length(field[1])
54430  for (i = 2; i < nfields; i++) {
54431    key = field[i]
54432    keylen = length(key)
54433    if (S_is_set[key]) {
54434      value = S[key]
54435      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54436      len += length(value) + length(field[++i])
54437      substed = 1
54438    } else
54439      len += 1 + keylen
54440  }
54441
54442  print line
54443}
54444
54445_ACAWK
54446_ACEOF
54447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54448if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54449  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54450else
54451  cat
54452fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54453  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54454_ACEOF
54455
54456# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54457# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54458# trailing colons and then remove the whole line if VPATH becomes empty
54459# (actually we leave an empty line to preserve line numbers).
54460if test "x$srcdir" = x.; then
54461  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54462h
54463s///
54464s/^/:/
54465s/[	 ]*$/:/
54466s/:\$(srcdir):/:/g
54467s/:\${srcdir}:/:/g
54468s/:@srcdir@:/:/g
54469s/^:*//
54470s/:*$//
54471x
54472s/\(=[	 ]*\).*/\1/
54473G
54474s/\n//
54475s/^[^=]*=[	 ]*$//
54476}'
54477fi
54478
54479cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54480fi # test -n "$CONFIG_FILES"
54481
54482
54483eval set X "  :F $CONFIG_FILES      "
54484shift
54485for ac_tag
54486do
54487  case $ac_tag in
54488  :[FHLC]) ac_mode=$ac_tag; continue;;
54489  esac
54490  case $ac_mode$ac_tag in
54491  :[FHL]*:*);;
54492  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54493  :[FH]-) ac_tag=-:-;;
54494  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54495  esac
54496  ac_save_IFS=$IFS
54497  IFS=:
54498  set x $ac_tag
54499  IFS=$ac_save_IFS
54500  shift
54501  ac_file=$1
54502  shift
54503
54504  case $ac_mode in
54505  :L) ac_source=$1;;
54506  :[FH])
54507    ac_file_inputs=
54508    for ac_f
54509    do
54510      case $ac_f in
54511      -) ac_f="$ac_tmp/stdin";;
54512      *) # Look for the file first in the build tree, then in the source tree
54513	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54514	 # because $ac_f cannot contain `:'.
54515	 test -f "$ac_f" ||
54516	   case $ac_f in
54517	   [\\/$]*) false;;
54518	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54519	   esac ||
54520	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54521      esac
54522      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54523      as_fn_append ac_file_inputs " '$ac_f'"
54524    done
54525
54526    # Let's still pretend it is `configure' which instantiates (i.e., don't
54527    # use $as_me), people would be surprised to read:
54528    #    /* config.h.  Generated by config.status.  */
54529    configure_input='Generated from '`
54530	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54531	`' by configure.'
54532    if test x"$ac_file" != x-; then
54533      configure_input="$ac_file.  $configure_input"
54534      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54535$as_echo "$as_me: creating $ac_file" >&6;}
54536    fi
54537    # Neutralize special characters interpreted by sed in replacement strings.
54538    case $configure_input in #(
54539    *\&* | *\|* | *\\* )
54540       ac_sed_conf_input=`$as_echo "$configure_input" |
54541       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54542    *) ac_sed_conf_input=$configure_input;;
54543    esac
54544
54545    case $ac_tag in
54546    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54547      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54548    esac
54549    ;;
54550  esac
54551
54552  ac_dir=`$as_dirname -- "$ac_file" ||
54553$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54554	 X"$ac_file" : 'X\(//\)[^/]' \| \
54555	 X"$ac_file" : 'X\(//\)$' \| \
54556	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54557$as_echo X"$ac_file" |
54558    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54559	    s//\1/
54560	    q
54561	  }
54562	  /^X\(\/\/\)[^/].*/{
54563	    s//\1/
54564	    q
54565	  }
54566	  /^X\(\/\/\)$/{
54567	    s//\1/
54568	    q
54569	  }
54570	  /^X\(\/\).*/{
54571	    s//\1/
54572	    q
54573	  }
54574	  s/.*/./; q'`
54575  as_dir="$ac_dir"; as_fn_mkdir_p
54576  ac_builddir=.
54577
54578case "$ac_dir" in
54579.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54580*)
54581  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54582  # A ".." for each directory in $ac_dir_suffix.
54583  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54584  case $ac_top_builddir_sub in
54585  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54586  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54587  esac ;;
54588esac
54589ac_abs_top_builddir=$ac_pwd
54590ac_abs_builddir=$ac_pwd$ac_dir_suffix
54591# for backward compatibility:
54592ac_top_builddir=$ac_top_build_prefix
54593
54594case $srcdir in
54595  .)  # We are building in place.
54596    ac_srcdir=.
54597    ac_top_srcdir=$ac_top_builddir_sub
54598    ac_abs_top_srcdir=$ac_pwd ;;
54599  [\\/]* | ?:[\\/]* )  # Absolute name.
54600    ac_srcdir=$srcdir$ac_dir_suffix;
54601    ac_top_srcdir=$srcdir
54602    ac_abs_top_srcdir=$srcdir ;;
54603  *) # Relative name.
54604    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54605    ac_top_srcdir=$ac_top_build_prefix$srcdir
54606    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54607esac
54608ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54609
54610
54611  case $ac_mode in
54612  :F)
54613  #
54614  # CONFIG_FILE
54615  #
54616
54617_ACEOF
54618
54619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54620# If the template does not know about datarootdir, expand it.
54621# FIXME: This hack should be removed a few years after 2.60.
54622ac_datarootdir_hack=; ac_datarootdir_seen=
54623ac_sed_dataroot='
54624/datarootdir/ {
54625  p
54626  q
54627}
54628/@datadir@/p
54629/@docdir@/p
54630/@infodir@/p
54631/@localedir@/p
54632/@mandir@/p'
54633case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54634*datarootdir*) ac_datarootdir_seen=yes;;
54635*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54636  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54637$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54638_ACEOF
54639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54640  ac_datarootdir_hack='
54641  s&@datadir@&$datadir&g
54642  s&@docdir@&$docdir&g
54643  s&@infodir@&$infodir&g
54644  s&@localedir@&$localedir&g
54645  s&@mandir@&$mandir&g
54646  s&\\\${datarootdir}&$datarootdir&g' ;;
54647esac
54648_ACEOF
54649
54650# Neutralize VPATH when `$srcdir' = `.'.
54651# Shell code in configure.ac might set extrasub.
54652# FIXME: do we really want to maintain this feature?
54653cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54654ac_sed_extra="$ac_vpsub
54655$extrasub
54656_ACEOF
54657cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54658:t
54659/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54660s|@configure_input@|$ac_sed_conf_input|;t t
54661s&@top_builddir@&$ac_top_builddir_sub&;t t
54662s&@top_build_prefix@&$ac_top_build_prefix&;t t
54663s&@srcdir@&$ac_srcdir&;t t
54664s&@abs_srcdir@&$ac_abs_srcdir&;t t
54665s&@top_srcdir@&$ac_top_srcdir&;t t
54666s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54667s&@builddir@&$ac_builddir&;t t
54668s&@abs_builddir@&$ac_abs_builddir&;t t
54669s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54670$ac_datarootdir_hack
54671"
54672eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54673  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54674
54675test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54676  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54677  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54678      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54679  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54680which seems to be undefined.  Please make sure it is defined" >&5
54681$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54682which seems to be undefined.  Please make sure it is defined" >&2;}
54683
54684  rm -f "$ac_tmp/stdin"
54685  case $ac_file in
54686  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54687  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54688  esac \
54689  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54690 ;;
54691
54692
54693
54694  esac
54695
54696done # for ac_tag
54697
54698
54699as_fn_exit 0
54700_ACEOF
54701ac_clean_files=$ac_clean_files_save
54702
54703test $ac_write_fail = 0 ||
54704  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54705
54706
54707# configure is writing to config.log, and then calls config.status.
54708# config.status does its own redirection, appending to config.log.
54709# Unfortunately, on DOS this fails, as config.log is still kept open
54710# by configure, so config.status won't be able to write to it; its
54711# output is simply discarded.  So we exec the FD to /dev/null,
54712# effectively closing config.log, so it can be properly (re)opened and
54713# appended to by config.status.  When coming back to configure, we
54714# need to make the FD available again.
54715if test "$no_create" != yes; then
54716  ac_cs_success=:
54717  ac_config_status_args=
54718  test "$silent" = yes &&
54719    ac_config_status_args="$ac_config_status_args --quiet"
54720  exec 5>/dev/null
54721  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54722  exec 5>>config.log
54723  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54724  # would make configure fail if this is the last instruction.
54725  $ac_cs_success || as_fn_exit 1
54726fi
54727if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54728  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54729$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54730fi
54731
54732
54733# After AC_OUTPUT, we need to do final work
54734
54735
54736  # Try to move config.log (generated by autoconf) to the configure-support directory.
54737  if test -e ./config.log; then
54738    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54739  fi
54740
54741  # Rotate our log file (configure.log)
54742  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54743    $RM -f "$OUTPUT_ROOT/configure.log.old"
54744  fi
54745  if test -e "$OUTPUT_ROOT/configure.log"; then
54746    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54747  fi
54748
54749  # Move configure.log from current directory to the build output root
54750  if test -e ./configure.log; then
54751    echo found it
54752    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54753  fi
54754
54755  # Make the compare script executable
54756  $CHMOD +x $OUTPUT_ROOT/compare.sh
54757
54758
54759# Finally output some useful information to the user
54760
54761  # Finally output some useful information to the user
54762
54763  printf "\n"
54764  printf "====================================================\n"
54765  if test "x$no_create" != "xyes"; then
54766    if test "x$IS_RECONFIGURE" != "xyes"; then
54767      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54768    else
54769      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54770    fi
54771  else
54772    if test "x$IS_RECONFIGURE" != "xyes"; then
54773      printf "A configuration has been successfully checked but not created\n"
54774    else
54775      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54776    fi
54777  fi
54778  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54779    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54780  else
54781    printf "using default settings.\n"
54782  fi
54783
54784  printf "\n"
54785  printf "Configuration summary:\n"
54786  printf "* Debug level:    $DEBUG_LEVEL\n"
54787  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54788  printf "* JDK variant:    $JDK_VARIANT\n"
54789  printf "* JVM variants:   $with_jvm_variants\n"
54790  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54791  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54792
54793  printf "\n"
54794  printf "Tools summary:\n"
54795  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54796    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54797  fi
54798  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54799  if test "x$TOOLCHAIN_VERSION" != "x"; then
54800    print_version=" $TOOLCHAIN_VERSION"
54801  fi
54802  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54803  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54804  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54805
54806  printf "\n"
54807  printf "Build performance summary:\n"
54808  printf "* Cores to use:   $JOBS\n"
54809  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54810  if test "x$CCACHE_STATUS" != "x"; then
54811    printf "* ccache status:  $CCACHE_STATUS\n"
54812  fi
54813  printf "\n"
54814
54815  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54816    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54817    printf "will result in longer build times.\n"
54818    printf "\n"
54819  fi
54820
54821  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54822    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54823    printf "These are not respected, and will be ignored. It is recommended\n"
54824    printf "that you clean your environment. The following variables are set:\n"
54825    printf "$FOUND_ALT_VARIABLES\n"
54826    printf "\n"
54827  fi
54828
54829  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54830    printf "WARNING: Your build output directory is not on a local disk.\n"
54831    printf "This will severely degrade build performance!\n"
54832    printf "It is recommended that you create an output directory on a local disk,\n"
54833    printf "and run the configure script again from that directory.\n"
54834    printf "\n"
54835  fi
54836
54837  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54838    printf "WARNING: The result of this configuration has overridden an older\n"
54839    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54840    printf "proper build. Failure to do so might result in strange build problems.\n"
54841    printf "\n"
54842  fi
54843
54844  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54845    printf "WARNING: The result of this configuration was not saved.\n"
54846    printf "You should run without '--no-create | -n' to create the configuration.\n"
54847    printf "\n"
54848  fi
54849
54850
54851
54852  # Locate config.log.
54853  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54854    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54855  elif test -e "./config.log"; then
54856    CONFIG_LOG_PATH="."
54857  fi
54858
54859  if test -e "$CONFIG_LOG_PATH/config.log"; then
54860    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54861    if test $? -eq 0; then
54862      printf "The following warnings were produced. Repeated here for convenience:\n"
54863      # We must quote sed expression (using []) to stop m4 from eating the [].
54864      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54865      printf "\n"
54866    fi
54867  fi
54868
54869