generated-configure.sh revision 1393:8b9bd5ba445e
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
635SJAVAC_SERVER_DIR
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649MSVCP_DLL
650MSVCR_DLL
651LIBCXX
652LLVM_LIBS
653LLVM_LDFLAGS
654LLVM_CFLAGS
655LLVM_CONFIG
656LIBFFI_LIBS
657LIBFFI_CFLAGS
658STATIC_CXX_SETTING
659LIBDL
660LIBM
661LIBZIP_CAN_USE_MMAP
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LCMS
667LCMS_LIBS
668LCMS_CFLAGS
669USE_EXTERNAL_LIBGIF
670USE_EXTERNAL_LIBJPEG
671ALSA_LIBS
672ALSA_CFLAGS
673FREETYPE_BUNDLE_LIB_PATH
674FREETYPE_LIBS
675FREETYPE_CFLAGS
676CUPS_CFLAGS
677X_EXTRA_LIBS
678X_LIBS
679X_PRE_LIBS
680X_CFLAGS
681XMKMF
682FIXPATH
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686COMPILER_SUPPORTS_TARGET_BITS_FLAG
687ZERO_ARCHFLAG
688LDFLAGS_CXX_JDK
689LDFLAGS_JDKEXE_SUFFIX
690LDFLAGS_JDKLIB_SUFFIX
691LDFLAGS_JDKEXE
692LDFLAGS_JDKLIB
693CXXFLAGS_JDKEXE
694CXXFLAGS_JDKLIB
695CFLAGS_JDKEXE
696CFLAGS_JDKLIB
697MACOSX_VERSION_MIN
698LEGACY_EXTRA_LDFLAGS
699LEGACY_EXTRA_CXXFLAGS
700LEGACY_EXTRA_CFLAGS
701CXX_O_FLAG_NONE
702CXX_O_FLAG_DEBUG
703CXX_O_FLAG_NORM
704CXX_O_FLAG_HI
705CXX_O_FLAG_HIGHEST
706C_O_FLAG_NONE
707C_O_FLAG_DEBUG
708C_O_FLAG_NORM
709C_O_FLAG_HI
710C_O_FLAG_HIGHEST
711CXXFLAGS_DEBUG_OPTIONS
712CFLAGS_DEBUG_OPTIONS
713CXXFLAGS_DEBUG_SYMBOLS
714CFLAGS_DEBUG_SYMBOLS
715CXX_FLAG_DEPS
716C_FLAG_DEPS
717SET_SHARED_LIBRARY_MAPFILE
718SET_SHARED_LIBRARY_NAME
719SET_SHARED_LIBRARY_ORIGIN
720SET_EXECUTABLE_ORIGIN
721SHARED_LIBRARY_FLAGS
722CXX_FLAG_REORDER
723C_FLAG_REORDER
724SYSROOT_LDFLAGS
725SYSROOT_CFLAGS
726RC_FLAGS
727AR_OUT_OPTION
728LD_OUT_OPTION
729EXE_OUT_OPTION
730CC_OUT_OPTION
731POST_MCS_CMD
732POST_STRIP_CMD
733ARFLAGS
734COMPILER_TARGET_BITS_FLAG
735JT_HOME
736JTREGEXE
737USING_BROKEN_SUSE_LD
738PACKAGE_PATH
739LDEXECXX
740LDEXE
741USE_CLANG
742HOTSPOT_LD
743HOTSPOT_CXX
744HOTSPOT_RC
745HOTSPOT_MT
746BUILD_LD
747BUILD_CXX
748BUILD_CC
749ac_ct_OBJDUMP
750OBJDUMP
751ac_ct_OBJCOPY
752OBJCOPY
753ac_ct_NM
754ac_ct_STRIP
755MCS
756GNM
757NM
758STRIP
759MSBUILD
760DUMPBIN
761RC
762MT
763LIPO
764ac_ct_OBJC
765OBJCFLAGS
766OBJC
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
819NATIVE2ASCII
820JAR
821JAVAH
822JAVAC
823JAVA
824BOOT_JDK
825JAVA_CHECK
826JAVAC_CHECK
827COOKED_BUILD_NUMBER
828JDK_VERSION
829COPYRIGHT_YEAR
830MACOSX_BUNDLE_ID_BASE
831MACOSX_BUNDLE_NAME_BASE
832COMPANY_NAME
833JDK_RC_PLATFORM_NAME
834PRODUCT_SUFFIX
835PRODUCT_NAME
836LAUNCHER_NAME
837MILESTONE
838JDK_BUILD_NUMBER
839JDK_UPDATE_VERSION
840JDK_MICRO_VERSION
841JDK_MINOR_VERSION
842JDK_MAJOR_VERSION
843USER_RELEASE_SUFFIX
844COMPRESS_JARS
845RMICONNECTOR_IIOP
846UNLIMITED_CRYPTO
847CACERTS_FILE
848TEST_IN_BUILD
849BUILD_HEADLESS
850SUPPORT_HEADFUL
851SUPPORT_HEADLESS
852BDEPS_FTP
853BDEPS_UNZIP
854OS_VERSION_MICRO
855OS_VERSION_MINOR
856OS_VERSION_MAJOR
857PKG_CONFIG
858BASH_ARGS
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880OUTPUT_ROOT
881CONF_NAME
882SPEC
883SDKROOT
884XCODEBUILD
885BUILD_VARIANT_RELEASE
886DEBUG_CLASSFILES
887FASTDEBUG
888VARIANT
889DEBUG_LEVEL
890MACOSX_UNIVERSAL
891INCLUDE_SA
892JVM_VARIANT_CORE
893JVM_VARIANT_ZEROSHARK
894JVM_VARIANT_ZERO
895JVM_VARIANT_KERNEL
896JVM_VARIANT_MINIMAL1
897JVM_VARIANT_CLIENT
898JVM_VARIANT_SERVER
899JVM_VARIANTS
900JVM_INTERPRETER
901JDK_VARIANT
902SET_OPENJDK
903BUILD_LOG_WRAPPER
904BUILD_LOG_PREVIOUS
905BUILD_LOG
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949CPIO
950SETFILE
951DF
952READLINK
953CYGPATH
954SED
955FGREP
956EGREP
957GREP
958AWK
959XARGS
960WHICH
961WC
962UNIQ
963UNAME
964TR
965TOUCH
966TEE
967TAR
968TAIL
969SORT
970SH
971RM
972PRINTF
973NAWK
974MV
975MKTEMP
976MKDIR
977LS
978LN
979HEAD
980FIND
981FILE
982EXPR
983ECHO
984DIRNAME
985DIFF
986DATE
987CUT
988CP
989COMM
990CMP
991CHMOD
992CAT
993BASH
994BASENAME
995DATE_WHEN_CONFIGURED
996ORIGINAL_PATH
997CONFIGURE_COMMAND_LINE
998target_alias
999host_alias
1000build_alias
1001LIBS
1002ECHO_T
1003ECHO_N
1004ECHO_C
1005DEFS
1006mandir
1007localedir
1008libdir
1009psdir
1010pdfdir
1011dvidir
1012htmldir
1013infodir
1014docdir
1015oldincludedir
1016includedir
1017localstatedir
1018sharedstatedir
1019sysconfdir
1020datadir
1021datarootdir
1022libexecdir
1023sbindir
1024bindir
1025program_transform_name
1026prefix
1027exec_prefix
1028PACKAGE_URL
1029PACKAGE_BUGREPORT
1030PACKAGE_STRING
1031PACKAGE_VERSION
1032PACKAGE_TARNAME
1033PACKAGE_NAME
1034PATH_SEPARATOR
1035SHELL'
1036ac_subst_files=''
1037ac_user_opts='
1038enable_option_checking
1039with_target_bits
1040enable_openjdk_only
1041with_custom_make_dir
1042with_jdk_variant
1043with_jvm_interpreter
1044with_jvm_variants
1045enable_debug
1046with_debug_level
1047with_devkit
1048with_sys_root
1049with_sysroot
1050with_tools_dir
1051with_toolchain_path
1052with_extra_path
1053with_sdk_name
1054with_conf_name
1055with_output_sync
1056with_builddeps_conf
1057with_builddeps_server
1058with_builddeps_dir
1059with_builddeps_group
1060enable_headful
1061enable_hotspot_test_in_build
1062with_cacerts_file
1063enable_unlimited_crypto
1064enable_rmiconnector_iiop
1065with_milestone
1066with_update_version
1067with_user_release_suffix
1068with_build_number
1069with_copyright_year
1070with_boot_jdk
1071with_add_source_root
1072with_override_source_root
1073with_adds_and_overrides
1074with_override_langtools
1075with_override_corba
1076with_override_jaxp
1077with_override_jaxws
1078with_override_hotspot
1079with_override_nashorn
1080with_override_jdk
1081with_import_hotspot
1082with_toolchain_type
1083with_toolchain_version
1084with_jtreg
1085with_extra_cflags
1086with_extra_cxxflags
1087with_extra_ldflags
1088enable_debug_symbols
1089enable_zip_debug_info
1090with_x
1091with_cups
1092with_cups_include
1093with_freetype
1094with_freetype_include
1095with_freetype_lib
1096with_freetype_src
1097enable_freetype_bundling
1098with_alsa
1099with_alsa_include
1100with_alsa_lib
1101with_libjpeg
1102with_giflib
1103with_lcms
1104with_libpng
1105with_zlib
1106with_stdc__lib
1107with_msvcr_dll
1108with_msvcp_dll
1109with_dxsdk
1110with_dxsdk_lib
1111with_dxsdk_include
1112with_num_cores
1113with_memory_size
1114with_jobs
1115with_boot_jdk_jvmargs
1116with_sjavac_server_java
1117enable_sjavac
1118enable_precompiled_headers
1119enable_ccache
1120with_ccache_dir
1121'
1122      ac_precious_vars='build_alias
1123host_alias
1124target_alias
1125BASENAME
1126BASH
1127CAT
1128CHMOD
1129CMP
1130COMM
1131CP
1132CUT
1133DATE
1134DIFF
1135DIRNAME
1136ECHO
1137EXPR
1138FILE
1139FIND
1140HEAD
1141LN
1142LS
1143MKDIR
1144MKTEMP
1145MV
1146NAWK
1147PRINTF
1148RM
1149SH
1150SORT
1151TAIL
1152TAR
1153TEE
1154TOUCH
1155TR
1156UNAME
1157UNIQ
1158WC
1159WHICH
1160XARGS
1161AWK
1162GREP
1163EGREP
1164FGREP
1165SED
1166CYGPATH
1167READLINK
1168DF
1169SETFILE
1170CPIO
1171UNZIP
1172ZIP
1173LDD
1174OTOOL
1175READELF
1176HG
1177STAT
1178TIME
1179DSYMUTIL
1180XATTR
1181CODESIGN
1182PKG_CONFIG
1183JAVA
1184JAVAC
1185JAVAH
1186JAR
1187NATIVE2ASCII
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201OBJC
1202OBJCFLAGS
1203LIPO
1204STRIP
1205NM
1206GNM
1207MCS
1208OBJCOPY
1209OBJDUMP
1210BUILD_CC
1211BUILD_CXX
1212BUILD_LD
1213JTREGEXE
1214XMKMF
1215FREETYPE_CFLAGS
1216FREETYPE_LIBS
1217ALSA_CFLAGS
1218ALSA_LIBS
1219LCMS_CFLAGS
1220LCMS_LIBS
1221PNG_CFLAGS
1222PNG_LIBS
1223LIBFFI_CFLAGS
1224LIBFFI_LIBS
1225CCACHE'
1226
1227
1228# Initialize some variables set by options.
1229ac_init_help=
1230ac_init_version=false
1231ac_unrecognized_opts=
1232ac_unrecognized_sep=
1233# The variables have the same names as the options, with
1234# dashes changed to underlines.
1235cache_file=/dev/null
1236exec_prefix=NONE
1237no_create=
1238no_recursion=
1239prefix=NONE
1240program_prefix=NONE
1241program_suffix=NONE
1242program_transform_name=s,x,x,
1243silent=
1244site=
1245srcdir=
1246verbose=
1247x_includes=NONE
1248x_libraries=NONE
1249
1250# Installation directory options.
1251# These are left unexpanded so users can "make install exec_prefix=/foo"
1252# and all the variables that are supposed to be based on exec_prefix
1253# by default will actually change.
1254# Use braces instead of parens because sh, perl, etc. also accept them.
1255# (The list follows the same order as the GNU Coding Standards.)
1256bindir='${exec_prefix}/bin'
1257sbindir='${exec_prefix}/sbin'
1258libexecdir='${exec_prefix}/libexec'
1259datarootdir='${prefix}/share'
1260datadir='${datarootdir}'
1261sysconfdir='${prefix}/etc'
1262sharedstatedir='${prefix}/com'
1263localstatedir='${prefix}/var'
1264includedir='${prefix}/include'
1265oldincludedir='/usr/include'
1266docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1267infodir='${datarootdir}/info'
1268htmldir='${docdir}'
1269dvidir='${docdir}'
1270pdfdir='${docdir}'
1271psdir='${docdir}'
1272libdir='${exec_prefix}/lib'
1273localedir='${datarootdir}/locale'
1274mandir='${datarootdir}/man'
1275
1276ac_prev=
1277ac_dashdash=
1278for ac_option
1279do
1280  # If the previous option needs an argument, assign it.
1281  if test -n "$ac_prev"; then
1282    eval $ac_prev=\$ac_option
1283    ac_prev=
1284    continue
1285  fi
1286
1287  case $ac_option in
1288  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1289  *=)   ac_optarg= ;;
1290  *)    ac_optarg=yes ;;
1291  esac
1292
1293  # Accept the important Cygnus configure options, so we can diagnose typos.
1294
1295  case $ac_dashdash$ac_option in
1296  --)
1297    ac_dashdash=yes ;;
1298
1299  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1300    ac_prev=bindir ;;
1301  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1302    bindir=$ac_optarg ;;
1303
1304  -build | --build | --buil | --bui | --bu)
1305    ac_prev=build_alias ;;
1306  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1307    build_alias=$ac_optarg ;;
1308
1309  -cache-file | --cache-file | --cache-fil | --cache-fi \
1310  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1311    ac_prev=cache_file ;;
1312  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1313  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1314    cache_file=$ac_optarg ;;
1315
1316  --config-cache | -C)
1317    cache_file=config.cache ;;
1318
1319  -datadir | --datadir | --datadi | --datad)
1320    ac_prev=datadir ;;
1321  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1322    datadir=$ac_optarg ;;
1323
1324  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1325  | --dataroo | --dataro | --datar)
1326    ac_prev=datarootdir ;;
1327  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1328  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1329    datarootdir=$ac_optarg ;;
1330
1331  -disable-* | --disable-*)
1332    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1333    # Reject names that are not valid shell variable names.
1334    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1335      as_fn_error $? "invalid feature name: $ac_useropt"
1336    ac_useropt_orig=$ac_useropt
1337    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1338    case $ac_user_opts in
1339      *"
1340"enable_$ac_useropt"
1341"*) ;;
1342      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1343	 ac_unrecognized_sep=', ';;
1344    esac
1345    eval enable_$ac_useropt=no ;;
1346
1347  -docdir | --docdir | --docdi | --doc | --do)
1348    ac_prev=docdir ;;
1349  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1350    docdir=$ac_optarg ;;
1351
1352  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1353    ac_prev=dvidir ;;
1354  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1355    dvidir=$ac_optarg ;;
1356
1357  -enable-* | --enable-*)
1358    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1359    # Reject names that are not valid shell variable names.
1360    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1361      as_fn_error $? "invalid feature name: $ac_useropt"
1362    ac_useropt_orig=$ac_useropt
1363    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1364    case $ac_user_opts in
1365      *"
1366"enable_$ac_useropt"
1367"*) ;;
1368      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1369	 ac_unrecognized_sep=', ';;
1370    esac
1371    eval enable_$ac_useropt=\$ac_optarg ;;
1372
1373  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1374  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1375  | --exec | --exe | --ex)
1376    ac_prev=exec_prefix ;;
1377  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1378  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1379  | --exec=* | --exe=* | --ex=*)
1380    exec_prefix=$ac_optarg ;;
1381
1382  -gas | --gas | --ga | --g)
1383    # Obsolete; use --with-gas.
1384    with_gas=yes ;;
1385
1386  -help | --help | --hel | --he | -h)
1387    ac_init_help=long ;;
1388  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1389    ac_init_help=recursive ;;
1390  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1391    ac_init_help=short ;;
1392
1393  -host | --host | --hos | --ho)
1394    ac_prev=host_alias ;;
1395  -host=* | --host=* | --hos=* | --ho=*)
1396    host_alias=$ac_optarg ;;
1397
1398  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1399    ac_prev=htmldir ;;
1400  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1401  | --ht=*)
1402    htmldir=$ac_optarg ;;
1403
1404  -includedir | --includedir | --includedi | --included | --include \
1405  | --includ | --inclu | --incl | --inc)
1406    ac_prev=includedir ;;
1407  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1408  | --includ=* | --inclu=* | --incl=* | --inc=*)
1409    includedir=$ac_optarg ;;
1410
1411  -infodir | --infodir | --infodi | --infod | --info | --inf)
1412    ac_prev=infodir ;;
1413  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1414    infodir=$ac_optarg ;;
1415
1416  -libdir | --libdir | --libdi | --libd)
1417    ac_prev=libdir ;;
1418  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1419    libdir=$ac_optarg ;;
1420
1421  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1422  | --libexe | --libex | --libe)
1423    ac_prev=libexecdir ;;
1424  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1425  | --libexe=* | --libex=* | --libe=*)
1426    libexecdir=$ac_optarg ;;
1427
1428  -localedir | --localedir | --localedi | --localed | --locale)
1429    ac_prev=localedir ;;
1430  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1431    localedir=$ac_optarg ;;
1432
1433  -localstatedir | --localstatedir | --localstatedi | --localstated \
1434  | --localstate | --localstat | --localsta | --localst | --locals)
1435    ac_prev=localstatedir ;;
1436  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1437  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1438    localstatedir=$ac_optarg ;;
1439
1440  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1441    ac_prev=mandir ;;
1442  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1443    mandir=$ac_optarg ;;
1444
1445  -nfp | --nfp | --nf)
1446    # Obsolete; use --without-fp.
1447    with_fp=no ;;
1448
1449  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1450  | --no-cr | --no-c | -n)
1451    no_create=yes ;;
1452
1453  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1454  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1455    no_recursion=yes ;;
1456
1457  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1458  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1459  | --oldin | --oldi | --old | --ol | --o)
1460    ac_prev=oldincludedir ;;
1461  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1462  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1463  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1464    oldincludedir=$ac_optarg ;;
1465
1466  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1467    ac_prev=prefix ;;
1468  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1469    prefix=$ac_optarg ;;
1470
1471  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1472  | --program-pre | --program-pr | --program-p)
1473    ac_prev=program_prefix ;;
1474  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1475  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1476    program_prefix=$ac_optarg ;;
1477
1478  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1479  | --program-suf | --program-su | --program-s)
1480    ac_prev=program_suffix ;;
1481  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1482  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1483    program_suffix=$ac_optarg ;;
1484
1485  -program-transform-name | --program-transform-name \
1486  | --program-transform-nam | --program-transform-na \
1487  | --program-transform-n | --program-transform- \
1488  | --program-transform | --program-transfor \
1489  | --program-transfo | --program-transf \
1490  | --program-trans | --program-tran \
1491  | --progr-tra | --program-tr | --program-t)
1492    ac_prev=program_transform_name ;;
1493  -program-transform-name=* | --program-transform-name=* \
1494  | --program-transform-nam=* | --program-transform-na=* \
1495  | --program-transform-n=* | --program-transform-=* \
1496  | --program-transform=* | --program-transfor=* \
1497  | --program-transfo=* | --program-transf=* \
1498  | --program-trans=* | --program-tran=* \
1499  | --progr-tra=* | --program-tr=* | --program-t=*)
1500    program_transform_name=$ac_optarg ;;
1501
1502  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1503    ac_prev=pdfdir ;;
1504  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1505    pdfdir=$ac_optarg ;;
1506
1507  -psdir | --psdir | --psdi | --psd | --ps)
1508    ac_prev=psdir ;;
1509  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1510    psdir=$ac_optarg ;;
1511
1512  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1513  | -silent | --silent | --silen | --sile | --sil)
1514    silent=yes ;;
1515
1516  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1517    ac_prev=sbindir ;;
1518  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1519  | --sbi=* | --sb=*)
1520    sbindir=$ac_optarg ;;
1521
1522  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1523  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1524  | --sharedst | --shareds | --shared | --share | --shar \
1525  | --sha | --sh)
1526    ac_prev=sharedstatedir ;;
1527  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1528  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1529  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1530  | --sha=* | --sh=*)
1531    sharedstatedir=$ac_optarg ;;
1532
1533  -site | --site | --sit)
1534    ac_prev=site ;;
1535  -site=* | --site=* | --sit=*)
1536    site=$ac_optarg ;;
1537
1538  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1539    ac_prev=srcdir ;;
1540  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1541    srcdir=$ac_optarg ;;
1542
1543  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1544  | --syscon | --sysco | --sysc | --sys | --sy)
1545    ac_prev=sysconfdir ;;
1546  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1547  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1548    sysconfdir=$ac_optarg ;;
1549
1550  -target | --target | --targe | --targ | --tar | --ta | --t)
1551    ac_prev=target_alias ;;
1552  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1553    target_alias=$ac_optarg ;;
1554
1555  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1556    verbose=yes ;;
1557
1558  -version | --version | --versio | --versi | --vers | -V)
1559    ac_init_version=: ;;
1560
1561  -with-* | --with-*)
1562    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1563    # Reject names that are not valid shell variable names.
1564    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565      as_fn_error $? "invalid package name: $ac_useropt"
1566    ac_useropt_orig=$ac_useropt
1567    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568    case $ac_user_opts in
1569      *"
1570"with_$ac_useropt"
1571"*) ;;
1572      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1573	 ac_unrecognized_sep=', ';;
1574    esac
1575    eval with_$ac_useropt=\$ac_optarg ;;
1576
1577  -without-* | --without-*)
1578    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1579    # Reject names that are not valid shell variable names.
1580    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1581      as_fn_error $? "invalid package name: $ac_useropt"
1582    ac_useropt_orig=$ac_useropt
1583    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1584    case $ac_user_opts in
1585      *"
1586"with_$ac_useropt"
1587"*) ;;
1588      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1589	 ac_unrecognized_sep=', ';;
1590    esac
1591    eval with_$ac_useropt=no ;;
1592
1593  --x)
1594    # Obsolete; use --with-x.
1595    with_x=yes ;;
1596
1597  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1598  | --x-incl | --x-inc | --x-in | --x-i)
1599    ac_prev=x_includes ;;
1600  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1601  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1602    x_includes=$ac_optarg ;;
1603
1604  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1605  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1606    ac_prev=x_libraries ;;
1607  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1608  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1609    x_libraries=$ac_optarg ;;
1610
1611  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1612Try \`$0 --help' for more information"
1613    ;;
1614
1615  *=*)
1616    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1617    # Reject names that are not valid shell variable names.
1618    case $ac_envvar in #(
1619      '' | [0-9]* | *[!_$as_cr_alnum]* )
1620      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1621    esac
1622    eval $ac_envvar=\$ac_optarg
1623    export $ac_envvar ;;
1624
1625  *)
1626    # FIXME: should be removed in autoconf 3.0.
1627    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1628    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1629      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1630    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1631    ;;
1632
1633  esac
1634done
1635
1636if test -n "$ac_prev"; then
1637  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1638  as_fn_error $? "missing argument to $ac_option"
1639fi
1640
1641if test -n "$ac_unrecognized_opts"; then
1642  case $enable_option_checking in
1643    no) ;;
1644    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1645    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1646  esac
1647fi
1648
1649# Check all directory arguments for consistency.
1650for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1651		datadir sysconfdir sharedstatedir localstatedir includedir \
1652		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1653		libdir localedir mandir
1654do
1655  eval ac_val=\$$ac_var
1656  # Remove trailing slashes.
1657  case $ac_val in
1658    */ )
1659      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1660      eval $ac_var=\$ac_val;;
1661  esac
1662  # Be sure to have absolute directory names.
1663  case $ac_val in
1664    [\\/$]* | ?:[\\/]* )  continue;;
1665    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1666  esac
1667  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1668done
1669
1670# There might be people who depend on the old broken behavior: `$host'
1671# used to hold the argument of --host etc.
1672# FIXME: To remove some day.
1673build=$build_alias
1674host=$host_alias
1675target=$target_alias
1676
1677# FIXME: To remove some day.
1678if test "x$host_alias" != x; then
1679  if test "x$build_alias" = x; then
1680    cross_compiling=maybe
1681  elif test "x$build_alias" != "x$host_alias"; then
1682    cross_compiling=yes
1683  fi
1684fi
1685
1686ac_tool_prefix=
1687test -n "$host_alias" && ac_tool_prefix=$host_alias-
1688
1689test "$silent" = yes && exec 6>/dev/null
1690
1691
1692ac_pwd=`pwd` && test -n "$ac_pwd" &&
1693ac_ls_di=`ls -di .` &&
1694ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1695  as_fn_error $? "working directory cannot be determined"
1696test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1697  as_fn_error $? "pwd does not report name of working directory"
1698
1699
1700# Find the source files, if location was not specified.
1701if test -z "$srcdir"; then
1702  ac_srcdir_defaulted=yes
1703  # Try the directory containing this script, then the parent directory.
1704  ac_confdir=`$as_dirname -- "$as_myself" ||
1705$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1706	 X"$as_myself" : 'X\(//\)[^/]' \| \
1707	 X"$as_myself" : 'X\(//\)$' \| \
1708	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1709$as_echo X"$as_myself" |
1710    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1711	    s//\1/
1712	    q
1713	  }
1714	  /^X\(\/\/\)[^/].*/{
1715	    s//\1/
1716	    q
1717	  }
1718	  /^X\(\/\/\)$/{
1719	    s//\1/
1720	    q
1721	  }
1722	  /^X\(\/\).*/{
1723	    s//\1/
1724	    q
1725	  }
1726	  s/.*/./; q'`
1727  srcdir=$ac_confdir
1728  if test ! -r "$srcdir/$ac_unique_file"; then
1729    srcdir=..
1730  fi
1731else
1732  ac_srcdir_defaulted=no
1733fi
1734if test ! -r "$srcdir/$ac_unique_file"; then
1735  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1736  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1737fi
1738ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1739ac_abs_confdir=`(
1740	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1741	pwd)`
1742# When building in place, set srcdir=.
1743if test "$ac_abs_confdir" = "$ac_pwd"; then
1744  srcdir=.
1745fi
1746# Remove unnecessary trailing slashes from srcdir.
1747# Double slashes in file names in object file debugging info
1748# mess up M-x gdb in Emacs.
1749case $srcdir in
1750*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1751esac
1752for ac_var in $ac_precious_vars; do
1753  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1754  eval ac_env_${ac_var}_value=\$${ac_var}
1755  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1756  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1757done
1758
1759#
1760# Report the --help message.
1761#
1762if test "$ac_init_help" = "long"; then
1763  # Omit some internal or obsolete options to make the list less imposing.
1764  # This message is too long to be a string in the A/UX 3.1 sh.
1765  cat <<_ACEOF
1766\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1767
1768Usage: $0 [OPTION]... [VAR=VALUE]...
1769
1770To assign environment variables (e.g., CC, CFLAGS...), specify them as
1771VAR=VALUE.  See below for descriptions of some of the useful variables.
1772
1773Defaults for the options are specified in brackets.
1774
1775Configuration:
1776  -h, --help              display this help and exit
1777      --help=short        display options specific to this package
1778      --help=recursive    display the short help of all the included packages
1779  -V, --version           display version information and exit
1780  -q, --quiet, --silent   do not print \`checking ...' messages
1781      --cache-file=FILE   cache test results in FILE [disabled]
1782  -C, --config-cache      alias for \`--cache-file=config.cache'
1783  -n, --no-create         do not create output files
1784      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1785
1786Installation directories:
1787  --prefix=PREFIX         install architecture-independent files in PREFIX
1788                          [$ac_default_prefix]
1789  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1790                          [PREFIX]
1791
1792By default, \`make install' will install all the files in
1793\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1794an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1795for instance \`--prefix=\$HOME'.
1796
1797For better control, use the options below.
1798
1799Fine tuning of the installation directories:
1800  --bindir=DIR            user executables [EPREFIX/bin]
1801  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1802  --libexecdir=DIR        program executables [EPREFIX/libexec]
1803  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1804  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1805  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1806  --libdir=DIR            object code libraries [EPREFIX/lib]
1807  --includedir=DIR        C header files [PREFIX/include]
1808  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1809  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1810  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1811  --infodir=DIR           info documentation [DATAROOTDIR/info]
1812  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1813  --mandir=DIR            man documentation [DATAROOTDIR/man]
1814  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1815  --htmldir=DIR           html documentation [DOCDIR]
1816  --dvidir=DIR            dvi documentation [DOCDIR]
1817  --pdfdir=DIR            pdf documentation [DOCDIR]
1818  --psdir=DIR             ps documentation [DOCDIR]
1819_ACEOF
1820
1821  cat <<\_ACEOF
1822
1823X features:
1824  --x-includes=DIR    X include files are in DIR
1825  --x-libraries=DIR   X library files are in DIR
1826
1827System types:
1828  --build=BUILD     configure for building on BUILD [guessed]
1829  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1830  --target=TARGET   configure for building compilers for TARGET [HOST]
1831_ACEOF
1832fi
1833
1834if test -n "$ac_init_help"; then
1835  case $ac_init_help in
1836     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1837   esac
1838  cat <<\_ACEOF
1839
1840Optional Features:
1841  --disable-option-checking  ignore unrecognized --enable/--with options
1842  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1843  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1844  --enable-openjdk-only   suppress building custom source even if present
1845                          [disabled]
1846  --enable-debug          set the debug level to fastdebug (shorthand for
1847                          --with-debug-level=fastdebug) [disabled]
1848  --disable-headful       disable building headful support (graphical UI
1849                          support) [enabled]
1850  --enable-hotspot-test-in-build
1851                          run the Queens test after Hotspot build [disabled]
1852  --enable-unlimited-crypto
1853                          Enable unlimited crypto policy [disabled]
1854  --enable-rmiconnector-iiop
1855                          enable the JMX RMIConnector iiop transport
1856                          [disabled]
1857  --disable-debug-symbols disable generation of debug symbols [enabled]
1858  --disable-zip-debug-info
1859                          disable zipping of debug-info files [enabled]
1860  --disable-freetype-bundling
1861                          disable bundling of the freetype library with the
1862                          build result [enabled on Windows or when using
1863                          --with-freetype, disabled otherwise]
1864  --enable-sjavac         use sjavac to do fast incremental compiles
1865                          [disabled]
1866  --disable-precompiled-headers
1867                          disable using precompiled headers when compiling C++
1868                          [enabled]
1869  --enable-ccache         enable using ccache to speed up recompilations
1870                          [disabled]
1871
1872Optional Packages:
1873  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1874  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1875  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1876                          support it), e.g. --with-target-bits=32 [guessed]
1877  --with-custom-make-dir  Deprecated. Option is kept for backwards
1878                          compatibility and is ignored
1879  --with-jdk-variant      JDK variant to build (normal) [normal]
1880  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1881  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1882                          client, minimal1, kernel, zero, zeroshark, core)
1883                          [server]
1884  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1885                          optimized (HotSpot build only)) [release]
1886  --with-devkit           use this devkit for compilers, tools and resources
1887  --with-sys-root         alias for --with-sysroot for backwards compatability
1888  --with-sysroot          use this directory as sysroot
1889  --with-tools-dir        alias for --with-toolchain-path for backwards
1890                          compatibility
1891  --with-toolchain-path   prepend these directories when searching for
1892                          toolchain binaries (compilers etc)
1893  --with-extra-path       prepend these directories to the default path
1894  --with-sdk-name         use the platform SDK of the given name. [macosx]
1895  --with-conf-name        use this as the name of the configuration [generated
1896                          from important configuration options]
1897  --with-output-sync      set make output sync type if supported by make.
1898                          [recurse]
1899  --with-builddeps-conf   use this configuration file for the builddeps
1900  --with-builddeps-server download and use build dependencies from this server
1901                          url
1902  --with-builddeps-dir    store downloaded build dependencies here
1903                          [/localhome/builddeps]
1904  --with-builddeps-group  chgrp the downloaded build dependencies to this
1905                          group
1906  --with-cacerts-file     specify alternative cacerts file
1907  --with-milestone        Set milestone value for build [internal]
1908  --with-update-version   Set update version value for build [b00]
1909  --with-user-release-suffix
1910                          Add a custom string to the version string if build
1911                          number is not set.[username_builddateb00]
1912  --with-build-number     Set build number value for build [b00]
1913  --with-copyright-year   Set copyright year value for build [current year]
1914  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915  --with-add-source-root  for each and every source directory, look in this
1916                          additional source root for the same directory; if it
1917                          exists and have files in it, include it in the build
1918  --with-override-source-root
1919                          for each and every source directory, look in this
1920                          override source root for the same directory; if it
1921                          exists, use that directory instead and ignore the
1922                          directory in the original source root
1923  --with-adds-and-overrides
1924                          use the subdirs 'adds' and 'overrides' in the
1925                          specified directory as add-source-root and
1926                          override-source-root
1927  --with-override-langtools
1928                          use this langtools dir for the build
1929  --with-override-corba   use this corba dir for the build
1930  --with-override-jaxp    use this jaxp dir for the build
1931  --with-override-jaxws   use this jaxws dir for the build
1932  --with-override-hotspot use this hotspot dir for the build
1933  --with-override-nashorn use this nashorn dir for the build
1934  --with-override-jdk     use this jdk dir for the build
1935  --with-import-hotspot   import hotspot binaries from this jdk image or
1936                          hotspot build dist dir instead of building from
1937                          source
1938  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                          to show possible values [platform dependent]
1940  --with-toolchain-version
1941                          the version of the toolchain to look for, use
1942                          '--help' to show possible values [platform
1943                          dependent]
1944  --with-jtreg            Regression Test Harness [probed]
1945  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947  --with-extra-ldflags    extra flags to be used when linking jdk
1948  --with-x                use the X Window System
1949  --with-cups             specify prefix directory for the cups package
1950                          (expecting the headers under PATH/include)
1951  --with-cups-include     specify directory for the cups include files
1952  --with-freetype         specify prefix directory for the freetype package
1953                          (expecting the libraries under PATH/lib and the
1954                          headers under PATH/include)
1955  --with-freetype-include specify directory for the freetype include files
1956  --with-freetype-lib     specify directory for the freetype library
1957  --with-freetype-src     specify directory with freetype sources to
1958                          automatically build the library (experimental,
1959                          Windows-only)
1960  --with-alsa             specify prefix directory for the alsa package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-alsa-include     specify directory for the alsa include files
1964  --with-alsa-lib         specify directory for the alsa library
1965  --with-libjpeg          use libjpeg from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-giflib           use giflib from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-lcms             use lcms2 from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-libpng           use libpng from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-zlib             use zlib from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-stdc++lib=<static>,<dynamic>,<default>
1976                          force linking of the C++ runtime on Linux to either
1977                          static or dynamic, default is static with dynamic as
1978                          fallback
1979  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1980                          (Windows only) [probed]
1981  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1982                          (Windows only) [probed]
1983  --with-dxsdk            Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-num-cores        number of cores in the build system, e.g.
1990                          --with-num-cores=8 [probed]
1991  --with-memory-size      memory (in MB) available in the build system, e.g.
1992                          --with-memory-size=1024 [probed]
1993  --with-jobs             number of parallel jobs to let make run [calculated
1994                          based on cores and memory]
1995  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                          invocations of boot JDK, overriding the default
1997                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                          -enableassertions"
1999  --with-sjavac-server-java
2000                          use this java binary for running the sjavac
2001                          background server [Boot JDK java]
2002  --with-ccache-dir       where to store ccache files [~/.ccache]
2003
2004Some influential environment variables:
2005  BASENAME    Override default value for BASENAME
2006  BASH        Override default value for BASH
2007  CAT         Override default value for CAT
2008  CHMOD       Override default value for CHMOD
2009  CMP         Override default value for CMP
2010  COMM        Override default value for COMM
2011  CP          Override default value for CP
2012  CUT         Override default value for CUT
2013  DATE        Override default value for DATE
2014  DIFF        Override default value for DIFF
2015  DIRNAME     Override default value for DIRNAME
2016  ECHO        Override default value for ECHO
2017  EXPR        Override default value for EXPR
2018  FILE        Override default value for FILE
2019  FIND        Override default value for FIND
2020  HEAD        Override default value for HEAD
2021  LN          Override default value for LN
2022  LS          Override default value for LS
2023  MKDIR       Override default value for MKDIR
2024  MKTEMP      Override default value for MKTEMP
2025  MV          Override default value for MV
2026  NAWK        Override default value for NAWK
2027  PRINTF      Override default value for PRINTF
2028  RM          Override default value for RM
2029  SH          Override default value for SH
2030  SORT        Override default value for SORT
2031  TAIL        Override default value for TAIL
2032  TAR         Override default value for TAR
2033  TEE         Override default value for TEE
2034  TOUCH       Override default value for TOUCH
2035  TR          Override default value for TR
2036  UNAME       Override default value for UNAME
2037  UNIQ        Override default value for UNIQ
2038  WC          Override default value for WC
2039  WHICH       Override default value for WHICH
2040  XARGS       Override default value for XARGS
2041  AWK         Override default value for AWK
2042  GREP        Override default value for GREP
2043  EGREP       Override default value for EGREP
2044  FGREP       Override default value for FGREP
2045  SED         Override default value for SED
2046  CYGPATH     Override default value for CYGPATH
2047  READLINK    Override default value for READLINK
2048  DF          Override default value for DF
2049  SETFILE     Override default value for SETFILE
2050  CPIO        Override default value for CPIO
2051  UNZIP       Override default value for UNZIP
2052  ZIP         Override default value for ZIP
2053  LDD         Override default value for LDD
2054  OTOOL       Override default value for OTOOL
2055  READELF     Override default value for READELF
2056  HG          Override default value for HG
2057  STAT        Override default value for STAT
2058  TIME        Override default value for TIME
2059  DSYMUTIL    Override default value for DSYMUTIL
2060  XATTR       Override default value for XATTR
2061  CODESIGN    Override default value for CODESIGN
2062  PKG_CONFIG  path to pkg-config utility
2063  JAVA        Override default value for JAVA
2064  JAVAC       Override default value for JAVAC
2065  JAVAH       Override default value for JAVAH
2066  JAR         Override default value for JAR
2067  NATIVE2ASCII
2068              Override default value for NATIVE2ASCII
2069  JARSIGNER   Override default value for JARSIGNER
2070  CC          C compiler command
2071  CFLAGS      C compiler flags
2072  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2073              nonstandard directory <lib dir>
2074  LIBS        libraries to pass to the linker, e.g. -l<library>
2075  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2076              you have headers in a nonstandard directory <include dir>
2077  CXX         C++ compiler command
2078  CXXFLAGS    C++ compiler flags
2079  CPP         C preprocessor
2080  CXXCPP      C++ preprocessor
2081  AS          Override default value for AS
2082  AR          Override default value for AR
2083  OBJC        Objective C compiler command
2084  OBJCFLAGS   Objective C compiler flags
2085  LIPO        Override default value for LIPO
2086  STRIP       Override default value for STRIP
2087  NM          Override default value for NM
2088  GNM         Override default value for GNM
2089  MCS         Override default value for MCS
2090  OBJCOPY     Override default value for OBJCOPY
2091  OBJDUMP     Override default value for OBJDUMP
2092  BUILD_CC    Override default value for BUILD_CC
2093  BUILD_CXX   Override default value for BUILD_CXX
2094  BUILD_LD    Override default value for BUILD_LD
2095  JTREGEXE    Override default value for JTREGEXE
2096  XMKMF       Path to xmkmf, Makefile generator for X Window System
2097  FREETYPE_CFLAGS
2098              C compiler flags for FREETYPE, overriding pkg-config
2099  FREETYPE_LIBS
2100              linker flags for FREETYPE, overriding pkg-config
2101  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2102  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2103  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2104  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2105  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106  PNG_LIBS    linker flags for PNG, overriding pkg-config
2107  LIBFFI_CFLAGS
2108              C compiler flags for LIBFFI, overriding pkg-config
2109  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110  CCACHE      Override default value for CCACHE
2111
2112Use these variables to override the choices made by `configure' or to help
2113it to find libraries and programs with nonstandard names/locations.
2114
2115Report bugs to <build-dev@openjdk.java.net>.
2116OpenJDK home page: <http://openjdk.java.net>.
2117_ACEOF
2118ac_status=$?
2119fi
2120
2121if test "$ac_init_help" = "recursive"; then
2122  # If there are subdirs, report their specific --help.
2123  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2124    test -d "$ac_dir" ||
2125      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2126      continue
2127    ac_builddir=.
2128
2129case "$ac_dir" in
2130.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2131*)
2132  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2133  # A ".." for each directory in $ac_dir_suffix.
2134  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2135  case $ac_top_builddir_sub in
2136  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2138  esac ;;
2139esac
2140ac_abs_top_builddir=$ac_pwd
2141ac_abs_builddir=$ac_pwd$ac_dir_suffix
2142# for backward compatibility:
2143ac_top_builddir=$ac_top_build_prefix
2144
2145case $srcdir in
2146  .)  # We are building in place.
2147    ac_srcdir=.
2148    ac_top_srcdir=$ac_top_builddir_sub
2149    ac_abs_top_srcdir=$ac_pwd ;;
2150  [\\/]* | ?:[\\/]* )  # Absolute name.
2151    ac_srcdir=$srcdir$ac_dir_suffix;
2152    ac_top_srcdir=$srcdir
2153    ac_abs_top_srcdir=$srcdir ;;
2154  *) # Relative name.
2155    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2156    ac_top_srcdir=$ac_top_build_prefix$srcdir
2157    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2158esac
2159ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2160
2161    cd "$ac_dir" || { ac_status=$?; continue; }
2162    # Check for guested configure.
2163    if test -f "$ac_srcdir/configure.gnu"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2166    elif test -f "$ac_srcdir/configure"; then
2167      echo &&
2168      $SHELL "$ac_srcdir/configure" --help=recursive
2169    else
2170      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2171    fi || ac_status=$?
2172    cd "$ac_pwd" || { ac_status=$?; break; }
2173  done
2174fi
2175
2176test -n "$ac_init_help" && exit $ac_status
2177if $ac_init_version; then
2178  cat <<\_ACEOF
2179OpenJDK configure jdk9
2180generated by GNU Autoconf 2.69
2181
2182Copyright (C) 2012 Free Software Foundation, Inc.
2183This configure script is free software; the Free Software Foundation
2184gives unlimited permission to copy, distribute and modify it.
2185_ACEOF
2186  exit
2187fi
2188
2189## ------------------------ ##
2190## Autoconf initialization. ##
2191## ------------------------ ##
2192
2193# ac_fn_c_try_compile LINENO
2194# --------------------------
2195# Try to compile conftest.$ac_ext, and return whether this succeeded.
2196ac_fn_c_try_compile ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  rm -f conftest.$ac_objext
2200  if { { ac_try="$ac_compile"
2201case "(($ac_try" in
2202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203  *) ac_try_echo=$ac_try;;
2204esac
2205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206$as_echo "$ac_try_echo"; } >&5
2207  (eval "$ac_compile") 2>conftest.err
2208  ac_status=$?
2209  if test -s conftest.err; then
2210    grep -v '^ *+' conftest.err >conftest.er1
2211    cat conftest.er1 >&5
2212    mv -f conftest.er1 conftest.err
2213  fi
2214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215  test $ac_status = 0; } && {
2216	 test -z "$ac_c_werror_flag" ||
2217	 test ! -s conftest.err
2218       } && test -s conftest.$ac_objext; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: failed program was:" >&5
2222sed 's/^/| /' conftest.$ac_ext >&5
2223
2224	ac_retval=1
2225fi
2226  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_try_compile
2230
2231# ac_fn_cxx_try_compile LINENO
2232# ----------------------------
2233# Try to compile conftest.$ac_ext, and return whether this succeeded.
2234ac_fn_cxx_try_compile ()
2235{
2236  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237  rm -f conftest.$ac_objext
2238  if { { ac_try="$ac_compile"
2239case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_compile") 2>conftest.err
2246  ac_status=$?
2247  if test -s conftest.err; then
2248    grep -v '^ *+' conftest.err >conftest.er1
2249    cat conftest.er1 >&5
2250    mv -f conftest.er1 conftest.err
2251  fi
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && {
2254	 test -z "$ac_cxx_werror_flag" ||
2255	 test ! -s conftest.err
2256       } && test -s conftest.$ac_objext; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262	ac_retval=1
2263fi
2264  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265  as_fn_set_status $ac_retval
2266
2267} # ac_fn_cxx_try_compile
2268
2269# ac_fn_c_try_cpp LINENO
2270# ----------------------
2271# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_cpp ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  if { { ac_try="$ac_cpp conftest.$ac_ext"
2276case "(($ac_try" in
2277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278  *) ac_try_echo=$ac_try;;
2279esac
2280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281$as_echo "$ac_try_echo"; } >&5
2282  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2283  ac_status=$?
2284  if test -s conftest.err; then
2285    grep -v '^ *+' conftest.err >conftest.er1
2286    cat conftest.er1 >&5
2287    mv -f conftest.er1 conftest.err
2288  fi
2289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290  test $ac_status = 0; } > conftest.i && {
2291	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2292	 test ! -s conftest.err
2293       }; then :
2294  ac_retval=0
2295else
2296  $as_echo "$as_me: failed program was:" >&5
2297sed 's/^/| /' conftest.$ac_ext >&5
2298
2299    ac_retval=1
2300fi
2301  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302  as_fn_set_status $ac_retval
2303
2304} # ac_fn_c_try_cpp
2305
2306# ac_fn_cxx_try_cpp LINENO
2307# ------------------------
2308# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2309ac_fn_cxx_try_cpp ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  if { { ac_try="$ac_cpp conftest.$ac_ext"
2313case "(($ac_try" in
2314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315  *) ac_try_echo=$ac_try;;
2316esac
2317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318$as_echo "$ac_try_echo"; } >&5
2319  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2320  ac_status=$?
2321  if test -s conftest.err; then
2322    grep -v '^ *+' conftest.err >conftest.er1
2323    cat conftest.er1 >&5
2324    mv -f conftest.er1 conftest.err
2325  fi
2326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327  test $ac_status = 0; } > conftest.i && {
2328	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2329	 test ! -s conftest.err
2330       }; then :
2331  ac_retval=0
2332else
2333  $as_echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
2336    ac_retval=1
2337fi
2338  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339  as_fn_set_status $ac_retval
2340
2341} # ac_fn_cxx_try_cpp
2342
2343# ac_fn_objc_try_compile LINENO
2344# -----------------------------
2345# Try to compile conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_objc_try_compile ()
2347{
2348  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349  rm -f conftest.$ac_objext
2350  if { { ac_try="$ac_compile"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_compile") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } && {
2366	 test -z "$ac_objc_werror_flag" ||
2367	 test ! -s conftest.err
2368       } && test -s conftest.$ac_objext; then :
2369  ac_retval=0
2370else
2371  $as_echo "$as_me: failed program was:" >&5
2372sed 's/^/| /' conftest.$ac_ext >&5
2373
2374	ac_retval=1
2375fi
2376  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2377  as_fn_set_status $ac_retval
2378
2379} # ac_fn_objc_try_compile
2380
2381# ac_fn_c_try_link LINENO
2382# -----------------------
2383# Try to link conftest.$ac_ext, and return whether this succeeded.
2384ac_fn_c_try_link ()
2385{
2386  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2387  rm -f conftest.$ac_objext conftest$ac_exeext
2388  if { { ac_try="$ac_link"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_link") 2>conftest.err
2396  ac_status=$?
2397  if test -s conftest.err; then
2398    grep -v '^ *+' conftest.err >conftest.er1
2399    cat conftest.er1 >&5
2400    mv -f conftest.er1 conftest.err
2401  fi
2402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403  test $ac_status = 0; } && {
2404	 test -z "$ac_c_werror_flag" ||
2405	 test ! -s conftest.err
2406       } && test -s conftest$ac_exeext && {
2407	 test "$cross_compiling" = yes ||
2408	 test -x conftest$ac_exeext
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415	ac_retval=1
2416fi
2417  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2418  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2419  # interfere with the next link command; also delete a directory that is
2420  # left behind by Apple's compiler.  We do this before executing the actions.
2421  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2422  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423  as_fn_set_status $ac_retval
2424
2425} # ac_fn_c_try_link
2426
2427# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2428# ---------------------------------------------------------
2429# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2430# the include files in INCLUDES and setting the cache variable VAR
2431# accordingly.
2432ac_fn_cxx_check_header_mongrel ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  if eval \${$3+:} false; then :
2436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2437$as_echo_n "checking for $2... " >&6; }
2438if eval \${$3+:} false; then :
2439  $as_echo_n "(cached) " >&6
2440fi
2441eval ac_res=\$$3
2442	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
2444else
2445  # Is the header compilable?
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2447$as_echo_n "checking $2 usability... " >&6; }
2448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h.  */
2450$4
2451#include <$2>
2452_ACEOF
2453if ac_fn_cxx_try_compile "$LINENO"; then :
2454  ac_header_compiler=yes
2455else
2456  ac_header_compiler=no
2457fi
2458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2460$as_echo "$ac_header_compiler" >&6; }
2461
2462# Is the header present?
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2464$as_echo_n "checking $2 presence... " >&6; }
2465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466/* end confdefs.h.  */
2467#include <$2>
2468_ACEOF
2469if ac_fn_cxx_try_cpp "$LINENO"; then :
2470  ac_header_preproc=yes
2471else
2472  ac_header_preproc=no
2473fi
2474rm -f conftest.err conftest.i conftest.$ac_ext
2475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2476$as_echo "$ac_header_preproc" >&6; }
2477
2478# So?  What about this header?
2479case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2480  yes:no: )
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2482$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485    ;;
2486  no:yes:* )
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2488$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2490$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2492$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2494$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2495    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2496$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2497( $as_echo "## ----------------------------------------- ##
2498## Report this to build-dev@openjdk.java.net ##
2499## ----------------------------------------- ##"
2500     ) | sed "s/^/$as_me: WARNING:     /" >&2
2501    ;;
2502esac
2503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504$as_echo_n "checking for $2... " >&6; }
2505if eval \${$3+:} false; then :
2506  $as_echo_n "(cached) " >&6
2507else
2508  eval "$3=\$ac_header_compiler"
2509fi
2510eval ac_res=\$$3
2511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513fi
2514  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516} # ac_fn_cxx_check_header_mongrel
2517
2518# ac_fn_cxx_try_run LINENO
2519# ------------------------
2520# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2521# that executables *can* be run.
2522ac_fn_cxx_try_run ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  if { { ac_try="$ac_link"
2526case "(($ac_try" in
2527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528  *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532  (eval "$ac_link") 2>&5
2533  ac_status=$?
2534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2535  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2536  { { case "(($ac_try" in
2537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538  *) ac_try_echo=$ac_try;;
2539esac
2540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541$as_echo "$ac_try_echo"; } >&5
2542  (eval "$ac_try") 2>&5
2543  ac_status=$?
2544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2545  test $ac_status = 0; }; }; then :
2546  ac_retval=0
2547else
2548  $as_echo "$as_me: program exited with status $ac_status" >&5
2549       $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552       ac_retval=$ac_status
2553fi
2554  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556  as_fn_set_status $ac_retval
2557
2558} # ac_fn_cxx_try_run
2559
2560# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2561# ---------------------------------------------------------
2562# Tests whether HEADER exists and can be compiled using the include files in
2563# INCLUDES, setting the cache variable VAR accordingly.
2564ac_fn_cxx_check_header_compile ()
2565{
2566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2568$as_echo_n "checking for $2... " >&6; }
2569if eval \${$3+:} false; then :
2570  $as_echo_n "(cached) " >&6
2571else
2572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573/* end confdefs.h.  */
2574$4
2575#include <$2>
2576_ACEOF
2577if ac_fn_cxx_try_compile "$LINENO"; then :
2578  eval "$3=yes"
2579else
2580  eval "$3=no"
2581fi
2582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2583fi
2584eval ac_res=\$$3
2585	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586$as_echo "$ac_res" >&6; }
2587  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588
2589} # ac_fn_cxx_check_header_compile
2590
2591# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2592# ----------------------------------------------
2593# Tries to find the compile-time value of EXPR in a program that includes
2594# INCLUDES, setting VAR accordingly. Returns whether the value could be
2595# computed
2596ac_fn_cxx_compute_int ()
2597{
2598  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599  if test "$cross_compiling" = yes; then
2600    # Depending upon the size, compute the lo and hi bounds.
2601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) >= 0)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_lo=0 ac_mid=0
2617  while :; do
2618    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620$4
2621int
2622main ()
2623{
2624static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2625test_array [0] = 0;
2626return test_array [0];
2627
2628  ;
2629  return 0;
2630}
2631_ACEOF
2632if ac_fn_cxx_try_compile "$LINENO"; then :
2633  ac_hi=$ac_mid; break
2634else
2635  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2636			if test $ac_lo -le $ac_mid; then
2637			  ac_lo= ac_hi=
2638			  break
2639			fi
2640			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2641fi
2642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2643  done
2644else
2645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648int
2649main ()
2650{
2651static int test_array [1 - 2 * !(($2) < 0)];
2652test_array [0] = 0;
2653return test_array [0];
2654
2655  ;
2656  return 0;
2657}
2658_ACEOF
2659if ac_fn_cxx_try_compile "$LINENO"; then :
2660  ac_hi=-1 ac_mid=-1
2661  while :; do
2662    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2663/* end confdefs.h.  */
2664$4
2665int
2666main ()
2667{
2668static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2669test_array [0] = 0;
2670return test_array [0];
2671
2672  ;
2673  return 0;
2674}
2675_ACEOF
2676if ac_fn_cxx_try_compile "$LINENO"; then :
2677  ac_lo=$ac_mid; break
2678else
2679  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2680			if test $ac_mid -le $ac_hi; then
2681			  ac_lo= ac_hi=
2682			  break
2683			fi
2684			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2685fi
2686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687  done
2688else
2689  ac_lo= ac_hi=
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692fi
2693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694# Binary search between lo and hi bounds.
2695while test "x$ac_lo" != "x$ac_hi"; do
2696  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2698/* end confdefs.h.  */
2699$4
2700int
2701main ()
2702{
2703static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2704test_array [0] = 0;
2705return test_array [0];
2706
2707  ;
2708  return 0;
2709}
2710_ACEOF
2711if ac_fn_cxx_try_compile "$LINENO"; then :
2712  ac_hi=$ac_mid
2713else
2714  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2715fi
2716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2717done
2718case $ac_lo in #((
2719?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2720'') ac_retval=1 ;;
2721esac
2722  else
2723    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724/* end confdefs.h.  */
2725$4
2726static long int longval () { return $2; }
2727static unsigned long int ulongval () { return $2; }
2728#include <stdio.h>
2729#include <stdlib.h>
2730int
2731main ()
2732{
2733
2734  FILE *f = fopen ("conftest.val", "w");
2735  if (! f)
2736    return 1;
2737  if (($2) < 0)
2738    {
2739      long int i = longval ();
2740      if (i != ($2))
2741	return 1;
2742      fprintf (f, "%ld", i);
2743    }
2744  else
2745    {
2746      unsigned long int i = ulongval ();
2747      if (i != ($2))
2748	return 1;
2749      fprintf (f, "%lu", i);
2750    }
2751  /* Do not output a trailing newline, as this causes \r\n confusion
2752     on some platforms.  */
2753  return ferror (f) || fclose (f) != 0;
2754
2755  ;
2756  return 0;
2757}
2758_ACEOF
2759if ac_fn_cxx_try_run "$LINENO"; then :
2760  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2761else
2762  ac_retval=1
2763fi
2764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2765  conftest.$ac_objext conftest.beam conftest.$ac_ext
2766rm -f conftest.val
2767
2768  fi
2769  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2770  as_fn_set_status $ac_retval
2771
2772} # ac_fn_cxx_compute_int
2773
2774# ac_fn_cxx_try_link LINENO
2775# -------------------------
2776# Try to link conftest.$ac_ext, and return whether this succeeded.
2777ac_fn_cxx_try_link ()
2778{
2779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780  rm -f conftest.$ac_objext conftest$ac_exeext
2781  if { { ac_try="$ac_link"
2782case "(($ac_try" in
2783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784  *) ac_try_echo=$ac_try;;
2785esac
2786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2787$as_echo "$ac_try_echo"; } >&5
2788  (eval "$ac_link") 2>conftest.err
2789  ac_status=$?
2790  if test -s conftest.err; then
2791    grep -v '^ *+' conftest.err >conftest.er1
2792    cat conftest.er1 >&5
2793    mv -f conftest.er1 conftest.err
2794  fi
2795  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2796  test $ac_status = 0; } && {
2797	 test -z "$ac_cxx_werror_flag" ||
2798	 test ! -s conftest.err
2799       } && test -s conftest$ac_exeext && {
2800	 test "$cross_compiling" = yes ||
2801	 test -x conftest$ac_exeext
2802       }; then :
2803  ac_retval=0
2804else
2805  $as_echo "$as_me: failed program was:" >&5
2806sed 's/^/| /' conftest.$ac_ext >&5
2807
2808	ac_retval=1
2809fi
2810  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2811  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2812  # interfere with the next link command; also delete a directory that is
2813  # left behind by Apple's compiler.  We do this before executing the actions.
2814  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2815  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2816  as_fn_set_status $ac_retval
2817
2818} # ac_fn_cxx_try_link
2819
2820# ac_fn_cxx_check_func LINENO FUNC VAR
2821# ------------------------------------
2822# Tests whether FUNC exists, setting the cache variable VAR accordingly
2823ac_fn_cxx_check_func ()
2824{
2825  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2827$as_echo_n "checking for $2... " >&6; }
2828if eval \${$3+:} false; then :
2829  $as_echo_n "(cached) " >&6
2830else
2831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2832/* end confdefs.h.  */
2833/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2834   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2835#define $2 innocuous_$2
2836
2837/* System header to define __stub macros and hopefully few prototypes,
2838    which can conflict with char $2 (); below.
2839    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2840    <limits.h> exists even on freestanding compilers.  */
2841
2842#ifdef __STDC__
2843# include <limits.h>
2844#else
2845# include <assert.h>
2846#endif
2847
2848#undef $2
2849
2850/* Override any GCC internal prototype to avoid an error.
2851   Use char because int might match the return type of a GCC
2852   builtin and then its argument prototype would still apply.  */
2853#ifdef __cplusplus
2854extern "C"
2855#endif
2856char $2 ();
2857/* The GNU C library defines this for functions which it implements
2858    to always fail with ENOSYS.  Some functions are actually named
2859    something starting with __ and the normal name is an alias.  */
2860#if defined __stub_$2 || defined __stub___$2
2861choke me
2862#endif
2863
2864int
2865main ()
2866{
2867return $2 ();
2868  ;
2869  return 0;
2870}
2871_ACEOF
2872if ac_fn_cxx_try_link "$LINENO"; then :
2873  eval "$3=yes"
2874else
2875  eval "$3=no"
2876fi
2877rm -f core conftest.err conftest.$ac_objext \
2878    conftest$ac_exeext conftest.$ac_ext
2879fi
2880eval ac_res=\$$3
2881	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2882$as_echo "$ac_res" >&6; }
2883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2884
2885} # ac_fn_cxx_check_func
2886
2887# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2888# -------------------------------------------------------
2889# Tests whether HEADER exists and can be compiled using the include files in
2890# INCLUDES, setting the cache variable VAR accordingly.
2891ac_fn_c_check_header_compile ()
2892{
2893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2895$as_echo_n "checking for $2... " >&6; }
2896if eval \${$3+:} false; then :
2897  $as_echo_n "(cached) " >&6
2898else
2899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2900/* end confdefs.h.  */
2901$4
2902#include <$2>
2903_ACEOF
2904if ac_fn_c_try_compile "$LINENO"; then :
2905  eval "$3=yes"
2906else
2907  eval "$3=no"
2908fi
2909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910fi
2911eval ac_res=\$$3
2912	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2913$as_echo "$ac_res" >&6; }
2914  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2915
2916} # ac_fn_c_check_header_compile
2917cat >config.log <<_ACEOF
2918This file contains any messages produced by compilers while
2919running configure, to aid debugging if configure makes a mistake.
2920
2921It was created by OpenJDK $as_me jdk9, which was
2922generated by GNU Autoconf 2.69.  Invocation command line was
2923
2924  $ $0 $@
2925
2926_ACEOF
2927exec 5>>config.log
2928{
2929cat <<_ASUNAME
2930## --------- ##
2931## Platform. ##
2932## --------- ##
2933
2934hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2935uname -m = `(uname -m) 2>/dev/null || echo unknown`
2936uname -r = `(uname -r) 2>/dev/null || echo unknown`
2937uname -s = `(uname -s) 2>/dev/null || echo unknown`
2938uname -v = `(uname -v) 2>/dev/null || echo unknown`
2939
2940/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2941/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2942
2943/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2944/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2945/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2946/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2947/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2948/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2949/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2950
2951_ASUNAME
2952
2953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2954for as_dir in $PATH
2955do
2956  IFS=$as_save_IFS
2957  test -z "$as_dir" && as_dir=.
2958    $as_echo "PATH: $as_dir"
2959  done
2960IFS=$as_save_IFS
2961
2962} >&5
2963
2964cat >&5 <<_ACEOF
2965
2966
2967## ----------- ##
2968## Core tests. ##
2969## ----------- ##
2970
2971_ACEOF
2972
2973
2974# Keep a trace of the command line.
2975# Strip out --no-create and --no-recursion so they do not pile up.
2976# Strip out --silent because we don't want to record it for future runs.
2977# Also quote any args containing shell meta-characters.
2978# Make two passes to allow for proper duplicate-argument suppression.
2979ac_configure_args=
2980ac_configure_args0=
2981ac_configure_args1=
2982ac_must_keep_next=false
2983for ac_pass in 1 2
2984do
2985  for ac_arg
2986  do
2987    case $ac_arg in
2988    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2989    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2990    | -silent | --silent | --silen | --sile | --sil)
2991      continue ;;
2992    *\'*)
2993      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2994    esac
2995    case $ac_pass in
2996    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2997    2)
2998      as_fn_append ac_configure_args1 " '$ac_arg'"
2999      if test $ac_must_keep_next = true; then
3000	ac_must_keep_next=false # Got value, back to normal.
3001      else
3002	case $ac_arg in
3003	  *=* | --config-cache | -C | -disable-* | --disable-* \
3004	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3005	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3006	  | -with-* | --with-* | -without-* | --without-* | --x)
3007	    case "$ac_configure_args0 " in
3008	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3009	    esac
3010	    ;;
3011	  -* ) ac_must_keep_next=true ;;
3012	esac
3013      fi
3014      as_fn_append ac_configure_args " '$ac_arg'"
3015      ;;
3016    esac
3017  done
3018done
3019{ ac_configure_args0=; unset ac_configure_args0;}
3020{ ac_configure_args1=; unset ac_configure_args1;}
3021
3022# When interrupted or exit'd, cleanup temporary files, and complete
3023# config.log.  We remove comments because anyway the quotes in there
3024# would cause problems or look ugly.
3025# WARNING: Use '\'' to represent an apostrophe within the trap.
3026# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3027trap 'exit_status=$?
3028  # Save into config.log some information that might help in debugging.
3029  {
3030    echo
3031
3032    $as_echo "## ---------------- ##
3033## Cache variables. ##
3034## ---------------- ##"
3035    echo
3036    # The following way of writing the cache mishandles newlines in values,
3037(
3038  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3039    eval ac_val=\$$ac_var
3040    case $ac_val in #(
3041    *${as_nl}*)
3042      case $ac_var in #(
3043      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3044$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3045      esac
3046      case $ac_var in #(
3047      _ | IFS | as_nl) ;; #(
3048      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3049      *) { eval $ac_var=; unset $ac_var;} ;;
3050      esac ;;
3051    esac
3052  done
3053  (set) 2>&1 |
3054    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3055    *${as_nl}ac_space=\ *)
3056      sed -n \
3057	"s/'\''/'\''\\\\'\'''\''/g;
3058	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3059      ;; #(
3060    *)
3061      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3062      ;;
3063    esac |
3064    sort
3065)
3066    echo
3067
3068    $as_echo "## ----------------- ##
3069## Output variables. ##
3070## ----------------- ##"
3071    echo
3072    for ac_var in $ac_subst_vars
3073    do
3074      eval ac_val=\$$ac_var
3075      case $ac_val in
3076      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3077      esac
3078      $as_echo "$ac_var='\''$ac_val'\''"
3079    done | sort
3080    echo
3081
3082    if test -n "$ac_subst_files"; then
3083      $as_echo "## ------------------- ##
3084## File substitutions. ##
3085## ------------------- ##"
3086      echo
3087      for ac_var in $ac_subst_files
3088      do
3089	eval ac_val=\$$ac_var
3090	case $ac_val in
3091	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3092	esac
3093	$as_echo "$ac_var='\''$ac_val'\''"
3094      done | sort
3095      echo
3096    fi
3097
3098    if test -s confdefs.h; then
3099      $as_echo "## ----------- ##
3100## confdefs.h. ##
3101## ----------- ##"
3102      echo
3103      cat confdefs.h
3104      echo
3105    fi
3106    test "$ac_signal" != 0 &&
3107      $as_echo "$as_me: caught signal $ac_signal"
3108    $as_echo "$as_me: exit $exit_status"
3109  } >&5
3110  rm -f core *.core core.conftest.* &&
3111    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3112    exit $exit_status
3113' 0
3114for ac_signal in 1 2 13 15; do
3115  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3116done
3117ac_signal=0
3118
3119# confdefs.h avoids OS command line length limits that DEFS can exceed.
3120rm -f -r conftest* confdefs.h
3121
3122$as_echo "/* confdefs.h */" > confdefs.h
3123
3124# Predefined preprocessor variables.
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_NAME "$PACKAGE_NAME"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_VERSION "$PACKAGE_VERSION"
3136_ACEOF
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_STRING "$PACKAGE_STRING"
3140_ACEOF
3141
3142cat >>confdefs.h <<_ACEOF
3143#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3144_ACEOF
3145
3146cat >>confdefs.h <<_ACEOF
3147#define PACKAGE_URL "$PACKAGE_URL"
3148_ACEOF
3149
3150
3151# Let the site file select an alternate cache file if it wants to.
3152# Prefer an explicitly selected file to automatically selected ones.
3153ac_site_file1=NONE
3154ac_site_file2=NONE
3155if test -n "$CONFIG_SITE"; then
3156  # We do not want a PATH search for config.site.
3157  case $CONFIG_SITE in #((
3158    -*)  ac_site_file1=./$CONFIG_SITE;;
3159    */*) ac_site_file1=$CONFIG_SITE;;
3160    *)   ac_site_file1=./$CONFIG_SITE;;
3161  esac
3162elif test "x$prefix" != xNONE; then
3163  ac_site_file1=$prefix/share/config.site
3164  ac_site_file2=$prefix/etc/config.site
3165else
3166  ac_site_file1=$ac_default_prefix/share/config.site
3167  ac_site_file2=$ac_default_prefix/etc/config.site
3168fi
3169for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3170do
3171  test "x$ac_site_file" = xNONE && continue
3172  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3173    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3174$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3175    sed 's/^/| /' "$ac_site_file" >&5
3176    . "$ac_site_file" \
3177      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179as_fn_error $? "failed to load site script $ac_site_file
3180See \`config.log' for more details" "$LINENO" 5; }
3181  fi
3182done
3183
3184if test -r "$cache_file"; then
3185  # Some versions of bash will fail to source /dev/null (special files
3186  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3187  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3188    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3189$as_echo "$as_me: loading cache $cache_file" >&6;}
3190    case $cache_file in
3191      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3192      *)                      . "./$cache_file";;
3193    esac
3194  fi
3195else
3196  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3197$as_echo "$as_me: creating cache $cache_file" >&6;}
3198  >$cache_file
3199fi
3200
3201# Check that the precious variables saved in the cache have kept the same
3202# value.
3203ac_cache_corrupted=false
3204for ac_var in $ac_precious_vars; do
3205  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3206  eval ac_new_set=\$ac_env_${ac_var}_set
3207  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3208  eval ac_new_val=\$ac_env_${ac_var}_value
3209  case $ac_old_set,$ac_new_set in
3210    set,)
3211      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3212$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3213      ac_cache_corrupted=: ;;
3214    ,set)
3215      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3216$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3217      ac_cache_corrupted=: ;;
3218    ,);;
3219    *)
3220      if test "x$ac_old_val" != "x$ac_new_val"; then
3221	# differences in whitespace do not lead to failure.
3222	ac_old_val_w=`echo x $ac_old_val`
3223	ac_new_val_w=`echo x $ac_new_val`
3224	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3225	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3226$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3227	  ac_cache_corrupted=:
3228	else
3229	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3230$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3231	  eval $ac_var=\$ac_old_val
3232	fi
3233	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3234$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3235	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3236$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3237      fi;;
3238  esac
3239  # Pass precious variables to config.status.
3240  if test "$ac_new_set" = set; then
3241    case $ac_new_val in
3242    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3243    *) ac_arg=$ac_var=$ac_new_val ;;
3244    esac
3245    case " $ac_configure_args " in
3246      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3247      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3248    esac
3249  fi
3250done
3251if $ac_cache_corrupted; then
3252  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3254  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3255$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3256  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3257fi
3258## -------------------- ##
3259## Main body of script. ##
3260## -------------------- ##
3261
3262ac_ext=c
3263ac_cpp='$CPP $CPPFLAGS'
3264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3266ac_compiler_gnu=$ac_cv_c_compiler_gnu
3267
3268
3269
3270ac_aux_dir=
3271for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3272  if test -f "$ac_dir/install-sh"; then
3273    ac_aux_dir=$ac_dir
3274    ac_install_sh="$ac_aux_dir/install-sh -c"
3275    break
3276  elif test -f "$ac_dir/install.sh"; then
3277    ac_aux_dir=$ac_dir
3278    ac_install_sh="$ac_aux_dir/install.sh -c"
3279    break
3280  elif test -f "$ac_dir/shtool"; then
3281    ac_aux_dir=$ac_dir
3282    ac_install_sh="$ac_aux_dir/shtool install -c"
3283    break
3284  fi
3285done
3286if test -z "$ac_aux_dir"; then
3287  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
3288fi
3289
3290# These three variables are undocumented and unsupported,
3291# and are intended to be withdrawn in a future Autoconf release.
3292# They can cause serious problems if a builder's source tree is in a directory
3293# whose full name contains unusual characters.
3294ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3295ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3296ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3297
3298
3299# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3300
3301#
3302# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3304#
3305# This code is free software; you can redistribute it and/or modify it
3306# under the terms of the GNU General Public License version 2 only, as
3307# published by the Free Software Foundation.  Oracle designates this
3308# particular file as subject to the "Classpath" exception as provided
3309# by Oracle in the LICENSE file that accompanied this code.
3310#
3311# This code is distributed in the hope that it will be useful, but WITHOUT
3312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3314# version 2 for more details (a copy is included in the LICENSE file that
3315# accompanied this code).
3316#
3317# You should have received a copy of the GNU General Public License version
3318# 2 along with this work; if not, write to the Free Software Foundation,
3319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3320#
3321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3322# or visit www.oracle.com if you need additional information or have any
3323# questions.
3324#
3325
3326#
3327# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3328#
3329# This program is free software; you can redistribute it and/or modify
3330# it under the terms of the GNU General Public License as published by
3331# the Free Software Foundation; either version 2 of the License, or
3332# (at your option) any later version.
3333#
3334# This program is distributed in the hope that it will be useful, but
3335# WITHOUT ANY WARRANTY; without even the implied warranty of
3336# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3337# General Public License for more details.
3338#
3339# You should have received a copy of the GNU General Public License
3340# along with this program; if not, write to the Free Software
3341# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3342#
3343# As a special exception to the GNU General Public License, if you
3344# distribute this file as part of a program that contains a
3345# configuration script generated by Autoconf, you may include it under
3346# the same distribution terms that you use for the rest of that program.
3347
3348# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3349# ----------------------------------
3350# PKG_PROG_PKG_CONFIG
3351
3352# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3353#
3354# Check to see whether a particular set of modules exists.  Similar
3355# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3356#
3357#
3358# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3359# this or PKG_CHECK_MODULES is called, or make sure to call
3360# PKG_CHECK_EXISTS manually
3361# --------------------------------------------------------------
3362
3363
3364
3365# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3366# ---------------------------------------------
3367# _PKG_CONFIG
3368
3369# _PKG_SHORT_ERRORS_SUPPORTED
3370# -----------------------------
3371# _PKG_SHORT_ERRORS_SUPPORTED
3372
3373
3374# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3375# [ACTION-IF-NOT-FOUND])
3376#
3377#
3378# Note that if there is a possibility the first call to
3379# PKG_CHECK_MODULES might not happen, you should be sure to include an
3380# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3381#
3382#
3383# --------------------------------------------------------------
3384# PKG_CHECK_MODULES
3385
3386
3387# Include these first...
3388#
3389# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3390# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3391#
3392# This code is free software; you can redistribute it and/or modify it
3393# under the terms of the GNU General Public License version 2 only, as
3394# published by the Free Software Foundation.  Oracle designates this
3395# particular file as subject to the "Classpath" exception as provided
3396# by Oracle in the LICENSE file that accompanied this code.
3397#
3398# This code is distributed in the hope that it will be useful, but WITHOUT
3399# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3400# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3401# version 2 for more details (a copy is included in the LICENSE file that
3402# accompanied this code).
3403#
3404# You should have received a copy of the GNU General Public License version
3405# 2 along with this work; if not, write to the Free Software Foundation,
3406# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3407#
3408# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3409# or visit www.oracle.com if you need additional information or have any
3410# questions.
3411#
3412
3413# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3414# If so, then append $1 to $2 \
3415# Also set JVM_ARG_OK to true/false depending on outcome.
3416
3417
3418# Appends a string to a path variable, only adding the : when needed.
3419
3420
3421# Prepends a string to a path variable, only adding the : when needed.
3422
3423
3424# This will make sure the given variable points to a full and proper
3425# path. This means:
3426# 1) There will be no spaces in the path. On unix platforms,
3427#    spaces in the path will result in an error. On Windows,
3428#    the path will be rewritten using short-style to be space-free.
3429# 2) The path will be absolute, and it will be in unix-style (on
3430#     cygwin).
3431# $1: The name of the variable to fix
3432
3433
3434# This will make sure the given variable points to a executable
3435# with a full and proper path. This means:
3436# 1) There will be no spaces in the path. On unix platforms,
3437#    spaces in the path will result in an error. On Windows,
3438#    the path will be rewritten using short-style to be space-free.
3439# 2) The path will be absolute, and it will be in unix-style (on
3440#     cygwin).
3441# Any arguments given to the executable is preserved.
3442# If the input variable does not have a directory specification, then
3443# it need to be in the PATH.
3444# $1: The name of the variable to fix
3445
3446
3447
3448
3449# Register a --with argument but mark it as deprecated
3450# $1: The name of the with argument to deprecate, not including --with-
3451
3452
3453# Register a --enable argument but mark it as deprecated
3454# $1: The name of the with argument to deprecate, not including --enable-
3455# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3456
3457
3458
3459
3460# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3461# $1: variable to check
3462
3463
3464# Check that there are no unprocessed overridden variables left.
3465# If so, they are an incorrect argument and we will exit with an error.
3466
3467
3468# Setup a tool for the given variable. If correctly specified by the user,
3469# use that value, otherwise search for the tool using the supplied code snippet.
3470# $1: variable to set
3471# $2: code snippet to call to look for the tool
3472
3473
3474# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3475# $1: variable to set
3476# $2: executable name (or list of names) to look for
3477
3478
3479# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3480# $1: variable to set
3481# $2: executable name (or list of names) to look for
3482
3483
3484# Like BASIC_PATH_PROGS but fails if no tool was found.
3485# $1: variable to set
3486# $2: executable name (or list of names) to look for
3487
3488
3489# Like BASIC_SETUP_TOOL but fails if no tool was found.
3490# $1: variable to set
3491# $2: autoconf macro to call to look for the special tool
3492
3493
3494# Setup the most fundamental tools that relies on not much else to set up,
3495# but is used by much of the early bootstrap code.
3496
3497
3498# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508#%%% Simple tools %%%
3509
3510# Check if we have found a usable version of make
3511# $1: the path to a potential make binary (or empty)
3512# $2: the description on how we found this
3513
3514
3515
3516
3517# Goes looking for a usable version of GNU make.
3518
3519
3520
3521
3522
3523
3524# Check if build directory is on local disk. If not possible to determine,
3525# we prefer to claim it's local.
3526# Argument 1: directory to test
3527# Argument 2: what to do if it is on local disk
3528# Argument 3: what to do otherwise (remote disk or failure)
3529
3530
3531# Check that source files have basic read permissions set. This might
3532# not be the case in cygwin in certain conditions.
3533
3534
3535
3536
3537# Check for support for specific options in bash
3538
3539
3540#
3541# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3542# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3543#
3544# This code is free software; you can redistribute it and/or modify it
3545# under the terms of the GNU General Public License version 2 only, as
3546# published by the Free Software Foundation.  Oracle designates this
3547# particular file as subject to the "Classpath" exception as provided
3548# by Oracle in the LICENSE file that accompanied this code.
3549#
3550# This code is distributed in the hope that it will be useful, but WITHOUT
3551# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3552# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3553# version 2 for more details (a copy is included in the LICENSE file that
3554# accompanied this code).
3555#
3556# You should have received a copy of the GNU General Public License version
3557# 2 along with this work; if not, write to the Free Software Foundation,
3558# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3559#
3560# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3561# or visit www.oracle.com if you need additional information or have any
3562# questions.
3563#
3564
3565
3566
3567
3568
3569# Helper function which possibly converts a path using DOS-style short mode.
3570# If so, the updated path is stored in $new_path.
3571# $1: The path to check
3572
3573
3574# Helper function which possibly converts a path using DOS-style short mode.
3575# If so, the updated path is stored in $new_path.
3576# $1: The path to check
3577
3578
3579# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3580# and could probably be heavily simplified. However, all changes in this
3581# area tend to need lot of testing in different scenarios, and in lack of
3582# proper unit testing, cleaning this up has not been deemed worth the effort
3583# at the moment.
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3594
3595
3596
3597
3598#
3599# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601#
3602# This code is free software; you can redistribute it and/or modify it
3603# under the terms of the GNU General Public License version 2 only, as
3604# published by the Free Software Foundation.  Oracle designates this
3605# particular file as subject to the "Classpath" exception as provided
3606# by Oracle in the LICENSE file that accompanied this code.
3607#
3608# This code is distributed in the hope that it will be useful, but WITHOUT
3609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611# version 2 for more details (a copy is included in the LICENSE file that
3612# accompanied this code).
3613#
3614# You should have received a copy of the GNU General Public License version
3615# 2 along with this work; if not, write to the Free Software Foundation,
3616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617#
3618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619# or visit www.oracle.com if you need additional information or have any
3620# questions.
3621#
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633# ... then the rest
3634#
3635# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3637#
3638# This code is free software; you can redistribute it and/or modify it
3639# under the terms of the GNU General Public License version 2 only, as
3640# published by the Free Software Foundation.  Oracle designates this
3641# particular file as subject to the "Classpath" exception as provided
3642# by Oracle in the LICENSE file that accompanied this code.
3643#
3644# This code is distributed in the hope that it will be useful, but WITHOUT
3645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3647# version 2 for more details (a copy is included in the LICENSE file that
3648# accompanied this code).
3649#
3650# You should have received a copy of the GNU General Public License version
3651# 2 along with this work; if not, write to the Free Software Foundation,
3652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3653#
3654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3655# or visit www.oracle.com if you need additional information or have any
3656# questions.
3657#
3658
3659########################################################################
3660# This file handles detection of the Boot JDK. The Boot JDK detection
3661# process has been developed as a response to solve a complex real-world
3662# problem. Initially, it was simple, but it has grown as platform after
3663# platform, idiosyncracy after idiosyncracy has been supported.
3664#
3665# The basic idea is this:
3666# 1) You need an acceptable *) JDK to use as a Boot JDK
3667# 2) There are several ways to locate a JDK, that are mostly platform
3668#    dependent **)
3669# 3) You can have multiple JDKs installed
3670# 4) If possible, configure should try to dig out an acceptable JDK
3671#    automatically, without having to resort to command-line options
3672#
3673# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3674#     javac) and not a JRE, etc.
3675#
3676# **) On Windows we typically use a well-known path.
3677#     On MacOSX we typically use the tool java_home.
3678#     On Linux we typically find javac in the $PATH, and then follow a
3679#     chain of symlinks that often ends up in a real JDK.
3680#
3681# This leads to the code where we check in different ways to locate a
3682# JDK, and if one is found, check if it is acceptable. If not, we print
3683# our reasons for rejecting it (useful when debugging non-working
3684# configure situations) and continue checking the next one.
3685########################################################################
3686
3687# Execute the check given as argument, and verify the result
3688# If the Boot JDK was previously found, do nothing
3689# $1 A command line (typically autoconf macro) to execute
3690
3691
3692# Test: Is bootjdk explicitely set by command line arguments?
3693
3694
3695# Test: Is bootjdk available from builddeps?
3696
3697
3698# Test: Is $JAVA_HOME set?
3699
3700
3701# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3702
3703
3704# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3705# $1: Argument to the java_home binary (optional)
3706
3707
3708# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3709
3710
3711# Look for a jdk in the given path. If there are multiple, try to select the newest.
3712# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3713# $1 = Path to directory containing jdk installations.
3714# $2 = String to append to the found JDK directory to get the proper JDK home
3715
3716
3717# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3718# environmental variable as base for where to look.
3719# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3720
3721
3722# Test: Is there a JDK installed in default, well-known locations?
3723
3724
3725# Check that a command-line tool in the Boot JDK is correct
3726# $1 = name of variable to assign
3727# $2 = name of binary
3728
3729
3730###############################################################################
3731#
3732# We need a Boot JDK to bootstrap the build.
3733#
3734
3735
3736
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783#
3784# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3785# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3786#
3787# This code is free software; you can redistribute it and/or modify it
3788# under the terms of the GNU General Public License version 2 only, as
3789# published by the Free Software Foundation.  Oracle designates this
3790# particular file as subject to the "Classpath" exception as provided
3791# by Oracle in the LICENSE file that accompanied this code.
3792#
3793# This code is distributed in the hope that it will be useful, but WITHOUT
3794# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3795# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3796# version 2 for more details (a copy is included in the LICENSE file that
3797# accompanied this code).
3798#
3799# You should have received a copy of the GNU General Public License version
3800# 2 along with this work; if not, write to the Free Software Foundation,
3801# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3802#
3803# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3804# or visit www.oracle.com if you need additional information or have any
3805# questions.
3806#
3807
3808
3809
3810
3811
3812# Documentation on common flags used for solstudio in HIGHEST.
3813#
3814# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3815#          done with care, there are some assumptions below that need to
3816#          be understood about the use of pointers, and IEEE behavior.
3817#
3818# -fns: Use non-standard floating point mode (not IEEE 754)
3819# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3820# -fsingle: Use single precision floating point with 'float'
3821# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3822#   (Source with excessing pointer casting and data access with mixed
3823#    pointer types are not recommended)
3824# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3825#   (If you expect perfect errno behavior, do not use this)
3826# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3827# -xrestrict: Pointer parameters to functions do not overlap
3828#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3829#    If you pass in multiple pointers to the same data, do not use this)
3830# -xlibmil: Inline some library routines
3831#   (If you expect perfect errno behavior, do not use this)
3832# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3833#   (If you expect perfect errno behavior, do not use this)
3834#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3835
3836    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3837    # Bug?
3838    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3839    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3840    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3841    #fi
3842
3843
3844
3845
3846
3847# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3848#                                   [RUN-IF-FALSE])
3849# ------------------------------------------------------------
3850# Check that the c and c++ compilers support an argument
3851
3852
3853# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3854#                                    [RUN-IF-FALSE])
3855# ------------------------------------------------------------
3856# Check that the linker support an argument
3857
3858
3859
3860
3861#
3862# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3863# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3864#
3865# This code is free software; you can redistribute it and/or modify it
3866# under the terms of the GNU General Public License version 2 only, as
3867# published by the Free Software Foundation.  Oracle designates this
3868# particular file as subject to the "Classpath" exception as provided
3869# by Oracle in the LICENSE file that accompanied this code.
3870#
3871# This code is distributed in the hope that it will be useful, but WITHOUT
3872# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3873# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3874# version 2 for more details (a copy is included in the LICENSE file that
3875# accompanied this code).
3876#
3877# You should have received a copy of the GNU General Public License version
3878# 2 along with this work; if not, write to the Free Software Foundation,
3879# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3880#
3881# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3882# or visit www.oracle.com if you need additional information or have any
3883# questions.
3884#
3885
3886
3887
3888
3889
3890cygwin_help() {
3891  case $1 in
3892    unzip)
3893      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3895      ;;
3896    zip)
3897      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3898      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3899      ;;
3900    make)
3901      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3902      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3903      ;;
3904    freetype)
3905      HELP_MSG="
3906The freetype library can now be build during the configure process.
3907Download the freetype sources and unpack them into an arbitrary directory:
3908
3909wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3910tar -xzf freetype-2.5.3.tar.gz
3911
3912Then run configure with '--with-freetype-src=<freetype_src>'. This will
3913automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3914builds or into '<freetype_src>/lib32' for 32-bit builds.
3915Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3916and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3917      ;;
3918  esac
3919}
3920
3921msys_help() {
3922  PKGHANDLER_COMMAND=""
3923}
3924
3925apt_help() {
3926  case $1 in
3927    devkit)
3928      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3929    openjdk)
3930      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3931    alsa)
3932      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3933    cups)
3934      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3935    freetype)
3936      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3937    pulse)
3938      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3939    x11)
3940      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3941    ccache)
3942      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3943  esac
3944}
3945
3946yum_help() {
3947  case $1 in
3948    devkit)
3949      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3950    openjdk)
3951      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3952    alsa)
3953      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3954    cups)
3955      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3956    freetype)
3957      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3958    pulse)
3959      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3960    x11)
3961      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3962    ccache)
3963      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3964  esac
3965}
3966
3967port_help() {
3968  PKGHANDLER_COMMAND=""
3969}
3970
3971pkgutil_help() {
3972  PKGHANDLER_COMMAND=""
3973}
3974
3975pkgadd_help() {
3976  PKGHANDLER_COMMAND=""
3977}
3978
3979# This function will check if we're called from the "configure" wrapper while
3980# printing --help. If so, we will print out additional information that can
3981# only be extracted within the autoconf script, and then exit. This must be
3982# called at the very beginning in configure.ac.
3983
3984
3985
3986
3987
3988
3989#
3990# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3991# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3992#
3993# This code is free software; you can redistribute it and/or modify it
3994# under the terms of the GNU General Public License version 2 only, as
3995# published by the Free Software Foundation.  Oracle designates this
3996# particular file as subject to the "Classpath" exception as provided
3997# by Oracle in the LICENSE file that accompanied this code.
3998#
3999# This code is distributed in the hope that it will be useful, but WITHOUT
4000# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4001# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4002# version 2 for more details (a copy is included in the LICENSE file that
4003# accompanied this code).
4004#
4005# You should have received a copy of the GNU General Public License version
4006# 2 along with this work; if not, write to the Free Software Foundation,
4007# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4008#
4009# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4010# or visit www.oracle.com if you need additional information or have any
4011# questions.
4012#
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023###############################################################################
4024#
4025# Should we build only OpenJDK even if closed sources are present?
4026#
4027
4028
4029
4030
4031###############################################################################
4032#
4033# Setup version numbers
4034#
4035
4036
4037
4038
4039
4040
4041#
4042# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4043# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4044#
4045# This code is free software; you can redistribute it and/or modify it
4046# under the terms of the GNU General Public License version 2 only, as
4047# published by the Free Software Foundation.  Oracle designates this
4048# particular file as subject to the "Classpath" exception as provided
4049# by Oracle in the LICENSE file that accompanied this code.
4050#
4051# This code is distributed in the hope that it will be useful, but WITHOUT
4052# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4053# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4054# version 2 for more details (a copy is included in the LICENSE file that
4055# accompanied this code).
4056#
4057# You should have received a copy of the GNU General Public License version
4058# 2 along with this work; if not, write to the Free Software Foundation,
4059# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4060#
4061# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4062# or visit www.oracle.com if you need additional information or have any
4063# questions.
4064#
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086#
4087# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4088# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4089#
4090# This code is free software; you can redistribute it and/or modify it
4091# under the terms of the GNU General Public License version 2 only, as
4092# published by the Free Software Foundation.  Oracle designates this
4093# particular file as subject to the "Classpath" exception as provided
4094# by Oracle in the LICENSE file that accompanied this code.
4095#
4096# This code is distributed in the hope that it will be useful, but WITHOUT
4097# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4098# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4099# version 2 for more details (a copy is included in the LICENSE file that
4100# accompanied this code).
4101#
4102# You should have received a copy of the GNU General Public License version
4103# 2 along with this work; if not, write to the Free Software Foundation,
4104# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4105#
4106# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4107# or visit www.oracle.com if you need additional information or have any
4108# questions.
4109#
4110
4111# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4112# Converts autoconf style CPU name to OpenJDK style, into
4113# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4114
4115
4116# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4117# Converts autoconf style OS name to OpenJDK style, into
4118# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4119
4120
4121# Expects $host_os $host_cpu $build_os and $build_cpu
4122# and $with_target_bits to have been setup!
4123#
4124# Translate the standard triplet(quadruplet) definition
4125# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4126# OPENJDK_BUILD_OS, etc.
4127
4128
4129# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4130# accordingly. Must be done after setting up build and target system, but before
4131# doing anything else with these values.
4132
4133
4134# Setup the legacy variables, for controlling the old makefiles.
4135#
4136
4137
4138
4139
4140#%%% Build and target systems %%%
4141
4142
4143
4144
4145# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4146# Add -mX to various FLAGS variables.
4147
4148
4149
4150
4151
4152
4153#
4154# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4155# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156#
4157# This code is free software; you can redistribute it and/or modify it
4158# under the terms of the GNU General Public License version 2 only, as
4159# published by the Free Software Foundation.  Oracle designates this
4160# particular file as subject to the "Classpath" exception as provided
4161# by Oracle in the LICENSE file that accompanied this code.
4162#
4163# This code is distributed in the hope that it will be useful, but WITHOUT
4164# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166# version 2 for more details (a copy is included in the LICENSE file that
4167# accompanied this code).
4168#
4169# You should have received a copy of the GNU General Public License version
4170# 2 along with this work; if not, write to the Free Software Foundation,
4171# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172#
4173# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174# or visit www.oracle.com if you need additional information or have any
4175# questions.
4176#
4177
4178
4179
4180
4181
4182
4183
4184
4185#
4186# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4187# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4188#
4189# This code is free software; you can redistribute it and/or modify it
4190# under the terms of the GNU General Public License version 2 only, as
4191# published by the Free Software Foundation.  Oracle designates this
4192# particular file as subject to the "Classpath" exception as provided
4193# by Oracle in the LICENSE file that accompanied this code.
4194#
4195# This code is distributed in the hope that it will be useful, but WITHOUT
4196# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4197# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4198# version 2 for more details (a copy is included in the LICENSE file that
4199# accompanied this code).
4200#
4201# You should have received a copy of the GNU General Public License version
4202# 2 along with this work; if not, write to the Free Software Foundation,
4203# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4204#
4205# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4206# or visit www.oracle.com if you need additional information or have any
4207# questions.
4208#
4209
4210########################################################################
4211# This file is responsible for detecting, verifying and setting up the
4212# toolchain, i.e. the compiler, linker and related utilities. It will setup
4213# proper paths to the binaries, but it will not setup any flags.
4214#
4215# The binaries used is determined by the toolchain type, which is the family of
4216# compilers and related tools that are used.
4217########################################################################
4218
4219
4220# All valid toolchains, regardless of platform (used by help.m4)
4221VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4222
4223# These toolchains are valid on different platforms
4224VALID_TOOLCHAINS_linux="gcc clang"
4225VALID_TOOLCHAINS_solaris="solstudio"
4226VALID_TOOLCHAINS_macosx="gcc clang"
4227VALID_TOOLCHAINS_aix="xlc"
4228VALID_TOOLCHAINS_windows="microsoft"
4229
4230# Toolchain descriptions
4231TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4232TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4233TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4234TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4235TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4236
4237# Setup a number of variables describing how native output files are
4238# named on this platform/toolchain.
4239
4240
4241# Determine which toolchain type to use, and make sure it is valid for this
4242# platform. Setup various information about the selected toolchain.
4243
4244
4245# Before we start detecting the toolchain executables, we might need some
4246# special setup, e.g. additional paths etc.
4247
4248
4249# Restore path, etc
4250
4251
4252# Check if a compiler is of the toolchain type we expect, and save the version
4253# information from it. If the compiler does not match the expected type,
4254# this function will abort using AC_MSG_ERROR. If it matches, the version will
4255# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4256# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4257#
4258# $1 = compiler to test (CC or CXX)
4259# $2 = human readable name of compiler (C or C++)
4260
4261
4262# Try to locate the given C or C++ compiler in the path, or otherwise.
4263#
4264# $1 = compiler to test (CC or CXX)
4265# $2 = human readable name of compiler (C or C++)
4266# $3 = list of compiler names to search for
4267
4268
4269# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4270# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4271# archiver (AR). Verify that the compilers are correct according to the
4272# toolchain type.
4273
4274
4275# Setup additional tools that is considered a part of the toolchain, but not the
4276# core part. Many of these are highly platform-specific and do not exist,
4277# and/or are not needed on all platforms.
4278
4279
4280# Setup the build tools (i.e, the compiler and linker used to build programs
4281# that should be run on the build platform, not the target platform, as a build
4282# helper). Since the non-cross-compile case uses the normal, target compilers
4283# for this, we can only do this after these have been setup.
4284
4285
4286# Setup legacy variables that are still needed as alternative ways to refer to
4287# parts of the toolchain.
4288
4289
4290# Do some additional checks on the detected tools.
4291
4292
4293# Setup the JTReg Regression Test Harness.
4294
4295
4296#
4297# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4298# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4299#
4300# This code is free software; you can redistribute it and/or modify it
4301# under the terms of the GNU General Public License version 2 only, as
4302# published by the Free Software Foundation.  Oracle designates this
4303# particular file as subject to the "Classpath" exception as provided
4304# by Oracle in the LICENSE file that accompanied this code.
4305#
4306# This code is distributed in the hope that it will be useful, but WITHOUT
4307# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4308# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4309# version 2 for more details (a copy is included in the LICENSE file that
4310# accompanied this code).
4311#
4312# You should have received a copy of the GNU General Public License version
4313# 2 along with this work; if not, write to the Free Software Foundation,
4314# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4315#
4316# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4317# or visit www.oracle.com if you need additional information or have any
4318# questions.
4319#
4320
4321################################################################################
4322
4323VALID_VS_VERSIONS="2010 2012 2013"
4324
4325VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4326VS_VERSION_INTERNAL_2010=100
4327VS_MSVCR_2010=msvcr100.dll
4328# We don't use msvcp on Visual Studio 2010
4329#VS_MSVCP_2010=msvcp100.dll
4330VS_ENVVAR_2010="VS100COMNTOOLS"
4331VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4332VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4333VS_VS_PLATFORM_NAME_2010="v100"
4334VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4335
4336VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4337VS_VERSION_INTERNAL_2012=110
4338VS_MSVCR_2012=msvcr110.dll
4339VS_MSVCP_2012=msvcp110.dll
4340VS_ENVVAR_2012="VS110COMNTOOLS"
4341VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4342VS_SDK_INSTALLDIR_2012=
4343VS_VS_PLATFORM_NAME_2012="v110"
4344VS_SDK_PLATFORM_NAME_2012=
4345
4346VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4347VS_VERSION_INTERNAL_2013=120
4348VS_MSVCR_2013=msvcr120.dll
4349VS_MSVCP_2013=msvcp120.dll
4350VS_ENVVAR_2013="VS120COMNTOOLS"
4351VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4352VS_SDK_INSTALLDIR_2013=
4353VS_VS_PLATFORM_NAME_2013="v120"
4354VS_SDK_PLATFORM_NAME_2013=
4355
4356################################################################################
4357
4358
4359
4360################################################################################
4361
4362
4363
4364################################################################################
4365# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4366# build environment and assigns it to VS_ENV_CMD
4367
4368
4369################################################################################
4370
4371
4372
4373################################################################################
4374# Check if the VS env variables were setup prior to running configure.
4375# If not, then find vcvarsall.bat and run it automatically, and integrate
4376# the set env variables into the spec file.
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391# This line needs to be here, verbatim, after all includes and the dummy hook
4392# definitions. It is replaced with custom functionality when building
4393# custom sources.
4394#CUSTOM_AUTOCONF_INCLUDE
4395
4396# Do not change or remove the following line, it is needed for consistency checks:
4397DATE_WHEN_GENERATED=1425649598
4398
4399###############################################################################
4400#
4401# Initialization / Boot-strapping
4402#
4403# The bootstrapping process needs to solve the "chicken or the egg" problem,
4404# thus it jumps back and forth, each time gaining something needed later on.
4405#
4406###############################################################################
4407
4408# If we are requested to print additional help, do that and then exit.
4409# This must be the very first call.
4410
4411  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4412    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4413    $PRINTF "Which are valid to use depends on the build platform.\n"
4414    for toolchain in $VALID_TOOLCHAINS_all; do
4415      # Use indirect variable referencing
4416      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4417      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4418      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4419    done
4420
4421    # And now exit directly
4422    exit 0
4423  fi
4424
4425
4426# Basic initialization that must happen first of all in the normal process.
4427
4428  # Save the original command line. This is passed to us by the wrapper configure script.
4429
4430  # Save the path variable before it gets changed
4431  ORIGINAL_PATH="$PATH"
4432
4433  DATE_WHEN_CONFIGURED=`LANG=C date`
4434
4435  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4436$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4437  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4438$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4439
4440
4441  # Start with tools that do not need have cross compilation support
4442  # and can be expected to be found in the default PATH. These tools are
4443  # used by configure. Nor are these tools expected to be found in the
4444  # devkit from the builddeps server either, since they are
4445  # needed to download the devkit.
4446
4447  # First are all the simple required tools.
4448
4449
4450
4451  # Publish this variable in the help.
4452
4453
4454  if test "x$BASENAME" = x; then
4455    # The variable is not set by user, try to locate tool using the code snippet
4456    for ac_prog in basename
4457do
4458  # Extract the first word of "$ac_prog", so it can be a program name with args.
4459set dummy $ac_prog; ac_word=$2
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4461$as_echo_n "checking for $ac_word... " >&6; }
4462if ${ac_cv_path_BASENAME+:} false; then :
4463  $as_echo_n "(cached) " >&6
4464else
4465  case $BASENAME in
4466  [\\/]* | ?:[\\/]*)
4467  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4468  ;;
4469  *)
4470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4471for as_dir in $PATH
4472do
4473  IFS=$as_save_IFS
4474  test -z "$as_dir" && as_dir=.
4475    for ac_exec_ext in '' $ac_executable_extensions; do
4476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4477    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4479    break 2
4480  fi
4481done
4482  done
4483IFS=$as_save_IFS
4484
4485  ;;
4486esac
4487fi
4488BASENAME=$ac_cv_path_BASENAME
4489if test -n "$BASENAME"; then
4490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4491$as_echo "$BASENAME" >&6; }
4492else
4493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4494$as_echo "no" >&6; }
4495fi
4496
4497
4498  test -n "$BASENAME" && break
4499done
4500
4501  else
4502    # The variable is set, but is it from the command line or the environment?
4503
4504    # Try to remove the string !BASENAME! from our list.
4505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4507      # If it failed, the variable was not from the command line. Ignore it,
4508      # but warn the user (except for BASH, which is always set by the calling BASH).
4509      if test "xBASENAME" != xBASH; then
4510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4511$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4512      fi
4513      # Try to locate tool using the code snippet
4514      for ac_prog in basename
4515do
4516  # Extract the first word of "$ac_prog", so it can be a program name with args.
4517set dummy $ac_prog; ac_word=$2
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4519$as_echo_n "checking for $ac_word... " >&6; }
4520if ${ac_cv_path_BASENAME+:} false; then :
4521  $as_echo_n "(cached) " >&6
4522else
4523  case $BASENAME in
4524  [\\/]* | ?:[\\/]*)
4525  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4526  ;;
4527  *)
4528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4529for as_dir in $PATH
4530do
4531  IFS=$as_save_IFS
4532  test -z "$as_dir" && as_dir=.
4533    for ac_exec_ext in '' $ac_executable_extensions; do
4534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4535    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4537    break 2
4538  fi
4539done
4540  done
4541IFS=$as_save_IFS
4542
4543  ;;
4544esac
4545fi
4546BASENAME=$ac_cv_path_BASENAME
4547if test -n "$BASENAME"; then
4548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4549$as_echo "$BASENAME" >&6; }
4550else
4551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4552$as_echo "no" >&6; }
4553fi
4554
4555
4556  test -n "$BASENAME" && break
4557done
4558
4559    else
4560      # If it succeeded, then it was overridden by the user. We will use it
4561      # for the tool.
4562
4563      # First remove it from the list of overridden variables, so we can test
4564      # for unknown variables in the end.
4565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4566
4567      # Check if the provided tool contains a complete path.
4568      tool_specified="$BASENAME"
4569      tool_basename="${tool_specified##*/}"
4570      if test "x$tool_basename" = "x$tool_specified"; then
4571        # A command without a complete path is provided, search $PATH.
4572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4573$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4574        # Extract the first word of "$tool_basename", so it can be a program name with args.
4575set dummy $tool_basename; ac_word=$2
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
4578if ${ac_cv_path_BASENAME+:} false; then :
4579  $as_echo_n "(cached) " >&6
4580else
4581  case $BASENAME in
4582  [\\/]* | ?:[\\/]*)
4583  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4584  ;;
4585  *)
4586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4587for as_dir in $PATH
4588do
4589  IFS=$as_save_IFS
4590  test -z "$as_dir" && as_dir=.
4591    for ac_exec_ext in '' $ac_executable_extensions; do
4592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4593    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4595    break 2
4596  fi
4597done
4598  done
4599IFS=$as_save_IFS
4600
4601  ;;
4602esac
4603fi
4604BASENAME=$ac_cv_path_BASENAME
4605if test -n "$BASENAME"; then
4606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4607$as_echo "$BASENAME" >&6; }
4608else
4609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610$as_echo "no" >&6; }
4611fi
4612
4613
4614        if test "x$BASENAME" = x; then
4615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4616        fi
4617      else
4618        # Otherwise we believe it is a complete path. Use it as it is.
4619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4620$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4622$as_echo_n "checking for BASENAME... " >&6; }
4623        if test ! -x "$tool_specified"; then
4624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4625$as_echo "not found" >&6; }
4626          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4627        fi
4628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4629$as_echo "$tool_specified" >&6; }
4630      fi
4631    fi
4632  fi
4633
4634
4635
4636  if test "x$BASENAME" = x; then
4637    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4638  fi
4639
4640
4641
4642
4643
4644  # Publish this variable in the help.
4645
4646
4647  if test "x$BASH" = x; then
4648    # The variable is not set by user, try to locate tool using the code snippet
4649    for ac_prog in bash
4650do
4651  # Extract the first word of "$ac_prog", so it can be a program name with args.
4652set dummy $ac_prog; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if ${ac_cv_path_BASH+:} false; then :
4656  $as_echo_n "(cached) " >&6
4657else
4658  case $BASH in
4659  [\\/]* | ?:[\\/]*)
4660  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4661  ;;
4662  *)
4663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666  IFS=$as_save_IFS
4667  test -z "$as_dir" && as_dir=.
4668    for ac_exec_ext in '' $ac_executable_extensions; do
4669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672    break 2
4673  fi
4674done
4675  done
4676IFS=$as_save_IFS
4677
4678  ;;
4679esac
4680fi
4681BASH=$ac_cv_path_BASH
4682if test -n "$BASH"; then
4683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4684$as_echo "$BASH" >&6; }
4685else
4686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691  test -n "$BASH" && break
4692done
4693
4694  else
4695    # The variable is set, but is it from the command line or the environment?
4696
4697    # Try to remove the string !BASH! from our list.
4698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4700      # If it failed, the variable was not from the command line. Ignore it,
4701      # but warn the user (except for BASH, which is always set by the calling BASH).
4702      if test "xBASH" != xBASH; then
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4704$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4705      fi
4706      # Try to locate tool using the code snippet
4707      for ac_prog in bash
4708do
4709  # Extract the first word of "$ac_prog", so it can be a program name with args.
4710set dummy $ac_prog; ac_word=$2
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
4713if ${ac_cv_path_BASH+:} false; then :
4714  $as_echo_n "(cached) " >&6
4715else
4716  case $BASH in
4717  [\\/]* | ?:[\\/]*)
4718  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4719  ;;
4720  *)
4721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in $PATH
4723do
4724  IFS=$as_save_IFS
4725  test -z "$as_dir" && as_dir=.
4726    for ac_exec_ext in '' $ac_executable_extensions; do
4727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4728    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4730    break 2
4731  fi
4732done
4733  done
4734IFS=$as_save_IFS
4735
4736  ;;
4737esac
4738fi
4739BASH=$ac_cv_path_BASH
4740if test -n "$BASH"; then
4741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4742$as_echo "$BASH" >&6; }
4743else
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
4746fi
4747
4748
4749  test -n "$BASH" && break
4750done
4751
4752    else
4753      # If it succeeded, then it was overridden by the user. We will use it
4754      # for the tool.
4755
4756      # First remove it from the list of overridden variables, so we can test
4757      # for unknown variables in the end.
4758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4759
4760      # Check if the provided tool contains a complete path.
4761      tool_specified="$BASH"
4762      tool_basename="${tool_specified##*/}"
4763      if test "x$tool_basename" = "x$tool_specified"; then
4764        # A command without a complete path is provided, search $PATH.
4765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4766$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4767        # Extract the first word of "$tool_basename", so it can be a program name with args.
4768set dummy $tool_basename; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
4771if ${ac_cv_path_BASH+:} false; then :
4772  $as_echo_n "(cached) " >&6
4773else
4774  case $BASH in
4775  [\\/]* | ?:[\\/]*)
4776  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4777  ;;
4778  *)
4779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in $PATH
4781do
4782  IFS=$as_save_IFS
4783  test -z "$as_dir" && as_dir=.
4784    for ac_exec_ext in '' $ac_executable_extensions; do
4785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4786    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788    break 2
4789  fi
4790done
4791  done
4792IFS=$as_save_IFS
4793
4794  ;;
4795esac
4796fi
4797BASH=$ac_cv_path_BASH
4798if test -n "$BASH"; then
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4800$as_echo "$BASH" >&6; }
4801else
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
4804fi
4805
4806
4807        if test "x$BASH" = x; then
4808          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4809        fi
4810      else
4811        # Otherwise we believe it is a complete path. Use it as it is.
4812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4813$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4815$as_echo_n "checking for BASH... " >&6; }
4816        if test ! -x "$tool_specified"; then
4817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4818$as_echo "not found" >&6; }
4819          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4822$as_echo "$tool_specified" >&6; }
4823      fi
4824    fi
4825  fi
4826
4827
4828
4829  if test "x$BASH" = x; then
4830    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4831  fi
4832
4833
4834
4835
4836
4837  # Publish this variable in the help.
4838
4839
4840  if test "x$CAT" = x; then
4841    # The variable is not set by user, try to locate tool using the code snippet
4842    for ac_prog in cat
4843do
4844  # Extract the first word of "$ac_prog", so it can be a program name with args.
4845set dummy $ac_prog; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
4848if ${ac_cv_path_CAT+:} false; then :
4849  $as_echo_n "(cached) " >&6
4850else
4851  case $CAT in
4852  [\\/]* | ?:[\\/]*)
4853  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4854  ;;
4855  *)
4856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in $PATH
4858do
4859  IFS=$as_save_IFS
4860  test -z "$as_dir" && as_dir=.
4861    for ac_exec_ext in '' $ac_executable_extensions; do
4862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4863    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865    break 2
4866  fi
4867done
4868  done
4869IFS=$as_save_IFS
4870
4871  ;;
4872esac
4873fi
4874CAT=$ac_cv_path_CAT
4875if test -n "$CAT"; then
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4877$as_echo "$CAT" >&6; }
4878else
4879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
4881fi
4882
4883
4884  test -n "$CAT" && break
4885done
4886
4887  else
4888    # The variable is set, but is it from the command line or the environment?
4889
4890    # Try to remove the string !CAT! from our list.
4891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4893      # If it failed, the variable was not from the command line. Ignore it,
4894      # but warn the user (except for BASH, which is always set by the calling BASH).
4895      if test "xCAT" != xBASH; then
4896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4897$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4898      fi
4899      # Try to locate tool using the code snippet
4900      for ac_prog in cat
4901do
4902  # Extract the first word of "$ac_prog", so it can be a program name with args.
4903set dummy $ac_prog; ac_word=$2
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905$as_echo_n "checking for $ac_word... " >&6; }
4906if ${ac_cv_path_CAT+:} false; then :
4907  $as_echo_n "(cached) " >&6
4908else
4909  case $CAT in
4910  [\\/]* | ?:[\\/]*)
4911  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4912  ;;
4913  *)
4914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915for as_dir in $PATH
4916do
4917  IFS=$as_save_IFS
4918  test -z "$as_dir" && as_dir=.
4919    for ac_exec_ext in '' $ac_executable_extensions; do
4920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4921    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923    break 2
4924  fi
4925done
4926  done
4927IFS=$as_save_IFS
4928
4929  ;;
4930esac
4931fi
4932CAT=$ac_cv_path_CAT
4933if test -n "$CAT"; then
4934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4935$as_echo "$CAT" >&6; }
4936else
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938$as_echo "no" >&6; }
4939fi
4940
4941
4942  test -n "$CAT" && break
4943done
4944
4945    else
4946      # If it succeeded, then it was overridden by the user. We will use it
4947      # for the tool.
4948
4949      # First remove it from the list of overridden variables, so we can test
4950      # for unknown variables in the end.
4951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4952
4953      # Check if the provided tool contains a complete path.
4954      tool_specified="$CAT"
4955      tool_basename="${tool_specified##*/}"
4956      if test "x$tool_basename" = "x$tool_specified"; then
4957        # A command without a complete path is provided, search $PATH.
4958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4959$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4960        # Extract the first word of "$tool_basename", so it can be a program name with args.
4961set dummy $tool_basename; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_CAT+:} false; then :
4965  $as_echo_n "(cached) " >&6
4966else
4967  case $CAT in
4968  [\\/]* | ?:[\\/]*)
4969  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4970  ;;
4971  *)
4972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975  IFS=$as_save_IFS
4976  test -z "$as_dir" && as_dir=.
4977    for ac_exec_ext in '' $ac_executable_extensions; do
4978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981    break 2
4982  fi
4983done
4984  done
4985IFS=$as_save_IFS
4986
4987  ;;
4988esac
4989fi
4990CAT=$ac_cv_path_CAT
4991if test -n "$CAT"; then
4992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4993$as_echo "$CAT" >&6; }
4994else
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000        if test "x$CAT" = x; then
5001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5002        fi
5003      else
5004        # Otherwise we believe it is a complete path. Use it as it is.
5005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5006$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5008$as_echo_n "checking for CAT... " >&6; }
5009        if test ! -x "$tool_specified"; then
5010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5011$as_echo "not found" >&6; }
5012          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5013        fi
5014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5015$as_echo "$tool_specified" >&6; }
5016      fi
5017    fi
5018  fi
5019
5020
5021
5022  if test "x$CAT" = x; then
5023    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5024  fi
5025
5026
5027
5028
5029
5030  # Publish this variable in the help.
5031
5032
5033  if test "x$CHMOD" = x; then
5034    # The variable is not set by user, try to locate tool using the code snippet
5035    for ac_prog in chmod
5036do
5037  # Extract the first word of "$ac_prog", so it can be a program name with args.
5038set dummy $ac_prog; ac_word=$2
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
5041if ${ac_cv_path_CHMOD+:} false; then :
5042  $as_echo_n "(cached) " >&6
5043else
5044  case $CHMOD in
5045  [\\/]* | ?:[\\/]*)
5046  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5047  ;;
5048  *)
5049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052  IFS=$as_save_IFS
5053  test -z "$as_dir" && as_dir=.
5054    for ac_exec_ext in '' $ac_executable_extensions; do
5055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5056    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5058    break 2
5059  fi
5060done
5061  done
5062IFS=$as_save_IFS
5063
5064  ;;
5065esac
5066fi
5067CHMOD=$ac_cv_path_CHMOD
5068if test -n "$CHMOD"; then
5069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5070$as_echo "$CHMOD" >&6; }
5071else
5072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5073$as_echo "no" >&6; }
5074fi
5075
5076
5077  test -n "$CHMOD" && break
5078done
5079
5080  else
5081    # The variable is set, but is it from the command line or the environment?
5082
5083    # Try to remove the string !CHMOD! from our list.
5084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5086      # If it failed, the variable was not from the command line. Ignore it,
5087      # but warn the user (except for BASH, which is always set by the calling BASH).
5088      if test "xCHMOD" != xBASH; then
5089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5090$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5091      fi
5092      # Try to locate tool using the code snippet
5093      for ac_prog in chmod
5094do
5095  # Extract the first word of "$ac_prog", so it can be a program name with args.
5096set dummy $ac_prog; ac_word=$2
5097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098$as_echo_n "checking for $ac_word... " >&6; }
5099if ${ac_cv_path_CHMOD+:} false; then :
5100  $as_echo_n "(cached) " >&6
5101else
5102  case $CHMOD in
5103  [\\/]* | ?:[\\/]*)
5104  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5105  ;;
5106  *)
5107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110  IFS=$as_save_IFS
5111  test -z "$as_dir" && as_dir=.
5112    for ac_exec_ext in '' $ac_executable_extensions; do
5113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116    break 2
5117  fi
5118done
5119  done
5120IFS=$as_save_IFS
5121
5122  ;;
5123esac
5124fi
5125CHMOD=$ac_cv_path_CHMOD
5126if test -n "$CHMOD"; then
5127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5128$as_echo "$CHMOD" >&6; }
5129else
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
5132fi
5133
5134
5135  test -n "$CHMOD" && break
5136done
5137
5138    else
5139      # If it succeeded, then it was overridden by the user. We will use it
5140      # for the tool.
5141
5142      # First remove it from the list of overridden variables, so we can test
5143      # for unknown variables in the end.
5144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5145
5146      # Check if the provided tool contains a complete path.
5147      tool_specified="$CHMOD"
5148      tool_basename="${tool_specified##*/}"
5149      if test "x$tool_basename" = "x$tool_specified"; then
5150        # A command without a complete path is provided, search $PATH.
5151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5152$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5153        # Extract the first word of "$tool_basename", so it can be a program name with args.
5154set dummy $tool_basename; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_CHMOD+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $CHMOD in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183CHMOD=$ac_cv_path_CHMOD
5184if test -n "$CHMOD"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5186$as_echo "$CHMOD" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193        if test "x$CHMOD" = x; then
5194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5195        fi
5196      else
5197        # Otherwise we believe it is a complete path. Use it as it is.
5198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5199$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5201$as_echo_n "checking for CHMOD... " >&6; }
5202        if test ! -x "$tool_specified"; then
5203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5204$as_echo "not found" >&6; }
5205          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5206        fi
5207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5208$as_echo "$tool_specified" >&6; }
5209      fi
5210    fi
5211  fi
5212
5213
5214
5215  if test "x$CHMOD" = x; then
5216    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5217  fi
5218
5219
5220
5221
5222
5223  # Publish this variable in the help.
5224
5225
5226  if test "x$CMP" = x; then
5227    # The variable is not set by user, try to locate tool using the code snippet
5228    for ac_prog in cmp
5229do
5230  # Extract the first word of "$ac_prog", so it can be a program name with args.
5231set dummy $ac_prog; ac_word=$2
5232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5233$as_echo_n "checking for $ac_word... " >&6; }
5234if ${ac_cv_path_CMP+:} false; then :
5235  $as_echo_n "(cached) " >&6
5236else
5237  case $CMP in
5238  [\\/]* | ?:[\\/]*)
5239  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5240  ;;
5241  *)
5242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245  IFS=$as_save_IFS
5246  test -z "$as_dir" && as_dir=.
5247    for ac_exec_ext in '' $ac_executable_extensions; do
5248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5249    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5251    break 2
5252  fi
5253done
5254  done
5255IFS=$as_save_IFS
5256
5257  ;;
5258esac
5259fi
5260CMP=$ac_cv_path_CMP
5261if test -n "$CMP"; then
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5263$as_echo "$CMP" >&6; }
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266$as_echo "no" >&6; }
5267fi
5268
5269
5270  test -n "$CMP" && break
5271done
5272
5273  else
5274    # The variable is set, but is it from the command line or the environment?
5275
5276    # Try to remove the string !CMP! from our list.
5277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5279      # If it failed, the variable was not from the command line. Ignore it,
5280      # but warn the user (except for BASH, which is always set by the calling BASH).
5281      if test "xCMP" != xBASH; then
5282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5283$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5284      fi
5285      # Try to locate tool using the code snippet
5286      for ac_prog in cmp
5287do
5288  # Extract the first word of "$ac_prog", so it can be a program name with args.
5289set dummy $ac_prog; ac_word=$2
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5291$as_echo_n "checking for $ac_word... " >&6; }
5292if ${ac_cv_path_CMP+:} false; then :
5293  $as_echo_n "(cached) " >&6
5294else
5295  case $CMP in
5296  [\\/]* | ?:[\\/]*)
5297  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5298  ;;
5299  *)
5300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5301for as_dir in $PATH
5302do
5303  IFS=$as_save_IFS
5304  test -z "$as_dir" && as_dir=.
5305    for ac_exec_ext in '' $ac_executable_extensions; do
5306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5307    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5309    break 2
5310  fi
5311done
5312  done
5313IFS=$as_save_IFS
5314
5315  ;;
5316esac
5317fi
5318CMP=$ac_cv_path_CMP
5319if test -n "$CMP"; then
5320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5321$as_echo "$CMP" >&6; }
5322else
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324$as_echo "no" >&6; }
5325fi
5326
5327
5328  test -n "$CMP" && break
5329done
5330
5331    else
5332      # If it succeeded, then it was overridden by the user. We will use it
5333      # for the tool.
5334
5335      # First remove it from the list of overridden variables, so we can test
5336      # for unknown variables in the end.
5337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5338
5339      # Check if the provided tool contains a complete path.
5340      tool_specified="$CMP"
5341      tool_basename="${tool_specified##*/}"
5342      if test "x$tool_basename" = "x$tool_specified"; then
5343        # A command without a complete path is provided, search $PATH.
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5345$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5346        # Extract the first word of "$tool_basename", so it can be a program name with args.
5347set dummy $tool_basename; ac_word=$2
5348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5349$as_echo_n "checking for $ac_word... " >&6; }
5350if ${ac_cv_path_CMP+:} false; then :
5351  $as_echo_n "(cached) " >&6
5352else
5353  case $CMP in
5354  [\\/]* | ?:[\\/]*)
5355  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5356  ;;
5357  *)
5358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5359for as_dir in $PATH
5360do
5361  IFS=$as_save_IFS
5362  test -z "$as_dir" && as_dir=.
5363    for ac_exec_ext in '' $ac_executable_extensions; do
5364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5365    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5367    break 2
5368  fi
5369done
5370  done
5371IFS=$as_save_IFS
5372
5373  ;;
5374esac
5375fi
5376CMP=$ac_cv_path_CMP
5377if test -n "$CMP"; then
5378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5379$as_echo "$CMP" >&6; }
5380else
5381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
5383fi
5384
5385
5386        if test "x$CMP" = x; then
5387          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5388        fi
5389      else
5390        # Otherwise we believe it is a complete path. Use it as it is.
5391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5392$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5394$as_echo_n "checking for CMP... " >&6; }
5395        if test ! -x "$tool_specified"; then
5396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5397$as_echo "not found" >&6; }
5398          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5399        fi
5400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5401$as_echo "$tool_specified" >&6; }
5402      fi
5403    fi
5404  fi
5405
5406
5407
5408  if test "x$CMP" = x; then
5409    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5410  fi
5411
5412
5413
5414
5415
5416  # Publish this variable in the help.
5417
5418
5419  if test "x$COMM" = x; then
5420    # The variable is not set by user, try to locate tool using the code snippet
5421    for ac_prog in comm
5422do
5423  # Extract the first word of "$ac_prog", so it can be a program name with args.
5424set dummy $ac_prog; ac_word=$2
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
5427if ${ac_cv_path_COMM+:} false; then :
5428  $as_echo_n "(cached) " >&6
5429else
5430  case $COMM in
5431  [\\/]* | ?:[\\/]*)
5432  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5433  ;;
5434  *)
5435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH
5437do
5438  IFS=$as_save_IFS
5439  test -z "$as_dir" && as_dir=.
5440    for ac_exec_ext in '' $ac_executable_extensions; do
5441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444    break 2
5445  fi
5446done
5447  done
5448IFS=$as_save_IFS
5449
5450  ;;
5451esac
5452fi
5453COMM=$ac_cv_path_COMM
5454if test -n "$COMM"; then
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5456$as_echo "$COMM" >&6; }
5457else
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }
5460fi
5461
5462
5463  test -n "$COMM" && break
5464done
5465
5466  else
5467    # The variable is set, but is it from the command line or the environment?
5468
5469    # Try to remove the string !COMM! from our list.
5470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5472      # If it failed, the variable was not from the command line. Ignore it,
5473      # but warn the user (except for BASH, which is always set by the calling BASH).
5474      if test "xCOMM" != xBASH; then
5475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5476$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5477      fi
5478      # Try to locate tool using the code snippet
5479      for ac_prog in comm
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if ${ac_cv_path_COMM+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $COMM in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5500    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511COMM=$ac_cv_path_COMM
5512if test -n "$COMM"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5514$as_echo "$COMM" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$COMM" && break
5522done
5523
5524    else
5525      # If it succeeded, then it was overridden by the user. We will use it
5526      # for the tool.
5527
5528      # First remove it from the list of overridden variables, so we can test
5529      # for unknown variables in the end.
5530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5531
5532      # Check if the provided tool contains a complete path.
5533      tool_specified="$COMM"
5534      tool_basename="${tool_specified##*/}"
5535      if test "x$tool_basename" = "x$tool_specified"; then
5536        # A command without a complete path is provided, search $PATH.
5537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5538$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5539        # Extract the first word of "$tool_basename", so it can be a program name with args.
5540set dummy $tool_basename; ac_word=$2
5541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5542$as_echo_n "checking for $ac_word... " >&6; }
5543if ${ac_cv_path_COMM+:} false; then :
5544  $as_echo_n "(cached) " >&6
5545else
5546  case $COMM in
5547  [\\/]* | ?:[\\/]*)
5548  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5549  ;;
5550  *)
5551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552for as_dir in $PATH
5553do
5554  IFS=$as_save_IFS
5555  test -z "$as_dir" && as_dir=.
5556    for ac_exec_ext in '' $ac_executable_extensions; do
5557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5558    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5560    break 2
5561  fi
5562done
5563  done
5564IFS=$as_save_IFS
5565
5566  ;;
5567esac
5568fi
5569COMM=$ac_cv_path_COMM
5570if test -n "$COMM"; then
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5572$as_echo "$COMM" >&6; }
5573else
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575$as_echo "no" >&6; }
5576fi
5577
5578
5579        if test "x$COMM" = x; then
5580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5581        fi
5582      else
5583        # Otherwise we believe it is a complete path. Use it as it is.
5584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5585$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5587$as_echo_n "checking for COMM... " >&6; }
5588        if test ! -x "$tool_specified"; then
5589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5590$as_echo "not found" >&6; }
5591          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5592        fi
5593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5594$as_echo "$tool_specified" >&6; }
5595      fi
5596    fi
5597  fi
5598
5599
5600
5601  if test "x$COMM" = x; then
5602    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5603  fi
5604
5605
5606
5607
5608
5609  # Publish this variable in the help.
5610
5611
5612  if test "x$CP" = x; then
5613    # The variable is not set by user, try to locate tool using the code snippet
5614    for ac_prog in cp
5615do
5616  # Extract the first word of "$ac_prog", so it can be a program name with args.
5617set dummy $ac_prog; ac_word=$2
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
5620if ${ac_cv_path_CP+:} false; then :
5621  $as_echo_n "(cached) " >&6
5622else
5623  case $CP in
5624  [\\/]* | ?:[\\/]*)
5625  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5626  ;;
5627  *)
5628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5629for as_dir in $PATH
5630do
5631  IFS=$as_save_IFS
5632  test -z "$as_dir" && as_dir=.
5633    for ac_exec_ext in '' $ac_executable_extensions; do
5634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5635    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5637    break 2
5638  fi
5639done
5640  done
5641IFS=$as_save_IFS
5642
5643  ;;
5644esac
5645fi
5646CP=$ac_cv_path_CP
5647if test -n "$CP"; then
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5649$as_echo "$CP" >&6; }
5650else
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652$as_echo "no" >&6; }
5653fi
5654
5655
5656  test -n "$CP" && break
5657done
5658
5659  else
5660    # The variable is set, but is it from the command line or the environment?
5661
5662    # Try to remove the string !CP! from our list.
5663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5665      # If it failed, the variable was not from the command line. Ignore it,
5666      # but warn the user (except for BASH, which is always set by the calling BASH).
5667      if test "xCP" != xBASH; then
5668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5669$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5670      fi
5671      # Try to locate tool using the code snippet
5672      for ac_prog in cp
5673do
5674  # Extract the first word of "$ac_prog", so it can be a program name with args.
5675set dummy $ac_prog; ac_word=$2
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677$as_echo_n "checking for $ac_word... " >&6; }
5678if ${ac_cv_path_CP+:} false; then :
5679  $as_echo_n "(cached) " >&6
5680else
5681  case $CP in
5682  [\\/]* | ?:[\\/]*)
5683  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5684  ;;
5685  *)
5686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5687for as_dir in $PATH
5688do
5689  IFS=$as_save_IFS
5690  test -z "$as_dir" && as_dir=.
5691    for ac_exec_ext in '' $ac_executable_extensions; do
5692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5693    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695    break 2
5696  fi
5697done
5698  done
5699IFS=$as_save_IFS
5700
5701  ;;
5702esac
5703fi
5704CP=$ac_cv_path_CP
5705if test -n "$CP"; then
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5707$as_echo "$CP" >&6; }
5708else
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711fi
5712
5713
5714  test -n "$CP" && break
5715done
5716
5717    else
5718      # If it succeeded, then it was overridden by the user. We will use it
5719      # for the tool.
5720
5721      # First remove it from the list of overridden variables, so we can test
5722      # for unknown variables in the end.
5723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5724
5725      # Check if the provided tool contains a complete path.
5726      tool_specified="$CP"
5727      tool_basename="${tool_specified##*/}"
5728      if test "x$tool_basename" = "x$tool_specified"; then
5729        # A command without a complete path is provided, search $PATH.
5730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5731$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5732        # Extract the first word of "$tool_basename", so it can be a program name with args.
5733set dummy $tool_basename; ac_word=$2
5734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735$as_echo_n "checking for $ac_word... " >&6; }
5736if ${ac_cv_path_CP+:} false; then :
5737  $as_echo_n "(cached) " >&6
5738else
5739  case $CP in
5740  [\\/]* | ?:[\\/]*)
5741  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5742  ;;
5743  *)
5744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5745for as_dir in $PATH
5746do
5747  IFS=$as_save_IFS
5748  test -z "$as_dir" && as_dir=.
5749    for ac_exec_ext in '' $ac_executable_extensions; do
5750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5751    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5753    break 2
5754  fi
5755done
5756  done
5757IFS=$as_save_IFS
5758
5759  ;;
5760esac
5761fi
5762CP=$ac_cv_path_CP
5763if test -n "$CP"; then
5764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5765$as_echo "$CP" >&6; }
5766else
5767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
5769fi
5770
5771
5772        if test "x$CP" = x; then
5773          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5774        fi
5775      else
5776        # Otherwise we believe it is a complete path. Use it as it is.
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5778$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5780$as_echo_n "checking for CP... " >&6; }
5781        if test ! -x "$tool_specified"; then
5782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5783$as_echo "not found" >&6; }
5784          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5785        fi
5786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5787$as_echo "$tool_specified" >&6; }
5788      fi
5789    fi
5790  fi
5791
5792
5793
5794  if test "x$CP" = x; then
5795    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5796  fi
5797
5798
5799
5800
5801
5802  # Publish this variable in the help.
5803
5804
5805  if test "x$CUT" = x; then
5806    # The variable is not set by user, try to locate tool using the code snippet
5807    for ac_prog in cut
5808do
5809  # Extract the first word of "$ac_prog", so it can be a program name with args.
5810set dummy $ac_prog; ac_word=$2
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5812$as_echo_n "checking for $ac_word... " >&6; }
5813if ${ac_cv_path_CUT+:} false; then :
5814  $as_echo_n "(cached) " >&6
5815else
5816  case $CUT in
5817  [\\/]* | ?:[\\/]*)
5818  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5819  ;;
5820  *)
5821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822for as_dir in $PATH
5823do
5824  IFS=$as_save_IFS
5825  test -z "$as_dir" && as_dir=.
5826    for ac_exec_ext in '' $ac_executable_extensions; do
5827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5828    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5830    break 2
5831  fi
5832done
5833  done
5834IFS=$as_save_IFS
5835
5836  ;;
5837esac
5838fi
5839CUT=$ac_cv_path_CUT
5840if test -n "$CUT"; then
5841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5842$as_echo "$CUT" >&6; }
5843else
5844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845$as_echo "no" >&6; }
5846fi
5847
5848
5849  test -n "$CUT" && break
5850done
5851
5852  else
5853    # The variable is set, but is it from the command line or the environment?
5854
5855    # Try to remove the string !CUT! from our list.
5856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5858      # If it failed, the variable was not from the command line. Ignore it,
5859      # but warn the user (except for BASH, which is always set by the calling BASH).
5860      if test "xCUT" != xBASH; then
5861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5862$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5863      fi
5864      # Try to locate tool using the code snippet
5865      for ac_prog in cut
5866do
5867  # Extract the first word of "$ac_prog", so it can be a program name with args.
5868set dummy $ac_prog; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_path_CUT+:} false; then :
5872  $as_echo_n "(cached) " >&6
5873else
5874  case $CUT in
5875  [\\/]* | ?:[\\/]*)
5876  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5877  ;;
5878  *)
5879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5880for as_dir in $PATH
5881do
5882  IFS=$as_save_IFS
5883  test -z "$as_dir" && as_dir=.
5884    for ac_exec_ext in '' $ac_executable_extensions; do
5885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5886    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5888    break 2
5889  fi
5890done
5891  done
5892IFS=$as_save_IFS
5893
5894  ;;
5895esac
5896fi
5897CUT=$ac_cv_path_CUT
5898if test -n "$CUT"; then
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5900$as_echo "$CUT" >&6; }
5901else
5902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
5904fi
5905
5906
5907  test -n "$CUT" && break
5908done
5909
5910    else
5911      # If it succeeded, then it was overridden by the user. We will use it
5912      # for the tool.
5913
5914      # First remove it from the list of overridden variables, so we can test
5915      # for unknown variables in the end.
5916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5917
5918      # Check if the provided tool contains a complete path.
5919      tool_specified="$CUT"
5920      tool_basename="${tool_specified##*/}"
5921      if test "x$tool_basename" = "x$tool_specified"; then
5922        # A command without a complete path is provided, search $PATH.
5923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5924$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5925        # Extract the first word of "$tool_basename", so it can be a program name with args.
5926set dummy $tool_basename; ac_word=$2
5927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5928$as_echo_n "checking for $ac_word... " >&6; }
5929if ${ac_cv_path_CUT+:} false; then :
5930  $as_echo_n "(cached) " >&6
5931else
5932  case $CUT in
5933  [\\/]* | ?:[\\/]*)
5934  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5935  ;;
5936  *)
5937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938for as_dir in $PATH
5939do
5940  IFS=$as_save_IFS
5941  test -z "$as_dir" && as_dir=.
5942    for ac_exec_ext in '' $ac_executable_extensions; do
5943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946    break 2
5947  fi
5948done
5949  done
5950IFS=$as_save_IFS
5951
5952  ;;
5953esac
5954fi
5955CUT=$ac_cv_path_CUT
5956if test -n "$CUT"; then
5957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5958$as_echo "$CUT" >&6; }
5959else
5960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961$as_echo "no" >&6; }
5962fi
5963
5964
5965        if test "x$CUT" = x; then
5966          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5967        fi
5968      else
5969        # Otherwise we believe it is a complete path. Use it as it is.
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5971$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5973$as_echo_n "checking for CUT... " >&6; }
5974        if test ! -x "$tool_specified"; then
5975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5976$as_echo "not found" >&6; }
5977          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5978        fi
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5980$as_echo "$tool_specified" >&6; }
5981      fi
5982    fi
5983  fi
5984
5985
5986
5987  if test "x$CUT" = x; then
5988    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5989  fi
5990
5991
5992
5993
5994
5995  # Publish this variable in the help.
5996
5997
5998  if test "x$DATE" = x; then
5999    # The variable is not set by user, try to locate tool using the code snippet
6000    for ac_prog in date
6001do
6002  # Extract the first word of "$ac_prog", so it can be a program name with args.
6003set dummy $ac_prog; ac_word=$2
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6005$as_echo_n "checking for $ac_word... " >&6; }
6006if ${ac_cv_path_DATE+:} false; then :
6007  $as_echo_n "(cached) " >&6
6008else
6009  case $DATE in
6010  [\\/]* | ?:[\\/]*)
6011  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6012  ;;
6013  *)
6014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017  IFS=$as_save_IFS
6018  test -z "$as_dir" && as_dir=.
6019    for ac_exec_ext in '' $ac_executable_extensions; do
6020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6021    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023    break 2
6024  fi
6025done
6026  done
6027IFS=$as_save_IFS
6028
6029  ;;
6030esac
6031fi
6032DATE=$ac_cv_path_DATE
6033if test -n "$DATE"; then
6034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6035$as_echo "$DATE" >&6; }
6036else
6037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039fi
6040
6041
6042  test -n "$DATE" && break
6043done
6044
6045  else
6046    # The variable is set, but is it from the command line or the environment?
6047
6048    # Try to remove the string !DATE! from our list.
6049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6051      # If it failed, the variable was not from the command line. Ignore it,
6052      # but warn the user (except for BASH, which is always set by the calling BASH).
6053      if test "xDATE" != xBASH; then
6054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6055$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6056      fi
6057      # Try to locate tool using the code snippet
6058      for ac_prog in date
6059do
6060  # Extract the first word of "$ac_prog", so it can be a program name with args.
6061set dummy $ac_prog; ac_word=$2
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6063$as_echo_n "checking for $ac_word... " >&6; }
6064if ${ac_cv_path_DATE+:} false; then :
6065  $as_echo_n "(cached) " >&6
6066else
6067  case $DATE in
6068  [\\/]* | ?:[\\/]*)
6069  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6070  ;;
6071  *)
6072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6073for as_dir in $PATH
6074do
6075  IFS=$as_save_IFS
6076  test -z "$as_dir" && as_dir=.
6077    for ac_exec_ext in '' $ac_executable_extensions; do
6078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6079    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6081    break 2
6082  fi
6083done
6084  done
6085IFS=$as_save_IFS
6086
6087  ;;
6088esac
6089fi
6090DATE=$ac_cv_path_DATE
6091if test -n "$DATE"; then
6092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6093$as_echo "$DATE" >&6; }
6094else
6095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
6097fi
6098
6099
6100  test -n "$DATE" && break
6101done
6102
6103    else
6104      # If it succeeded, then it was overridden by the user. We will use it
6105      # for the tool.
6106
6107      # First remove it from the list of overridden variables, so we can test
6108      # for unknown variables in the end.
6109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6110
6111      # Check if the provided tool contains a complete path.
6112      tool_specified="$DATE"
6113      tool_basename="${tool_specified##*/}"
6114      if test "x$tool_basename" = "x$tool_specified"; then
6115        # A command without a complete path is provided, search $PATH.
6116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6117$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6118        # Extract the first word of "$tool_basename", so it can be a program name with args.
6119set dummy $tool_basename; ac_word=$2
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
6122if ${ac_cv_path_DATE+:} false; then :
6123  $as_echo_n "(cached) " >&6
6124else
6125  case $DATE in
6126  [\\/]* | ?:[\\/]*)
6127  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6128  ;;
6129  *)
6130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6131for as_dir in $PATH
6132do
6133  IFS=$as_save_IFS
6134  test -z "$as_dir" && as_dir=.
6135    for ac_exec_ext in '' $ac_executable_extensions; do
6136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6137    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6139    break 2
6140  fi
6141done
6142  done
6143IFS=$as_save_IFS
6144
6145  ;;
6146esac
6147fi
6148DATE=$ac_cv_path_DATE
6149if test -n "$DATE"; then
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6151$as_echo "$DATE" >&6; }
6152else
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6154$as_echo "no" >&6; }
6155fi
6156
6157
6158        if test "x$DATE" = x; then
6159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6160        fi
6161      else
6162        # Otherwise we believe it is a complete path. Use it as it is.
6163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6164$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6166$as_echo_n "checking for DATE... " >&6; }
6167        if test ! -x "$tool_specified"; then
6168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6169$as_echo "not found" >&6; }
6170          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6171        fi
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6173$as_echo "$tool_specified" >&6; }
6174      fi
6175    fi
6176  fi
6177
6178
6179
6180  if test "x$DATE" = x; then
6181    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6182  fi
6183
6184
6185
6186
6187
6188  # Publish this variable in the help.
6189
6190
6191  if test "x$DIFF" = x; then
6192    # The variable is not set by user, try to locate tool using the code snippet
6193    for ac_prog in gdiff diff
6194do
6195  # Extract the first word of "$ac_prog", so it can be a program name with args.
6196set dummy $ac_prog; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_path_DIFF+:} false; then :
6200  $as_echo_n "(cached) " >&6
6201else
6202  case $DIFF in
6203  [\\/]* | ?:[\\/]*)
6204  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6205  ;;
6206  *)
6207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208for as_dir in $PATH
6209do
6210  IFS=$as_save_IFS
6211  test -z "$as_dir" && as_dir=.
6212    for ac_exec_ext in '' $ac_executable_extensions; do
6213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216    break 2
6217  fi
6218done
6219  done
6220IFS=$as_save_IFS
6221
6222  ;;
6223esac
6224fi
6225DIFF=$ac_cv_path_DIFF
6226if test -n "$DIFF"; then
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6228$as_echo "$DIFF" >&6; }
6229else
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231$as_echo "no" >&6; }
6232fi
6233
6234
6235  test -n "$DIFF" && break
6236done
6237
6238  else
6239    # The variable is set, but is it from the command line or the environment?
6240
6241    # Try to remove the string !DIFF! from our list.
6242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6244      # If it failed, the variable was not from the command line. Ignore it,
6245      # but warn the user (except for BASH, which is always set by the calling BASH).
6246      if test "xDIFF" != xBASH; then
6247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6248$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6249      fi
6250      # Try to locate tool using the code snippet
6251      for ac_prog in gdiff diff
6252do
6253  # Extract the first word of "$ac_prog", so it can be a program name with args.
6254set dummy $ac_prog; ac_word=$2
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6256$as_echo_n "checking for $ac_word... " >&6; }
6257if ${ac_cv_path_DIFF+:} false; then :
6258  $as_echo_n "(cached) " >&6
6259else
6260  case $DIFF in
6261  [\\/]* | ?:[\\/]*)
6262  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6263  ;;
6264  *)
6265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266for as_dir in $PATH
6267do
6268  IFS=$as_save_IFS
6269  test -z "$as_dir" && as_dir=.
6270    for ac_exec_ext in '' $ac_executable_extensions; do
6271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6272    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6274    break 2
6275  fi
6276done
6277  done
6278IFS=$as_save_IFS
6279
6280  ;;
6281esac
6282fi
6283DIFF=$ac_cv_path_DIFF
6284if test -n "$DIFF"; then
6285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6286$as_echo "$DIFF" >&6; }
6287else
6288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6289$as_echo "no" >&6; }
6290fi
6291
6292
6293  test -n "$DIFF" && break
6294done
6295
6296    else
6297      # If it succeeded, then it was overridden by the user. We will use it
6298      # for the tool.
6299
6300      # First remove it from the list of overridden variables, so we can test
6301      # for unknown variables in the end.
6302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6303
6304      # Check if the provided tool contains a complete path.
6305      tool_specified="$DIFF"
6306      tool_basename="${tool_specified##*/}"
6307      if test "x$tool_basename" = "x$tool_specified"; then
6308        # A command without a complete path is provided, search $PATH.
6309        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6310$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6311        # Extract the first word of "$tool_basename", so it can be a program name with args.
6312set dummy $tool_basename; ac_word=$2
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314$as_echo_n "checking for $ac_word... " >&6; }
6315if ${ac_cv_path_DIFF+:} false; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  case $DIFF in
6319  [\\/]* | ?:[\\/]*)
6320  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6321  ;;
6322  *)
6323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326  IFS=$as_save_IFS
6327  test -z "$as_dir" && as_dir=.
6328    for ac_exec_ext in '' $ac_executable_extensions; do
6329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332    break 2
6333  fi
6334done
6335  done
6336IFS=$as_save_IFS
6337
6338  ;;
6339esac
6340fi
6341DIFF=$ac_cv_path_DIFF
6342if test -n "$DIFF"; then
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6344$as_echo "$DIFF" >&6; }
6345else
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
6348fi
6349
6350
6351        if test "x$DIFF" = x; then
6352          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6353        fi
6354      else
6355        # Otherwise we believe it is a complete path. Use it as it is.
6356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6357$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6359$as_echo_n "checking for DIFF... " >&6; }
6360        if test ! -x "$tool_specified"; then
6361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6362$as_echo "not found" >&6; }
6363          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6364        fi
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6366$as_echo "$tool_specified" >&6; }
6367      fi
6368    fi
6369  fi
6370
6371
6372
6373  if test "x$DIFF" = x; then
6374    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6375  fi
6376
6377
6378
6379
6380
6381  # Publish this variable in the help.
6382
6383
6384  if test "x$DIRNAME" = x; then
6385    # The variable is not set by user, try to locate tool using the code snippet
6386    for ac_prog in dirname
6387do
6388  # Extract the first word of "$ac_prog", so it can be a program name with args.
6389set dummy $ac_prog; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_DIRNAME+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $DIRNAME in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418DIRNAME=$ac_cv_path_DIRNAME
6419if test -n "$DIRNAME"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6421$as_echo "$DIRNAME" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428  test -n "$DIRNAME" && break
6429done
6430
6431  else
6432    # The variable is set, but is it from the command line or the environment?
6433
6434    # Try to remove the string !DIRNAME! from our list.
6435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437      # If it failed, the variable was not from the command line. Ignore it,
6438      # but warn the user (except for BASH, which is always set by the calling BASH).
6439      if test "xDIRNAME" != xBASH; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6441$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6442      fi
6443      # Try to locate tool using the code snippet
6444      for ac_prog in dirname
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_DIRNAME+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $DIRNAME in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476DIRNAME=$ac_cv_path_DIRNAME
6477if test -n "$DIRNAME"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6479$as_echo "$DIRNAME" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$DIRNAME" && break
6487done
6488
6489    else
6490      # If it succeeded, then it was overridden by the user. We will use it
6491      # for the tool.
6492
6493      # First remove it from the list of overridden variables, so we can test
6494      # for unknown variables in the end.
6495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496
6497      # Check if the provided tool contains a complete path.
6498      tool_specified="$DIRNAME"
6499      tool_basename="${tool_specified##*/}"
6500      if test "x$tool_basename" = "x$tool_specified"; then
6501        # A command without a complete path is provided, search $PATH.
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6503$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6504        # Extract the first word of "$tool_basename", so it can be a program name with args.
6505set dummy $tool_basename; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if ${ac_cv_path_DIRNAME+:} false; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $DIRNAME in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534DIRNAME=$ac_cv_path_DIRNAME
6535if test -n "$DIRNAME"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6537$as_echo "$DIRNAME" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544        if test "x$DIRNAME" = x; then
6545          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6546        fi
6547      else
6548        # Otherwise we believe it is a complete path. Use it as it is.
6549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6550$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6552$as_echo_n "checking for DIRNAME... " >&6; }
6553        if test ! -x "$tool_specified"; then
6554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6555$as_echo "not found" >&6; }
6556          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6557        fi
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6559$as_echo "$tool_specified" >&6; }
6560      fi
6561    fi
6562  fi
6563
6564
6565
6566  if test "x$DIRNAME" = x; then
6567    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6568  fi
6569
6570
6571
6572
6573
6574  # Publish this variable in the help.
6575
6576
6577  if test "x$ECHO" = x; then
6578    # The variable is not set by user, try to locate tool using the code snippet
6579    for ac_prog in echo
6580do
6581  # Extract the first word of "$ac_prog", so it can be a program name with args.
6582set dummy $ac_prog; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_ECHO+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $ECHO in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611ECHO=$ac_cv_path_ECHO
6612if test -n "$ECHO"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6614$as_echo "$ECHO" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621  test -n "$ECHO" && break
6622done
6623
6624  else
6625    # The variable is set, but is it from the command line or the environment?
6626
6627    # Try to remove the string !ECHO! from our list.
6628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6630      # If it failed, the variable was not from the command line. Ignore it,
6631      # but warn the user (except for BASH, which is always set by the calling BASH).
6632      if test "xECHO" != xBASH; then
6633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6634$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6635      fi
6636      # Try to locate tool using the code snippet
6637      for ac_prog in echo
6638do
6639  # Extract the first word of "$ac_prog", so it can be a program name with args.
6640set dummy $ac_prog; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_path_ECHO+:} false; then :
6644  $as_echo_n "(cached) " >&6
6645else
6646  case $ECHO in
6647  [\\/]* | ?:[\\/]*)
6648  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6649  ;;
6650  *)
6651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652for as_dir in $PATH
6653do
6654  IFS=$as_save_IFS
6655  test -z "$as_dir" && as_dir=.
6656    for ac_exec_ext in '' $ac_executable_extensions; do
6657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660    break 2
6661  fi
6662done
6663  done
6664IFS=$as_save_IFS
6665
6666  ;;
6667esac
6668fi
6669ECHO=$ac_cv_path_ECHO
6670if test -n "$ECHO"; then
6671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6672$as_echo "$ECHO" >&6; }
6673else
6674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6675$as_echo "no" >&6; }
6676fi
6677
6678
6679  test -n "$ECHO" && break
6680done
6681
6682    else
6683      # If it succeeded, then it was overridden by the user. We will use it
6684      # for the tool.
6685
6686      # First remove it from the list of overridden variables, so we can test
6687      # for unknown variables in the end.
6688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6689
6690      # Check if the provided tool contains a complete path.
6691      tool_specified="$ECHO"
6692      tool_basename="${tool_specified##*/}"
6693      if test "x$tool_basename" = "x$tool_specified"; then
6694        # A command without a complete path is provided, search $PATH.
6695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6696$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6697        # Extract the first word of "$tool_basename", so it can be a program name with args.
6698set dummy $tool_basename; ac_word=$2
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700$as_echo_n "checking for $ac_word... " >&6; }
6701if ${ac_cv_path_ECHO+:} false; then :
6702  $as_echo_n "(cached) " >&6
6703else
6704  case $ECHO in
6705  [\\/]* | ?:[\\/]*)
6706  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6707  ;;
6708  *)
6709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in $PATH
6711do
6712  IFS=$as_save_IFS
6713  test -z "$as_dir" && as_dir=.
6714    for ac_exec_ext in '' $ac_executable_extensions; do
6715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6716    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718    break 2
6719  fi
6720done
6721  done
6722IFS=$as_save_IFS
6723
6724  ;;
6725esac
6726fi
6727ECHO=$ac_cv_path_ECHO
6728if test -n "$ECHO"; then
6729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6730$as_echo "$ECHO" >&6; }
6731else
6732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6733$as_echo "no" >&6; }
6734fi
6735
6736
6737        if test "x$ECHO" = x; then
6738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6739        fi
6740      else
6741        # Otherwise we believe it is a complete path. Use it as it is.
6742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6743$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6745$as_echo_n "checking for ECHO... " >&6; }
6746        if test ! -x "$tool_specified"; then
6747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6748$as_echo "not found" >&6; }
6749          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6750        fi
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6752$as_echo "$tool_specified" >&6; }
6753      fi
6754    fi
6755  fi
6756
6757
6758
6759  if test "x$ECHO" = x; then
6760    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6761  fi
6762
6763
6764
6765
6766
6767  # Publish this variable in the help.
6768
6769
6770  if test "x$EXPR" = x; then
6771    # The variable is not set by user, try to locate tool using the code snippet
6772    for ac_prog in expr
6773do
6774  # Extract the first word of "$ac_prog", so it can be a program name with args.
6775set dummy $ac_prog; ac_word=$2
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6777$as_echo_n "checking for $ac_word... " >&6; }
6778if ${ac_cv_path_EXPR+:} false; then :
6779  $as_echo_n "(cached) " >&6
6780else
6781  case $EXPR in
6782  [\\/]* | ?:[\\/]*)
6783  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6784  ;;
6785  *)
6786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6787for as_dir in $PATH
6788do
6789  IFS=$as_save_IFS
6790  test -z "$as_dir" && as_dir=.
6791    for ac_exec_ext in '' $ac_executable_extensions; do
6792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6793    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6795    break 2
6796  fi
6797done
6798  done
6799IFS=$as_save_IFS
6800
6801  ;;
6802esac
6803fi
6804EXPR=$ac_cv_path_EXPR
6805if test -n "$EXPR"; then
6806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6807$as_echo "$EXPR" >&6; }
6808else
6809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6810$as_echo "no" >&6; }
6811fi
6812
6813
6814  test -n "$EXPR" && break
6815done
6816
6817  else
6818    # The variable is set, but is it from the command line or the environment?
6819
6820    # Try to remove the string !EXPR! from our list.
6821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6823      # If it failed, the variable was not from the command line. Ignore it,
6824      # but warn the user (except for BASH, which is always set by the calling BASH).
6825      if test "xEXPR" != xBASH; then
6826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6827$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6828      fi
6829      # Try to locate tool using the code snippet
6830      for ac_prog in expr
6831do
6832  # Extract the first word of "$ac_prog", so it can be a program name with args.
6833set dummy $ac_prog; ac_word=$2
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6835$as_echo_n "checking for $ac_word... " >&6; }
6836if ${ac_cv_path_EXPR+:} false; then :
6837  $as_echo_n "(cached) " >&6
6838else
6839  case $EXPR in
6840  [\\/]* | ?:[\\/]*)
6841  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6842  ;;
6843  *)
6844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6845for as_dir in $PATH
6846do
6847  IFS=$as_save_IFS
6848  test -z "$as_dir" && as_dir=.
6849    for ac_exec_ext in '' $ac_executable_extensions; do
6850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6851    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6853    break 2
6854  fi
6855done
6856  done
6857IFS=$as_save_IFS
6858
6859  ;;
6860esac
6861fi
6862EXPR=$ac_cv_path_EXPR
6863if test -n "$EXPR"; then
6864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6865$as_echo "$EXPR" >&6; }
6866else
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6868$as_echo "no" >&6; }
6869fi
6870
6871
6872  test -n "$EXPR" && break
6873done
6874
6875    else
6876      # If it succeeded, then it was overridden by the user. We will use it
6877      # for the tool.
6878
6879      # First remove it from the list of overridden variables, so we can test
6880      # for unknown variables in the end.
6881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6882
6883      # Check if the provided tool contains a complete path.
6884      tool_specified="$EXPR"
6885      tool_basename="${tool_specified##*/}"
6886      if test "x$tool_basename" = "x$tool_specified"; then
6887        # A command without a complete path is provided, search $PATH.
6888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6889$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6890        # Extract the first word of "$tool_basename", so it can be a program name with args.
6891set dummy $tool_basename; ac_word=$2
6892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6893$as_echo_n "checking for $ac_word... " >&6; }
6894if ${ac_cv_path_EXPR+:} false; then :
6895  $as_echo_n "(cached) " >&6
6896else
6897  case $EXPR in
6898  [\\/]* | ?:[\\/]*)
6899  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6900  ;;
6901  *)
6902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6903for as_dir in $PATH
6904do
6905  IFS=$as_save_IFS
6906  test -z "$as_dir" && as_dir=.
6907    for ac_exec_ext in '' $ac_executable_extensions; do
6908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6909    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6911    break 2
6912  fi
6913done
6914  done
6915IFS=$as_save_IFS
6916
6917  ;;
6918esac
6919fi
6920EXPR=$ac_cv_path_EXPR
6921if test -n "$EXPR"; then
6922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6923$as_echo "$EXPR" >&6; }
6924else
6925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6926$as_echo "no" >&6; }
6927fi
6928
6929
6930        if test "x$EXPR" = x; then
6931          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6932        fi
6933      else
6934        # Otherwise we believe it is a complete path. Use it as it is.
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6936$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6938$as_echo_n "checking for EXPR... " >&6; }
6939        if test ! -x "$tool_specified"; then
6940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6941$as_echo "not found" >&6; }
6942          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6943        fi
6944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6945$as_echo "$tool_specified" >&6; }
6946      fi
6947    fi
6948  fi
6949
6950
6951
6952  if test "x$EXPR" = x; then
6953    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6954  fi
6955
6956
6957
6958
6959
6960  # Publish this variable in the help.
6961
6962
6963  if test "x$FILE" = x; then
6964    # The variable is not set by user, try to locate tool using the code snippet
6965    for ac_prog in file
6966do
6967  # Extract the first word of "$ac_prog", so it can be a program name with args.
6968set dummy $ac_prog; ac_word=$2
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6970$as_echo_n "checking for $ac_word... " >&6; }
6971if ${ac_cv_path_FILE+:} false; then :
6972  $as_echo_n "(cached) " >&6
6973else
6974  case $FILE in
6975  [\\/]* | ?:[\\/]*)
6976  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6977  ;;
6978  *)
6979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6980for as_dir in $PATH
6981do
6982  IFS=$as_save_IFS
6983  test -z "$as_dir" && as_dir=.
6984    for ac_exec_ext in '' $ac_executable_extensions; do
6985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6986    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6988    break 2
6989  fi
6990done
6991  done
6992IFS=$as_save_IFS
6993
6994  ;;
6995esac
6996fi
6997FILE=$ac_cv_path_FILE
6998if test -n "$FILE"; then
6999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7000$as_echo "$FILE" >&6; }
7001else
7002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7003$as_echo "no" >&6; }
7004fi
7005
7006
7007  test -n "$FILE" && break
7008done
7009
7010  else
7011    # The variable is set, but is it from the command line or the environment?
7012
7013    # Try to remove the string !FILE! from our list.
7014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7016      # If it failed, the variable was not from the command line. Ignore it,
7017      # but warn the user (except for BASH, which is always set by the calling BASH).
7018      if test "xFILE" != xBASH; then
7019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7020$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7021      fi
7022      # Try to locate tool using the code snippet
7023      for ac_prog in file
7024do
7025  # Extract the first word of "$ac_prog", so it can be a program name with args.
7026set dummy $ac_prog; ac_word=$2
7027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7028$as_echo_n "checking for $ac_word... " >&6; }
7029if ${ac_cv_path_FILE+:} false; then :
7030  $as_echo_n "(cached) " >&6
7031else
7032  case $FILE in
7033  [\\/]* | ?:[\\/]*)
7034  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7035  ;;
7036  *)
7037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7038for as_dir in $PATH
7039do
7040  IFS=$as_save_IFS
7041  test -z "$as_dir" && as_dir=.
7042    for ac_exec_ext in '' $ac_executable_extensions; do
7043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7044    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7046    break 2
7047  fi
7048done
7049  done
7050IFS=$as_save_IFS
7051
7052  ;;
7053esac
7054fi
7055FILE=$ac_cv_path_FILE
7056if test -n "$FILE"; then
7057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7058$as_echo "$FILE" >&6; }
7059else
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7061$as_echo "no" >&6; }
7062fi
7063
7064
7065  test -n "$FILE" && break
7066done
7067
7068    else
7069      # If it succeeded, then it was overridden by the user. We will use it
7070      # for the tool.
7071
7072      # First remove it from the list of overridden variables, so we can test
7073      # for unknown variables in the end.
7074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7075
7076      # Check if the provided tool contains a complete path.
7077      tool_specified="$FILE"
7078      tool_basename="${tool_specified##*/}"
7079      if test "x$tool_basename" = "x$tool_specified"; then
7080        # A command without a complete path is provided, search $PATH.
7081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7082$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7083        # Extract the first word of "$tool_basename", so it can be a program name with args.
7084set dummy $tool_basename; ac_word=$2
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086$as_echo_n "checking for $ac_word... " >&6; }
7087if ${ac_cv_path_FILE+:} false; then :
7088  $as_echo_n "(cached) " >&6
7089else
7090  case $FILE in
7091  [\\/]* | ?:[\\/]*)
7092  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7093  ;;
7094  *)
7095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096for as_dir in $PATH
7097do
7098  IFS=$as_save_IFS
7099  test -z "$as_dir" && as_dir=.
7100    for ac_exec_ext in '' $ac_executable_extensions; do
7101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7102    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7104    break 2
7105  fi
7106done
7107  done
7108IFS=$as_save_IFS
7109
7110  ;;
7111esac
7112fi
7113FILE=$ac_cv_path_FILE
7114if test -n "$FILE"; then
7115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7116$as_echo "$FILE" >&6; }
7117else
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7119$as_echo "no" >&6; }
7120fi
7121
7122
7123        if test "x$FILE" = x; then
7124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7125        fi
7126      else
7127        # Otherwise we believe it is a complete path. Use it as it is.
7128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7129$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7131$as_echo_n "checking for FILE... " >&6; }
7132        if test ! -x "$tool_specified"; then
7133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7134$as_echo "not found" >&6; }
7135          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7136        fi
7137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7138$as_echo "$tool_specified" >&6; }
7139      fi
7140    fi
7141  fi
7142
7143
7144
7145  if test "x$FILE" = x; then
7146    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7147  fi
7148
7149
7150
7151
7152
7153  # Publish this variable in the help.
7154
7155
7156  if test "x$FIND" = x; then
7157    # The variable is not set by user, try to locate tool using the code snippet
7158    for ac_prog in find
7159do
7160  # Extract the first word of "$ac_prog", so it can be a program name with args.
7161set dummy $ac_prog; ac_word=$2
7162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7163$as_echo_n "checking for $ac_word... " >&6; }
7164if ${ac_cv_path_FIND+:} false; then :
7165  $as_echo_n "(cached) " >&6
7166else
7167  case $FIND in
7168  [\\/]* | ?:[\\/]*)
7169  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7170  ;;
7171  *)
7172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7173for as_dir in $PATH
7174do
7175  IFS=$as_save_IFS
7176  test -z "$as_dir" && as_dir=.
7177    for ac_exec_ext in '' $ac_executable_extensions; do
7178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7179    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7181    break 2
7182  fi
7183done
7184  done
7185IFS=$as_save_IFS
7186
7187  ;;
7188esac
7189fi
7190FIND=$ac_cv_path_FIND
7191if test -n "$FIND"; then
7192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7193$as_echo "$FIND" >&6; }
7194else
7195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7196$as_echo "no" >&6; }
7197fi
7198
7199
7200  test -n "$FIND" && break
7201done
7202
7203  else
7204    # The variable is set, but is it from the command line or the environment?
7205
7206    # Try to remove the string !FIND! from our list.
7207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7209      # If it failed, the variable was not from the command line. Ignore it,
7210      # but warn the user (except for BASH, which is always set by the calling BASH).
7211      if test "xFIND" != xBASH; then
7212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7213$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7214      fi
7215      # Try to locate tool using the code snippet
7216      for ac_prog in find
7217do
7218  # Extract the first word of "$ac_prog", so it can be a program name with args.
7219set dummy $ac_prog; ac_word=$2
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7221$as_echo_n "checking for $ac_word... " >&6; }
7222if ${ac_cv_path_FIND+:} false; then :
7223  $as_echo_n "(cached) " >&6
7224else
7225  case $FIND in
7226  [\\/]* | ?:[\\/]*)
7227  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7228  ;;
7229  *)
7230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7231for as_dir in $PATH
7232do
7233  IFS=$as_save_IFS
7234  test -z "$as_dir" && as_dir=.
7235    for ac_exec_ext in '' $ac_executable_extensions; do
7236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7237    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7239    break 2
7240  fi
7241done
7242  done
7243IFS=$as_save_IFS
7244
7245  ;;
7246esac
7247fi
7248FIND=$ac_cv_path_FIND
7249if test -n "$FIND"; then
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7251$as_echo "$FIND" >&6; }
7252else
7253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7254$as_echo "no" >&6; }
7255fi
7256
7257
7258  test -n "$FIND" && break
7259done
7260
7261    else
7262      # If it succeeded, then it was overridden by the user. We will use it
7263      # for the tool.
7264
7265      # First remove it from the list of overridden variables, so we can test
7266      # for unknown variables in the end.
7267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7268
7269      # Check if the provided tool contains a complete path.
7270      tool_specified="$FIND"
7271      tool_basename="${tool_specified##*/}"
7272      if test "x$tool_basename" = "x$tool_specified"; then
7273        # A command without a complete path is provided, search $PATH.
7274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7275$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7276        # Extract the first word of "$tool_basename", so it can be a program name with args.
7277set dummy $tool_basename; ac_word=$2
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7279$as_echo_n "checking for $ac_word... " >&6; }
7280if ${ac_cv_path_FIND+:} false; then :
7281  $as_echo_n "(cached) " >&6
7282else
7283  case $FIND in
7284  [\\/]* | ?:[\\/]*)
7285  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7286  ;;
7287  *)
7288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289for as_dir in $PATH
7290do
7291  IFS=$as_save_IFS
7292  test -z "$as_dir" && as_dir=.
7293    for ac_exec_ext in '' $ac_executable_extensions; do
7294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7297    break 2
7298  fi
7299done
7300  done
7301IFS=$as_save_IFS
7302
7303  ;;
7304esac
7305fi
7306FIND=$ac_cv_path_FIND
7307if test -n "$FIND"; then
7308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7309$as_echo "$FIND" >&6; }
7310else
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312$as_echo "no" >&6; }
7313fi
7314
7315
7316        if test "x$FIND" = x; then
7317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7318        fi
7319      else
7320        # Otherwise we believe it is a complete path. Use it as it is.
7321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7322$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7324$as_echo_n "checking for FIND... " >&6; }
7325        if test ! -x "$tool_specified"; then
7326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7327$as_echo "not found" >&6; }
7328          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7329        fi
7330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7331$as_echo "$tool_specified" >&6; }
7332      fi
7333    fi
7334  fi
7335
7336
7337
7338  if test "x$FIND" = x; then
7339    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7340  fi
7341
7342
7343
7344
7345
7346  # Publish this variable in the help.
7347
7348
7349  if test "x$HEAD" = x; then
7350    # The variable is not set by user, try to locate tool using the code snippet
7351    for ac_prog in head
7352do
7353  # Extract the first word of "$ac_prog", so it can be a program name with args.
7354set dummy $ac_prog; ac_word=$2
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356$as_echo_n "checking for $ac_word... " >&6; }
7357if ${ac_cv_path_HEAD+:} false; then :
7358  $as_echo_n "(cached) " >&6
7359else
7360  case $HEAD in
7361  [\\/]* | ?:[\\/]*)
7362  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7363  ;;
7364  *)
7365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366for as_dir in $PATH
7367do
7368  IFS=$as_save_IFS
7369  test -z "$as_dir" && as_dir=.
7370    for ac_exec_ext in '' $ac_executable_extensions; do
7371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374    break 2
7375  fi
7376done
7377  done
7378IFS=$as_save_IFS
7379
7380  ;;
7381esac
7382fi
7383HEAD=$ac_cv_path_HEAD
7384if test -n "$HEAD"; then
7385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7386$as_echo "$HEAD" >&6; }
7387else
7388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
7390fi
7391
7392
7393  test -n "$HEAD" && break
7394done
7395
7396  else
7397    # The variable is set, but is it from the command line or the environment?
7398
7399    # Try to remove the string !HEAD! from our list.
7400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7402      # If it failed, the variable was not from the command line. Ignore it,
7403      # but warn the user (except for BASH, which is always set by the calling BASH).
7404      if test "xHEAD" != xBASH; then
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7406$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7407      fi
7408      # Try to locate tool using the code snippet
7409      for ac_prog in head
7410do
7411  # Extract the first word of "$ac_prog", so it can be a program name with args.
7412set dummy $ac_prog; ac_word=$2
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7414$as_echo_n "checking for $ac_word... " >&6; }
7415if ${ac_cv_path_HEAD+:} false; then :
7416  $as_echo_n "(cached) " >&6
7417else
7418  case $HEAD in
7419  [\\/]* | ?:[\\/]*)
7420  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7421  ;;
7422  *)
7423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7424for as_dir in $PATH
7425do
7426  IFS=$as_save_IFS
7427  test -z "$as_dir" && as_dir=.
7428    for ac_exec_ext in '' $ac_executable_extensions; do
7429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7430    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7432    break 2
7433  fi
7434done
7435  done
7436IFS=$as_save_IFS
7437
7438  ;;
7439esac
7440fi
7441HEAD=$ac_cv_path_HEAD
7442if test -n "$HEAD"; then
7443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7444$as_echo "$HEAD" >&6; }
7445else
7446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7447$as_echo "no" >&6; }
7448fi
7449
7450
7451  test -n "$HEAD" && break
7452done
7453
7454    else
7455      # If it succeeded, then it was overridden by the user. We will use it
7456      # for the tool.
7457
7458      # First remove it from the list of overridden variables, so we can test
7459      # for unknown variables in the end.
7460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7461
7462      # Check if the provided tool contains a complete path.
7463      tool_specified="$HEAD"
7464      tool_basename="${tool_specified##*/}"
7465      if test "x$tool_basename" = "x$tool_specified"; then
7466        # A command without a complete path is provided, search $PATH.
7467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7468$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7469        # Extract the first word of "$tool_basename", so it can be a program name with args.
7470set dummy $tool_basename; ac_word=$2
7471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472$as_echo_n "checking for $ac_word... " >&6; }
7473if ${ac_cv_path_HEAD+:} false; then :
7474  $as_echo_n "(cached) " >&6
7475else
7476  case $HEAD in
7477  [\\/]* | ?:[\\/]*)
7478  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7479  ;;
7480  *)
7481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482for as_dir in $PATH
7483do
7484  IFS=$as_save_IFS
7485  test -z "$as_dir" && as_dir=.
7486    for ac_exec_ext in '' $ac_executable_extensions; do
7487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7488    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7490    break 2
7491  fi
7492done
7493  done
7494IFS=$as_save_IFS
7495
7496  ;;
7497esac
7498fi
7499HEAD=$ac_cv_path_HEAD
7500if test -n "$HEAD"; then
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7502$as_echo "$HEAD" >&6; }
7503else
7504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7505$as_echo "no" >&6; }
7506fi
7507
7508
7509        if test "x$HEAD" = x; then
7510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7511        fi
7512      else
7513        # Otherwise we believe it is a complete path. Use it as it is.
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7515$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7517$as_echo_n "checking for HEAD... " >&6; }
7518        if test ! -x "$tool_specified"; then
7519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7520$as_echo "not found" >&6; }
7521          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7522        fi
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7524$as_echo "$tool_specified" >&6; }
7525      fi
7526    fi
7527  fi
7528
7529
7530
7531  if test "x$HEAD" = x; then
7532    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7533  fi
7534
7535
7536
7537
7538
7539  # Publish this variable in the help.
7540
7541
7542  if test "x$LN" = x; then
7543    # The variable is not set by user, try to locate tool using the code snippet
7544    for ac_prog in ln
7545do
7546  # Extract the first word of "$ac_prog", so it can be a program name with args.
7547set dummy $ac_prog; ac_word=$2
7548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7549$as_echo_n "checking for $ac_word... " >&6; }
7550if ${ac_cv_path_LN+:} false; then :
7551  $as_echo_n "(cached) " >&6
7552else
7553  case $LN in
7554  [\\/]* | ?:[\\/]*)
7555  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7556  ;;
7557  *)
7558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7559for as_dir in $PATH
7560do
7561  IFS=$as_save_IFS
7562  test -z "$as_dir" && as_dir=.
7563    for ac_exec_ext in '' $ac_executable_extensions; do
7564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7565    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7567    break 2
7568  fi
7569done
7570  done
7571IFS=$as_save_IFS
7572
7573  ;;
7574esac
7575fi
7576LN=$ac_cv_path_LN
7577if test -n "$LN"; then
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7579$as_echo "$LN" >&6; }
7580else
7581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7582$as_echo "no" >&6; }
7583fi
7584
7585
7586  test -n "$LN" && break
7587done
7588
7589  else
7590    # The variable is set, but is it from the command line or the environment?
7591
7592    # Try to remove the string !LN! from our list.
7593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7595      # If it failed, the variable was not from the command line. Ignore it,
7596      # but warn the user (except for BASH, which is always set by the calling BASH).
7597      if test "xLN" != xBASH; then
7598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7599$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7600      fi
7601      # Try to locate tool using the code snippet
7602      for ac_prog in ln
7603do
7604  # Extract the first word of "$ac_prog", so it can be a program name with args.
7605set dummy $ac_prog; ac_word=$2
7606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7607$as_echo_n "checking for $ac_word... " >&6; }
7608if ${ac_cv_path_LN+:} false; then :
7609  $as_echo_n "(cached) " >&6
7610else
7611  case $LN in
7612  [\\/]* | ?:[\\/]*)
7613  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7614  ;;
7615  *)
7616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7617for as_dir in $PATH
7618do
7619  IFS=$as_save_IFS
7620  test -z "$as_dir" && as_dir=.
7621    for ac_exec_ext in '' $ac_executable_extensions; do
7622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7623    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7625    break 2
7626  fi
7627done
7628  done
7629IFS=$as_save_IFS
7630
7631  ;;
7632esac
7633fi
7634LN=$ac_cv_path_LN
7635if test -n "$LN"; then
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7637$as_echo "$LN" >&6; }
7638else
7639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640$as_echo "no" >&6; }
7641fi
7642
7643
7644  test -n "$LN" && break
7645done
7646
7647    else
7648      # If it succeeded, then it was overridden by the user. We will use it
7649      # for the tool.
7650
7651      # First remove it from the list of overridden variables, so we can test
7652      # for unknown variables in the end.
7653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7654
7655      # Check if the provided tool contains a complete path.
7656      tool_specified="$LN"
7657      tool_basename="${tool_specified##*/}"
7658      if test "x$tool_basename" = "x$tool_specified"; then
7659        # A command without a complete path is provided, search $PATH.
7660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7661$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7662        # Extract the first word of "$tool_basename", so it can be a program name with args.
7663set dummy $tool_basename; ac_word=$2
7664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7665$as_echo_n "checking for $ac_word... " >&6; }
7666if ${ac_cv_path_LN+:} false; then :
7667  $as_echo_n "(cached) " >&6
7668else
7669  case $LN in
7670  [\\/]* | ?:[\\/]*)
7671  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7672  ;;
7673  *)
7674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675for as_dir in $PATH
7676do
7677  IFS=$as_save_IFS
7678  test -z "$as_dir" && as_dir=.
7679    for ac_exec_ext in '' $ac_executable_extensions; do
7680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7681    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7683    break 2
7684  fi
7685done
7686  done
7687IFS=$as_save_IFS
7688
7689  ;;
7690esac
7691fi
7692LN=$ac_cv_path_LN
7693if test -n "$LN"; then
7694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7695$as_echo "$LN" >&6; }
7696else
7697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7698$as_echo "no" >&6; }
7699fi
7700
7701
7702        if test "x$LN" = x; then
7703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7704        fi
7705      else
7706        # Otherwise we believe it is a complete path. Use it as it is.
7707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7708$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7710$as_echo_n "checking for LN... " >&6; }
7711        if test ! -x "$tool_specified"; then
7712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7713$as_echo "not found" >&6; }
7714          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7715        fi
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7717$as_echo "$tool_specified" >&6; }
7718      fi
7719    fi
7720  fi
7721
7722
7723
7724  if test "x$LN" = x; then
7725    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7726  fi
7727
7728
7729
7730
7731
7732  # Publish this variable in the help.
7733
7734
7735  if test "x$LS" = x; then
7736    # The variable is not set by user, try to locate tool using the code snippet
7737    for ac_prog in ls
7738do
7739  # Extract the first word of "$ac_prog", so it can be a program name with args.
7740set dummy $ac_prog; ac_word=$2
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742$as_echo_n "checking for $ac_word... " >&6; }
7743if ${ac_cv_path_LS+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  case $LS in
7747  [\\/]* | ?:[\\/]*)
7748  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7749  ;;
7750  *)
7751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752for as_dir in $PATH
7753do
7754  IFS=$as_save_IFS
7755  test -z "$as_dir" && as_dir=.
7756    for ac_exec_ext in '' $ac_executable_extensions; do
7757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760    break 2
7761  fi
7762done
7763  done
7764IFS=$as_save_IFS
7765
7766  ;;
7767esac
7768fi
7769LS=$ac_cv_path_LS
7770if test -n "$LS"; then
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7772$as_echo "$LS" >&6; }
7773else
7774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
7776fi
7777
7778
7779  test -n "$LS" && break
7780done
7781
7782  else
7783    # The variable is set, but is it from the command line or the environment?
7784
7785    # Try to remove the string !LS! from our list.
7786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7788      # If it failed, the variable was not from the command line. Ignore it,
7789      # but warn the user (except for BASH, which is always set by the calling BASH).
7790      if test "xLS" != xBASH; then
7791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7792$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7793      fi
7794      # Try to locate tool using the code snippet
7795      for ac_prog in ls
7796do
7797  # Extract the first word of "$ac_prog", so it can be a program name with args.
7798set dummy $ac_prog; ac_word=$2
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7800$as_echo_n "checking for $ac_word... " >&6; }
7801if ${ac_cv_path_LS+:} false; then :
7802  $as_echo_n "(cached) " >&6
7803else
7804  case $LS in
7805  [\\/]* | ?:[\\/]*)
7806  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7807  ;;
7808  *)
7809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7810for as_dir in $PATH
7811do
7812  IFS=$as_save_IFS
7813  test -z "$as_dir" && as_dir=.
7814    for ac_exec_ext in '' $ac_executable_extensions; do
7815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7816    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7818    break 2
7819  fi
7820done
7821  done
7822IFS=$as_save_IFS
7823
7824  ;;
7825esac
7826fi
7827LS=$ac_cv_path_LS
7828if test -n "$LS"; then
7829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7830$as_echo "$LS" >&6; }
7831else
7832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7833$as_echo "no" >&6; }
7834fi
7835
7836
7837  test -n "$LS" && break
7838done
7839
7840    else
7841      # If it succeeded, then it was overridden by the user. We will use it
7842      # for the tool.
7843
7844      # First remove it from the list of overridden variables, so we can test
7845      # for unknown variables in the end.
7846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7847
7848      # Check if the provided tool contains a complete path.
7849      tool_specified="$LS"
7850      tool_basename="${tool_specified##*/}"
7851      if test "x$tool_basename" = "x$tool_specified"; then
7852        # A command without a complete path is provided, search $PATH.
7853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7854$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7855        # Extract the first word of "$tool_basename", so it can be a program name with args.
7856set dummy $tool_basename; ac_word=$2
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7858$as_echo_n "checking for $ac_word... " >&6; }
7859if ${ac_cv_path_LS+:} false; then :
7860  $as_echo_n "(cached) " >&6
7861else
7862  case $LS in
7863  [\\/]* | ?:[\\/]*)
7864  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7865  ;;
7866  *)
7867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7868for as_dir in $PATH
7869do
7870  IFS=$as_save_IFS
7871  test -z "$as_dir" && as_dir=.
7872    for ac_exec_ext in '' $ac_executable_extensions; do
7873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7874    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7876    break 2
7877  fi
7878done
7879  done
7880IFS=$as_save_IFS
7881
7882  ;;
7883esac
7884fi
7885LS=$ac_cv_path_LS
7886if test -n "$LS"; then
7887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7888$as_echo "$LS" >&6; }
7889else
7890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7891$as_echo "no" >&6; }
7892fi
7893
7894
7895        if test "x$LS" = x; then
7896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7897        fi
7898      else
7899        # Otherwise we believe it is a complete path. Use it as it is.
7900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7901$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7903$as_echo_n "checking for LS... " >&6; }
7904        if test ! -x "$tool_specified"; then
7905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7906$as_echo "not found" >&6; }
7907          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7908        fi
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7910$as_echo "$tool_specified" >&6; }
7911      fi
7912    fi
7913  fi
7914
7915
7916
7917  if test "x$LS" = x; then
7918    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7919  fi
7920
7921
7922
7923
7924
7925  # Publish this variable in the help.
7926
7927
7928  if test "x$MKDIR" = x; then
7929    # The variable is not set by user, try to locate tool using the code snippet
7930    for ac_prog in mkdir
7931do
7932  # Extract the first word of "$ac_prog", so it can be a program name with args.
7933set dummy $ac_prog; ac_word=$2
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7935$as_echo_n "checking for $ac_word... " >&6; }
7936if ${ac_cv_path_MKDIR+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  case $MKDIR in
7940  [\\/]* | ?:[\\/]*)
7941  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7942  ;;
7943  *)
7944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945for as_dir in $PATH
7946do
7947  IFS=$as_save_IFS
7948  test -z "$as_dir" && as_dir=.
7949    for ac_exec_ext in '' $ac_executable_extensions; do
7950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953    break 2
7954  fi
7955done
7956  done
7957IFS=$as_save_IFS
7958
7959  ;;
7960esac
7961fi
7962MKDIR=$ac_cv_path_MKDIR
7963if test -n "$MKDIR"; then
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7965$as_echo "$MKDIR" >&6; }
7966else
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968$as_echo "no" >&6; }
7969fi
7970
7971
7972  test -n "$MKDIR" && break
7973done
7974
7975  else
7976    # The variable is set, but is it from the command line or the environment?
7977
7978    # Try to remove the string !MKDIR! from our list.
7979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7981      # If it failed, the variable was not from the command line. Ignore it,
7982      # but warn the user (except for BASH, which is always set by the calling BASH).
7983      if test "xMKDIR" != xBASH; then
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7985$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7986      fi
7987      # Try to locate tool using the code snippet
7988      for ac_prog in mkdir
7989do
7990  # Extract the first word of "$ac_prog", so it can be a program name with args.
7991set dummy $ac_prog; ac_word=$2
7992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7993$as_echo_n "checking for $ac_word... " >&6; }
7994if ${ac_cv_path_MKDIR+:} false; then :
7995  $as_echo_n "(cached) " >&6
7996else
7997  case $MKDIR in
7998  [\\/]* | ?:[\\/]*)
7999  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8000  ;;
8001  *)
8002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8003for as_dir in $PATH
8004do
8005  IFS=$as_save_IFS
8006  test -z "$as_dir" && as_dir=.
8007    for ac_exec_ext in '' $ac_executable_extensions; do
8008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8009    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8011    break 2
8012  fi
8013done
8014  done
8015IFS=$as_save_IFS
8016
8017  ;;
8018esac
8019fi
8020MKDIR=$ac_cv_path_MKDIR
8021if test -n "$MKDIR"; then
8022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8023$as_echo "$MKDIR" >&6; }
8024else
8025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8026$as_echo "no" >&6; }
8027fi
8028
8029
8030  test -n "$MKDIR" && break
8031done
8032
8033    else
8034      # If it succeeded, then it was overridden by the user. We will use it
8035      # for the tool.
8036
8037      # First remove it from the list of overridden variables, so we can test
8038      # for unknown variables in the end.
8039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8040
8041      # Check if the provided tool contains a complete path.
8042      tool_specified="$MKDIR"
8043      tool_basename="${tool_specified##*/}"
8044      if test "x$tool_basename" = "x$tool_specified"; then
8045        # A command without a complete path is provided, search $PATH.
8046        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8047$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8048        # Extract the first word of "$tool_basename", so it can be a program name with args.
8049set dummy $tool_basename; ac_word=$2
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8051$as_echo_n "checking for $ac_word... " >&6; }
8052if ${ac_cv_path_MKDIR+:} false; then :
8053  $as_echo_n "(cached) " >&6
8054else
8055  case $MKDIR in
8056  [\\/]* | ?:[\\/]*)
8057  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8058  ;;
8059  *)
8060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8061for as_dir in $PATH
8062do
8063  IFS=$as_save_IFS
8064  test -z "$as_dir" && as_dir=.
8065    for ac_exec_ext in '' $ac_executable_extensions; do
8066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8067    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8069    break 2
8070  fi
8071done
8072  done
8073IFS=$as_save_IFS
8074
8075  ;;
8076esac
8077fi
8078MKDIR=$ac_cv_path_MKDIR
8079if test -n "$MKDIR"; then
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8081$as_echo "$MKDIR" >&6; }
8082else
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
8085fi
8086
8087
8088        if test "x$MKDIR" = x; then
8089          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8090        fi
8091      else
8092        # Otherwise we believe it is a complete path. Use it as it is.
8093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8094$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8096$as_echo_n "checking for MKDIR... " >&6; }
8097        if test ! -x "$tool_specified"; then
8098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8099$as_echo "not found" >&6; }
8100          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8101        fi
8102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8103$as_echo "$tool_specified" >&6; }
8104      fi
8105    fi
8106  fi
8107
8108
8109
8110  if test "x$MKDIR" = x; then
8111    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8112  fi
8113
8114
8115
8116
8117
8118  # Publish this variable in the help.
8119
8120
8121  if test "x$MKTEMP" = x; then
8122    # The variable is not set by user, try to locate tool using the code snippet
8123    for ac_prog in mktemp
8124do
8125  # Extract the first word of "$ac_prog", so it can be a program name with args.
8126set dummy $ac_prog; ac_word=$2
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8128$as_echo_n "checking for $ac_word... " >&6; }
8129if ${ac_cv_path_MKTEMP+:} false; then :
8130  $as_echo_n "(cached) " >&6
8131else
8132  case $MKTEMP in
8133  [\\/]* | ?:[\\/]*)
8134  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8135  ;;
8136  *)
8137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8138for as_dir in $PATH
8139do
8140  IFS=$as_save_IFS
8141  test -z "$as_dir" && as_dir=.
8142    for ac_exec_ext in '' $ac_executable_extensions; do
8143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8144    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8146    break 2
8147  fi
8148done
8149  done
8150IFS=$as_save_IFS
8151
8152  ;;
8153esac
8154fi
8155MKTEMP=$ac_cv_path_MKTEMP
8156if test -n "$MKTEMP"; then
8157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8158$as_echo "$MKTEMP" >&6; }
8159else
8160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8161$as_echo "no" >&6; }
8162fi
8163
8164
8165  test -n "$MKTEMP" && break
8166done
8167
8168  else
8169    # The variable is set, but is it from the command line or the environment?
8170
8171    # Try to remove the string !MKTEMP! from our list.
8172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8174      # If it failed, the variable was not from the command line. Ignore it,
8175      # but warn the user (except for BASH, which is always set by the calling BASH).
8176      if test "xMKTEMP" != xBASH; then
8177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8178$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8179      fi
8180      # Try to locate tool using the code snippet
8181      for ac_prog in mktemp
8182do
8183  # Extract the first word of "$ac_prog", so it can be a program name with args.
8184set dummy $ac_prog; ac_word=$2
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8186$as_echo_n "checking for $ac_word... " >&6; }
8187if ${ac_cv_path_MKTEMP+:} false; then :
8188  $as_echo_n "(cached) " >&6
8189else
8190  case $MKTEMP in
8191  [\\/]* | ?:[\\/]*)
8192  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8193  ;;
8194  *)
8195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8196for as_dir in $PATH
8197do
8198  IFS=$as_save_IFS
8199  test -z "$as_dir" && as_dir=.
8200    for ac_exec_ext in '' $ac_executable_extensions; do
8201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8202    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8204    break 2
8205  fi
8206done
8207  done
8208IFS=$as_save_IFS
8209
8210  ;;
8211esac
8212fi
8213MKTEMP=$ac_cv_path_MKTEMP
8214if test -n "$MKTEMP"; then
8215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8216$as_echo "$MKTEMP" >&6; }
8217else
8218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219$as_echo "no" >&6; }
8220fi
8221
8222
8223  test -n "$MKTEMP" && break
8224done
8225
8226    else
8227      # If it succeeded, then it was overridden by the user. We will use it
8228      # for the tool.
8229
8230      # First remove it from the list of overridden variables, so we can test
8231      # for unknown variables in the end.
8232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8233
8234      # Check if the provided tool contains a complete path.
8235      tool_specified="$MKTEMP"
8236      tool_basename="${tool_specified##*/}"
8237      if test "x$tool_basename" = "x$tool_specified"; then
8238        # A command without a complete path is provided, search $PATH.
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8240$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8241        # Extract the first word of "$tool_basename", so it can be a program name with args.
8242set dummy $tool_basename; ac_word=$2
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8244$as_echo_n "checking for $ac_word... " >&6; }
8245if ${ac_cv_path_MKTEMP+:} false; then :
8246  $as_echo_n "(cached) " >&6
8247else
8248  case $MKTEMP in
8249  [\\/]* | ?:[\\/]*)
8250  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8251  ;;
8252  *)
8253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8254for as_dir in $PATH
8255do
8256  IFS=$as_save_IFS
8257  test -z "$as_dir" && as_dir=.
8258    for ac_exec_ext in '' $ac_executable_extensions; do
8259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8260    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8262    break 2
8263  fi
8264done
8265  done
8266IFS=$as_save_IFS
8267
8268  ;;
8269esac
8270fi
8271MKTEMP=$ac_cv_path_MKTEMP
8272if test -n "$MKTEMP"; then
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8274$as_echo "$MKTEMP" >&6; }
8275else
8276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277$as_echo "no" >&6; }
8278fi
8279
8280
8281        if test "x$MKTEMP" = x; then
8282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8283        fi
8284      else
8285        # Otherwise we believe it is a complete path. Use it as it is.
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8287$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8289$as_echo_n "checking for MKTEMP... " >&6; }
8290        if test ! -x "$tool_specified"; then
8291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8292$as_echo "not found" >&6; }
8293          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8294        fi
8295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8296$as_echo "$tool_specified" >&6; }
8297      fi
8298    fi
8299  fi
8300
8301
8302
8303  if test "x$MKTEMP" = x; then
8304    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8305  fi
8306
8307
8308
8309
8310
8311  # Publish this variable in the help.
8312
8313
8314  if test "x$MV" = x; then
8315    # The variable is not set by user, try to locate tool using the code snippet
8316    for ac_prog in mv
8317do
8318  # Extract the first word of "$ac_prog", so it can be a program name with args.
8319set dummy $ac_prog; ac_word=$2
8320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8321$as_echo_n "checking for $ac_word... " >&6; }
8322if ${ac_cv_path_MV+:} false; then :
8323  $as_echo_n "(cached) " >&6
8324else
8325  case $MV in
8326  [\\/]* | ?:[\\/]*)
8327  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8328  ;;
8329  *)
8330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8331for as_dir in $PATH
8332do
8333  IFS=$as_save_IFS
8334  test -z "$as_dir" && as_dir=.
8335    for ac_exec_ext in '' $ac_executable_extensions; do
8336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8337    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8339    break 2
8340  fi
8341done
8342  done
8343IFS=$as_save_IFS
8344
8345  ;;
8346esac
8347fi
8348MV=$ac_cv_path_MV
8349if test -n "$MV"; then
8350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8351$as_echo "$MV" >&6; }
8352else
8353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8354$as_echo "no" >&6; }
8355fi
8356
8357
8358  test -n "$MV" && break
8359done
8360
8361  else
8362    # The variable is set, but is it from the command line or the environment?
8363
8364    # Try to remove the string !MV! from our list.
8365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8367      # If it failed, the variable was not from the command line. Ignore it,
8368      # but warn the user (except for BASH, which is always set by the calling BASH).
8369      if test "xMV" != xBASH; then
8370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8371$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8372      fi
8373      # Try to locate tool using the code snippet
8374      for ac_prog in mv
8375do
8376  # Extract the first word of "$ac_prog", so it can be a program name with args.
8377set dummy $ac_prog; ac_word=$2
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8379$as_echo_n "checking for $ac_word... " >&6; }
8380if ${ac_cv_path_MV+:} false; then :
8381  $as_echo_n "(cached) " >&6
8382else
8383  case $MV in
8384  [\\/]* | ?:[\\/]*)
8385  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8386  ;;
8387  *)
8388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8389for as_dir in $PATH
8390do
8391  IFS=$as_save_IFS
8392  test -z "$as_dir" && as_dir=.
8393    for ac_exec_ext in '' $ac_executable_extensions; do
8394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8395    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8397    break 2
8398  fi
8399done
8400  done
8401IFS=$as_save_IFS
8402
8403  ;;
8404esac
8405fi
8406MV=$ac_cv_path_MV
8407if test -n "$MV"; then
8408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8409$as_echo "$MV" >&6; }
8410else
8411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8412$as_echo "no" >&6; }
8413fi
8414
8415
8416  test -n "$MV" && break
8417done
8418
8419    else
8420      # If it succeeded, then it was overridden by the user. We will use it
8421      # for the tool.
8422
8423      # First remove it from the list of overridden variables, so we can test
8424      # for unknown variables in the end.
8425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8426
8427      # Check if the provided tool contains a complete path.
8428      tool_specified="$MV"
8429      tool_basename="${tool_specified##*/}"
8430      if test "x$tool_basename" = "x$tool_specified"; then
8431        # A command without a complete path is provided, search $PATH.
8432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8433$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8434        # Extract the first word of "$tool_basename", so it can be a program name with args.
8435set dummy $tool_basename; ac_word=$2
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8437$as_echo_n "checking for $ac_word... " >&6; }
8438if ${ac_cv_path_MV+:} false; then :
8439  $as_echo_n "(cached) " >&6
8440else
8441  case $MV in
8442  [\\/]* | ?:[\\/]*)
8443  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8444  ;;
8445  *)
8446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8447for as_dir in $PATH
8448do
8449  IFS=$as_save_IFS
8450  test -z "$as_dir" && as_dir=.
8451    for ac_exec_ext in '' $ac_executable_extensions; do
8452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8453    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8455    break 2
8456  fi
8457done
8458  done
8459IFS=$as_save_IFS
8460
8461  ;;
8462esac
8463fi
8464MV=$ac_cv_path_MV
8465if test -n "$MV"; then
8466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8467$as_echo "$MV" >&6; }
8468else
8469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470$as_echo "no" >&6; }
8471fi
8472
8473
8474        if test "x$MV" = x; then
8475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8476        fi
8477      else
8478        # Otherwise we believe it is a complete path. Use it as it is.
8479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8480$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8482$as_echo_n "checking for MV... " >&6; }
8483        if test ! -x "$tool_specified"; then
8484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8485$as_echo "not found" >&6; }
8486          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8487        fi
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8489$as_echo "$tool_specified" >&6; }
8490      fi
8491    fi
8492  fi
8493
8494
8495
8496  if test "x$MV" = x; then
8497    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8498  fi
8499
8500
8501
8502
8503
8504  # Publish this variable in the help.
8505
8506
8507  if test "x$NAWK" = x; then
8508    # The variable is not set by user, try to locate tool using the code snippet
8509    for ac_prog in nawk gawk awk
8510do
8511  # Extract the first word of "$ac_prog", so it can be a program name with args.
8512set dummy $ac_prog; ac_word=$2
8513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8514$as_echo_n "checking for $ac_word... " >&6; }
8515if ${ac_cv_path_NAWK+:} false; then :
8516  $as_echo_n "(cached) " >&6
8517else
8518  case $NAWK in
8519  [\\/]* | ?:[\\/]*)
8520  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8521  ;;
8522  *)
8523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8524for as_dir in $PATH
8525do
8526  IFS=$as_save_IFS
8527  test -z "$as_dir" && as_dir=.
8528    for ac_exec_ext in '' $ac_executable_extensions; do
8529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8530    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8532    break 2
8533  fi
8534done
8535  done
8536IFS=$as_save_IFS
8537
8538  ;;
8539esac
8540fi
8541NAWK=$ac_cv_path_NAWK
8542if test -n "$NAWK"; then
8543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8544$as_echo "$NAWK" >&6; }
8545else
8546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547$as_echo "no" >&6; }
8548fi
8549
8550
8551  test -n "$NAWK" && break
8552done
8553
8554  else
8555    # The variable is set, but is it from the command line or the environment?
8556
8557    # Try to remove the string !NAWK! from our list.
8558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8560      # If it failed, the variable was not from the command line. Ignore it,
8561      # but warn the user (except for BASH, which is always set by the calling BASH).
8562      if test "xNAWK" != xBASH; then
8563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8564$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8565      fi
8566      # Try to locate tool using the code snippet
8567      for ac_prog in nawk gawk awk
8568do
8569  # Extract the first word of "$ac_prog", so it can be a program name with args.
8570set dummy $ac_prog; ac_word=$2
8571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8572$as_echo_n "checking for $ac_word... " >&6; }
8573if ${ac_cv_path_NAWK+:} false; then :
8574  $as_echo_n "(cached) " >&6
8575else
8576  case $NAWK in
8577  [\\/]* | ?:[\\/]*)
8578  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8579  ;;
8580  *)
8581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8582for as_dir in $PATH
8583do
8584  IFS=$as_save_IFS
8585  test -z "$as_dir" && as_dir=.
8586    for ac_exec_ext in '' $ac_executable_extensions; do
8587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8588    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8590    break 2
8591  fi
8592done
8593  done
8594IFS=$as_save_IFS
8595
8596  ;;
8597esac
8598fi
8599NAWK=$ac_cv_path_NAWK
8600if test -n "$NAWK"; then
8601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8602$as_echo "$NAWK" >&6; }
8603else
8604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
8606fi
8607
8608
8609  test -n "$NAWK" && break
8610done
8611
8612    else
8613      # If it succeeded, then it was overridden by the user. We will use it
8614      # for the tool.
8615
8616      # First remove it from the list of overridden variables, so we can test
8617      # for unknown variables in the end.
8618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8619
8620      # Check if the provided tool contains a complete path.
8621      tool_specified="$NAWK"
8622      tool_basename="${tool_specified##*/}"
8623      if test "x$tool_basename" = "x$tool_specified"; then
8624        # A command without a complete path is provided, search $PATH.
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8626$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8627        # Extract the first word of "$tool_basename", so it can be a program name with args.
8628set dummy $tool_basename; ac_word=$2
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630$as_echo_n "checking for $ac_word... " >&6; }
8631if ${ac_cv_path_NAWK+:} false; then :
8632  $as_echo_n "(cached) " >&6
8633else
8634  case $NAWK in
8635  [\\/]* | ?:[\\/]*)
8636  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8637  ;;
8638  *)
8639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640for as_dir in $PATH
8641do
8642  IFS=$as_save_IFS
8643  test -z "$as_dir" && as_dir=.
8644    for ac_exec_ext in '' $ac_executable_extensions; do
8645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8646    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648    break 2
8649  fi
8650done
8651  done
8652IFS=$as_save_IFS
8653
8654  ;;
8655esac
8656fi
8657NAWK=$ac_cv_path_NAWK
8658if test -n "$NAWK"; then
8659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8660$as_echo "$NAWK" >&6; }
8661else
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8663$as_echo "no" >&6; }
8664fi
8665
8666
8667        if test "x$NAWK" = x; then
8668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8669        fi
8670      else
8671        # Otherwise we believe it is a complete path. Use it as it is.
8672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8673$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8675$as_echo_n "checking for NAWK... " >&6; }
8676        if test ! -x "$tool_specified"; then
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8678$as_echo "not found" >&6; }
8679          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8680        fi
8681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8682$as_echo "$tool_specified" >&6; }
8683      fi
8684    fi
8685  fi
8686
8687
8688
8689  if test "x$NAWK" = x; then
8690    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8691  fi
8692
8693
8694
8695
8696
8697  # Publish this variable in the help.
8698
8699
8700  if test "x$PRINTF" = x; then
8701    # The variable is not set by user, try to locate tool using the code snippet
8702    for ac_prog in printf
8703do
8704  # Extract the first word of "$ac_prog", so it can be a program name with args.
8705set dummy $ac_prog; ac_word=$2
8706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8707$as_echo_n "checking for $ac_word... " >&6; }
8708if ${ac_cv_path_PRINTF+:} false; then :
8709  $as_echo_n "(cached) " >&6
8710else
8711  case $PRINTF in
8712  [\\/]* | ?:[\\/]*)
8713  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8714  ;;
8715  *)
8716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8717for as_dir in $PATH
8718do
8719  IFS=$as_save_IFS
8720  test -z "$as_dir" && as_dir=.
8721    for ac_exec_ext in '' $ac_executable_extensions; do
8722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8723    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8725    break 2
8726  fi
8727done
8728  done
8729IFS=$as_save_IFS
8730
8731  ;;
8732esac
8733fi
8734PRINTF=$ac_cv_path_PRINTF
8735if test -n "$PRINTF"; then
8736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8737$as_echo "$PRINTF" >&6; }
8738else
8739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8740$as_echo "no" >&6; }
8741fi
8742
8743
8744  test -n "$PRINTF" && break
8745done
8746
8747  else
8748    # The variable is set, but is it from the command line or the environment?
8749
8750    # Try to remove the string !PRINTF! from our list.
8751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8753      # If it failed, the variable was not from the command line. Ignore it,
8754      # but warn the user (except for BASH, which is always set by the calling BASH).
8755      if test "xPRINTF" != xBASH; then
8756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8757$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8758      fi
8759      # Try to locate tool using the code snippet
8760      for ac_prog in printf
8761do
8762  # Extract the first word of "$ac_prog", so it can be a program name with args.
8763set dummy $ac_prog; ac_word=$2
8764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8765$as_echo_n "checking for $ac_word... " >&6; }
8766if ${ac_cv_path_PRINTF+:} false; then :
8767  $as_echo_n "(cached) " >&6
8768else
8769  case $PRINTF in
8770  [\\/]* | ?:[\\/]*)
8771  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8772  ;;
8773  *)
8774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8775for as_dir in $PATH
8776do
8777  IFS=$as_save_IFS
8778  test -z "$as_dir" && as_dir=.
8779    for ac_exec_ext in '' $ac_executable_extensions; do
8780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8781    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8783    break 2
8784  fi
8785done
8786  done
8787IFS=$as_save_IFS
8788
8789  ;;
8790esac
8791fi
8792PRINTF=$ac_cv_path_PRINTF
8793if test -n "$PRINTF"; then
8794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8795$as_echo "$PRINTF" >&6; }
8796else
8797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798$as_echo "no" >&6; }
8799fi
8800
8801
8802  test -n "$PRINTF" && break
8803done
8804
8805    else
8806      # If it succeeded, then it was overridden by the user. We will use it
8807      # for the tool.
8808
8809      # First remove it from the list of overridden variables, so we can test
8810      # for unknown variables in the end.
8811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8812
8813      # Check if the provided tool contains a complete path.
8814      tool_specified="$PRINTF"
8815      tool_basename="${tool_specified##*/}"
8816      if test "x$tool_basename" = "x$tool_specified"; then
8817        # A command without a complete path is provided, search $PATH.
8818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8819$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8820        # Extract the first word of "$tool_basename", so it can be a program name with args.
8821set dummy $tool_basename; ac_word=$2
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8823$as_echo_n "checking for $ac_word... " >&6; }
8824if ${ac_cv_path_PRINTF+:} false; then :
8825  $as_echo_n "(cached) " >&6
8826else
8827  case $PRINTF in
8828  [\\/]* | ?:[\\/]*)
8829  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8830  ;;
8831  *)
8832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8833for as_dir in $PATH
8834do
8835  IFS=$as_save_IFS
8836  test -z "$as_dir" && as_dir=.
8837    for ac_exec_ext in '' $ac_executable_extensions; do
8838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8839    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8841    break 2
8842  fi
8843done
8844  done
8845IFS=$as_save_IFS
8846
8847  ;;
8848esac
8849fi
8850PRINTF=$ac_cv_path_PRINTF
8851if test -n "$PRINTF"; then
8852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8853$as_echo "$PRINTF" >&6; }
8854else
8855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
8857fi
8858
8859
8860        if test "x$PRINTF" = x; then
8861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8862        fi
8863      else
8864        # Otherwise we believe it is a complete path. Use it as it is.
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8866$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8868$as_echo_n "checking for PRINTF... " >&6; }
8869        if test ! -x "$tool_specified"; then
8870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8871$as_echo "not found" >&6; }
8872          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8873        fi
8874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8875$as_echo "$tool_specified" >&6; }
8876      fi
8877    fi
8878  fi
8879
8880
8881
8882  if test "x$PRINTF" = x; then
8883    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8884  fi
8885
8886
8887
8888
8889
8890  # Publish this variable in the help.
8891
8892
8893  if test "x$RM" = x; then
8894    # The variable is not set by user, try to locate tool using the code snippet
8895    for ac_prog in rm
8896do
8897  # Extract the first word of "$ac_prog", so it can be a program name with args.
8898set dummy $ac_prog; ac_word=$2
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8900$as_echo_n "checking for $ac_word... " >&6; }
8901if ${ac_cv_path_RM+:} false; then :
8902  $as_echo_n "(cached) " >&6
8903else
8904  case $RM in
8905  [\\/]* | ?:[\\/]*)
8906  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8907  ;;
8908  *)
8909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8910for as_dir in $PATH
8911do
8912  IFS=$as_save_IFS
8913  test -z "$as_dir" && as_dir=.
8914    for ac_exec_ext in '' $ac_executable_extensions; do
8915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8916    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8918    break 2
8919  fi
8920done
8921  done
8922IFS=$as_save_IFS
8923
8924  ;;
8925esac
8926fi
8927RM=$ac_cv_path_RM
8928if test -n "$RM"; then
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8930$as_echo "$RM" >&6; }
8931else
8932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8933$as_echo "no" >&6; }
8934fi
8935
8936
8937  test -n "$RM" && break
8938done
8939
8940  else
8941    # The variable is set, but is it from the command line or the environment?
8942
8943    # Try to remove the string !RM! from our list.
8944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8946      # If it failed, the variable was not from the command line. Ignore it,
8947      # but warn the user (except for BASH, which is always set by the calling BASH).
8948      if test "xRM" != xBASH; then
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8950$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8951      fi
8952      # Try to locate tool using the code snippet
8953      for ac_prog in rm
8954do
8955  # Extract the first word of "$ac_prog", so it can be a program name with args.
8956set dummy $ac_prog; ac_word=$2
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8958$as_echo_n "checking for $ac_word... " >&6; }
8959if ${ac_cv_path_RM+:} false; then :
8960  $as_echo_n "(cached) " >&6
8961else
8962  case $RM in
8963  [\\/]* | ?:[\\/]*)
8964  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8965  ;;
8966  *)
8967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8968for as_dir in $PATH
8969do
8970  IFS=$as_save_IFS
8971  test -z "$as_dir" && as_dir=.
8972    for ac_exec_ext in '' $ac_executable_extensions; do
8973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8974    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8976    break 2
8977  fi
8978done
8979  done
8980IFS=$as_save_IFS
8981
8982  ;;
8983esac
8984fi
8985RM=$ac_cv_path_RM
8986if test -n "$RM"; then
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8988$as_echo "$RM" >&6; }
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
8992fi
8993
8994
8995  test -n "$RM" && break
8996done
8997
8998    else
8999      # If it succeeded, then it was overridden by the user. We will use it
9000      # for the tool.
9001
9002      # First remove it from the list of overridden variables, so we can test
9003      # for unknown variables in the end.
9004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9005
9006      # Check if the provided tool contains a complete path.
9007      tool_specified="$RM"
9008      tool_basename="${tool_specified##*/}"
9009      if test "x$tool_basename" = "x$tool_specified"; then
9010        # A command without a complete path is provided, search $PATH.
9011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9012$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9013        # Extract the first word of "$tool_basename", so it can be a program name with args.
9014set dummy $tool_basename; ac_word=$2
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9016$as_echo_n "checking for $ac_word... " >&6; }
9017if ${ac_cv_path_RM+:} false; then :
9018  $as_echo_n "(cached) " >&6
9019else
9020  case $RM in
9021  [\\/]* | ?:[\\/]*)
9022  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9023  ;;
9024  *)
9025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9026for as_dir in $PATH
9027do
9028  IFS=$as_save_IFS
9029  test -z "$as_dir" && as_dir=.
9030    for ac_exec_ext in '' $ac_executable_extensions; do
9031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9032    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9034    break 2
9035  fi
9036done
9037  done
9038IFS=$as_save_IFS
9039
9040  ;;
9041esac
9042fi
9043RM=$ac_cv_path_RM
9044if test -n "$RM"; then
9045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9046$as_echo "$RM" >&6; }
9047else
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
9050fi
9051
9052
9053        if test "x$RM" = x; then
9054          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9055        fi
9056      else
9057        # Otherwise we believe it is a complete path. Use it as it is.
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9059$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9061$as_echo_n "checking for RM... " >&6; }
9062        if test ! -x "$tool_specified"; then
9063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9064$as_echo "not found" >&6; }
9065          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9066        fi
9067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9068$as_echo "$tool_specified" >&6; }
9069      fi
9070    fi
9071  fi
9072
9073
9074
9075  if test "x$RM" = x; then
9076    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9077  fi
9078
9079
9080
9081
9082
9083  # Publish this variable in the help.
9084
9085
9086  if test "x$SH" = x; then
9087    # The variable is not set by user, try to locate tool using the code snippet
9088    for ac_prog in sh
9089do
9090  # Extract the first word of "$ac_prog", so it can be a program name with args.
9091set dummy $ac_prog; ac_word=$2
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9093$as_echo_n "checking for $ac_word... " >&6; }
9094if ${ac_cv_path_SH+:} false; then :
9095  $as_echo_n "(cached) " >&6
9096else
9097  case $SH in
9098  [\\/]* | ?:[\\/]*)
9099  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9100  ;;
9101  *)
9102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9103for as_dir in $PATH
9104do
9105  IFS=$as_save_IFS
9106  test -z "$as_dir" && as_dir=.
9107    for ac_exec_ext in '' $ac_executable_extensions; do
9108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9109    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9111    break 2
9112  fi
9113done
9114  done
9115IFS=$as_save_IFS
9116
9117  ;;
9118esac
9119fi
9120SH=$ac_cv_path_SH
9121if test -n "$SH"; then
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9123$as_echo "$SH" >&6; }
9124else
9125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
9127fi
9128
9129
9130  test -n "$SH" && break
9131done
9132
9133  else
9134    # The variable is set, but is it from the command line or the environment?
9135
9136    # Try to remove the string !SH! from our list.
9137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9139      # If it failed, the variable was not from the command line. Ignore it,
9140      # but warn the user (except for BASH, which is always set by the calling BASH).
9141      if test "xSH" != xBASH; then
9142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9143$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9144      fi
9145      # Try to locate tool using the code snippet
9146      for ac_prog in sh
9147do
9148  # Extract the first word of "$ac_prog", so it can be a program name with args.
9149set dummy $ac_prog; ac_word=$2
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9151$as_echo_n "checking for $ac_word... " >&6; }
9152if ${ac_cv_path_SH+:} false; then :
9153  $as_echo_n "(cached) " >&6
9154else
9155  case $SH in
9156  [\\/]* | ?:[\\/]*)
9157  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9158  ;;
9159  *)
9160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9161for as_dir in $PATH
9162do
9163  IFS=$as_save_IFS
9164  test -z "$as_dir" && as_dir=.
9165    for ac_exec_ext in '' $ac_executable_extensions; do
9166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9167    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9169    break 2
9170  fi
9171done
9172  done
9173IFS=$as_save_IFS
9174
9175  ;;
9176esac
9177fi
9178SH=$ac_cv_path_SH
9179if test -n "$SH"; then
9180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9181$as_echo "$SH" >&6; }
9182else
9183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184$as_echo "no" >&6; }
9185fi
9186
9187
9188  test -n "$SH" && break
9189done
9190
9191    else
9192      # If it succeeded, then it was overridden by the user. We will use it
9193      # for the tool.
9194
9195      # First remove it from the list of overridden variables, so we can test
9196      # for unknown variables in the end.
9197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9198
9199      # Check if the provided tool contains a complete path.
9200      tool_specified="$SH"
9201      tool_basename="${tool_specified##*/}"
9202      if test "x$tool_basename" = "x$tool_specified"; then
9203        # A command without a complete path is provided, search $PATH.
9204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9205$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9206        # Extract the first word of "$tool_basename", so it can be a program name with args.
9207set dummy $tool_basename; ac_word=$2
9208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9209$as_echo_n "checking for $ac_word... " >&6; }
9210if ${ac_cv_path_SH+:} false; then :
9211  $as_echo_n "(cached) " >&6
9212else
9213  case $SH in
9214  [\\/]* | ?:[\\/]*)
9215  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9216  ;;
9217  *)
9218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9219for as_dir in $PATH
9220do
9221  IFS=$as_save_IFS
9222  test -z "$as_dir" && as_dir=.
9223    for ac_exec_ext in '' $ac_executable_extensions; do
9224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9225    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9227    break 2
9228  fi
9229done
9230  done
9231IFS=$as_save_IFS
9232
9233  ;;
9234esac
9235fi
9236SH=$ac_cv_path_SH
9237if test -n "$SH"; then
9238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9239$as_echo "$SH" >&6; }
9240else
9241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9242$as_echo "no" >&6; }
9243fi
9244
9245
9246        if test "x$SH" = x; then
9247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9248        fi
9249      else
9250        # Otherwise we believe it is a complete path. Use it as it is.
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9252$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9254$as_echo_n "checking for SH... " >&6; }
9255        if test ! -x "$tool_specified"; then
9256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9257$as_echo "not found" >&6; }
9258          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9259        fi
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9261$as_echo "$tool_specified" >&6; }
9262      fi
9263    fi
9264  fi
9265
9266
9267
9268  if test "x$SH" = x; then
9269    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9270  fi
9271
9272
9273
9274
9275
9276  # Publish this variable in the help.
9277
9278
9279  if test "x$SORT" = x; then
9280    # The variable is not set by user, try to locate tool using the code snippet
9281    for ac_prog in sort
9282do
9283  # Extract the first word of "$ac_prog", so it can be a program name with args.
9284set dummy $ac_prog; ac_word=$2
9285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9286$as_echo_n "checking for $ac_word... " >&6; }
9287if ${ac_cv_path_SORT+:} false; then :
9288  $as_echo_n "(cached) " >&6
9289else
9290  case $SORT in
9291  [\\/]* | ?:[\\/]*)
9292  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9293  ;;
9294  *)
9295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9296for as_dir in $PATH
9297do
9298  IFS=$as_save_IFS
9299  test -z "$as_dir" && as_dir=.
9300    for ac_exec_ext in '' $ac_executable_extensions; do
9301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9302    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9304    break 2
9305  fi
9306done
9307  done
9308IFS=$as_save_IFS
9309
9310  ;;
9311esac
9312fi
9313SORT=$ac_cv_path_SORT
9314if test -n "$SORT"; then
9315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9316$as_echo "$SORT" >&6; }
9317else
9318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
9320fi
9321
9322
9323  test -n "$SORT" && break
9324done
9325
9326  else
9327    # The variable is set, but is it from the command line or the environment?
9328
9329    # Try to remove the string !SORT! from our list.
9330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9332      # If it failed, the variable was not from the command line. Ignore it,
9333      # but warn the user (except for BASH, which is always set by the calling BASH).
9334      if test "xSORT" != xBASH; then
9335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9336$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9337      fi
9338      # Try to locate tool using the code snippet
9339      for ac_prog in sort
9340do
9341  # Extract the first word of "$ac_prog", so it can be a program name with args.
9342set dummy $ac_prog; ac_word=$2
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344$as_echo_n "checking for $ac_word... " >&6; }
9345if ${ac_cv_path_SORT+:} false; then :
9346  $as_echo_n "(cached) " >&6
9347else
9348  case $SORT in
9349  [\\/]* | ?:[\\/]*)
9350  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9351  ;;
9352  *)
9353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354for as_dir in $PATH
9355do
9356  IFS=$as_save_IFS
9357  test -z "$as_dir" && as_dir=.
9358    for ac_exec_ext in '' $ac_executable_extensions; do
9359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362    break 2
9363  fi
9364done
9365  done
9366IFS=$as_save_IFS
9367
9368  ;;
9369esac
9370fi
9371SORT=$ac_cv_path_SORT
9372if test -n "$SORT"; then
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9374$as_echo "$SORT" >&6; }
9375else
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
9378fi
9379
9380
9381  test -n "$SORT" && break
9382done
9383
9384    else
9385      # If it succeeded, then it was overridden by the user. We will use it
9386      # for the tool.
9387
9388      # First remove it from the list of overridden variables, so we can test
9389      # for unknown variables in the end.
9390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9391
9392      # Check if the provided tool contains a complete path.
9393      tool_specified="$SORT"
9394      tool_basename="${tool_specified##*/}"
9395      if test "x$tool_basename" = "x$tool_specified"; then
9396        # A command without a complete path is provided, search $PATH.
9397        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9398$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9399        # Extract the first word of "$tool_basename", so it can be a program name with args.
9400set dummy $tool_basename; ac_word=$2
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9402$as_echo_n "checking for $ac_word... " >&6; }
9403if ${ac_cv_path_SORT+:} false; then :
9404  $as_echo_n "(cached) " >&6
9405else
9406  case $SORT in
9407  [\\/]* | ?:[\\/]*)
9408  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9409  ;;
9410  *)
9411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9412for as_dir in $PATH
9413do
9414  IFS=$as_save_IFS
9415  test -z "$as_dir" && as_dir=.
9416    for ac_exec_ext in '' $ac_executable_extensions; do
9417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9420    break 2
9421  fi
9422done
9423  done
9424IFS=$as_save_IFS
9425
9426  ;;
9427esac
9428fi
9429SORT=$ac_cv_path_SORT
9430if test -n "$SORT"; then
9431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9432$as_echo "$SORT" >&6; }
9433else
9434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
9436fi
9437
9438
9439        if test "x$SORT" = x; then
9440          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9441        fi
9442      else
9443        # Otherwise we believe it is a complete path. Use it as it is.
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9445$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9447$as_echo_n "checking for SORT... " >&6; }
9448        if test ! -x "$tool_specified"; then
9449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9450$as_echo "not found" >&6; }
9451          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9452        fi
9453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9454$as_echo "$tool_specified" >&6; }
9455      fi
9456    fi
9457  fi
9458
9459
9460
9461  if test "x$SORT" = x; then
9462    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9463  fi
9464
9465
9466
9467
9468
9469  # Publish this variable in the help.
9470
9471
9472  if test "x$TAIL" = x; then
9473    # The variable is not set by user, try to locate tool using the code snippet
9474    for ac_prog in tail
9475do
9476  # Extract the first word of "$ac_prog", so it can be a program name with args.
9477set dummy $ac_prog; ac_word=$2
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9479$as_echo_n "checking for $ac_word... " >&6; }
9480if ${ac_cv_path_TAIL+:} false; then :
9481  $as_echo_n "(cached) " >&6
9482else
9483  case $TAIL in
9484  [\\/]* | ?:[\\/]*)
9485  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9486  ;;
9487  *)
9488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9489for as_dir in $PATH
9490do
9491  IFS=$as_save_IFS
9492  test -z "$as_dir" && as_dir=.
9493    for ac_exec_ext in '' $ac_executable_extensions; do
9494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9495    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9497    break 2
9498  fi
9499done
9500  done
9501IFS=$as_save_IFS
9502
9503  ;;
9504esac
9505fi
9506TAIL=$ac_cv_path_TAIL
9507if test -n "$TAIL"; then
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9509$as_echo "$TAIL" >&6; }
9510else
9511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
9513fi
9514
9515
9516  test -n "$TAIL" && break
9517done
9518
9519  else
9520    # The variable is set, but is it from the command line or the environment?
9521
9522    # Try to remove the string !TAIL! from our list.
9523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9525      # If it failed, the variable was not from the command line. Ignore it,
9526      # but warn the user (except for BASH, which is always set by the calling BASH).
9527      if test "xTAIL" != xBASH; then
9528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9529$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9530      fi
9531      # Try to locate tool using the code snippet
9532      for ac_prog in tail
9533do
9534  # Extract the first word of "$ac_prog", so it can be a program name with args.
9535set dummy $ac_prog; ac_word=$2
9536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9537$as_echo_n "checking for $ac_word... " >&6; }
9538if ${ac_cv_path_TAIL+:} false; then :
9539  $as_echo_n "(cached) " >&6
9540else
9541  case $TAIL in
9542  [\\/]* | ?:[\\/]*)
9543  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9544  ;;
9545  *)
9546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9547for as_dir in $PATH
9548do
9549  IFS=$as_save_IFS
9550  test -z "$as_dir" && as_dir=.
9551    for ac_exec_ext in '' $ac_executable_extensions; do
9552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9553    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9555    break 2
9556  fi
9557done
9558  done
9559IFS=$as_save_IFS
9560
9561  ;;
9562esac
9563fi
9564TAIL=$ac_cv_path_TAIL
9565if test -n "$TAIL"; then
9566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9567$as_echo "$TAIL" >&6; }
9568else
9569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
9571fi
9572
9573
9574  test -n "$TAIL" && break
9575done
9576
9577    else
9578      # If it succeeded, then it was overridden by the user. We will use it
9579      # for the tool.
9580
9581      # First remove it from the list of overridden variables, so we can test
9582      # for unknown variables in the end.
9583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9584
9585      # Check if the provided tool contains a complete path.
9586      tool_specified="$TAIL"
9587      tool_basename="${tool_specified##*/}"
9588      if test "x$tool_basename" = "x$tool_specified"; then
9589        # A command without a complete path is provided, search $PATH.
9590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9591$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9592        # Extract the first word of "$tool_basename", so it can be a program name with args.
9593set dummy $tool_basename; ac_word=$2
9594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9595$as_echo_n "checking for $ac_word... " >&6; }
9596if ${ac_cv_path_TAIL+:} false; then :
9597  $as_echo_n "(cached) " >&6
9598else
9599  case $TAIL in
9600  [\\/]* | ?:[\\/]*)
9601  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9602  ;;
9603  *)
9604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9605for as_dir in $PATH
9606do
9607  IFS=$as_save_IFS
9608  test -z "$as_dir" && as_dir=.
9609    for ac_exec_ext in '' $ac_executable_extensions; do
9610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9611    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9613    break 2
9614  fi
9615done
9616  done
9617IFS=$as_save_IFS
9618
9619  ;;
9620esac
9621fi
9622TAIL=$ac_cv_path_TAIL
9623if test -n "$TAIL"; then
9624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9625$as_echo "$TAIL" >&6; }
9626else
9627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
9629fi
9630
9631
9632        if test "x$TAIL" = x; then
9633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9634        fi
9635      else
9636        # Otherwise we believe it is a complete path. Use it as it is.
9637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9638$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9640$as_echo_n "checking for TAIL... " >&6; }
9641        if test ! -x "$tool_specified"; then
9642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9643$as_echo "not found" >&6; }
9644          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9645        fi
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9647$as_echo "$tool_specified" >&6; }
9648      fi
9649    fi
9650  fi
9651
9652
9653
9654  if test "x$TAIL" = x; then
9655    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9656  fi
9657
9658
9659
9660
9661
9662  # Publish this variable in the help.
9663
9664
9665  if test "x$TAR" = x; then
9666    # The variable is not set by user, try to locate tool using the code snippet
9667    for ac_prog in tar
9668do
9669  # Extract the first word of "$ac_prog", so it can be a program name with args.
9670set dummy $ac_prog; ac_word=$2
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9672$as_echo_n "checking for $ac_word... " >&6; }
9673if ${ac_cv_path_TAR+:} false; then :
9674  $as_echo_n "(cached) " >&6
9675else
9676  case $TAR in
9677  [\\/]* | ?:[\\/]*)
9678  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9679  ;;
9680  *)
9681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682for as_dir in $PATH
9683do
9684  IFS=$as_save_IFS
9685  test -z "$as_dir" && as_dir=.
9686    for ac_exec_ext in '' $ac_executable_extensions; do
9687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9688    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9690    break 2
9691  fi
9692done
9693  done
9694IFS=$as_save_IFS
9695
9696  ;;
9697esac
9698fi
9699TAR=$ac_cv_path_TAR
9700if test -n "$TAR"; then
9701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9702$as_echo "$TAR" >&6; }
9703else
9704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705$as_echo "no" >&6; }
9706fi
9707
9708
9709  test -n "$TAR" && break
9710done
9711
9712  else
9713    # The variable is set, but is it from the command line or the environment?
9714
9715    # Try to remove the string !TAR! from our list.
9716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9718      # If it failed, the variable was not from the command line. Ignore it,
9719      # but warn the user (except for BASH, which is always set by the calling BASH).
9720      if test "xTAR" != xBASH; then
9721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9722$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9723      fi
9724      # Try to locate tool using the code snippet
9725      for ac_prog in tar
9726do
9727  # Extract the first word of "$ac_prog", so it can be a program name with args.
9728set dummy $ac_prog; ac_word=$2
9729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9730$as_echo_n "checking for $ac_word... " >&6; }
9731if ${ac_cv_path_TAR+:} false; then :
9732  $as_echo_n "(cached) " >&6
9733else
9734  case $TAR in
9735  [\\/]* | ?:[\\/]*)
9736  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9737  ;;
9738  *)
9739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9740for as_dir in $PATH
9741do
9742  IFS=$as_save_IFS
9743  test -z "$as_dir" && as_dir=.
9744    for ac_exec_ext in '' $ac_executable_extensions; do
9745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9746    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9748    break 2
9749  fi
9750done
9751  done
9752IFS=$as_save_IFS
9753
9754  ;;
9755esac
9756fi
9757TAR=$ac_cv_path_TAR
9758if test -n "$TAR"; then
9759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9760$as_echo "$TAR" >&6; }
9761else
9762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763$as_echo "no" >&6; }
9764fi
9765
9766
9767  test -n "$TAR" && break
9768done
9769
9770    else
9771      # If it succeeded, then it was overridden by the user. We will use it
9772      # for the tool.
9773
9774      # First remove it from the list of overridden variables, so we can test
9775      # for unknown variables in the end.
9776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9777
9778      # Check if the provided tool contains a complete path.
9779      tool_specified="$TAR"
9780      tool_basename="${tool_specified##*/}"
9781      if test "x$tool_basename" = "x$tool_specified"; then
9782        # A command without a complete path is provided, search $PATH.
9783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9784$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9785        # Extract the first word of "$tool_basename", so it can be a program name with args.
9786set dummy $tool_basename; ac_word=$2
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9788$as_echo_n "checking for $ac_word... " >&6; }
9789if ${ac_cv_path_TAR+:} false; then :
9790  $as_echo_n "(cached) " >&6
9791else
9792  case $TAR in
9793  [\\/]* | ?:[\\/]*)
9794  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9795  ;;
9796  *)
9797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9798for as_dir in $PATH
9799do
9800  IFS=$as_save_IFS
9801  test -z "$as_dir" && as_dir=.
9802    for ac_exec_ext in '' $ac_executable_extensions; do
9803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9804    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9806    break 2
9807  fi
9808done
9809  done
9810IFS=$as_save_IFS
9811
9812  ;;
9813esac
9814fi
9815TAR=$ac_cv_path_TAR
9816if test -n "$TAR"; then
9817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9818$as_echo "$TAR" >&6; }
9819else
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822fi
9823
9824
9825        if test "x$TAR" = x; then
9826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9827        fi
9828      else
9829        # Otherwise we believe it is a complete path. Use it as it is.
9830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9831$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9833$as_echo_n "checking for TAR... " >&6; }
9834        if test ! -x "$tool_specified"; then
9835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9836$as_echo "not found" >&6; }
9837          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9838        fi
9839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9840$as_echo "$tool_specified" >&6; }
9841      fi
9842    fi
9843  fi
9844
9845
9846
9847  if test "x$TAR" = x; then
9848    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9849  fi
9850
9851
9852
9853
9854
9855  # Publish this variable in the help.
9856
9857
9858  if test "x$TEE" = x; then
9859    # The variable is not set by user, try to locate tool using the code snippet
9860    for ac_prog in tee
9861do
9862  # Extract the first word of "$ac_prog", so it can be a program name with args.
9863set dummy $ac_prog; ac_word=$2
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9865$as_echo_n "checking for $ac_word... " >&6; }
9866if ${ac_cv_path_TEE+:} false; then :
9867  $as_echo_n "(cached) " >&6
9868else
9869  case $TEE in
9870  [\\/]* | ?:[\\/]*)
9871  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9872  ;;
9873  *)
9874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875for as_dir in $PATH
9876do
9877  IFS=$as_save_IFS
9878  test -z "$as_dir" && as_dir=.
9879    for ac_exec_ext in '' $ac_executable_extensions; do
9880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9881    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883    break 2
9884  fi
9885done
9886  done
9887IFS=$as_save_IFS
9888
9889  ;;
9890esac
9891fi
9892TEE=$ac_cv_path_TEE
9893if test -n "$TEE"; then
9894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9895$as_echo "$TEE" >&6; }
9896else
9897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9898$as_echo "no" >&6; }
9899fi
9900
9901
9902  test -n "$TEE" && break
9903done
9904
9905  else
9906    # The variable is set, but is it from the command line or the environment?
9907
9908    # Try to remove the string !TEE! from our list.
9909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9911      # If it failed, the variable was not from the command line. Ignore it,
9912      # but warn the user (except for BASH, which is always set by the calling BASH).
9913      if test "xTEE" != xBASH; then
9914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9915$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9916      fi
9917      # Try to locate tool using the code snippet
9918      for ac_prog in tee
9919do
9920  # Extract the first word of "$ac_prog", so it can be a program name with args.
9921set dummy $ac_prog; ac_word=$2
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9923$as_echo_n "checking for $ac_word... " >&6; }
9924if ${ac_cv_path_TEE+:} false; then :
9925  $as_echo_n "(cached) " >&6
9926else
9927  case $TEE in
9928  [\\/]* | ?:[\\/]*)
9929  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9930  ;;
9931  *)
9932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935  IFS=$as_save_IFS
9936  test -z "$as_dir" && as_dir=.
9937    for ac_exec_ext in '' $ac_executable_extensions; do
9938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9939    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9941    break 2
9942  fi
9943done
9944  done
9945IFS=$as_save_IFS
9946
9947  ;;
9948esac
9949fi
9950TEE=$ac_cv_path_TEE
9951if test -n "$TEE"; then
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9953$as_echo "$TEE" >&6; }
9954else
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
9957fi
9958
9959
9960  test -n "$TEE" && break
9961done
9962
9963    else
9964      # If it succeeded, then it was overridden by the user. We will use it
9965      # for the tool.
9966
9967      # First remove it from the list of overridden variables, so we can test
9968      # for unknown variables in the end.
9969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9970
9971      # Check if the provided tool contains a complete path.
9972      tool_specified="$TEE"
9973      tool_basename="${tool_specified##*/}"
9974      if test "x$tool_basename" = "x$tool_specified"; then
9975        # A command without a complete path is provided, search $PATH.
9976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9977$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9978        # Extract the first word of "$tool_basename", so it can be a program name with args.
9979set dummy $tool_basename; ac_word=$2
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981$as_echo_n "checking for $ac_word... " >&6; }
9982if ${ac_cv_path_TEE+:} false; then :
9983  $as_echo_n "(cached) " >&6
9984else
9985  case $TEE in
9986  [\\/]* | ?:[\\/]*)
9987  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9988  ;;
9989  *)
9990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993  IFS=$as_save_IFS
9994  test -z "$as_dir" && as_dir=.
9995    for ac_exec_ext in '' $ac_executable_extensions; do
9996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999    break 2
10000  fi
10001done
10002  done
10003IFS=$as_save_IFS
10004
10005  ;;
10006esac
10007fi
10008TEE=$ac_cv_path_TEE
10009if test -n "$TEE"; then
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10011$as_echo "$TEE" >&6; }
10012else
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015fi
10016
10017
10018        if test "x$TEE" = x; then
10019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10020        fi
10021      else
10022        # Otherwise we believe it is a complete path. Use it as it is.
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10024$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10026$as_echo_n "checking for TEE... " >&6; }
10027        if test ! -x "$tool_specified"; then
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10029$as_echo "not found" >&6; }
10030          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10031        fi
10032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10033$as_echo "$tool_specified" >&6; }
10034      fi
10035    fi
10036  fi
10037
10038
10039
10040  if test "x$TEE" = x; then
10041    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10042  fi
10043
10044
10045
10046
10047
10048  # Publish this variable in the help.
10049
10050
10051  if test "x$TOUCH" = x; then
10052    # The variable is not set by user, try to locate tool using the code snippet
10053    for ac_prog in touch
10054do
10055  # Extract the first word of "$ac_prog", so it can be a program name with args.
10056set dummy $ac_prog; ac_word=$2
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058$as_echo_n "checking for $ac_word... " >&6; }
10059if ${ac_cv_path_TOUCH+:} false; then :
10060  $as_echo_n "(cached) " >&6
10061else
10062  case $TOUCH in
10063  [\\/]* | ?:[\\/]*)
10064  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10065  ;;
10066  *)
10067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068for as_dir in $PATH
10069do
10070  IFS=$as_save_IFS
10071  test -z "$as_dir" && as_dir=.
10072    for ac_exec_ext in '' $ac_executable_extensions; do
10073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076    break 2
10077  fi
10078done
10079  done
10080IFS=$as_save_IFS
10081
10082  ;;
10083esac
10084fi
10085TOUCH=$ac_cv_path_TOUCH
10086if test -n "$TOUCH"; then
10087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10088$as_echo "$TOUCH" >&6; }
10089else
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092fi
10093
10094
10095  test -n "$TOUCH" && break
10096done
10097
10098  else
10099    # The variable is set, but is it from the command line or the environment?
10100
10101    # Try to remove the string !TOUCH! from our list.
10102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10104      # If it failed, the variable was not from the command line. Ignore it,
10105      # but warn the user (except for BASH, which is always set by the calling BASH).
10106      if test "xTOUCH" != xBASH; then
10107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10108$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10109      fi
10110      # Try to locate tool using the code snippet
10111      for ac_prog in touch
10112do
10113  # Extract the first word of "$ac_prog", so it can be a program name with args.
10114set dummy $ac_prog; ac_word=$2
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10116$as_echo_n "checking for $ac_word... " >&6; }
10117if ${ac_cv_path_TOUCH+:} false; then :
10118  $as_echo_n "(cached) " >&6
10119else
10120  case $TOUCH in
10121  [\\/]* | ?:[\\/]*)
10122  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10123  ;;
10124  *)
10125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126for as_dir in $PATH
10127do
10128  IFS=$as_save_IFS
10129  test -z "$as_dir" && as_dir=.
10130    for ac_exec_ext in '' $ac_executable_extensions; do
10131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10132    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134    break 2
10135  fi
10136done
10137  done
10138IFS=$as_save_IFS
10139
10140  ;;
10141esac
10142fi
10143TOUCH=$ac_cv_path_TOUCH
10144if test -n "$TOUCH"; then
10145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10146$as_echo "$TOUCH" >&6; }
10147else
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
10150fi
10151
10152
10153  test -n "$TOUCH" && break
10154done
10155
10156    else
10157      # If it succeeded, then it was overridden by the user. We will use it
10158      # for the tool.
10159
10160      # First remove it from the list of overridden variables, so we can test
10161      # for unknown variables in the end.
10162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10163
10164      # Check if the provided tool contains a complete path.
10165      tool_specified="$TOUCH"
10166      tool_basename="${tool_specified##*/}"
10167      if test "x$tool_basename" = "x$tool_specified"; then
10168        # A command without a complete path is provided, search $PATH.
10169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10170$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10171        # Extract the first word of "$tool_basename", so it can be a program name with args.
10172set dummy $tool_basename; ac_word=$2
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10174$as_echo_n "checking for $ac_word... " >&6; }
10175if ${ac_cv_path_TOUCH+:} false; then :
10176  $as_echo_n "(cached) " >&6
10177else
10178  case $TOUCH in
10179  [\\/]* | ?:[\\/]*)
10180  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10181  ;;
10182  *)
10183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10184for as_dir in $PATH
10185do
10186  IFS=$as_save_IFS
10187  test -z "$as_dir" && as_dir=.
10188    for ac_exec_ext in '' $ac_executable_extensions; do
10189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10190    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10192    break 2
10193  fi
10194done
10195  done
10196IFS=$as_save_IFS
10197
10198  ;;
10199esac
10200fi
10201TOUCH=$ac_cv_path_TOUCH
10202if test -n "$TOUCH"; then
10203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10204$as_echo "$TOUCH" >&6; }
10205else
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10207$as_echo "no" >&6; }
10208fi
10209
10210
10211        if test "x$TOUCH" = x; then
10212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10213        fi
10214      else
10215        # Otherwise we believe it is a complete path. Use it as it is.
10216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10217$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10219$as_echo_n "checking for TOUCH... " >&6; }
10220        if test ! -x "$tool_specified"; then
10221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10222$as_echo "not found" >&6; }
10223          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10224        fi
10225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10226$as_echo "$tool_specified" >&6; }
10227      fi
10228    fi
10229  fi
10230
10231
10232
10233  if test "x$TOUCH" = x; then
10234    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10235  fi
10236
10237
10238
10239
10240
10241  # Publish this variable in the help.
10242
10243
10244  if test "x$TR" = x; then
10245    # The variable is not set by user, try to locate tool using the code snippet
10246    for ac_prog in tr
10247do
10248  # Extract the first word of "$ac_prog", so it can be a program name with args.
10249set dummy $ac_prog; ac_word=$2
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10251$as_echo_n "checking for $ac_word... " >&6; }
10252if ${ac_cv_path_TR+:} false; then :
10253  $as_echo_n "(cached) " >&6
10254else
10255  case $TR in
10256  [\\/]* | ?:[\\/]*)
10257  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10258  ;;
10259  *)
10260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10261for as_dir in $PATH
10262do
10263  IFS=$as_save_IFS
10264  test -z "$as_dir" && as_dir=.
10265    for ac_exec_ext in '' $ac_executable_extensions; do
10266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10267    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10269    break 2
10270  fi
10271done
10272  done
10273IFS=$as_save_IFS
10274
10275  ;;
10276esac
10277fi
10278TR=$ac_cv_path_TR
10279if test -n "$TR"; then
10280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10281$as_echo "$TR" >&6; }
10282else
10283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
10285fi
10286
10287
10288  test -n "$TR" && break
10289done
10290
10291  else
10292    # The variable is set, but is it from the command line or the environment?
10293
10294    # Try to remove the string !TR! from our list.
10295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10297      # If it failed, the variable was not from the command line. Ignore it,
10298      # but warn the user (except for BASH, which is always set by the calling BASH).
10299      if test "xTR" != xBASH; then
10300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10301$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10302      fi
10303      # Try to locate tool using the code snippet
10304      for ac_prog in tr
10305do
10306  # Extract the first word of "$ac_prog", so it can be a program name with args.
10307set dummy $ac_prog; ac_word=$2
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10309$as_echo_n "checking for $ac_word... " >&6; }
10310if ${ac_cv_path_TR+:} false; then :
10311  $as_echo_n "(cached) " >&6
10312else
10313  case $TR in
10314  [\\/]* | ?:[\\/]*)
10315  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10316  ;;
10317  *)
10318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10319for as_dir in $PATH
10320do
10321  IFS=$as_save_IFS
10322  test -z "$as_dir" && as_dir=.
10323    for ac_exec_ext in '' $ac_executable_extensions; do
10324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10325    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10327    break 2
10328  fi
10329done
10330  done
10331IFS=$as_save_IFS
10332
10333  ;;
10334esac
10335fi
10336TR=$ac_cv_path_TR
10337if test -n "$TR"; then
10338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10339$as_echo "$TR" >&6; }
10340else
10341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10342$as_echo "no" >&6; }
10343fi
10344
10345
10346  test -n "$TR" && break
10347done
10348
10349    else
10350      # If it succeeded, then it was overridden by the user. We will use it
10351      # for the tool.
10352
10353      # First remove it from the list of overridden variables, so we can test
10354      # for unknown variables in the end.
10355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10356
10357      # Check if the provided tool contains a complete path.
10358      tool_specified="$TR"
10359      tool_basename="${tool_specified##*/}"
10360      if test "x$tool_basename" = "x$tool_specified"; then
10361        # A command without a complete path is provided, search $PATH.
10362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10363$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10364        # Extract the first word of "$tool_basename", so it can be a program name with args.
10365set dummy $tool_basename; ac_word=$2
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367$as_echo_n "checking for $ac_word... " >&6; }
10368if ${ac_cv_path_TR+:} false; then :
10369  $as_echo_n "(cached) " >&6
10370else
10371  case $TR in
10372  [\\/]* | ?:[\\/]*)
10373  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10374  ;;
10375  *)
10376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377for as_dir in $PATH
10378do
10379  IFS=$as_save_IFS
10380  test -z "$as_dir" && as_dir=.
10381    for ac_exec_ext in '' $ac_executable_extensions; do
10382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10383    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385    break 2
10386  fi
10387done
10388  done
10389IFS=$as_save_IFS
10390
10391  ;;
10392esac
10393fi
10394TR=$ac_cv_path_TR
10395if test -n "$TR"; then
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10397$as_echo "$TR" >&6; }
10398else
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
10401fi
10402
10403
10404        if test "x$TR" = x; then
10405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10406        fi
10407      else
10408        # Otherwise we believe it is a complete path. Use it as it is.
10409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10410$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10412$as_echo_n "checking for TR... " >&6; }
10413        if test ! -x "$tool_specified"; then
10414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10415$as_echo "not found" >&6; }
10416          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10417        fi
10418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10419$as_echo "$tool_specified" >&6; }
10420      fi
10421    fi
10422  fi
10423
10424
10425
10426  if test "x$TR" = x; then
10427    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10428  fi
10429
10430
10431
10432
10433
10434  # Publish this variable in the help.
10435
10436
10437  if test "x$UNAME" = x; then
10438    # The variable is not set by user, try to locate tool using the code snippet
10439    for ac_prog in uname
10440do
10441  # Extract the first word of "$ac_prog", so it can be a program name with args.
10442set dummy $ac_prog; ac_word=$2
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10444$as_echo_n "checking for $ac_word... " >&6; }
10445if ${ac_cv_path_UNAME+:} false; then :
10446  $as_echo_n "(cached) " >&6
10447else
10448  case $UNAME in
10449  [\\/]* | ?:[\\/]*)
10450  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10451  ;;
10452  *)
10453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10454for as_dir in $PATH
10455do
10456  IFS=$as_save_IFS
10457  test -z "$as_dir" && as_dir=.
10458    for ac_exec_ext in '' $ac_executable_extensions; do
10459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10460    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10462    break 2
10463  fi
10464done
10465  done
10466IFS=$as_save_IFS
10467
10468  ;;
10469esac
10470fi
10471UNAME=$ac_cv_path_UNAME
10472if test -n "$UNAME"; then
10473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10474$as_echo "$UNAME" >&6; }
10475else
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
10478fi
10479
10480
10481  test -n "$UNAME" && break
10482done
10483
10484  else
10485    # The variable is set, but is it from the command line or the environment?
10486
10487    # Try to remove the string !UNAME! from our list.
10488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10490      # If it failed, the variable was not from the command line. Ignore it,
10491      # but warn the user (except for BASH, which is always set by the calling BASH).
10492      if test "xUNAME" != xBASH; then
10493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10494$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10495      fi
10496      # Try to locate tool using the code snippet
10497      for ac_prog in uname
10498do
10499  # Extract the first word of "$ac_prog", so it can be a program name with args.
10500set dummy $ac_prog; ac_word=$2
10501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10502$as_echo_n "checking for $ac_word... " >&6; }
10503if ${ac_cv_path_UNAME+:} false; then :
10504  $as_echo_n "(cached) " >&6
10505else
10506  case $UNAME in
10507  [\\/]* | ?:[\\/]*)
10508  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10509  ;;
10510  *)
10511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10512for as_dir in $PATH
10513do
10514  IFS=$as_save_IFS
10515  test -z "$as_dir" && as_dir=.
10516    for ac_exec_ext in '' $ac_executable_extensions; do
10517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10518    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10520    break 2
10521  fi
10522done
10523  done
10524IFS=$as_save_IFS
10525
10526  ;;
10527esac
10528fi
10529UNAME=$ac_cv_path_UNAME
10530if test -n "$UNAME"; then
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10532$as_echo "$UNAME" >&6; }
10533else
10534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535$as_echo "no" >&6; }
10536fi
10537
10538
10539  test -n "$UNAME" && break
10540done
10541
10542    else
10543      # If it succeeded, then it was overridden by the user. We will use it
10544      # for the tool.
10545
10546      # First remove it from the list of overridden variables, so we can test
10547      # for unknown variables in the end.
10548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10549
10550      # Check if the provided tool contains a complete path.
10551      tool_specified="$UNAME"
10552      tool_basename="${tool_specified##*/}"
10553      if test "x$tool_basename" = "x$tool_specified"; then
10554        # A command without a complete path is provided, search $PATH.
10555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10556$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10557        # Extract the first word of "$tool_basename", so it can be a program name with args.
10558set dummy $tool_basename; ac_word=$2
10559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10560$as_echo_n "checking for $ac_word... " >&6; }
10561if ${ac_cv_path_UNAME+:} false; then :
10562  $as_echo_n "(cached) " >&6
10563else
10564  case $UNAME in
10565  [\\/]* | ?:[\\/]*)
10566  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10567  ;;
10568  *)
10569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10570for as_dir in $PATH
10571do
10572  IFS=$as_save_IFS
10573  test -z "$as_dir" && as_dir=.
10574    for ac_exec_ext in '' $ac_executable_extensions; do
10575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10576    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10578    break 2
10579  fi
10580done
10581  done
10582IFS=$as_save_IFS
10583
10584  ;;
10585esac
10586fi
10587UNAME=$ac_cv_path_UNAME
10588if test -n "$UNAME"; then
10589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10590$as_echo "$UNAME" >&6; }
10591else
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594fi
10595
10596
10597        if test "x$UNAME" = x; then
10598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10599        fi
10600      else
10601        # Otherwise we believe it is a complete path. Use it as it is.
10602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10603$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10605$as_echo_n "checking for UNAME... " >&6; }
10606        if test ! -x "$tool_specified"; then
10607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10608$as_echo "not found" >&6; }
10609          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10610        fi
10611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10612$as_echo "$tool_specified" >&6; }
10613      fi
10614    fi
10615  fi
10616
10617
10618
10619  if test "x$UNAME" = x; then
10620    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10621  fi
10622
10623
10624
10625
10626
10627  # Publish this variable in the help.
10628
10629
10630  if test "x$UNIQ" = x; then
10631    # The variable is not set by user, try to locate tool using the code snippet
10632    for ac_prog in uniq
10633do
10634  # Extract the first word of "$ac_prog", so it can be a program name with args.
10635set dummy $ac_prog; ac_word=$2
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10637$as_echo_n "checking for $ac_word... " >&6; }
10638if ${ac_cv_path_UNIQ+:} false; then :
10639  $as_echo_n "(cached) " >&6
10640else
10641  case $UNIQ in
10642  [\\/]* | ?:[\\/]*)
10643  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10644  ;;
10645  *)
10646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10647for as_dir in $PATH
10648do
10649  IFS=$as_save_IFS
10650  test -z "$as_dir" && as_dir=.
10651    for ac_exec_ext in '' $ac_executable_extensions; do
10652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10653    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10655    break 2
10656  fi
10657done
10658  done
10659IFS=$as_save_IFS
10660
10661  ;;
10662esac
10663fi
10664UNIQ=$ac_cv_path_UNIQ
10665if test -n "$UNIQ"; then
10666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10667$as_echo "$UNIQ" >&6; }
10668else
10669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
10671fi
10672
10673
10674  test -n "$UNIQ" && break
10675done
10676
10677  else
10678    # The variable is set, but is it from the command line or the environment?
10679
10680    # Try to remove the string !UNIQ! from our list.
10681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10683      # If it failed, the variable was not from the command line. Ignore it,
10684      # but warn the user (except for BASH, which is always set by the calling BASH).
10685      if test "xUNIQ" != xBASH; then
10686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10687$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10688      fi
10689      # Try to locate tool using the code snippet
10690      for ac_prog in uniq
10691do
10692  # Extract the first word of "$ac_prog", so it can be a program name with args.
10693set dummy $ac_prog; ac_word=$2
10694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10695$as_echo_n "checking for $ac_word... " >&6; }
10696if ${ac_cv_path_UNIQ+:} false; then :
10697  $as_echo_n "(cached) " >&6
10698else
10699  case $UNIQ in
10700  [\\/]* | ?:[\\/]*)
10701  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10702  ;;
10703  *)
10704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10705for as_dir in $PATH
10706do
10707  IFS=$as_save_IFS
10708  test -z "$as_dir" && as_dir=.
10709    for ac_exec_ext in '' $ac_executable_extensions; do
10710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10711    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10713    break 2
10714  fi
10715done
10716  done
10717IFS=$as_save_IFS
10718
10719  ;;
10720esac
10721fi
10722UNIQ=$ac_cv_path_UNIQ
10723if test -n "$UNIQ"; then
10724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10725$as_echo "$UNIQ" >&6; }
10726else
10727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10728$as_echo "no" >&6; }
10729fi
10730
10731
10732  test -n "$UNIQ" && break
10733done
10734
10735    else
10736      # If it succeeded, then it was overridden by the user. We will use it
10737      # for the tool.
10738
10739      # First remove it from the list of overridden variables, so we can test
10740      # for unknown variables in the end.
10741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10742
10743      # Check if the provided tool contains a complete path.
10744      tool_specified="$UNIQ"
10745      tool_basename="${tool_specified##*/}"
10746      if test "x$tool_basename" = "x$tool_specified"; then
10747        # A command without a complete path is provided, search $PATH.
10748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10749$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10750        # Extract the first word of "$tool_basename", so it can be a program name with args.
10751set dummy $tool_basename; ac_word=$2
10752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10753$as_echo_n "checking for $ac_word... " >&6; }
10754if ${ac_cv_path_UNIQ+:} false; then :
10755  $as_echo_n "(cached) " >&6
10756else
10757  case $UNIQ in
10758  [\\/]* | ?:[\\/]*)
10759  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10760  ;;
10761  *)
10762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10763for as_dir in $PATH
10764do
10765  IFS=$as_save_IFS
10766  test -z "$as_dir" && as_dir=.
10767    for ac_exec_ext in '' $ac_executable_extensions; do
10768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10769    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10771    break 2
10772  fi
10773done
10774  done
10775IFS=$as_save_IFS
10776
10777  ;;
10778esac
10779fi
10780UNIQ=$ac_cv_path_UNIQ
10781if test -n "$UNIQ"; then
10782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10783$as_echo "$UNIQ" >&6; }
10784else
10785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10786$as_echo "no" >&6; }
10787fi
10788
10789
10790        if test "x$UNIQ" = x; then
10791          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10792        fi
10793      else
10794        # Otherwise we believe it is a complete path. Use it as it is.
10795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10796$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10798$as_echo_n "checking for UNIQ... " >&6; }
10799        if test ! -x "$tool_specified"; then
10800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10801$as_echo "not found" >&6; }
10802          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10803        fi
10804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10805$as_echo "$tool_specified" >&6; }
10806      fi
10807    fi
10808  fi
10809
10810
10811
10812  if test "x$UNIQ" = x; then
10813    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10814  fi
10815
10816
10817
10818
10819
10820  # Publish this variable in the help.
10821
10822
10823  if test "x$WC" = x; then
10824    # The variable is not set by user, try to locate tool using the code snippet
10825    for ac_prog in wc
10826do
10827  # Extract the first word of "$ac_prog", so it can be a program name with args.
10828set dummy $ac_prog; ac_word=$2
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10830$as_echo_n "checking for $ac_word... " >&6; }
10831if ${ac_cv_path_WC+:} false; then :
10832  $as_echo_n "(cached) " >&6
10833else
10834  case $WC in
10835  [\\/]* | ?:[\\/]*)
10836  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10837  ;;
10838  *)
10839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10840for as_dir in $PATH
10841do
10842  IFS=$as_save_IFS
10843  test -z "$as_dir" && as_dir=.
10844    for ac_exec_ext in '' $ac_executable_extensions; do
10845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10846    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10848    break 2
10849  fi
10850done
10851  done
10852IFS=$as_save_IFS
10853
10854  ;;
10855esac
10856fi
10857WC=$ac_cv_path_WC
10858if test -n "$WC"; then
10859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10860$as_echo "$WC" >&6; }
10861else
10862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10863$as_echo "no" >&6; }
10864fi
10865
10866
10867  test -n "$WC" && break
10868done
10869
10870  else
10871    # The variable is set, but is it from the command line or the environment?
10872
10873    # Try to remove the string !WC! from our list.
10874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10876      # If it failed, the variable was not from the command line. Ignore it,
10877      # but warn the user (except for BASH, which is always set by the calling BASH).
10878      if test "xWC" != xBASH; then
10879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10880$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10881      fi
10882      # Try to locate tool using the code snippet
10883      for ac_prog in wc
10884do
10885  # Extract the first word of "$ac_prog", so it can be a program name with args.
10886set dummy $ac_prog; ac_word=$2
10887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10888$as_echo_n "checking for $ac_word... " >&6; }
10889if ${ac_cv_path_WC+:} false; then :
10890  $as_echo_n "(cached) " >&6
10891else
10892  case $WC in
10893  [\\/]* | ?:[\\/]*)
10894  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10895  ;;
10896  *)
10897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10898for as_dir in $PATH
10899do
10900  IFS=$as_save_IFS
10901  test -z "$as_dir" && as_dir=.
10902    for ac_exec_ext in '' $ac_executable_extensions; do
10903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10904    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10906    break 2
10907  fi
10908done
10909  done
10910IFS=$as_save_IFS
10911
10912  ;;
10913esac
10914fi
10915WC=$ac_cv_path_WC
10916if test -n "$WC"; then
10917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10918$as_echo "$WC" >&6; }
10919else
10920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
10922fi
10923
10924
10925  test -n "$WC" && break
10926done
10927
10928    else
10929      # If it succeeded, then it was overridden by the user. We will use it
10930      # for the tool.
10931
10932      # First remove it from the list of overridden variables, so we can test
10933      # for unknown variables in the end.
10934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10935
10936      # Check if the provided tool contains a complete path.
10937      tool_specified="$WC"
10938      tool_basename="${tool_specified##*/}"
10939      if test "x$tool_basename" = "x$tool_specified"; then
10940        # A command without a complete path is provided, search $PATH.
10941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10942$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10943        # Extract the first word of "$tool_basename", so it can be a program name with args.
10944set dummy $tool_basename; ac_word=$2
10945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10946$as_echo_n "checking for $ac_word... " >&6; }
10947if ${ac_cv_path_WC+:} false; then :
10948  $as_echo_n "(cached) " >&6
10949else
10950  case $WC in
10951  [\\/]* | ?:[\\/]*)
10952  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10953  ;;
10954  *)
10955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10956for as_dir in $PATH
10957do
10958  IFS=$as_save_IFS
10959  test -z "$as_dir" && as_dir=.
10960    for ac_exec_ext in '' $ac_executable_extensions; do
10961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10962    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10964    break 2
10965  fi
10966done
10967  done
10968IFS=$as_save_IFS
10969
10970  ;;
10971esac
10972fi
10973WC=$ac_cv_path_WC
10974if test -n "$WC"; then
10975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10976$as_echo "$WC" >&6; }
10977else
10978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
10980fi
10981
10982
10983        if test "x$WC" = x; then
10984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10985        fi
10986      else
10987        # Otherwise we believe it is a complete path. Use it as it is.
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10989$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10991$as_echo_n "checking for WC... " >&6; }
10992        if test ! -x "$tool_specified"; then
10993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10994$as_echo "not found" >&6; }
10995          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10996        fi
10997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10998$as_echo "$tool_specified" >&6; }
10999      fi
11000    fi
11001  fi
11002
11003
11004
11005  if test "x$WC" = x; then
11006    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11007  fi
11008
11009
11010
11011
11012
11013  # Publish this variable in the help.
11014
11015
11016  if test "x$WHICH" = x; then
11017    # The variable is not set by user, try to locate tool using the code snippet
11018    for ac_prog in which
11019do
11020  # Extract the first word of "$ac_prog", so it can be a program name with args.
11021set dummy $ac_prog; ac_word=$2
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11023$as_echo_n "checking for $ac_word... " >&6; }
11024if ${ac_cv_path_WHICH+:} false; then :
11025  $as_echo_n "(cached) " >&6
11026else
11027  case $WHICH in
11028  [\\/]* | ?:[\\/]*)
11029  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11030  ;;
11031  *)
11032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11033for as_dir in $PATH
11034do
11035  IFS=$as_save_IFS
11036  test -z "$as_dir" && as_dir=.
11037    for ac_exec_ext in '' $ac_executable_extensions; do
11038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11039    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11041    break 2
11042  fi
11043done
11044  done
11045IFS=$as_save_IFS
11046
11047  ;;
11048esac
11049fi
11050WHICH=$ac_cv_path_WHICH
11051if test -n "$WHICH"; then
11052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11053$as_echo "$WHICH" >&6; }
11054else
11055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11056$as_echo "no" >&6; }
11057fi
11058
11059
11060  test -n "$WHICH" && break
11061done
11062
11063  else
11064    # The variable is set, but is it from the command line or the environment?
11065
11066    # Try to remove the string !WHICH! from our list.
11067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11069      # If it failed, the variable was not from the command line. Ignore it,
11070      # but warn the user (except for BASH, which is always set by the calling BASH).
11071      if test "xWHICH" != xBASH; then
11072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11073$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11074      fi
11075      # Try to locate tool using the code snippet
11076      for ac_prog in which
11077do
11078  # Extract the first word of "$ac_prog", so it can be a program name with args.
11079set dummy $ac_prog; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_WHICH+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $WHICH in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108WHICH=$ac_cv_path_WHICH
11109if test -n "$WHICH"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11111$as_echo "$WHICH" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118  test -n "$WHICH" && break
11119done
11120
11121    else
11122      # If it succeeded, then it was overridden by the user. We will use it
11123      # for the tool.
11124
11125      # First remove it from the list of overridden variables, so we can test
11126      # for unknown variables in the end.
11127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11128
11129      # Check if the provided tool contains a complete path.
11130      tool_specified="$WHICH"
11131      tool_basename="${tool_specified##*/}"
11132      if test "x$tool_basename" = "x$tool_specified"; then
11133        # A command without a complete path is provided, search $PATH.
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11135$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11136        # Extract the first word of "$tool_basename", so it can be a program name with args.
11137set dummy $tool_basename; ac_word=$2
11138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11139$as_echo_n "checking for $ac_word... " >&6; }
11140if ${ac_cv_path_WHICH+:} false; then :
11141  $as_echo_n "(cached) " >&6
11142else
11143  case $WHICH in
11144  [\\/]* | ?:[\\/]*)
11145  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11146  ;;
11147  *)
11148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11149for as_dir in $PATH
11150do
11151  IFS=$as_save_IFS
11152  test -z "$as_dir" && as_dir=.
11153    for ac_exec_ext in '' $ac_executable_extensions; do
11154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11155    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11157    break 2
11158  fi
11159done
11160  done
11161IFS=$as_save_IFS
11162
11163  ;;
11164esac
11165fi
11166WHICH=$ac_cv_path_WHICH
11167if test -n "$WHICH"; then
11168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11169$as_echo "$WHICH" >&6; }
11170else
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172$as_echo "no" >&6; }
11173fi
11174
11175
11176        if test "x$WHICH" = x; then
11177          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11178        fi
11179      else
11180        # Otherwise we believe it is a complete path. Use it as it is.
11181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11182$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11184$as_echo_n "checking for WHICH... " >&6; }
11185        if test ! -x "$tool_specified"; then
11186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11187$as_echo "not found" >&6; }
11188          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11189        fi
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11191$as_echo "$tool_specified" >&6; }
11192      fi
11193    fi
11194  fi
11195
11196
11197
11198  if test "x$WHICH" = x; then
11199    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11200  fi
11201
11202
11203
11204
11205
11206  # Publish this variable in the help.
11207
11208
11209  if test "x$XARGS" = x; then
11210    # The variable is not set by user, try to locate tool using the code snippet
11211    for ac_prog in xargs
11212do
11213  # Extract the first word of "$ac_prog", so it can be a program name with args.
11214set dummy $ac_prog; ac_word=$2
11215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11216$as_echo_n "checking for $ac_word... " >&6; }
11217if ${ac_cv_path_XARGS+:} false; then :
11218  $as_echo_n "(cached) " >&6
11219else
11220  case $XARGS in
11221  [\\/]* | ?:[\\/]*)
11222  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11223  ;;
11224  *)
11225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11226for as_dir in $PATH
11227do
11228  IFS=$as_save_IFS
11229  test -z "$as_dir" && as_dir=.
11230    for ac_exec_ext in '' $ac_executable_extensions; do
11231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11232    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11234    break 2
11235  fi
11236done
11237  done
11238IFS=$as_save_IFS
11239
11240  ;;
11241esac
11242fi
11243XARGS=$ac_cv_path_XARGS
11244if test -n "$XARGS"; then
11245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11246$as_echo "$XARGS" >&6; }
11247else
11248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11249$as_echo "no" >&6; }
11250fi
11251
11252
11253  test -n "$XARGS" && break
11254done
11255
11256  else
11257    # The variable is set, but is it from the command line or the environment?
11258
11259    # Try to remove the string !XARGS! from our list.
11260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11262      # If it failed, the variable was not from the command line. Ignore it,
11263      # but warn the user (except for BASH, which is always set by the calling BASH).
11264      if test "xXARGS" != xBASH; then
11265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11266$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11267      fi
11268      # Try to locate tool using the code snippet
11269      for ac_prog in xargs
11270do
11271  # Extract the first word of "$ac_prog", so it can be a program name with args.
11272set dummy $ac_prog; ac_word=$2
11273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11274$as_echo_n "checking for $ac_word... " >&6; }
11275if ${ac_cv_path_XARGS+:} false; then :
11276  $as_echo_n "(cached) " >&6
11277else
11278  case $XARGS in
11279  [\\/]* | ?:[\\/]*)
11280  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11281  ;;
11282  *)
11283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11284for as_dir in $PATH
11285do
11286  IFS=$as_save_IFS
11287  test -z "$as_dir" && as_dir=.
11288    for ac_exec_ext in '' $ac_executable_extensions; do
11289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11290    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11292    break 2
11293  fi
11294done
11295  done
11296IFS=$as_save_IFS
11297
11298  ;;
11299esac
11300fi
11301XARGS=$ac_cv_path_XARGS
11302if test -n "$XARGS"; then
11303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11304$as_echo "$XARGS" >&6; }
11305else
11306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
11308fi
11309
11310
11311  test -n "$XARGS" && break
11312done
11313
11314    else
11315      # If it succeeded, then it was overridden by the user. We will use it
11316      # for the tool.
11317
11318      # First remove it from the list of overridden variables, so we can test
11319      # for unknown variables in the end.
11320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11321
11322      # Check if the provided tool contains a complete path.
11323      tool_specified="$XARGS"
11324      tool_basename="${tool_specified##*/}"
11325      if test "x$tool_basename" = "x$tool_specified"; then
11326        # A command without a complete path is provided, search $PATH.
11327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11328$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11329        # Extract the first word of "$tool_basename", so it can be a program name with args.
11330set dummy $tool_basename; ac_word=$2
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11332$as_echo_n "checking for $ac_word... " >&6; }
11333if ${ac_cv_path_XARGS+:} false; then :
11334  $as_echo_n "(cached) " >&6
11335else
11336  case $XARGS in
11337  [\\/]* | ?:[\\/]*)
11338  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11339  ;;
11340  *)
11341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342for as_dir in $PATH
11343do
11344  IFS=$as_save_IFS
11345  test -z "$as_dir" && as_dir=.
11346    for ac_exec_ext in '' $ac_executable_extensions; do
11347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350    break 2
11351  fi
11352done
11353  done
11354IFS=$as_save_IFS
11355
11356  ;;
11357esac
11358fi
11359XARGS=$ac_cv_path_XARGS
11360if test -n "$XARGS"; then
11361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11362$as_echo "$XARGS" >&6; }
11363else
11364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
11366fi
11367
11368
11369        if test "x$XARGS" = x; then
11370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11371        fi
11372      else
11373        # Otherwise we believe it is a complete path. Use it as it is.
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11375$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11377$as_echo_n "checking for XARGS... " >&6; }
11378        if test ! -x "$tool_specified"; then
11379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11380$as_echo "not found" >&6; }
11381          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11382        fi
11383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11384$as_echo "$tool_specified" >&6; }
11385      fi
11386    fi
11387  fi
11388
11389
11390
11391  if test "x$XARGS" = x; then
11392    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11393  fi
11394
11395
11396
11397  # Then required tools that require some special treatment.
11398
11399
11400  # Publish this variable in the help.
11401
11402
11403  if test "x$AWK" = x; then
11404    # The variable is not set by user, try to locate tool using the code snippet
11405    for ac_prog in gawk mawk nawk awk
11406do
11407  # Extract the first word of "$ac_prog", so it can be a program name with args.
11408set dummy $ac_prog; ac_word=$2
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11410$as_echo_n "checking for $ac_word... " >&6; }
11411if ${ac_cv_prog_AWK+:} false; then :
11412  $as_echo_n "(cached) " >&6
11413else
11414  if test -n "$AWK"; then
11415  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11416else
11417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11418for as_dir in $PATH
11419do
11420  IFS=$as_save_IFS
11421  test -z "$as_dir" && as_dir=.
11422    for ac_exec_ext in '' $ac_executable_extensions; do
11423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11424    ac_cv_prog_AWK="$ac_prog"
11425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11426    break 2
11427  fi
11428done
11429  done
11430IFS=$as_save_IFS
11431
11432fi
11433fi
11434AWK=$ac_cv_prog_AWK
11435if test -n "$AWK"; then
11436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11437$as_echo "$AWK" >&6; }
11438else
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440$as_echo "no" >&6; }
11441fi
11442
11443
11444  test -n "$AWK" && break
11445done
11446
11447  else
11448    # The variable is set, but is it from the command line or the environment?
11449
11450    # Try to remove the string !AWK! from our list.
11451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11453      # If it failed, the variable was not from the command line. Ignore it,
11454      # but warn the user (except for BASH, which is always set by the calling BASH).
11455      if test "xAWK" != xBASH; then
11456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11457$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11458      fi
11459      # Try to locate tool using the code snippet
11460      for ac_prog in gawk mawk nawk awk
11461do
11462  # Extract the first word of "$ac_prog", so it can be a program name with args.
11463set dummy $ac_prog; ac_word=$2
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11465$as_echo_n "checking for $ac_word... " >&6; }
11466if ${ac_cv_prog_AWK+:} false; then :
11467  $as_echo_n "(cached) " >&6
11468else
11469  if test -n "$AWK"; then
11470  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11471else
11472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11473for as_dir in $PATH
11474do
11475  IFS=$as_save_IFS
11476  test -z "$as_dir" && as_dir=.
11477    for ac_exec_ext in '' $ac_executable_extensions; do
11478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11479    ac_cv_prog_AWK="$ac_prog"
11480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11481    break 2
11482  fi
11483done
11484  done
11485IFS=$as_save_IFS
11486
11487fi
11488fi
11489AWK=$ac_cv_prog_AWK
11490if test -n "$AWK"; then
11491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11492$as_echo "$AWK" >&6; }
11493else
11494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11495$as_echo "no" >&6; }
11496fi
11497
11498
11499  test -n "$AWK" && break
11500done
11501
11502    else
11503      # If it succeeded, then it was overridden by the user. We will use it
11504      # for the tool.
11505
11506      # First remove it from the list of overridden variables, so we can test
11507      # for unknown variables in the end.
11508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11509
11510      # Check if the provided tool contains a complete path.
11511      tool_specified="$AWK"
11512      tool_basename="${tool_specified##*/}"
11513      if test "x$tool_basename" = "x$tool_specified"; then
11514        # A command without a complete path is provided, search $PATH.
11515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11516$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11517        # Extract the first word of "$tool_basename", so it can be a program name with args.
11518set dummy $tool_basename; ac_word=$2
11519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11520$as_echo_n "checking for $ac_word... " >&6; }
11521if ${ac_cv_path_AWK+:} false; then :
11522  $as_echo_n "(cached) " >&6
11523else
11524  case $AWK in
11525  [\\/]* | ?:[\\/]*)
11526  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11527  ;;
11528  *)
11529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11530for as_dir in $PATH
11531do
11532  IFS=$as_save_IFS
11533  test -z "$as_dir" && as_dir=.
11534    for ac_exec_ext in '' $ac_executable_extensions; do
11535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11536    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11538    break 2
11539  fi
11540done
11541  done
11542IFS=$as_save_IFS
11543
11544  ;;
11545esac
11546fi
11547AWK=$ac_cv_path_AWK
11548if test -n "$AWK"; then
11549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11550$as_echo "$AWK" >&6; }
11551else
11552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
11554fi
11555
11556
11557        if test "x$AWK" = x; then
11558          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11559        fi
11560      else
11561        # Otherwise we believe it is a complete path. Use it as it is.
11562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11563$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11565$as_echo_n "checking for AWK... " >&6; }
11566        if test ! -x "$tool_specified"; then
11567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11568$as_echo "not found" >&6; }
11569          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11570        fi
11571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11572$as_echo "$tool_specified" >&6; }
11573      fi
11574    fi
11575  fi
11576
11577
11578  if test "x$AWK" = x; then
11579    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11580  fi
11581
11582
11583
11584
11585  # Publish this variable in the help.
11586
11587
11588  if test "x$GREP" = x; then
11589    # The variable is not set by user, try to locate tool using the code snippet
11590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11591$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11592if ${ac_cv_path_GREP+:} false; then :
11593  $as_echo_n "(cached) " >&6
11594else
11595  if test -z "$GREP"; then
11596  ac_path_GREP_found=false
11597  # Loop through the user's path and test for each of PROGNAME-LIST
11598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11599for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11600do
11601  IFS=$as_save_IFS
11602  test -z "$as_dir" && as_dir=.
11603    for ac_prog in grep ggrep; do
11604    for ac_exec_ext in '' $ac_executable_extensions; do
11605      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11606      as_fn_executable_p "$ac_path_GREP" || continue
11607# Check for GNU ac_path_GREP and select it if it is found.
11608  # Check for GNU $ac_path_GREP
11609case `"$ac_path_GREP" --version 2>&1` in
11610*GNU*)
11611  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11612*)
11613  ac_count=0
11614  $as_echo_n 0123456789 >"conftest.in"
11615  while :
11616  do
11617    cat "conftest.in" "conftest.in" >"conftest.tmp"
11618    mv "conftest.tmp" "conftest.in"
11619    cp "conftest.in" "conftest.nl"
11620    $as_echo 'GREP' >> "conftest.nl"
11621    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11622    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11623    as_fn_arith $ac_count + 1 && ac_count=$as_val
11624    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11625      # Best one so far, save it but keep looking for a better one
11626      ac_cv_path_GREP="$ac_path_GREP"
11627      ac_path_GREP_max=$ac_count
11628    fi
11629    # 10*(2^10) chars as input seems more than enough
11630    test $ac_count -gt 10 && break
11631  done
11632  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11633esac
11634
11635      $ac_path_GREP_found && break 3
11636    done
11637  done
11638  done
11639IFS=$as_save_IFS
11640  if test -z "$ac_cv_path_GREP"; then
11641    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11642  fi
11643else
11644  ac_cv_path_GREP=$GREP
11645fi
11646
11647fi
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11649$as_echo "$ac_cv_path_GREP" >&6; }
11650 GREP="$ac_cv_path_GREP"
11651
11652
11653  else
11654    # The variable is set, but is it from the command line or the environment?
11655
11656    # Try to remove the string !GREP! from our list.
11657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11659      # If it failed, the variable was not from the command line. Ignore it,
11660      # but warn the user (except for BASH, which is always set by the calling BASH).
11661      if test "xGREP" != xBASH; then
11662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11663$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11664      fi
11665      # Try to locate tool using the code snippet
11666      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11667$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11668if ${ac_cv_path_GREP+:} false; then :
11669  $as_echo_n "(cached) " >&6
11670else
11671  if test -z "$GREP"; then
11672  ac_path_GREP_found=false
11673  # Loop through the user's path and test for each of PROGNAME-LIST
11674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11675for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11676do
11677  IFS=$as_save_IFS
11678  test -z "$as_dir" && as_dir=.
11679    for ac_prog in grep ggrep; do
11680    for ac_exec_ext in '' $ac_executable_extensions; do
11681      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11682      as_fn_executable_p "$ac_path_GREP" || continue
11683# Check for GNU ac_path_GREP and select it if it is found.
11684  # Check for GNU $ac_path_GREP
11685case `"$ac_path_GREP" --version 2>&1` in
11686*GNU*)
11687  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11688*)
11689  ac_count=0
11690  $as_echo_n 0123456789 >"conftest.in"
11691  while :
11692  do
11693    cat "conftest.in" "conftest.in" >"conftest.tmp"
11694    mv "conftest.tmp" "conftest.in"
11695    cp "conftest.in" "conftest.nl"
11696    $as_echo 'GREP' >> "conftest.nl"
11697    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11698    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11699    as_fn_arith $ac_count + 1 && ac_count=$as_val
11700    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11701      # Best one so far, save it but keep looking for a better one
11702      ac_cv_path_GREP="$ac_path_GREP"
11703      ac_path_GREP_max=$ac_count
11704    fi
11705    # 10*(2^10) chars as input seems more than enough
11706    test $ac_count -gt 10 && break
11707  done
11708  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11709esac
11710
11711      $ac_path_GREP_found && break 3
11712    done
11713  done
11714  done
11715IFS=$as_save_IFS
11716  if test -z "$ac_cv_path_GREP"; then
11717    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11718  fi
11719else
11720  ac_cv_path_GREP=$GREP
11721fi
11722
11723fi
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11725$as_echo "$ac_cv_path_GREP" >&6; }
11726 GREP="$ac_cv_path_GREP"
11727
11728
11729    else
11730      # If it succeeded, then it was overridden by the user. We will use it
11731      # for the tool.
11732
11733      # First remove it from the list of overridden variables, so we can test
11734      # for unknown variables in the end.
11735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11736
11737      # Check if the provided tool contains a complete path.
11738      tool_specified="$GREP"
11739      tool_basename="${tool_specified##*/}"
11740      if test "x$tool_basename" = "x$tool_specified"; then
11741        # A command without a complete path is provided, search $PATH.
11742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11743$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11744        # Extract the first word of "$tool_basename", so it can be a program name with args.
11745set dummy $tool_basename; ac_word=$2
11746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11747$as_echo_n "checking for $ac_word... " >&6; }
11748if ${ac_cv_path_GREP+:} false; then :
11749  $as_echo_n "(cached) " >&6
11750else
11751  case $GREP in
11752  [\\/]* | ?:[\\/]*)
11753  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11754  ;;
11755  *)
11756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11757for as_dir in $PATH
11758do
11759  IFS=$as_save_IFS
11760  test -z "$as_dir" && as_dir=.
11761    for ac_exec_ext in '' $ac_executable_extensions; do
11762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11763    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11765    break 2
11766  fi
11767done
11768  done
11769IFS=$as_save_IFS
11770
11771  ;;
11772esac
11773fi
11774GREP=$ac_cv_path_GREP
11775if test -n "$GREP"; then
11776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11777$as_echo "$GREP" >&6; }
11778else
11779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11780$as_echo "no" >&6; }
11781fi
11782
11783
11784        if test "x$GREP" = x; then
11785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11786        fi
11787      else
11788        # Otherwise we believe it is a complete path. Use it as it is.
11789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11790$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11792$as_echo_n "checking for GREP... " >&6; }
11793        if test ! -x "$tool_specified"; then
11794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11795$as_echo "not found" >&6; }
11796          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11797        fi
11798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11799$as_echo "$tool_specified" >&6; }
11800      fi
11801    fi
11802  fi
11803
11804
11805  if test "x$GREP" = x; then
11806    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11807  fi
11808
11809
11810
11811
11812  # Publish this variable in the help.
11813
11814
11815  if test "x$EGREP" = x; then
11816    # The variable is not set by user, try to locate tool using the code snippet
11817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11818$as_echo_n "checking for egrep... " >&6; }
11819if ${ac_cv_path_EGREP+:} false; then :
11820  $as_echo_n "(cached) " >&6
11821else
11822  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11823   then ac_cv_path_EGREP="$GREP -E"
11824   else
11825     if test -z "$EGREP"; then
11826  ac_path_EGREP_found=false
11827  # Loop through the user's path and test for each of PROGNAME-LIST
11828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11829for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11830do
11831  IFS=$as_save_IFS
11832  test -z "$as_dir" && as_dir=.
11833    for ac_prog in egrep; do
11834    for ac_exec_ext in '' $ac_executable_extensions; do
11835      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11836      as_fn_executable_p "$ac_path_EGREP" || continue
11837# Check for GNU ac_path_EGREP and select it if it is found.
11838  # Check for GNU $ac_path_EGREP
11839case `"$ac_path_EGREP" --version 2>&1` in
11840*GNU*)
11841  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11842*)
11843  ac_count=0
11844  $as_echo_n 0123456789 >"conftest.in"
11845  while :
11846  do
11847    cat "conftest.in" "conftest.in" >"conftest.tmp"
11848    mv "conftest.tmp" "conftest.in"
11849    cp "conftest.in" "conftest.nl"
11850    $as_echo 'EGREP' >> "conftest.nl"
11851    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11852    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11853    as_fn_arith $ac_count + 1 && ac_count=$as_val
11854    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11855      # Best one so far, save it but keep looking for a better one
11856      ac_cv_path_EGREP="$ac_path_EGREP"
11857      ac_path_EGREP_max=$ac_count
11858    fi
11859    # 10*(2^10) chars as input seems more than enough
11860    test $ac_count -gt 10 && break
11861  done
11862  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11863esac
11864
11865      $ac_path_EGREP_found && break 3
11866    done
11867  done
11868  done
11869IFS=$as_save_IFS
11870  if test -z "$ac_cv_path_EGREP"; then
11871    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11872  fi
11873else
11874  ac_cv_path_EGREP=$EGREP
11875fi
11876
11877   fi
11878fi
11879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11880$as_echo "$ac_cv_path_EGREP" >&6; }
11881 EGREP="$ac_cv_path_EGREP"
11882
11883
11884  else
11885    # The variable is set, but is it from the command line or the environment?
11886
11887    # Try to remove the string !EGREP! from our list.
11888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11890      # If it failed, the variable was not from the command line. Ignore it,
11891      # but warn the user (except for BASH, which is always set by the calling BASH).
11892      if test "xEGREP" != xBASH; then
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11894$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11895      fi
11896      # Try to locate tool using the code snippet
11897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11898$as_echo_n "checking for egrep... " >&6; }
11899if ${ac_cv_path_EGREP+:} false; then :
11900  $as_echo_n "(cached) " >&6
11901else
11902  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11903   then ac_cv_path_EGREP="$GREP -E"
11904   else
11905     if test -z "$EGREP"; then
11906  ac_path_EGREP_found=false
11907  # Loop through the user's path and test for each of PROGNAME-LIST
11908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11910do
11911  IFS=$as_save_IFS
11912  test -z "$as_dir" && as_dir=.
11913    for ac_prog in egrep; do
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11916      as_fn_executable_p "$ac_path_EGREP" || continue
11917# Check for GNU ac_path_EGREP and select it if it is found.
11918  # Check for GNU $ac_path_EGREP
11919case `"$ac_path_EGREP" --version 2>&1` in
11920*GNU*)
11921  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11922*)
11923  ac_count=0
11924  $as_echo_n 0123456789 >"conftest.in"
11925  while :
11926  do
11927    cat "conftest.in" "conftest.in" >"conftest.tmp"
11928    mv "conftest.tmp" "conftest.in"
11929    cp "conftest.in" "conftest.nl"
11930    $as_echo 'EGREP' >> "conftest.nl"
11931    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11932    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11933    as_fn_arith $ac_count + 1 && ac_count=$as_val
11934    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11935      # Best one so far, save it but keep looking for a better one
11936      ac_cv_path_EGREP="$ac_path_EGREP"
11937      ac_path_EGREP_max=$ac_count
11938    fi
11939    # 10*(2^10) chars as input seems more than enough
11940    test $ac_count -gt 10 && break
11941  done
11942  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11943esac
11944
11945      $ac_path_EGREP_found && break 3
11946    done
11947  done
11948  done
11949IFS=$as_save_IFS
11950  if test -z "$ac_cv_path_EGREP"; then
11951    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11952  fi
11953else
11954  ac_cv_path_EGREP=$EGREP
11955fi
11956
11957   fi
11958fi
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11960$as_echo "$ac_cv_path_EGREP" >&6; }
11961 EGREP="$ac_cv_path_EGREP"
11962
11963
11964    else
11965      # If it succeeded, then it was overridden by the user. We will use it
11966      # for the tool.
11967
11968      # First remove it from the list of overridden variables, so we can test
11969      # for unknown variables in the end.
11970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11971
11972      # Check if the provided tool contains a complete path.
11973      tool_specified="$EGREP"
11974      tool_basename="${tool_specified##*/}"
11975      if test "x$tool_basename" = "x$tool_specified"; then
11976        # A command without a complete path is provided, search $PATH.
11977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11978$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11979        # Extract the first word of "$tool_basename", so it can be a program name with args.
11980set dummy $tool_basename; ac_word=$2
11981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11982$as_echo_n "checking for $ac_word... " >&6; }
11983if ${ac_cv_path_EGREP+:} false; then :
11984  $as_echo_n "(cached) " >&6
11985else
11986  case $EGREP in
11987  [\\/]* | ?:[\\/]*)
11988  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11989  ;;
11990  *)
11991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11992for as_dir in $PATH
11993do
11994  IFS=$as_save_IFS
11995  test -z "$as_dir" && as_dir=.
11996    for ac_exec_ext in '' $ac_executable_extensions; do
11997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11998    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12000    break 2
12001  fi
12002done
12003  done
12004IFS=$as_save_IFS
12005
12006  ;;
12007esac
12008fi
12009EGREP=$ac_cv_path_EGREP
12010if test -n "$EGREP"; then
12011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12012$as_echo "$EGREP" >&6; }
12013else
12014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015$as_echo "no" >&6; }
12016fi
12017
12018
12019        if test "x$EGREP" = x; then
12020          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12021        fi
12022      else
12023        # Otherwise we believe it is a complete path. Use it as it is.
12024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12025$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12027$as_echo_n "checking for EGREP... " >&6; }
12028        if test ! -x "$tool_specified"; then
12029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12030$as_echo "not found" >&6; }
12031          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12032        fi
12033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12034$as_echo "$tool_specified" >&6; }
12035      fi
12036    fi
12037  fi
12038
12039
12040  if test "x$EGREP" = x; then
12041    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12042  fi
12043
12044
12045
12046
12047  # Publish this variable in the help.
12048
12049
12050  if test "x$FGREP" = x; then
12051    # The variable is not set by user, try to locate tool using the code snippet
12052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12053$as_echo_n "checking for fgrep... " >&6; }
12054if ${ac_cv_path_FGREP+:} false; then :
12055  $as_echo_n "(cached) " >&6
12056else
12057  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12058   then ac_cv_path_FGREP="$GREP -F"
12059   else
12060     if test -z "$FGREP"; then
12061  ac_path_FGREP_found=false
12062  # Loop through the user's path and test for each of PROGNAME-LIST
12063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12064for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12065do
12066  IFS=$as_save_IFS
12067  test -z "$as_dir" && as_dir=.
12068    for ac_prog in fgrep; do
12069    for ac_exec_ext in '' $ac_executable_extensions; do
12070      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12071      as_fn_executable_p "$ac_path_FGREP" || continue
12072# Check for GNU ac_path_FGREP and select it if it is found.
12073  # Check for GNU $ac_path_FGREP
12074case `"$ac_path_FGREP" --version 2>&1` in
12075*GNU*)
12076  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12077*)
12078  ac_count=0
12079  $as_echo_n 0123456789 >"conftest.in"
12080  while :
12081  do
12082    cat "conftest.in" "conftest.in" >"conftest.tmp"
12083    mv "conftest.tmp" "conftest.in"
12084    cp "conftest.in" "conftest.nl"
12085    $as_echo 'FGREP' >> "conftest.nl"
12086    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12087    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12088    as_fn_arith $ac_count + 1 && ac_count=$as_val
12089    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12090      # Best one so far, save it but keep looking for a better one
12091      ac_cv_path_FGREP="$ac_path_FGREP"
12092      ac_path_FGREP_max=$ac_count
12093    fi
12094    # 10*(2^10) chars as input seems more than enough
12095    test $ac_count -gt 10 && break
12096  done
12097  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12098esac
12099
12100      $ac_path_FGREP_found && break 3
12101    done
12102  done
12103  done
12104IFS=$as_save_IFS
12105  if test -z "$ac_cv_path_FGREP"; then
12106    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12107  fi
12108else
12109  ac_cv_path_FGREP=$FGREP
12110fi
12111
12112   fi
12113fi
12114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12115$as_echo "$ac_cv_path_FGREP" >&6; }
12116 FGREP="$ac_cv_path_FGREP"
12117
12118
12119  else
12120    # The variable is set, but is it from the command line or the environment?
12121
12122    # Try to remove the string !FGREP! from our list.
12123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12125      # If it failed, the variable was not from the command line. Ignore it,
12126      # but warn the user (except for BASH, which is always set by the calling BASH).
12127      if test "xFGREP" != xBASH; then
12128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12129$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12130      fi
12131      # Try to locate tool using the code snippet
12132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12133$as_echo_n "checking for fgrep... " >&6; }
12134if ${ac_cv_path_FGREP+:} false; then :
12135  $as_echo_n "(cached) " >&6
12136else
12137  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12138   then ac_cv_path_FGREP="$GREP -F"
12139   else
12140     if test -z "$FGREP"; then
12141  ac_path_FGREP_found=false
12142  # Loop through the user's path and test for each of PROGNAME-LIST
12143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12144for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12145do
12146  IFS=$as_save_IFS
12147  test -z "$as_dir" && as_dir=.
12148    for ac_prog in fgrep; do
12149    for ac_exec_ext in '' $ac_executable_extensions; do
12150      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12151      as_fn_executable_p "$ac_path_FGREP" || continue
12152# Check for GNU ac_path_FGREP and select it if it is found.
12153  # Check for GNU $ac_path_FGREP
12154case `"$ac_path_FGREP" --version 2>&1` in
12155*GNU*)
12156  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12157*)
12158  ac_count=0
12159  $as_echo_n 0123456789 >"conftest.in"
12160  while :
12161  do
12162    cat "conftest.in" "conftest.in" >"conftest.tmp"
12163    mv "conftest.tmp" "conftest.in"
12164    cp "conftest.in" "conftest.nl"
12165    $as_echo 'FGREP' >> "conftest.nl"
12166    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12167    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12168    as_fn_arith $ac_count + 1 && ac_count=$as_val
12169    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12170      # Best one so far, save it but keep looking for a better one
12171      ac_cv_path_FGREP="$ac_path_FGREP"
12172      ac_path_FGREP_max=$ac_count
12173    fi
12174    # 10*(2^10) chars as input seems more than enough
12175    test $ac_count -gt 10 && break
12176  done
12177  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12178esac
12179
12180      $ac_path_FGREP_found && break 3
12181    done
12182  done
12183  done
12184IFS=$as_save_IFS
12185  if test -z "$ac_cv_path_FGREP"; then
12186    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12187  fi
12188else
12189  ac_cv_path_FGREP=$FGREP
12190fi
12191
12192   fi
12193fi
12194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12195$as_echo "$ac_cv_path_FGREP" >&6; }
12196 FGREP="$ac_cv_path_FGREP"
12197
12198
12199    else
12200      # If it succeeded, then it was overridden by the user. We will use it
12201      # for the tool.
12202
12203      # First remove it from the list of overridden variables, so we can test
12204      # for unknown variables in the end.
12205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12206
12207      # Check if the provided tool contains a complete path.
12208      tool_specified="$FGREP"
12209      tool_basename="${tool_specified##*/}"
12210      if test "x$tool_basename" = "x$tool_specified"; then
12211        # A command without a complete path is provided, search $PATH.
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12213$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12214        # Extract the first word of "$tool_basename", so it can be a program name with args.
12215set dummy $tool_basename; ac_word=$2
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12217$as_echo_n "checking for $ac_word... " >&6; }
12218if ${ac_cv_path_FGREP+:} false; then :
12219  $as_echo_n "(cached) " >&6
12220else
12221  case $FGREP in
12222  [\\/]* | ?:[\\/]*)
12223  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12224  ;;
12225  *)
12226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12227for as_dir in $PATH
12228do
12229  IFS=$as_save_IFS
12230  test -z "$as_dir" && as_dir=.
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12233    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12235    break 2
12236  fi
12237done
12238  done
12239IFS=$as_save_IFS
12240
12241  ;;
12242esac
12243fi
12244FGREP=$ac_cv_path_FGREP
12245if test -n "$FGREP"; then
12246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12247$as_echo "$FGREP" >&6; }
12248else
12249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12250$as_echo "no" >&6; }
12251fi
12252
12253
12254        if test "x$FGREP" = x; then
12255          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12256        fi
12257      else
12258        # Otherwise we believe it is a complete path. Use it as it is.
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12260$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12262$as_echo_n "checking for FGREP... " >&6; }
12263        if test ! -x "$tool_specified"; then
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12265$as_echo "not found" >&6; }
12266          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12267        fi
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12269$as_echo "$tool_specified" >&6; }
12270      fi
12271    fi
12272  fi
12273
12274
12275  if test "x$FGREP" = x; then
12276    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12277  fi
12278
12279
12280
12281
12282  # Publish this variable in the help.
12283
12284
12285  if test "x$SED" = x; then
12286    # The variable is not set by user, try to locate tool using the code snippet
12287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12288$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12289if ${ac_cv_path_SED+:} false; then :
12290  $as_echo_n "(cached) " >&6
12291else
12292            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12293     for ac_i in 1 2 3 4 5 6 7; do
12294       ac_script="$ac_script$as_nl$ac_script"
12295     done
12296     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12297     { ac_script=; unset ac_script;}
12298     if test -z "$SED"; then
12299  ac_path_SED_found=false
12300  # Loop through the user's path and test for each of PROGNAME-LIST
12301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12302for as_dir in $PATH
12303do
12304  IFS=$as_save_IFS
12305  test -z "$as_dir" && as_dir=.
12306    for ac_prog in sed gsed; do
12307    for ac_exec_ext in '' $ac_executable_extensions; do
12308      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12309      as_fn_executable_p "$ac_path_SED" || continue
12310# Check for GNU ac_path_SED and select it if it is found.
12311  # Check for GNU $ac_path_SED
12312case `"$ac_path_SED" --version 2>&1` in
12313*GNU*)
12314  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12315*)
12316  ac_count=0
12317  $as_echo_n 0123456789 >"conftest.in"
12318  while :
12319  do
12320    cat "conftest.in" "conftest.in" >"conftest.tmp"
12321    mv "conftest.tmp" "conftest.in"
12322    cp "conftest.in" "conftest.nl"
12323    $as_echo '' >> "conftest.nl"
12324    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12325    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12326    as_fn_arith $ac_count + 1 && ac_count=$as_val
12327    if test $ac_count -gt ${ac_path_SED_max-0}; then
12328      # Best one so far, save it but keep looking for a better one
12329      ac_cv_path_SED="$ac_path_SED"
12330      ac_path_SED_max=$ac_count
12331    fi
12332    # 10*(2^10) chars as input seems more than enough
12333    test $ac_count -gt 10 && break
12334  done
12335  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12336esac
12337
12338      $ac_path_SED_found && break 3
12339    done
12340  done
12341  done
12342IFS=$as_save_IFS
12343  if test -z "$ac_cv_path_SED"; then
12344    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12345  fi
12346else
12347  ac_cv_path_SED=$SED
12348fi
12349
12350fi
12351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12352$as_echo "$ac_cv_path_SED" >&6; }
12353 SED="$ac_cv_path_SED"
12354  rm -f conftest.sed
12355
12356  else
12357    # The variable is set, but is it from the command line or the environment?
12358
12359    # Try to remove the string !SED! from our list.
12360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12362      # If it failed, the variable was not from the command line. Ignore it,
12363      # but warn the user (except for BASH, which is always set by the calling BASH).
12364      if test "xSED" != xBASH; then
12365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12366$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12367      fi
12368      # Try to locate tool using the code snippet
12369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12370$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12371if ${ac_cv_path_SED+:} false; then :
12372  $as_echo_n "(cached) " >&6
12373else
12374            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12375     for ac_i in 1 2 3 4 5 6 7; do
12376       ac_script="$ac_script$as_nl$ac_script"
12377     done
12378     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12379     { ac_script=; unset ac_script;}
12380     if test -z "$SED"; then
12381  ac_path_SED_found=false
12382  # Loop through the user's path and test for each of PROGNAME-LIST
12383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12384for as_dir in $PATH
12385do
12386  IFS=$as_save_IFS
12387  test -z "$as_dir" && as_dir=.
12388    for ac_prog in sed gsed; do
12389    for ac_exec_ext in '' $ac_executable_extensions; do
12390      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12391      as_fn_executable_p "$ac_path_SED" || continue
12392# Check for GNU ac_path_SED and select it if it is found.
12393  # Check for GNU $ac_path_SED
12394case `"$ac_path_SED" --version 2>&1` in
12395*GNU*)
12396  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12397*)
12398  ac_count=0
12399  $as_echo_n 0123456789 >"conftest.in"
12400  while :
12401  do
12402    cat "conftest.in" "conftest.in" >"conftest.tmp"
12403    mv "conftest.tmp" "conftest.in"
12404    cp "conftest.in" "conftest.nl"
12405    $as_echo '' >> "conftest.nl"
12406    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12407    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12408    as_fn_arith $ac_count + 1 && ac_count=$as_val
12409    if test $ac_count -gt ${ac_path_SED_max-0}; then
12410      # Best one so far, save it but keep looking for a better one
12411      ac_cv_path_SED="$ac_path_SED"
12412      ac_path_SED_max=$ac_count
12413    fi
12414    # 10*(2^10) chars as input seems more than enough
12415    test $ac_count -gt 10 && break
12416  done
12417  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12418esac
12419
12420      $ac_path_SED_found && break 3
12421    done
12422  done
12423  done
12424IFS=$as_save_IFS
12425  if test -z "$ac_cv_path_SED"; then
12426    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12427  fi
12428else
12429  ac_cv_path_SED=$SED
12430fi
12431
12432fi
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12434$as_echo "$ac_cv_path_SED" >&6; }
12435 SED="$ac_cv_path_SED"
12436  rm -f conftest.sed
12437
12438    else
12439      # If it succeeded, then it was overridden by the user. We will use it
12440      # for the tool.
12441
12442      # First remove it from the list of overridden variables, so we can test
12443      # for unknown variables in the end.
12444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12445
12446      # Check if the provided tool contains a complete path.
12447      tool_specified="$SED"
12448      tool_basename="${tool_specified##*/}"
12449      if test "x$tool_basename" = "x$tool_specified"; then
12450        # A command without a complete path is provided, search $PATH.
12451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12452$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12453        # Extract the first word of "$tool_basename", so it can be a program name with args.
12454set dummy $tool_basename; ac_word=$2
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456$as_echo_n "checking for $ac_word... " >&6; }
12457if ${ac_cv_path_SED+:} false; then :
12458  $as_echo_n "(cached) " >&6
12459else
12460  case $SED in
12461  [\\/]* | ?:[\\/]*)
12462  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12463  ;;
12464  *)
12465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466for as_dir in $PATH
12467do
12468  IFS=$as_save_IFS
12469  test -z "$as_dir" && as_dir=.
12470    for ac_exec_ext in '' $ac_executable_extensions; do
12471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12472    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474    break 2
12475  fi
12476done
12477  done
12478IFS=$as_save_IFS
12479
12480  ;;
12481esac
12482fi
12483SED=$ac_cv_path_SED
12484if test -n "$SED"; then
12485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12486$as_echo "$SED" >&6; }
12487else
12488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489$as_echo "no" >&6; }
12490fi
12491
12492
12493        if test "x$SED" = x; then
12494          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12495        fi
12496      else
12497        # Otherwise we believe it is a complete path. Use it as it is.
12498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12499$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12501$as_echo_n "checking for SED... " >&6; }
12502        if test ! -x "$tool_specified"; then
12503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12504$as_echo "not found" >&6; }
12505          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12506        fi
12507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12508$as_echo "$tool_specified" >&6; }
12509      fi
12510    fi
12511  fi
12512
12513
12514  if test "x$SED" = x; then
12515    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12516  fi
12517
12518
12519
12520  # Always force rm.
12521  RM="$RM -f"
12522
12523  # pwd behaves differently on various platforms and some don't support the -L flag.
12524  # Always use the bash builtin pwd to get uniform behavior.
12525  THEPWDCMD=pwd
12526
12527  # These are not required on all platforms
12528
12529
12530  # Publish this variable in the help.
12531
12532
12533  if test "x$CYGPATH" = x; then
12534    # The variable is not set by user, try to locate tool using the code snippet
12535    for ac_prog in cygpath
12536do
12537  # Extract the first word of "$ac_prog", so it can be a program name with args.
12538set dummy $ac_prog; ac_word=$2
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12540$as_echo_n "checking for $ac_word... " >&6; }
12541if ${ac_cv_path_CYGPATH+:} false; then :
12542  $as_echo_n "(cached) " >&6
12543else
12544  case $CYGPATH in
12545  [\\/]* | ?:[\\/]*)
12546  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12547  ;;
12548  *)
12549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12550for as_dir in $PATH
12551do
12552  IFS=$as_save_IFS
12553  test -z "$as_dir" && as_dir=.
12554    for ac_exec_ext in '' $ac_executable_extensions; do
12555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12556    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12558    break 2
12559  fi
12560done
12561  done
12562IFS=$as_save_IFS
12563
12564  ;;
12565esac
12566fi
12567CYGPATH=$ac_cv_path_CYGPATH
12568if test -n "$CYGPATH"; then
12569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12570$as_echo "$CYGPATH" >&6; }
12571else
12572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12573$as_echo "no" >&6; }
12574fi
12575
12576
12577  test -n "$CYGPATH" && break
12578done
12579
12580  else
12581    # The variable is set, but is it from the command line or the environment?
12582
12583    # Try to remove the string !CYGPATH! from our list.
12584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12586      # If it failed, the variable was not from the command line. Ignore it,
12587      # but warn the user (except for BASH, which is always set by the calling BASH).
12588      if test "xCYGPATH" != xBASH; then
12589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12590$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12591      fi
12592      # Try to locate tool using the code snippet
12593      for ac_prog in cygpath
12594do
12595  # Extract the first word of "$ac_prog", so it can be a program name with args.
12596set dummy $ac_prog; ac_word=$2
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12598$as_echo_n "checking for $ac_word... " >&6; }
12599if ${ac_cv_path_CYGPATH+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  case $CYGPATH in
12603  [\\/]* | ?:[\\/]*)
12604  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12605  ;;
12606  *)
12607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622  ;;
12623esac
12624fi
12625CYGPATH=$ac_cv_path_CYGPATH
12626if test -n "$CYGPATH"; then
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12628$as_echo "$CYGPATH" >&6; }
12629else
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632fi
12633
12634
12635  test -n "$CYGPATH" && break
12636done
12637
12638    else
12639      # If it succeeded, then it was overridden by the user. We will use it
12640      # for the tool.
12641
12642      # First remove it from the list of overridden variables, so we can test
12643      # for unknown variables in the end.
12644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12645
12646      # Check if the provided tool contains a complete path.
12647      tool_specified="$CYGPATH"
12648      tool_basename="${tool_specified##*/}"
12649      if test "x$tool_basename" = "x$tool_specified"; then
12650        # A command without a complete path is provided, search $PATH.
12651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12652$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12653        # Extract the first word of "$tool_basename", so it can be a program name with args.
12654set dummy $tool_basename; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_CYGPATH+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $CYGPATH in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683CYGPATH=$ac_cv_path_CYGPATH
12684if test -n "$CYGPATH"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12686$as_echo "$CYGPATH" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693        if test "x$CYGPATH" = x; then
12694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12695        fi
12696      else
12697        # Otherwise we believe it is a complete path. Use it as it is.
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12699$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12701$as_echo_n "checking for CYGPATH... " >&6; }
12702        if test ! -x "$tool_specified"; then
12703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12704$as_echo "not found" >&6; }
12705          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12706        fi
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12708$as_echo "$tool_specified" >&6; }
12709      fi
12710    fi
12711  fi
12712
12713
12714
12715
12716  # Publish this variable in the help.
12717
12718
12719  if test "x$READLINK" = x; then
12720    # The variable is not set by user, try to locate tool using the code snippet
12721    for ac_prog in greadlink readlink
12722do
12723  # Extract the first word of "$ac_prog", so it can be a program name with args.
12724set dummy $ac_prog; ac_word=$2
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12726$as_echo_n "checking for $ac_word... " >&6; }
12727if ${ac_cv_path_READLINK+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  case $READLINK in
12731  [\\/]* | ?:[\\/]*)
12732  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12733  ;;
12734  *)
12735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750  ;;
12751esac
12752fi
12753READLINK=$ac_cv_path_READLINK
12754if test -n "$READLINK"; then
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12756$as_echo "$READLINK" >&6; }
12757else
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760fi
12761
12762
12763  test -n "$READLINK" && break
12764done
12765
12766  else
12767    # The variable is set, but is it from the command line or the environment?
12768
12769    # Try to remove the string !READLINK! from our list.
12770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12772      # If it failed, the variable was not from the command line. Ignore it,
12773      # but warn the user (except for BASH, which is always set by the calling BASH).
12774      if test "xREADLINK" != xBASH; then
12775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12776$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12777      fi
12778      # Try to locate tool using the code snippet
12779      for ac_prog in greadlink readlink
12780do
12781  # Extract the first word of "$ac_prog", so it can be a program name with args.
12782set dummy $ac_prog; ac_word=$2
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12784$as_echo_n "checking for $ac_word... " >&6; }
12785if ${ac_cv_path_READLINK+:} false; then :
12786  $as_echo_n "(cached) " >&6
12787else
12788  case $READLINK in
12789  [\\/]* | ?:[\\/]*)
12790  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12791  ;;
12792  *)
12793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12794for as_dir in $PATH
12795do
12796  IFS=$as_save_IFS
12797  test -z "$as_dir" && as_dir=.
12798    for ac_exec_ext in '' $ac_executable_extensions; do
12799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12800    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12802    break 2
12803  fi
12804done
12805  done
12806IFS=$as_save_IFS
12807
12808  ;;
12809esac
12810fi
12811READLINK=$ac_cv_path_READLINK
12812if test -n "$READLINK"; then
12813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12814$as_echo "$READLINK" >&6; }
12815else
12816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12817$as_echo "no" >&6; }
12818fi
12819
12820
12821  test -n "$READLINK" && break
12822done
12823
12824    else
12825      # If it succeeded, then it was overridden by the user. We will use it
12826      # for the tool.
12827
12828      # First remove it from the list of overridden variables, so we can test
12829      # for unknown variables in the end.
12830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12831
12832      # Check if the provided tool contains a complete path.
12833      tool_specified="$READLINK"
12834      tool_basename="${tool_specified##*/}"
12835      if test "x$tool_basename" = "x$tool_specified"; then
12836        # A command without a complete path is provided, search $PATH.
12837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12838$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12839        # Extract the first word of "$tool_basename", so it can be a program name with args.
12840set dummy $tool_basename; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_READLINK+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $READLINK in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869READLINK=$ac_cv_path_READLINK
12870if test -n "$READLINK"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12872$as_echo "$READLINK" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879        if test "x$READLINK" = x; then
12880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881        fi
12882      else
12883        # Otherwise we believe it is a complete path. Use it as it is.
12884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12885$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12887$as_echo_n "checking for READLINK... " >&6; }
12888        if test ! -x "$tool_specified"; then
12889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890$as_echo "not found" >&6; }
12891          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12892        fi
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894$as_echo "$tool_specified" >&6; }
12895      fi
12896    fi
12897  fi
12898
12899
12900
12901
12902  # Publish this variable in the help.
12903
12904
12905  if test "x$DF" = x; then
12906    # The variable is not set by user, try to locate tool using the code snippet
12907    for ac_prog in df
12908do
12909  # Extract the first word of "$ac_prog", so it can be a program name with args.
12910set dummy $ac_prog; ac_word=$2
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12912$as_echo_n "checking for $ac_word... " >&6; }
12913if ${ac_cv_path_DF+:} false; then :
12914  $as_echo_n "(cached) " >&6
12915else
12916  case $DF in
12917  [\\/]* | ?:[\\/]*)
12918  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12919  ;;
12920  *)
12921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12922for as_dir in $PATH
12923do
12924  IFS=$as_save_IFS
12925  test -z "$as_dir" && as_dir=.
12926    for ac_exec_ext in '' $ac_executable_extensions; do
12927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12928    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12930    break 2
12931  fi
12932done
12933  done
12934IFS=$as_save_IFS
12935
12936  ;;
12937esac
12938fi
12939DF=$ac_cv_path_DF
12940if test -n "$DF"; then
12941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12942$as_echo "$DF" >&6; }
12943else
12944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945$as_echo "no" >&6; }
12946fi
12947
12948
12949  test -n "$DF" && break
12950done
12951
12952  else
12953    # The variable is set, but is it from the command line or the environment?
12954
12955    # Try to remove the string !DF! from our list.
12956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12958      # If it failed, the variable was not from the command line. Ignore it,
12959      # but warn the user (except for BASH, which is always set by the calling BASH).
12960      if test "xDF" != xBASH; then
12961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12962$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12963      fi
12964      # Try to locate tool using the code snippet
12965      for ac_prog in df
12966do
12967  # Extract the first word of "$ac_prog", so it can be a program name with args.
12968set dummy $ac_prog; ac_word=$2
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12970$as_echo_n "checking for $ac_word... " >&6; }
12971if ${ac_cv_path_DF+:} false; then :
12972  $as_echo_n "(cached) " >&6
12973else
12974  case $DF in
12975  [\\/]* | ?:[\\/]*)
12976  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12977  ;;
12978  *)
12979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH
12981do
12982  IFS=$as_save_IFS
12983  test -z "$as_dir" && as_dir=.
12984    for ac_exec_ext in '' $ac_executable_extensions; do
12985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12986    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12988    break 2
12989  fi
12990done
12991  done
12992IFS=$as_save_IFS
12993
12994  ;;
12995esac
12996fi
12997DF=$ac_cv_path_DF
12998if test -n "$DF"; then
12999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13000$as_echo "$DF" >&6; }
13001else
13002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13003$as_echo "no" >&6; }
13004fi
13005
13006
13007  test -n "$DF" && break
13008done
13009
13010    else
13011      # If it succeeded, then it was overridden by the user. We will use it
13012      # for the tool.
13013
13014      # First remove it from the list of overridden variables, so we can test
13015      # for unknown variables in the end.
13016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13017
13018      # Check if the provided tool contains a complete path.
13019      tool_specified="$DF"
13020      tool_basename="${tool_specified##*/}"
13021      if test "x$tool_basename" = "x$tool_specified"; then
13022        # A command without a complete path is provided, search $PATH.
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13024$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13025        # Extract the first word of "$tool_basename", so it can be a program name with args.
13026set dummy $tool_basename; ac_word=$2
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13028$as_echo_n "checking for $ac_word... " >&6; }
13029if ${ac_cv_path_DF+:} false; then :
13030  $as_echo_n "(cached) " >&6
13031else
13032  case $DF in
13033  [\\/]* | ?:[\\/]*)
13034  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13035  ;;
13036  *)
13037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13038for as_dir in $PATH
13039do
13040  IFS=$as_save_IFS
13041  test -z "$as_dir" && as_dir=.
13042    for ac_exec_ext in '' $ac_executable_extensions; do
13043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13044    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13046    break 2
13047  fi
13048done
13049  done
13050IFS=$as_save_IFS
13051
13052  ;;
13053esac
13054fi
13055DF=$ac_cv_path_DF
13056if test -n "$DF"; then
13057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13058$as_echo "$DF" >&6; }
13059else
13060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13061$as_echo "no" >&6; }
13062fi
13063
13064
13065        if test "x$DF" = x; then
13066          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13067        fi
13068      else
13069        # Otherwise we believe it is a complete path. Use it as it is.
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13071$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13073$as_echo_n "checking for DF... " >&6; }
13074        if test ! -x "$tool_specified"; then
13075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13076$as_echo "not found" >&6; }
13077          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13078        fi
13079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13080$as_echo "$tool_specified" >&6; }
13081      fi
13082    fi
13083  fi
13084
13085
13086
13087
13088  # Publish this variable in the help.
13089
13090
13091  if test "x$SETFILE" = x; then
13092    # The variable is not set by user, try to locate tool using the code snippet
13093    for ac_prog in SetFile
13094do
13095  # Extract the first word of "$ac_prog", so it can be a program name with args.
13096set dummy $ac_prog; ac_word=$2
13097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13098$as_echo_n "checking for $ac_word... " >&6; }
13099if ${ac_cv_path_SETFILE+:} false; then :
13100  $as_echo_n "(cached) " >&6
13101else
13102  case $SETFILE in
13103  [\\/]* | ?:[\\/]*)
13104  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13105  ;;
13106  *)
13107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13108for as_dir in $PATH
13109do
13110  IFS=$as_save_IFS
13111  test -z "$as_dir" && as_dir=.
13112    for ac_exec_ext in '' $ac_executable_extensions; do
13113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13114    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13116    break 2
13117  fi
13118done
13119  done
13120IFS=$as_save_IFS
13121
13122  ;;
13123esac
13124fi
13125SETFILE=$ac_cv_path_SETFILE
13126if test -n "$SETFILE"; then
13127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13128$as_echo "$SETFILE" >&6; }
13129else
13130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13131$as_echo "no" >&6; }
13132fi
13133
13134
13135  test -n "$SETFILE" && break
13136done
13137
13138  else
13139    # The variable is set, but is it from the command line or the environment?
13140
13141    # Try to remove the string !SETFILE! from our list.
13142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13144      # If it failed, the variable was not from the command line. Ignore it,
13145      # but warn the user (except for BASH, which is always set by the calling BASH).
13146      if test "xSETFILE" != xBASH; then
13147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13148$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13149      fi
13150      # Try to locate tool using the code snippet
13151      for ac_prog in SetFile
13152do
13153  # Extract the first word of "$ac_prog", so it can be a program name with args.
13154set dummy $ac_prog; ac_word=$2
13155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13156$as_echo_n "checking for $ac_word... " >&6; }
13157if ${ac_cv_path_SETFILE+:} false; then :
13158  $as_echo_n "(cached) " >&6
13159else
13160  case $SETFILE in
13161  [\\/]* | ?:[\\/]*)
13162  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13163  ;;
13164  *)
13165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13166for as_dir in $PATH
13167do
13168  IFS=$as_save_IFS
13169  test -z "$as_dir" && as_dir=.
13170    for ac_exec_ext in '' $ac_executable_extensions; do
13171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13172    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13174    break 2
13175  fi
13176done
13177  done
13178IFS=$as_save_IFS
13179
13180  ;;
13181esac
13182fi
13183SETFILE=$ac_cv_path_SETFILE
13184if test -n "$SETFILE"; then
13185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13186$as_echo "$SETFILE" >&6; }
13187else
13188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13189$as_echo "no" >&6; }
13190fi
13191
13192
13193  test -n "$SETFILE" && break
13194done
13195
13196    else
13197      # If it succeeded, then it was overridden by the user. We will use it
13198      # for the tool.
13199
13200      # First remove it from the list of overridden variables, so we can test
13201      # for unknown variables in the end.
13202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13203
13204      # Check if the provided tool contains a complete path.
13205      tool_specified="$SETFILE"
13206      tool_basename="${tool_specified##*/}"
13207      if test "x$tool_basename" = "x$tool_specified"; then
13208        # A command without a complete path is provided, search $PATH.
13209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13210$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13211        # Extract the first word of "$tool_basename", so it can be a program name with args.
13212set dummy $tool_basename; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_path_SETFILE+:} false; then :
13216  $as_echo_n "(cached) " >&6
13217else
13218  case $SETFILE in
13219  [\\/]* | ?:[\\/]*)
13220  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13221  ;;
13222  *)
13223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13224for as_dir in $PATH
13225do
13226  IFS=$as_save_IFS
13227  test -z "$as_dir" && as_dir=.
13228    for ac_exec_ext in '' $ac_executable_extensions; do
13229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13230    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13232    break 2
13233  fi
13234done
13235  done
13236IFS=$as_save_IFS
13237
13238  ;;
13239esac
13240fi
13241SETFILE=$ac_cv_path_SETFILE
13242if test -n "$SETFILE"; then
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13244$as_echo "$SETFILE" >&6; }
13245else
13246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
13248fi
13249
13250
13251        if test "x$SETFILE" = x; then
13252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13253        fi
13254      else
13255        # Otherwise we believe it is a complete path. Use it as it is.
13256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13257$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13259$as_echo_n "checking for SETFILE... " >&6; }
13260        if test ! -x "$tool_specified"; then
13261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13262$as_echo "not found" >&6; }
13263          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13264        fi
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13266$as_echo "$tool_specified" >&6; }
13267      fi
13268    fi
13269  fi
13270
13271
13272
13273
13274  # Publish this variable in the help.
13275
13276
13277  if test "x$CPIO" = x; then
13278    # The variable is not set by user, try to locate tool using the code snippet
13279    for ac_prog in cpio bsdcpio
13280do
13281  # Extract the first word of "$ac_prog", so it can be a program name with args.
13282set dummy $ac_prog; ac_word=$2
13283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13284$as_echo_n "checking for $ac_word... " >&6; }
13285if ${ac_cv_path_CPIO+:} false; then :
13286  $as_echo_n "(cached) " >&6
13287else
13288  case $CPIO in
13289  [\\/]* | ?:[\\/]*)
13290  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13291  ;;
13292  *)
13293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13294for as_dir in $PATH
13295do
13296  IFS=$as_save_IFS
13297  test -z "$as_dir" && as_dir=.
13298    for ac_exec_ext in '' $ac_executable_extensions; do
13299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13300    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13302    break 2
13303  fi
13304done
13305  done
13306IFS=$as_save_IFS
13307
13308  ;;
13309esac
13310fi
13311CPIO=$ac_cv_path_CPIO
13312if test -n "$CPIO"; then
13313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13314$as_echo "$CPIO" >&6; }
13315else
13316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13317$as_echo "no" >&6; }
13318fi
13319
13320
13321  test -n "$CPIO" && break
13322done
13323
13324  else
13325    # The variable is set, but is it from the command line or the environment?
13326
13327    # Try to remove the string !CPIO! from our list.
13328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13330      # If it failed, the variable was not from the command line. Ignore it,
13331      # but warn the user (except for BASH, which is always set by the calling BASH).
13332      if test "xCPIO" != xBASH; then
13333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13334$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13335      fi
13336      # Try to locate tool using the code snippet
13337      for ac_prog in cpio bsdcpio
13338do
13339  # Extract the first word of "$ac_prog", so it can be a program name with args.
13340set dummy $ac_prog; ac_word=$2
13341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13342$as_echo_n "checking for $ac_word... " >&6; }
13343if ${ac_cv_path_CPIO+:} false; then :
13344  $as_echo_n "(cached) " >&6
13345else
13346  case $CPIO in
13347  [\\/]* | ?:[\\/]*)
13348  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13349  ;;
13350  *)
13351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13352for as_dir in $PATH
13353do
13354  IFS=$as_save_IFS
13355  test -z "$as_dir" && as_dir=.
13356    for ac_exec_ext in '' $ac_executable_extensions; do
13357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13358    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13360    break 2
13361  fi
13362done
13363  done
13364IFS=$as_save_IFS
13365
13366  ;;
13367esac
13368fi
13369CPIO=$ac_cv_path_CPIO
13370if test -n "$CPIO"; then
13371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13372$as_echo "$CPIO" >&6; }
13373else
13374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13375$as_echo "no" >&6; }
13376fi
13377
13378
13379  test -n "$CPIO" && break
13380done
13381
13382    else
13383      # If it succeeded, then it was overridden by the user. We will use it
13384      # for the tool.
13385
13386      # First remove it from the list of overridden variables, so we can test
13387      # for unknown variables in the end.
13388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13389
13390      # Check if the provided tool contains a complete path.
13391      tool_specified="$CPIO"
13392      tool_basename="${tool_specified##*/}"
13393      if test "x$tool_basename" = "x$tool_specified"; then
13394        # A command without a complete path is provided, search $PATH.
13395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13396$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13397        # Extract the first word of "$tool_basename", so it can be a program name with args.
13398set dummy $tool_basename; ac_word=$2
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13400$as_echo_n "checking for $ac_word... " >&6; }
13401if ${ac_cv_path_CPIO+:} false; then :
13402  $as_echo_n "(cached) " >&6
13403else
13404  case $CPIO in
13405  [\\/]* | ?:[\\/]*)
13406  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13407  ;;
13408  *)
13409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13410for as_dir in $PATH
13411do
13412  IFS=$as_save_IFS
13413  test -z "$as_dir" && as_dir=.
13414    for ac_exec_ext in '' $ac_executable_extensions; do
13415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13416    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13418    break 2
13419  fi
13420done
13421  done
13422IFS=$as_save_IFS
13423
13424  ;;
13425esac
13426fi
13427CPIO=$ac_cv_path_CPIO
13428if test -n "$CPIO"; then
13429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13430$as_echo "$CPIO" >&6; }
13431else
13432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
13434fi
13435
13436
13437        if test "x$CPIO" = x; then
13438          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13439        fi
13440      else
13441        # Otherwise we believe it is a complete path. Use it as it is.
13442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13443$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13445$as_echo_n "checking for CPIO... " >&6; }
13446        if test ! -x "$tool_specified"; then
13447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13448$as_echo "not found" >&6; }
13449          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13450        fi
13451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13452$as_echo "$tool_specified" >&6; }
13453      fi
13454    fi
13455  fi
13456
13457
13458
13459
13460# Now we can determine OpenJDK build and target platforms. This is required to
13461# have early on.
13462# Make sure we can run config.sub.
13463$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13464  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13465
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13467$as_echo_n "checking build system type... " >&6; }
13468if ${ac_cv_build+:} false; then :
13469  $as_echo_n "(cached) " >&6
13470else
13471  ac_build_alias=$build_alias
13472test "x$ac_build_alias" = x &&
13473  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13474test "x$ac_build_alias" = x &&
13475  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13476ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13477  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13478
13479fi
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13481$as_echo "$ac_cv_build" >&6; }
13482case $ac_cv_build in
13483*-*-*) ;;
13484*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13485esac
13486build=$ac_cv_build
13487ac_save_IFS=$IFS; IFS='-'
13488set x $ac_cv_build
13489shift
13490build_cpu=$1
13491build_vendor=$2
13492shift; shift
13493# Remember, the first character of IFS is used to create $*,
13494# except with old shells:
13495build_os=$*
13496IFS=$ac_save_IFS
13497case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13498
13499
13500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13501$as_echo_n "checking host system type... " >&6; }
13502if ${ac_cv_host+:} false; then :
13503  $as_echo_n "(cached) " >&6
13504else
13505  if test "x$host_alias" = x; then
13506  ac_cv_host=$ac_cv_build
13507else
13508  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13509    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13510fi
13511
13512fi
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13514$as_echo "$ac_cv_host" >&6; }
13515case $ac_cv_host in
13516*-*-*) ;;
13517*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13518esac
13519host=$ac_cv_host
13520ac_save_IFS=$IFS; IFS='-'
13521set x $ac_cv_host
13522shift
13523host_cpu=$1
13524host_vendor=$2
13525shift; shift
13526# Remember, the first character of IFS is used to create $*,
13527# except with old shells:
13528host_os=$*
13529IFS=$ac_save_IFS
13530case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13531
13532
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13534$as_echo_n "checking target system type... " >&6; }
13535if ${ac_cv_target+:} false; then :
13536  $as_echo_n "(cached) " >&6
13537else
13538  if test "x$target_alias" = x; then
13539  ac_cv_target=$ac_cv_host
13540else
13541  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13542    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13543fi
13544
13545fi
13546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13547$as_echo "$ac_cv_target" >&6; }
13548case $ac_cv_target in
13549*-*-*) ;;
13550*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13551esac
13552target=$ac_cv_target
13553ac_save_IFS=$IFS; IFS='-'
13554set x $ac_cv_target
13555shift
13556target_cpu=$1
13557target_vendor=$2
13558shift; shift
13559# Remember, the first character of IFS is used to create $*,
13560# except with old shells:
13561target_os=$*
13562IFS=$ac_save_IFS
13563case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13564
13565
13566# The aliases save the names the user supplied, while $host etc.
13567# will get canonicalized.
13568test -n "$target_alias" &&
13569  test "$program_prefix$program_suffix$program_transform_name" = \
13570    NONENONEs,x,x, &&
13571  program_prefix=${target_alias}-
13572
13573  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13574  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13575  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13576  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13577  # to use the configure naming style.
13578
13579
13580
13581
13582
13583  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13584  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13585  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13586  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13587  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13588  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13589
13590
13591
13592  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13593
13594  case "$build_os" in
13595    *linux*)
13596      VAR_OS=linux
13597      VAR_OS_TYPE=unix
13598      ;;
13599    *solaris*)
13600      VAR_OS=solaris
13601      VAR_OS_TYPE=unix
13602      ;;
13603    *darwin*)
13604      VAR_OS=macosx
13605      VAR_OS_TYPE=unix
13606      ;;
13607    *bsd*)
13608      VAR_OS=bsd
13609      VAR_OS_TYPE=unix
13610      ;;
13611    *cygwin*)
13612      VAR_OS=windows
13613      VAR_OS_ENV=windows.cygwin
13614      ;;
13615    *mingw*)
13616      VAR_OS=windows
13617      VAR_OS_ENV=windows.msys
13618      ;;
13619    *aix*)
13620      VAR_OS=aix
13621      VAR_OS_TYPE=unix
13622      ;;
13623    *)
13624      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13625      ;;
13626  esac
13627
13628
13629  # First argument is the cpu name from the trip/quad
13630  case "$build_cpu" in
13631    x86_64)
13632      VAR_CPU=x86_64
13633      VAR_CPU_ARCH=x86
13634      VAR_CPU_BITS=64
13635      VAR_CPU_ENDIAN=little
13636      ;;
13637    i?86)
13638      VAR_CPU=x86
13639      VAR_CPU_ARCH=x86
13640      VAR_CPU_BITS=32
13641      VAR_CPU_ENDIAN=little
13642      ;;
13643    arm*)
13644      VAR_CPU=arm
13645      VAR_CPU_ARCH=arm
13646      VAR_CPU_BITS=32
13647      VAR_CPU_ENDIAN=little
13648      ;;
13649    aarch64)
13650      VAR_CPU=aarch64
13651      VAR_CPU_ARCH=aarch64
13652      VAR_CPU_BITS=64
13653      VAR_CPU_ENDIAN=little
13654      ;;
13655    powerpc)
13656      VAR_CPU=ppc
13657      VAR_CPU_ARCH=ppc
13658      VAR_CPU_BITS=32
13659      VAR_CPU_ENDIAN=big
13660      ;;
13661    powerpc64)
13662      VAR_CPU=ppc64
13663      VAR_CPU_ARCH=ppc
13664      VAR_CPU_BITS=64
13665      VAR_CPU_ENDIAN=big
13666      ;;
13667    powerpc64le)
13668      VAR_CPU=ppc64
13669      VAR_CPU_ARCH=ppc
13670      VAR_CPU_BITS=64
13671      VAR_CPU_ENDIAN=little
13672      ;;
13673    s390)
13674      VAR_CPU=s390
13675      VAR_CPU_ARCH=s390
13676      VAR_CPU_BITS=32
13677      VAR_CPU_ENDIAN=big
13678      ;;
13679    s390x)
13680      VAR_CPU=s390x
13681      VAR_CPU_ARCH=s390
13682      VAR_CPU_BITS=64
13683      VAR_CPU_ENDIAN=big
13684      ;;
13685    sparc)
13686      VAR_CPU=sparc
13687      VAR_CPU_ARCH=sparc
13688      VAR_CPU_BITS=32
13689      VAR_CPU_ENDIAN=big
13690      ;;
13691    sparcv9|sparc64)
13692      VAR_CPU=sparcv9
13693      VAR_CPU_ARCH=sparc
13694      VAR_CPU_BITS=64
13695      VAR_CPU_ENDIAN=big
13696      ;;
13697    *)
13698      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13699      ;;
13700  esac
13701
13702  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13703  OPENJDK_BUILD_OS="$VAR_OS"
13704  if test "x$VAR_OS_TYPE" != x; then
13705    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13706  else
13707    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13708  fi
13709  if test "x$VAR_OS_ENV" != x; then
13710    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13711  else
13712    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13713  fi
13714  OPENJDK_BUILD_CPU="$VAR_CPU"
13715  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13716  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13717  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13718
13719
13720
13721
13722
13723
13724
13725
13726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13727$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13729$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13730
13731  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13732
13733  case "$host_os" in
13734    *linux*)
13735      VAR_OS=linux
13736      VAR_OS_TYPE=unix
13737      ;;
13738    *solaris*)
13739      VAR_OS=solaris
13740      VAR_OS_TYPE=unix
13741      ;;
13742    *darwin*)
13743      VAR_OS=macosx
13744      VAR_OS_TYPE=unix
13745      ;;
13746    *bsd*)
13747      VAR_OS=bsd
13748      VAR_OS_TYPE=unix
13749      ;;
13750    *cygwin*)
13751      VAR_OS=windows
13752      VAR_OS_ENV=windows.cygwin
13753      ;;
13754    *mingw*)
13755      VAR_OS=windows
13756      VAR_OS_ENV=windows.msys
13757      ;;
13758    *aix*)
13759      VAR_OS=aix
13760      VAR_OS_TYPE=unix
13761      ;;
13762    *)
13763      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13764      ;;
13765  esac
13766
13767
13768  # First argument is the cpu name from the trip/quad
13769  case "$host_cpu" in
13770    x86_64)
13771      VAR_CPU=x86_64
13772      VAR_CPU_ARCH=x86
13773      VAR_CPU_BITS=64
13774      VAR_CPU_ENDIAN=little
13775      ;;
13776    i?86)
13777      VAR_CPU=x86
13778      VAR_CPU_ARCH=x86
13779      VAR_CPU_BITS=32
13780      VAR_CPU_ENDIAN=little
13781      ;;
13782    arm*)
13783      VAR_CPU=arm
13784      VAR_CPU_ARCH=arm
13785      VAR_CPU_BITS=32
13786      VAR_CPU_ENDIAN=little
13787      ;;
13788    aarch64)
13789      VAR_CPU=aarch64
13790      VAR_CPU_ARCH=aarch64
13791      VAR_CPU_BITS=64
13792      VAR_CPU_ENDIAN=little
13793      ;;
13794    powerpc)
13795      VAR_CPU=ppc
13796      VAR_CPU_ARCH=ppc
13797      VAR_CPU_BITS=32
13798      VAR_CPU_ENDIAN=big
13799      ;;
13800    powerpc64)
13801      VAR_CPU=ppc64
13802      VAR_CPU_ARCH=ppc
13803      VAR_CPU_BITS=64
13804      VAR_CPU_ENDIAN=big
13805      ;;
13806    powerpc64le)
13807      VAR_CPU=ppc64
13808      VAR_CPU_ARCH=ppc
13809      VAR_CPU_BITS=64
13810      VAR_CPU_ENDIAN=little
13811      ;;
13812    s390)
13813      VAR_CPU=s390
13814      VAR_CPU_ARCH=s390
13815      VAR_CPU_BITS=32
13816      VAR_CPU_ENDIAN=big
13817      ;;
13818    s390x)
13819      VAR_CPU=s390x
13820      VAR_CPU_ARCH=s390
13821      VAR_CPU_BITS=64
13822      VAR_CPU_ENDIAN=big
13823      ;;
13824    sparc)
13825      VAR_CPU=sparc
13826      VAR_CPU_ARCH=sparc
13827      VAR_CPU_BITS=32
13828      VAR_CPU_ENDIAN=big
13829      ;;
13830    sparcv9|sparc64)
13831      VAR_CPU=sparcv9
13832      VAR_CPU_ARCH=sparc
13833      VAR_CPU_BITS=64
13834      VAR_CPU_ENDIAN=big
13835      ;;
13836    *)
13837      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13838      ;;
13839  esac
13840
13841  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13842  OPENJDK_TARGET_OS="$VAR_OS"
13843  if test "x$VAR_OS_TYPE" != x; then
13844    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13845  else
13846    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13847  fi
13848  if test "x$VAR_OS_ENV" != x; then
13849    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13850  else
13851    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13852  fi
13853  OPENJDK_TARGET_CPU="$VAR_CPU"
13854  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13855  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13856  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13857
13858
13859
13860
13861
13862
13863
13864
13865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13866$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13868$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13869
13870
13871
13872# Check whether --with-target-bits was given.
13873if test "${with_target_bits+set}" = set; then :
13874  withval=$with_target_bits;
13875fi
13876
13877
13878  # We have three types of compiles:
13879  # native  == normal compilation, target system == build system
13880  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13881  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13882  #
13883  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13884    # We're doing a proper cross-compilation
13885    COMPILE_TYPE="cross"
13886  else
13887    COMPILE_TYPE="native"
13888  fi
13889
13890  if test "x$with_target_bits" != x; then
13891    if test "x$COMPILE_TYPE" = "xcross"; then
13892      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13893    fi
13894
13895    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13896      # A reduced build is requested
13897      COMPILE_TYPE="reduced"
13898      OPENJDK_TARGET_CPU_BITS=32
13899      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13900        OPENJDK_TARGET_CPU=x86
13901      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13902        OPENJDK_TARGET_CPU=sparc
13903      else
13904        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13905      fi
13906    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13907      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
13908    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13909      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13910$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13911    else
13912      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13913    fi
13914  fi
13915
13916
13917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13918$as_echo_n "checking compilation type... " >&6; }
13919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13920$as_echo "$COMPILE_TYPE" >&6; }
13921
13922
13923  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13924    REQUIRED_OS_NAME=SunOS
13925    REQUIRED_OS_VERSION=5.10
13926  fi
13927  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13928    REQUIRED_OS_NAME=Linux
13929    REQUIRED_OS_VERSION=2.6
13930  fi
13931  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13932    REQUIRED_OS_NAME=Windows
13933    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13934      REQUIRED_OS_VERSION=5.2
13935    else
13936      REQUIRED_OS_VERSION=5.1
13937    fi
13938  fi
13939  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13940    REQUIRED_OS_NAME=Darwin
13941    REQUIRED_OS_VERSION=11.2
13942  fi
13943
13944
13945
13946
13947
13948  # Also store the legacy naming of the cpu.
13949  # Ie i586 and amd64 instead of x86 and x86_64
13950  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13951  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13952    OPENJDK_TARGET_CPU_LEGACY="i586"
13953  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13954    # On all platforms except MacOSX replace x86_64 with amd64.
13955    OPENJDK_TARGET_CPU_LEGACY="amd64"
13956  fi
13957
13958
13959  # And the second legacy naming of the cpu.
13960  # Ie i386 and amd64 instead of x86 and x86_64.
13961  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13962  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13963    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13964  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13965    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13966  fi
13967
13968
13969  # This is the name of the cpu (but using i386 and amd64 instead of
13970  # x86 and x86_64, respectively), preceeded by a /, to be used when
13971  # locating libraries. On macosx, it's empty, though.
13972  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13973  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13974    OPENJDK_TARGET_CPU_LIBDIR=""
13975  fi
13976
13977
13978  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13979  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13980  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13981  OPENJDK_TARGET_CPU_ISADIR=""
13982  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13983    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13984      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13985    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13986      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13987    fi
13988  fi
13989
13990
13991  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13992  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13993  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13994    # On linux only, we replace x86 with i386.
13995    OPENJDK_TARGET_CPU_OSARCH="i386"
13996  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13997    # On all platforms except macosx, we replace x86_64 with amd64.
13998    OPENJDK_TARGET_CPU_OSARCH="amd64"
13999  fi
14000
14001
14002  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14003  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14004    OPENJDK_TARGET_CPU_JLI="i386"
14005  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14006    # On all platforms except macosx, we replace x86_64 with amd64.
14007    OPENJDK_TARGET_CPU_JLI="amd64"
14008  fi
14009  # Now setup the -D flags for building libjli.
14010  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14011  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14012    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14013      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14014    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14015      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14016    fi
14017  fi
14018
14019
14020  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14021      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14022  else
14023      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14024  fi
14025
14026
14027  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14028    A_LP64="LP64:="
14029    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14030    # unpack200.exe
14031    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14032      ADD_LP64="-D_LP64=1"
14033    fi
14034  fi
14035  LP64=$A_LP64
14036
14037
14038  if test "x$COMPILE_TYPE" = "xcross"; then
14039    # FIXME: ... or should this include reduced builds..?
14040    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14041  else
14042    DEFINE_CROSS_COMPILE_ARCH=""
14043  fi
14044
14045
14046  # ZERO_ARCHDEF is used to enable architecture-specific code
14047  case "${OPENJDK_TARGET_CPU}" in
14048    ppc)     ZERO_ARCHDEF=PPC32 ;;
14049    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14050    s390*)   ZERO_ARCHDEF=S390  ;;
14051    sparc*)  ZERO_ARCHDEF=SPARC ;;
14052    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14053    x86)     ZERO_ARCHDEF=IA32  ;;
14054    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14055  esac
14056
14057
14058
14059
14060# Continue setting up basic stuff. Most remaining code require fundamental tools.
14061
14062  # Save the current directory this script was started from
14063  CURDIR="$PWD"
14064
14065  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14066    PATH_SEP=";"
14067
14068  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14069  if test $SRC_ROOT_LENGTH -gt 100; then
14070    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14071  fi
14072
14073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14075$as_echo_n "checking cygwin release... " >&6; }
14076    CYGWIN_VERSION=`$UNAME -r`
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14078$as_echo "$CYGWIN_VERSION" >&6; }
14079    WINDOWS_ENV_VENDOR='cygwin'
14080    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14081
14082    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14083    if test "x$CYGWIN_VERSION_OK" = x; then
14084      { $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
14085$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;}
14086      as_fn_error $? "Cannot continue" "$LINENO" 5
14087    fi
14088    if test "x$CYGPATH" = x; then
14089      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14090    fi
14091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14092$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14093    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14094    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14095    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14096    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14098$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14099    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14100    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14101    if test "x$test_cygdrive_prefix" = x; then
14102      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14103    fi
14104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14106$as_echo_n "checking msys release... " >&6; }
14107    MSYS_VERSION=`$UNAME -r`
14108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14109$as_echo "$MSYS_VERSION" >&6; }
14110
14111    WINDOWS_ENV_VENDOR='msys'
14112    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14113
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14115$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14116    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14117    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14118
14119  windows_path="$MSYS_ROOT_PATH"
14120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14121    unix_path=`$CYGPATH -u "$windows_path"`
14122    MSYS_ROOT_PATH="$unix_path"
14123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14125    MSYS_ROOT_PATH="$unix_path"
14126  fi
14127
14128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14129$as_echo "$MSYS_ROOT_PATH" >&6; }
14130    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14131  else
14132    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14133  fi
14134
14135  # Test if windows or unix (cygwin/msys) find is first in path.
14136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14137$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14138  FIND_BINARY_OUTPUT=`find --version 2>&1`
14139  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14141$as_echo "unix style" >&6; }
14142  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14144$as_echo "Windows" >&6; }
14145    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14146$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14147    { $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
14148$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14149    as_fn_error $? "Cannot continue" "$LINENO" 5
14150  else
14151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14152$as_echo "unknown" >&6; }
14153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14154$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14155  fi
14156
14157  else
14158    PATH_SEP=":"
14159  fi
14160
14161
14162  # We get the top-level directory from the supporting wrappers.
14163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14164$as_echo_n "checking for top-level directory... " >&6; }
14165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14166$as_echo "$TOPDIR" >&6; }
14167
14168
14169  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14170
14171  # Only process if variable expands to non-empty
14172
14173  if test "x$CURDIR" != x; then
14174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14175
14176  # Input might be given as Windows format, start by converting to
14177  # unix format.
14178  path="$CURDIR"
14179  new_path=`$CYGPATH -u "$path"`
14180
14181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14184  # "foo.exe" is OK but "foo" is an error.
14185  #
14186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14187  # It is also a way to make sure we got the proper file name for the real test later on.
14188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14189  if test "x$test_shortpath" = x; then
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14192    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14193  fi
14194
14195  # Call helper function which possibly converts this using DOS-style short mode.
14196  # If so, the updated path is stored in $new_path.
14197
14198  input_path="$new_path"
14199  # Check if we need to convert this using DOS-style short mode. If the path
14200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14201  # take no chances and rewrite it.
14202  # Note: m4 eats our [], so we need to use [ and ] instead.
14203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14204  if test "x$has_forbidden_chars" != x; then
14205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14209      # Going to short mode and back again did indeed matter. Since short mode is
14210      # case insensitive, let's make it lowercase to improve readability.
14211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14212      # Now convert it back to Unix-stile (cygpath)
14213      input_path=`$CYGPATH -u "$shortmode_path"`
14214      new_path="$input_path"
14215    fi
14216  fi
14217
14218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14219  if test "x$test_cygdrive_prefix" = x; then
14220    # As a simple fix, exclude /usr/bin since it's not a real path.
14221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14223      # a path prefixed by /cygdrive for fixpath to work.
14224      new_path="$CYGWIN_ROOT_PATH$input_path"
14225    fi
14226  fi
14227
14228
14229  if test "x$path" != "x$new_path"; then
14230    CURDIR="$new_path"
14231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14232$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14233  fi
14234
14235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14236
14237  path="$CURDIR"
14238  has_colon=`$ECHO $path | $GREP ^.:`
14239  new_path="$path"
14240  if test "x$has_colon" = x; then
14241    # Not in mixed or Windows style, start by that.
14242    new_path=`cmd //c echo $path`
14243  fi
14244
14245
14246  input_path="$new_path"
14247  # Check if we need to convert this using DOS-style short mode. If the path
14248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14249  # take no chances and rewrite it.
14250  # Note: m4 eats our [], so we need to use [ and ] instead.
14251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14252  if test "x$has_forbidden_chars" != x; then
14253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14255  fi
14256
14257
14258  windows_path="$new_path"
14259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14260    unix_path=`$CYGPATH -u "$windows_path"`
14261    new_path="$unix_path"
14262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14264    new_path="$unix_path"
14265  fi
14266
14267  if test "x$path" != "x$new_path"; then
14268    CURDIR="$new_path"
14269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14270$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14271  fi
14272
14273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14275
14276    else
14277      # We're on a unix platform. Hooray! :)
14278      path="$CURDIR"
14279      has_space=`$ECHO "$path" | $GREP " "`
14280      if test "x$has_space" != x; then
14281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14282$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14284      fi
14285
14286      # Use eval to expand a potential ~
14287      eval path="$path"
14288      if test ! -f "$path" && test ! -d "$path"; then
14289        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14290      fi
14291
14292      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14293    fi
14294  fi
14295
14296
14297  # Only process if variable expands to non-empty
14298
14299  if test "x$TOPDIR" != x; then
14300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14301
14302  # Input might be given as Windows format, start by converting to
14303  # unix format.
14304  path="$TOPDIR"
14305  new_path=`$CYGPATH -u "$path"`
14306
14307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14310  # "foo.exe" is OK but "foo" is an error.
14311  #
14312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14313  # It is also a way to make sure we got the proper file name for the real test later on.
14314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14315  if test "x$test_shortpath" = x; then
14316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14317$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14318    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14319  fi
14320
14321  # Call helper function which possibly converts this using DOS-style short mode.
14322  # If so, the updated path is stored in $new_path.
14323
14324  input_path="$new_path"
14325  # Check if we need to convert this using DOS-style short mode. If the path
14326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14327  # take no chances and rewrite it.
14328  # Note: m4 eats our [], so we need to use [ and ] instead.
14329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14330  if test "x$has_forbidden_chars" != x; then
14331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14335      # Going to short mode and back again did indeed matter. Since short mode is
14336      # case insensitive, let's make it lowercase to improve readability.
14337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14338      # Now convert it back to Unix-stile (cygpath)
14339      input_path=`$CYGPATH -u "$shortmode_path"`
14340      new_path="$input_path"
14341    fi
14342  fi
14343
14344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14345  if test "x$test_cygdrive_prefix" = x; then
14346    # As a simple fix, exclude /usr/bin since it's not a real path.
14347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14349      # a path prefixed by /cygdrive for fixpath to work.
14350      new_path="$CYGWIN_ROOT_PATH$input_path"
14351    fi
14352  fi
14353
14354
14355  if test "x$path" != "x$new_path"; then
14356    TOPDIR="$new_path"
14357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14358$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14359  fi
14360
14361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14362
14363  path="$TOPDIR"
14364  has_colon=`$ECHO $path | $GREP ^.:`
14365  new_path="$path"
14366  if test "x$has_colon" = x; then
14367    # Not in mixed or Windows style, start by that.
14368    new_path=`cmd //c echo $path`
14369  fi
14370
14371
14372  input_path="$new_path"
14373  # Check if we need to convert this using DOS-style short mode. If the path
14374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14375  # take no chances and rewrite it.
14376  # Note: m4 eats our [], so we need to use [ and ] instead.
14377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14378  if test "x$has_forbidden_chars" != x; then
14379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14381  fi
14382
14383
14384  windows_path="$new_path"
14385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14386    unix_path=`$CYGPATH -u "$windows_path"`
14387    new_path="$unix_path"
14388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14390    new_path="$unix_path"
14391  fi
14392
14393  if test "x$path" != "x$new_path"; then
14394    TOPDIR="$new_path"
14395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14396$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14397  fi
14398
14399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14401
14402    else
14403      # We're on a unix platform. Hooray! :)
14404      path="$TOPDIR"
14405      has_space=`$ECHO "$path" | $GREP " "`
14406      if test "x$has_space" != x; then
14407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14408$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14410      fi
14411
14412      # Use eval to expand a potential ~
14413      eval path="$path"
14414      if test ! -f "$path" && test ! -d "$path"; then
14415        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14416      fi
14417
14418      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14419    fi
14420  fi
14421
14422  # SRC_ROOT is a traditional alias for TOPDIR.
14423  SRC_ROOT=$TOPDIR
14424
14425  # Locate the directory of this script.
14426  AUTOCONF_DIR=$TOPDIR/common/autoconf
14427
14428
14429  # Setup default logging of stdout and stderr to build.log in the output root.
14430  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14431  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14432  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14433
14434
14435
14436
14437
14438# Check if it's a pure open build or if custom sources are to be used.
14439
14440  # Check whether --enable-openjdk-only was given.
14441if test "${enable_openjdk_only+set}" = set; then :
14442  enableval=$enable_openjdk_only;
14443else
14444  enable_openjdk_only="no"
14445fi
14446
14447
14448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14449$as_echo_n "checking for presence of closed sources... " >&6; }
14450  if test -d "$SRC_ROOT/jdk/src/closed"; then
14451    CLOSED_SOURCE_PRESENT=yes
14452  else
14453    CLOSED_SOURCE_PRESENT=no
14454  fi
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14456$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14457
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14459$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14460  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14462$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14463
14464  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14465    OPENJDK=true
14466    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14467      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14468$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14469    fi
14470  else
14471    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14472      OPENJDK=true
14473    else
14474      OPENJDK=false
14475    fi
14476  fi
14477
14478  if test "x$OPENJDK" = "xtrue"; then
14479    SET_OPENJDK="OPENJDK=true"
14480  fi
14481
14482
14483
14484  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14485  # the IncludeCustomExtension macro.
14486
14487
14488# Check whether --with-custom-make-dir was given.
14489if test "${with_custom_make_dir+set}" = set; then :
14490  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
14491$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14492fi
14493
14494
14495
14496
14497# These are needed to be able to create a configuration name (and thus the output directory)
14498
14499  ###############################################################################
14500  #
14501  # Check which variant of the JDK that we want to build.
14502  # Currently we have:
14503  #    normal:   standard edition
14504  # but the custom make system may add other variants
14505  #
14506  # Effectively the JDK variant gives a name to a specific set of
14507  # modules to compile into the JDK. In the future, these modules
14508  # might even be Jigsaw modules.
14509  #
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14511$as_echo_n "checking which variant of the JDK to build... " >&6; }
14512
14513# Check whether --with-jdk-variant was given.
14514if test "${with_jdk_variant+set}" = set; then :
14515  withval=$with_jdk_variant;
14516fi
14517
14518
14519  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14520    JDK_VARIANT="normal"
14521  else
14522    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14523  fi
14524
14525
14526
14527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14528$as_echo "$JDK_VARIANT" >&6; }
14529
14530
14531###############################################################################
14532#
14533# Check which interpreter of the JVM we want to build.
14534# Currently we have:
14535#    template: Template interpreter (the default)
14536#    cpp     : C++ interpreter
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14538$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14539
14540# Check whether --with-jvm-interpreter was given.
14541if test "${with_jvm_interpreter+set}" = set; then :
14542  withval=$with_jvm_interpreter;
14543fi
14544
14545
14546if test "x$with_jvm_interpreter" = x; then
14547     with_jvm_interpreter="template"
14548fi
14549
14550JVM_INTERPRETER="$with_jvm_interpreter"
14551
14552if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14553   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14554fi
14555
14556
14557
14558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14559$as_echo "$with_jvm_interpreter" >&6; }
14560
14561
14562
14563  ###############################################################################
14564  #
14565  # Check which variants of the JVM that we want to build.
14566  # Currently we have:
14567  #    server: normal interpreter and a tiered C1/C2 compiler
14568  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14569  #    minimal1: reduced form of client with optional VM services and features stripped out
14570  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14571  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14572  #    zero: no machine code interpreter, no compiler
14573  #    zeroshark: zero interpreter and shark/llvm compiler backend
14574#    core: interpreter only, no compiler (only works on some platforms)
14575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14576$as_echo_n "checking which variants of the JVM to build... " >&6; }
14577
14578# Check whether --with-jvm-variants was given.
14579if test "${with_jvm_variants+set}" = set; then :
14580  withval=$with_jvm_variants;
14581fi
14582
14583
14584  if test "x$with_jvm_variants" = x; then
14585    with_jvm_variants="server"
14586  fi
14587
14588  JVM_VARIANTS=",$with_jvm_variants,"
14589  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,//'`
14590
14591  if test "x$TEST_VARIANTS" != "x,"; then
14592     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14593  fi
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14595$as_echo "$with_jvm_variants" >&6; }
14596
14597  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14598  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14599  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14600  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14601  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14602  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14603  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14604
14605  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14606    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14607      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14608    fi
14609  fi
14610  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14611    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14612      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14613    fi
14614  fi
14615  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14616    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14617      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14618    fi
14619  fi
14620
14621  # Replace the commas with AND for use in the build directory name.
14622  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14623  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/'`
14624  if test "x$COUNT_VARIANTS" != "x,1"; then
14625    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14626  else
14627    BUILDING_MULTIPLE_JVM_VARIANTS=no
14628  fi
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639  INCLUDE_SA=true
14640  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14641    INCLUDE_SA=false
14642  fi
14643  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14644    INCLUDE_SA=false
14645  fi
14646  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14647    INCLUDE_SA=false
14648  fi
14649  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14650    INCLUDE_SA=false
14651  fi
14652
14653
14654  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14655    MACOSX_UNIVERSAL="true"
14656  fi
14657
14658
14659
14660
14661  ###############################################################################
14662  #
14663  # Set the debug level
14664  #    release: no debug information, all optimizations, no asserts.
14665  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14666  #    fastdebug: debug information (-g), all optimizations, all asserts
14667  #    slowdebug: debug information (-g), no optimizations, all asserts
14668  #
14669  DEBUG_LEVEL="release"
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14671$as_echo_n "checking which debug level to use... " >&6; }
14672  # Check whether --enable-debug was given.
14673if test "${enable_debug+set}" = set; then :
14674  enableval=$enable_debug;
14675        ENABLE_DEBUG="${enableval}"
14676        DEBUG_LEVEL="fastdebug"
14677
14678else
14679  ENABLE_DEBUG="no"
14680fi
14681
14682
14683
14684# Check whether --with-debug-level was given.
14685if test "${with_debug_level+set}" = set; then :
14686  withval=$with_debug_level;
14687        DEBUG_LEVEL="${withval}"
14688        if test "x$ENABLE_DEBUG" = xyes; then
14689          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14690        fi
14691
14692fi
14693
14694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14695$as_echo "$DEBUG_LEVEL" >&6; }
14696
14697  if test "x$DEBUG_LEVEL" != xrelease && \
14698      test "x$DEBUG_LEVEL" != xoptimized && \
14699      test "x$DEBUG_LEVEL" != xfastdebug && \
14700      test "x$DEBUG_LEVEL" != xslowdebug; then
14701    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14702  fi
14703
14704
14705  ###############################################################################
14706  #
14707  # Setup legacy vars/targets and new vars to deal with different debug levels.
14708  #
14709
14710  case $DEBUG_LEVEL in
14711    release )
14712      VARIANT="OPT"
14713      FASTDEBUG="false"
14714      DEBUG_CLASSFILES="false"
14715      BUILD_VARIANT_RELEASE=""
14716      HOTSPOT_DEBUG_LEVEL="product"
14717      HOTSPOT_EXPORT="product"
14718      ;;
14719    fastdebug )
14720      VARIANT="DBG"
14721      FASTDEBUG="true"
14722      DEBUG_CLASSFILES="true"
14723      BUILD_VARIANT_RELEASE="-fastdebug"
14724      HOTSPOT_DEBUG_LEVEL="fastdebug"
14725      HOTSPOT_EXPORT="fastdebug"
14726      ;;
14727    slowdebug )
14728      VARIANT="DBG"
14729      FASTDEBUG="false"
14730      DEBUG_CLASSFILES="true"
14731      BUILD_VARIANT_RELEASE="-debug"
14732      HOTSPOT_DEBUG_LEVEL="debug"
14733      HOTSPOT_EXPORT="debug"
14734      ;;
14735    optimized )
14736      VARIANT="OPT"
14737      FASTDEBUG="false"
14738      DEBUG_CLASSFILES="false"
14739      BUILD_VARIANT_RELEASE="-optimized"
14740      HOTSPOT_DEBUG_LEVEL="optimized"
14741      HOTSPOT_EXPORT="optimized"
14742      ;;
14743  esac
14744
14745  # The debug level 'optimized' is a little special because it is currently only
14746  # applicable to the HotSpot build where it means to build a completely
14747  # optimized version of the VM without any debugging code (like for the
14748  # 'release' debug level which is called 'product' in the HotSpot build) but
14749  # with the exception that it can contain additional code which is otherwise
14750  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14751  # test new and/or experimental features which are not intended for customer
14752  # shipment. Because these new features need to be tested and benchmarked in
14753  # real world scenarios, we want to build the containing JDK at the 'release'
14754  # debug level.
14755  if test "x$DEBUG_LEVEL" = xoptimized; then
14756    DEBUG_LEVEL="release"
14757  fi
14758
14759  #####
14760  # Generate the legacy makefile targets for hotspot.
14761  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14762  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14763  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14764  # But until then ...
14765  HOTSPOT_TARGET=""
14766
14767  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14768    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14769  fi
14770
14771  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14773  fi
14774
14775  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14776    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14777  fi
14778
14779  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14781  fi
14782
14783  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14785  fi
14786
14787  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14789  fi
14790
14791  if test "x$JVM_VARIANT_CORE" = xtrue; then
14792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14793  fi
14794
14795  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14796
14797  # On Macosx universal binaries are produced, but they only contain
14798  # 64 bit intel. This invalidates control of which jvms are built
14799  # from configure, but only server is valid anyway. Fix this
14800  # when hotspot makefiles are rewritten.
14801  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14802    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14803  fi
14804
14805  #####
14806
14807
14808
14809
14810
14811
14812
14813
14814# With basic setup done, call the custom early hook.
14815
14816
14817# Check if we have devkits, extra paths or sysroot set.
14818
14819
14820# Check whether --with-devkit was given.
14821if test "${with_devkit+set}" = set; then :
14822  withval=$with_devkit;
14823
14824  # Only process if variable expands to non-empty
14825
14826  if test "x$with_devkit" != x; then
14827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828
14829  # Input might be given as Windows format, start by converting to
14830  # unix format.
14831  path="$with_devkit"
14832  new_path=`$CYGPATH -u "$path"`
14833
14834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14837  # "foo.exe" is OK but "foo" is an error.
14838  #
14839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14840  # It is also a way to make sure we got the proper file name for the real test later on.
14841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14842  if test "x$test_shortpath" = x; then
14843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14844$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14845    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14846  fi
14847
14848  # Call helper function which possibly converts this using DOS-style short mode.
14849  # If so, the updated path is stored in $new_path.
14850
14851  input_path="$new_path"
14852  # Check if we need to convert this using DOS-style short mode. If the path
14853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14854  # take no chances and rewrite it.
14855  # Note: m4 eats our [], so we need to use [ and ] instead.
14856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14857  if test "x$has_forbidden_chars" != x; then
14858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14862      # Going to short mode and back again did indeed matter. Since short mode is
14863      # case insensitive, let's make it lowercase to improve readability.
14864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14865      # Now convert it back to Unix-stile (cygpath)
14866      input_path=`$CYGPATH -u "$shortmode_path"`
14867      new_path="$input_path"
14868    fi
14869  fi
14870
14871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14872  if test "x$test_cygdrive_prefix" = x; then
14873    # As a simple fix, exclude /usr/bin since it's not a real path.
14874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14876      # a path prefixed by /cygdrive for fixpath to work.
14877      new_path="$CYGWIN_ROOT_PATH$input_path"
14878    fi
14879  fi
14880
14881
14882  if test "x$path" != "x$new_path"; then
14883    with_devkit="$new_path"
14884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14885$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14886  fi
14887
14888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889
14890  path="$with_devkit"
14891  has_colon=`$ECHO $path | $GREP ^.:`
14892  new_path="$path"
14893  if test "x$has_colon" = x; then
14894    # Not in mixed or Windows style, start by that.
14895    new_path=`cmd //c echo $path`
14896  fi
14897
14898
14899  input_path="$new_path"
14900  # Check if we need to convert this using DOS-style short mode. If the path
14901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14902  # take no chances and rewrite it.
14903  # Note: m4 eats our [], so we need to use [ and ] instead.
14904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14905  if test "x$has_forbidden_chars" != x; then
14906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14908  fi
14909
14910
14911  windows_path="$new_path"
14912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14913    unix_path=`$CYGPATH -u "$windows_path"`
14914    new_path="$unix_path"
14915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14917    new_path="$unix_path"
14918  fi
14919
14920  if test "x$path" != "x$new_path"; then
14921    with_devkit="$new_path"
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14923$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14924  fi
14925
14926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14928
14929    else
14930      # We're on a unix platform. Hooray! :)
14931      path="$with_devkit"
14932      has_space=`$ECHO "$path" | $GREP " "`
14933      if test "x$has_space" != x; then
14934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14935$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14937      fi
14938
14939      # Use eval to expand a potential ~
14940      eval path="$path"
14941      if test ! -f "$path" && test ! -d "$path"; then
14942        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14943      fi
14944
14945      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14946    fi
14947  fi
14948
14949        DEVKIT_ROOT="$with_devkit"
14950        # Check for a meta data info file in the root of the devkit
14951        if test -f "$DEVKIT_ROOT/devkit.info"; then
14952          # This potentially sets the following:
14953          # DEVKIT_NAME: A descriptive name of the devkit
14954          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14955          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14956          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14957          . $DEVKIT_ROOT/devkit.info
14958        fi
14959
14960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14961$as_echo_n "checking for devkit... " >&6; }
14962        if test "x$DEVKIT_NAME" != x; then
14963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14964$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14965        else
14966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14967$as_echo "$DEVKIT_ROOT" >&6; }
14968        fi
14969
14970        if test "x$DEVKIT_EXTRA_PATH" != x; then
14971
14972  if test "x$DEVKIT_EXTRA_PATH" != x; then
14973    if test "x$EXTRA_PATH" = x; then
14974      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14975    else
14976      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14977    fi
14978  fi
14979
14980        fi
14981
14982        # Fallback default of just /bin if DEVKIT_PATH is not defined
14983        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14984          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14985        fi
14986
14987  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14988    if test "x$TOOLCHAIN_PATH" = x; then
14989      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14990    else
14991      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14992    fi
14993  fi
14994
14995
14996        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14997        # places for backwards compatiblity.
14998        if test "x$DEVKIT_SYSROOT" != x; then
14999          SYSROOT="$DEVKIT_SYSROOT"
15000        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15001          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15002        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15003          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15004        fi
15005
15006
15007fi
15008
15009
15010  # You can force the sysroot if the sysroot encoded into the compiler tools
15011  # is not correct.
15012
15013# Check whether --with-sys-root was given.
15014if test "${with_sys_root+set}" = set; then :
15015  withval=$with_sys_root; SYSROOT=$with_sys_root
15016
15017fi
15018
15019
15020
15021# Check whether --with-sysroot was given.
15022if test "${with_sysroot+set}" = set; then :
15023  withval=$with_sysroot; SYSROOT=$with_sysroot
15024
15025fi
15026
15027
15028
15029# Check whether --with-tools-dir was given.
15030if test "${with_tools_dir+set}" = set; then :
15031  withval=$with_tools_dir;
15032  if test "x$with_tools_dir" != x; then
15033    if test "x$TOOLCHAIN_PATH" = x; then
15034      TOOLCHAIN_PATH="$with_tools_dir"
15035    else
15036      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15037    fi
15038  fi
15039
15040
15041fi
15042
15043
15044
15045# Check whether --with-toolchain-path was given.
15046if test "${with_toolchain_path+set}" = set; then :
15047  withval=$with_toolchain_path;
15048  if test "x$with_toolchain_path" != x; then
15049    if test "x$TOOLCHAIN_PATH" = x; then
15050      TOOLCHAIN_PATH="$with_toolchain_path"
15051    else
15052      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15053    fi
15054  fi
15055
15056
15057fi
15058
15059
15060
15061# Check whether --with-extra-path was given.
15062if test "${with_extra_path+set}" = set; then :
15063  withval=$with_extra_path;
15064  if test "x$with_extra_path" != x; then
15065    if test "x$EXTRA_PATH" = x; then
15066      EXTRA_PATH="$with_extra_path"
15067    else
15068      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15069    fi
15070  fi
15071
15072
15073fi
15074
15075
15076  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15077    # detect if Xcode is installed by running xcodebuild -version
15078    # if no Xcode installed, xcodebuild exits with 1
15079    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15080    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15081      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15082      # fall back on the stub binary in /usr/bin/xcodebuild
15083      # Extract the first word of "xcodebuild", so it can be a program name with args.
15084set dummy xcodebuild; ac_word=$2
15085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15086$as_echo_n "checking for $ac_word... " >&6; }
15087if ${ac_cv_path_XCODEBUILD+:} false; then :
15088  $as_echo_n "(cached) " >&6
15089else
15090  case $XCODEBUILD in
15091  [\\/]* | ?:[\\/]*)
15092  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15093  ;;
15094  *)
15095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15096for as_dir in $TOOLCHAIN_PATH
15097do
15098  IFS=$as_save_IFS
15099  test -z "$as_dir" && as_dir=.
15100    for ac_exec_ext in '' $ac_executable_extensions; do
15101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15102    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15104    break 2
15105  fi
15106done
15107  done
15108IFS=$as_save_IFS
15109
15110  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15111  ;;
15112esac
15113fi
15114XCODEBUILD=$ac_cv_path_XCODEBUILD
15115if test -n "$XCODEBUILD"; then
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15117$as_echo "$XCODEBUILD" >&6; }
15118else
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15120$as_echo "no" >&6; }
15121fi
15122
15123
15124    else
15125      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15126      # when only the command line tools are installed there are no SDKs, so headers
15127      # are copied into the system frameworks
15128      XCODEBUILD=
15129
15130    fi
15131
15132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15133$as_echo_n "checking for sdk name... " >&6; }
15134
15135# Check whether --with-sdk-name was given.
15136if test "${with_sdk_name+set}" = set; then :
15137  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15138
15139fi
15140
15141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15142$as_echo "$SDKNAME" >&6; }
15143
15144    # if toolchain path is specified then don't rely on system headers, they may not compile
15145    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15146    test -z "$TOOLCHAIN_PATH" && \
15147      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15148
15149    if test -z "$SYSROOT"; then
15150      if test -n "$XCODEBUILD"; then
15151        # if we don't have system headers, use default SDK name (last resort)
15152        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15153          SDKNAME=${SDKNAME:-macosx}
15154        fi
15155
15156        if test -n "$SDKNAME"; then
15157          # Call xcodebuild to determine SYSROOT
15158          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15159        fi
15160      else
15161        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15162          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
15163        fi
15164      fi
15165    else
15166      # warn user if --with-sdk-name was also set
15167      if test -n "$with_sdk_name"; then
15168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15169$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15170      fi
15171    fi
15172
15173    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15174      # If no system framework headers, then SYSROOT must be set, or we won't build
15175      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
15176    fi
15177
15178    # Perform a basic sanity test
15179    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15180      if test -z "$SYSROOT"; then
15181        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
15182      else
15183        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15184      fi
15185    fi
15186
15187    # set SDKROOT too, Xcode tools will pick it up
15188    SDKROOT=$SYSROOT
15189
15190  fi
15191
15192  # Prepend the extra path to the global path
15193
15194  if test "x$EXTRA_PATH" != x; then
15195    if test "x$PATH" = x; then
15196      PATH="$EXTRA_PATH"
15197    else
15198      PATH="$EXTRA_PATH:$PATH"
15199    fi
15200  fi
15201
15202
15203  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15204    # Add extra search paths on solaris for utilities like ar and as etc...
15205    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15206  fi
15207
15208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15209$as_echo_n "checking for sysroot... " >&6; }
15210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15211$as_echo "$SYSROOT" >&6; }
15212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15213$as_echo_n "checking for toolchain path... " >&6; }
15214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15215$as_echo "$TOOLCHAIN_PATH" >&6; }
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15217$as_echo_n "checking for extra path... " >&6; }
15218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15219$as_echo "$EXTRA_PATH" >&6; }
15220
15221
15222# To properly create a configuration name, we need to have the OpenJDK target
15223# and options (variants and debug level) parsed.
15224
15225
15226
15227# Check whether --with-conf-name was given.
15228if test "${with_conf_name+set}" = set; then :
15229  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15230fi
15231
15232
15233  # Test from where we are running configure, in or outside of src root.
15234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15235$as_echo_n "checking where to store configuration... " >&6; }
15236  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15237      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15238      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15239    # We are running configure from the src root.
15240    # Create a default ./build/target-variant-debuglevel output root.
15241    if test "x${CONF_NAME}" = x; then
15242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15243$as_echo "in default location" >&6; }
15244      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15245    else
15246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15247$as_echo "in build directory with custom name" >&6; }
15248    fi
15249    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15250    $MKDIR -p "$OUTPUT_ROOT"
15251    if test ! -d "$OUTPUT_ROOT"; then
15252      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15253    fi
15254  else
15255    # We are running configure from outside of the src dir.
15256    # Then use the current directory as output dir!
15257    # If configuration is situated in normal build directory, just use the build
15258    # directory name as configuration name, otherwise use the complete path.
15259    if test "x${CONF_NAME}" = x; then
15260      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15261    fi
15262    OUTPUT_ROOT="$CURDIR"
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15264$as_echo "in current directory" >&6; }
15265
15266    # WARNING: This might be a bad thing to do. You need to be sure you want to
15267    # have a configuration in this directory. Do some sanity checks!
15268
15269    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15270      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15271      # other files
15272      files_present=`$LS $OUTPUT_ROOT`
15273      # Configure has already touched config.log and confdefs.h in the current dir when this check
15274      # is performed.
15275      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15276      | $TR -d '\n'`
15277      if test "x$filtered_files" != x; then
15278        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15279$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15280        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15281$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15283$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15285$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15286        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15287$as_echo "$as_me: seriously mess up just about everything." >&6;}
15288        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15289$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15290        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15291$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15292        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15293      fi
15294    fi
15295  fi
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15297$as_echo_n "checking what configuration name to use... " >&6; }
15298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15299$as_echo "$CONF_NAME" >&6; }
15300
15301
15302  # Only process if variable expands to non-empty
15303
15304  if test "x$OUTPUT_ROOT" != x; then
15305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15306
15307  # Input might be given as Windows format, start by converting to
15308  # unix format.
15309  path="$OUTPUT_ROOT"
15310  new_path=`$CYGPATH -u "$path"`
15311
15312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15315  # "foo.exe" is OK but "foo" is an error.
15316  #
15317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15318  # It is also a way to make sure we got the proper file name for the real test later on.
15319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15320  if test "x$test_shortpath" = x; then
15321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15322$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15323    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15324  fi
15325
15326  # Call helper function which possibly converts this using DOS-style short mode.
15327  # If so, the updated path is stored in $new_path.
15328
15329  input_path="$new_path"
15330  # Check if we need to convert this using DOS-style short mode. If the path
15331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15332  # take no chances and rewrite it.
15333  # Note: m4 eats our [], so we need to use [ and ] instead.
15334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15335  if test "x$has_forbidden_chars" != x; then
15336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15340      # Going to short mode and back again did indeed matter. Since short mode is
15341      # case insensitive, let's make it lowercase to improve readability.
15342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15343      # Now convert it back to Unix-stile (cygpath)
15344      input_path=`$CYGPATH -u "$shortmode_path"`
15345      new_path="$input_path"
15346    fi
15347  fi
15348
15349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15350  if test "x$test_cygdrive_prefix" = x; then
15351    # As a simple fix, exclude /usr/bin since it's not a real path.
15352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15354      # a path prefixed by /cygdrive for fixpath to work.
15355      new_path="$CYGWIN_ROOT_PATH$input_path"
15356    fi
15357  fi
15358
15359
15360  if test "x$path" != "x$new_path"; then
15361    OUTPUT_ROOT="$new_path"
15362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15363$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15364  fi
15365
15366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15367
15368  path="$OUTPUT_ROOT"
15369  has_colon=`$ECHO $path | $GREP ^.:`
15370  new_path="$path"
15371  if test "x$has_colon" = x; then
15372    # Not in mixed or Windows style, start by that.
15373    new_path=`cmd //c echo $path`
15374  fi
15375
15376
15377  input_path="$new_path"
15378  # Check if we need to convert this using DOS-style short mode. If the path
15379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15380  # take no chances and rewrite it.
15381  # Note: m4 eats our [], so we need to use [ and ] instead.
15382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15383  if test "x$has_forbidden_chars" != x; then
15384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15386  fi
15387
15388
15389  windows_path="$new_path"
15390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15391    unix_path=`$CYGPATH -u "$windows_path"`
15392    new_path="$unix_path"
15393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15395    new_path="$unix_path"
15396  fi
15397
15398  if test "x$path" != "x$new_path"; then
15399    OUTPUT_ROOT="$new_path"
15400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15401$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15402  fi
15403
15404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15406
15407    else
15408      # We're on a unix platform. Hooray! :)
15409      path="$OUTPUT_ROOT"
15410      has_space=`$ECHO "$path" | $GREP " "`
15411      if test "x$has_space" != x; then
15412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15413$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15415      fi
15416
15417      # Use eval to expand a potential ~
15418      eval path="$path"
15419      if test ! -f "$path" && test ! -d "$path"; then
15420        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15421      fi
15422
15423      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15424    fi
15425  fi
15426
15427
15428  SPEC=$OUTPUT_ROOT/spec.gmk
15429
15430  CONF_NAME=$CONF_NAME
15431
15432  OUTPUT_ROOT=$OUTPUT_ROOT
15433
15434
15435  # The spec.gmk file contains all variables for the make system.
15436  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15437
15438  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15439  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15440
15441  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15442  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15443
15444  # The compare.sh is used to compare the build output to other builds.
15445  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15446
15447  # The generated Makefile knows where the spec.gmk is and where the source is.
15448  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15449  # which will look for generated configurations
15450  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15451
15452
15453
15454# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15455
15456  for ac_prog in apt-get yum port pkgutil pkgadd
15457do
15458  # Extract the first word of "$ac_prog", so it can be a program name with args.
15459set dummy $ac_prog; ac_word=$2
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15461$as_echo_n "checking for $ac_word... " >&6; }
15462if ${ac_cv_prog_PKGHANDLER+:} false; then :
15463  $as_echo_n "(cached) " >&6
15464else
15465  if test -n "$PKGHANDLER"; then
15466  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15467else
15468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15469for as_dir in $PATH
15470do
15471  IFS=$as_save_IFS
15472  test -z "$as_dir" && as_dir=.
15473    for ac_exec_ext in '' $ac_executable_extensions; do
15474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15475    ac_cv_prog_PKGHANDLER="$ac_prog"
15476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15477    break 2
15478  fi
15479done
15480  done
15481IFS=$as_save_IFS
15482
15483fi
15484fi
15485PKGHANDLER=$ac_cv_prog_PKGHANDLER
15486if test -n "$PKGHANDLER"; then
15487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15488$as_echo "$PKGHANDLER" >&6; }
15489else
15490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15491$as_echo "no" >&6; }
15492fi
15493
15494
15495  test -n "$PKGHANDLER" && break
15496done
15497
15498
15499
15500# Setup tools that requires more complex handling, or that is not needed by the configure script.
15501
15502
15503  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15504  if test "x$MAKE" != x; then
15505    # User has supplied a make, test it.
15506    if test ! -f "$MAKE"; then
15507      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15508    fi
15509
15510  MAKE_CANDIDATE=""$MAKE""
15511  DESCRIPTION="user supplied MAKE=$MAKE"
15512  if test "x$MAKE_CANDIDATE" != x; then
15513    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15514$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15515    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15516    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15517    if test "x$IS_GNU_MAKE" = x; then
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15519$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15520    else
15521      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15522      if test "x$IS_MODERN_MAKE" = x; then
15523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15524$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15525      else
15526        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15527          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15528            MAKE_EXPECTED_ENV='cygwin'
15529          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15530            MAKE_EXPECTED_ENV='msys'
15531          else
15532            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15533          fi
15534          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15535          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15536        else
15537          # Not relevant for non-Windows
15538          IS_MAKE_CORRECT_ENV=true
15539        fi
15540        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15541          { $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
15542$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;}
15543        else
15544          FOUND_MAKE=$MAKE_CANDIDATE
15545
15546  # Only process if variable expands to non-empty
15547
15548  if test "x$FOUND_MAKE" != x; then
15549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15550
15551  # First separate the path from the arguments. This will split at the first
15552  # space.
15553  complete="$FOUND_MAKE"
15554  path="${complete%% *}"
15555  tmp="$complete EOL"
15556  arguments="${tmp#* }"
15557
15558  # Input might be given as Windows format, start by converting to
15559  # unix format.
15560  new_path=`$CYGPATH -u "$path"`
15561
15562  # Now try to locate executable using which
15563  new_path=`$WHICH "$new_path" 2> /dev/null`
15564  # bat and cmd files are not always considered executable in cygwin causing which
15565  # to not find them
15566  if test "x$new_path" = x \
15567      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15568      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15569    new_path=`$CYGPATH -u "$path"`
15570  fi
15571  if test "x$new_path" = x; then
15572    # Oops. Which didn't find the executable.
15573    # The splitting of arguments from the executable at a space might have been incorrect,
15574    # since paths with space are more likely in Windows. Give it another try with the whole
15575    # argument.
15576    path="$complete"
15577    arguments="EOL"
15578    new_path=`$CYGPATH -u "$path"`
15579    new_path=`$WHICH "$new_path" 2> /dev/null`
15580    # bat and cmd files are not always considered executable in cygwin causing which
15581    # to not find them
15582    if test "x$new_path" = x \
15583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15585      new_path=`$CYGPATH -u "$path"`
15586    fi
15587    if test "x$new_path" = x; then
15588      # It's still not found. Now this is an unrecoverable error.
15589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15591      has_space=`$ECHO "$complete" | $GREP " "`
15592      if test "x$has_space" != x; then
15593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15595      fi
15596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15597    fi
15598  fi
15599
15600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15603  # "foo.exe" is OK but "foo" is an error.
15604  #
15605  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15606  # It is also a way to make sure we got the proper file name for the real test later on.
15607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15608  if test "x$test_shortpath" = x; then
15609    # Short path failed, file does not exist as specified.
15610    # Try adding .exe or .cmd
15611    if test -f "${new_path}.exe"; then
15612      input_to_shortpath="${new_path}.exe"
15613    elif test -f "${new_path}.cmd"; then
15614      input_to_shortpath="${new_path}.cmd"
15615    else
15616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15617$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15620      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15621    fi
15622  else
15623    input_to_shortpath="$new_path"
15624  fi
15625
15626  # Call helper function which possibly converts this using DOS-style short mode.
15627  # If so, the updated path is stored in $new_path.
15628  new_path="$input_to_shortpath"
15629
15630  input_path="$input_to_shortpath"
15631  # Check if we need to convert this using DOS-style short mode. If the path
15632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15633  # take no chances and rewrite it.
15634  # Note: m4 eats our [], so we need to use [ and ] instead.
15635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15636  if test "x$has_forbidden_chars" != x; then
15637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15641      # Going to short mode and back again did indeed matter. Since short mode is
15642      # case insensitive, let's make it lowercase to improve readability.
15643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15644      # Now convert it back to Unix-stile (cygpath)
15645      input_path=`$CYGPATH -u "$shortmode_path"`
15646      new_path="$input_path"
15647    fi
15648  fi
15649
15650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15651  if test "x$test_cygdrive_prefix" = x; then
15652    # As a simple fix, exclude /usr/bin since it's not a real path.
15653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15655      # a path prefixed by /cygdrive for fixpath to work.
15656      new_path="$CYGWIN_ROOT_PATH$input_path"
15657    fi
15658  fi
15659
15660  # remove trailing .exe if any
15661  new_path="${new_path/%.exe/}"
15662
15663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15664
15665  # First separate the path from the arguments. This will split at the first
15666  # space.
15667  complete="$FOUND_MAKE"
15668  path="${complete%% *}"
15669  tmp="$complete EOL"
15670  arguments="${tmp#* }"
15671
15672  # Input might be given as Windows format, start by converting to
15673  # unix format.
15674  new_path="$path"
15675
15676  windows_path="$new_path"
15677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15678    unix_path=`$CYGPATH -u "$windows_path"`
15679    new_path="$unix_path"
15680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15682    new_path="$unix_path"
15683  fi
15684
15685
15686  # Now try to locate executable using which
15687  new_path=`$WHICH "$new_path" 2> /dev/null`
15688
15689  if test "x$new_path" = x; then
15690    # Oops. Which didn't find the executable.
15691    # The splitting of arguments from the executable at a space might have been incorrect,
15692    # since paths with space are more likely in Windows. Give it another try with the whole
15693    # argument.
15694    path="$complete"
15695    arguments="EOL"
15696    new_path="$path"
15697
15698  windows_path="$new_path"
15699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15700    unix_path=`$CYGPATH -u "$windows_path"`
15701    new_path="$unix_path"
15702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15704    new_path="$unix_path"
15705  fi
15706
15707
15708    new_path=`$WHICH "$new_path" 2> /dev/null`
15709    # bat and cmd files are not always considered executable in MSYS causing which
15710    # to not find them
15711    if test "x$new_path" = x \
15712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15714      new_path="$path"
15715
15716  windows_path="$new_path"
15717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15718    unix_path=`$CYGPATH -u "$windows_path"`
15719    new_path="$unix_path"
15720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15722    new_path="$unix_path"
15723  fi
15724
15725    fi
15726
15727    if test "x$new_path" = x; then
15728      # It's still not found. Now this is an unrecoverable error.
15729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15730$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15731      has_space=`$ECHO "$complete" | $GREP " "`
15732      if test "x$has_space" != x; then
15733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15735      fi
15736      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15737    fi
15738  fi
15739
15740  # Now new_path has a complete unix path to the binary
15741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15742    # Keep paths in /bin as-is, but remove trailing .exe if any
15743    new_path="${new_path/%.exe/}"
15744    # Do not save /bin paths to all_fixpath_prefixes!
15745  else
15746    # Not in mixed or Windows style, start by that.
15747    new_path=`cmd //c echo $new_path`
15748
15749  input_path="$new_path"
15750  # Check if we need to convert this using DOS-style short mode. If the path
15751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15752  # take no chances and rewrite it.
15753  # Note: m4 eats our [], so we need to use [ and ] instead.
15754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15755  if test "x$has_forbidden_chars" != x; then
15756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15758  fi
15759
15760    # Output is in $new_path
15761
15762  windows_path="$new_path"
15763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15764    unix_path=`$CYGPATH -u "$windows_path"`
15765    new_path="$unix_path"
15766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15768    new_path="$unix_path"
15769  fi
15770
15771    # remove trailing .exe if any
15772    new_path="${new_path/%.exe/}"
15773
15774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15776  fi
15777
15778    else
15779      # We're on a unix platform. Hooray! :)
15780      # First separate the path from the arguments. This will split at the first
15781      # space.
15782      complete="$FOUND_MAKE"
15783      path="${complete%% *}"
15784      tmp="$complete EOL"
15785      arguments="${tmp#* }"
15786
15787      # Cannot rely on the command "which" here since it doesn't always work.
15788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15789      if test -z "$is_absolute_path"; then
15790        # Path to executable is not absolute. Find it.
15791        IFS_save="$IFS"
15792        IFS=:
15793        for p in $PATH; do
15794          if test -f "$p/$path" && test -x "$p/$path"; then
15795            new_path="$p/$path"
15796            break
15797          fi
15798        done
15799        IFS="$IFS_save"
15800      else
15801        # This is an absolute path, we can use it without further modifications.
15802        new_path="$path"
15803      fi
15804
15805      if test "x$new_path" = x; then
15806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15808        has_space=`$ECHO "$complete" | $GREP " "`
15809        if test "x$has_space" != x; then
15810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15812        fi
15813        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15814      fi
15815    fi
15816
15817    # Now join together the path and the arguments once again
15818    if test "x$arguments" != xEOL; then
15819      new_complete="$new_path ${arguments% *}"
15820    else
15821      new_complete="$new_path"
15822    fi
15823
15824    if test "x$complete" != "x$new_complete"; then
15825      FOUND_MAKE="$new_complete"
15826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15827$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15828    fi
15829  fi
15830
15831        fi
15832      fi
15833    fi
15834  fi
15835
15836    if test "x$FOUND_MAKE" = x; then
15837      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15838    fi
15839  else
15840    # Try our hardest to locate a correct version of GNU make
15841    for ac_prog in gmake
15842do
15843  # Extract the first word of "$ac_prog", so it can be a program name with args.
15844set dummy $ac_prog; ac_word=$2
15845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15846$as_echo_n "checking for $ac_word... " >&6; }
15847if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15848  $as_echo_n "(cached) " >&6
15849else
15850  case $CHECK_GMAKE in
15851  [\\/]* | ?:[\\/]*)
15852  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15853  ;;
15854  *)
15855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15856for as_dir in $PATH
15857do
15858  IFS=$as_save_IFS
15859  test -z "$as_dir" && as_dir=.
15860    for ac_exec_ext in '' $ac_executable_extensions; do
15861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15862    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15864    break 2
15865  fi
15866done
15867  done
15868IFS=$as_save_IFS
15869
15870  ;;
15871esac
15872fi
15873CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15874if test -n "$CHECK_GMAKE"; then
15875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15876$as_echo "$CHECK_GMAKE" >&6; }
15877else
15878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15879$as_echo "no" >&6; }
15880fi
15881
15882
15883  test -n "$CHECK_GMAKE" && break
15884done
15885
15886
15887  MAKE_CANDIDATE=""$CHECK_GMAKE""
15888  DESCRIPTION="gmake in PATH"
15889  if test "x$MAKE_CANDIDATE" != x; then
15890    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15891$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15892    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15893    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15894    if test "x$IS_GNU_MAKE" = x; then
15895      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15896$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15897    else
15898      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15899      if test "x$IS_MODERN_MAKE" = x; then
15900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15901$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15902      else
15903        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15904          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15905            MAKE_EXPECTED_ENV='cygwin'
15906          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15907            MAKE_EXPECTED_ENV='msys'
15908          else
15909            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15910          fi
15911          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15912          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15913        else
15914          # Not relevant for non-Windows
15915          IS_MAKE_CORRECT_ENV=true
15916        fi
15917        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15918          { $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
15919$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;}
15920        else
15921          FOUND_MAKE=$MAKE_CANDIDATE
15922
15923  # Only process if variable expands to non-empty
15924
15925  if test "x$FOUND_MAKE" != x; then
15926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15927
15928  # First separate the path from the arguments. This will split at the first
15929  # space.
15930  complete="$FOUND_MAKE"
15931  path="${complete%% *}"
15932  tmp="$complete EOL"
15933  arguments="${tmp#* }"
15934
15935  # Input might be given as Windows format, start by converting to
15936  # unix format.
15937  new_path=`$CYGPATH -u "$path"`
15938
15939  # Now try to locate executable using which
15940  new_path=`$WHICH "$new_path" 2> /dev/null`
15941  # bat and cmd files are not always considered executable in cygwin causing which
15942  # to not find them
15943  if test "x$new_path" = x \
15944      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15945      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15946    new_path=`$CYGPATH -u "$path"`
15947  fi
15948  if test "x$new_path" = x; then
15949    # Oops. Which didn't find the executable.
15950    # The splitting of arguments from the executable at a space might have been incorrect,
15951    # since paths with space are more likely in Windows. Give it another try with the whole
15952    # argument.
15953    path="$complete"
15954    arguments="EOL"
15955    new_path=`$CYGPATH -u "$path"`
15956    new_path=`$WHICH "$new_path" 2> /dev/null`
15957    # bat and cmd files are not always considered executable in cygwin causing which
15958    # to not find them
15959    if test "x$new_path" = x \
15960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15962      new_path=`$CYGPATH -u "$path"`
15963    fi
15964    if test "x$new_path" = x; then
15965      # It's still not found. Now this is an unrecoverable error.
15966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15967$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15968      has_space=`$ECHO "$complete" | $GREP " "`
15969      if test "x$has_space" != x; then
15970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15972      fi
15973      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15974    fi
15975  fi
15976
15977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15980  # "foo.exe" is OK but "foo" is an error.
15981  #
15982  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15983  # It is also a way to make sure we got the proper file name for the real test later on.
15984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15985  if test "x$test_shortpath" = x; then
15986    # Short path failed, file does not exist as specified.
15987    # Try adding .exe or .cmd
15988    if test -f "${new_path}.exe"; then
15989      input_to_shortpath="${new_path}.exe"
15990    elif test -f "${new_path}.cmd"; then
15991      input_to_shortpath="${new_path}.cmd"
15992    else
15993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15994$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15995      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15996$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15997      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15998    fi
15999  else
16000    input_to_shortpath="$new_path"
16001  fi
16002
16003  # Call helper function which possibly converts this using DOS-style short mode.
16004  # If so, the updated path is stored in $new_path.
16005  new_path="$input_to_shortpath"
16006
16007  input_path="$input_to_shortpath"
16008  # Check if we need to convert this using DOS-style short mode. If the path
16009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16010  # take no chances and rewrite it.
16011  # Note: m4 eats our [], so we need to use [ and ] instead.
16012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16013  if test "x$has_forbidden_chars" != x; then
16014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16018      # Going to short mode and back again did indeed matter. Since short mode is
16019      # case insensitive, let's make it lowercase to improve readability.
16020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16021      # Now convert it back to Unix-stile (cygpath)
16022      input_path=`$CYGPATH -u "$shortmode_path"`
16023      new_path="$input_path"
16024    fi
16025  fi
16026
16027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16028  if test "x$test_cygdrive_prefix" = x; then
16029    # As a simple fix, exclude /usr/bin since it's not a real path.
16030    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16032      # a path prefixed by /cygdrive for fixpath to work.
16033      new_path="$CYGWIN_ROOT_PATH$input_path"
16034    fi
16035  fi
16036
16037  # remove trailing .exe if any
16038  new_path="${new_path/%.exe/}"
16039
16040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16041
16042  # First separate the path from the arguments. This will split at the first
16043  # space.
16044  complete="$FOUND_MAKE"
16045  path="${complete%% *}"
16046  tmp="$complete EOL"
16047  arguments="${tmp#* }"
16048
16049  # Input might be given as Windows format, start by converting to
16050  # unix format.
16051  new_path="$path"
16052
16053  windows_path="$new_path"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    new_path="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    new_path="$unix_path"
16060  fi
16061
16062
16063  # Now try to locate executable using which
16064  new_path=`$WHICH "$new_path" 2> /dev/null`
16065
16066  if test "x$new_path" = x; then
16067    # Oops. Which didn't find the executable.
16068    # The splitting of arguments from the executable at a space might have been incorrect,
16069    # since paths with space are more likely in Windows. Give it another try with the whole
16070    # argument.
16071    path="$complete"
16072    arguments="EOL"
16073    new_path="$path"
16074
16075  windows_path="$new_path"
16076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16077    unix_path=`$CYGPATH -u "$windows_path"`
16078    new_path="$unix_path"
16079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16081    new_path="$unix_path"
16082  fi
16083
16084
16085    new_path=`$WHICH "$new_path" 2> /dev/null`
16086    # bat and cmd files are not always considered executable in MSYS causing which
16087    # to not find them
16088    if test "x$new_path" = x \
16089        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16090        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16091      new_path="$path"
16092
16093  windows_path="$new_path"
16094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16095    unix_path=`$CYGPATH -u "$windows_path"`
16096    new_path="$unix_path"
16097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16099    new_path="$unix_path"
16100  fi
16101
16102    fi
16103
16104    if test "x$new_path" = x; then
16105      # It's still not found. Now this is an unrecoverable error.
16106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16108      has_space=`$ECHO "$complete" | $GREP " "`
16109      if test "x$has_space" != x; then
16110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16112      fi
16113      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16114    fi
16115  fi
16116
16117  # Now new_path has a complete unix path to the binary
16118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16119    # Keep paths in /bin as-is, but remove trailing .exe if any
16120    new_path="${new_path/%.exe/}"
16121    # Do not save /bin paths to all_fixpath_prefixes!
16122  else
16123    # Not in mixed or Windows style, start by that.
16124    new_path=`cmd //c echo $new_path`
16125
16126  input_path="$new_path"
16127  # Check if we need to convert this using DOS-style short mode. If the path
16128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16129  # take no chances and rewrite it.
16130  # Note: m4 eats our [], so we need to use [ and ] instead.
16131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16132  if test "x$has_forbidden_chars" != x; then
16133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16135  fi
16136
16137    # Output is in $new_path
16138
16139  windows_path="$new_path"
16140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16141    unix_path=`$CYGPATH -u "$windows_path"`
16142    new_path="$unix_path"
16143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16145    new_path="$unix_path"
16146  fi
16147
16148    # remove trailing .exe if any
16149    new_path="${new_path/%.exe/}"
16150
16151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16153  fi
16154
16155    else
16156      # We're on a unix platform. Hooray! :)
16157      # First separate the path from the arguments. This will split at the first
16158      # space.
16159      complete="$FOUND_MAKE"
16160      path="${complete%% *}"
16161      tmp="$complete EOL"
16162      arguments="${tmp#* }"
16163
16164      # Cannot rely on the command "which" here since it doesn't always work.
16165      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16166      if test -z "$is_absolute_path"; then
16167        # Path to executable is not absolute. Find it.
16168        IFS_save="$IFS"
16169        IFS=:
16170        for p in $PATH; do
16171          if test -f "$p/$path" && test -x "$p/$path"; then
16172            new_path="$p/$path"
16173            break
16174          fi
16175        done
16176        IFS="$IFS_save"
16177      else
16178        # This is an absolute path, we can use it without further modifications.
16179        new_path="$path"
16180      fi
16181
16182      if test "x$new_path" = x; then
16183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16185        has_space=`$ECHO "$complete" | $GREP " "`
16186        if test "x$has_space" != x; then
16187          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16189        fi
16190        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16191      fi
16192    fi
16193
16194    # Now join together the path and the arguments once again
16195    if test "x$arguments" != xEOL; then
16196      new_complete="$new_path ${arguments% *}"
16197    else
16198      new_complete="$new_path"
16199    fi
16200
16201    if test "x$complete" != "x$new_complete"; then
16202      FOUND_MAKE="$new_complete"
16203      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16204$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16205    fi
16206  fi
16207
16208        fi
16209      fi
16210    fi
16211  fi
16212
16213
16214    if test "x$FOUND_MAKE" = x; then
16215      for ac_prog in make
16216do
16217  # Extract the first word of "$ac_prog", so it can be a program name with args.
16218set dummy $ac_prog; ac_word=$2
16219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16220$as_echo_n "checking for $ac_word... " >&6; }
16221if ${ac_cv_path_CHECK_MAKE+:} false; then :
16222  $as_echo_n "(cached) " >&6
16223else
16224  case $CHECK_MAKE in
16225  [\\/]* | ?:[\\/]*)
16226  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16227  ;;
16228  *)
16229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16230for as_dir in $PATH
16231do
16232  IFS=$as_save_IFS
16233  test -z "$as_dir" && as_dir=.
16234    for ac_exec_ext in '' $ac_executable_extensions; do
16235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16236    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16238    break 2
16239  fi
16240done
16241  done
16242IFS=$as_save_IFS
16243
16244  ;;
16245esac
16246fi
16247CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16248if test -n "$CHECK_MAKE"; then
16249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16250$as_echo "$CHECK_MAKE" >&6; }
16251else
16252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16253$as_echo "no" >&6; }
16254fi
16255
16256
16257  test -n "$CHECK_MAKE" && break
16258done
16259
16260
16261  MAKE_CANDIDATE=""$CHECK_MAKE""
16262  DESCRIPTION="make in PATH"
16263  if test "x$MAKE_CANDIDATE" != x; then
16264    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16265$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16266    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16267    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16268    if test "x$IS_GNU_MAKE" = x; then
16269      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16270$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16271    else
16272      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16273      if test "x$IS_MODERN_MAKE" = x; then
16274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16275$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16276      else
16277        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16278          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16279            MAKE_EXPECTED_ENV='cygwin'
16280          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16281            MAKE_EXPECTED_ENV='msys'
16282          else
16283            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16284          fi
16285          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16286          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16287        else
16288          # Not relevant for non-Windows
16289          IS_MAKE_CORRECT_ENV=true
16290        fi
16291        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16292          { $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
16293$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;}
16294        else
16295          FOUND_MAKE=$MAKE_CANDIDATE
16296
16297  # Only process if variable expands to non-empty
16298
16299  if test "x$FOUND_MAKE" != x; then
16300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16301
16302  # First separate the path from the arguments. This will split at the first
16303  # space.
16304  complete="$FOUND_MAKE"
16305  path="${complete%% *}"
16306  tmp="$complete EOL"
16307  arguments="${tmp#* }"
16308
16309  # Input might be given as Windows format, start by converting to
16310  # unix format.
16311  new_path=`$CYGPATH -u "$path"`
16312
16313  # Now try to locate executable using which
16314  new_path=`$WHICH "$new_path" 2> /dev/null`
16315  # bat and cmd files are not always considered executable in cygwin causing which
16316  # to not find them
16317  if test "x$new_path" = x \
16318      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16319      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16320    new_path=`$CYGPATH -u "$path"`
16321  fi
16322  if test "x$new_path" = x; then
16323    # Oops. Which didn't find the executable.
16324    # The splitting of arguments from the executable at a space might have been incorrect,
16325    # since paths with space are more likely in Windows. Give it another try with the whole
16326    # argument.
16327    path="$complete"
16328    arguments="EOL"
16329    new_path=`$CYGPATH -u "$path"`
16330    new_path=`$WHICH "$new_path" 2> /dev/null`
16331    # bat and cmd files are not always considered executable in cygwin causing which
16332    # to not find them
16333    if test "x$new_path" = x \
16334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16336      new_path=`$CYGPATH -u "$path"`
16337    fi
16338    if test "x$new_path" = x; then
16339      # It's still not found. Now this is an unrecoverable error.
16340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16341$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16342      has_space=`$ECHO "$complete" | $GREP " "`
16343      if test "x$has_space" != x; then
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16346      fi
16347      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16348    fi
16349  fi
16350
16351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16354  # "foo.exe" is OK but "foo" is an error.
16355  #
16356  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16357  # It is also a way to make sure we got the proper file name for the real test later on.
16358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16359  if test "x$test_shortpath" = x; then
16360    # Short path failed, file does not exist as specified.
16361    # Try adding .exe or .cmd
16362    if test -f "${new_path}.exe"; then
16363      input_to_shortpath="${new_path}.exe"
16364    elif test -f "${new_path}.cmd"; then
16365      input_to_shortpath="${new_path}.cmd"
16366    else
16367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16372    fi
16373  else
16374    input_to_shortpath="$new_path"
16375  fi
16376
16377  # Call helper function which possibly converts this using DOS-style short mode.
16378  # If so, the updated path is stored in $new_path.
16379  new_path="$input_to_shortpath"
16380
16381  input_path="$input_to_shortpath"
16382  # Check if we need to convert this using DOS-style short mode. If the path
16383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16384  # take no chances and rewrite it.
16385  # Note: m4 eats our [], so we need to use [ and ] instead.
16386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16387  if test "x$has_forbidden_chars" != x; then
16388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16392      # Going to short mode and back again did indeed matter. Since short mode is
16393      # case insensitive, let's make it lowercase to improve readability.
16394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16395      # Now convert it back to Unix-stile (cygpath)
16396      input_path=`$CYGPATH -u "$shortmode_path"`
16397      new_path="$input_path"
16398    fi
16399  fi
16400
16401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16402  if test "x$test_cygdrive_prefix" = x; then
16403    # As a simple fix, exclude /usr/bin since it's not a real path.
16404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16406      # a path prefixed by /cygdrive for fixpath to work.
16407      new_path="$CYGWIN_ROOT_PATH$input_path"
16408    fi
16409  fi
16410
16411  # remove trailing .exe if any
16412  new_path="${new_path/%.exe/}"
16413
16414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16415
16416  # First separate the path from the arguments. This will split at the first
16417  # space.
16418  complete="$FOUND_MAKE"
16419  path="${complete%% *}"
16420  tmp="$complete EOL"
16421  arguments="${tmp#* }"
16422
16423  # Input might be given as Windows format, start by converting to
16424  # unix format.
16425  new_path="$path"
16426
16427  windows_path="$new_path"
16428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16429    unix_path=`$CYGPATH -u "$windows_path"`
16430    new_path="$unix_path"
16431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16433    new_path="$unix_path"
16434  fi
16435
16436
16437  # Now try to locate executable using which
16438  new_path=`$WHICH "$new_path" 2> /dev/null`
16439
16440  if test "x$new_path" = x; then
16441    # Oops. Which didn't find the executable.
16442    # The splitting of arguments from the executable at a space might have been incorrect,
16443    # since paths with space are more likely in Windows. Give it another try with the whole
16444    # argument.
16445    path="$complete"
16446    arguments="EOL"
16447    new_path="$path"
16448
16449  windows_path="$new_path"
16450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16451    unix_path=`$CYGPATH -u "$windows_path"`
16452    new_path="$unix_path"
16453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16455    new_path="$unix_path"
16456  fi
16457
16458
16459    new_path=`$WHICH "$new_path" 2> /dev/null`
16460    # bat and cmd files are not always considered executable in MSYS causing which
16461    # to not find them
16462    if test "x$new_path" = x \
16463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16465      new_path="$path"
16466
16467  windows_path="$new_path"
16468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16469    unix_path=`$CYGPATH -u "$windows_path"`
16470    new_path="$unix_path"
16471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16473    new_path="$unix_path"
16474  fi
16475
16476    fi
16477
16478    if test "x$new_path" = x; then
16479      # It's still not found. Now this is an unrecoverable error.
16480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16482      has_space=`$ECHO "$complete" | $GREP " "`
16483      if test "x$has_space" != x; then
16484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16486      fi
16487      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16488    fi
16489  fi
16490
16491  # Now new_path has a complete unix path to the binary
16492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16493    # Keep paths in /bin as-is, but remove trailing .exe if any
16494    new_path="${new_path/%.exe/}"
16495    # Do not save /bin paths to all_fixpath_prefixes!
16496  else
16497    # Not in mixed or Windows style, start by that.
16498    new_path=`cmd //c echo $new_path`
16499
16500  input_path="$new_path"
16501  # Check if we need to convert this using DOS-style short mode. If the path
16502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16503  # take no chances and rewrite it.
16504  # Note: m4 eats our [], so we need to use [ and ] instead.
16505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16506  if test "x$has_forbidden_chars" != x; then
16507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16509  fi
16510
16511    # Output is in $new_path
16512
16513  windows_path="$new_path"
16514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16515    unix_path=`$CYGPATH -u "$windows_path"`
16516    new_path="$unix_path"
16517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16519    new_path="$unix_path"
16520  fi
16521
16522    # remove trailing .exe if any
16523    new_path="${new_path/%.exe/}"
16524
16525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16527  fi
16528
16529    else
16530      # We're on a unix platform. Hooray! :)
16531      # First separate the path from the arguments. This will split at the first
16532      # space.
16533      complete="$FOUND_MAKE"
16534      path="${complete%% *}"
16535      tmp="$complete EOL"
16536      arguments="${tmp#* }"
16537
16538      # Cannot rely on the command "which" here since it doesn't always work.
16539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16540      if test -z "$is_absolute_path"; then
16541        # Path to executable is not absolute. Find it.
16542        IFS_save="$IFS"
16543        IFS=:
16544        for p in $PATH; do
16545          if test -f "$p/$path" && test -x "$p/$path"; then
16546            new_path="$p/$path"
16547            break
16548          fi
16549        done
16550        IFS="$IFS_save"
16551      else
16552        # This is an absolute path, we can use it without further modifications.
16553        new_path="$path"
16554      fi
16555
16556      if test "x$new_path" = x; then
16557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16559        has_space=`$ECHO "$complete" | $GREP " "`
16560        if test "x$has_space" != x; then
16561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16563        fi
16564        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16565      fi
16566    fi
16567
16568    # Now join together the path and the arguments once again
16569    if test "x$arguments" != xEOL; then
16570      new_complete="$new_path ${arguments% *}"
16571    else
16572      new_complete="$new_path"
16573    fi
16574
16575    if test "x$complete" != "x$new_complete"; then
16576      FOUND_MAKE="$new_complete"
16577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16578$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16579    fi
16580  fi
16581
16582        fi
16583      fi
16584    fi
16585  fi
16586
16587    fi
16588
16589    if test "x$FOUND_MAKE" = x; then
16590      if test "x$TOOLCHAIN_PATH" != x; then
16591        # We have a toolchain path, check that as well before giving up.
16592        OLD_PATH=$PATH
16593        PATH=$TOOLCHAIN_PATH:$PATH
16594        for ac_prog in gmake
16595do
16596  # Extract the first word of "$ac_prog", so it can be a program name with args.
16597set dummy $ac_prog; ac_word=$2
16598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16599$as_echo_n "checking for $ac_word... " >&6; }
16600if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16601  $as_echo_n "(cached) " >&6
16602else
16603  case $CHECK_TOOLSDIR_GMAKE in
16604  [\\/]* | ?:[\\/]*)
16605  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16606  ;;
16607  *)
16608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16609for as_dir in $PATH
16610do
16611  IFS=$as_save_IFS
16612  test -z "$as_dir" && as_dir=.
16613    for ac_exec_ext in '' $ac_executable_extensions; do
16614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16615    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16617    break 2
16618  fi
16619done
16620  done
16621IFS=$as_save_IFS
16622
16623  ;;
16624esac
16625fi
16626CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16627if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16629$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16630else
16631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16632$as_echo "no" >&6; }
16633fi
16634
16635
16636  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16637done
16638
16639
16640  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16641  DESCRIPTION="gmake in tools-dir"
16642  if test "x$MAKE_CANDIDATE" != x; then
16643    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16644$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16645    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16646    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16647    if test "x$IS_GNU_MAKE" = x; then
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16649$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16650    else
16651      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16652      if test "x$IS_MODERN_MAKE" = x; then
16653        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16654$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16655      else
16656        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16657          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16658            MAKE_EXPECTED_ENV='cygwin'
16659          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16660            MAKE_EXPECTED_ENV='msys'
16661          else
16662            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16663          fi
16664          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16665          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16666        else
16667          # Not relevant for non-Windows
16668          IS_MAKE_CORRECT_ENV=true
16669        fi
16670        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16671          { $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
16672$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;}
16673        else
16674          FOUND_MAKE=$MAKE_CANDIDATE
16675
16676  # Only process if variable expands to non-empty
16677
16678  if test "x$FOUND_MAKE" != x; then
16679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680
16681  # First separate the path from the arguments. This will split at the first
16682  # space.
16683  complete="$FOUND_MAKE"
16684  path="${complete%% *}"
16685  tmp="$complete EOL"
16686  arguments="${tmp#* }"
16687
16688  # Input might be given as Windows format, start by converting to
16689  # unix format.
16690  new_path=`$CYGPATH -u "$path"`
16691
16692  # Now try to locate executable using which
16693  new_path=`$WHICH "$new_path" 2> /dev/null`
16694  # bat and cmd files are not always considered executable in cygwin causing which
16695  # to not find them
16696  if test "x$new_path" = x \
16697      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16698      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16699    new_path=`$CYGPATH -u "$path"`
16700  fi
16701  if test "x$new_path" = x; then
16702    # Oops. Which didn't find the executable.
16703    # The splitting of arguments from the executable at a space might have been incorrect,
16704    # since paths with space are more likely in Windows. Give it another try with the whole
16705    # argument.
16706    path="$complete"
16707    arguments="EOL"
16708    new_path=`$CYGPATH -u "$path"`
16709    new_path=`$WHICH "$new_path" 2> /dev/null`
16710    # bat and cmd files are not always considered executable in cygwin causing which
16711    # to not find them
16712    if test "x$new_path" = x \
16713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16715      new_path=`$CYGPATH -u "$path"`
16716    fi
16717    if test "x$new_path" = x; then
16718      # It's still not found. Now this is an unrecoverable error.
16719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16720$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16721      has_space=`$ECHO "$complete" | $GREP " "`
16722      if test "x$has_space" != x; then
16723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16725      fi
16726      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16727    fi
16728  fi
16729
16730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16733  # "foo.exe" is OK but "foo" is an error.
16734  #
16735  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16736  # It is also a way to make sure we got the proper file name for the real test later on.
16737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16738  if test "x$test_shortpath" = x; then
16739    # Short path failed, file does not exist as specified.
16740    # Try adding .exe or .cmd
16741    if test -f "${new_path}.exe"; then
16742      input_to_shortpath="${new_path}.exe"
16743    elif test -f "${new_path}.cmd"; then
16744      input_to_shortpath="${new_path}.cmd"
16745    else
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16747$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16750      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16751    fi
16752  else
16753    input_to_shortpath="$new_path"
16754  fi
16755
16756  # Call helper function which possibly converts this using DOS-style short mode.
16757  # If so, the updated path is stored in $new_path.
16758  new_path="$input_to_shortpath"
16759
16760  input_path="$input_to_shortpath"
16761  # Check if we need to convert this using DOS-style short mode. If the path
16762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16763  # take no chances and rewrite it.
16764  # Note: m4 eats our [], so we need to use [ and ] instead.
16765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16766  if test "x$has_forbidden_chars" != x; then
16767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16771      # Going to short mode and back again did indeed matter. Since short mode is
16772      # case insensitive, let's make it lowercase to improve readability.
16773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16774      # Now convert it back to Unix-stile (cygpath)
16775      input_path=`$CYGPATH -u "$shortmode_path"`
16776      new_path="$input_path"
16777    fi
16778  fi
16779
16780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16781  if test "x$test_cygdrive_prefix" = x; then
16782    # As a simple fix, exclude /usr/bin since it's not a real path.
16783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16785      # a path prefixed by /cygdrive for fixpath to work.
16786      new_path="$CYGWIN_ROOT_PATH$input_path"
16787    fi
16788  fi
16789
16790  # remove trailing .exe if any
16791  new_path="${new_path/%.exe/}"
16792
16793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16794
16795  # First separate the path from the arguments. This will split at the first
16796  # space.
16797  complete="$FOUND_MAKE"
16798  path="${complete%% *}"
16799  tmp="$complete EOL"
16800  arguments="${tmp#* }"
16801
16802  # Input might be given as Windows format, start by converting to
16803  # unix format.
16804  new_path="$path"
16805
16806  windows_path="$new_path"
16807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16808    unix_path=`$CYGPATH -u "$windows_path"`
16809    new_path="$unix_path"
16810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16812    new_path="$unix_path"
16813  fi
16814
16815
16816  # Now try to locate executable using which
16817  new_path=`$WHICH "$new_path" 2> /dev/null`
16818
16819  if test "x$new_path" = x; then
16820    # Oops. Which didn't find the executable.
16821    # The splitting of arguments from the executable at a space might have been incorrect,
16822    # since paths with space are more likely in Windows. Give it another try with the whole
16823    # argument.
16824    path="$complete"
16825    arguments="EOL"
16826    new_path="$path"
16827
16828  windows_path="$new_path"
16829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830    unix_path=`$CYGPATH -u "$windows_path"`
16831    new_path="$unix_path"
16832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16834    new_path="$unix_path"
16835  fi
16836
16837
16838    new_path=`$WHICH "$new_path" 2> /dev/null`
16839    # bat and cmd files are not always considered executable in MSYS causing which
16840    # to not find them
16841    if test "x$new_path" = x \
16842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16844      new_path="$path"
16845
16846  windows_path="$new_path"
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848    unix_path=`$CYGPATH -u "$windows_path"`
16849    new_path="$unix_path"
16850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852    new_path="$unix_path"
16853  fi
16854
16855    fi
16856
16857    if test "x$new_path" = x; then
16858      # It's still not found. Now this is an unrecoverable error.
16859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16861      has_space=`$ECHO "$complete" | $GREP " "`
16862      if test "x$has_space" != x; then
16863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16865      fi
16866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16867    fi
16868  fi
16869
16870  # Now new_path has a complete unix path to the binary
16871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16872    # Keep paths in /bin as-is, but remove trailing .exe if any
16873    new_path="${new_path/%.exe/}"
16874    # Do not save /bin paths to all_fixpath_prefixes!
16875  else
16876    # Not in mixed or Windows style, start by that.
16877    new_path=`cmd //c echo $new_path`
16878
16879  input_path="$new_path"
16880  # Check if we need to convert this using DOS-style short mode. If the path
16881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16882  # take no chances and rewrite it.
16883  # Note: m4 eats our [], so we need to use [ and ] instead.
16884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16885  if test "x$has_forbidden_chars" != x; then
16886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16888  fi
16889
16890    # Output is in $new_path
16891
16892  windows_path="$new_path"
16893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16894    unix_path=`$CYGPATH -u "$windows_path"`
16895    new_path="$unix_path"
16896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16898    new_path="$unix_path"
16899  fi
16900
16901    # remove trailing .exe if any
16902    new_path="${new_path/%.exe/}"
16903
16904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16906  fi
16907
16908    else
16909      # We're on a unix platform. Hooray! :)
16910      # First separate the path from the arguments. This will split at the first
16911      # space.
16912      complete="$FOUND_MAKE"
16913      path="${complete%% *}"
16914      tmp="$complete EOL"
16915      arguments="${tmp#* }"
16916
16917      # Cannot rely on the command "which" here since it doesn't always work.
16918      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16919      if test -z "$is_absolute_path"; then
16920        # Path to executable is not absolute. Find it.
16921        IFS_save="$IFS"
16922        IFS=:
16923        for p in $PATH; do
16924          if test -f "$p/$path" && test -x "$p/$path"; then
16925            new_path="$p/$path"
16926            break
16927          fi
16928        done
16929        IFS="$IFS_save"
16930      else
16931        # This is an absolute path, we can use it without further modifications.
16932        new_path="$path"
16933      fi
16934
16935      if test "x$new_path" = x; then
16936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16937$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16938        has_space=`$ECHO "$complete" | $GREP " "`
16939        if test "x$has_space" != x; then
16940          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16942        fi
16943        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16944      fi
16945    fi
16946
16947    # Now join together the path and the arguments once again
16948    if test "x$arguments" != xEOL; then
16949      new_complete="$new_path ${arguments% *}"
16950    else
16951      new_complete="$new_path"
16952    fi
16953
16954    if test "x$complete" != "x$new_complete"; then
16955      FOUND_MAKE="$new_complete"
16956      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16957$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16958    fi
16959  fi
16960
16961        fi
16962      fi
16963    fi
16964  fi
16965
16966        if test "x$FOUND_MAKE" = x; then
16967          for ac_prog in make
16968do
16969  # Extract the first word of "$ac_prog", so it can be a program name with args.
16970set dummy $ac_prog; ac_word=$2
16971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16972$as_echo_n "checking for $ac_word... " >&6; }
16973if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16974  $as_echo_n "(cached) " >&6
16975else
16976  case $CHECK_TOOLSDIR_MAKE in
16977  [\\/]* | ?:[\\/]*)
16978  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16979  ;;
16980  *)
16981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16982for as_dir in $PATH
16983do
16984  IFS=$as_save_IFS
16985  test -z "$as_dir" && as_dir=.
16986    for ac_exec_ext in '' $ac_executable_extensions; do
16987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16988    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16990    break 2
16991  fi
16992done
16993  done
16994IFS=$as_save_IFS
16995
16996  ;;
16997esac
16998fi
16999CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17000if test -n "$CHECK_TOOLSDIR_MAKE"; then
17001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17002$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17003else
17004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17005$as_echo "no" >&6; }
17006fi
17007
17008
17009  test -n "$CHECK_TOOLSDIR_MAKE" && break
17010done
17011
17012
17013  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17014  DESCRIPTION="make in tools-dir"
17015  if test "x$MAKE_CANDIDATE" != x; then
17016    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17017$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17018    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17019    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17020    if test "x$IS_GNU_MAKE" = x; then
17021      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17022$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17023    else
17024      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
17025      if test "x$IS_MODERN_MAKE" = x; then
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17027$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17028      else
17029        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17030          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17031            MAKE_EXPECTED_ENV='cygwin'
17032          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17033            MAKE_EXPECTED_ENV='msys'
17034          else
17035            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17036          fi
17037          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17038          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17039        else
17040          # Not relevant for non-Windows
17041          IS_MAKE_CORRECT_ENV=true
17042        fi
17043        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17044          { $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
17045$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;}
17046        else
17047          FOUND_MAKE=$MAKE_CANDIDATE
17048
17049  # Only process if variable expands to non-empty
17050
17051  if test "x$FOUND_MAKE" != x; then
17052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17053
17054  # First separate the path from the arguments. This will split at the first
17055  # space.
17056  complete="$FOUND_MAKE"
17057  path="${complete%% *}"
17058  tmp="$complete EOL"
17059  arguments="${tmp#* }"
17060
17061  # Input might be given as Windows format, start by converting to
17062  # unix format.
17063  new_path=`$CYGPATH -u "$path"`
17064
17065  # Now try to locate executable using which
17066  new_path=`$WHICH "$new_path" 2> /dev/null`
17067  # bat and cmd files are not always considered executable in cygwin causing which
17068  # to not find them
17069  if test "x$new_path" = x \
17070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17072    new_path=`$CYGPATH -u "$path"`
17073  fi
17074  if test "x$new_path" = x; then
17075    # Oops. Which didn't find the executable.
17076    # The splitting of arguments from the executable at a space might have been incorrect,
17077    # since paths with space are more likely in Windows. Give it another try with the whole
17078    # argument.
17079    path="$complete"
17080    arguments="EOL"
17081    new_path=`$CYGPATH -u "$path"`
17082    new_path=`$WHICH "$new_path" 2> /dev/null`
17083    # bat and cmd files are not always considered executable in cygwin causing which
17084    # to not find them
17085    if test "x$new_path" = x \
17086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17088      new_path=`$CYGPATH -u "$path"`
17089    fi
17090    if test "x$new_path" = x; then
17091      # It's still not found. Now this is an unrecoverable error.
17092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17094      has_space=`$ECHO "$complete" | $GREP " "`
17095      if test "x$has_space" != x; then
17096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17098      fi
17099      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17100    fi
17101  fi
17102
17103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17106  # "foo.exe" is OK but "foo" is an error.
17107  #
17108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17109  # It is also a way to make sure we got the proper file name for the real test later on.
17110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17111  if test "x$test_shortpath" = x; then
17112    # Short path failed, file does not exist as specified.
17113    # Try adding .exe or .cmd
17114    if test -f "${new_path}.exe"; then
17115      input_to_shortpath="${new_path}.exe"
17116    elif test -f "${new_path}.cmd"; then
17117      input_to_shortpath="${new_path}.cmd"
17118    else
17119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17120$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17123      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17124    fi
17125  else
17126    input_to_shortpath="$new_path"
17127  fi
17128
17129  # Call helper function which possibly converts this using DOS-style short mode.
17130  # If so, the updated path is stored in $new_path.
17131  new_path="$input_to_shortpath"
17132
17133  input_path="$input_to_shortpath"
17134  # Check if we need to convert this using DOS-style short mode. If the path
17135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17136  # take no chances and rewrite it.
17137  # Note: m4 eats our [], so we need to use [ and ] instead.
17138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17139  if test "x$has_forbidden_chars" != x; then
17140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17144      # Going to short mode and back again did indeed matter. Since short mode is
17145      # case insensitive, let's make it lowercase to improve readability.
17146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17147      # Now convert it back to Unix-stile (cygpath)
17148      input_path=`$CYGPATH -u "$shortmode_path"`
17149      new_path="$input_path"
17150    fi
17151  fi
17152
17153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17154  if test "x$test_cygdrive_prefix" = x; then
17155    # As a simple fix, exclude /usr/bin since it's not a real path.
17156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17158      # a path prefixed by /cygdrive for fixpath to work.
17159      new_path="$CYGWIN_ROOT_PATH$input_path"
17160    fi
17161  fi
17162
17163  # remove trailing .exe if any
17164  new_path="${new_path/%.exe/}"
17165
17166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17167
17168  # First separate the path from the arguments. This will split at the first
17169  # space.
17170  complete="$FOUND_MAKE"
17171  path="${complete%% *}"
17172  tmp="$complete EOL"
17173  arguments="${tmp#* }"
17174
17175  # Input might be given as Windows format, start by converting to
17176  # unix format.
17177  new_path="$path"
17178
17179  windows_path="$new_path"
17180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17181    unix_path=`$CYGPATH -u "$windows_path"`
17182    new_path="$unix_path"
17183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17185    new_path="$unix_path"
17186  fi
17187
17188
17189  # Now try to locate executable using which
17190  new_path=`$WHICH "$new_path" 2> /dev/null`
17191
17192  if test "x$new_path" = x; then
17193    # Oops. Which didn't find the executable.
17194    # The splitting of arguments from the executable at a space might have been incorrect,
17195    # since paths with space are more likely in Windows. Give it another try with the whole
17196    # argument.
17197    path="$complete"
17198    arguments="EOL"
17199    new_path="$path"
17200
17201  windows_path="$new_path"
17202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17203    unix_path=`$CYGPATH -u "$windows_path"`
17204    new_path="$unix_path"
17205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17207    new_path="$unix_path"
17208  fi
17209
17210
17211    new_path=`$WHICH "$new_path" 2> /dev/null`
17212    # bat and cmd files are not always considered executable in MSYS causing which
17213    # to not find them
17214    if test "x$new_path" = x \
17215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17217      new_path="$path"
17218
17219  windows_path="$new_path"
17220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17221    unix_path=`$CYGPATH -u "$windows_path"`
17222    new_path="$unix_path"
17223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17225    new_path="$unix_path"
17226  fi
17227
17228    fi
17229
17230    if test "x$new_path" = x; then
17231      # It's still not found. Now this is an unrecoverable error.
17232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17233$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17234      has_space=`$ECHO "$complete" | $GREP " "`
17235      if test "x$has_space" != x; then
17236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17238      fi
17239      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17240    fi
17241  fi
17242
17243  # Now new_path has a complete unix path to the binary
17244  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17245    # Keep paths in /bin as-is, but remove trailing .exe if any
17246    new_path="${new_path/%.exe/}"
17247    # Do not save /bin paths to all_fixpath_prefixes!
17248  else
17249    # Not in mixed or Windows style, start by that.
17250    new_path=`cmd //c echo $new_path`
17251
17252  input_path="$new_path"
17253  # Check if we need to convert this using DOS-style short mode. If the path
17254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17255  # take no chances and rewrite it.
17256  # Note: m4 eats our [], so we need to use [ and ] instead.
17257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17258  if test "x$has_forbidden_chars" != x; then
17259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17261  fi
17262
17263    # Output is in $new_path
17264
17265  windows_path="$new_path"
17266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17267    unix_path=`$CYGPATH -u "$windows_path"`
17268    new_path="$unix_path"
17269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17271    new_path="$unix_path"
17272  fi
17273
17274    # remove trailing .exe if any
17275    new_path="${new_path/%.exe/}"
17276
17277    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17278    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17279  fi
17280
17281    else
17282      # We're on a unix platform. Hooray! :)
17283      # First separate the path from the arguments. This will split at the first
17284      # space.
17285      complete="$FOUND_MAKE"
17286      path="${complete%% *}"
17287      tmp="$complete EOL"
17288      arguments="${tmp#* }"
17289
17290      # Cannot rely on the command "which" here since it doesn't always work.
17291      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17292      if test -z "$is_absolute_path"; then
17293        # Path to executable is not absolute. Find it.
17294        IFS_save="$IFS"
17295        IFS=:
17296        for p in $PATH; do
17297          if test -f "$p/$path" && test -x "$p/$path"; then
17298            new_path="$p/$path"
17299            break
17300          fi
17301        done
17302        IFS="$IFS_save"
17303      else
17304        # This is an absolute path, we can use it without further modifications.
17305        new_path="$path"
17306      fi
17307
17308      if test "x$new_path" = x; then
17309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17310$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17311        has_space=`$ECHO "$complete" | $GREP " "`
17312        if test "x$has_space" != x; then
17313          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17314$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17315        fi
17316        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17317      fi
17318    fi
17319
17320    # Now join together the path and the arguments once again
17321    if test "x$arguments" != xEOL; then
17322      new_complete="$new_path ${arguments% *}"
17323    else
17324      new_complete="$new_path"
17325    fi
17326
17327    if test "x$complete" != "x$new_complete"; then
17328      FOUND_MAKE="$new_complete"
17329      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17330$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17331    fi
17332  fi
17333
17334        fi
17335      fi
17336    fi
17337  fi
17338
17339        fi
17340        PATH=$OLD_PATH
17341      fi
17342    fi
17343
17344    if test "x$FOUND_MAKE" = x; then
17345      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17346    fi
17347  fi
17348
17349  MAKE=$FOUND_MAKE
17350
17351  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17352$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17353
17354
17355  # Check if make supports the output sync option and if so, setup using it.
17356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17357$as_echo_n "checking if make --output-sync is supported... " >&6; }
17358  if $MAKE --version -O > /dev/null 2>&1; then
17359    OUTPUT_SYNC_SUPPORTED=true
17360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17361$as_echo "yes" >&6; }
17362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17363$as_echo_n "checking for output-sync value... " >&6; }
17364
17365# Check whether --with-output-sync was given.
17366if test "${with_output_sync+set}" = set; then :
17367  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17368fi
17369
17370    if test "x$OUTPUT_SYNC" = "x"; then
17371      OUTPUT_SYNC=none
17372    fi
17373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17374$as_echo "$OUTPUT_SYNC" >&6; }
17375    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17376      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17377    fi
17378  else
17379    OUTPUT_SYNC_SUPPORTED=false
17380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17381$as_echo "no" >&6; }
17382  fi
17383
17384
17385
17386
17387
17388
17389  # Test if find supports -delete
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17391$as_echo_n "checking if find supports -delete... " >&6; }
17392  FIND_DELETE="-delete"
17393
17394  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17395
17396  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17397
17398  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17399  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17400    # No, it does not.
17401    rm $DELETEDIR/TestIfFindSupportsDelete
17402    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17403      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17404      FIND_DELETE="-print | xargs rm"
17405    else
17406      FIND_DELETE="-exec rm \{\} \+"
17407    fi
17408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410  else
17411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17412$as_echo "yes" >&6; }
17413  fi
17414  rmdir $DELETEDIR
17415
17416
17417
17418  # These tools might not be installed by default,
17419  # need hint on how to install them.
17420
17421
17422
17423  # Publish this variable in the help.
17424
17425
17426  if test "x$UNZIP" = x; then
17427    # The variable is not set by user, try to locate tool using the code snippet
17428    for ac_prog in unzip
17429do
17430  # Extract the first word of "$ac_prog", so it can be a program name with args.
17431set dummy $ac_prog; ac_word=$2
17432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17433$as_echo_n "checking for $ac_word... " >&6; }
17434if ${ac_cv_path_UNZIP+:} false; then :
17435  $as_echo_n "(cached) " >&6
17436else
17437  case $UNZIP in
17438  [\\/]* | ?:[\\/]*)
17439  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17440  ;;
17441  *)
17442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17443for as_dir in $PATH
17444do
17445  IFS=$as_save_IFS
17446  test -z "$as_dir" && as_dir=.
17447    for ac_exec_ext in '' $ac_executable_extensions; do
17448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17449    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17451    break 2
17452  fi
17453done
17454  done
17455IFS=$as_save_IFS
17456
17457  ;;
17458esac
17459fi
17460UNZIP=$ac_cv_path_UNZIP
17461if test -n "$UNZIP"; then
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17463$as_echo "$UNZIP" >&6; }
17464else
17465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17466$as_echo "no" >&6; }
17467fi
17468
17469
17470  test -n "$UNZIP" && break
17471done
17472
17473  else
17474    # The variable is set, but is it from the command line or the environment?
17475
17476    # Try to remove the string !UNZIP! from our list.
17477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17479      # If it failed, the variable was not from the command line. Ignore it,
17480      # but warn the user (except for BASH, which is always set by the calling BASH).
17481      if test "xUNZIP" != xBASH; then
17482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17483$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17484      fi
17485      # Try to locate tool using the code snippet
17486      for ac_prog in unzip
17487do
17488  # Extract the first word of "$ac_prog", so it can be a program name with args.
17489set dummy $ac_prog; ac_word=$2
17490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17491$as_echo_n "checking for $ac_word... " >&6; }
17492if ${ac_cv_path_UNZIP+:} false; then :
17493  $as_echo_n "(cached) " >&6
17494else
17495  case $UNZIP in
17496  [\\/]* | ?:[\\/]*)
17497  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17498  ;;
17499  *)
17500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17501for as_dir in $PATH
17502do
17503  IFS=$as_save_IFS
17504  test -z "$as_dir" && as_dir=.
17505    for ac_exec_ext in '' $ac_executable_extensions; do
17506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17507    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17509    break 2
17510  fi
17511done
17512  done
17513IFS=$as_save_IFS
17514
17515  ;;
17516esac
17517fi
17518UNZIP=$ac_cv_path_UNZIP
17519if test -n "$UNZIP"; then
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17521$as_echo "$UNZIP" >&6; }
17522else
17523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17524$as_echo "no" >&6; }
17525fi
17526
17527
17528  test -n "$UNZIP" && break
17529done
17530
17531    else
17532      # If it succeeded, then it was overridden by the user. We will use it
17533      # for the tool.
17534
17535      # First remove it from the list of overridden variables, so we can test
17536      # for unknown variables in the end.
17537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17538
17539      # Check if the provided tool contains a complete path.
17540      tool_specified="$UNZIP"
17541      tool_basename="${tool_specified##*/}"
17542      if test "x$tool_basename" = "x$tool_specified"; then
17543        # A command without a complete path is provided, search $PATH.
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17545$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17546        # Extract the first word of "$tool_basename", so it can be a program name with args.
17547set dummy $tool_basename; ac_word=$2
17548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17549$as_echo_n "checking for $ac_word... " >&6; }
17550if ${ac_cv_path_UNZIP+:} false; then :
17551  $as_echo_n "(cached) " >&6
17552else
17553  case $UNZIP in
17554  [\\/]* | ?:[\\/]*)
17555  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17556  ;;
17557  *)
17558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17559for as_dir in $PATH
17560do
17561  IFS=$as_save_IFS
17562  test -z "$as_dir" && as_dir=.
17563    for ac_exec_ext in '' $ac_executable_extensions; do
17564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17565    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17567    break 2
17568  fi
17569done
17570  done
17571IFS=$as_save_IFS
17572
17573  ;;
17574esac
17575fi
17576UNZIP=$ac_cv_path_UNZIP
17577if test -n "$UNZIP"; then
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17579$as_echo "$UNZIP" >&6; }
17580else
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17582$as_echo "no" >&6; }
17583fi
17584
17585
17586        if test "x$UNZIP" = x; then
17587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17588        fi
17589      else
17590        # Otherwise we believe it is a complete path. Use it as it is.
17591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17592$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17594$as_echo_n "checking for UNZIP... " >&6; }
17595        if test ! -x "$tool_specified"; then
17596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17597$as_echo "not found" >&6; }
17598          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17599        fi
17600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17601$as_echo "$tool_specified" >&6; }
17602      fi
17603    fi
17604  fi
17605
17606
17607
17608  if test "x$UNZIP" = x; then
17609    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17610  fi
17611
17612
17613
17614
17615
17616  # Publish this variable in the help.
17617
17618
17619  if test "x$ZIP" = x; then
17620    # The variable is not set by user, try to locate tool using the code snippet
17621    for ac_prog in zip
17622do
17623  # Extract the first word of "$ac_prog", so it can be a program name with args.
17624set dummy $ac_prog; ac_word=$2
17625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17626$as_echo_n "checking for $ac_word... " >&6; }
17627if ${ac_cv_path_ZIP+:} false; then :
17628  $as_echo_n "(cached) " >&6
17629else
17630  case $ZIP in
17631  [\\/]* | ?:[\\/]*)
17632  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17633  ;;
17634  *)
17635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17636for as_dir in $PATH
17637do
17638  IFS=$as_save_IFS
17639  test -z "$as_dir" && as_dir=.
17640    for ac_exec_ext in '' $ac_executable_extensions; do
17641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17642    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17644    break 2
17645  fi
17646done
17647  done
17648IFS=$as_save_IFS
17649
17650  ;;
17651esac
17652fi
17653ZIP=$ac_cv_path_ZIP
17654if test -n "$ZIP"; then
17655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17656$as_echo "$ZIP" >&6; }
17657else
17658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17659$as_echo "no" >&6; }
17660fi
17661
17662
17663  test -n "$ZIP" && break
17664done
17665
17666  else
17667    # The variable is set, but is it from the command line or the environment?
17668
17669    # Try to remove the string !ZIP! from our list.
17670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17672      # If it failed, the variable was not from the command line. Ignore it,
17673      # but warn the user (except for BASH, which is always set by the calling BASH).
17674      if test "xZIP" != xBASH; then
17675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17676$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17677      fi
17678      # Try to locate tool using the code snippet
17679      for ac_prog in zip
17680do
17681  # Extract the first word of "$ac_prog", so it can be a program name with args.
17682set dummy $ac_prog; ac_word=$2
17683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17684$as_echo_n "checking for $ac_word... " >&6; }
17685if ${ac_cv_path_ZIP+:} false; then :
17686  $as_echo_n "(cached) " >&6
17687else
17688  case $ZIP in
17689  [\\/]* | ?:[\\/]*)
17690  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17691  ;;
17692  *)
17693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17694for as_dir in $PATH
17695do
17696  IFS=$as_save_IFS
17697  test -z "$as_dir" && as_dir=.
17698    for ac_exec_ext in '' $ac_executable_extensions; do
17699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17700    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17702    break 2
17703  fi
17704done
17705  done
17706IFS=$as_save_IFS
17707
17708  ;;
17709esac
17710fi
17711ZIP=$ac_cv_path_ZIP
17712if test -n "$ZIP"; then
17713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17714$as_echo "$ZIP" >&6; }
17715else
17716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17717$as_echo "no" >&6; }
17718fi
17719
17720
17721  test -n "$ZIP" && break
17722done
17723
17724    else
17725      # If it succeeded, then it was overridden by the user. We will use it
17726      # for the tool.
17727
17728      # First remove it from the list of overridden variables, so we can test
17729      # for unknown variables in the end.
17730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17731
17732      # Check if the provided tool contains a complete path.
17733      tool_specified="$ZIP"
17734      tool_basename="${tool_specified##*/}"
17735      if test "x$tool_basename" = "x$tool_specified"; then
17736        # A command without a complete path is provided, search $PATH.
17737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17738$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17739        # Extract the first word of "$tool_basename", so it can be a program name with args.
17740set dummy $tool_basename; ac_word=$2
17741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17742$as_echo_n "checking for $ac_word... " >&6; }
17743if ${ac_cv_path_ZIP+:} false; then :
17744  $as_echo_n "(cached) " >&6
17745else
17746  case $ZIP in
17747  [\\/]* | ?:[\\/]*)
17748  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17749  ;;
17750  *)
17751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17752for as_dir in $PATH
17753do
17754  IFS=$as_save_IFS
17755  test -z "$as_dir" && as_dir=.
17756    for ac_exec_ext in '' $ac_executable_extensions; do
17757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17758    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17760    break 2
17761  fi
17762done
17763  done
17764IFS=$as_save_IFS
17765
17766  ;;
17767esac
17768fi
17769ZIP=$ac_cv_path_ZIP
17770if test -n "$ZIP"; then
17771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17772$as_echo "$ZIP" >&6; }
17773else
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17775$as_echo "no" >&6; }
17776fi
17777
17778
17779        if test "x$ZIP" = x; then
17780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17781        fi
17782      else
17783        # Otherwise we believe it is a complete path. Use it as it is.
17784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17785$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17787$as_echo_n "checking for ZIP... " >&6; }
17788        if test ! -x "$tool_specified"; then
17789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17790$as_echo "not found" >&6; }
17791          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17792        fi
17793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17794$as_echo "$tool_specified" >&6; }
17795      fi
17796    fi
17797  fi
17798
17799
17800
17801  if test "x$ZIP" = x; then
17802    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17803  fi
17804
17805
17806
17807  # Non-required basic tools
17808
17809
17810
17811  # Publish this variable in the help.
17812
17813
17814  if test "x$LDD" = x; then
17815    # The variable is not set by user, try to locate tool using the code snippet
17816    for ac_prog in ldd
17817do
17818  # Extract the first word of "$ac_prog", so it can be a program name with args.
17819set dummy $ac_prog; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if ${ac_cv_path_LDD+:} false; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  case $LDD in
17826  [\\/]* | ?:[\\/]*)
17827  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17828  ;;
17829  *)
17830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17831for as_dir in $PATH
17832do
17833  IFS=$as_save_IFS
17834  test -z "$as_dir" && as_dir=.
17835    for ac_exec_ext in '' $ac_executable_extensions; do
17836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17837    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17839    break 2
17840  fi
17841done
17842  done
17843IFS=$as_save_IFS
17844
17845  ;;
17846esac
17847fi
17848LDD=$ac_cv_path_LDD
17849if test -n "$LDD"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17851$as_echo "$LDD" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858  test -n "$LDD" && break
17859done
17860
17861  else
17862    # The variable is set, but is it from the command line or the environment?
17863
17864    # Try to remove the string !LDD! from our list.
17865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17867      # If it failed, the variable was not from the command line. Ignore it,
17868      # but warn the user (except for BASH, which is always set by the calling BASH).
17869      if test "xLDD" != xBASH; then
17870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17871$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17872      fi
17873      # Try to locate tool using the code snippet
17874      for ac_prog in ldd
17875do
17876  # Extract the first word of "$ac_prog", so it can be a program name with args.
17877set dummy $ac_prog; ac_word=$2
17878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17879$as_echo_n "checking for $ac_word... " >&6; }
17880if ${ac_cv_path_LDD+:} false; then :
17881  $as_echo_n "(cached) " >&6
17882else
17883  case $LDD in
17884  [\\/]* | ?:[\\/]*)
17885  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17886  ;;
17887  *)
17888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17889for as_dir in $PATH
17890do
17891  IFS=$as_save_IFS
17892  test -z "$as_dir" && as_dir=.
17893    for ac_exec_ext in '' $ac_executable_extensions; do
17894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17895    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17897    break 2
17898  fi
17899done
17900  done
17901IFS=$as_save_IFS
17902
17903  ;;
17904esac
17905fi
17906LDD=$ac_cv_path_LDD
17907if test -n "$LDD"; then
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17909$as_echo "$LDD" >&6; }
17910else
17911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17912$as_echo "no" >&6; }
17913fi
17914
17915
17916  test -n "$LDD" && break
17917done
17918
17919    else
17920      # If it succeeded, then it was overridden by the user. We will use it
17921      # for the tool.
17922
17923      # First remove it from the list of overridden variables, so we can test
17924      # for unknown variables in the end.
17925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17926
17927      # Check if the provided tool contains a complete path.
17928      tool_specified="$LDD"
17929      tool_basename="${tool_specified##*/}"
17930      if test "x$tool_basename" = "x$tool_specified"; then
17931        # A command without a complete path is provided, search $PATH.
17932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17933$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17934        # Extract the first word of "$tool_basename", so it can be a program name with args.
17935set dummy $tool_basename; ac_word=$2
17936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17937$as_echo_n "checking for $ac_word... " >&6; }
17938if ${ac_cv_path_LDD+:} false; then :
17939  $as_echo_n "(cached) " >&6
17940else
17941  case $LDD in
17942  [\\/]* | ?:[\\/]*)
17943  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17944  ;;
17945  *)
17946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17947for as_dir in $PATH
17948do
17949  IFS=$as_save_IFS
17950  test -z "$as_dir" && as_dir=.
17951    for ac_exec_ext in '' $ac_executable_extensions; do
17952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17953    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17955    break 2
17956  fi
17957done
17958  done
17959IFS=$as_save_IFS
17960
17961  ;;
17962esac
17963fi
17964LDD=$ac_cv_path_LDD
17965if test -n "$LDD"; then
17966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17967$as_echo "$LDD" >&6; }
17968else
17969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17970$as_echo "no" >&6; }
17971fi
17972
17973
17974        if test "x$LDD" = x; then
17975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17976        fi
17977      else
17978        # Otherwise we believe it is a complete path. Use it as it is.
17979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17980$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17982$as_echo_n "checking for LDD... " >&6; }
17983        if test ! -x "$tool_specified"; then
17984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17985$as_echo "not found" >&6; }
17986          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17987        fi
17988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17989$as_echo "$tool_specified" >&6; }
17990      fi
17991    fi
17992  fi
17993
17994
17995  if test "x$LDD" = "x"; then
17996    # List shared lib dependencies is used for
17997    # debug output and checking for forbidden dependencies.
17998    # We can build without it.
17999    LDD="true"
18000  fi
18001
18002
18003  # Publish this variable in the help.
18004
18005
18006  if test "x$OTOOL" = x; then
18007    # The variable is not set by user, try to locate tool using the code snippet
18008    for ac_prog in otool
18009do
18010  # Extract the first word of "$ac_prog", so it can be a program name with args.
18011set dummy $ac_prog; ac_word=$2
18012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18013$as_echo_n "checking for $ac_word... " >&6; }
18014if ${ac_cv_path_OTOOL+:} false; then :
18015  $as_echo_n "(cached) " >&6
18016else
18017  case $OTOOL in
18018  [\\/]* | ?:[\\/]*)
18019  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18020  ;;
18021  *)
18022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18023for as_dir in $PATH
18024do
18025  IFS=$as_save_IFS
18026  test -z "$as_dir" && as_dir=.
18027    for ac_exec_ext in '' $ac_executable_extensions; do
18028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18029    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18031    break 2
18032  fi
18033done
18034  done
18035IFS=$as_save_IFS
18036
18037  ;;
18038esac
18039fi
18040OTOOL=$ac_cv_path_OTOOL
18041if test -n "$OTOOL"; then
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18043$as_echo "$OTOOL" >&6; }
18044else
18045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18046$as_echo "no" >&6; }
18047fi
18048
18049
18050  test -n "$OTOOL" && break
18051done
18052
18053  else
18054    # The variable is set, but is it from the command line or the environment?
18055
18056    # Try to remove the string !OTOOL! from our list.
18057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18059      # If it failed, the variable was not from the command line. Ignore it,
18060      # but warn the user (except for BASH, which is always set by the calling BASH).
18061      if test "xOTOOL" != xBASH; then
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18063$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18064      fi
18065      # Try to locate tool using the code snippet
18066      for ac_prog in otool
18067do
18068  # Extract the first word of "$ac_prog", so it can be a program name with args.
18069set dummy $ac_prog; ac_word=$2
18070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18071$as_echo_n "checking for $ac_word... " >&6; }
18072if ${ac_cv_path_OTOOL+:} false; then :
18073  $as_echo_n "(cached) " >&6
18074else
18075  case $OTOOL in
18076  [\\/]* | ?:[\\/]*)
18077  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18078  ;;
18079  *)
18080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18081for as_dir in $PATH
18082do
18083  IFS=$as_save_IFS
18084  test -z "$as_dir" && as_dir=.
18085    for ac_exec_ext in '' $ac_executable_extensions; do
18086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18087    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18089    break 2
18090  fi
18091done
18092  done
18093IFS=$as_save_IFS
18094
18095  ;;
18096esac
18097fi
18098OTOOL=$ac_cv_path_OTOOL
18099if test -n "$OTOOL"; then
18100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18101$as_echo "$OTOOL" >&6; }
18102else
18103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18104$as_echo "no" >&6; }
18105fi
18106
18107
18108  test -n "$OTOOL" && break
18109done
18110
18111    else
18112      # If it succeeded, then it was overridden by the user. We will use it
18113      # for the tool.
18114
18115      # First remove it from the list of overridden variables, so we can test
18116      # for unknown variables in the end.
18117      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18118
18119      # Check if the provided tool contains a complete path.
18120      tool_specified="$OTOOL"
18121      tool_basename="${tool_specified##*/}"
18122      if test "x$tool_basename" = "x$tool_specified"; then
18123        # A command without a complete path is provided, search $PATH.
18124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18125$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18126        # Extract the first word of "$tool_basename", so it can be a program name with args.
18127set dummy $tool_basename; ac_word=$2
18128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18129$as_echo_n "checking for $ac_word... " >&6; }
18130if ${ac_cv_path_OTOOL+:} false; then :
18131  $as_echo_n "(cached) " >&6
18132else
18133  case $OTOOL in
18134  [\\/]* | ?:[\\/]*)
18135  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18136  ;;
18137  *)
18138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18139for as_dir in $PATH
18140do
18141  IFS=$as_save_IFS
18142  test -z "$as_dir" && as_dir=.
18143    for ac_exec_ext in '' $ac_executable_extensions; do
18144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18145    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18147    break 2
18148  fi
18149done
18150  done
18151IFS=$as_save_IFS
18152
18153  ;;
18154esac
18155fi
18156OTOOL=$ac_cv_path_OTOOL
18157if test -n "$OTOOL"; then
18158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18159$as_echo "$OTOOL" >&6; }
18160else
18161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18162$as_echo "no" >&6; }
18163fi
18164
18165
18166        if test "x$OTOOL" = x; then
18167          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18168        fi
18169      else
18170        # Otherwise we believe it is a complete path. Use it as it is.
18171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18172$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18174$as_echo_n "checking for OTOOL... " >&6; }
18175        if test ! -x "$tool_specified"; then
18176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18177$as_echo "not found" >&6; }
18178          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18179        fi
18180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18181$as_echo "$tool_specified" >&6; }
18182      fi
18183    fi
18184  fi
18185
18186
18187  if test "x$OTOOL" = "x"; then
18188    OTOOL="true"
18189  fi
18190
18191
18192  # Publish this variable in the help.
18193
18194
18195  if test "x$READELF" = x; then
18196    # The variable is not set by user, try to locate tool using the code snippet
18197    for ac_prog in greadelf readelf
18198do
18199  # Extract the first word of "$ac_prog", so it can be a program name with args.
18200set dummy $ac_prog; ac_word=$2
18201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18202$as_echo_n "checking for $ac_word... " >&6; }
18203if ${ac_cv_path_READELF+:} false; then :
18204  $as_echo_n "(cached) " >&6
18205else
18206  case $READELF in
18207  [\\/]* | ?:[\\/]*)
18208  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18209  ;;
18210  *)
18211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18212for as_dir in $PATH
18213do
18214  IFS=$as_save_IFS
18215  test -z "$as_dir" && as_dir=.
18216    for ac_exec_ext in '' $ac_executable_extensions; do
18217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18218    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18220    break 2
18221  fi
18222done
18223  done
18224IFS=$as_save_IFS
18225
18226  ;;
18227esac
18228fi
18229READELF=$ac_cv_path_READELF
18230if test -n "$READELF"; then
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18232$as_echo "$READELF" >&6; }
18233else
18234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18235$as_echo "no" >&6; }
18236fi
18237
18238
18239  test -n "$READELF" && break
18240done
18241
18242  else
18243    # The variable is set, but is it from the command line or the environment?
18244
18245    # Try to remove the string !READELF! from our list.
18246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18248      # If it failed, the variable was not from the command line. Ignore it,
18249      # but warn the user (except for BASH, which is always set by the calling BASH).
18250      if test "xREADELF" != xBASH; then
18251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18252$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18253      fi
18254      # Try to locate tool using the code snippet
18255      for ac_prog in greadelf readelf
18256do
18257  # Extract the first word of "$ac_prog", so it can be a program name with args.
18258set dummy $ac_prog; ac_word=$2
18259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18260$as_echo_n "checking for $ac_word... " >&6; }
18261if ${ac_cv_path_READELF+:} false; then :
18262  $as_echo_n "(cached) " >&6
18263else
18264  case $READELF in
18265  [\\/]* | ?:[\\/]*)
18266  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18267  ;;
18268  *)
18269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18270for as_dir in $PATH
18271do
18272  IFS=$as_save_IFS
18273  test -z "$as_dir" && as_dir=.
18274    for ac_exec_ext in '' $ac_executable_extensions; do
18275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18276    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18278    break 2
18279  fi
18280done
18281  done
18282IFS=$as_save_IFS
18283
18284  ;;
18285esac
18286fi
18287READELF=$ac_cv_path_READELF
18288if test -n "$READELF"; then
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18290$as_echo "$READELF" >&6; }
18291else
18292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18293$as_echo "no" >&6; }
18294fi
18295
18296
18297  test -n "$READELF" && break
18298done
18299
18300    else
18301      # If it succeeded, then it was overridden by the user. We will use it
18302      # for the tool.
18303
18304      # First remove it from the list of overridden variables, so we can test
18305      # for unknown variables in the end.
18306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18307
18308      # Check if the provided tool contains a complete path.
18309      tool_specified="$READELF"
18310      tool_basename="${tool_specified##*/}"
18311      if test "x$tool_basename" = "x$tool_specified"; then
18312        # A command without a complete path is provided, search $PATH.
18313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18314$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18315        # Extract the first word of "$tool_basename", so it can be a program name with args.
18316set dummy $tool_basename; ac_word=$2
18317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18318$as_echo_n "checking for $ac_word... " >&6; }
18319if ${ac_cv_path_READELF+:} false; then :
18320  $as_echo_n "(cached) " >&6
18321else
18322  case $READELF in
18323  [\\/]* | ?:[\\/]*)
18324  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18325  ;;
18326  *)
18327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18328for as_dir in $PATH
18329do
18330  IFS=$as_save_IFS
18331  test -z "$as_dir" && as_dir=.
18332    for ac_exec_ext in '' $ac_executable_extensions; do
18333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18334    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18336    break 2
18337  fi
18338done
18339  done
18340IFS=$as_save_IFS
18341
18342  ;;
18343esac
18344fi
18345READELF=$ac_cv_path_READELF
18346if test -n "$READELF"; then
18347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18348$as_echo "$READELF" >&6; }
18349else
18350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18351$as_echo "no" >&6; }
18352fi
18353
18354
18355        if test "x$READELF" = x; then
18356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18357        fi
18358      else
18359        # Otherwise we believe it is a complete path. Use it as it is.
18360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18361$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18363$as_echo_n "checking for READELF... " >&6; }
18364        if test ! -x "$tool_specified"; then
18365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18366$as_echo "not found" >&6; }
18367          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18368        fi
18369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18370$as_echo "$tool_specified" >&6; }
18371      fi
18372    fi
18373  fi
18374
18375
18376
18377
18378  # Publish this variable in the help.
18379
18380
18381  if test "x$HG" = x; then
18382    # The variable is not set by user, try to locate tool using the code snippet
18383    for ac_prog in hg
18384do
18385  # Extract the first word of "$ac_prog", so it can be a program name with args.
18386set dummy $ac_prog; ac_word=$2
18387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18388$as_echo_n "checking for $ac_word... " >&6; }
18389if ${ac_cv_path_HG+:} false; then :
18390  $as_echo_n "(cached) " >&6
18391else
18392  case $HG in
18393  [\\/]* | ?:[\\/]*)
18394  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18395  ;;
18396  *)
18397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18398for as_dir in $PATH
18399do
18400  IFS=$as_save_IFS
18401  test -z "$as_dir" && as_dir=.
18402    for ac_exec_ext in '' $ac_executable_extensions; do
18403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18404    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18406    break 2
18407  fi
18408done
18409  done
18410IFS=$as_save_IFS
18411
18412  ;;
18413esac
18414fi
18415HG=$ac_cv_path_HG
18416if test -n "$HG"; then
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18418$as_echo "$HG" >&6; }
18419else
18420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18421$as_echo "no" >&6; }
18422fi
18423
18424
18425  test -n "$HG" && break
18426done
18427
18428  else
18429    # The variable is set, but is it from the command line or the environment?
18430
18431    # Try to remove the string !HG! from our list.
18432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18434      # If it failed, the variable was not from the command line. Ignore it,
18435      # but warn the user (except for BASH, which is always set by the calling BASH).
18436      if test "xHG" != xBASH; then
18437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18438$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18439      fi
18440      # Try to locate tool using the code snippet
18441      for ac_prog in hg
18442do
18443  # Extract the first word of "$ac_prog", so it can be a program name with args.
18444set dummy $ac_prog; ac_word=$2
18445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18446$as_echo_n "checking for $ac_word... " >&6; }
18447if ${ac_cv_path_HG+:} false; then :
18448  $as_echo_n "(cached) " >&6
18449else
18450  case $HG in
18451  [\\/]* | ?:[\\/]*)
18452  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18453  ;;
18454  *)
18455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18456for as_dir in $PATH
18457do
18458  IFS=$as_save_IFS
18459  test -z "$as_dir" && as_dir=.
18460    for ac_exec_ext in '' $ac_executable_extensions; do
18461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18462    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18464    break 2
18465  fi
18466done
18467  done
18468IFS=$as_save_IFS
18469
18470  ;;
18471esac
18472fi
18473HG=$ac_cv_path_HG
18474if test -n "$HG"; then
18475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18476$as_echo "$HG" >&6; }
18477else
18478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18479$as_echo "no" >&6; }
18480fi
18481
18482
18483  test -n "$HG" && break
18484done
18485
18486    else
18487      # If it succeeded, then it was overridden by the user. We will use it
18488      # for the tool.
18489
18490      # First remove it from the list of overridden variables, so we can test
18491      # for unknown variables in the end.
18492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18493
18494      # Check if the provided tool contains a complete path.
18495      tool_specified="$HG"
18496      tool_basename="${tool_specified##*/}"
18497      if test "x$tool_basename" = "x$tool_specified"; then
18498        # A command without a complete path is provided, search $PATH.
18499        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18500$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18501        # Extract the first word of "$tool_basename", so it can be a program name with args.
18502set dummy $tool_basename; ac_word=$2
18503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18504$as_echo_n "checking for $ac_word... " >&6; }
18505if ${ac_cv_path_HG+:} false; then :
18506  $as_echo_n "(cached) " >&6
18507else
18508  case $HG in
18509  [\\/]* | ?:[\\/]*)
18510  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18511  ;;
18512  *)
18513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18514for as_dir in $PATH
18515do
18516  IFS=$as_save_IFS
18517  test -z "$as_dir" && as_dir=.
18518    for ac_exec_ext in '' $ac_executable_extensions; do
18519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18520    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18522    break 2
18523  fi
18524done
18525  done
18526IFS=$as_save_IFS
18527
18528  ;;
18529esac
18530fi
18531HG=$ac_cv_path_HG
18532if test -n "$HG"; then
18533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18534$as_echo "$HG" >&6; }
18535else
18536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18537$as_echo "no" >&6; }
18538fi
18539
18540
18541        if test "x$HG" = x; then
18542          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18543        fi
18544      else
18545        # Otherwise we believe it is a complete path. Use it as it is.
18546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18547$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18548        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18549$as_echo_n "checking for HG... " >&6; }
18550        if test ! -x "$tool_specified"; then
18551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18552$as_echo "not found" >&6; }
18553          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18554        fi
18555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18556$as_echo "$tool_specified" >&6; }
18557      fi
18558    fi
18559  fi
18560
18561
18562
18563
18564  # Publish this variable in the help.
18565
18566
18567  if test "x$STAT" = x; then
18568    # The variable is not set by user, try to locate tool using the code snippet
18569    for ac_prog in stat
18570do
18571  # Extract the first word of "$ac_prog", so it can be a program name with args.
18572set dummy $ac_prog; ac_word=$2
18573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18574$as_echo_n "checking for $ac_word... " >&6; }
18575if ${ac_cv_path_STAT+:} false; then :
18576  $as_echo_n "(cached) " >&6
18577else
18578  case $STAT in
18579  [\\/]* | ?:[\\/]*)
18580  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18581  ;;
18582  *)
18583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18584for as_dir in $PATH
18585do
18586  IFS=$as_save_IFS
18587  test -z "$as_dir" && as_dir=.
18588    for ac_exec_ext in '' $ac_executable_extensions; do
18589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18590    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18592    break 2
18593  fi
18594done
18595  done
18596IFS=$as_save_IFS
18597
18598  ;;
18599esac
18600fi
18601STAT=$ac_cv_path_STAT
18602if test -n "$STAT"; then
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18604$as_echo "$STAT" >&6; }
18605else
18606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18607$as_echo "no" >&6; }
18608fi
18609
18610
18611  test -n "$STAT" && break
18612done
18613
18614  else
18615    # The variable is set, but is it from the command line or the environment?
18616
18617    # Try to remove the string !STAT! from our list.
18618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18620      # If it failed, the variable was not from the command line. Ignore it,
18621      # but warn the user (except for BASH, which is always set by the calling BASH).
18622      if test "xSTAT" != xBASH; then
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18624$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18625      fi
18626      # Try to locate tool using the code snippet
18627      for ac_prog in stat
18628do
18629  # Extract the first word of "$ac_prog", so it can be a program name with args.
18630set dummy $ac_prog; ac_word=$2
18631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18632$as_echo_n "checking for $ac_word... " >&6; }
18633if ${ac_cv_path_STAT+:} false; then :
18634  $as_echo_n "(cached) " >&6
18635else
18636  case $STAT in
18637  [\\/]* | ?:[\\/]*)
18638  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18639  ;;
18640  *)
18641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18642for as_dir in $PATH
18643do
18644  IFS=$as_save_IFS
18645  test -z "$as_dir" && as_dir=.
18646    for ac_exec_ext in '' $ac_executable_extensions; do
18647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18648    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18650    break 2
18651  fi
18652done
18653  done
18654IFS=$as_save_IFS
18655
18656  ;;
18657esac
18658fi
18659STAT=$ac_cv_path_STAT
18660if test -n "$STAT"; then
18661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18662$as_echo "$STAT" >&6; }
18663else
18664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18665$as_echo "no" >&6; }
18666fi
18667
18668
18669  test -n "$STAT" && break
18670done
18671
18672    else
18673      # If it succeeded, then it was overridden by the user. We will use it
18674      # for the tool.
18675
18676      # First remove it from the list of overridden variables, so we can test
18677      # for unknown variables in the end.
18678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18679
18680      # Check if the provided tool contains a complete path.
18681      tool_specified="$STAT"
18682      tool_basename="${tool_specified##*/}"
18683      if test "x$tool_basename" = "x$tool_specified"; then
18684        # A command without a complete path is provided, search $PATH.
18685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18686$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18687        # Extract the first word of "$tool_basename", so it can be a program name with args.
18688set dummy $tool_basename; ac_word=$2
18689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18690$as_echo_n "checking for $ac_word... " >&6; }
18691if ${ac_cv_path_STAT+:} false; then :
18692  $as_echo_n "(cached) " >&6
18693else
18694  case $STAT in
18695  [\\/]* | ?:[\\/]*)
18696  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18697  ;;
18698  *)
18699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18700for as_dir in $PATH
18701do
18702  IFS=$as_save_IFS
18703  test -z "$as_dir" && as_dir=.
18704    for ac_exec_ext in '' $ac_executable_extensions; do
18705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18706    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18708    break 2
18709  fi
18710done
18711  done
18712IFS=$as_save_IFS
18713
18714  ;;
18715esac
18716fi
18717STAT=$ac_cv_path_STAT
18718if test -n "$STAT"; then
18719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18720$as_echo "$STAT" >&6; }
18721else
18722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18723$as_echo "no" >&6; }
18724fi
18725
18726
18727        if test "x$STAT" = x; then
18728          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18729        fi
18730      else
18731        # Otherwise we believe it is a complete path. Use it as it is.
18732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18733$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18735$as_echo_n "checking for STAT... " >&6; }
18736        if test ! -x "$tool_specified"; then
18737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18738$as_echo "not found" >&6; }
18739          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18740        fi
18741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18742$as_echo "$tool_specified" >&6; }
18743      fi
18744    fi
18745  fi
18746
18747
18748
18749
18750  # Publish this variable in the help.
18751
18752
18753  if test "x$TIME" = x; then
18754    # The variable is not set by user, try to locate tool using the code snippet
18755    for ac_prog in time
18756do
18757  # Extract the first word of "$ac_prog", so it can be a program name with args.
18758set dummy $ac_prog; ac_word=$2
18759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18760$as_echo_n "checking for $ac_word... " >&6; }
18761if ${ac_cv_path_TIME+:} false; then :
18762  $as_echo_n "(cached) " >&6
18763else
18764  case $TIME in
18765  [\\/]* | ?:[\\/]*)
18766  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18767  ;;
18768  *)
18769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18770for as_dir in $PATH
18771do
18772  IFS=$as_save_IFS
18773  test -z "$as_dir" && as_dir=.
18774    for ac_exec_ext in '' $ac_executable_extensions; do
18775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18776    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18778    break 2
18779  fi
18780done
18781  done
18782IFS=$as_save_IFS
18783
18784  ;;
18785esac
18786fi
18787TIME=$ac_cv_path_TIME
18788if test -n "$TIME"; then
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18790$as_echo "$TIME" >&6; }
18791else
18792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18793$as_echo "no" >&6; }
18794fi
18795
18796
18797  test -n "$TIME" && break
18798done
18799
18800  else
18801    # The variable is set, but is it from the command line or the environment?
18802
18803    # Try to remove the string !TIME! from our list.
18804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18806      # If it failed, the variable was not from the command line. Ignore it,
18807      # but warn the user (except for BASH, which is always set by the calling BASH).
18808      if test "xTIME" != xBASH; then
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18810$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18811      fi
18812      # Try to locate tool using the code snippet
18813      for ac_prog in time
18814do
18815  # Extract the first word of "$ac_prog", so it can be a program name with args.
18816set dummy $ac_prog; ac_word=$2
18817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18818$as_echo_n "checking for $ac_word... " >&6; }
18819if ${ac_cv_path_TIME+:} false; then :
18820  $as_echo_n "(cached) " >&6
18821else
18822  case $TIME in
18823  [\\/]* | ?:[\\/]*)
18824  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18825  ;;
18826  *)
18827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18828for as_dir in $PATH
18829do
18830  IFS=$as_save_IFS
18831  test -z "$as_dir" && as_dir=.
18832    for ac_exec_ext in '' $ac_executable_extensions; do
18833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18834    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18836    break 2
18837  fi
18838done
18839  done
18840IFS=$as_save_IFS
18841
18842  ;;
18843esac
18844fi
18845TIME=$ac_cv_path_TIME
18846if test -n "$TIME"; then
18847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18848$as_echo "$TIME" >&6; }
18849else
18850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18851$as_echo "no" >&6; }
18852fi
18853
18854
18855  test -n "$TIME" && break
18856done
18857
18858    else
18859      # If it succeeded, then it was overridden by the user. We will use it
18860      # for the tool.
18861
18862      # First remove it from the list of overridden variables, so we can test
18863      # for unknown variables in the end.
18864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18865
18866      # Check if the provided tool contains a complete path.
18867      tool_specified="$TIME"
18868      tool_basename="${tool_specified##*/}"
18869      if test "x$tool_basename" = "x$tool_specified"; then
18870        # A command without a complete path is provided, search $PATH.
18871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18872$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18873        # Extract the first word of "$tool_basename", so it can be a program name with args.
18874set dummy $tool_basename; ac_word=$2
18875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18876$as_echo_n "checking for $ac_word... " >&6; }
18877if ${ac_cv_path_TIME+:} false; then :
18878  $as_echo_n "(cached) " >&6
18879else
18880  case $TIME in
18881  [\\/]* | ?:[\\/]*)
18882  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18883  ;;
18884  *)
18885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18886for as_dir in $PATH
18887do
18888  IFS=$as_save_IFS
18889  test -z "$as_dir" && as_dir=.
18890    for ac_exec_ext in '' $ac_executable_extensions; do
18891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18892    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18894    break 2
18895  fi
18896done
18897  done
18898IFS=$as_save_IFS
18899
18900  ;;
18901esac
18902fi
18903TIME=$ac_cv_path_TIME
18904if test -n "$TIME"; then
18905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18906$as_echo "$TIME" >&6; }
18907else
18908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18909$as_echo "no" >&6; }
18910fi
18911
18912
18913        if test "x$TIME" = x; then
18914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18915        fi
18916      else
18917        # Otherwise we believe it is a complete path. Use it as it is.
18918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18919$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18921$as_echo_n "checking for TIME... " >&6; }
18922        if test ! -x "$tool_specified"; then
18923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18924$as_echo "not found" >&6; }
18925          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18926        fi
18927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18928$as_echo "$tool_specified" >&6; }
18929      fi
18930    fi
18931  fi
18932
18933
18934  # Check if it's GNU time
18935  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18936  if test "x$IS_GNU_TIME" != x; then
18937    IS_GNU_TIME=yes
18938  else
18939    IS_GNU_TIME=no
18940  fi
18941
18942
18943  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18944
18945
18946
18947  # Publish this variable in the help.
18948
18949
18950  if test "x$DSYMUTIL" = x; then
18951    # The variable is not set by user, try to locate tool using the code snippet
18952    for ac_prog in dsymutil
18953do
18954  # Extract the first word of "$ac_prog", so it can be a program name with args.
18955set dummy $ac_prog; ac_word=$2
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18957$as_echo_n "checking for $ac_word... " >&6; }
18958if ${ac_cv_path_DSYMUTIL+:} false; then :
18959  $as_echo_n "(cached) " >&6
18960else
18961  case $DSYMUTIL in
18962  [\\/]* | ?:[\\/]*)
18963  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18964  ;;
18965  *)
18966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18967for as_dir in $PATH
18968do
18969  IFS=$as_save_IFS
18970  test -z "$as_dir" && as_dir=.
18971    for ac_exec_ext in '' $ac_executable_extensions; do
18972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18973    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18975    break 2
18976  fi
18977done
18978  done
18979IFS=$as_save_IFS
18980
18981  ;;
18982esac
18983fi
18984DSYMUTIL=$ac_cv_path_DSYMUTIL
18985if test -n "$DSYMUTIL"; then
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18987$as_echo "$DSYMUTIL" >&6; }
18988else
18989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18990$as_echo "no" >&6; }
18991fi
18992
18993
18994  test -n "$DSYMUTIL" && break
18995done
18996
18997  else
18998    # The variable is set, but is it from the command line or the environment?
18999
19000    # Try to remove the string !DSYMUTIL! from our list.
19001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19003      # If it failed, the variable was not from the command line. Ignore it,
19004      # but warn the user (except for BASH, which is always set by the calling BASH).
19005      if test "xDSYMUTIL" != xBASH; then
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19007$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19008      fi
19009      # Try to locate tool using the code snippet
19010      for ac_prog in dsymutil
19011do
19012  # Extract the first word of "$ac_prog", so it can be a program name with args.
19013set dummy $ac_prog; ac_word=$2
19014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19015$as_echo_n "checking for $ac_word... " >&6; }
19016if ${ac_cv_path_DSYMUTIL+:} false; then :
19017  $as_echo_n "(cached) " >&6
19018else
19019  case $DSYMUTIL in
19020  [\\/]* | ?:[\\/]*)
19021  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19022  ;;
19023  *)
19024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025for as_dir in $PATH
19026do
19027  IFS=$as_save_IFS
19028  test -z "$as_dir" && as_dir=.
19029    for ac_exec_ext in '' $ac_executable_extensions; do
19030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19031    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033    break 2
19034  fi
19035done
19036  done
19037IFS=$as_save_IFS
19038
19039  ;;
19040esac
19041fi
19042DSYMUTIL=$ac_cv_path_DSYMUTIL
19043if test -n "$DSYMUTIL"; then
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19045$as_echo "$DSYMUTIL" >&6; }
19046else
19047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19048$as_echo "no" >&6; }
19049fi
19050
19051
19052  test -n "$DSYMUTIL" && break
19053done
19054
19055    else
19056      # If it succeeded, then it was overridden by the user. We will use it
19057      # for the tool.
19058
19059      # First remove it from the list of overridden variables, so we can test
19060      # for unknown variables in the end.
19061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19062
19063      # Check if the provided tool contains a complete path.
19064      tool_specified="$DSYMUTIL"
19065      tool_basename="${tool_specified##*/}"
19066      if test "x$tool_basename" = "x$tool_specified"; then
19067        # A command without a complete path is provided, search $PATH.
19068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19069$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19070        # Extract the first word of "$tool_basename", so it can be a program name with args.
19071set dummy $tool_basename; ac_word=$2
19072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19073$as_echo_n "checking for $ac_word... " >&6; }
19074if ${ac_cv_path_DSYMUTIL+:} false; then :
19075  $as_echo_n "(cached) " >&6
19076else
19077  case $DSYMUTIL in
19078  [\\/]* | ?:[\\/]*)
19079  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19080  ;;
19081  *)
19082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19083for as_dir in $PATH
19084do
19085  IFS=$as_save_IFS
19086  test -z "$as_dir" && as_dir=.
19087    for ac_exec_ext in '' $ac_executable_extensions; do
19088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19089    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19091    break 2
19092  fi
19093done
19094  done
19095IFS=$as_save_IFS
19096
19097  ;;
19098esac
19099fi
19100DSYMUTIL=$ac_cv_path_DSYMUTIL
19101if test -n "$DSYMUTIL"; then
19102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19103$as_echo "$DSYMUTIL" >&6; }
19104else
19105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19106$as_echo "no" >&6; }
19107fi
19108
19109
19110        if test "x$DSYMUTIL" = x; then
19111          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19112        fi
19113      else
19114        # Otherwise we believe it is a complete path. Use it as it is.
19115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19116$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19118$as_echo_n "checking for DSYMUTIL... " >&6; }
19119        if test ! -x "$tool_specified"; then
19120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19121$as_echo "not found" >&6; }
19122          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19123        fi
19124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19125$as_echo "$tool_specified" >&6; }
19126      fi
19127    fi
19128  fi
19129
19130
19131
19132  if test "x$DSYMUTIL" = x; then
19133    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19134  fi
19135
19136
19137
19138
19139
19140  # Publish this variable in the help.
19141
19142
19143  if test "x$XATTR" = x; then
19144    # The variable is not set by user, try to locate tool using the code snippet
19145    for ac_prog in xattr
19146do
19147  # Extract the first word of "$ac_prog", so it can be a program name with args.
19148set dummy $ac_prog; ac_word=$2
19149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19150$as_echo_n "checking for $ac_word... " >&6; }
19151if ${ac_cv_path_XATTR+:} false; then :
19152  $as_echo_n "(cached) " >&6
19153else
19154  case $XATTR in
19155  [\\/]* | ?:[\\/]*)
19156  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19157  ;;
19158  *)
19159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19160for as_dir in $PATH
19161do
19162  IFS=$as_save_IFS
19163  test -z "$as_dir" && as_dir=.
19164    for ac_exec_ext in '' $ac_executable_extensions; do
19165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19166    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19168    break 2
19169  fi
19170done
19171  done
19172IFS=$as_save_IFS
19173
19174  ;;
19175esac
19176fi
19177XATTR=$ac_cv_path_XATTR
19178if test -n "$XATTR"; then
19179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19180$as_echo "$XATTR" >&6; }
19181else
19182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19183$as_echo "no" >&6; }
19184fi
19185
19186
19187  test -n "$XATTR" && break
19188done
19189
19190  else
19191    # The variable is set, but is it from the command line or the environment?
19192
19193    # Try to remove the string !XATTR! from our list.
19194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19196      # If it failed, the variable was not from the command line. Ignore it,
19197      # but warn the user (except for BASH, which is always set by the calling BASH).
19198      if test "xXATTR" != xBASH; then
19199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19200$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19201      fi
19202      # Try to locate tool using the code snippet
19203      for ac_prog in xattr
19204do
19205  # Extract the first word of "$ac_prog", so it can be a program name with args.
19206set dummy $ac_prog; ac_word=$2
19207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19208$as_echo_n "checking for $ac_word... " >&6; }
19209if ${ac_cv_path_XATTR+:} false; then :
19210  $as_echo_n "(cached) " >&6
19211else
19212  case $XATTR in
19213  [\\/]* | ?:[\\/]*)
19214  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19215  ;;
19216  *)
19217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19218for as_dir in $PATH
19219do
19220  IFS=$as_save_IFS
19221  test -z "$as_dir" && as_dir=.
19222    for ac_exec_ext in '' $ac_executable_extensions; do
19223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19224    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19226    break 2
19227  fi
19228done
19229  done
19230IFS=$as_save_IFS
19231
19232  ;;
19233esac
19234fi
19235XATTR=$ac_cv_path_XATTR
19236if test -n "$XATTR"; then
19237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19238$as_echo "$XATTR" >&6; }
19239else
19240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19241$as_echo "no" >&6; }
19242fi
19243
19244
19245  test -n "$XATTR" && break
19246done
19247
19248    else
19249      # If it succeeded, then it was overridden by the user. We will use it
19250      # for the tool.
19251
19252      # First remove it from the list of overridden variables, so we can test
19253      # for unknown variables in the end.
19254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19255
19256      # Check if the provided tool contains a complete path.
19257      tool_specified="$XATTR"
19258      tool_basename="${tool_specified##*/}"
19259      if test "x$tool_basename" = "x$tool_specified"; then
19260        # A command without a complete path is provided, search $PATH.
19261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19262$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19263        # Extract the first word of "$tool_basename", so it can be a program name with args.
19264set dummy $tool_basename; ac_word=$2
19265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19266$as_echo_n "checking for $ac_word... " >&6; }
19267if ${ac_cv_path_XATTR+:} false; then :
19268  $as_echo_n "(cached) " >&6
19269else
19270  case $XATTR in
19271  [\\/]* | ?:[\\/]*)
19272  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19273  ;;
19274  *)
19275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19276for as_dir in $PATH
19277do
19278  IFS=$as_save_IFS
19279  test -z "$as_dir" && as_dir=.
19280    for ac_exec_ext in '' $ac_executable_extensions; do
19281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19282    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19284    break 2
19285  fi
19286done
19287  done
19288IFS=$as_save_IFS
19289
19290  ;;
19291esac
19292fi
19293XATTR=$ac_cv_path_XATTR
19294if test -n "$XATTR"; then
19295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19296$as_echo "$XATTR" >&6; }
19297else
19298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19299$as_echo "no" >&6; }
19300fi
19301
19302
19303        if test "x$XATTR" = x; then
19304          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19305        fi
19306      else
19307        # Otherwise we believe it is a complete path. Use it as it is.
19308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19309$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19311$as_echo_n "checking for XATTR... " >&6; }
19312        if test ! -x "$tool_specified"; then
19313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19314$as_echo "not found" >&6; }
19315          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19316        fi
19317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19318$as_echo "$tool_specified" >&6; }
19319      fi
19320    fi
19321  fi
19322
19323
19324
19325  if test "x$XATTR" = x; then
19326    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19327  fi
19328
19329
19330
19331
19332  # Publish this variable in the help.
19333
19334
19335  if test "x$CODESIGN" = x; then
19336    # The variable is not set by user, try to locate tool using the code snippet
19337    for ac_prog in codesign
19338do
19339  # Extract the first word of "$ac_prog", so it can be a program name with args.
19340set dummy $ac_prog; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_CODESIGN+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $CODESIGN in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369CODESIGN=$ac_cv_path_CODESIGN
19370if test -n "$CODESIGN"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19372$as_echo "$CODESIGN" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379  test -n "$CODESIGN" && break
19380done
19381
19382  else
19383    # The variable is set, but is it from the command line or the environment?
19384
19385    # Try to remove the string !CODESIGN! from our list.
19386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19388      # If it failed, the variable was not from the command line. Ignore it,
19389      # but warn the user (except for BASH, which is always set by the calling BASH).
19390      if test "xCODESIGN" != xBASH; then
19391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19392$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19393      fi
19394      # Try to locate tool using the code snippet
19395      for ac_prog in codesign
19396do
19397  # Extract the first word of "$ac_prog", so it can be a program name with args.
19398set dummy $ac_prog; ac_word=$2
19399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19400$as_echo_n "checking for $ac_word... " >&6; }
19401if ${ac_cv_path_CODESIGN+:} false; then :
19402  $as_echo_n "(cached) " >&6
19403else
19404  case $CODESIGN in
19405  [\\/]* | ?:[\\/]*)
19406  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19407  ;;
19408  *)
19409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19410for as_dir in $PATH
19411do
19412  IFS=$as_save_IFS
19413  test -z "$as_dir" && as_dir=.
19414    for ac_exec_ext in '' $ac_executable_extensions; do
19415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19416    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19418    break 2
19419  fi
19420done
19421  done
19422IFS=$as_save_IFS
19423
19424  ;;
19425esac
19426fi
19427CODESIGN=$ac_cv_path_CODESIGN
19428if test -n "$CODESIGN"; then
19429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19430$as_echo "$CODESIGN" >&6; }
19431else
19432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19433$as_echo "no" >&6; }
19434fi
19435
19436
19437  test -n "$CODESIGN" && break
19438done
19439
19440    else
19441      # If it succeeded, then it was overridden by the user. We will use it
19442      # for the tool.
19443
19444      # First remove it from the list of overridden variables, so we can test
19445      # for unknown variables in the end.
19446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19447
19448      # Check if the provided tool contains a complete path.
19449      tool_specified="$CODESIGN"
19450      tool_basename="${tool_specified##*/}"
19451      if test "x$tool_basename" = "x$tool_specified"; then
19452        # A command without a complete path is provided, search $PATH.
19453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19454$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19455        # Extract the first word of "$tool_basename", so it can be a program name with args.
19456set dummy $tool_basename; ac_word=$2
19457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19458$as_echo_n "checking for $ac_word... " >&6; }
19459if ${ac_cv_path_CODESIGN+:} false; then :
19460  $as_echo_n "(cached) " >&6
19461else
19462  case $CODESIGN in
19463  [\\/]* | ?:[\\/]*)
19464  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19465  ;;
19466  *)
19467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19468for as_dir in $PATH
19469do
19470  IFS=$as_save_IFS
19471  test -z "$as_dir" && as_dir=.
19472    for ac_exec_ext in '' $ac_executable_extensions; do
19473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19474    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19476    break 2
19477  fi
19478done
19479  done
19480IFS=$as_save_IFS
19481
19482  ;;
19483esac
19484fi
19485CODESIGN=$ac_cv_path_CODESIGN
19486if test -n "$CODESIGN"; then
19487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19488$as_echo "$CODESIGN" >&6; }
19489else
19490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19491$as_echo "no" >&6; }
19492fi
19493
19494
19495        if test "x$CODESIGN" = x; then
19496          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19497        fi
19498      else
19499        # Otherwise we believe it is a complete path. Use it as it is.
19500        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19501$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19503$as_echo_n "checking for CODESIGN... " >&6; }
19504        if test ! -x "$tool_specified"; then
19505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19506$as_echo "not found" >&6; }
19507          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19508        fi
19509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19510$as_echo "$tool_specified" >&6; }
19511      fi
19512    fi
19513  fi
19514
19515
19516    if test "x$CODESIGN" != "x"; then
19517      # Verify that the openjdk_codesign certificate is present
19518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19519$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19520      rm -f codesign-testfile
19521      touch codesign-testfile
19522      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19523      rm -f codesign-testfile
19524      if test "x$CODESIGN" = x; then
19525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526$as_echo "no" >&6; }
19527      else
19528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19529$as_echo "yes" >&6; }
19530      fi
19531    fi
19532  fi
19533
19534
19535  # Test if bash supports pipefail.
19536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19537$as_echo_n "checking if bash supports pipefail... " >&6; }
19538  if ${BASH} -c 'set -o pipefail'; then
19539    BASH_ARGS="$BASH_ARGS -o pipefail"
19540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19541$as_echo "yes" >&6; }
19542  else
19543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19544$as_echo "no" >&6; }
19545  fi
19546
19547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19548$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19549  if ${BASH} -e -c 'true'; then
19550    BASH_ARGS="$BASH_ARGS -e"
19551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19552$as_echo "yes" >&6; }
19553  else
19554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19555$as_echo "no" >&6; }
19556  fi
19557
19558
19559
19560
19561# Check if pkg-config is available.
19562
19563
19564if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19565	if test -n "$ac_tool_prefix"; then
19566  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19567set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19569$as_echo_n "checking for $ac_word... " >&6; }
19570if ${ac_cv_path_PKG_CONFIG+:} false; then :
19571  $as_echo_n "(cached) " >&6
19572else
19573  case $PKG_CONFIG in
19574  [\\/]* | ?:[\\/]*)
19575  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19576  ;;
19577  *)
19578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19579for as_dir in $PATH
19580do
19581  IFS=$as_save_IFS
19582  test -z "$as_dir" && as_dir=.
19583    for ac_exec_ext in '' $ac_executable_extensions; do
19584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19585    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19587    break 2
19588  fi
19589done
19590  done
19591IFS=$as_save_IFS
19592
19593  ;;
19594esac
19595fi
19596PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19597if test -n "$PKG_CONFIG"; then
19598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19599$as_echo "$PKG_CONFIG" >&6; }
19600else
19601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19602$as_echo "no" >&6; }
19603fi
19604
19605
19606fi
19607if test -z "$ac_cv_path_PKG_CONFIG"; then
19608  ac_pt_PKG_CONFIG=$PKG_CONFIG
19609  # Extract the first word of "pkg-config", so it can be a program name with args.
19610set dummy pkg-config; ac_word=$2
19611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19612$as_echo_n "checking for $ac_word... " >&6; }
19613if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19614  $as_echo_n "(cached) " >&6
19615else
19616  case $ac_pt_PKG_CONFIG in
19617  [\\/]* | ?:[\\/]*)
19618  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19619  ;;
19620  *)
19621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19622for as_dir in $PATH
19623do
19624  IFS=$as_save_IFS
19625  test -z "$as_dir" && as_dir=.
19626    for ac_exec_ext in '' $ac_executable_extensions; do
19627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19628    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19630    break 2
19631  fi
19632done
19633  done
19634IFS=$as_save_IFS
19635
19636  ;;
19637esac
19638fi
19639ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19640if test -n "$ac_pt_PKG_CONFIG"; then
19641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19642$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19643else
19644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19645$as_echo "no" >&6; }
19646fi
19647
19648  if test "x$ac_pt_PKG_CONFIG" = x; then
19649    PKG_CONFIG=""
19650  else
19651    case $cross_compiling:$ac_tool_warned in
19652yes:)
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19655ac_tool_warned=yes ;;
19656esac
19657    PKG_CONFIG=$ac_pt_PKG_CONFIG
19658  fi
19659else
19660  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19661fi
19662
19663fi
19664if test -n "$PKG_CONFIG"; then
19665	_pkg_min_version=0.9.0
19666	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19667$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19668	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19669		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19670$as_echo "yes" >&6; }
19671	else
19672		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19673$as_echo "no" >&6; }
19674		PKG_CONFIG=""
19675	fi
19676
19677fi
19678
19679# After basic tools have been setup, we can check build os specific details.
19680
19681  ###############################################################################
19682
19683  # Note that this is the build platform OS version!
19684
19685  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19686  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19687  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19688  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19689
19690
19691
19692
19693
19694# Setup builddeps, for automatic downloading of tools we need.
19695# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19696# boot-jdk setup, but we need to have basic tools setup first.
19697
19698
19699# Check whether --with-builddeps-conf was given.
19700if test "${with_builddeps_conf+set}" = set; then :
19701  withval=$with_builddeps_conf;
19702fi
19703
19704
19705
19706# Check whether --with-builddeps-server was given.
19707if test "${with_builddeps_server+set}" = set; then :
19708  withval=$with_builddeps_server;
19709fi
19710
19711
19712
19713# Check whether --with-builddeps-dir was given.
19714if test "${with_builddeps_dir+set}" = set; then :
19715  withval=$with_builddeps_dir;
19716else
19717  with_builddeps_dir=/localhome/builddeps
19718fi
19719
19720
19721
19722# Check whether --with-builddeps-group was given.
19723if test "${with_builddeps_group+set}" = set; then :
19724  withval=$with_builddeps_group;
19725fi
19726
19727
19728
19729
19730  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19731    if test "x$with_builddeps_conf" != x; then
19732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19733$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19734      builddepsfile=$with_builddeps_conf
19735      if test -s $builddepsfile; then
19736        . $builddepsfile
19737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19738$as_echo "loaded!" >&6; }
19739      else
19740        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19741      fi
19742    else
19743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19744$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19745      builddepsfile=`mktemp`
19746      touch $builddepsfile
19747      # Put all found confs into a single file.
19748      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19749      # Source the file to acquire the variables
19750      if test -s $builddepsfile; then
19751        . $builddepsfile
19752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19753$as_echo "found at least one!" >&6; }
19754      else
19755        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19756      fi
19757    fi
19758    # Create build and target names that use _ instead of "-" and ".".
19759    # This is necessary to use them in variable names.
19760    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19761    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19762    # Extract rewrite information for build and target
19763    eval rewritten_build=\${REWRITE_${build_var}}
19764    if test "x$rewritten_build" = x; then
19765      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19766      echo Build stays the same $rewritten_build
19767    else
19768      echo Rewriting build for builddeps into $rewritten_build
19769    fi
19770    eval rewritten_target=\${REWRITE_${target_var}}
19771    if test "x$rewritten_target" = x; then
19772      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19773      echo Target stays the same $rewritten_target
19774    else
19775      echo Rewriting target for builddeps into $rewritten_target
19776    fi
19777    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19778    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19779  fi
19780  for ac_prog in 7z unzip
19781do
19782  # Extract the first word of "$ac_prog", so it can be a program name with args.
19783set dummy $ac_prog; ac_word=$2
19784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19785$as_echo_n "checking for $ac_word... " >&6; }
19786if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19787  $as_echo_n "(cached) " >&6
19788else
19789  if test -n "$BDEPS_UNZIP"; then
19790  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19791else
19792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19793for as_dir in $PATH
19794do
19795  IFS=$as_save_IFS
19796  test -z "$as_dir" && as_dir=.
19797    for ac_exec_ext in '' $ac_executable_extensions; do
19798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19799    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19801    break 2
19802  fi
19803done
19804  done
19805IFS=$as_save_IFS
19806
19807fi
19808fi
19809BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19810if test -n "$BDEPS_UNZIP"; then
19811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19812$as_echo "$BDEPS_UNZIP" >&6; }
19813else
19814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19815$as_echo "no" >&6; }
19816fi
19817
19818
19819  test -n "$BDEPS_UNZIP" && break
19820done
19821
19822  if test "x$BDEPS_UNZIP" = x7z; then
19823    BDEPS_UNZIP="7z x"
19824  fi
19825
19826  for ac_prog in wget lftp ftp
19827do
19828  # Extract the first word of "$ac_prog", so it can be a program name with args.
19829set dummy $ac_prog; ac_word=$2
19830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19831$as_echo_n "checking for $ac_word... " >&6; }
19832if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19833  $as_echo_n "(cached) " >&6
19834else
19835  if test -n "$BDEPS_FTP"; then
19836  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19837else
19838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19839for as_dir in $PATH
19840do
19841  IFS=$as_save_IFS
19842  test -z "$as_dir" && as_dir=.
19843    for ac_exec_ext in '' $ac_executable_extensions; do
19844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19845    ac_cv_prog_BDEPS_FTP="$ac_prog"
19846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19847    break 2
19848  fi
19849done
19850  done
19851IFS=$as_save_IFS
19852
19853fi
19854fi
19855BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19856if test -n "$BDEPS_FTP"; then
19857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19858$as_echo "$BDEPS_FTP" >&6; }
19859else
19860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19861$as_echo "no" >&6; }
19862fi
19863
19864
19865  test -n "$BDEPS_FTP" && break
19866done
19867
19868
19869
19870###############################################################################
19871#
19872# Determine OpenJDK variants, options and version numbers.
19873#
19874###############################################################################
19875
19876# We need build & target for this.
19877
19878
19879  ###############################################################################
19880  #
19881  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19882  # We always build headless support.
19883  #
19884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19885$as_echo_n "checking headful support... " >&6; }
19886  # Check whether --enable-headful was given.
19887if test "${enable_headful+set}" = set; then :
19888  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19889else
19890  SUPPORT_HEADFUL=yes
19891fi
19892
19893
19894  SUPPORT_HEADLESS=yes
19895  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19896
19897  if test "x$SUPPORT_HEADFUL" = xyes; then
19898    # We are building both headful and headless.
19899    headful_msg="include support for both headful and headless"
19900  fi
19901
19902  if test "x$SUPPORT_HEADFUL" = xno; then
19903    # Thus we are building headless only.
19904    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19905    headful_msg="headless only"
19906  fi
19907
19908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19909$as_echo "$headful_msg" >&6; }
19910
19911
19912
19913
19914
19915  # Control wether Hotspot runs Queens test after build.
19916  # Check whether --enable-hotspot-test-in-build was given.
19917if test "${enable_hotspot_test_in_build+set}" = set; then :
19918  enableval=$enable_hotspot_test_in_build;
19919else
19920  enable_hotspot_test_in_build=no
19921fi
19922
19923  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19924    TEST_IN_BUILD=true
19925  else
19926    TEST_IN_BUILD=false
19927  fi
19928
19929
19930  ###############################################################################
19931  #
19932  # Choose cacerts source file
19933  #
19934
19935# Check whether --with-cacerts-file was given.
19936if test "${with_cacerts_file+set}" = set; then :
19937  withval=$with_cacerts_file;
19938fi
19939
19940  if test "x$with_cacerts_file" != x; then
19941    CACERTS_FILE=$with_cacerts_file
19942  fi
19943
19944
19945  ###############################################################################
19946  #
19947  # Enable or disable unlimited crypto
19948  #
19949  # Check whether --enable-unlimited-crypto was given.
19950if test "${enable_unlimited_crypto+set}" = set; then :
19951  enableval=$enable_unlimited_crypto;
19952else
19953  enable_unlimited_crypto=no
19954fi
19955
19956  if test "x$enable_unlimited_crypto" = "xyes"; then
19957    UNLIMITED_CRYPTO=true
19958  else
19959    UNLIMITED_CRYPTO=false
19960  fi
19961
19962
19963  ###############################################################################
19964  #
19965  # Enable or disable the elliptic curve crypto implementation
19966  #
19967
19968
19969  ###############################################################################
19970  #
19971  # --enable-rmiconnector-iiop
19972  #
19973  # Check whether --enable-rmiconnector-iiop was given.
19974if test "${enable_rmiconnector_iiop+set}" = set; then :
19975  enableval=$enable_rmiconnector_iiop;
19976fi
19977
19978  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19979    RMICONNECTOR_IIOP=true
19980  else
19981    RMICONNECTOR_IIOP=false
19982  fi
19983
19984
19985  ###############################################################################
19986  #
19987  # Compress jars
19988  #
19989  COMPRESS_JARS=false
19990
19991
19992
19993
19994  # Source the version numbers
19995  . $AUTOCONF_DIR/version-numbers
19996
19997  # Get the settings from parameters
19998
19999# Check whether --with-milestone was given.
20000if test "${with_milestone+set}" = set; then :
20001  withval=$with_milestone;
20002fi
20003
20004  if test "x$with_milestone" = xyes; then
20005    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20006  elif test "x$with_milestone" != x; then
20007    MILESTONE="$with_milestone"
20008  fi
20009  if test "x$MILESTONE" = x; then
20010    MILESTONE=internal
20011  fi
20012
20013
20014# Check whether --with-update-version was given.
20015if test "${with_update_version+set}" = set; then :
20016  withval=$with_update_version;
20017fi
20018
20019  if test "x$with_update_version" = xyes; then
20020    as_fn_error $? "Update version must have a value" "$LINENO" 5
20021  elif test "x$with_update_version" != x; then
20022    JDK_UPDATE_VERSION="$with_update_version"
20023    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20024    # to a bug in expr (which reduces it to just X). To work around this, we
20025    # always add a 0 to one digit update versions.
20026    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20027      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20028    fi
20029  fi
20030
20031
20032# Check whether --with-user-release-suffix was given.
20033if test "${with_user_release_suffix+set}" = set; then :
20034  withval=$with_user_release_suffix;
20035fi
20036
20037  if test "x$with_user_release_suffix" = xyes; then
20038    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20039  elif test "x$with_user_release_suffix" != x; then
20040    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20041  fi
20042
20043
20044# Check whether --with-build-number was given.
20045if test "${with_build_number+set}" = set; then :
20046  withval=$with_build_number;
20047fi
20048
20049  if test "x$with_build_number" = xyes; then
20050    as_fn_error $? "Build number must have a value" "$LINENO" 5
20051  elif test "x$with_build_number" != x; then
20052    JDK_BUILD_NUMBER="$with_build_number"
20053  fi
20054  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20055  if test "x$JDK_BUILD_NUMBER" = x; then
20056    JDK_BUILD_NUMBER=b00
20057    if test "x$USER_RELEASE_SUFFIX" = x; then
20058      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20059      # Avoid [:alnum:] since it depends on the locale.
20060      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20061      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20062    fi
20063  fi
20064
20065  # Now set the JDK version, milestone, build number etc.
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082# Check whether --with-copyright-year was given.
20083if test "${with_copyright_year+set}" = set; then :
20084  withval=$with_copyright_year;
20085fi
20086
20087  if test "x$with_copyright_year" = xyes; then
20088    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20089  elif test "x$with_copyright_year" != x; then
20090    COPYRIGHT_YEAR="$with_copyright_year"
20091  else
20092    COPYRIGHT_YEAR=`date +'%Y'`
20093  fi
20094
20095
20096  if test "x$JDK_UPDATE_VERSION" != x; then
20097    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20098  else
20099    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20100  fi
20101
20102
20103  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20104
20105
20106
20107###############################################################################
20108#
20109# Setup BootJDK, used to bootstrap the build.
20110#
20111###############################################################################
20112
20113
20114  BOOT_JDK_FOUND=no
20115
20116# Check whether --with-boot-jdk was given.
20117if test "${with_boot_jdk+set}" = set; then :
20118  withval=$with_boot_jdk;
20119fi
20120
20121
20122  # We look for the Boot JDK through various means, going from more certain to
20123  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20124  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20125  # must check if this is indeed valid; otherwise we'll continue looking.
20126
20127  # Test: Is bootjdk explicitely set by command line arguments?
20128
20129  if test "x$BOOT_JDK_FOUND" = xno; then
20130    # Now execute the test
20131
20132  if test "x$with_boot_jdk" != x; then
20133    BOOT_JDK=$with_boot_jdk
20134    BOOT_JDK_FOUND=maybe
20135    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20136$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20137  fi
20138
20139
20140    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20141    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20142      # Do we have a bin/java?
20143      if test ! -x "$BOOT_JDK/bin/java"; then
20144        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20146        BOOT_JDK_FOUND=no
20147      else
20148        # Do we have a bin/javac?
20149        if test ! -x "$BOOT_JDK/bin/javac"; then
20150          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20152          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20153$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20154          BOOT_JDK_FOUND=no
20155        else
20156          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20157          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20158
20159          # Extra M4 quote needed to protect [] in grep expression.
20160          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20161          if test "x$FOUND_CORRECT_VERSION" = x; then
20162            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20164            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20165$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20166            BOOT_JDK_FOUND=no
20167          else
20168            # We're done! :-)
20169            BOOT_JDK_FOUND=yes
20170
20171  # Only process if variable expands to non-empty
20172
20173  if test "x$BOOT_JDK" != x; then
20174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20175
20176  # Input might be given as Windows format, start by converting to
20177  # unix format.
20178  path="$BOOT_JDK"
20179  new_path=`$CYGPATH -u "$path"`
20180
20181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20184  # "foo.exe" is OK but "foo" is an error.
20185  #
20186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20187  # It is also a way to make sure we got the proper file name for the real test later on.
20188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20189  if test "x$test_shortpath" = x; then
20190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20192    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20193  fi
20194
20195  # Call helper function which possibly converts this using DOS-style short mode.
20196  # If so, the updated path is stored in $new_path.
20197
20198  input_path="$new_path"
20199  # Check if we need to convert this using DOS-style short mode. If the path
20200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20201  # take no chances and rewrite it.
20202  # Note: m4 eats our [], so we need to use [ and ] instead.
20203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20204  if test "x$has_forbidden_chars" != x; then
20205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20209      # Going to short mode and back again did indeed matter. Since short mode is
20210      # case insensitive, let's make it lowercase to improve readability.
20211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20212      # Now convert it back to Unix-stile (cygpath)
20213      input_path=`$CYGPATH -u "$shortmode_path"`
20214      new_path="$input_path"
20215    fi
20216  fi
20217
20218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20219  if test "x$test_cygdrive_prefix" = x; then
20220    # As a simple fix, exclude /usr/bin since it's not a real path.
20221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20223      # a path prefixed by /cygdrive for fixpath to work.
20224      new_path="$CYGWIN_ROOT_PATH$input_path"
20225    fi
20226  fi
20227
20228
20229  if test "x$path" != "x$new_path"; then
20230    BOOT_JDK="$new_path"
20231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20233  fi
20234
20235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20236
20237  path="$BOOT_JDK"
20238  has_colon=`$ECHO $path | $GREP ^.:`
20239  new_path="$path"
20240  if test "x$has_colon" = x; then
20241    # Not in mixed or Windows style, start by that.
20242    new_path=`cmd //c echo $path`
20243  fi
20244
20245
20246  input_path="$new_path"
20247  # Check if we need to convert this using DOS-style short mode. If the path
20248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20249  # take no chances and rewrite it.
20250  # Note: m4 eats our [], so we need to use [ and ] instead.
20251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20252  if test "x$has_forbidden_chars" != x; then
20253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20255  fi
20256
20257
20258  windows_path="$new_path"
20259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20260    unix_path=`$CYGPATH -u "$windows_path"`
20261    new_path="$unix_path"
20262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20264    new_path="$unix_path"
20265  fi
20266
20267  if test "x$path" != "x$new_path"; then
20268    BOOT_JDK="$new_path"
20269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20271  fi
20272
20273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20275
20276    else
20277      # We're on a unix platform. Hooray! :)
20278      path="$BOOT_JDK"
20279      has_space=`$ECHO "$path" | $GREP " "`
20280      if test "x$has_space" != x; then
20281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20284      fi
20285
20286      # Use eval to expand a potential ~
20287      eval path="$path"
20288      if test ! -f "$path" && test ! -d "$path"; then
20289        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20290      fi
20291
20292      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20293    fi
20294  fi
20295
20296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20297$as_echo_n "checking for Boot JDK... " >&6; }
20298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20299$as_echo "$BOOT_JDK" >&6; }
20300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20301$as_echo_n "checking Boot JDK version... " >&6; }
20302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20304$as_echo "$BOOT_JDK_VERSION" >&6; }
20305          fi # end check jdk version
20306        fi # end check javac
20307      fi # end check java
20308    fi # end check boot jdk found
20309  fi
20310
20311  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20312    # Having specified an argument which is incorrect will produce an instant failure;
20313    # we should not go on looking
20314    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20315  fi
20316
20317  # Test: Is bootjdk available from builddeps?
20318
20319  if test "x$BOOT_JDK_FOUND" = xno; then
20320    # Now execute the test
20321
20322
20323
20324  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20325    # Source the builddeps file again, to make sure it uses the latest variables!
20326    . $builddepsfile
20327    # Look for a target and build machine specific resource!
20328    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20329    if test "x$resource" = x; then
20330      # Ok, lets instead look for a target specific resource
20331      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20332    fi
20333    if test "x$resource" = x; then
20334      # Ok, lets instead look for a build specific resource
20335      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20336    fi
20337    if test "x$resource" = x; then
20338      # Ok, lets instead look for a generic resource
20339      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20340      resource=${builddep_bootjdk}
20341    fi
20342    if test "x$resource" != x; then
20343      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20344$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20345      # If the resource in the builddeps.conf file is an existing directory,
20346      # for example /java/linux/cups
20347      if test -d ${resource}; then
20348        depdir=${resource}
20349      else
20350
20351  # bootjdk is for example mymodule
20352  # $resource is for example libs/general/libmymod_1_2_3.zip
20353  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20354  # $with_builddeps_dir is for example /localhome/builddeps
20355  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20356  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20357  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20358  filename=`basename $resource`
20359  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20360  filebase=${filename%%.*}
20361  extension=${filename#*.}
20362  installdir=$with_builddeps_dir/$filebase
20363  if test ! -f $installdir/$filename.unpacked; then
20364    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20365$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20366    if test ! -d $installdir; then
20367      mkdir -p $installdir
20368    fi
20369    if test ! -d $installdir; then
20370      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20371    fi
20372    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20373    touch $tmpfile
20374    if test ! -f $tmpfile; then
20375      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20376    fi
20377
20378  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20379  # $tmpfile is the local file name for the downloaded file.
20380  VALID_TOOL=no
20381  if test "x$BDEPS_FTP" = xwget; then
20382    VALID_TOOL=yes
20383    wget -O $tmpfile $with_builddeps_server/$resource
20384  fi
20385  if test "x$BDEPS_FTP" = xlftp; then
20386    VALID_TOOL=yes
20387    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20388  fi
20389  if test "x$BDEPS_FTP" = xftp; then
20390    VALID_TOOL=yes
20391    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20392    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20393    FTPUSERPWD=${FTPSERVER%%@*}
20394    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20395      FTPUSER=${userpwd%%:*}
20396      FTPPWD=${userpwd#*@}
20397      FTPSERVER=${FTPSERVER#*@}
20398    else
20399      FTPUSER=ftp
20400      FTPPWD=ftp
20401    fi
20402    # the "pass" command does not work on some
20403    # ftp clients (read ftp.exe) but if it works,
20404    # passive mode is better!
20405    ( \
20406        echo "user $FTPUSER $FTPPWD"        ; \
20407        echo "pass"                         ; \
20408        echo "bin"                          ; \
20409        echo "get $FTPPATH $tmpfile"              ; \
20410    ) | ftp -in $FTPSERVER
20411  fi
20412  if test "x$VALID_TOOL" != xyes; then
20413    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20414  fi
20415
20416    mv $tmpfile $installdir/$filename
20417    if test ! -s $installdir/$filename; then
20418      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20419    fi
20420    case "$extension" in
20421      zip)  echo "Unzipping $installdir/$filename..."
20422        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20423        ;;
20424      tar.gz) echo "Untaring $installdir/$filename..."
20425        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20426        ;;
20427      tgz) echo "Untaring $installdir/$filename..."
20428        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20429        ;;
20430      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20431        ;;
20432    esac
20433  fi
20434  if test -f $installdir/$filename.unpacked; then
20435    depdir=$installdir
20436  fi
20437
20438      fi
20439      # Source the builddeps file again, because in the previous command, the depdir
20440      # was updated to point at the current build dependency install directory.
20441      . $builddepsfile
20442      # Now extract variables from the builddeps.conf files.
20443      theroot=${builddep_bootjdk_ROOT}
20444      thecflags=${builddep_bootjdk_CFLAGS}
20445      thelibs=${builddep_bootjdk_LIBS}
20446      if test "x$depdir" = x; then
20447        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20448      fi
20449      BOOT_JDK=$depdir
20450      if test "x$theroot" != x; then
20451        BOOT_JDK="$theroot"
20452      fi
20453      if test "x$thecflags" != x; then
20454        BOOT_JDK_CFLAGS="$thecflags"
20455      fi
20456      if test "x$thelibs" != x; then
20457        BOOT_JDK_LIBS="$thelibs"
20458      fi
20459      BOOT_JDK_FOUND=maybe
20460      else BOOT_JDK_FOUND=no
20461
20462    fi
20463    else BOOT_JDK_FOUND=no
20464
20465  fi
20466
20467
20468
20469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20471      # Do we have a bin/java?
20472      if test ! -x "$BOOT_JDK/bin/java"; then
20473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20475        BOOT_JDK_FOUND=no
20476      else
20477        # Do we have a bin/javac?
20478        if test ! -x "$BOOT_JDK/bin/javac"; then
20479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20483          BOOT_JDK_FOUND=no
20484        else
20485          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20486          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20487
20488          # Extra M4 quote needed to protect [] in grep expression.
20489          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20490          if test "x$FOUND_CORRECT_VERSION" = x; then
20491            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20493            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20494$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20495            BOOT_JDK_FOUND=no
20496          else
20497            # We're done! :-)
20498            BOOT_JDK_FOUND=yes
20499
20500  # Only process if variable expands to non-empty
20501
20502  if test "x$BOOT_JDK" != x; then
20503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20504
20505  # Input might be given as Windows format, start by converting to
20506  # unix format.
20507  path="$BOOT_JDK"
20508  new_path=`$CYGPATH -u "$path"`
20509
20510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20513  # "foo.exe" is OK but "foo" is an error.
20514  #
20515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20516  # It is also a way to make sure we got the proper file name for the real test later on.
20517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20518  if test "x$test_shortpath" = x; then
20519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20521    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20522  fi
20523
20524  # Call helper function which possibly converts this using DOS-style short mode.
20525  # If so, the updated path is stored in $new_path.
20526
20527  input_path="$new_path"
20528  # Check if we need to convert this using DOS-style short mode. If the path
20529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20530  # take no chances and rewrite it.
20531  # Note: m4 eats our [], so we need to use [ and ] instead.
20532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20533  if test "x$has_forbidden_chars" != x; then
20534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20538      # Going to short mode and back again did indeed matter. Since short mode is
20539      # case insensitive, let's make it lowercase to improve readability.
20540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20541      # Now convert it back to Unix-stile (cygpath)
20542      input_path=`$CYGPATH -u "$shortmode_path"`
20543      new_path="$input_path"
20544    fi
20545  fi
20546
20547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20548  if test "x$test_cygdrive_prefix" = x; then
20549    # As a simple fix, exclude /usr/bin since it's not a real path.
20550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20552      # a path prefixed by /cygdrive for fixpath to work.
20553      new_path="$CYGWIN_ROOT_PATH$input_path"
20554    fi
20555  fi
20556
20557
20558  if test "x$path" != "x$new_path"; then
20559    BOOT_JDK="$new_path"
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20562  fi
20563
20564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20565
20566  path="$BOOT_JDK"
20567  has_colon=`$ECHO $path | $GREP ^.:`
20568  new_path="$path"
20569  if test "x$has_colon" = x; then
20570    # Not in mixed or Windows style, start by that.
20571    new_path=`cmd //c echo $path`
20572  fi
20573
20574
20575  input_path="$new_path"
20576  # Check if we need to convert this using DOS-style short mode. If the path
20577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20578  # take no chances and rewrite it.
20579  # Note: m4 eats our [], so we need to use [ and ] instead.
20580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20581  if test "x$has_forbidden_chars" != x; then
20582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20584  fi
20585
20586
20587  windows_path="$new_path"
20588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20589    unix_path=`$CYGPATH -u "$windows_path"`
20590    new_path="$unix_path"
20591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20593    new_path="$unix_path"
20594  fi
20595
20596  if test "x$path" != "x$new_path"; then
20597    BOOT_JDK="$new_path"
20598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20600  fi
20601
20602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20604
20605    else
20606      # We're on a unix platform. Hooray! :)
20607      path="$BOOT_JDK"
20608      has_space=`$ECHO "$path" | $GREP " "`
20609      if test "x$has_space" != x; then
20610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20613      fi
20614
20615      # Use eval to expand a potential ~
20616      eval path="$path"
20617      if test ! -f "$path" && test ! -d "$path"; then
20618        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20619      fi
20620
20621      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20622    fi
20623  fi
20624
20625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20626$as_echo_n "checking for Boot JDK... " >&6; }
20627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20628$as_echo "$BOOT_JDK" >&6; }
20629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20630$as_echo_n "checking Boot JDK version... " >&6; }
20631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20633$as_echo "$BOOT_JDK_VERSION" >&6; }
20634          fi # end check jdk version
20635        fi # end check javac
20636      fi # end check java
20637    fi # end check boot jdk found
20638  fi
20639
20640
20641  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20642
20643  if test "x$BOOT_JDK_FOUND" = xno; then
20644    # Now execute the test
20645
20646  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20647    # First check at user selected default
20648
20649  if test "x$BOOT_JDK_FOUND" = xno; then
20650    # Now execute the test
20651
20652  if test -x /usr/libexec/java_home; then
20653    BOOT_JDK=`/usr/libexec/java_home `
20654    BOOT_JDK_FOUND=maybe
20655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20656$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20657  fi
20658
20659
20660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20662      # Do we have a bin/java?
20663      if test ! -x "$BOOT_JDK/bin/java"; then
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20666        BOOT_JDK_FOUND=no
20667      else
20668        # Do we have a bin/javac?
20669        if test ! -x "$BOOT_JDK/bin/javac"; then
20670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20674          BOOT_JDK_FOUND=no
20675        else
20676          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20677          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20678
20679          # Extra M4 quote needed to protect [] in grep expression.
20680          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20681          if test "x$FOUND_CORRECT_VERSION" = x; then
20682            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20684            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20685$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20686            BOOT_JDK_FOUND=no
20687          else
20688            # We're done! :-)
20689            BOOT_JDK_FOUND=yes
20690
20691  # Only process if variable expands to non-empty
20692
20693  if test "x$BOOT_JDK" != x; then
20694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20695
20696  # Input might be given as Windows format, start by converting to
20697  # unix format.
20698  path="$BOOT_JDK"
20699  new_path=`$CYGPATH -u "$path"`
20700
20701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20704  # "foo.exe" is OK but "foo" is an error.
20705  #
20706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20707  # It is also a way to make sure we got the proper file name for the real test later on.
20708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20709  if test "x$test_shortpath" = x; then
20710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20712    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20713  fi
20714
20715  # Call helper function which possibly converts this using DOS-style short mode.
20716  # If so, the updated path is stored in $new_path.
20717
20718  input_path="$new_path"
20719  # Check if we need to convert this using DOS-style short mode. If the path
20720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20721  # take no chances and rewrite it.
20722  # Note: m4 eats our [], so we need to use [ and ] instead.
20723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20724  if test "x$has_forbidden_chars" != x; then
20725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20729      # Going to short mode and back again did indeed matter. Since short mode is
20730      # case insensitive, let's make it lowercase to improve readability.
20731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20732      # Now convert it back to Unix-stile (cygpath)
20733      input_path=`$CYGPATH -u "$shortmode_path"`
20734      new_path="$input_path"
20735    fi
20736  fi
20737
20738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20739  if test "x$test_cygdrive_prefix" = x; then
20740    # As a simple fix, exclude /usr/bin since it's not a real path.
20741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20743      # a path prefixed by /cygdrive for fixpath to work.
20744      new_path="$CYGWIN_ROOT_PATH$input_path"
20745    fi
20746  fi
20747
20748
20749  if test "x$path" != "x$new_path"; then
20750    BOOT_JDK="$new_path"
20751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20753  fi
20754
20755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756
20757  path="$BOOT_JDK"
20758  has_colon=`$ECHO $path | $GREP ^.:`
20759  new_path="$path"
20760  if test "x$has_colon" = x; then
20761    # Not in mixed or Windows style, start by that.
20762    new_path=`cmd //c echo $path`
20763  fi
20764
20765
20766  input_path="$new_path"
20767  # Check if we need to convert this using DOS-style short mode. If the path
20768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20769  # take no chances and rewrite it.
20770  # Note: m4 eats our [], so we need to use [ and ] instead.
20771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20772  if test "x$has_forbidden_chars" != x; then
20773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20775  fi
20776
20777
20778  windows_path="$new_path"
20779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780    unix_path=`$CYGPATH -u "$windows_path"`
20781    new_path="$unix_path"
20782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20784    new_path="$unix_path"
20785  fi
20786
20787  if test "x$path" != "x$new_path"; then
20788    BOOT_JDK="$new_path"
20789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20790$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20791  fi
20792
20793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20795
20796    else
20797      # We're on a unix platform. Hooray! :)
20798      path="$BOOT_JDK"
20799      has_space=`$ECHO "$path" | $GREP " "`
20800      if test "x$has_space" != x; then
20801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20804      fi
20805
20806      # Use eval to expand a potential ~
20807      eval path="$path"
20808      if test ! -f "$path" && test ! -d "$path"; then
20809        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20810      fi
20811
20812      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20813    fi
20814  fi
20815
20816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20817$as_echo_n "checking for Boot JDK... " >&6; }
20818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20819$as_echo "$BOOT_JDK" >&6; }
20820            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20821$as_echo_n "checking Boot JDK version... " >&6; }
20822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20824$as_echo "$BOOT_JDK_VERSION" >&6; }
20825          fi # end check jdk version
20826        fi # end check javac
20827      fi # end check java
20828    fi # end check boot jdk found
20829  fi
20830
20831    # If that did not work out (e.g. too old), try explicit versions instead
20832
20833  if test "x$BOOT_JDK_FOUND" = xno; then
20834    # Now execute the test
20835
20836  if test -x /usr/libexec/java_home; then
20837    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20838    BOOT_JDK_FOUND=maybe
20839    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20840$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20841  fi
20842
20843
20844    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20845    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20846      # Do we have a bin/java?
20847      if test ! -x "$BOOT_JDK/bin/java"; then
20848        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20850        BOOT_JDK_FOUND=no
20851      else
20852        # Do we have a bin/javac?
20853        if test ! -x "$BOOT_JDK/bin/javac"; then
20854          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20856          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20857$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20858          BOOT_JDK_FOUND=no
20859        else
20860          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20861          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20862
20863          # Extra M4 quote needed to protect [] in grep expression.
20864          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20865          if test "x$FOUND_CORRECT_VERSION" = x; then
20866            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20868            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20869$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20870            BOOT_JDK_FOUND=no
20871          else
20872            # We're done! :-)
20873            BOOT_JDK_FOUND=yes
20874
20875  # Only process if variable expands to non-empty
20876
20877  if test "x$BOOT_JDK" != x; then
20878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20879
20880  # Input might be given as Windows format, start by converting to
20881  # unix format.
20882  path="$BOOT_JDK"
20883  new_path=`$CYGPATH -u "$path"`
20884
20885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20888  # "foo.exe" is OK but "foo" is an error.
20889  #
20890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20891  # It is also a way to make sure we got the proper file name for the real test later on.
20892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20893  if test "x$test_shortpath" = x; then
20894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20896    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20897  fi
20898
20899  # Call helper function which possibly converts this using DOS-style short mode.
20900  # If so, the updated path is stored in $new_path.
20901
20902  input_path="$new_path"
20903  # Check if we need to convert this using DOS-style short mode. If the path
20904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20905  # take no chances and rewrite it.
20906  # Note: m4 eats our [], so we need to use [ and ] instead.
20907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20908  if test "x$has_forbidden_chars" != x; then
20909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20913      # Going to short mode and back again did indeed matter. Since short mode is
20914      # case insensitive, let's make it lowercase to improve readability.
20915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20916      # Now convert it back to Unix-stile (cygpath)
20917      input_path=`$CYGPATH -u "$shortmode_path"`
20918      new_path="$input_path"
20919    fi
20920  fi
20921
20922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20923  if test "x$test_cygdrive_prefix" = x; then
20924    # As a simple fix, exclude /usr/bin since it's not a real path.
20925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20927      # a path prefixed by /cygdrive for fixpath to work.
20928      new_path="$CYGWIN_ROOT_PATH$input_path"
20929    fi
20930  fi
20931
20932
20933  if test "x$path" != "x$new_path"; then
20934    BOOT_JDK="$new_path"
20935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20937  fi
20938
20939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20940
20941  path="$BOOT_JDK"
20942  has_colon=`$ECHO $path | $GREP ^.:`
20943  new_path="$path"
20944  if test "x$has_colon" = x; then
20945    # Not in mixed or Windows style, start by that.
20946    new_path=`cmd //c echo $path`
20947  fi
20948
20949
20950  input_path="$new_path"
20951  # Check if we need to convert this using DOS-style short mode. If the path
20952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20953  # take no chances and rewrite it.
20954  # Note: m4 eats our [], so we need to use [ and ] instead.
20955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20956  if test "x$has_forbidden_chars" != x; then
20957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20959  fi
20960
20961
20962  windows_path="$new_path"
20963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20964    unix_path=`$CYGPATH -u "$windows_path"`
20965    new_path="$unix_path"
20966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20968    new_path="$unix_path"
20969  fi
20970
20971  if test "x$path" != "x$new_path"; then
20972    BOOT_JDK="$new_path"
20973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20975  fi
20976
20977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20979
20980    else
20981      # We're on a unix platform. Hooray! :)
20982      path="$BOOT_JDK"
20983      has_space=`$ECHO "$path" | $GREP " "`
20984      if test "x$has_space" != x; then
20985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20987        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20988      fi
20989
20990      # Use eval to expand a potential ~
20991      eval path="$path"
20992      if test ! -f "$path" && test ! -d "$path"; then
20993        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20994      fi
20995
20996      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20997    fi
20998  fi
20999
21000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21001$as_echo_n "checking for Boot JDK... " >&6; }
21002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21003$as_echo "$BOOT_JDK" >&6; }
21004            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21005$as_echo_n "checking Boot JDK version... " >&6; }
21006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21008$as_echo "$BOOT_JDK_VERSION" >&6; }
21009          fi # end check jdk version
21010        fi # end check javac
21011      fi # end check java
21012    fi # end check boot jdk found
21013  fi
21014
21015
21016  if test "x$BOOT_JDK_FOUND" = xno; then
21017    # Now execute the test
21018
21019  if test -x /usr/libexec/java_home; then
21020    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21021    BOOT_JDK_FOUND=maybe
21022    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21023$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21024  fi
21025
21026
21027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21029      # Do we have a bin/java?
21030      if test ! -x "$BOOT_JDK/bin/java"; then
21031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21033        BOOT_JDK_FOUND=no
21034      else
21035        # Do we have a bin/javac?
21036        if test ! -x "$BOOT_JDK/bin/javac"; then
21037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21041          BOOT_JDK_FOUND=no
21042        else
21043          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21044          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21045
21046          # Extra M4 quote needed to protect [] in grep expression.
21047          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21048          if test "x$FOUND_CORRECT_VERSION" = x; then
21049            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21051            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21052$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21053            BOOT_JDK_FOUND=no
21054          else
21055            # We're done! :-)
21056            BOOT_JDK_FOUND=yes
21057
21058  # Only process if variable expands to non-empty
21059
21060  if test "x$BOOT_JDK" != x; then
21061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21062
21063  # Input might be given as Windows format, start by converting to
21064  # unix format.
21065  path="$BOOT_JDK"
21066  new_path=`$CYGPATH -u "$path"`
21067
21068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21071  # "foo.exe" is OK but "foo" is an error.
21072  #
21073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21074  # It is also a way to make sure we got the proper file name for the real test later on.
21075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21076  if test "x$test_shortpath" = x; then
21077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21079    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21080  fi
21081
21082  # Call helper function which possibly converts this using DOS-style short mode.
21083  # If so, the updated path is stored in $new_path.
21084
21085  input_path="$new_path"
21086  # Check if we need to convert this using DOS-style short mode. If the path
21087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21088  # take no chances and rewrite it.
21089  # Note: m4 eats our [], so we need to use [ and ] instead.
21090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21091  if test "x$has_forbidden_chars" != x; then
21092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21096      # Going to short mode and back again did indeed matter. Since short mode is
21097      # case insensitive, let's make it lowercase to improve readability.
21098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21099      # Now convert it back to Unix-stile (cygpath)
21100      input_path=`$CYGPATH -u "$shortmode_path"`
21101      new_path="$input_path"
21102    fi
21103  fi
21104
21105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21106  if test "x$test_cygdrive_prefix" = x; then
21107    # As a simple fix, exclude /usr/bin since it's not a real path.
21108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21110      # a path prefixed by /cygdrive for fixpath to work.
21111      new_path="$CYGWIN_ROOT_PATH$input_path"
21112    fi
21113  fi
21114
21115
21116  if test "x$path" != "x$new_path"; then
21117    BOOT_JDK="$new_path"
21118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21120  fi
21121
21122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21123
21124  path="$BOOT_JDK"
21125  has_colon=`$ECHO $path | $GREP ^.:`
21126  new_path="$path"
21127  if test "x$has_colon" = x; then
21128    # Not in mixed or Windows style, start by that.
21129    new_path=`cmd //c echo $path`
21130  fi
21131
21132
21133  input_path="$new_path"
21134  # Check if we need to convert this using DOS-style short mode. If the path
21135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21136  # take no chances and rewrite it.
21137  # Note: m4 eats our [], so we need to use [ and ] instead.
21138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21139  if test "x$has_forbidden_chars" != x; then
21140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21142  fi
21143
21144
21145  windows_path="$new_path"
21146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21147    unix_path=`$CYGPATH -u "$windows_path"`
21148    new_path="$unix_path"
21149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21151    new_path="$unix_path"
21152  fi
21153
21154  if test "x$path" != "x$new_path"; then
21155    BOOT_JDK="$new_path"
21156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21158  fi
21159
21160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21162
21163    else
21164      # We're on a unix platform. Hooray! :)
21165      path="$BOOT_JDK"
21166      has_space=`$ECHO "$path" | $GREP " "`
21167      if test "x$has_space" != x; then
21168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21171      fi
21172
21173      # Use eval to expand a potential ~
21174      eval path="$path"
21175      if test ! -f "$path" && test ! -d "$path"; then
21176        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21177      fi
21178
21179      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21180    fi
21181  fi
21182
21183            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21184$as_echo_n "checking for Boot JDK... " >&6; }
21185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21186$as_echo "$BOOT_JDK" >&6; }
21187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21188$as_echo_n "checking Boot JDK version... " >&6; }
21189            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21190            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21191$as_echo "$BOOT_JDK_VERSION" >&6; }
21192          fi # end check jdk version
21193        fi # end check javac
21194      fi # end check java
21195    fi # end check boot jdk found
21196  fi
21197
21198
21199  if test "x$BOOT_JDK_FOUND" = xno; then
21200    # Now execute the test
21201
21202  if test -x /usr/libexec/java_home; then
21203    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21204    BOOT_JDK_FOUND=maybe
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21206$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21207  fi
21208
21209
21210    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21211    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21212      # Do we have a bin/java?
21213      if test ! -x "$BOOT_JDK/bin/java"; then
21214        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21216        BOOT_JDK_FOUND=no
21217      else
21218        # Do we have a bin/javac?
21219        if test ! -x "$BOOT_JDK/bin/javac"; then
21220          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21222          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21223$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21224          BOOT_JDK_FOUND=no
21225        else
21226          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21227          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21228
21229          # Extra M4 quote needed to protect [] in grep expression.
21230          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21231          if test "x$FOUND_CORRECT_VERSION" = x; then
21232            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21234            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21235$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21236            BOOT_JDK_FOUND=no
21237          else
21238            # We're done! :-)
21239            BOOT_JDK_FOUND=yes
21240
21241  # Only process if variable expands to non-empty
21242
21243  if test "x$BOOT_JDK" != x; then
21244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21245
21246  # Input might be given as Windows format, start by converting to
21247  # unix format.
21248  path="$BOOT_JDK"
21249  new_path=`$CYGPATH -u "$path"`
21250
21251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21254  # "foo.exe" is OK but "foo" is an error.
21255  #
21256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21257  # It is also a way to make sure we got the proper file name for the real test later on.
21258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21259  if test "x$test_shortpath" = x; then
21260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21262    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21263  fi
21264
21265  # Call helper function which possibly converts this using DOS-style short mode.
21266  # If so, the updated path is stored in $new_path.
21267
21268  input_path="$new_path"
21269  # Check if we need to convert this using DOS-style short mode. If the path
21270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21271  # take no chances and rewrite it.
21272  # Note: m4 eats our [], so we need to use [ and ] instead.
21273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21274  if test "x$has_forbidden_chars" != x; then
21275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21279      # Going to short mode and back again did indeed matter. Since short mode is
21280      # case insensitive, let's make it lowercase to improve readability.
21281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21282      # Now convert it back to Unix-stile (cygpath)
21283      input_path=`$CYGPATH -u "$shortmode_path"`
21284      new_path="$input_path"
21285    fi
21286  fi
21287
21288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21289  if test "x$test_cygdrive_prefix" = x; then
21290    # As a simple fix, exclude /usr/bin since it's not a real path.
21291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21293      # a path prefixed by /cygdrive for fixpath to work.
21294      new_path="$CYGWIN_ROOT_PATH$input_path"
21295    fi
21296  fi
21297
21298
21299  if test "x$path" != "x$new_path"; then
21300    BOOT_JDK="$new_path"
21301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21303  fi
21304
21305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21306
21307  path="$BOOT_JDK"
21308  has_colon=`$ECHO $path | $GREP ^.:`
21309  new_path="$path"
21310  if test "x$has_colon" = x; then
21311    # Not in mixed or Windows style, start by that.
21312    new_path=`cmd //c echo $path`
21313  fi
21314
21315
21316  input_path="$new_path"
21317  # Check if we need to convert this using DOS-style short mode. If the path
21318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21319  # take no chances and rewrite it.
21320  # Note: m4 eats our [], so we need to use [ and ] instead.
21321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21322  if test "x$has_forbidden_chars" != x; then
21323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21325  fi
21326
21327
21328  windows_path="$new_path"
21329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21330    unix_path=`$CYGPATH -u "$windows_path"`
21331    new_path="$unix_path"
21332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21334    new_path="$unix_path"
21335  fi
21336
21337  if test "x$path" != "x$new_path"; then
21338    BOOT_JDK="$new_path"
21339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21341  fi
21342
21343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21345
21346    else
21347      # We're on a unix platform. Hooray! :)
21348      path="$BOOT_JDK"
21349      has_space=`$ECHO "$path" | $GREP " "`
21350      if test "x$has_space" != x; then
21351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21354      fi
21355
21356      # Use eval to expand a potential ~
21357      eval path="$path"
21358      if test ! -f "$path" && test ! -d "$path"; then
21359        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21360      fi
21361
21362      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21363    fi
21364  fi
21365
21366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21367$as_echo_n "checking for Boot JDK... " >&6; }
21368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21369$as_echo "$BOOT_JDK" >&6; }
21370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21371$as_echo_n "checking Boot JDK version... " >&6; }
21372            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21374$as_echo "$BOOT_JDK_VERSION" >&6; }
21375          fi # end check jdk version
21376        fi # end check javac
21377      fi # end check java
21378    fi # end check boot jdk found
21379  fi
21380
21381  fi
21382
21383
21384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21386      # Do we have a bin/java?
21387      if test ! -x "$BOOT_JDK/bin/java"; then
21388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21390        BOOT_JDK_FOUND=no
21391      else
21392        # Do we have a bin/javac?
21393        if test ! -x "$BOOT_JDK/bin/javac"; then
21394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21398          BOOT_JDK_FOUND=no
21399        else
21400          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21401          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21402
21403          # Extra M4 quote needed to protect [] in grep expression.
21404          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21405          if test "x$FOUND_CORRECT_VERSION" = x; then
21406            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21408            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21409$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21410            BOOT_JDK_FOUND=no
21411          else
21412            # We're done! :-)
21413            BOOT_JDK_FOUND=yes
21414
21415  # Only process if variable expands to non-empty
21416
21417  if test "x$BOOT_JDK" != x; then
21418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21419
21420  # Input might be given as Windows format, start by converting to
21421  # unix format.
21422  path="$BOOT_JDK"
21423  new_path=`$CYGPATH -u "$path"`
21424
21425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21428  # "foo.exe" is OK but "foo" is an error.
21429  #
21430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21431  # It is also a way to make sure we got the proper file name for the real test later on.
21432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21433  if test "x$test_shortpath" = x; then
21434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21436    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21437  fi
21438
21439  # Call helper function which possibly converts this using DOS-style short mode.
21440  # If so, the updated path is stored in $new_path.
21441
21442  input_path="$new_path"
21443  # Check if we need to convert this using DOS-style short mode. If the path
21444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21445  # take no chances and rewrite it.
21446  # Note: m4 eats our [], so we need to use [ and ] instead.
21447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21448  if test "x$has_forbidden_chars" != x; then
21449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21453      # Going to short mode and back again did indeed matter. Since short mode is
21454      # case insensitive, let's make it lowercase to improve readability.
21455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21456      # Now convert it back to Unix-stile (cygpath)
21457      input_path=`$CYGPATH -u "$shortmode_path"`
21458      new_path="$input_path"
21459    fi
21460  fi
21461
21462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21463  if test "x$test_cygdrive_prefix" = x; then
21464    # As a simple fix, exclude /usr/bin since it's not a real path.
21465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21467      # a path prefixed by /cygdrive for fixpath to work.
21468      new_path="$CYGWIN_ROOT_PATH$input_path"
21469    fi
21470  fi
21471
21472
21473  if test "x$path" != "x$new_path"; then
21474    BOOT_JDK="$new_path"
21475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21476$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21477  fi
21478
21479    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21480
21481  path="$BOOT_JDK"
21482  has_colon=`$ECHO $path | $GREP ^.:`
21483  new_path="$path"
21484  if test "x$has_colon" = x; then
21485    # Not in mixed or Windows style, start by that.
21486    new_path=`cmd //c echo $path`
21487  fi
21488
21489
21490  input_path="$new_path"
21491  # Check if we need to convert this using DOS-style short mode. If the path
21492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21493  # take no chances and rewrite it.
21494  # Note: m4 eats our [], so we need to use [ and ] instead.
21495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21496  if test "x$has_forbidden_chars" != x; then
21497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21499  fi
21500
21501
21502  windows_path="$new_path"
21503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21504    unix_path=`$CYGPATH -u "$windows_path"`
21505    new_path="$unix_path"
21506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21508    new_path="$unix_path"
21509  fi
21510
21511  if test "x$path" != "x$new_path"; then
21512    BOOT_JDK="$new_path"
21513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21515  fi
21516
21517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21519
21520    else
21521      # We're on a unix platform. Hooray! :)
21522      path="$BOOT_JDK"
21523      has_space=`$ECHO "$path" | $GREP " "`
21524      if test "x$has_space" != x; then
21525        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21527        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21528      fi
21529
21530      # Use eval to expand a potential ~
21531      eval path="$path"
21532      if test ! -f "$path" && test ! -d "$path"; then
21533        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21534      fi
21535
21536      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21537    fi
21538  fi
21539
21540            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21541$as_echo_n "checking for Boot JDK... " >&6; }
21542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21543$as_echo "$BOOT_JDK" >&6; }
21544            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21545$as_echo_n "checking Boot JDK version... " >&6; }
21546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21548$as_echo "$BOOT_JDK_VERSION" >&6; }
21549          fi # end check jdk version
21550        fi # end check javac
21551      fi # end check java
21552    fi # end check boot jdk found
21553  fi
21554
21555
21556  # Test: Is $JAVA_HOME set?
21557
21558  if test "x$BOOT_JDK_FOUND" = xno; then
21559    # Now execute the test
21560
21561  if test "x$JAVA_HOME" != x; then
21562    JAVA_HOME_PROCESSED="$JAVA_HOME"
21563
21564  # Only process if variable expands to non-empty
21565
21566  if test "x$JAVA_HOME_PROCESSED" != x; then
21567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21568
21569  # Input might be given as Windows format, start by converting to
21570  # unix format.
21571  path="$JAVA_HOME_PROCESSED"
21572  new_path=`$CYGPATH -u "$path"`
21573
21574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21577  # "foo.exe" is OK but "foo" is an error.
21578  #
21579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21580  # It is also a way to make sure we got the proper file name for the real test later on.
21581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21582  if test "x$test_shortpath" = x; then
21583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21584$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21585    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21586  fi
21587
21588  # Call helper function which possibly converts this using DOS-style short mode.
21589  # If so, the updated path is stored in $new_path.
21590
21591  input_path="$new_path"
21592  # Check if we need to convert this using DOS-style short mode. If the path
21593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21594  # take no chances and rewrite it.
21595  # Note: m4 eats our [], so we need to use [ and ] instead.
21596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21597  if test "x$has_forbidden_chars" != x; then
21598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21602      # Going to short mode and back again did indeed matter. Since short mode is
21603      # case insensitive, let's make it lowercase to improve readability.
21604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21605      # Now convert it back to Unix-stile (cygpath)
21606      input_path=`$CYGPATH -u "$shortmode_path"`
21607      new_path="$input_path"
21608    fi
21609  fi
21610
21611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21612  if test "x$test_cygdrive_prefix" = x; then
21613    # As a simple fix, exclude /usr/bin since it's not a real path.
21614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21616      # a path prefixed by /cygdrive for fixpath to work.
21617      new_path="$CYGWIN_ROOT_PATH$input_path"
21618    fi
21619  fi
21620
21621
21622  if test "x$path" != "x$new_path"; then
21623    JAVA_HOME_PROCESSED="$new_path"
21624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21625$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21626  fi
21627
21628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21629
21630  path="$JAVA_HOME_PROCESSED"
21631  has_colon=`$ECHO $path | $GREP ^.:`
21632  new_path="$path"
21633  if test "x$has_colon" = x; then
21634    # Not in mixed or Windows style, start by that.
21635    new_path=`cmd //c echo $path`
21636  fi
21637
21638
21639  input_path="$new_path"
21640  # Check if we need to convert this using DOS-style short mode. If the path
21641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21642  # take no chances and rewrite it.
21643  # Note: m4 eats our [], so we need to use [ and ] instead.
21644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21645  if test "x$has_forbidden_chars" != x; then
21646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21648  fi
21649
21650
21651  windows_path="$new_path"
21652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21653    unix_path=`$CYGPATH -u "$windows_path"`
21654    new_path="$unix_path"
21655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21657    new_path="$unix_path"
21658  fi
21659
21660  if test "x$path" != "x$new_path"; then
21661    JAVA_HOME_PROCESSED="$new_path"
21662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21663$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21664  fi
21665
21666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21668
21669    else
21670      # We're on a unix platform. Hooray! :)
21671      path="$JAVA_HOME_PROCESSED"
21672      has_space=`$ECHO "$path" | $GREP " "`
21673      if test "x$has_space" != x; then
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21675$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21677      fi
21678
21679      # Use eval to expand a potential ~
21680      eval path="$path"
21681      if test ! -f "$path" && test ! -d "$path"; then
21682        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21683      fi
21684
21685      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21686    fi
21687  fi
21688
21689    if test ! -d "$JAVA_HOME_PROCESSED"; then
21690      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21691$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21692    else
21693      # Aha, the user has set a JAVA_HOME
21694      # let us use that as the Boot JDK.
21695      BOOT_JDK="$JAVA_HOME_PROCESSED"
21696      BOOT_JDK_FOUND=maybe
21697      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21698$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21699    fi
21700  fi
21701
21702
21703    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21704    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21705      # Do we have a bin/java?
21706      if test ! -x "$BOOT_JDK/bin/java"; then
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21709        BOOT_JDK_FOUND=no
21710      else
21711        # Do we have a bin/javac?
21712        if test ! -x "$BOOT_JDK/bin/javac"; then
21713          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21715          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21716$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21717          BOOT_JDK_FOUND=no
21718        else
21719          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21720          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21721
21722          # Extra M4 quote needed to protect [] in grep expression.
21723          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21724          if test "x$FOUND_CORRECT_VERSION" = x; then
21725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21727            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21728$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21729            BOOT_JDK_FOUND=no
21730          else
21731            # We're done! :-)
21732            BOOT_JDK_FOUND=yes
21733
21734  # Only process if variable expands to non-empty
21735
21736  if test "x$BOOT_JDK" != x; then
21737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21738
21739  # Input might be given as Windows format, start by converting to
21740  # unix format.
21741  path="$BOOT_JDK"
21742  new_path=`$CYGPATH -u "$path"`
21743
21744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21747  # "foo.exe" is OK but "foo" is an error.
21748  #
21749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21750  # It is also a way to make sure we got the proper file name for the real test later on.
21751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21752  if test "x$test_shortpath" = x; then
21753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21755    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21756  fi
21757
21758  # Call helper function which possibly converts this using DOS-style short mode.
21759  # If so, the updated path is stored in $new_path.
21760
21761  input_path="$new_path"
21762  # Check if we need to convert this using DOS-style short mode. If the path
21763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21764  # take no chances and rewrite it.
21765  # Note: m4 eats our [], so we need to use [ and ] instead.
21766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21767  if test "x$has_forbidden_chars" != x; then
21768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21772      # Going to short mode and back again did indeed matter. Since short mode is
21773      # case insensitive, let's make it lowercase to improve readability.
21774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21775      # Now convert it back to Unix-stile (cygpath)
21776      input_path=`$CYGPATH -u "$shortmode_path"`
21777      new_path="$input_path"
21778    fi
21779  fi
21780
21781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21782  if test "x$test_cygdrive_prefix" = x; then
21783    # As a simple fix, exclude /usr/bin since it's not a real path.
21784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21786      # a path prefixed by /cygdrive for fixpath to work.
21787      new_path="$CYGWIN_ROOT_PATH$input_path"
21788    fi
21789  fi
21790
21791
21792  if test "x$path" != "x$new_path"; then
21793    BOOT_JDK="$new_path"
21794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21796  fi
21797
21798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21799
21800  path="$BOOT_JDK"
21801  has_colon=`$ECHO $path | $GREP ^.:`
21802  new_path="$path"
21803  if test "x$has_colon" = x; then
21804    # Not in mixed or Windows style, start by that.
21805    new_path=`cmd //c echo $path`
21806  fi
21807
21808
21809  input_path="$new_path"
21810  # Check if we need to convert this using DOS-style short mode. If the path
21811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21812  # take no chances and rewrite it.
21813  # Note: m4 eats our [], so we need to use [ and ] instead.
21814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21815  if test "x$has_forbidden_chars" != x; then
21816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21818  fi
21819
21820
21821  windows_path="$new_path"
21822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21823    unix_path=`$CYGPATH -u "$windows_path"`
21824    new_path="$unix_path"
21825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21827    new_path="$unix_path"
21828  fi
21829
21830  if test "x$path" != "x$new_path"; then
21831    BOOT_JDK="$new_path"
21832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21834  fi
21835
21836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21838
21839    else
21840      # We're on a unix platform. Hooray! :)
21841      path="$BOOT_JDK"
21842      has_space=`$ECHO "$path" | $GREP " "`
21843      if test "x$has_space" != x; then
21844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21847      fi
21848
21849      # Use eval to expand a potential ~
21850      eval path="$path"
21851      if test ! -f "$path" && test ! -d "$path"; then
21852        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21853      fi
21854
21855      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21856    fi
21857  fi
21858
21859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21860$as_echo_n "checking for Boot JDK... " >&6; }
21861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21862$as_echo "$BOOT_JDK" >&6; }
21863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21864$as_echo_n "checking Boot JDK version... " >&6; }
21865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21867$as_echo "$BOOT_JDK_VERSION" >&6; }
21868          fi # end check jdk version
21869        fi # end check javac
21870      fi # end check java
21871    fi # end check boot jdk found
21872  fi
21873
21874
21875  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21876
21877  if test "x$BOOT_JDK_FOUND" = xno; then
21878    # Now execute the test
21879
21880  # Extract the first word of "javac", so it can be a program name with args.
21881set dummy javac; ac_word=$2
21882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21883$as_echo_n "checking for $ac_word... " >&6; }
21884if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21885  $as_echo_n "(cached) " >&6
21886else
21887  case $JAVAC_CHECK in
21888  [\\/]* | ?:[\\/]*)
21889  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21890  ;;
21891  *)
21892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21893for as_dir in $PATH
21894do
21895  IFS=$as_save_IFS
21896  test -z "$as_dir" && as_dir=.
21897    for ac_exec_ext in '' $ac_executable_extensions; do
21898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21899    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21901    break 2
21902  fi
21903done
21904  done
21905IFS=$as_save_IFS
21906
21907  ;;
21908esac
21909fi
21910JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21911if test -n "$JAVAC_CHECK"; then
21912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21913$as_echo "$JAVAC_CHECK" >&6; }
21914else
21915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21916$as_echo "no" >&6; }
21917fi
21918
21919
21920  # Extract the first word of "java", so it can be a program name with args.
21921set dummy java; ac_word=$2
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923$as_echo_n "checking for $ac_word... " >&6; }
21924if ${ac_cv_path_JAVA_CHECK+:} false; then :
21925  $as_echo_n "(cached) " >&6
21926else
21927  case $JAVA_CHECK in
21928  [\\/]* | ?:[\\/]*)
21929  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21930  ;;
21931  *)
21932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21933for as_dir in $PATH
21934do
21935  IFS=$as_save_IFS
21936  test -z "$as_dir" && as_dir=.
21937    for ac_exec_ext in '' $ac_executable_extensions; do
21938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21939    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21941    break 2
21942  fi
21943done
21944  done
21945IFS=$as_save_IFS
21946
21947  ;;
21948esac
21949fi
21950JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21951if test -n "$JAVA_CHECK"; then
21952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21953$as_echo "$JAVA_CHECK" >&6; }
21954else
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956$as_echo "no" >&6; }
21957fi
21958
21959
21960  BINARY="$JAVAC_CHECK"
21961  if test "x$JAVAC_CHECK" = x; then
21962    BINARY="$JAVA_CHECK"
21963  fi
21964  if test "x$BINARY" != x; then
21965    # So there is a java(c) binary, it might be part of a JDK.
21966    # Lets find the JDK/JRE directory by following symbolic links.
21967    # Linux/GNU systems often have links from /usr/bin/java to
21968    # /etc/alternatives/java to the real JDK binary.
21969
21970  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21971    # Follow a chain of symbolic links. Use readlink
21972    # where it exists, else fall back to horribly
21973    # complicated shell code.
21974    if test "x$READLINK_TESTED" != yes; then
21975      # On MacOSX there is a readlink tool with a different
21976      # purpose than the GNU readlink tool. Check the found readlink.
21977      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21978      if test "x$ISGNU" = x; then
21979        # A readlink that we do not know how to use.
21980        # Are there other non-GNU readlinks out there?
21981        READLINK_TESTED=yes
21982        READLINK=
21983      fi
21984    fi
21985
21986    if test "x$READLINK" != x; then
21987      BINARY=`$READLINK -f $BINARY`
21988    else
21989      # Save the current directory for restoring afterwards
21990      STARTDIR=$PWD
21991      COUNTER=0
21992      sym_link_dir=`$DIRNAME $BINARY`
21993      sym_link_file=`$BASENAME $BINARY`
21994      cd $sym_link_dir
21995      # Use -P flag to resolve symlinks in directories.
21996      cd `$THEPWDCMD -P`
21997      sym_link_dir=`$THEPWDCMD -P`
21998      # Resolve file symlinks
21999      while test $COUNTER -lt 20; do
22000        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22001        if test "x$ISLINK" == x; then
22002          # This is not a symbolic link! We are done!
22003          break
22004        fi
22005        # Again resolve directory symlinks since the target of the just found
22006        # link could be in a different directory
22007        cd `$DIRNAME $ISLINK`
22008        sym_link_dir=`$THEPWDCMD -P`
22009        sym_link_file=`$BASENAME $ISLINK`
22010        let COUNTER=COUNTER+1
22011      done
22012      cd $STARTDIR
22013      BINARY=$sym_link_dir/$sym_link_file
22014    fi
22015  fi
22016
22017    BOOT_JDK=`dirname "$BINARY"`
22018    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22019    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22020      # Looks like we found ourselves an JDK
22021      BOOT_JDK_FOUND=maybe
22022      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22023$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22024    fi
22025  fi
22026
22027
22028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22030      # Do we have a bin/java?
22031      if test ! -x "$BOOT_JDK/bin/java"; then
22032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22034        BOOT_JDK_FOUND=no
22035      else
22036        # Do we have a bin/javac?
22037        if test ! -x "$BOOT_JDK/bin/javac"; then
22038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22042          BOOT_JDK_FOUND=no
22043        else
22044          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22045          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22046
22047          # Extra M4 quote needed to protect [] in grep expression.
22048          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22049          if test "x$FOUND_CORRECT_VERSION" = x; then
22050            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22052            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22053$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22054            BOOT_JDK_FOUND=no
22055          else
22056            # We're done! :-)
22057            BOOT_JDK_FOUND=yes
22058
22059  # Only process if variable expands to non-empty
22060
22061  if test "x$BOOT_JDK" != x; then
22062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22063
22064  # Input might be given as Windows format, start by converting to
22065  # unix format.
22066  path="$BOOT_JDK"
22067  new_path=`$CYGPATH -u "$path"`
22068
22069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22072  # "foo.exe" is OK but "foo" is an error.
22073  #
22074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22075  # It is also a way to make sure we got the proper file name for the real test later on.
22076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22077  if test "x$test_shortpath" = x; then
22078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22080    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22081  fi
22082
22083  # Call helper function which possibly converts this using DOS-style short mode.
22084  # If so, the updated path is stored in $new_path.
22085
22086  input_path="$new_path"
22087  # Check if we need to convert this using DOS-style short mode. If the path
22088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22089  # take no chances and rewrite it.
22090  # Note: m4 eats our [], so we need to use [ and ] instead.
22091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22092  if test "x$has_forbidden_chars" != x; then
22093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22097      # Going to short mode and back again did indeed matter. Since short mode is
22098      # case insensitive, let's make it lowercase to improve readability.
22099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22100      # Now convert it back to Unix-stile (cygpath)
22101      input_path=`$CYGPATH -u "$shortmode_path"`
22102      new_path="$input_path"
22103    fi
22104  fi
22105
22106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22107  if test "x$test_cygdrive_prefix" = x; then
22108    # As a simple fix, exclude /usr/bin since it's not a real path.
22109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22111      # a path prefixed by /cygdrive for fixpath to work.
22112      new_path="$CYGWIN_ROOT_PATH$input_path"
22113    fi
22114  fi
22115
22116
22117  if test "x$path" != "x$new_path"; then
22118    BOOT_JDK="$new_path"
22119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22121  fi
22122
22123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22124
22125  path="$BOOT_JDK"
22126  has_colon=`$ECHO $path | $GREP ^.:`
22127  new_path="$path"
22128  if test "x$has_colon" = x; then
22129    # Not in mixed or Windows style, start by that.
22130    new_path=`cmd //c echo $path`
22131  fi
22132
22133
22134  input_path="$new_path"
22135  # Check if we need to convert this using DOS-style short mode. If the path
22136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22137  # take no chances and rewrite it.
22138  # Note: m4 eats our [], so we need to use [ and ] instead.
22139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22140  if test "x$has_forbidden_chars" != x; then
22141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22143  fi
22144
22145
22146  windows_path="$new_path"
22147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148    unix_path=`$CYGPATH -u "$windows_path"`
22149    new_path="$unix_path"
22150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22152    new_path="$unix_path"
22153  fi
22154
22155  if test "x$path" != "x$new_path"; then
22156    BOOT_JDK="$new_path"
22157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22159  fi
22160
22161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22163
22164    else
22165      # We're on a unix platform. Hooray! :)
22166      path="$BOOT_JDK"
22167      has_space=`$ECHO "$path" | $GREP " "`
22168      if test "x$has_space" != x; then
22169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22172      fi
22173
22174      # Use eval to expand a potential ~
22175      eval path="$path"
22176      if test ! -f "$path" && test ! -d "$path"; then
22177        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22178      fi
22179
22180      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22181    fi
22182  fi
22183
22184            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22185$as_echo_n "checking for Boot JDK... " >&6; }
22186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22187$as_echo "$BOOT_JDK" >&6; }
22188            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22189$as_echo_n "checking Boot JDK version... " >&6; }
22190            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22192$as_echo "$BOOT_JDK_VERSION" >&6; }
22193          fi # end check jdk version
22194        fi # end check javac
22195      fi # end check java
22196    fi # end check boot jdk found
22197  fi
22198
22199
22200  # Test: Is there a JDK installed in default, well-known locations?
22201
22202  if test "x$BOOT_JDK_FOUND" = xno; then
22203    # Now execute the test
22204
22205  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22206
22207  if test "x$BOOT_JDK_FOUND" = xno; then
22208    # Now execute the test
22209
22210  if test "x$ProgramW6432" != x; then
22211    VIRTUAL_DIR="$ProgramW6432/Java"
22212
22213  windows_path="$VIRTUAL_DIR"
22214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22215    unix_path=`$CYGPATH -u "$windows_path"`
22216    VIRTUAL_DIR="$unix_path"
22217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22219    VIRTUAL_DIR="$unix_path"
22220  fi
22221
22222
22223  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22224  BOOT_JDK_SUFFIX=""
22225  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22226  if test "x$ALL_JDKS_FOUND" != x; then
22227    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22228
22229  if test "x$BOOT_JDK_FOUND" = xno; then
22230    # Now execute the test
22231
22232        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22233        if test -d "$BOOT_JDK"; then
22234          BOOT_JDK_FOUND=maybe
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22236$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22237        fi
22238
22239
22240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22242      # Do we have a bin/java?
22243      if test ! -x "$BOOT_JDK/bin/java"; then
22244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22246        BOOT_JDK_FOUND=no
22247      else
22248        # Do we have a bin/javac?
22249        if test ! -x "$BOOT_JDK/bin/javac"; then
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22254          BOOT_JDK_FOUND=no
22255        else
22256          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22257          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22258
22259          # Extra M4 quote needed to protect [] in grep expression.
22260          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22261          if test "x$FOUND_CORRECT_VERSION" = x; then
22262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22264            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22265$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22266            BOOT_JDK_FOUND=no
22267          else
22268            # We're done! :-)
22269            BOOT_JDK_FOUND=yes
22270
22271  # Only process if variable expands to non-empty
22272
22273  if test "x$BOOT_JDK" != x; then
22274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22275
22276  # Input might be given as Windows format, start by converting to
22277  # unix format.
22278  path="$BOOT_JDK"
22279  new_path=`$CYGPATH -u "$path"`
22280
22281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22284  # "foo.exe" is OK but "foo" is an error.
22285  #
22286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22287  # It is also a way to make sure we got the proper file name for the real test later on.
22288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22289  if test "x$test_shortpath" = x; then
22290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22292    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22293  fi
22294
22295  # Call helper function which possibly converts this using DOS-style short mode.
22296  # If so, the updated path is stored in $new_path.
22297
22298  input_path="$new_path"
22299  # Check if we need to convert this using DOS-style short mode. If the path
22300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22301  # take no chances and rewrite it.
22302  # Note: m4 eats our [], so we need to use [ and ] instead.
22303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22304  if test "x$has_forbidden_chars" != x; then
22305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22309      # Going to short mode and back again did indeed matter. Since short mode is
22310      # case insensitive, let's make it lowercase to improve readability.
22311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22312      # Now convert it back to Unix-stile (cygpath)
22313      input_path=`$CYGPATH -u "$shortmode_path"`
22314      new_path="$input_path"
22315    fi
22316  fi
22317
22318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22319  if test "x$test_cygdrive_prefix" = x; then
22320    # As a simple fix, exclude /usr/bin since it's not a real path.
22321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22323      # a path prefixed by /cygdrive for fixpath to work.
22324      new_path="$CYGWIN_ROOT_PATH$input_path"
22325    fi
22326  fi
22327
22328
22329  if test "x$path" != "x$new_path"; then
22330    BOOT_JDK="$new_path"
22331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22333  fi
22334
22335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22336
22337  path="$BOOT_JDK"
22338  has_colon=`$ECHO $path | $GREP ^.:`
22339  new_path="$path"
22340  if test "x$has_colon" = x; then
22341    # Not in mixed or Windows style, start by that.
22342    new_path=`cmd //c echo $path`
22343  fi
22344
22345
22346  input_path="$new_path"
22347  # Check if we need to convert this using DOS-style short mode. If the path
22348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22349  # take no chances and rewrite it.
22350  # Note: m4 eats our [], so we need to use [ and ] instead.
22351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22352  if test "x$has_forbidden_chars" != x; then
22353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22355  fi
22356
22357
22358  windows_path="$new_path"
22359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22360    unix_path=`$CYGPATH -u "$windows_path"`
22361    new_path="$unix_path"
22362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22364    new_path="$unix_path"
22365  fi
22366
22367  if test "x$path" != "x$new_path"; then
22368    BOOT_JDK="$new_path"
22369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22371  fi
22372
22373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22375
22376    else
22377      # We're on a unix platform. Hooray! :)
22378      path="$BOOT_JDK"
22379      has_space=`$ECHO "$path" | $GREP " "`
22380      if test "x$has_space" != x; then
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22384      fi
22385
22386      # Use eval to expand a potential ~
22387      eval path="$path"
22388      if test ! -f "$path" && test ! -d "$path"; then
22389        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22390      fi
22391
22392      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22393    fi
22394  fi
22395
22396            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22397$as_echo_n "checking for Boot JDK... " >&6; }
22398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22399$as_echo "$BOOT_JDK" >&6; }
22400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22401$as_echo_n "checking Boot JDK version... " >&6; }
22402            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22404$as_echo "$BOOT_JDK_VERSION" >&6; }
22405          fi # end check jdk version
22406        fi # end check javac
22407      fi # end check java
22408    fi # end check boot jdk found
22409  fi
22410
22411    done
22412  fi
22413
22414  fi
22415
22416
22417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22419      # Do we have a bin/java?
22420      if test ! -x "$BOOT_JDK/bin/java"; then
22421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22423        BOOT_JDK_FOUND=no
22424      else
22425        # Do we have a bin/javac?
22426        if test ! -x "$BOOT_JDK/bin/javac"; then
22427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22431          BOOT_JDK_FOUND=no
22432        else
22433          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22434          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22435
22436          # Extra M4 quote needed to protect [] in grep expression.
22437          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22438          if test "x$FOUND_CORRECT_VERSION" = x; then
22439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22441            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22442$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22443            BOOT_JDK_FOUND=no
22444          else
22445            # We're done! :-)
22446            BOOT_JDK_FOUND=yes
22447
22448  # Only process if variable expands to non-empty
22449
22450  if test "x$BOOT_JDK" != x; then
22451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22452
22453  # Input might be given as Windows format, start by converting to
22454  # unix format.
22455  path="$BOOT_JDK"
22456  new_path=`$CYGPATH -u "$path"`
22457
22458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22461  # "foo.exe" is OK but "foo" is an error.
22462  #
22463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22464  # It is also a way to make sure we got the proper file name for the real test later on.
22465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22466  if test "x$test_shortpath" = x; then
22467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22470  fi
22471
22472  # Call helper function which possibly converts this using DOS-style short mode.
22473  # If so, the updated path is stored in $new_path.
22474
22475  input_path="$new_path"
22476  # Check if we need to convert this using DOS-style short mode. If the path
22477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22478  # take no chances and rewrite it.
22479  # Note: m4 eats our [], so we need to use [ and ] instead.
22480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22481  if test "x$has_forbidden_chars" != x; then
22482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22486      # Going to short mode and back again did indeed matter. Since short mode is
22487      # case insensitive, let's make it lowercase to improve readability.
22488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22489      # Now convert it back to Unix-stile (cygpath)
22490      input_path=`$CYGPATH -u "$shortmode_path"`
22491      new_path="$input_path"
22492    fi
22493  fi
22494
22495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22496  if test "x$test_cygdrive_prefix" = x; then
22497    # As a simple fix, exclude /usr/bin since it's not a real path.
22498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22500      # a path prefixed by /cygdrive for fixpath to work.
22501      new_path="$CYGWIN_ROOT_PATH$input_path"
22502    fi
22503  fi
22504
22505
22506  if test "x$path" != "x$new_path"; then
22507    BOOT_JDK="$new_path"
22508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22510  fi
22511
22512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22513
22514  path="$BOOT_JDK"
22515  has_colon=`$ECHO $path | $GREP ^.:`
22516  new_path="$path"
22517  if test "x$has_colon" = x; then
22518    # Not in mixed or Windows style, start by that.
22519    new_path=`cmd //c echo $path`
22520  fi
22521
22522
22523  input_path="$new_path"
22524  # Check if we need to convert this using DOS-style short mode. If the path
22525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22526  # take no chances and rewrite it.
22527  # Note: m4 eats our [], so we need to use [ and ] instead.
22528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22529  if test "x$has_forbidden_chars" != x; then
22530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22532  fi
22533
22534
22535  windows_path="$new_path"
22536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22537    unix_path=`$CYGPATH -u "$windows_path"`
22538    new_path="$unix_path"
22539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22541    new_path="$unix_path"
22542  fi
22543
22544  if test "x$path" != "x$new_path"; then
22545    BOOT_JDK="$new_path"
22546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22548  fi
22549
22550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22552
22553    else
22554      # We're on a unix platform. Hooray! :)
22555      path="$BOOT_JDK"
22556      has_space=`$ECHO "$path" | $GREP " "`
22557      if test "x$has_space" != x; then
22558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22561      fi
22562
22563      # Use eval to expand a potential ~
22564      eval path="$path"
22565      if test ! -f "$path" && test ! -d "$path"; then
22566        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22567      fi
22568
22569      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22570    fi
22571  fi
22572
22573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22574$as_echo_n "checking for Boot JDK... " >&6; }
22575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22576$as_echo "$BOOT_JDK" >&6; }
22577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22578$as_echo_n "checking Boot JDK version... " >&6; }
22579            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22581$as_echo "$BOOT_JDK_VERSION" >&6; }
22582          fi # end check jdk version
22583        fi # end check javac
22584      fi # end check java
22585    fi # end check boot jdk found
22586  fi
22587
22588
22589  if test "x$BOOT_JDK_FOUND" = xno; then
22590    # Now execute the test
22591
22592  if test "x$PROGRAMW6432" != x; then
22593    VIRTUAL_DIR="$PROGRAMW6432/Java"
22594
22595  windows_path="$VIRTUAL_DIR"
22596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22597    unix_path=`$CYGPATH -u "$windows_path"`
22598    VIRTUAL_DIR="$unix_path"
22599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22601    VIRTUAL_DIR="$unix_path"
22602  fi
22603
22604
22605  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22606  BOOT_JDK_SUFFIX=""
22607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22608  if test "x$ALL_JDKS_FOUND" != x; then
22609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22610
22611  if test "x$BOOT_JDK_FOUND" = xno; then
22612    # Now execute the test
22613
22614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22615        if test -d "$BOOT_JDK"; then
22616          BOOT_JDK_FOUND=maybe
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22619        fi
22620
22621
22622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22624      # Do we have a bin/java?
22625      if test ! -x "$BOOT_JDK/bin/java"; then
22626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22628        BOOT_JDK_FOUND=no
22629      else
22630        # Do we have a bin/javac?
22631        if test ! -x "$BOOT_JDK/bin/javac"; then
22632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22636          BOOT_JDK_FOUND=no
22637        else
22638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22640
22641          # Extra M4 quote needed to protect [] in grep expression.
22642          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22643          if test "x$FOUND_CORRECT_VERSION" = x; then
22644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22648            BOOT_JDK_FOUND=no
22649          else
22650            # We're done! :-)
22651            BOOT_JDK_FOUND=yes
22652
22653  # Only process if variable expands to non-empty
22654
22655  if test "x$BOOT_JDK" != x; then
22656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22657
22658  # Input might be given as Windows format, start by converting to
22659  # unix format.
22660  path="$BOOT_JDK"
22661  new_path=`$CYGPATH -u "$path"`
22662
22663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22666  # "foo.exe" is OK but "foo" is an error.
22667  #
22668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22669  # It is also a way to make sure we got the proper file name for the real test later on.
22670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22671  if test "x$test_shortpath" = x; then
22672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22675  fi
22676
22677  # Call helper function which possibly converts this using DOS-style short mode.
22678  # If so, the updated path is stored in $new_path.
22679
22680  input_path="$new_path"
22681  # Check if we need to convert this using DOS-style short mode. If the path
22682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22683  # take no chances and rewrite it.
22684  # Note: m4 eats our [], so we need to use [ and ] instead.
22685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22686  if test "x$has_forbidden_chars" != x; then
22687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22691      # Going to short mode and back again did indeed matter. Since short mode is
22692      # case insensitive, let's make it lowercase to improve readability.
22693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22694      # Now convert it back to Unix-stile (cygpath)
22695      input_path=`$CYGPATH -u "$shortmode_path"`
22696      new_path="$input_path"
22697    fi
22698  fi
22699
22700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22701  if test "x$test_cygdrive_prefix" = x; then
22702    # As a simple fix, exclude /usr/bin since it's not a real path.
22703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22705      # a path prefixed by /cygdrive for fixpath to work.
22706      new_path="$CYGWIN_ROOT_PATH$input_path"
22707    fi
22708  fi
22709
22710
22711  if test "x$path" != "x$new_path"; then
22712    BOOT_JDK="$new_path"
22713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22715  fi
22716
22717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22718
22719  path="$BOOT_JDK"
22720  has_colon=`$ECHO $path | $GREP ^.:`
22721  new_path="$path"
22722  if test "x$has_colon" = x; then
22723    # Not in mixed or Windows style, start by that.
22724    new_path=`cmd //c echo $path`
22725  fi
22726
22727
22728  input_path="$new_path"
22729  # Check if we need to convert this using DOS-style short mode. If the path
22730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22731  # take no chances and rewrite it.
22732  # Note: m4 eats our [], so we need to use [ and ] instead.
22733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22734  if test "x$has_forbidden_chars" != x; then
22735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22737  fi
22738
22739
22740  windows_path="$new_path"
22741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22742    unix_path=`$CYGPATH -u "$windows_path"`
22743    new_path="$unix_path"
22744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22746    new_path="$unix_path"
22747  fi
22748
22749  if test "x$path" != "x$new_path"; then
22750    BOOT_JDK="$new_path"
22751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22753  fi
22754
22755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22757
22758    else
22759      # We're on a unix platform. Hooray! :)
22760      path="$BOOT_JDK"
22761      has_space=`$ECHO "$path" | $GREP " "`
22762      if test "x$has_space" != x; then
22763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22766      fi
22767
22768      # Use eval to expand a potential ~
22769      eval path="$path"
22770      if test ! -f "$path" && test ! -d "$path"; then
22771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22772      fi
22773
22774      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22775    fi
22776  fi
22777
22778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22779$as_echo_n "checking for Boot JDK... " >&6; }
22780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22781$as_echo "$BOOT_JDK" >&6; }
22782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22783$as_echo_n "checking Boot JDK version... " >&6; }
22784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22786$as_echo "$BOOT_JDK_VERSION" >&6; }
22787          fi # end check jdk version
22788        fi # end check javac
22789      fi # end check java
22790    fi # end check boot jdk found
22791  fi
22792
22793    done
22794  fi
22795
22796  fi
22797
22798
22799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22801      # Do we have a bin/java?
22802      if test ! -x "$BOOT_JDK/bin/java"; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22805        BOOT_JDK_FOUND=no
22806      else
22807        # Do we have a bin/javac?
22808        if test ! -x "$BOOT_JDK/bin/javac"; then
22809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22813          BOOT_JDK_FOUND=no
22814        else
22815          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22816          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22817
22818          # Extra M4 quote needed to protect [] in grep expression.
22819          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22820          if test "x$FOUND_CORRECT_VERSION" = x; then
22821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22823            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22824$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22825            BOOT_JDK_FOUND=no
22826          else
22827            # We're done! :-)
22828            BOOT_JDK_FOUND=yes
22829
22830  # Only process if variable expands to non-empty
22831
22832  if test "x$BOOT_JDK" != x; then
22833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22834
22835  # Input might be given as Windows format, start by converting to
22836  # unix format.
22837  path="$BOOT_JDK"
22838  new_path=`$CYGPATH -u "$path"`
22839
22840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22843  # "foo.exe" is OK but "foo" is an error.
22844  #
22845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22846  # It is also a way to make sure we got the proper file name for the real test later on.
22847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22848  if test "x$test_shortpath" = x; then
22849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22852  fi
22853
22854  # Call helper function which possibly converts this using DOS-style short mode.
22855  # If so, the updated path is stored in $new_path.
22856
22857  input_path="$new_path"
22858  # Check if we need to convert this using DOS-style short mode. If the path
22859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22860  # take no chances and rewrite it.
22861  # Note: m4 eats our [], so we need to use [ and ] instead.
22862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22863  if test "x$has_forbidden_chars" != x; then
22864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22868      # Going to short mode and back again did indeed matter. Since short mode is
22869      # case insensitive, let's make it lowercase to improve readability.
22870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22871      # Now convert it back to Unix-stile (cygpath)
22872      input_path=`$CYGPATH -u "$shortmode_path"`
22873      new_path="$input_path"
22874    fi
22875  fi
22876
22877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22878  if test "x$test_cygdrive_prefix" = x; then
22879    # As a simple fix, exclude /usr/bin since it's not a real path.
22880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22882      # a path prefixed by /cygdrive for fixpath to work.
22883      new_path="$CYGWIN_ROOT_PATH$input_path"
22884    fi
22885  fi
22886
22887
22888  if test "x$path" != "x$new_path"; then
22889    BOOT_JDK="$new_path"
22890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22892  fi
22893
22894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22895
22896  path="$BOOT_JDK"
22897  has_colon=`$ECHO $path | $GREP ^.:`
22898  new_path="$path"
22899  if test "x$has_colon" = x; then
22900    # Not in mixed or Windows style, start by that.
22901    new_path=`cmd //c echo $path`
22902  fi
22903
22904
22905  input_path="$new_path"
22906  # Check if we need to convert this using DOS-style short mode. If the path
22907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22908  # take no chances and rewrite it.
22909  # Note: m4 eats our [], so we need to use [ and ] instead.
22910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22911  if test "x$has_forbidden_chars" != x; then
22912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22914  fi
22915
22916
22917  windows_path="$new_path"
22918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22919    unix_path=`$CYGPATH -u "$windows_path"`
22920    new_path="$unix_path"
22921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22923    new_path="$unix_path"
22924  fi
22925
22926  if test "x$path" != "x$new_path"; then
22927    BOOT_JDK="$new_path"
22928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22930  fi
22931
22932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22934
22935    else
22936      # We're on a unix platform. Hooray! :)
22937      path="$BOOT_JDK"
22938      has_space=`$ECHO "$path" | $GREP " "`
22939      if test "x$has_space" != x; then
22940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22943      fi
22944
22945      # Use eval to expand a potential ~
22946      eval path="$path"
22947      if test ! -f "$path" && test ! -d "$path"; then
22948        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22949      fi
22950
22951      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22952    fi
22953  fi
22954
22955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22956$as_echo_n "checking for Boot JDK... " >&6; }
22957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22958$as_echo "$BOOT_JDK" >&6; }
22959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22960$as_echo_n "checking Boot JDK version... " >&6; }
22961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22963$as_echo "$BOOT_JDK_VERSION" >&6; }
22964          fi # end check jdk version
22965        fi # end check javac
22966      fi # end check java
22967    fi # end check boot jdk found
22968  fi
22969
22970
22971  if test "x$BOOT_JDK_FOUND" = xno; then
22972    # Now execute the test
22973
22974  if test "x$PROGRAMFILES" != x; then
22975    VIRTUAL_DIR="$PROGRAMFILES/Java"
22976
22977  windows_path="$VIRTUAL_DIR"
22978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22979    unix_path=`$CYGPATH -u "$windows_path"`
22980    VIRTUAL_DIR="$unix_path"
22981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22983    VIRTUAL_DIR="$unix_path"
22984  fi
22985
22986
22987  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22988  BOOT_JDK_SUFFIX=""
22989  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22990  if test "x$ALL_JDKS_FOUND" != x; then
22991    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22992
22993  if test "x$BOOT_JDK_FOUND" = xno; then
22994    # Now execute the test
22995
22996        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22997        if test -d "$BOOT_JDK"; then
22998          BOOT_JDK_FOUND=maybe
22999          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23000$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23001        fi
23002
23003
23004    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23005    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23006      # Do we have a bin/java?
23007      if test ! -x "$BOOT_JDK/bin/java"; then
23008        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23010        BOOT_JDK_FOUND=no
23011      else
23012        # Do we have a bin/javac?
23013        if test ! -x "$BOOT_JDK/bin/javac"; then
23014          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23016          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23017$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23018          BOOT_JDK_FOUND=no
23019        else
23020          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23021          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23022
23023          # Extra M4 quote needed to protect [] in grep expression.
23024          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23025          if test "x$FOUND_CORRECT_VERSION" = x; then
23026            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23028            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23029$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23030            BOOT_JDK_FOUND=no
23031          else
23032            # We're done! :-)
23033            BOOT_JDK_FOUND=yes
23034
23035  # Only process if variable expands to non-empty
23036
23037  if test "x$BOOT_JDK" != x; then
23038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23039
23040  # Input might be given as Windows format, start by converting to
23041  # unix format.
23042  path="$BOOT_JDK"
23043  new_path=`$CYGPATH -u "$path"`
23044
23045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23048  # "foo.exe" is OK but "foo" is an error.
23049  #
23050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23051  # It is also a way to make sure we got the proper file name for the real test later on.
23052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23053  if test "x$test_shortpath" = x; then
23054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23055$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23056    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23057  fi
23058
23059  # Call helper function which possibly converts this using DOS-style short mode.
23060  # If so, the updated path is stored in $new_path.
23061
23062  input_path="$new_path"
23063  # Check if we need to convert this using DOS-style short mode. If the path
23064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23065  # take no chances and rewrite it.
23066  # Note: m4 eats our [], so we need to use [ and ] instead.
23067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23068  if test "x$has_forbidden_chars" != x; then
23069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23073      # Going to short mode and back again did indeed matter. Since short mode is
23074      # case insensitive, let's make it lowercase to improve readability.
23075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23076      # Now convert it back to Unix-stile (cygpath)
23077      input_path=`$CYGPATH -u "$shortmode_path"`
23078      new_path="$input_path"
23079    fi
23080  fi
23081
23082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23083  if test "x$test_cygdrive_prefix" = x; then
23084    # As a simple fix, exclude /usr/bin since it's not a real path.
23085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23087      # a path prefixed by /cygdrive for fixpath to work.
23088      new_path="$CYGWIN_ROOT_PATH$input_path"
23089    fi
23090  fi
23091
23092
23093  if test "x$path" != "x$new_path"; then
23094    BOOT_JDK="$new_path"
23095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23097  fi
23098
23099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23100
23101  path="$BOOT_JDK"
23102  has_colon=`$ECHO $path | $GREP ^.:`
23103  new_path="$path"
23104  if test "x$has_colon" = x; then
23105    # Not in mixed or Windows style, start by that.
23106    new_path=`cmd //c echo $path`
23107  fi
23108
23109
23110  input_path="$new_path"
23111  # Check if we need to convert this using DOS-style short mode. If the path
23112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23113  # take no chances and rewrite it.
23114  # Note: m4 eats our [], so we need to use [ and ] instead.
23115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23116  if test "x$has_forbidden_chars" != x; then
23117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23119  fi
23120
23121
23122  windows_path="$new_path"
23123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23124    unix_path=`$CYGPATH -u "$windows_path"`
23125    new_path="$unix_path"
23126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23128    new_path="$unix_path"
23129  fi
23130
23131  if test "x$path" != "x$new_path"; then
23132    BOOT_JDK="$new_path"
23133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23135  fi
23136
23137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23139
23140    else
23141      # We're on a unix platform. Hooray! :)
23142      path="$BOOT_JDK"
23143      has_space=`$ECHO "$path" | $GREP " "`
23144      if test "x$has_space" != x; then
23145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23146$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23147        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23148      fi
23149
23150      # Use eval to expand a potential ~
23151      eval path="$path"
23152      if test ! -f "$path" && test ! -d "$path"; then
23153        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23154      fi
23155
23156      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23157    fi
23158  fi
23159
23160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23161$as_echo_n "checking for Boot JDK... " >&6; }
23162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23163$as_echo "$BOOT_JDK" >&6; }
23164            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23165$as_echo_n "checking Boot JDK version... " >&6; }
23166            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23168$as_echo "$BOOT_JDK_VERSION" >&6; }
23169          fi # end check jdk version
23170        fi # end check javac
23171      fi # end check java
23172    fi # end check boot jdk found
23173  fi
23174
23175    done
23176  fi
23177
23178  fi
23179
23180
23181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23183      # Do we have a bin/java?
23184      if test ! -x "$BOOT_JDK/bin/java"; then
23185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23187        BOOT_JDK_FOUND=no
23188      else
23189        # Do we have a bin/javac?
23190        if test ! -x "$BOOT_JDK/bin/javac"; then
23191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23195          BOOT_JDK_FOUND=no
23196        else
23197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23199
23200          # Extra M4 quote needed to protect [] in grep expression.
23201          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23202          if test "x$FOUND_CORRECT_VERSION" = x; then
23203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23207            BOOT_JDK_FOUND=no
23208          else
23209            # We're done! :-)
23210            BOOT_JDK_FOUND=yes
23211
23212  # Only process if variable expands to non-empty
23213
23214  if test "x$BOOT_JDK" != x; then
23215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23216
23217  # Input might be given as Windows format, start by converting to
23218  # unix format.
23219  path="$BOOT_JDK"
23220  new_path=`$CYGPATH -u "$path"`
23221
23222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23225  # "foo.exe" is OK but "foo" is an error.
23226  #
23227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23228  # It is also a way to make sure we got the proper file name for the real test later on.
23229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23230  if test "x$test_shortpath" = x; then
23231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23234  fi
23235
23236  # Call helper function which possibly converts this using DOS-style short mode.
23237  # If so, the updated path is stored in $new_path.
23238
23239  input_path="$new_path"
23240  # Check if we need to convert this using DOS-style short mode. If the path
23241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23242  # take no chances and rewrite it.
23243  # Note: m4 eats our [], so we need to use [ and ] instead.
23244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23245  if test "x$has_forbidden_chars" != x; then
23246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23250      # Going to short mode and back again did indeed matter. Since short mode is
23251      # case insensitive, let's make it lowercase to improve readability.
23252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23253      # Now convert it back to Unix-stile (cygpath)
23254      input_path=`$CYGPATH -u "$shortmode_path"`
23255      new_path="$input_path"
23256    fi
23257  fi
23258
23259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23260  if test "x$test_cygdrive_prefix" = x; then
23261    # As a simple fix, exclude /usr/bin since it's not a real path.
23262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23264      # a path prefixed by /cygdrive for fixpath to work.
23265      new_path="$CYGWIN_ROOT_PATH$input_path"
23266    fi
23267  fi
23268
23269
23270  if test "x$path" != "x$new_path"; then
23271    BOOT_JDK="$new_path"
23272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23274  fi
23275
23276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23277
23278  path="$BOOT_JDK"
23279  has_colon=`$ECHO $path | $GREP ^.:`
23280  new_path="$path"
23281  if test "x$has_colon" = x; then
23282    # Not in mixed or Windows style, start by that.
23283    new_path=`cmd //c echo $path`
23284  fi
23285
23286
23287  input_path="$new_path"
23288  # Check if we need to convert this using DOS-style short mode. If the path
23289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23290  # take no chances and rewrite it.
23291  # Note: m4 eats our [], so we need to use [ and ] instead.
23292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23293  if test "x$has_forbidden_chars" != x; then
23294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23296  fi
23297
23298
23299  windows_path="$new_path"
23300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23301    unix_path=`$CYGPATH -u "$windows_path"`
23302    new_path="$unix_path"
23303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23305    new_path="$unix_path"
23306  fi
23307
23308  if test "x$path" != "x$new_path"; then
23309    BOOT_JDK="$new_path"
23310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23312  fi
23313
23314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23316
23317    else
23318      # We're on a unix platform. Hooray! :)
23319      path="$BOOT_JDK"
23320      has_space=`$ECHO "$path" | $GREP " "`
23321      if test "x$has_space" != x; then
23322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23325      fi
23326
23327      # Use eval to expand a potential ~
23328      eval path="$path"
23329      if test ! -f "$path" && test ! -d "$path"; then
23330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23331      fi
23332
23333      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23334    fi
23335  fi
23336
23337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23338$as_echo_n "checking for Boot JDK... " >&6; }
23339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23340$as_echo "$BOOT_JDK" >&6; }
23341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23342$as_echo_n "checking Boot JDK version... " >&6; }
23343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23345$as_echo "$BOOT_JDK_VERSION" >&6; }
23346          fi # end check jdk version
23347        fi # end check javac
23348      fi # end check java
23349    fi # end check boot jdk found
23350  fi
23351
23352
23353  if test "x$BOOT_JDK_FOUND" = xno; then
23354    # Now execute the test
23355
23356  if test "x$ProgramFiles" != x; then
23357    VIRTUAL_DIR="$ProgramFiles/Java"
23358
23359  windows_path="$VIRTUAL_DIR"
23360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23361    unix_path=`$CYGPATH -u "$windows_path"`
23362    VIRTUAL_DIR="$unix_path"
23363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23365    VIRTUAL_DIR="$unix_path"
23366  fi
23367
23368
23369  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23370  BOOT_JDK_SUFFIX=""
23371  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23372  if test "x$ALL_JDKS_FOUND" != x; then
23373    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23374
23375  if test "x$BOOT_JDK_FOUND" = xno; then
23376    # Now execute the test
23377
23378        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23379        if test -d "$BOOT_JDK"; then
23380          BOOT_JDK_FOUND=maybe
23381          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23382$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23383        fi
23384
23385
23386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23388      # Do we have a bin/java?
23389      if test ! -x "$BOOT_JDK/bin/java"; then
23390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23392        BOOT_JDK_FOUND=no
23393      else
23394        # Do we have a bin/javac?
23395        if test ! -x "$BOOT_JDK/bin/javac"; then
23396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23400          BOOT_JDK_FOUND=no
23401        else
23402          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23403          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23404
23405          # Extra M4 quote needed to protect [] in grep expression.
23406          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23407          if test "x$FOUND_CORRECT_VERSION" = x; then
23408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23410            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23411$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23412            BOOT_JDK_FOUND=no
23413          else
23414            # We're done! :-)
23415            BOOT_JDK_FOUND=yes
23416
23417  # Only process if variable expands to non-empty
23418
23419  if test "x$BOOT_JDK" != x; then
23420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23421
23422  # Input might be given as Windows format, start by converting to
23423  # unix format.
23424  path="$BOOT_JDK"
23425  new_path=`$CYGPATH -u "$path"`
23426
23427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23430  # "foo.exe" is OK but "foo" is an error.
23431  #
23432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23433  # It is also a way to make sure we got the proper file name for the real test later on.
23434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23435  if test "x$test_shortpath" = x; then
23436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23439  fi
23440
23441  # Call helper function which possibly converts this using DOS-style short mode.
23442  # If so, the updated path is stored in $new_path.
23443
23444  input_path="$new_path"
23445  # Check if we need to convert this using DOS-style short mode. If the path
23446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23447  # take no chances and rewrite it.
23448  # Note: m4 eats our [], so we need to use [ and ] instead.
23449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23450  if test "x$has_forbidden_chars" != x; then
23451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23455      # Going to short mode and back again did indeed matter. Since short mode is
23456      # case insensitive, let's make it lowercase to improve readability.
23457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23458      # Now convert it back to Unix-stile (cygpath)
23459      input_path=`$CYGPATH -u "$shortmode_path"`
23460      new_path="$input_path"
23461    fi
23462  fi
23463
23464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23465  if test "x$test_cygdrive_prefix" = x; then
23466    # As a simple fix, exclude /usr/bin since it's not a real path.
23467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23469      # a path prefixed by /cygdrive for fixpath to work.
23470      new_path="$CYGWIN_ROOT_PATH$input_path"
23471    fi
23472  fi
23473
23474
23475  if test "x$path" != "x$new_path"; then
23476    BOOT_JDK="$new_path"
23477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23479  fi
23480
23481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23482
23483  path="$BOOT_JDK"
23484  has_colon=`$ECHO $path | $GREP ^.:`
23485  new_path="$path"
23486  if test "x$has_colon" = x; then
23487    # Not in mixed or Windows style, start by that.
23488    new_path=`cmd //c echo $path`
23489  fi
23490
23491
23492  input_path="$new_path"
23493  # Check if we need to convert this using DOS-style short mode. If the path
23494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23495  # take no chances and rewrite it.
23496  # Note: m4 eats our [], so we need to use [ and ] instead.
23497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23498  if test "x$has_forbidden_chars" != x; then
23499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23501  fi
23502
23503
23504  windows_path="$new_path"
23505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23506    unix_path=`$CYGPATH -u "$windows_path"`
23507    new_path="$unix_path"
23508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23510    new_path="$unix_path"
23511  fi
23512
23513  if test "x$path" != "x$new_path"; then
23514    BOOT_JDK="$new_path"
23515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23517  fi
23518
23519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23521
23522    else
23523      # We're on a unix platform. Hooray! :)
23524      path="$BOOT_JDK"
23525      has_space=`$ECHO "$path" | $GREP " "`
23526      if test "x$has_space" != x; then
23527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23530      fi
23531
23532      # Use eval to expand a potential ~
23533      eval path="$path"
23534      if test ! -f "$path" && test ! -d "$path"; then
23535        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23536      fi
23537
23538      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23539    fi
23540  fi
23541
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23543$as_echo_n "checking for Boot JDK... " >&6; }
23544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23545$as_echo "$BOOT_JDK" >&6; }
23546            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23547$as_echo_n "checking Boot JDK version... " >&6; }
23548            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23550$as_echo "$BOOT_JDK_VERSION" >&6; }
23551          fi # end check jdk version
23552        fi # end check javac
23553      fi # end check java
23554    fi # end check boot jdk found
23555  fi
23556
23557    done
23558  fi
23559
23560  fi
23561
23562
23563    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23564    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23565      # Do we have a bin/java?
23566      if test ! -x "$BOOT_JDK/bin/java"; then
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23569        BOOT_JDK_FOUND=no
23570      else
23571        # Do we have a bin/javac?
23572        if test ! -x "$BOOT_JDK/bin/javac"; then
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23576$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23577          BOOT_JDK_FOUND=no
23578        else
23579          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23580          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23581
23582          # Extra M4 quote needed to protect [] in grep expression.
23583          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23584          if test "x$FOUND_CORRECT_VERSION" = x; then
23585            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23587            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23588$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23589            BOOT_JDK_FOUND=no
23590          else
23591            # We're done! :-)
23592            BOOT_JDK_FOUND=yes
23593
23594  # Only process if variable expands to non-empty
23595
23596  if test "x$BOOT_JDK" != x; then
23597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23598
23599  # Input might be given as Windows format, start by converting to
23600  # unix format.
23601  path="$BOOT_JDK"
23602  new_path=`$CYGPATH -u "$path"`
23603
23604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23607  # "foo.exe" is OK but "foo" is an error.
23608  #
23609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23610  # It is also a way to make sure we got the proper file name for the real test later on.
23611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23612  if test "x$test_shortpath" = x; then
23613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23615    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23616  fi
23617
23618  # Call helper function which possibly converts this using DOS-style short mode.
23619  # If so, the updated path is stored in $new_path.
23620
23621  input_path="$new_path"
23622  # Check if we need to convert this using DOS-style short mode. If the path
23623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23624  # take no chances and rewrite it.
23625  # Note: m4 eats our [], so we need to use [ and ] instead.
23626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23627  if test "x$has_forbidden_chars" != x; then
23628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23632      # Going to short mode and back again did indeed matter. Since short mode is
23633      # case insensitive, let's make it lowercase to improve readability.
23634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23635      # Now convert it back to Unix-stile (cygpath)
23636      input_path=`$CYGPATH -u "$shortmode_path"`
23637      new_path="$input_path"
23638    fi
23639  fi
23640
23641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23642  if test "x$test_cygdrive_prefix" = x; then
23643    # As a simple fix, exclude /usr/bin since it's not a real path.
23644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23646      # a path prefixed by /cygdrive for fixpath to work.
23647      new_path="$CYGWIN_ROOT_PATH$input_path"
23648    fi
23649  fi
23650
23651
23652  if test "x$path" != "x$new_path"; then
23653    BOOT_JDK="$new_path"
23654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23656  fi
23657
23658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23659
23660  path="$BOOT_JDK"
23661  has_colon=`$ECHO $path | $GREP ^.:`
23662  new_path="$path"
23663  if test "x$has_colon" = x; then
23664    # Not in mixed or Windows style, start by that.
23665    new_path=`cmd //c echo $path`
23666  fi
23667
23668
23669  input_path="$new_path"
23670  # Check if we need to convert this using DOS-style short mode. If the path
23671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23672  # take no chances and rewrite it.
23673  # Note: m4 eats our [], so we need to use [ and ] instead.
23674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23675  if test "x$has_forbidden_chars" != x; then
23676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23678  fi
23679
23680
23681  windows_path="$new_path"
23682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23683    unix_path=`$CYGPATH -u "$windows_path"`
23684    new_path="$unix_path"
23685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23687    new_path="$unix_path"
23688  fi
23689
23690  if test "x$path" != "x$new_path"; then
23691    BOOT_JDK="$new_path"
23692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23694  fi
23695
23696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23698
23699    else
23700      # We're on a unix platform. Hooray! :)
23701      path="$BOOT_JDK"
23702      has_space=`$ECHO "$path" | $GREP " "`
23703      if test "x$has_space" != x; then
23704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23706        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23707      fi
23708
23709      # Use eval to expand a potential ~
23710      eval path="$path"
23711      if test ! -f "$path" && test ! -d "$path"; then
23712        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23713      fi
23714
23715      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23716    fi
23717  fi
23718
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23720$as_echo_n "checking for Boot JDK... " >&6; }
23721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23722$as_echo "$BOOT_JDK" >&6; }
23723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23724$as_echo_n "checking Boot JDK version... " >&6; }
23725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23727$as_echo "$BOOT_JDK_VERSION" >&6; }
23728          fi # end check jdk version
23729        fi # end check javac
23730      fi # end check java
23731    fi # end check boot jdk found
23732  fi
23733
23734
23735  if test "x$BOOT_JDK_FOUND" = xno; then
23736    # Now execute the test
23737
23738  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23739  BOOT_JDK_SUFFIX=""
23740  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23741  if test "x$ALL_JDKS_FOUND" != x; then
23742    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23743
23744  if test "x$BOOT_JDK_FOUND" = xno; then
23745    # Now execute the test
23746
23747        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23748        if test -d "$BOOT_JDK"; then
23749          BOOT_JDK_FOUND=maybe
23750          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23751$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23752        fi
23753
23754
23755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23757      # Do we have a bin/java?
23758      if test ! -x "$BOOT_JDK/bin/java"; then
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23761        BOOT_JDK_FOUND=no
23762      else
23763        # Do we have a bin/javac?
23764        if test ! -x "$BOOT_JDK/bin/javac"; then
23765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23769          BOOT_JDK_FOUND=no
23770        else
23771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23773
23774          # Extra M4 quote needed to protect [] in grep expression.
23775          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23776          if test "x$FOUND_CORRECT_VERSION" = x; then
23777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23781            BOOT_JDK_FOUND=no
23782          else
23783            # We're done! :-)
23784            BOOT_JDK_FOUND=yes
23785
23786  # Only process if variable expands to non-empty
23787
23788  if test "x$BOOT_JDK" != x; then
23789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790
23791  # Input might be given as Windows format, start by converting to
23792  # unix format.
23793  path="$BOOT_JDK"
23794  new_path=`$CYGPATH -u "$path"`
23795
23796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23799  # "foo.exe" is OK but "foo" is an error.
23800  #
23801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23802  # It is also a way to make sure we got the proper file name for the real test later on.
23803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23804  if test "x$test_shortpath" = x; then
23805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23808  fi
23809
23810  # Call helper function which possibly converts this using DOS-style short mode.
23811  # If so, the updated path is stored in $new_path.
23812
23813  input_path="$new_path"
23814  # Check if we need to convert this using DOS-style short mode. If the path
23815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23816  # take no chances and rewrite it.
23817  # Note: m4 eats our [], so we need to use [ and ] instead.
23818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23819  if test "x$has_forbidden_chars" != x; then
23820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23824      # Going to short mode and back again did indeed matter. Since short mode is
23825      # case insensitive, let's make it lowercase to improve readability.
23826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23827      # Now convert it back to Unix-stile (cygpath)
23828      input_path=`$CYGPATH -u "$shortmode_path"`
23829      new_path="$input_path"
23830    fi
23831  fi
23832
23833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23834  if test "x$test_cygdrive_prefix" = x; then
23835    # As a simple fix, exclude /usr/bin since it's not a real path.
23836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23838      # a path prefixed by /cygdrive for fixpath to work.
23839      new_path="$CYGWIN_ROOT_PATH$input_path"
23840    fi
23841  fi
23842
23843
23844  if test "x$path" != "x$new_path"; then
23845    BOOT_JDK="$new_path"
23846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23848  fi
23849
23850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23851
23852  path="$BOOT_JDK"
23853  has_colon=`$ECHO $path | $GREP ^.:`
23854  new_path="$path"
23855  if test "x$has_colon" = x; then
23856    # Not in mixed or Windows style, start by that.
23857    new_path=`cmd //c echo $path`
23858  fi
23859
23860
23861  input_path="$new_path"
23862  # Check if we need to convert this using DOS-style short mode. If the path
23863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23864  # take no chances and rewrite it.
23865  # Note: m4 eats our [], so we need to use [ and ] instead.
23866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23867  if test "x$has_forbidden_chars" != x; then
23868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23870  fi
23871
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882  if test "x$path" != "x$new_path"; then
23883    BOOT_JDK="$new_path"
23884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23886  fi
23887
23888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23890
23891    else
23892      # We're on a unix platform. Hooray! :)
23893      path="$BOOT_JDK"
23894      has_space=`$ECHO "$path" | $GREP " "`
23895      if test "x$has_space" != x; then
23896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23899      fi
23900
23901      # Use eval to expand a potential ~
23902      eval path="$path"
23903      if test ! -f "$path" && test ! -d "$path"; then
23904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23905      fi
23906
23907      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23908    fi
23909  fi
23910
23911            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23912$as_echo_n "checking for Boot JDK... " >&6; }
23913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23914$as_echo "$BOOT_JDK" >&6; }
23915            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23916$as_echo_n "checking Boot JDK version... " >&6; }
23917            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23919$as_echo "$BOOT_JDK_VERSION" >&6; }
23920          fi # end check jdk version
23921        fi # end check javac
23922      fi # end check java
23923    fi # end check boot jdk found
23924  fi
23925
23926    done
23927  fi
23928
23929
23930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23932      # Do we have a bin/java?
23933      if test ! -x "$BOOT_JDK/bin/java"; then
23934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23936        BOOT_JDK_FOUND=no
23937      else
23938        # Do we have a bin/javac?
23939        if test ! -x "$BOOT_JDK/bin/javac"; then
23940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23944          BOOT_JDK_FOUND=no
23945        else
23946          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23947          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23948
23949          # Extra M4 quote needed to protect [] in grep expression.
23950          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23951          if test "x$FOUND_CORRECT_VERSION" = x; then
23952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23954            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23955$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23956            BOOT_JDK_FOUND=no
23957          else
23958            # We're done! :-)
23959            BOOT_JDK_FOUND=yes
23960
23961  # Only process if variable expands to non-empty
23962
23963  if test "x$BOOT_JDK" != x; then
23964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23965
23966  # Input might be given as Windows format, start by converting to
23967  # unix format.
23968  path="$BOOT_JDK"
23969  new_path=`$CYGPATH -u "$path"`
23970
23971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23974  # "foo.exe" is OK but "foo" is an error.
23975  #
23976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23977  # It is also a way to make sure we got the proper file name for the real test later on.
23978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23979  if test "x$test_shortpath" = x; then
23980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23983  fi
23984
23985  # Call helper function which possibly converts this using DOS-style short mode.
23986  # If so, the updated path is stored in $new_path.
23987
23988  input_path="$new_path"
23989  # Check if we need to convert this using DOS-style short mode. If the path
23990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23991  # take no chances and rewrite it.
23992  # Note: m4 eats our [], so we need to use [ and ] instead.
23993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23994  if test "x$has_forbidden_chars" != x; then
23995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23999      # Going to short mode and back again did indeed matter. Since short mode is
24000      # case insensitive, let's make it lowercase to improve readability.
24001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24002      # Now convert it back to Unix-stile (cygpath)
24003      input_path=`$CYGPATH -u "$shortmode_path"`
24004      new_path="$input_path"
24005    fi
24006  fi
24007
24008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24009  if test "x$test_cygdrive_prefix" = x; then
24010    # As a simple fix, exclude /usr/bin since it's not a real path.
24011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24013      # a path prefixed by /cygdrive for fixpath to work.
24014      new_path="$CYGWIN_ROOT_PATH$input_path"
24015    fi
24016  fi
24017
24018
24019  if test "x$path" != "x$new_path"; then
24020    BOOT_JDK="$new_path"
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24023  fi
24024
24025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24026
24027  path="$BOOT_JDK"
24028  has_colon=`$ECHO $path | $GREP ^.:`
24029  new_path="$path"
24030  if test "x$has_colon" = x; then
24031    # Not in mixed or Windows style, start by that.
24032    new_path=`cmd //c echo $path`
24033  fi
24034
24035
24036  input_path="$new_path"
24037  # Check if we need to convert this using DOS-style short mode. If the path
24038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24039  # take no chances and rewrite it.
24040  # Note: m4 eats our [], so we need to use [ and ] instead.
24041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24042  if test "x$has_forbidden_chars" != x; then
24043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24045  fi
24046
24047
24048  windows_path="$new_path"
24049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24050    unix_path=`$CYGPATH -u "$windows_path"`
24051    new_path="$unix_path"
24052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24054    new_path="$unix_path"
24055  fi
24056
24057  if test "x$path" != "x$new_path"; then
24058    BOOT_JDK="$new_path"
24059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24061  fi
24062
24063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24065
24066    else
24067      # We're on a unix platform. Hooray! :)
24068      path="$BOOT_JDK"
24069      has_space=`$ECHO "$path" | $GREP " "`
24070      if test "x$has_space" != x; then
24071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24074      fi
24075
24076      # Use eval to expand a potential ~
24077      eval path="$path"
24078      if test ! -f "$path" && test ! -d "$path"; then
24079        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24080      fi
24081
24082      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24083    fi
24084  fi
24085
24086            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24087$as_echo_n "checking for Boot JDK... " >&6; }
24088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24089$as_echo "$BOOT_JDK" >&6; }
24090            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24091$as_echo_n "checking Boot JDK version... " >&6; }
24092            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24094$as_echo "$BOOT_JDK_VERSION" >&6; }
24095          fi # end check jdk version
24096        fi # end check javac
24097      fi # end check java
24098    fi # end check boot jdk found
24099  fi
24100
24101  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24102
24103  if test "x$BOOT_JDK_FOUND" = xno; then
24104    # Now execute the test
24105
24106  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24107  BOOT_JDK_SUFFIX="/Contents/Home"
24108  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24109  if test "x$ALL_JDKS_FOUND" != x; then
24110    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24111
24112  if test "x$BOOT_JDK_FOUND" = xno; then
24113    # Now execute the test
24114
24115        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24116        if test -d "$BOOT_JDK"; then
24117          BOOT_JDK_FOUND=maybe
24118          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24119$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24120        fi
24121
24122
24123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24125      # Do we have a bin/java?
24126      if test ! -x "$BOOT_JDK/bin/java"; then
24127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24129        BOOT_JDK_FOUND=no
24130      else
24131        # Do we have a bin/javac?
24132        if test ! -x "$BOOT_JDK/bin/javac"; then
24133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24137          BOOT_JDK_FOUND=no
24138        else
24139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24141
24142          # Extra M4 quote needed to protect [] in grep expression.
24143          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24144          if test "x$FOUND_CORRECT_VERSION" = x; then
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24149            BOOT_JDK_FOUND=no
24150          else
24151            # We're done! :-)
24152            BOOT_JDK_FOUND=yes
24153
24154  # Only process if variable expands to non-empty
24155
24156  if test "x$BOOT_JDK" != x; then
24157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24158
24159  # Input might be given as Windows format, start by converting to
24160  # unix format.
24161  path="$BOOT_JDK"
24162  new_path=`$CYGPATH -u "$path"`
24163
24164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24167  # "foo.exe" is OK but "foo" is an error.
24168  #
24169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24170  # It is also a way to make sure we got the proper file name for the real test later on.
24171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24172  if test "x$test_shortpath" = x; then
24173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24176  fi
24177
24178  # Call helper function which possibly converts this using DOS-style short mode.
24179  # If so, the updated path is stored in $new_path.
24180
24181  input_path="$new_path"
24182  # Check if we need to convert this using DOS-style short mode. If the path
24183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24184  # take no chances and rewrite it.
24185  # Note: m4 eats our [], so we need to use [ and ] instead.
24186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24187  if test "x$has_forbidden_chars" != x; then
24188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24192      # Going to short mode and back again did indeed matter. Since short mode is
24193      # case insensitive, let's make it lowercase to improve readability.
24194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24195      # Now convert it back to Unix-stile (cygpath)
24196      input_path=`$CYGPATH -u "$shortmode_path"`
24197      new_path="$input_path"
24198    fi
24199  fi
24200
24201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24202  if test "x$test_cygdrive_prefix" = x; then
24203    # As a simple fix, exclude /usr/bin since it's not a real path.
24204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24206      # a path prefixed by /cygdrive for fixpath to work.
24207      new_path="$CYGWIN_ROOT_PATH$input_path"
24208    fi
24209  fi
24210
24211
24212  if test "x$path" != "x$new_path"; then
24213    BOOT_JDK="$new_path"
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24216  fi
24217
24218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24219
24220  path="$BOOT_JDK"
24221  has_colon=`$ECHO $path | $GREP ^.:`
24222  new_path="$path"
24223  if test "x$has_colon" = x; then
24224    # Not in mixed or Windows style, start by that.
24225    new_path=`cmd //c echo $path`
24226  fi
24227
24228
24229  input_path="$new_path"
24230  # Check if we need to convert this using DOS-style short mode. If the path
24231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24232  # take no chances and rewrite it.
24233  # Note: m4 eats our [], so we need to use [ and ] instead.
24234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24235  if test "x$has_forbidden_chars" != x; then
24236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24238  fi
24239
24240
24241  windows_path="$new_path"
24242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24243    unix_path=`$CYGPATH -u "$windows_path"`
24244    new_path="$unix_path"
24245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24247    new_path="$unix_path"
24248  fi
24249
24250  if test "x$path" != "x$new_path"; then
24251    BOOT_JDK="$new_path"
24252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24254  fi
24255
24256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24258
24259    else
24260      # We're on a unix platform. Hooray! :)
24261      path="$BOOT_JDK"
24262      has_space=`$ECHO "$path" | $GREP " "`
24263      if test "x$has_space" != x; then
24264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24267      fi
24268
24269      # Use eval to expand a potential ~
24270      eval path="$path"
24271      if test ! -f "$path" && test ! -d "$path"; then
24272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24273      fi
24274
24275      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24276    fi
24277  fi
24278
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24280$as_echo_n "checking for Boot JDK... " >&6; }
24281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24282$as_echo "$BOOT_JDK" >&6; }
24283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24284$as_echo_n "checking Boot JDK version... " >&6; }
24285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24287$as_echo "$BOOT_JDK_VERSION" >&6; }
24288          fi # end check jdk version
24289        fi # end check javac
24290      fi # end check java
24291    fi # end check boot jdk found
24292  fi
24293
24294    done
24295  fi
24296
24297
24298    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24299    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24300      # Do we have a bin/java?
24301      if test ! -x "$BOOT_JDK/bin/java"; then
24302        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24304        BOOT_JDK_FOUND=no
24305      else
24306        # Do we have a bin/javac?
24307        if test ! -x "$BOOT_JDK/bin/javac"; then
24308          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24310          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24311$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24312          BOOT_JDK_FOUND=no
24313        else
24314          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24315          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24316
24317          # Extra M4 quote needed to protect [] in grep expression.
24318          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24319          if test "x$FOUND_CORRECT_VERSION" = x; then
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24322            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24323$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24324            BOOT_JDK_FOUND=no
24325          else
24326            # We're done! :-)
24327            BOOT_JDK_FOUND=yes
24328
24329  # Only process if variable expands to non-empty
24330
24331  if test "x$BOOT_JDK" != x; then
24332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24333
24334  # Input might be given as Windows format, start by converting to
24335  # unix format.
24336  path="$BOOT_JDK"
24337  new_path=`$CYGPATH -u "$path"`
24338
24339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24342  # "foo.exe" is OK but "foo" is an error.
24343  #
24344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24345  # It is also a way to make sure we got the proper file name for the real test later on.
24346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24347  if test "x$test_shortpath" = x; then
24348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24351  fi
24352
24353  # Call helper function which possibly converts this using DOS-style short mode.
24354  # If so, the updated path is stored in $new_path.
24355
24356  input_path="$new_path"
24357  # Check if we need to convert this using DOS-style short mode. If the path
24358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24359  # take no chances and rewrite it.
24360  # Note: m4 eats our [], so we need to use [ and ] instead.
24361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24362  if test "x$has_forbidden_chars" != x; then
24363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24367      # Going to short mode and back again did indeed matter. Since short mode is
24368      # case insensitive, let's make it lowercase to improve readability.
24369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24370      # Now convert it back to Unix-stile (cygpath)
24371      input_path=`$CYGPATH -u "$shortmode_path"`
24372      new_path="$input_path"
24373    fi
24374  fi
24375
24376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24377  if test "x$test_cygdrive_prefix" = x; then
24378    # As a simple fix, exclude /usr/bin since it's not a real path.
24379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24381      # a path prefixed by /cygdrive for fixpath to work.
24382      new_path="$CYGWIN_ROOT_PATH$input_path"
24383    fi
24384  fi
24385
24386
24387  if test "x$path" != "x$new_path"; then
24388    BOOT_JDK="$new_path"
24389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24391  fi
24392
24393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24394
24395  path="$BOOT_JDK"
24396  has_colon=`$ECHO $path | $GREP ^.:`
24397  new_path="$path"
24398  if test "x$has_colon" = x; then
24399    # Not in mixed or Windows style, start by that.
24400    new_path=`cmd //c echo $path`
24401  fi
24402
24403
24404  input_path="$new_path"
24405  # Check if we need to convert this using DOS-style short mode. If the path
24406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407  # take no chances and rewrite it.
24408  # Note: m4 eats our [], so we need to use [ and ] instead.
24409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24410  if test "x$has_forbidden_chars" != x; then
24411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24413  fi
24414
24415
24416  windows_path="$new_path"
24417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24418    unix_path=`$CYGPATH -u "$windows_path"`
24419    new_path="$unix_path"
24420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24422    new_path="$unix_path"
24423  fi
24424
24425  if test "x$path" != "x$new_path"; then
24426    BOOT_JDK="$new_path"
24427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24429  fi
24430
24431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24433
24434    else
24435      # We're on a unix platform. Hooray! :)
24436      path="$BOOT_JDK"
24437      has_space=`$ECHO "$path" | $GREP " "`
24438      if test "x$has_space" != x; then
24439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24442      fi
24443
24444      # Use eval to expand a potential ~
24445      eval path="$path"
24446      if test ! -f "$path" && test ! -d "$path"; then
24447        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24448      fi
24449
24450      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24451    fi
24452  fi
24453
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24455$as_echo_n "checking for Boot JDK... " >&6; }
24456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24457$as_echo "$BOOT_JDK" >&6; }
24458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24459$as_echo_n "checking Boot JDK version... " >&6; }
24460            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24462$as_echo "$BOOT_JDK_VERSION" >&6; }
24463          fi # end check jdk version
24464        fi # end check javac
24465      fi # end check java
24466    fi # end check boot jdk found
24467  fi
24468
24469
24470  if test "x$BOOT_JDK_FOUND" = xno; then
24471    # Now execute the test
24472
24473  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24474  BOOT_JDK_SUFFIX="/Contents/Home"
24475  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24476  if test "x$ALL_JDKS_FOUND" != x; then
24477    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24478
24479  if test "x$BOOT_JDK_FOUND" = xno; then
24480    # Now execute the test
24481
24482        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24483        if test -d "$BOOT_JDK"; then
24484          BOOT_JDK_FOUND=maybe
24485          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24486$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24487        fi
24488
24489
24490    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24491    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24492      # Do we have a bin/java?
24493      if test ! -x "$BOOT_JDK/bin/java"; then
24494        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24496        BOOT_JDK_FOUND=no
24497      else
24498        # Do we have a bin/javac?
24499        if test ! -x "$BOOT_JDK/bin/javac"; then
24500          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24502          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24503$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24504          BOOT_JDK_FOUND=no
24505        else
24506          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24507          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24508
24509          # Extra M4 quote needed to protect [] in grep expression.
24510          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24511          if test "x$FOUND_CORRECT_VERSION" = x; then
24512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24514            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24515$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24516            BOOT_JDK_FOUND=no
24517          else
24518            # We're done! :-)
24519            BOOT_JDK_FOUND=yes
24520
24521  # Only process if variable expands to non-empty
24522
24523  if test "x$BOOT_JDK" != x; then
24524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525
24526  # Input might be given as Windows format, start by converting to
24527  # unix format.
24528  path="$BOOT_JDK"
24529  new_path=`$CYGPATH -u "$path"`
24530
24531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24534  # "foo.exe" is OK but "foo" is an error.
24535  #
24536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24537  # It is also a way to make sure we got the proper file name for the real test later on.
24538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24539  if test "x$test_shortpath" = x; then
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24542    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24543  fi
24544
24545  # Call helper function which possibly converts this using DOS-style short mode.
24546  # If so, the updated path is stored in $new_path.
24547
24548  input_path="$new_path"
24549  # Check if we need to convert this using DOS-style short mode. If the path
24550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24551  # take no chances and rewrite it.
24552  # Note: m4 eats our [], so we need to use [ and ] instead.
24553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24554  if test "x$has_forbidden_chars" != x; then
24555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24559      # Going to short mode and back again did indeed matter. Since short mode is
24560      # case insensitive, let's make it lowercase to improve readability.
24561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24562      # Now convert it back to Unix-stile (cygpath)
24563      input_path=`$CYGPATH -u "$shortmode_path"`
24564      new_path="$input_path"
24565    fi
24566  fi
24567
24568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24569  if test "x$test_cygdrive_prefix" = x; then
24570    # As a simple fix, exclude /usr/bin since it's not a real path.
24571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24573      # a path prefixed by /cygdrive for fixpath to work.
24574      new_path="$CYGWIN_ROOT_PATH$input_path"
24575    fi
24576  fi
24577
24578
24579  if test "x$path" != "x$new_path"; then
24580    BOOT_JDK="$new_path"
24581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24583  fi
24584
24585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586
24587  path="$BOOT_JDK"
24588  has_colon=`$ECHO $path | $GREP ^.:`
24589  new_path="$path"
24590  if test "x$has_colon" = x; then
24591    # Not in mixed or Windows style, start by that.
24592    new_path=`cmd //c echo $path`
24593  fi
24594
24595
24596  input_path="$new_path"
24597  # Check if we need to convert this using DOS-style short mode. If the path
24598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24599  # take no chances and rewrite it.
24600  # Note: m4 eats our [], so we need to use [ and ] instead.
24601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24602  if test "x$has_forbidden_chars" != x; then
24603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24605  fi
24606
24607
24608  windows_path="$new_path"
24609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24610    unix_path=`$CYGPATH -u "$windows_path"`
24611    new_path="$unix_path"
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24614    new_path="$unix_path"
24615  fi
24616
24617  if test "x$path" != "x$new_path"; then
24618    BOOT_JDK="$new_path"
24619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24621  fi
24622
24623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24625
24626    else
24627      # We're on a unix platform. Hooray! :)
24628      path="$BOOT_JDK"
24629      has_space=`$ECHO "$path" | $GREP " "`
24630      if test "x$has_space" != x; then
24631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24634      fi
24635
24636      # Use eval to expand a potential ~
24637      eval path="$path"
24638      if test ! -f "$path" && test ! -d "$path"; then
24639        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24640      fi
24641
24642      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24643    fi
24644  fi
24645
24646            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24647$as_echo_n "checking for Boot JDK... " >&6; }
24648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24649$as_echo "$BOOT_JDK" >&6; }
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24651$as_echo_n "checking Boot JDK version... " >&6; }
24652            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24654$as_echo "$BOOT_JDK_VERSION" >&6; }
24655          fi # end check jdk version
24656        fi # end check javac
24657      fi # end check java
24658    fi # end check boot jdk found
24659  fi
24660
24661    done
24662  fi
24663
24664
24665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24667      # Do we have a bin/java?
24668      if test ! -x "$BOOT_JDK/bin/java"; then
24669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24671        BOOT_JDK_FOUND=no
24672      else
24673        # Do we have a bin/javac?
24674        if test ! -x "$BOOT_JDK/bin/javac"; then
24675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24679          BOOT_JDK_FOUND=no
24680        else
24681          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24682          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24683
24684          # Extra M4 quote needed to protect [] in grep expression.
24685          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24686          if test "x$FOUND_CORRECT_VERSION" = x; then
24687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24689            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24690$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24691            BOOT_JDK_FOUND=no
24692          else
24693            # We're done! :-)
24694            BOOT_JDK_FOUND=yes
24695
24696  # Only process if variable expands to non-empty
24697
24698  if test "x$BOOT_JDK" != x; then
24699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24700
24701  # Input might be given as Windows format, start by converting to
24702  # unix format.
24703  path="$BOOT_JDK"
24704  new_path=`$CYGPATH -u "$path"`
24705
24706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24709  # "foo.exe" is OK but "foo" is an error.
24710  #
24711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24712  # It is also a way to make sure we got the proper file name for the real test later on.
24713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24714  if test "x$test_shortpath" = x; then
24715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24717    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24718  fi
24719
24720  # Call helper function which possibly converts this using DOS-style short mode.
24721  # If so, the updated path is stored in $new_path.
24722
24723  input_path="$new_path"
24724  # Check if we need to convert this using DOS-style short mode. If the path
24725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24726  # take no chances and rewrite it.
24727  # Note: m4 eats our [], so we need to use [ and ] instead.
24728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24729  if test "x$has_forbidden_chars" != x; then
24730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24734      # Going to short mode and back again did indeed matter. Since short mode is
24735      # case insensitive, let's make it lowercase to improve readability.
24736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24737      # Now convert it back to Unix-stile (cygpath)
24738      input_path=`$CYGPATH -u "$shortmode_path"`
24739      new_path="$input_path"
24740    fi
24741  fi
24742
24743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24744  if test "x$test_cygdrive_prefix" = x; then
24745    # As a simple fix, exclude /usr/bin since it's not a real path.
24746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24748      # a path prefixed by /cygdrive for fixpath to work.
24749      new_path="$CYGWIN_ROOT_PATH$input_path"
24750    fi
24751  fi
24752
24753
24754  if test "x$path" != "x$new_path"; then
24755    BOOT_JDK="$new_path"
24756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24758  fi
24759
24760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24761
24762  path="$BOOT_JDK"
24763  has_colon=`$ECHO $path | $GREP ^.:`
24764  new_path="$path"
24765  if test "x$has_colon" = x; then
24766    # Not in mixed or Windows style, start by that.
24767    new_path=`cmd //c echo $path`
24768  fi
24769
24770
24771  input_path="$new_path"
24772  # Check if we need to convert this using DOS-style short mode. If the path
24773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24774  # take no chances and rewrite it.
24775  # Note: m4 eats our [], so we need to use [ and ] instead.
24776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24777  if test "x$has_forbidden_chars" != x; then
24778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24780  fi
24781
24782
24783  windows_path="$new_path"
24784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24785    unix_path=`$CYGPATH -u "$windows_path"`
24786    new_path="$unix_path"
24787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24789    new_path="$unix_path"
24790  fi
24791
24792  if test "x$path" != "x$new_path"; then
24793    BOOT_JDK="$new_path"
24794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24796  fi
24797
24798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24800
24801    else
24802      # We're on a unix platform. Hooray! :)
24803      path="$BOOT_JDK"
24804      has_space=`$ECHO "$path" | $GREP " "`
24805      if test "x$has_space" != x; then
24806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24807$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24809      fi
24810
24811      # Use eval to expand a potential ~
24812      eval path="$path"
24813      if test ! -f "$path" && test ! -d "$path"; then
24814        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24815      fi
24816
24817      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24818    fi
24819  fi
24820
24821            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24822$as_echo_n "checking for Boot JDK... " >&6; }
24823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24824$as_echo "$BOOT_JDK" >&6; }
24825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24826$as_echo_n "checking Boot JDK version... " >&6; }
24827            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24829$as_echo "$BOOT_JDK_VERSION" >&6; }
24830          fi # end check jdk version
24831        fi # end check javac
24832      fi # end check java
24833    fi # end check boot jdk found
24834  fi
24835
24836  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24837
24838  if test "x$BOOT_JDK_FOUND" = xno; then
24839    # Now execute the test
24840
24841  BOOT_JDK_PREFIX="/usr/lib/jvm"
24842  BOOT_JDK_SUFFIX=""
24843  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24844  if test "x$ALL_JDKS_FOUND" != x; then
24845    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24846
24847  if test "x$BOOT_JDK_FOUND" = xno; then
24848    # Now execute the test
24849
24850        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24851        if test -d "$BOOT_JDK"; then
24852          BOOT_JDK_FOUND=maybe
24853          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24854$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24855        fi
24856
24857
24858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24860      # Do we have a bin/java?
24861      if test ! -x "$BOOT_JDK/bin/java"; then
24862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24864        BOOT_JDK_FOUND=no
24865      else
24866        # Do we have a bin/javac?
24867        if test ! -x "$BOOT_JDK/bin/javac"; then
24868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24872          BOOT_JDK_FOUND=no
24873        else
24874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24876
24877          # Extra M4 quote needed to protect [] in grep expression.
24878          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24879          if test "x$FOUND_CORRECT_VERSION" = x; then
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24884            BOOT_JDK_FOUND=no
24885          else
24886            # We're done! :-)
24887            BOOT_JDK_FOUND=yes
24888
24889  # Only process if variable expands to non-empty
24890
24891  if test "x$BOOT_JDK" != x; then
24892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893
24894  # Input might be given as Windows format, start by converting to
24895  # unix format.
24896  path="$BOOT_JDK"
24897  new_path=`$CYGPATH -u "$path"`
24898
24899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24902  # "foo.exe" is OK but "foo" is an error.
24903  #
24904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24905  # It is also a way to make sure we got the proper file name for the real test later on.
24906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24907  if test "x$test_shortpath" = x; then
24908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24911  fi
24912
24913  # Call helper function which possibly converts this using DOS-style short mode.
24914  # If so, the updated path is stored in $new_path.
24915
24916  input_path="$new_path"
24917  # Check if we need to convert this using DOS-style short mode. If the path
24918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24919  # take no chances and rewrite it.
24920  # Note: m4 eats our [], so we need to use [ and ] instead.
24921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24922  if test "x$has_forbidden_chars" != x; then
24923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24927      # Going to short mode and back again did indeed matter. Since short mode is
24928      # case insensitive, let's make it lowercase to improve readability.
24929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24930      # Now convert it back to Unix-stile (cygpath)
24931      input_path=`$CYGPATH -u "$shortmode_path"`
24932      new_path="$input_path"
24933    fi
24934  fi
24935
24936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24937  if test "x$test_cygdrive_prefix" = x; then
24938    # As a simple fix, exclude /usr/bin since it's not a real path.
24939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24941      # a path prefixed by /cygdrive for fixpath to work.
24942      new_path="$CYGWIN_ROOT_PATH$input_path"
24943    fi
24944  fi
24945
24946
24947  if test "x$path" != "x$new_path"; then
24948    BOOT_JDK="$new_path"
24949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24951  fi
24952
24953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24954
24955  path="$BOOT_JDK"
24956  has_colon=`$ECHO $path | $GREP ^.:`
24957  new_path="$path"
24958  if test "x$has_colon" = x; then
24959    # Not in mixed or Windows style, start by that.
24960    new_path=`cmd //c echo $path`
24961  fi
24962
24963
24964  input_path="$new_path"
24965  # Check if we need to convert this using DOS-style short mode. If the path
24966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24967  # take no chances and rewrite it.
24968  # Note: m4 eats our [], so we need to use [ and ] instead.
24969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24970  if test "x$has_forbidden_chars" != x; then
24971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24973  fi
24974
24975
24976  windows_path="$new_path"
24977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24978    unix_path=`$CYGPATH -u "$windows_path"`
24979    new_path="$unix_path"
24980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24982    new_path="$unix_path"
24983  fi
24984
24985  if test "x$path" != "x$new_path"; then
24986    BOOT_JDK="$new_path"
24987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24989  fi
24990
24991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24993
24994    else
24995      # We're on a unix platform. Hooray! :)
24996      path="$BOOT_JDK"
24997      has_space=`$ECHO "$path" | $GREP " "`
24998      if test "x$has_space" != x; then
24999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25002      fi
25003
25004      # Use eval to expand a potential ~
25005      eval path="$path"
25006      if test ! -f "$path" && test ! -d "$path"; then
25007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25008      fi
25009
25010      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25011    fi
25012  fi
25013
25014            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25015$as_echo_n "checking for Boot JDK... " >&6; }
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25017$as_echo "$BOOT_JDK" >&6; }
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25019$as_echo_n "checking Boot JDK version... " >&6; }
25020            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25022$as_echo "$BOOT_JDK_VERSION" >&6; }
25023          fi # end check jdk version
25024        fi # end check javac
25025      fi # end check java
25026    fi # end check boot jdk found
25027  fi
25028
25029    done
25030  fi
25031
25032
25033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25035      # Do we have a bin/java?
25036      if test ! -x "$BOOT_JDK/bin/java"; then
25037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25039        BOOT_JDK_FOUND=no
25040      else
25041        # Do we have a bin/javac?
25042        if test ! -x "$BOOT_JDK/bin/javac"; then
25043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25047          BOOT_JDK_FOUND=no
25048        else
25049          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25050          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25051
25052          # Extra M4 quote needed to protect [] in grep expression.
25053          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25054          if test "x$FOUND_CORRECT_VERSION" = x; then
25055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25058$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25059            BOOT_JDK_FOUND=no
25060          else
25061            # We're done! :-)
25062            BOOT_JDK_FOUND=yes
25063
25064  # Only process if variable expands to non-empty
25065
25066  if test "x$BOOT_JDK" != x; then
25067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25068
25069  # Input might be given as Windows format, start by converting to
25070  # unix format.
25071  path="$BOOT_JDK"
25072  new_path=`$CYGPATH -u "$path"`
25073
25074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25077  # "foo.exe" is OK but "foo" is an error.
25078  #
25079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25080  # It is also a way to make sure we got the proper file name for the real test later on.
25081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25082  if test "x$test_shortpath" = x; then
25083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25086  fi
25087
25088  # Call helper function which possibly converts this using DOS-style short mode.
25089  # If so, the updated path is stored in $new_path.
25090
25091  input_path="$new_path"
25092  # Check if we need to convert this using DOS-style short mode. If the path
25093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094  # take no chances and rewrite it.
25095  # Note: m4 eats our [], so we need to use [ and ] instead.
25096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25097  if test "x$has_forbidden_chars" != x; then
25098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25102      # Going to short mode and back again did indeed matter. Since short mode is
25103      # case insensitive, let's make it lowercase to improve readability.
25104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25105      # Now convert it back to Unix-stile (cygpath)
25106      input_path=`$CYGPATH -u "$shortmode_path"`
25107      new_path="$input_path"
25108    fi
25109  fi
25110
25111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25112  if test "x$test_cygdrive_prefix" = x; then
25113    # As a simple fix, exclude /usr/bin since it's not a real path.
25114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25116      # a path prefixed by /cygdrive for fixpath to work.
25117      new_path="$CYGWIN_ROOT_PATH$input_path"
25118    fi
25119  fi
25120
25121
25122  if test "x$path" != "x$new_path"; then
25123    BOOT_JDK="$new_path"
25124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25126  fi
25127
25128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25129
25130  path="$BOOT_JDK"
25131  has_colon=`$ECHO $path | $GREP ^.:`
25132  new_path="$path"
25133  if test "x$has_colon" = x; then
25134    # Not in mixed or Windows style, start by that.
25135    new_path=`cmd //c echo $path`
25136  fi
25137
25138
25139  input_path="$new_path"
25140  # Check if we need to convert this using DOS-style short mode. If the path
25141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25142  # take no chances and rewrite it.
25143  # Note: m4 eats our [], so we need to use [ and ] instead.
25144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25145  if test "x$has_forbidden_chars" != x; then
25146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25148  fi
25149
25150
25151  windows_path="$new_path"
25152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25153    unix_path=`$CYGPATH -u "$windows_path"`
25154    new_path="$unix_path"
25155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25157    new_path="$unix_path"
25158  fi
25159
25160  if test "x$path" != "x$new_path"; then
25161    BOOT_JDK="$new_path"
25162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25164  fi
25165
25166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25168
25169    else
25170      # We're on a unix platform. Hooray! :)
25171      path="$BOOT_JDK"
25172      has_space=`$ECHO "$path" | $GREP " "`
25173      if test "x$has_space" != x; then
25174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25177      fi
25178
25179      # Use eval to expand a potential ~
25180      eval path="$path"
25181      if test ! -f "$path" && test ! -d "$path"; then
25182        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25183      fi
25184
25185      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25186    fi
25187  fi
25188
25189            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25190$as_echo_n "checking for Boot JDK... " >&6; }
25191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25192$as_echo "$BOOT_JDK" >&6; }
25193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25194$as_echo_n "checking Boot JDK version... " >&6; }
25195            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25197$as_echo "$BOOT_JDK_VERSION" >&6; }
25198          fi # end check jdk version
25199        fi # end check javac
25200      fi # end check java
25201    fi # end check boot jdk found
25202  fi
25203
25204  fi
25205
25206
25207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25209      # Do we have a bin/java?
25210      if test ! -x "$BOOT_JDK/bin/java"; then
25211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25213        BOOT_JDK_FOUND=no
25214      else
25215        # Do we have a bin/javac?
25216        if test ! -x "$BOOT_JDK/bin/javac"; then
25217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25221          BOOT_JDK_FOUND=no
25222        else
25223          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25224          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25225
25226          # Extra M4 quote needed to protect [] in grep expression.
25227          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25228          if test "x$FOUND_CORRECT_VERSION" = x; then
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25231            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25232$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25233            BOOT_JDK_FOUND=no
25234          else
25235            # We're done! :-)
25236            BOOT_JDK_FOUND=yes
25237
25238  # Only process if variable expands to non-empty
25239
25240  if test "x$BOOT_JDK" != x; then
25241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25242
25243  # Input might be given as Windows format, start by converting to
25244  # unix format.
25245  path="$BOOT_JDK"
25246  new_path=`$CYGPATH -u "$path"`
25247
25248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25251  # "foo.exe" is OK but "foo" is an error.
25252  #
25253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25254  # It is also a way to make sure we got the proper file name for the real test later on.
25255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25256  if test "x$test_shortpath" = x; then
25257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25259    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25260  fi
25261
25262  # Call helper function which possibly converts this using DOS-style short mode.
25263  # If so, the updated path is stored in $new_path.
25264
25265  input_path="$new_path"
25266  # Check if we need to convert this using DOS-style short mode. If the path
25267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25268  # take no chances and rewrite it.
25269  # Note: m4 eats our [], so we need to use [ and ] instead.
25270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25271  if test "x$has_forbidden_chars" != x; then
25272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25276      # Going to short mode and back again did indeed matter. Since short mode is
25277      # case insensitive, let's make it lowercase to improve readability.
25278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25279      # Now convert it back to Unix-stile (cygpath)
25280      input_path=`$CYGPATH -u "$shortmode_path"`
25281      new_path="$input_path"
25282    fi
25283  fi
25284
25285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25286  if test "x$test_cygdrive_prefix" = x; then
25287    # As a simple fix, exclude /usr/bin since it's not a real path.
25288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25290      # a path prefixed by /cygdrive for fixpath to work.
25291      new_path="$CYGWIN_ROOT_PATH$input_path"
25292    fi
25293  fi
25294
25295
25296  if test "x$path" != "x$new_path"; then
25297    BOOT_JDK="$new_path"
25298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25300  fi
25301
25302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303
25304  path="$BOOT_JDK"
25305  has_colon=`$ECHO $path | $GREP ^.:`
25306  new_path="$path"
25307  if test "x$has_colon" = x; then
25308    # Not in mixed or Windows style, start by that.
25309    new_path=`cmd //c echo $path`
25310  fi
25311
25312
25313  input_path="$new_path"
25314  # Check if we need to convert this using DOS-style short mode. If the path
25315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25316  # take no chances and rewrite it.
25317  # Note: m4 eats our [], so we need to use [ and ] instead.
25318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25319  if test "x$has_forbidden_chars" != x; then
25320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322  fi
25323
25324
25325  windows_path="$new_path"
25326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25327    unix_path=`$CYGPATH -u "$windows_path"`
25328    new_path="$unix_path"
25329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25331    new_path="$unix_path"
25332  fi
25333
25334  if test "x$path" != "x$new_path"; then
25335    BOOT_JDK="$new_path"
25336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25338  fi
25339
25340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25342
25343    else
25344      # We're on a unix platform. Hooray! :)
25345      path="$BOOT_JDK"
25346      has_space=`$ECHO "$path" | $GREP " "`
25347      if test "x$has_space" != x; then
25348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25351      fi
25352
25353      # Use eval to expand a potential ~
25354      eval path="$path"
25355      if test ! -f "$path" && test ! -d "$path"; then
25356        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25357      fi
25358
25359      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25360    fi
25361  fi
25362
25363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25364$as_echo_n "checking for Boot JDK... " >&6; }
25365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25366$as_echo "$BOOT_JDK" >&6; }
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25368$as_echo_n "checking Boot JDK version... " >&6; }
25369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25371$as_echo "$BOOT_JDK_VERSION" >&6; }
25372          fi # end check jdk version
25373        fi # end check javac
25374      fi # end check java
25375    fi # end check boot jdk found
25376  fi
25377
25378
25379  # If we haven't found anything yet, we've truly lost. Give up.
25380  if test "x$BOOT_JDK_FOUND" = xno; then
25381
25382  # Print a helpful message on how to acquire the necessary build dependency.
25383  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25384  MISSING_DEPENDENCY=openjdk
25385
25386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25387    cygwin_help $MISSING_DEPENDENCY
25388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25389    msys_help $MISSING_DEPENDENCY
25390  else
25391    PKGHANDLER_COMMAND=
25392
25393    case $PKGHANDLER in
25394      apt-get)
25395        apt_help     $MISSING_DEPENDENCY ;;
25396      yum)
25397        yum_help     $MISSING_DEPENDENCY ;;
25398      port)
25399        port_help    $MISSING_DEPENDENCY ;;
25400      pkgutil)
25401        pkgutil_help $MISSING_DEPENDENCY ;;
25402      pkgadd)
25403        pkgadd_help  $MISSING_DEPENDENCY ;;
25404    esac
25405
25406    if test "x$PKGHANDLER_COMMAND" != x; then
25407      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25408    fi
25409  fi
25410
25411    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25412$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25413    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25414$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25415    as_fn_error $? "Cannot continue" "$LINENO" 5
25416  fi
25417
25418
25419
25420  # Setup tools from the Boot JDK.
25421
25422  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25423
25424  # Publish this variable in the help.
25425
25426
25427  if test "x$JAVA" = x; then
25428    # The variable is not set by user, try to locate tool using the code snippet
25429
25430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25431$as_echo_n "checking for java in Boot JDK... " >&6; }
25432      JAVA=$BOOT_JDK/bin/java
25433      if test ! -x $JAVA; then
25434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25435$as_echo "not found" >&6; }
25436        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25437$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25438        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25439      fi
25440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25441$as_echo "ok" >&6; }
25442
25443
25444  else
25445    # The variable is set, but is it from the command line or the environment?
25446
25447    # Try to remove the string !JAVA! from our list.
25448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25450      # If it failed, the variable was not from the command line. Ignore it,
25451      # but warn the user (except for BASH, which is always set by the calling BASH).
25452      if test "xJAVA" != xBASH; then
25453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25454$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25455      fi
25456      # Try to locate tool using the code snippet
25457
25458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25459$as_echo_n "checking for java in Boot JDK... " >&6; }
25460      JAVA=$BOOT_JDK/bin/java
25461      if test ! -x $JAVA; then
25462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25463$as_echo "not found" >&6; }
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25465$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25466        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25467      fi
25468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25469$as_echo "ok" >&6; }
25470
25471
25472    else
25473      # If it succeeded, then it was overridden by the user. We will use it
25474      # for the tool.
25475
25476      # First remove it from the list of overridden variables, so we can test
25477      # for unknown variables in the end.
25478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25479
25480      # Check if the provided tool contains a complete path.
25481      tool_specified="$JAVA"
25482      tool_basename="${tool_specified##*/}"
25483      if test "x$tool_basename" = "x$tool_specified"; then
25484        # A command without a complete path is provided, search $PATH.
25485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25486$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25487        # Extract the first word of "$tool_basename", so it can be a program name with args.
25488set dummy $tool_basename; ac_word=$2
25489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25490$as_echo_n "checking for $ac_word... " >&6; }
25491if ${ac_cv_path_JAVA+:} false; then :
25492  $as_echo_n "(cached) " >&6
25493else
25494  case $JAVA in
25495  [\\/]* | ?:[\\/]*)
25496  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25497  ;;
25498  *)
25499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25500for as_dir in $PATH
25501do
25502  IFS=$as_save_IFS
25503  test -z "$as_dir" && as_dir=.
25504    for ac_exec_ext in '' $ac_executable_extensions; do
25505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25506    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25508    break 2
25509  fi
25510done
25511  done
25512IFS=$as_save_IFS
25513
25514  ;;
25515esac
25516fi
25517JAVA=$ac_cv_path_JAVA
25518if test -n "$JAVA"; then
25519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25520$as_echo "$JAVA" >&6; }
25521else
25522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25523$as_echo "no" >&6; }
25524fi
25525
25526
25527        if test "x$JAVA" = x; then
25528          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25529        fi
25530      else
25531        # Otherwise we believe it is a complete path. Use it as it is.
25532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25533$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25535$as_echo_n "checking for JAVA... " >&6; }
25536        if test ! -x "$tool_specified"; then
25537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25538$as_echo "not found" >&6; }
25539          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25540        fi
25541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25542$as_echo "$tool_specified" >&6; }
25543      fi
25544    fi
25545  fi
25546
25547
25548
25549  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25550
25551  # Publish this variable in the help.
25552
25553
25554  if test "x$JAVAC" = x; then
25555    # The variable is not set by user, try to locate tool using the code snippet
25556
25557      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25558$as_echo_n "checking for javac in Boot JDK... " >&6; }
25559      JAVAC=$BOOT_JDK/bin/javac
25560      if test ! -x $JAVAC; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25562$as_echo "not found" >&6; }
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25564$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25565        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25566      fi
25567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25568$as_echo "ok" >&6; }
25569
25570
25571  else
25572    # The variable is set, but is it from the command line or the environment?
25573
25574    # Try to remove the string !JAVAC! from our list.
25575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25577      # If it failed, the variable was not from the command line. Ignore it,
25578      # but warn the user (except for BASH, which is always set by the calling BASH).
25579      if test "xJAVAC" != xBASH; then
25580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25581$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25582      fi
25583      # Try to locate tool using the code snippet
25584
25585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25586$as_echo_n "checking for javac in Boot JDK... " >&6; }
25587      JAVAC=$BOOT_JDK/bin/javac
25588      if test ! -x $JAVAC; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25590$as_echo "not found" >&6; }
25591        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25593        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25594      fi
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25596$as_echo "ok" >&6; }
25597
25598
25599    else
25600      # If it succeeded, then it was overridden by the user. We will use it
25601      # for the tool.
25602
25603      # First remove it from the list of overridden variables, so we can test
25604      # for unknown variables in the end.
25605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25606
25607      # Check if the provided tool contains a complete path.
25608      tool_specified="$JAVAC"
25609      tool_basename="${tool_specified##*/}"
25610      if test "x$tool_basename" = "x$tool_specified"; then
25611        # A command without a complete path is provided, search $PATH.
25612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25613$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25614        # Extract the first word of "$tool_basename", so it can be a program name with args.
25615set dummy $tool_basename; ac_word=$2
25616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25617$as_echo_n "checking for $ac_word... " >&6; }
25618if ${ac_cv_path_JAVAC+:} false; then :
25619  $as_echo_n "(cached) " >&6
25620else
25621  case $JAVAC in
25622  [\\/]* | ?:[\\/]*)
25623  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25624  ;;
25625  *)
25626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25627for as_dir in $PATH
25628do
25629  IFS=$as_save_IFS
25630  test -z "$as_dir" && as_dir=.
25631    for ac_exec_ext in '' $ac_executable_extensions; do
25632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25633    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25635    break 2
25636  fi
25637done
25638  done
25639IFS=$as_save_IFS
25640
25641  ;;
25642esac
25643fi
25644JAVAC=$ac_cv_path_JAVAC
25645if test -n "$JAVAC"; then
25646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25647$as_echo "$JAVAC" >&6; }
25648else
25649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25650$as_echo "no" >&6; }
25651fi
25652
25653
25654        if test "x$JAVAC" = x; then
25655          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25656        fi
25657      else
25658        # Otherwise we believe it is a complete path. Use it as it is.
25659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25660$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25662$as_echo_n "checking for JAVAC... " >&6; }
25663        if test ! -x "$tool_specified"; then
25664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25665$as_echo "not found" >&6; }
25666          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25667        fi
25668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25669$as_echo "$tool_specified" >&6; }
25670      fi
25671    fi
25672  fi
25673
25674
25675
25676  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25677
25678  # Publish this variable in the help.
25679
25680
25681  if test "x$JAVAH" = x; then
25682    # The variable is not set by user, try to locate tool using the code snippet
25683
25684      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25685$as_echo_n "checking for javah in Boot JDK... " >&6; }
25686      JAVAH=$BOOT_JDK/bin/javah
25687      if test ! -x $JAVAH; then
25688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25689$as_echo "not found" >&6; }
25690        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25691$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25692        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25693      fi
25694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25695$as_echo "ok" >&6; }
25696
25697
25698  else
25699    # The variable is set, but is it from the command line or the environment?
25700
25701    # Try to remove the string !JAVAH! from our list.
25702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25704      # If it failed, the variable was not from the command line. Ignore it,
25705      # but warn the user (except for BASH, which is always set by the calling BASH).
25706      if test "xJAVAH" != xBASH; then
25707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25708$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25709      fi
25710      # Try to locate tool using the code snippet
25711
25712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25713$as_echo_n "checking for javah in Boot JDK... " >&6; }
25714      JAVAH=$BOOT_JDK/bin/javah
25715      if test ! -x $JAVAH; then
25716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25717$as_echo "not found" >&6; }
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25720        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25721      fi
25722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25723$as_echo "ok" >&6; }
25724
25725
25726    else
25727      # If it succeeded, then it was overridden by the user. We will use it
25728      # for the tool.
25729
25730      # First remove it from the list of overridden variables, so we can test
25731      # for unknown variables in the end.
25732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25733
25734      # Check if the provided tool contains a complete path.
25735      tool_specified="$JAVAH"
25736      tool_basename="${tool_specified##*/}"
25737      if test "x$tool_basename" = "x$tool_specified"; then
25738        # A command without a complete path is provided, search $PATH.
25739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25740$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25741        # Extract the first word of "$tool_basename", so it can be a program name with args.
25742set dummy $tool_basename; ac_word=$2
25743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25744$as_echo_n "checking for $ac_word... " >&6; }
25745if ${ac_cv_path_JAVAH+:} false; then :
25746  $as_echo_n "(cached) " >&6
25747else
25748  case $JAVAH in
25749  [\\/]* | ?:[\\/]*)
25750  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25751  ;;
25752  *)
25753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25754for as_dir in $PATH
25755do
25756  IFS=$as_save_IFS
25757  test -z "$as_dir" && as_dir=.
25758    for ac_exec_ext in '' $ac_executable_extensions; do
25759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25760    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25762    break 2
25763  fi
25764done
25765  done
25766IFS=$as_save_IFS
25767
25768  ;;
25769esac
25770fi
25771JAVAH=$ac_cv_path_JAVAH
25772if test -n "$JAVAH"; then
25773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25774$as_echo "$JAVAH" >&6; }
25775else
25776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25777$as_echo "no" >&6; }
25778fi
25779
25780
25781        if test "x$JAVAH" = x; then
25782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25783        fi
25784      else
25785        # Otherwise we believe it is a complete path. Use it as it is.
25786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25787$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25789$as_echo_n "checking for JAVAH... " >&6; }
25790        if test ! -x "$tool_specified"; then
25791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25792$as_echo "not found" >&6; }
25793          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25794        fi
25795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25796$as_echo "$tool_specified" >&6; }
25797      fi
25798    fi
25799  fi
25800
25801
25802
25803  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25804
25805  # Publish this variable in the help.
25806
25807
25808  if test "x$JAR" = x; then
25809    # The variable is not set by user, try to locate tool using the code snippet
25810
25811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25812$as_echo_n "checking for jar in Boot JDK... " >&6; }
25813      JAR=$BOOT_JDK/bin/jar
25814      if test ! -x $JAR; then
25815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25816$as_echo "not found" >&6; }
25817        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25818$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25819        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25820      fi
25821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25822$as_echo "ok" >&6; }
25823
25824
25825  else
25826    # The variable is set, but is it from the command line or the environment?
25827
25828    # Try to remove the string !JAR! from our list.
25829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25831      # If it failed, the variable was not from the command line. Ignore it,
25832      # but warn the user (except for BASH, which is always set by the calling BASH).
25833      if test "xJAR" != xBASH; then
25834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25835$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25836      fi
25837      # Try to locate tool using the code snippet
25838
25839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25840$as_echo_n "checking for jar in Boot JDK... " >&6; }
25841      JAR=$BOOT_JDK/bin/jar
25842      if test ! -x $JAR; then
25843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25844$as_echo "not found" >&6; }
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25846$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25847        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25848      fi
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25850$as_echo "ok" >&6; }
25851
25852
25853    else
25854      # If it succeeded, then it was overridden by the user. We will use it
25855      # for the tool.
25856
25857      # First remove it from the list of overridden variables, so we can test
25858      # for unknown variables in the end.
25859      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25860
25861      # Check if the provided tool contains a complete path.
25862      tool_specified="$JAR"
25863      tool_basename="${tool_specified##*/}"
25864      if test "x$tool_basename" = "x$tool_specified"; then
25865        # A command without a complete path is provided, search $PATH.
25866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25867$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25868        # Extract the first word of "$tool_basename", so it can be a program name with args.
25869set dummy $tool_basename; ac_word=$2
25870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25871$as_echo_n "checking for $ac_word... " >&6; }
25872if ${ac_cv_path_JAR+:} false; then :
25873  $as_echo_n "(cached) " >&6
25874else
25875  case $JAR in
25876  [\\/]* | ?:[\\/]*)
25877  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25878  ;;
25879  *)
25880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25881for as_dir in $PATH
25882do
25883  IFS=$as_save_IFS
25884  test -z "$as_dir" && as_dir=.
25885    for ac_exec_ext in '' $ac_executable_extensions; do
25886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25887    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25889    break 2
25890  fi
25891done
25892  done
25893IFS=$as_save_IFS
25894
25895  ;;
25896esac
25897fi
25898JAR=$ac_cv_path_JAR
25899if test -n "$JAR"; then
25900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25901$as_echo "$JAR" >&6; }
25902else
25903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25904$as_echo "no" >&6; }
25905fi
25906
25907
25908        if test "x$JAR" = x; then
25909          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25910        fi
25911      else
25912        # Otherwise we believe it is a complete path. Use it as it is.
25913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25914$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25916$as_echo_n "checking for JAR... " >&6; }
25917        if test ! -x "$tool_specified"; then
25918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25919$as_echo "not found" >&6; }
25920          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25921        fi
25922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25923$as_echo "$tool_specified" >&6; }
25924      fi
25925    fi
25926  fi
25927
25928
25929
25930  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25931
25932  # Publish this variable in the help.
25933
25934
25935  if test "x$NATIVE2ASCII" = x; then
25936    # The variable is not set by user, try to locate tool using the code snippet
25937
25938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25939$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25940      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25941      if test ! -x $NATIVE2ASCII; then
25942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25943$as_echo "not found" >&6; }
25944        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25945$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25946        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25947      fi
25948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25949$as_echo "ok" >&6; }
25950
25951
25952  else
25953    # The variable is set, but is it from the command line or the environment?
25954
25955    # Try to remove the string !NATIVE2ASCII! from our list.
25956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25958      # If it failed, the variable was not from the command line. Ignore it,
25959      # but warn the user (except for BASH, which is always set by the calling BASH).
25960      if test "xNATIVE2ASCII" != xBASH; then
25961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25962$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25963      fi
25964      # Try to locate tool using the code snippet
25965
25966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25967$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25968      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25969      if test ! -x $NATIVE2ASCII; then
25970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25971$as_echo "not found" >&6; }
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25973$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25974        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25975      fi
25976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25977$as_echo "ok" >&6; }
25978
25979
25980    else
25981      # If it succeeded, then it was overridden by the user. We will use it
25982      # for the tool.
25983
25984      # First remove it from the list of overridden variables, so we can test
25985      # for unknown variables in the end.
25986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25987
25988      # Check if the provided tool contains a complete path.
25989      tool_specified="$NATIVE2ASCII"
25990      tool_basename="${tool_specified##*/}"
25991      if test "x$tool_basename" = "x$tool_specified"; then
25992        # A command without a complete path is provided, search $PATH.
25993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25994$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25995        # Extract the first word of "$tool_basename", so it can be a program name with args.
25996set dummy $tool_basename; ac_word=$2
25997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25998$as_echo_n "checking for $ac_word... " >&6; }
25999if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26000  $as_echo_n "(cached) " >&6
26001else
26002  case $NATIVE2ASCII in
26003  [\\/]* | ?:[\\/]*)
26004  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26005  ;;
26006  *)
26007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26008for as_dir in $PATH
26009do
26010  IFS=$as_save_IFS
26011  test -z "$as_dir" && as_dir=.
26012    for ac_exec_ext in '' $ac_executable_extensions; do
26013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26014    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26016    break 2
26017  fi
26018done
26019  done
26020IFS=$as_save_IFS
26021
26022  ;;
26023esac
26024fi
26025NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26026if test -n "$NATIVE2ASCII"; then
26027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26028$as_echo "$NATIVE2ASCII" >&6; }
26029else
26030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26031$as_echo "no" >&6; }
26032fi
26033
26034
26035        if test "x$NATIVE2ASCII" = x; then
26036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26037        fi
26038      else
26039        # Otherwise we believe it is a complete path. Use it as it is.
26040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26041$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26043$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26044        if test ! -x "$tool_specified"; then
26045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26046$as_echo "not found" >&6; }
26047          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26048        fi
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26050$as_echo "$tool_specified" >&6; }
26051      fi
26052    fi
26053  fi
26054
26055
26056
26057  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26058
26059  # Publish this variable in the help.
26060
26061
26062  if test "x$JARSIGNER" = x; then
26063    # The variable is not set by user, try to locate tool using the code snippet
26064
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26066$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26067      JARSIGNER=$BOOT_JDK/bin/jarsigner
26068      if test ! -x $JARSIGNER; then
26069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26070$as_echo "not found" >&6; }
26071        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26072$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26073        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26074      fi
26075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26076$as_echo "ok" >&6; }
26077
26078
26079  else
26080    # The variable is set, but is it from the command line or the environment?
26081
26082    # Try to remove the string !JARSIGNER! from our list.
26083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26085      # If it failed, the variable was not from the command line. Ignore it,
26086      # but warn the user (except for BASH, which is always set by the calling BASH).
26087      if test "xJARSIGNER" != xBASH; then
26088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26089$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26090      fi
26091      # Try to locate tool using the code snippet
26092
26093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26094$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26095      JARSIGNER=$BOOT_JDK/bin/jarsigner
26096      if test ! -x $JARSIGNER; then
26097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26098$as_echo "not found" >&6; }
26099        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26100$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26101        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26102      fi
26103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26104$as_echo "ok" >&6; }
26105
26106
26107    else
26108      # If it succeeded, then it was overridden by the user. We will use it
26109      # for the tool.
26110
26111      # First remove it from the list of overridden variables, so we can test
26112      # for unknown variables in the end.
26113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26114
26115      # Check if the provided tool contains a complete path.
26116      tool_specified="$JARSIGNER"
26117      tool_basename="${tool_specified##*/}"
26118      if test "x$tool_basename" = "x$tool_specified"; then
26119        # A command without a complete path is provided, search $PATH.
26120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26121$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26122        # Extract the first word of "$tool_basename", so it can be a program name with args.
26123set dummy $tool_basename; ac_word=$2
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26125$as_echo_n "checking for $ac_word... " >&6; }
26126if ${ac_cv_path_JARSIGNER+:} false; then :
26127  $as_echo_n "(cached) " >&6
26128else
26129  case $JARSIGNER in
26130  [\\/]* | ?:[\\/]*)
26131  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26132  ;;
26133  *)
26134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26135for as_dir in $PATH
26136do
26137  IFS=$as_save_IFS
26138  test -z "$as_dir" && as_dir=.
26139    for ac_exec_ext in '' $ac_executable_extensions; do
26140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26141    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26143    break 2
26144  fi
26145done
26146  done
26147IFS=$as_save_IFS
26148
26149  ;;
26150esac
26151fi
26152JARSIGNER=$ac_cv_path_JARSIGNER
26153if test -n "$JARSIGNER"; then
26154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26155$as_echo "$JARSIGNER" >&6; }
26156else
26157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26158$as_echo "no" >&6; }
26159fi
26160
26161
26162        if test "x$JARSIGNER" = x; then
26163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26164        fi
26165      else
26166        # Otherwise we believe it is a complete path. Use it as it is.
26167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26168$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26170$as_echo_n "checking for JARSIGNER... " >&6; }
26171        if test ! -x "$tool_specified"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26173$as_echo "not found" >&6; }
26174          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26175        fi
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26177$as_echo "$tool_specified" >&6; }
26178      fi
26179    fi
26180  fi
26181
26182
26183
26184  # Finally, set some other options...
26185
26186  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26187  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26188
26189
26190
26191
26192###############################################################################
26193#
26194# Configure the sources to use. We can add or override individual directories.
26195#
26196###############################################################################
26197
26198
26199  # Where are the sources. Any of these can be overridden
26200  # using --with-override-corba and the likes.
26201  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26202  CORBA_TOPDIR="$SRC_ROOT/corba"
26203  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26204  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26205  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26206  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26207  JDK_TOPDIR="$SRC_ROOT/jdk"
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218  ###############################################################################
26219  #
26220  # Pickup additional source for a component from outside of the source root
26221  # or override source for a component.
26222  #
26223
26224# Check whether --with-add-source-root was given.
26225if test "${with_add_source_root+set}" = set; then :
26226  withval=$with_add_source_root;
26227fi
26228
26229
26230
26231# Check whether --with-override-source-root was given.
26232if test "${with_override_source_root+set}" = set; then :
26233  withval=$with_override_source_root;
26234fi
26235
26236
26237
26238# Check whether --with-adds-and-overrides was given.
26239if test "${with_adds_and_overrides+set}" = set; then :
26240  withval=$with_adds_and_overrides;
26241fi
26242
26243
26244  if test "x$with_adds_and_overrides" != x; then
26245    with_add_source_root="$with_adds_and_overrides/adds"
26246    with_override_source_root="$with_adds_and_overrides/overrides"
26247  fi
26248
26249  if test "x$with_add_source_root" != x; then
26250    if ! test -d $with_add_source_root; then
26251      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26252    fi
26253    CURDIR="$PWD"
26254    cd "$with_add_source_root"
26255    ADD_SRC_ROOT="`pwd`"
26256    cd "$CURDIR"
26257    # Verify that the addon source root does not have any root makefiles.
26258    # If it does, then it is usually an error, prevent this.
26259    if test -f $with_add_source_root/langtools/make/Makefile; then
26260      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
26261    fi
26262    if test -f $with_add_source_root/corba/make/Makefile; then
26263      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
26264    fi
26265    if test -f $with_add_source_root/jaxp/make/Makefile; then
26266      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
26267    fi
26268    if test -f $with_add_source_root/jaxws/make/Makefile; then
26269      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
26270    fi
26271    if test -f $with_add_source_root/hotspot/make/Makefile; then
26272      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
26273    fi
26274    if test -f $with_add_source_root/nashorn/make/Makefile; then
26275      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
26276    fi
26277    if test -f $with_add_source_root/jdk/make/Makefile; then
26278      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
26279    fi
26280  fi
26281
26282
26283  if test "x$with_override_source_root" != x; then
26284    if ! test -d $with_override_source_root; then
26285      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26286    fi
26287    CURDIR="$PWD"
26288    cd "$with_override_source_root"
26289    OVERRIDE_SRC_ROOT="`pwd`"
26290    cd "$CURDIR"
26291    if test -f $with_override_source_root/langtools/make/Makefile; then
26292      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
26293    fi
26294    if test -f $with_override_source_root/corba/make/Makefile; then
26295      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
26296    fi
26297    if test -f $with_override_source_root/jaxp/make/Makefile; then
26298      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
26299    fi
26300    if test -f $with_override_source_root/jaxws/make/Makefile; then
26301      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
26302    fi
26303    if test -f $with_override_source_root/hotspot/make/Makefile; then
26304      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
26305    fi
26306    if test -f $with_override_source_root/nashorn/make/Makefile; then
26307      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
26308    fi
26309    if test -f $with_override_source_root/jdk/make/Makefile; then
26310      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
26311    fi
26312  fi
26313
26314
26315  ###############################################################################
26316  #
26317  # Override a repo completely, this is used for example when you have 3 small
26318  # development sandboxes of the langtools sources and want to avoid having 3 full
26319  # OpenJDK sources checked out on disk.
26320  #
26321  # Assuming that the 3 langtools sandboxes are located here:
26322  # /home/fredrik/sandbox1/langtools
26323  # /home/fredrik/sandbox2/langtools
26324  # /home/fredrik/sandbox3/langtools
26325  #
26326  # From the source root you create build subdirs manually:
26327  #     mkdir -p build1 build2 build3
26328  # in each build directory run:
26329  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26330  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26331  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26332  #
26333
26334
26335# Check whether --with-override-langtools was given.
26336if test "${with_override_langtools+set}" = set; then :
26337  withval=$with_override_langtools;
26338fi
26339
26340
26341
26342# Check whether --with-override-corba was given.
26343if test "${with_override_corba+set}" = set; then :
26344  withval=$with_override_corba;
26345fi
26346
26347
26348
26349# Check whether --with-override-jaxp was given.
26350if test "${with_override_jaxp+set}" = set; then :
26351  withval=$with_override_jaxp;
26352fi
26353
26354
26355
26356# Check whether --with-override-jaxws was given.
26357if test "${with_override_jaxws+set}" = set; then :
26358  withval=$with_override_jaxws;
26359fi
26360
26361
26362
26363# Check whether --with-override-hotspot was given.
26364if test "${with_override_hotspot+set}" = set; then :
26365  withval=$with_override_hotspot;
26366fi
26367
26368
26369
26370# Check whether --with-override-nashorn was given.
26371if test "${with_override_nashorn+set}" = set; then :
26372  withval=$with_override_nashorn;
26373fi
26374
26375
26376
26377# Check whether --with-override-jdk was given.
26378if test "${with_override_jdk+set}" = set; then :
26379  withval=$with_override_jdk;
26380fi
26381
26382
26383  if test "x$with_override_langtools" != x; then
26384    CURDIR="$PWD"
26385    cd "$with_override_langtools"
26386    LANGTOOLS_TOPDIR="`pwd`"
26387    cd "$CURDIR"
26388    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26389      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26390    fi
26391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26392$as_echo_n "checking if langtools should be overridden... " >&6; }
26393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26394$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26395  fi
26396  if test "x$with_override_corba" != x; then
26397    CURDIR="$PWD"
26398    cd "$with_override_corba"
26399    CORBA_TOPDIR="`pwd`"
26400    cd "$CURDIR"
26401    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26402      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26403    fi
26404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26405$as_echo_n "checking if corba should be overridden... " >&6; }
26406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26407$as_echo "yes with $CORBA_TOPDIR" >&6; }
26408  fi
26409  if test "x$with_override_jaxp" != x; then
26410    CURDIR="$PWD"
26411    cd "$with_override_jaxp"
26412    JAXP_TOPDIR="`pwd`"
26413    cd "$CURDIR"
26414    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26415      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26416    fi
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26418$as_echo_n "checking if jaxp should be overridden... " >&6; }
26419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26420$as_echo "yes with $JAXP_TOPDIR" >&6; }
26421  fi
26422  if test "x$with_override_jaxws" != x; then
26423    CURDIR="$PWD"
26424    cd "$with_override_jaxws"
26425    JAXWS_TOPDIR="`pwd`"
26426    cd "$CURDIR"
26427    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26428      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26429    fi
26430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26431$as_echo_n "checking if jaxws should be overridden... " >&6; }
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26433$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26434  fi
26435  if test "x$with_override_hotspot" != x; then
26436    CURDIR="$PWD"
26437    cd "$with_override_hotspot"
26438    HOTSPOT_TOPDIR="`pwd`"
26439    cd "$CURDIR"
26440    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26441      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26442    fi
26443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26444$as_echo_n "checking if hotspot should be overridden... " >&6; }
26445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26446$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26447  fi
26448  if test "x$with_override_nashorn" != x; then
26449    CURDIR="$PWD"
26450    cd "$with_override_nashorn"
26451    NASHORN_TOPDIR="`pwd`"
26452    cd "$CURDIR"
26453    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26454      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26455    fi
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26457$as_echo_n "checking if nashorn should be overridden... " >&6; }
26458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26459$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26460  fi
26461  if test "x$with_override_jdk" != x; then
26462    CURDIR="$PWD"
26463    cd "$with_override_jdk"
26464    JDK_TOPDIR="`pwd`"
26465    cd "$CURDIR"
26466    if ! test -f $JDK_TOPDIR/make/Makefile; then
26467      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26468    fi
26469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26470$as_echo_n "checking if JDK should be overridden... " >&6; }
26471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26472$as_echo "yes with $JDK_TOPDIR" >&6; }
26473  fi
26474
26475
26476  BUILD_OUTPUT="$OUTPUT_ROOT"
26477
26478
26479  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26480  BUILD_HOTSPOT=true
26481
26482
26483
26484# Check whether --with-import-hotspot was given.
26485if test "${with_import_hotspot+set}" = set; then :
26486  withval=$with_import_hotspot;
26487fi
26488
26489  if test "x$with_import_hotspot" != x; then
26490    CURDIR="$PWD"
26491    cd "$with_import_hotspot"
26492    HOTSPOT_DIST="`pwd`"
26493    cd "$CURDIR"
26494    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26495      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26496    fi
26497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26498$as_echo_n "checking if hotspot should be imported... " >&6; }
26499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26500$as_echo "yes from $HOTSPOT_DIST" >&6; }
26501    BUILD_HOTSPOT=false
26502  fi
26503
26504  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26505
26506
26507###############################################################################
26508#
26509# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26510# native code.
26511#
26512###############################################################################
26513
26514# First determine the toolchain type (compiler family)
26515
26516
26517# Check whether --with-toolchain-type was given.
26518if test "${with_toolchain_type+set}" = set; then :
26519  withval=$with_toolchain_type;
26520fi
26521
26522
26523  # Use indirect variable referencing
26524  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26525  VALID_TOOLCHAINS=${!toolchain_var_name}
26526
26527  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26528    if test -n "$XCODEBUILD"; then
26529      # On Mac OS X, default toolchain to clang after Xcode 5
26530      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26531      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26532      if test $? -ne 0; then
26533        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26534      fi
26535      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26536          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26537          $CUT -f 1 -d .`
26538      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26539$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26540      if test $XCODE_MAJOR_VERSION -ge 5; then
26541          DEFAULT_TOOLCHAIN="clang"
26542      else
26543          DEFAULT_TOOLCHAIN="gcc"
26544      fi
26545    else
26546      # If Xcode is not installed, but the command line tools are
26547      # then we can't run xcodebuild. On these systems we should
26548      # default to clang
26549      DEFAULT_TOOLCHAIN="clang"
26550    fi
26551  else
26552    # First toolchain type in the list is the default
26553    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26554  fi
26555
26556  if test "x$with_toolchain_type" = xlist; then
26557    # List all toolchains
26558    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26559$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26560    for toolchain in $VALID_TOOLCHAINS; do
26561      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26562      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26563      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26564    done
26565
26566    exit 0
26567  elif test "x$with_toolchain_type" != x; then
26568    # User override; check that it is valid
26569    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26570      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26571$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26572      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26573$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26574      as_fn_error $? "Cannot continue." "$LINENO" 5
26575    fi
26576    TOOLCHAIN_TYPE=$with_toolchain_type
26577  else
26578    # No flag given, use default
26579    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26580  fi
26581
26582
26583  TOOLCHAIN_CC_BINARY_clang="clang"
26584  TOOLCHAIN_CC_BINARY_gcc="gcc"
26585  TOOLCHAIN_CC_BINARY_microsoft="cl"
26586  TOOLCHAIN_CC_BINARY_solstudio="cc"
26587  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26588
26589  TOOLCHAIN_CXX_BINARY_clang="clang++"
26590  TOOLCHAIN_CXX_BINARY_gcc="g++"
26591  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26592  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26593  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26594
26595  # Use indirect variable referencing
26596  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26597  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26598  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26599  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26600  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26601  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26602
26603
26604  # Define filename patterns
26605  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26606    LIBRARY_PREFIX=
26607    SHARED_LIBRARY_SUFFIX='.dll'
26608    STATIC_LIBRARY_SUFFIX='.lib'
26609    SHARED_LIBRARY='$1.dll'
26610    STATIC_LIBRARY='$1.lib'
26611    OBJ_SUFFIX='.obj'
26612    EXE_SUFFIX='.exe'
26613  else
26614    LIBRARY_PREFIX=lib
26615    SHARED_LIBRARY_SUFFIX='.so'
26616    STATIC_LIBRARY_SUFFIX='.a'
26617    SHARED_LIBRARY='lib$1.so'
26618    STATIC_LIBRARY='lib$1.a'
26619    OBJ_SUFFIX='.o'
26620    EXE_SUFFIX=''
26621    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26622      SHARED_LIBRARY='lib$1.dylib'
26623      SHARED_LIBRARY_SUFFIX='.dylib'
26624    fi
26625  fi
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26637    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26638$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26639  else
26640    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26641$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26642  fi
26643
26644
26645# Then detect the actual binaries needed
26646
26647  # FIXME: Is this needed?
26648  ac_ext=cpp
26649ac_cpp='$CXXCPP $CPPFLAGS'
26650ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26651ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26652ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26653
26654
26655  # Store the CFLAGS etc passed to the configure script.
26656  ORG_CFLAGS="$CFLAGS"
26657  ORG_CXXFLAGS="$CXXFLAGS"
26658  ORG_OBJCFLAGS="$OBJCFLAGS"
26659
26660  # On Windows, we need to detect the visual studio installation first.
26661  # This will change the PATH, but we need to keep that new PATH even
26662  # after toolchain detection is done, since the compiler (on x86) uses
26663  # it for DLL resolution in runtime.
26664  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26665
26666  # Store path to cygwin link.exe to help excluding it when searching for
26667  # VS linker. This must be done before changing the PATH when looking for VS.
26668  # Extract the first word of "link", so it can be a program name with args.
26669set dummy link; ac_word=$2
26670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26671$as_echo_n "checking for $ac_word... " >&6; }
26672if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26673  $as_echo_n "(cached) " >&6
26674else
26675  case $CYGWIN_LINK in
26676  [\\/]* | ?:[\\/]*)
26677  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26678  ;;
26679  *)
26680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26681for as_dir in $PATH
26682do
26683  IFS=$as_save_IFS
26684  test -z "$as_dir" && as_dir=.
26685    for ac_exec_ext in '' $ac_executable_extensions; do
26686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26687    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26689    break 2
26690  fi
26691done
26692  done
26693IFS=$as_save_IFS
26694
26695  ;;
26696esac
26697fi
26698CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26699if test -n "$CYGWIN_LINK"; then
26700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26701$as_echo "$CYGWIN_LINK" >&6; }
26702else
26703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26704$as_echo "no" >&6; }
26705fi
26706
26707
26708  if test "x$CYGWIN_LINK" != x; then
26709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26710$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26711    "$CYGWIN_LINK" --version > /dev/null
26712    if test $? -eq 0 ; then
26713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26714$as_echo "yes" >&6; }
26715    else
26716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26717$as_echo "no" >&6; }
26718      # This might be the VS linker. Don't exclude it later on.
26719      CYGWIN_LINK=""
26720    fi
26721  fi
26722
26723  # First-hand choice is to locate and run the vsvars bat file.
26724
26725
26726# Check whether --with-toolchain-version was given.
26727if test "${with_toolchain_version+set}" = set; then :
26728  withval=$with_toolchain_version;
26729fi
26730
26731
26732  if test "x$with_toolchain_version" = xlist; then
26733    # List all toolchains
26734    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26735$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26736    for version in $VALID_VS_VERSIONS; do
26737      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26738      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26739    done
26740
26741    exit 0
26742  elif test "x$with_toolchain_version" != x; then
26743    # User override; check that it is valid
26744    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26745      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26746$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26747      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26748$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26749      as_fn_error $? "Cannot continue." "$LINENO" 5
26750    fi
26751    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26752  else
26753    # No flag given, use default
26754    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26755  fi
26756
26757  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26758
26759  VS_VERSION="$VS_VERSION"
26760  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26761  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26762  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26763  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26764
26765  # When using --with-tools-dir, assume it points to the correct and default
26766  # version of Visual Studio or that --with-toolchain-version was also set.
26767  if test "x$with_tools_dir" != x; then
26768
26769  if test "x$VS_ENV_CMD" = x; then
26770    VS_VERSION="${VS_VERSION}"
26771    VS_BASE="$with_tools_dir/../.."
26772    METHOD="--with-tools-dir"
26773
26774    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26775      VCVARSFILE="vc/bin/vcvars32.bat"
26776    else
26777      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26778    fi
26779
26780
26781  windows_path="$VS_BASE"
26782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26783    unix_path=`$CYGPATH -u "$windows_path"`
26784    VS_BASE="$unix_path"
26785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26787    VS_BASE="$unix_path"
26788  fi
26789
26790    if test -d "$VS_BASE"; then
26791      if test -f "$VS_BASE/$VCVARSFILE"; then
26792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26793$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26794        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26795        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26796        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26797        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26798      else
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26800$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26802$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26803      fi
26804    fi
26805  fi
26806
26807
26808  if test "x$VS_ENV_CMD" = x; then
26809    VS_VERSION="${VS_VERSION}"
26810    VS_BASE="$with_tools_dir/../../.."
26811    METHOD="--with-tools-dir"
26812
26813    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26814      VCVARSFILE="vc/bin/vcvars32.bat"
26815    else
26816      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26817    fi
26818
26819
26820  windows_path="$VS_BASE"
26821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26822    unix_path=`$CYGPATH -u "$windows_path"`
26823    VS_BASE="$unix_path"
26824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26826    VS_BASE="$unix_path"
26827  fi
26828
26829    if test -d "$VS_BASE"; then
26830      if test -f "$VS_BASE/$VCVARSFILE"; then
26831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26832$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26833        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26834        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26835        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26836        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26837      else
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26839$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26840        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26841$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26842      fi
26843    fi
26844  fi
26845
26846    if test "x$VS_ENV_CMD" = x; then
26847      # Having specified an argument which is incorrect will produce an instant failure;
26848      # we should not go on looking
26849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26850$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26851      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26852$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26853      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26854$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26855      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26856    fi
26857  fi
26858
26859  VS_ENV_CMD=""
26860  VS_ENV_ARGS=""
26861
26862  if test "x$VS_COMNTOOLS" != x; then
26863
26864  if test "x$VS_ENV_CMD" = x; then
26865    VS_VERSION="${VS_VERSION}"
26866    VS_BASE="$VS_COMNTOOLS/../.."
26867    METHOD="$VS_COMNTOOLS_VAR variable"
26868
26869    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26870      VCVARSFILE="vc/bin/vcvars32.bat"
26871    else
26872      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26873    fi
26874
26875
26876  windows_path="$VS_BASE"
26877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26878    unix_path=`$CYGPATH -u "$windows_path"`
26879    VS_BASE="$unix_path"
26880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26882    VS_BASE="$unix_path"
26883  fi
26884
26885    if test -d "$VS_BASE"; then
26886      if test -f "$VS_BASE/$VCVARSFILE"; then
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26889        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26892        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26893      else
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26895$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26897$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26898      fi
26899    fi
26900  fi
26901
26902  fi
26903  if test "x$PROGRAMFILES" != x; then
26904
26905  if test "x$VS_ENV_CMD" = x; then
26906    VS_VERSION="${VS_VERSION}"
26907    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26908    METHOD="well-known name"
26909
26910    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26911      VCVARSFILE="vc/bin/vcvars32.bat"
26912    else
26913      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26914    fi
26915
26916
26917  windows_path="$VS_BASE"
26918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26919    unix_path=`$CYGPATH -u "$windows_path"`
26920    VS_BASE="$unix_path"
26921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26923    VS_BASE="$unix_path"
26924  fi
26925
26926    if test -d "$VS_BASE"; then
26927      if test -f "$VS_BASE/$VCVARSFILE"; then
26928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26930        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26931        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26932        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26933        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26934      else
26935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26936$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26938$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26939      fi
26940    fi
26941  fi
26942
26943  fi
26944  # Work around the insanely named ProgramFiles(x86) env variable
26945  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26946  if test "x$PROGRAMFILES_X86" != x; then
26947
26948  if test "x$VS_ENV_CMD" = x; then
26949    VS_VERSION="${VS_VERSION}"
26950    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26951    METHOD="well-known name"
26952
26953    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26954      VCVARSFILE="vc/bin/vcvars32.bat"
26955    else
26956      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26957    fi
26958
26959
26960  windows_path="$VS_BASE"
26961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26962    unix_path=`$CYGPATH -u "$windows_path"`
26963    VS_BASE="$unix_path"
26964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26966    VS_BASE="$unix_path"
26967  fi
26968
26969    if test -d "$VS_BASE"; then
26970      if test -f "$VS_BASE/$VCVARSFILE"; then
26971        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26972$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26973        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26974        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26975        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26976        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26977      else
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26981$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26982      fi
26983    fi
26984  fi
26985
26986  fi
26987
26988  if test "x$VS_ENV_CMD" = x; then
26989    VS_VERSION="${VS_VERSION}"
26990    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26991    METHOD="well-known name"
26992
26993    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26994      VCVARSFILE="vc/bin/vcvars32.bat"
26995    else
26996      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26997    fi
26998
26999
27000  windows_path="$VS_BASE"
27001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27002    unix_path=`$CYGPATH -u "$windows_path"`
27003    VS_BASE="$unix_path"
27004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27006    VS_BASE="$unix_path"
27007  fi
27008
27009    if test -d "$VS_BASE"; then
27010      if test -f "$VS_BASE/$VCVARSFILE"; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27012$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27013        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27014        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27015        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27016        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27017      else
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27019$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27021$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27022      fi
27023    fi
27024  fi
27025
27026
27027  if test "x$VS_ENV_CMD" = x; then
27028    VS_VERSION="${VS_VERSION}"
27029    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27030    METHOD="well-known name"
27031
27032    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27033      VCVARSFILE="vc/bin/vcvars32.bat"
27034    else
27035      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27036    fi
27037
27038
27039  windows_path="$VS_BASE"
27040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27041    unix_path=`$CYGPATH -u "$windows_path"`
27042    VS_BASE="$unix_path"
27043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27045    VS_BASE="$unix_path"
27046  fi
27047
27048    if test -d "$VS_BASE"; then
27049      if test -f "$VS_BASE/$VCVARSFILE"; then
27050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27051$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27052        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27053        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27054        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27055        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27056      else
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27058$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27059        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27060$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27061      fi
27062    fi
27063  fi
27064
27065
27066  if test "x$SDK_INSTALL_DIR" != x; then
27067    if test "x$ProgramW6432" != x; then
27068
27069  if test "x$VS_ENV_CMD" = x; then
27070    VS_VERSION="${VS_VERSION}"
27071    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27072    METHOD="well-known name"
27073
27074  windows_path="$WIN_SDK_BASE"
27075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27076    unix_path=`$CYGPATH -u "$windows_path"`
27077    WIN_SDK_BASE="$unix_path"
27078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27080    WIN_SDK_BASE="$unix_path"
27081  fi
27082
27083    if test -d "$WIN_SDK_BASE"; then
27084      # There have been cases of partial or broken SDK installations. A missing
27085      # lib dir is not going to work.
27086      if test ! -d "$WIN_SDK_BASE/lib"; then
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27090$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27091      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27094        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27095        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27096          VS_ENV_ARGS="/x86"
27097        else
27098          VS_ENV_ARGS="/x64"
27099        fi
27100        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27101        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27102        # TODO: improve detection for other versions of SDK
27103        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27104      else
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27107        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27108$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27109      fi
27110    fi
27111  fi
27112
27113    fi
27114    if test "x$PROGRAMW6432" != x; then
27115
27116  if test "x$VS_ENV_CMD" = x; then
27117    VS_VERSION="${VS_VERSION}"
27118    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27119    METHOD="well-known name"
27120
27121  windows_path="$WIN_SDK_BASE"
27122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27123    unix_path=`$CYGPATH -u "$windows_path"`
27124    WIN_SDK_BASE="$unix_path"
27125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27127    WIN_SDK_BASE="$unix_path"
27128  fi
27129
27130    if test -d "$WIN_SDK_BASE"; then
27131      # There have been cases of partial or broken SDK installations. A missing
27132      # lib dir is not going to work.
27133      if test ! -d "$WIN_SDK_BASE/lib"; then
27134        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27135$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27137$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27138      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27141        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27142        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27143          VS_ENV_ARGS="/x86"
27144        else
27145          VS_ENV_ARGS="/x64"
27146        fi
27147        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27148        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27149        # TODO: improve detection for other versions of SDK
27150        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27151      else
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27153$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27155$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27156      fi
27157    fi
27158  fi
27159
27160    fi
27161    if test "x$PROGRAMFILES" != x; then
27162
27163  if test "x$VS_ENV_CMD" = x; then
27164    VS_VERSION="${VS_VERSION}"
27165    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27166    METHOD="well-known name"
27167
27168  windows_path="$WIN_SDK_BASE"
27169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27170    unix_path=`$CYGPATH -u "$windows_path"`
27171    WIN_SDK_BASE="$unix_path"
27172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27174    WIN_SDK_BASE="$unix_path"
27175  fi
27176
27177    if test -d "$WIN_SDK_BASE"; then
27178      # There have been cases of partial or broken SDK installations. A missing
27179      # lib dir is not going to work.
27180      if test ! -d "$WIN_SDK_BASE/lib"; then
27181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27184$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27185      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27187$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27188        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27189        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27190          VS_ENV_ARGS="/x86"
27191        else
27192          VS_ENV_ARGS="/x64"
27193        fi
27194        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27195        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27196        # TODO: improve detection for other versions of SDK
27197        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27198      else
27199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27200$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27202$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27203      fi
27204    fi
27205  fi
27206
27207    fi
27208
27209  if test "x$VS_ENV_CMD" = x; then
27210    VS_VERSION="${VS_VERSION}"
27211    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27212    METHOD="well-known name"
27213
27214  windows_path="$WIN_SDK_BASE"
27215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216    unix_path=`$CYGPATH -u "$windows_path"`
27217    WIN_SDK_BASE="$unix_path"
27218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27220    WIN_SDK_BASE="$unix_path"
27221  fi
27222
27223    if test -d "$WIN_SDK_BASE"; then
27224      # There have been cases of partial or broken SDK installations. A missing
27225      # lib dir is not going to work.
27226      if test ! -d "$WIN_SDK_BASE/lib"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27229        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27230$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27231      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27234        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27235        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27236          VS_ENV_ARGS="/x86"
27237        else
27238          VS_ENV_ARGS="/x64"
27239        fi
27240        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27241        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27242        # TODO: improve detection for other versions of SDK
27243        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27244      else
27245        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27246$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27247        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27248$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27249      fi
27250    fi
27251  fi
27252
27253
27254  if test "x$VS_ENV_CMD" = x; then
27255    VS_VERSION="${VS_VERSION}"
27256    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27257    METHOD="well-known name"
27258
27259  windows_path="$WIN_SDK_BASE"
27260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27261    unix_path=`$CYGPATH -u "$windows_path"`
27262    WIN_SDK_BASE="$unix_path"
27263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27265    WIN_SDK_BASE="$unix_path"
27266  fi
27267
27268    if test -d "$WIN_SDK_BASE"; then
27269      # There have been cases of partial or broken SDK installations. A missing
27270      # lib dir is not going to work.
27271      if test ! -d "$WIN_SDK_BASE/lib"; then
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27273$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27275$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27276      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27279        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27280        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27281          VS_ENV_ARGS="/x86"
27282        else
27283          VS_ENV_ARGS="/x64"
27284        fi
27285        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27286        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27287        # TODO: improve detection for other versions of SDK
27288        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27289      else
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27293$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27294      fi
27295    fi
27296  fi
27297
27298  fi
27299
27300    if test "x$VS_ENV_CMD" != x; then
27301      TOOLCHAIN_VERSION=$VS_VERSION
27302      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27303      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27304      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27305      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27306      # The rest of the variables are already evaled while probing
27307      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27308$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27309      break
27310    fi
27311  done
27312
27313
27314  if test "x$VS_ENV_CMD" != x; then
27315    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27316
27317  # Only process if variable expands to non-empty
27318
27319  if test "x$VS_ENV_CMD" != x; then
27320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27321
27322  # First separate the path from the arguments. This will split at the first
27323  # space.
27324  complete="$VS_ENV_CMD"
27325  path="${complete%% *}"
27326  tmp="$complete EOL"
27327  arguments="${tmp#* }"
27328
27329  # Input might be given as Windows format, start by converting to
27330  # unix format.
27331  new_path=`$CYGPATH -u "$path"`
27332
27333  # Now try to locate executable using which
27334  new_path=`$WHICH "$new_path" 2> /dev/null`
27335  # bat and cmd files are not always considered executable in cygwin causing which
27336  # to not find them
27337  if test "x$new_path" = x \
27338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27340    new_path=`$CYGPATH -u "$path"`
27341  fi
27342  if test "x$new_path" = x; then
27343    # Oops. Which didn't find the executable.
27344    # The splitting of arguments from the executable at a space might have been incorrect,
27345    # since paths with space are more likely in Windows. Give it another try with the whole
27346    # argument.
27347    path="$complete"
27348    arguments="EOL"
27349    new_path=`$CYGPATH -u "$path"`
27350    new_path=`$WHICH "$new_path" 2> /dev/null`
27351    # bat and cmd files are not always considered executable in cygwin causing which
27352    # to not find them
27353    if test "x$new_path" = x \
27354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27356      new_path=`$CYGPATH -u "$path"`
27357    fi
27358    if test "x$new_path" = x; then
27359      # It's still not found. Now this is an unrecoverable error.
27360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27361$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27362      has_space=`$ECHO "$complete" | $GREP " "`
27363      if test "x$has_space" != x; then
27364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27366      fi
27367      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27368    fi
27369  fi
27370
27371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27374  # "foo.exe" is OK but "foo" is an error.
27375  #
27376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27377  # It is also a way to make sure we got the proper file name for the real test later on.
27378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27379  if test "x$test_shortpath" = x; then
27380    # Short path failed, file does not exist as specified.
27381    # Try adding .exe or .cmd
27382    if test -f "${new_path}.exe"; then
27383      input_to_shortpath="${new_path}.exe"
27384    elif test -f "${new_path}.cmd"; then
27385      input_to_shortpath="${new_path}.cmd"
27386    else
27387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27388$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27391      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27392    fi
27393  else
27394    input_to_shortpath="$new_path"
27395  fi
27396
27397  # Call helper function which possibly converts this using DOS-style short mode.
27398  # If so, the updated path is stored in $new_path.
27399  new_path="$input_to_shortpath"
27400
27401  input_path="$input_to_shortpath"
27402  # Check if we need to convert this using DOS-style short mode. If the path
27403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27404  # take no chances and rewrite it.
27405  # Note: m4 eats our [], so we need to use [ and ] instead.
27406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27407  if test "x$has_forbidden_chars" != x; then
27408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27412      # Going to short mode and back again did indeed matter. Since short mode is
27413      # case insensitive, let's make it lowercase to improve readability.
27414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27415      # Now convert it back to Unix-stile (cygpath)
27416      input_path=`$CYGPATH -u "$shortmode_path"`
27417      new_path="$input_path"
27418    fi
27419  fi
27420
27421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27422  if test "x$test_cygdrive_prefix" = x; then
27423    # As a simple fix, exclude /usr/bin since it's not a real path.
27424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27426      # a path prefixed by /cygdrive for fixpath to work.
27427      new_path="$CYGWIN_ROOT_PATH$input_path"
27428    fi
27429  fi
27430
27431  # remove trailing .exe if any
27432  new_path="${new_path/%.exe/}"
27433
27434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27435
27436  # First separate the path from the arguments. This will split at the first
27437  # space.
27438  complete="$VS_ENV_CMD"
27439  path="${complete%% *}"
27440  tmp="$complete EOL"
27441  arguments="${tmp#* }"
27442
27443  # Input might be given as Windows format, start by converting to
27444  # unix format.
27445  new_path="$path"
27446
27447  windows_path="$new_path"
27448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449    unix_path=`$CYGPATH -u "$windows_path"`
27450    new_path="$unix_path"
27451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27453    new_path="$unix_path"
27454  fi
27455
27456
27457  # Now try to locate executable using which
27458  new_path=`$WHICH "$new_path" 2> /dev/null`
27459
27460  if test "x$new_path" = x; then
27461    # Oops. Which didn't find the executable.
27462    # The splitting of arguments from the executable at a space might have been incorrect,
27463    # since paths with space are more likely in Windows. Give it another try with the whole
27464    # argument.
27465    path="$complete"
27466    arguments="EOL"
27467    new_path="$path"
27468
27469  windows_path="$new_path"
27470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27471    unix_path=`$CYGPATH -u "$windows_path"`
27472    new_path="$unix_path"
27473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27475    new_path="$unix_path"
27476  fi
27477
27478
27479    new_path=`$WHICH "$new_path" 2> /dev/null`
27480    # bat and cmd files are not always considered executable in MSYS causing which
27481    # to not find them
27482    if test "x$new_path" = x \
27483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27485      new_path="$path"
27486
27487  windows_path="$new_path"
27488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27489    unix_path=`$CYGPATH -u "$windows_path"`
27490    new_path="$unix_path"
27491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27493    new_path="$unix_path"
27494  fi
27495
27496    fi
27497
27498    if test "x$new_path" = x; then
27499      # It's still not found. Now this is an unrecoverable error.
27500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27501$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27502      has_space=`$ECHO "$complete" | $GREP " "`
27503      if test "x$has_space" != x; then
27504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27506      fi
27507      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27508    fi
27509  fi
27510
27511  # Now new_path has a complete unix path to the binary
27512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27513    # Keep paths in /bin as-is, but remove trailing .exe if any
27514    new_path="${new_path/%.exe/}"
27515    # Do not save /bin paths to all_fixpath_prefixes!
27516  else
27517    # Not in mixed or Windows style, start by that.
27518    new_path=`cmd //c echo $new_path`
27519
27520  input_path="$new_path"
27521  # Check if we need to convert this using DOS-style short mode. If the path
27522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27523  # take no chances and rewrite it.
27524  # Note: m4 eats our [], so we need to use [ and ] instead.
27525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27526  if test "x$has_forbidden_chars" != x; then
27527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27529  fi
27530
27531    # Output is in $new_path
27532
27533  windows_path="$new_path"
27534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27535    unix_path=`$CYGPATH -u "$windows_path"`
27536    new_path="$unix_path"
27537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27539    new_path="$unix_path"
27540  fi
27541
27542    # remove trailing .exe if any
27543    new_path="${new_path/%.exe/}"
27544
27545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27547  fi
27548
27549    else
27550      # We're on a unix platform. Hooray! :)
27551      # First separate the path from the arguments. This will split at the first
27552      # space.
27553      complete="$VS_ENV_CMD"
27554      path="${complete%% *}"
27555      tmp="$complete EOL"
27556      arguments="${tmp#* }"
27557
27558      # Cannot rely on the command "which" here since it doesn't always work.
27559      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27560      if test -z "$is_absolute_path"; then
27561        # Path to executable is not absolute. Find it.
27562        IFS_save="$IFS"
27563        IFS=:
27564        for p in $PATH; do
27565          if test -f "$p/$path" && test -x "$p/$path"; then
27566            new_path="$p/$path"
27567            break
27568          fi
27569        done
27570        IFS="$IFS_save"
27571      else
27572        # This is an absolute path, we can use it without further modifications.
27573        new_path="$path"
27574      fi
27575
27576      if test "x$new_path" = x; then
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27578$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27579        has_space=`$ECHO "$complete" | $GREP " "`
27580        if test "x$has_space" != x; then
27581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27583        fi
27584        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27585      fi
27586    fi
27587
27588    # Now join together the path and the arguments once again
27589    if test "x$arguments" != xEOL; then
27590      new_complete="$new_path ${arguments% *}"
27591    else
27592      new_complete="$new_path"
27593    fi
27594
27595    if test "x$complete" != "x$new_complete"; then
27596      VS_ENV_CMD="$new_complete"
27597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27598$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27599    fi
27600  fi
27601
27602
27603    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27604    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27605$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27606
27607    # We need to create a couple of temporary files.
27608    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27609    $MKDIR -p $VS_ENV_TMP_DIR
27610
27611    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27612    # Instead create a shell script which will set the relevant variables when run.
27613    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27614
27615  unix_path="$WINPATH_VS_ENV_CMD"
27616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27617    windows_path=`$CYGPATH -m "$unix_path"`
27618    WINPATH_VS_ENV_CMD="$windows_path"
27619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27620    windows_path=`cmd //c echo $unix_path`
27621    WINPATH_VS_ENV_CMD="$windows_path"
27622  fi
27623
27624    WINPATH_BASH="$BASH"
27625
27626  unix_path="$WINPATH_BASH"
27627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628    windows_path=`$CYGPATH -m "$unix_path"`
27629    WINPATH_BASH="$windows_path"
27630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27631    windows_path=`cmd //c echo $unix_path`
27632    WINPATH_BASH="$windows_path"
27633  fi
27634
27635
27636    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27637    # script (executable by bash) that will setup the important variables.
27638    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27639    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27640    # This will end up something like:
27641    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27642    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27643    # These will end up something like:
27644    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27645    # The trailing space for everyone except PATH is no typo, but is needed due
27646    # to trailing \ in the Windows paths. These will be stripped later.
27647    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27648    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27649    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27650    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27651    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27652    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27653
27654    # Now execute the newly created bat file.
27655    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27656    # Change directory so we don't need to mess with Windows paths in redirects.
27657    cd $VS_ENV_TMP_DIR
27658    cmd /c extract-vs-env.bat | $CAT
27659    cd $CURDIR
27660
27661    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27663$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27665$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27666      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27667$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27668      as_fn_error $? "Cannot continue" "$LINENO" 5
27669    fi
27670
27671    # Now set all paths and other env variables. This will allow the rest of
27672    # the configure script to find and run the compiler in the proper way.
27673    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27674$as_echo "$as_me: Setting extracted environment variables" >&6;}
27675    . $VS_ENV_TMP_DIR/set-vs-env.sh
27676    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27677    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27678  else
27679    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27680    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27681$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27682  fi
27683
27684  # At this point, we should have correct variables in the environment, or we can't continue.
27685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27686$as_echo_n "checking for Visual Studio variables... " >&6; }
27687
27688  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27689    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27691$as_echo "present but broken" >&6; }
27692      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27693    else
27694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27695$as_echo "ok" >&6; }
27696      # Remove any trailing "\" ";" and " " from the variables.
27697      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27698      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27699      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27700      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27701      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27702      # Remove any paths containing # (typically F#) as that messes up make. This
27703      # is needed if visual studio was installed with F# support.
27704      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27705
27706
27707
27708
27709
27710      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27711      OLDIFS="$IFS"
27712      IFS=";"
27713      for i in $VS_INCLUDE; do
27714        ipath=$i
27715        # Only process non-empty elements
27716        if test "x$ipath" != x; then
27717          IFS="$OLDIFS"
27718          # Check that directory exists before calling fixup_path
27719          testpath=$ipath
27720
27721  windows_path="$testpath"
27722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723    unix_path=`$CYGPATH -u "$windows_path"`
27724    testpath="$unix_path"
27725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27727    testpath="$unix_path"
27728  fi
27729
27730          if test -d "$testpath"; then
27731
27732  # Only process if variable expands to non-empty
27733
27734  if test "x$ipath" != x; then
27735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27736
27737  # Input might be given as Windows format, start by converting to
27738  # unix format.
27739  path="$ipath"
27740  new_path=`$CYGPATH -u "$path"`
27741
27742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27745  # "foo.exe" is OK but "foo" is an error.
27746  #
27747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27748  # It is also a way to make sure we got the proper file name for the real test later on.
27749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27750  if test "x$test_shortpath" = x; then
27751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27752$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27753    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27754  fi
27755
27756  # Call helper function which possibly converts this using DOS-style short mode.
27757  # If so, the updated path is stored in $new_path.
27758
27759  input_path="$new_path"
27760  # Check if we need to convert this using DOS-style short mode. If the path
27761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27762  # take no chances and rewrite it.
27763  # Note: m4 eats our [], so we need to use [ and ] instead.
27764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27765  if test "x$has_forbidden_chars" != x; then
27766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27770      # Going to short mode and back again did indeed matter. Since short mode is
27771      # case insensitive, let's make it lowercase to improve readability.
27772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27773      # Now convert it back to Unix-stile (cygpath)
27774      input_path=`$CYGPATH -u "$shortmode_path"`
27775      new_path="$input_path"
27776    fi
27777  fi
27778
27779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27780  if test "x$test_cygdrive_prefix" = x; then
27781    # As a simple fix, exclude /usr/bin since it's not a real path.
27782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27784      # a path prefixed by /cygdrive for fixpath to work.
27785      new_path="$CYGWIN_ROOT_PATH$input_path"
27786    fi
27787  fi
27788
27789
27790  if test "x$path" != "x$new_path"; then
27791    ipath="$new_path"
27792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27793$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27794  fi
27795
27796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27797
27798  path="$ipath"
27799  has_colon=`$ECHO $path | $GREP ^.:`
27800  new_path="$path"
27801  if test "x$has_colon" = x; then
27802    # Not in mixed or Windows style, start by that.
27803    new_path=`cmd //c echo $path`
27804  fi
27805
27806
27807  input_path="$new_path"
27808  # Check if we need to convert this using DOS-style short mode. If the path
27809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27810  # take no chances and rewrite it.
27811  # Note: m4 eats our [], so we need to use [ and ] instead.
27812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27813  if test "x$has_forbidden_chars" != x; then
27814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27816  fi
27817
27818
27819  windows_path="$new_path"
27820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27821    unix_path=`$CYGPATH -u "$windows_path"`
27822    new_path="$unix_path"
27823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27825    new_path="$unix_path"
27826  fi
27827
27828  if test "x$path" != "x$new_path"; then
27829    ipath="$new_path"
27830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27831$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27832  fi
27833
27834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27836
27837    else
27838      # We're on a unix platform. Hooray! :)
27839      path="$ipath"
27840      has_space=`$ECHO "$path" | $GREP " "`
27841      if test "x$has_space" != x; then
27842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27843$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27845      fi
27846
27847      # Use eval to expand a potential ~
27848      eval path="$path"
27849      if test ! -f "$path" && test ! -d "$path"; then
27850        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27851      fi
27852
27853      ipath="`cd "$path"; $THEPWDCMD -L`"
27854    fi
27855  fi
27856
27857            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27858          fi
27859          IFS=";"
27860        fi
27861      done
27862      # Convert VS_LIB into SYSROOT_LDFLAGS
27863      for i in $VS_LIB; do
27864        libpath=$i
27865        # Only process non-empty elements
27866        if test "x$libpath" != x; then
27867          IFS="$OLDIFS"
27868          # Check that directory exists before calling fixup_path
27869          testpath=$libpath
27870
27871  windows_path="$testpath"
27872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27873    unix_path=`$CYGPATH -u "$windows_path"`
27874    testpath="$unix_path"
27875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27877    testpath="$unix_path"
27878  fi
27879
27880          if test -d "$testpath"; then
27881
27882  # Only process if variable expands to non-empty
27883
27884  if test "x$libpath" != x; then
27885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27886
27887  # Input might be given as Windows format, start by converting to
27888  # unix format.
27889  path="$libpath"
27890  new_path=`$CYGPATH -u "$path"`
27891
27892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27895  # "foo.exe" is OK but "foo" is an error.
27896  #
27897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27898  # It is also a way to make sure we got the proper file name for the real test later on.
27899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27900  if test "x$test_shortpath" = x; then
27901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27902$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27903    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27904  fi
27905
27906  # Call helper function which possibly converts this using DOS-style short mode.
27907  # If so, the updated path is stored in $new_path.
27908
27909  input_path="$new_path"
27910  # Check if we need to convert this using DOS-style short mode. If the path
27911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27912  # take no chances and rewrite it.
27913  # Note: m4 eats our [], so we need to use [ and ] instead.
27914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27915  if test "x$has_forbidden_chars" != x; then
27916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27920      # Going to short mode and back again did indeed matter. Since short mode is
27921      # case insensitive, let's make it lowercase to improve readability.
27922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27923      # Now convert it back to Unix-stile (cygpath)
27924      input_path=`$CYGPATH -u "$shortmode_path"`
27925      new_path="$input_path"
27926    fi
27927  fi
27928
27929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27930  if test "x$test_cygdrive_prefix" = x; then
27931    # As a simple fix, exclude /usr/bin since it's not a real path.
27932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27934      # a path prefixed by /cygdrive for fixpath to work.
27935      new_path="$CYGWIN_ROOT_PATH$input_path"
27936    fi
27937  fi
27938
27939
27940  if test "x$path" != "x$new_path"; then
27941    libpath="$new_path"
27942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27943$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27944  fi
27945
27946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27947
27948  path="$libpath"
27949  has_colon=`$ECHO $path | $GREP ^.:`
27950  new_path="$path"
27951  if test "x$has_colon" = x; then
27952    # Not in mixed or Windows style, start by that.
27953    new_path=`cmd //c echo $path`
27954  fi
27955
27956
27957  input_path="$new_path"
27958  # Check if we need to convert this using DOS-style short mode. If the path
27959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27960  # take no chances and rewrite it.
27961  # Note: m4 eats our [], so we need to use [ and ] instead.
27962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27963  if test "x$has_forbidden_chars" != x; then
27964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27966  fi
27967
27968
27969  windows_path="$new_path"
27970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27971    unix_path=`$CYGPATH -u "$windows_path"`
27972    new_path="$unix_path"
27973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27975    new_path="$unix_path"
27976  fi
27977
27978  if test "x$path" != "x$new_path"; then
27979    libpath="$new_path"
27980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27981$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27982  fi
27983
27984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27986
27987    else
27988      # We're on a unix platform. Hooray! :)
27989      path="$libpath"
27990      has_space=`$ECHO "$path" | $GREP " "`
27991      if test "x$has_space" != x; then
27992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27993$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27995      fi
27996
27997      # Use eval to expand a potential ~
27998      eval path="$path"
27999      if test ! -f "$path" && test ! -d "$path"; then
28000        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28001      fi
28002
28003      libpath="`cd "$path"; $THEPWDCMD -L`"
28004    fi
28005  fi
28006
28007            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28008          fi
28009          IFS=";"
28010        fi
28011      done
28012      IFS="$OLDIFS"
28013    fi
28014  else
28015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28016$as_echo "not found" >&6; }
28017
28018    if test "x$VS_ENV_CMD" = x; then
28019      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28020$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28021      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28022$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28023    else
28024      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28025$as_echo "$as_me: Running the extraction script failed." >&6;}
28026    fi
28027    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28028$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28029    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28030$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28031    as_fn_error $? "Cannot continue" "$LINENO" 5
28032  fi
28033
28034    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28035    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28036    PATH="$VS_PATH"
28037    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28038    export INCLUDE="$VS_INCLUDE"
28039    export LIB="$VS_LIB"
28040  fi
28041
28042  # autoconf magic only relies on PATH, so update it if tools dir is specified
28043  OLD_PATH="$PATH"
28044
28045  # For solaris we really need solaris tools, and not the GNU equivalent.
28046  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28047  # so add that to path before starting to probe.
28048  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28049  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28050    PATH="/usr/ccs/bin:$PATH"
28051  fi
28052
28053  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28054  # override all other locations.
28055  if test "x$TOOLCHAIN_PATH" != x; then
28056    PATH=$TOOLCHAIN_PATH:$PATH
28057  fi
28058
28059
28060  #
28061  # Setup the compilers (CC and CXX)
28062  #
28063
28064  COMPILER_NAME=C
28065  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28066
28067  if test "x$CC" != x; then
28068    # User has supplied compiler name already, always let that override.
28069    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28070$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28071    if test "x`basename $CC`" = "x$CC"; then
28072      # A command without a complete path is provided, search $PATH.
28073
28074      for ac_prog in $CC
28075do
28076  # Extract the first word of "$ac_prog", so it can be a program name with args.
28077set dummy $ac_prog; ac_word=$2
28078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28079$as_echo_n "checking for $ac_word... " >&6; }
28080if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28081  $as_echo_n "(cached) " >&6
28082else
28083  case $POTENTIAL_CC in
28084  [\\/]* | ?:[\\/]*)
28085  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28086  ;;
28087  *)
28088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28089for as_dir in $PATH
28090do
28091  IFS=$as_save_IFS
28092  test -z "$as_dir" && as_dir=.
28093    for ac_exec_ext in '' $ac_executable_extensions; do
28094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28095    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28097    break 2
28098  fi
28099done
28100  done
28101IFS=$as_save_IFS
28102
28103  ;;
28104esac
28105fi
28106POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28107if test -n "$POTENTIAL_CC"; then
28108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28109$as_echo "$POTENTIAL_CC" >&6; }
28110else
28111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28112$as_echo "no" >&6; }
28113fi
28114
28115
28116  test -n "$POTENTIAL_CC" && break
28117done
28118
28119      if test "x$POTENTIAL_CC" != x; then
28120        CC=$POTENTIAL_CC
28121      else
28122        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28123      fi
28124    else
28125      # Otherwise it might already be a complete path
28126      if test ! -x "$CC"; then
28127        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28128      fi
28129    fi
28130  else
28131    # No user supplied value. Locate compiler ourselves.
28132
28133    # If we are cross compiling, assume cross compilation tools follows the
28134    # cross compilation standard where they are prefixed with the autoconf
28135    # standard name for the target. For example the binary
28136    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28137    # If we are not cross compiling, then the default compiler name will be
28138    # used.
28139
28140    CC=
28141    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28142    # before checking the rest of the PATH.
28143    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28144    # step, this should not be necessary.
28145    if test -n "$TOOLCHAIN_PATH"; then
28146      PATH_save="$PATH"
28147      PATH="$TOOLCHAIN_PATH"
28148      for ac_prog in $SEARCH_LIST
28149do
28150  # Extract the first word of "$ac_prog", so it can be a program name with args.
28151set dummy $ac_prog; ac_word=$2
28152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28153$as_echo_n "checking for $ac_word... " >&6; }
28154if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28155  $as_echo_n "(cached) " >&6
28156else
28157  case $TOOLCHAIN_PATH_CC in
28158  [\\/]* | ?:[\\/]*)
28159  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28160  ;;
28161  *)
28162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28163for as_dir in $PATH
28164do
28165  IFS=$as_save_IFS
28166  test -z "$as_dir" && as_dir=.
28167    for ac_exec_ext in '' $ac_executable_extensions; do
28168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28169    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28171    break 2
28172  fi
28173done
28174  done
28175IFS=$as_save_IFS
28176
28177  ;;
28178esac
28179fi
28180TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28181if test -n "$TOOLCHAIN_PATH_CC"; then
28182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28183$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28184else
28185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28186$as_echo "no" >&6; }
28187fi
28188
28189
28190  test -n "$TOOLCHAIN_PATH_CC" && break
28191done
28192
28193      CC=$TOOLCHAIN_PATH_CC
28194      PATH="$PATH_save"
28195    fi
28196
28197    # AC_PATH_PROGS can't be run multiple times with the same variable,
28198    # so create a new name for this run.
28199    if test "x$CC" = x; then
28200      for ac_prog in $SEARCH_LIST
28201do
28202  # Extract the first word of "$ac_prog", so it can be a program name with args.
28203set dummy $ac_prog; ac_word=$2
28204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28205$as_echo_n "checking for $ac_word... " >&6; }
28206if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28207  $as_echo_n "(cached) " >&6
28208else
28209  case $POTENTIAL_CC in
28210  [\\/]* | ?:[\\/]*)
28211  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28212  ;;
28213  *)
28214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28215for as_dir in $PATH
28216do
28217  IFS=$as_save_IFS
28218  test -z "$as_dir" && as_dir=.
28219    for ac_exec_ext in '' $ac_executable_extensions; do
28220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28221    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28223    break 2
28224  fi
28225done
28226  done
28227IFS=$as_save_IFS
28228
28229  ;;
28230esac
28231fi
28232POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28233if test -n "$POTENTIAL_CC"; then
28234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28235$as_echo "$POTENTIAL_CC" >&6; }
28236else
28237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28238$as_echo "no" >&6; }
28239fi
28240
28241
28242  test -n "$POTENTIAL_CC" && break
28243done
28244
28245      CC=$POTENTIAL_CC
28246    fi
28247
28248    if test "x$CC" = x; then
28249
28250  # Print a helpful message on how to acquire the necessary build dependency.
28251  # devkit is the help tag: freetype, cups, pulse, alsa etc
28252  MISSING_DEPENDENCY=devkit
28253
28254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28255    cygwin_help $MISSING_DEPENDENCY
28256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28257    msys_help $MISSING_DEPENDENCY
28258  else
28259    PKGHANDLER_COMMAND=
28260
28261    case $PKGHANDLER in
28262      apt-get)
28263        apt_help     $MISSING_DEPENDENCY ;;
28264      yum)
28265        yum_help     $MISSING_DEPENDENCY ;;
28266      port)
28267        port_help    $MISSING_DEPENDENCY ;;
28268      pkgutil)
28269        pkgutil_help $MISSING_DEPENDENCY ;;
28270      pkgadd)
28271        pkgadd_help  $MISSING_DEPENDENCY ;;
28272    esac
28273
28274    if test "x$PKGHANDLER_COMMAND" != x; then
28275      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28276    fi
28277  fi
28278
28279      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28280    fi
28281  fi
28282
28283  # Now we have a compiler binary in CC. Make sure it's okay.
28284
28285  # Only process if variable expands to non-empty
28286
28287  if test "x$CC" != x; then
28288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28289
28290  # First separate the path from the arguments. This will split at the first
28291  # space.
28292  complete="$CC"
28293  path="${complete%% *}"
28294  tmp="$complete EOL"
28295  arguments="${tmp#* }"
28296
28297  # Input might be given as Windows format, start by converting to
28298  # unix format.
28299  new_path=`$CYGPATH -u "$path"`
28300
28301  # Now try to locate executable using which
28302  new_path=`$WHICH "$new_path" 2> /dev/null`
28303  # bat and cmd files are not always considered executable in cygwin causing which
28304  # to not find them
28305  if test "x$new_path" = x \
28306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28308    new_path=`$CYGPATH -u "$path"`
28309  fi
28310  if test "x$new_path" = x; then
28311    # Oops. Which didn't find the executable.
28312    # The splitting of arguments from the executable at a space might have been incorrect,
28313    # since paths with space are more likely in Windows. Give it another try with the whole
28314    # argument.
28315    path="$complete"
28316    arguments="EOL"
28317    new_path=`$CYGPATH -u "$path"`
28318    new_path=`$WHICH "$new_path" 2> /dev/null`
28319    # bat and cmd files are not always considered executable in cygwin causing which
28320    # to not find them
28321    if test "x$new_path" = x \
28322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28324      new_path=`$CYGPATH -u "$path"`
28325    fi
28326    if test "x$new_path" = x; then
28327      # It's still not found. Now this is an unrecoverable error.
28328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28329$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28330      has_space=`$ECHO "$complete" | $GREP " "`
28331      if test "x$has_space" != x; then
28332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28334      fi
28335      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28336    fi
28337  fi
28338
28339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28342  # "foo.exe" is OK but "foo" is an error.
28343  #
28344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28345  # It is also a way to make sure we got the proper file name for the real test later on.
28346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28347  if test "x$test_shortpath" = x; then
28348    # Short path failed, file does not exist as specified.
28349    # Try adding .exe or .cmd
28350    if test -f "${new_path}.exe"; then
28351      input_to_shortpath="${new_path}.exe"
28352    elif test -f "${new_path}.cmd"; then
28353      input_to_shortpath="${new_path}.cmd"
28354    else
28355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28356$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28359      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28360    fi
28361  else
28362    input_to_shortpath="$new_path"
28363  fi
28364
28365  # Call helper function which possibly converts this using DOS-style short mode.
28366  # If so, the updated path is stored in $new_path.
28367  new_path="$input_to_shortpath"
28368
28369  input_path="$input_to_shortpath"
28370  # Check if we need to convert this using DOS-style short mode. If the path
28371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28372  # take no chances and rewrite it.
28373  # Note: m4 eats our [], so we need to use [ and ] instead.
28374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28375  if test "x$has_forbidden_chars" != x; then
28376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28380      # Going to short mode and back again did indeed matter. Since short mode is
28381      # case insensitive, let's make it lowercase to improve readability.
28382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28383      # Now convert it back to Unix-stile (cygpath)
28384      input_path=`$CYGPATH -u "$shortmode_path"`
28385      new_path="$input_path"
28386    fi
28387  fi
28388
28389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28390  if test "x$test_cygdrive_prefix" = x; then
28391    # As a simple fix, exclude /usr/bin since it's not a real path.
28392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28394      # a path prefixed by /cygdrive for fixpath to work.
28395      new_path="$CYGWIN_ROOT_PATH$input_path"
28396    fi
28397  fi
28398
28399  # remove trailing .exe if any
28400  new_path="${new_path/%.exe/}"
28401
28402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28403
28404  # First separate the path from the arguments. This will split at the first
28405  # space.
28406  complete="$CC"
28407  path="${complete%% *}"
28408  tmp="$complete EOL"
28409  arguments="${tmp#* }"
28410
28411  # Input might be given as Windows format, start by converting to
28412  # unix format.
28413  new_path="$path"
28414
28415  windows_path="$new_path"
28416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28417    unix_path=`$CYGPATH -u "$windows_path"`
28418    new_path="$unix_path"
28419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28421    new_path="$unix_path"
28422  fi
28423
28424
28425  # Now try to locate executable using which
28426  new_path=`$WHICH "$new_path" 2> /dev/null`
28427
28428  if test "x$new_path" = x; then
28429    # Oops. Which didn't find the executable.
28430    # The splitting of arguments from the executable at a space might have been incorrect,
28431    # since paths with space are more likely in Windows. Give it another try with the whole
28432    # argument.
28433    path="$complete"
28434    arguments="EOL"
28435    new_path="$path"
28436
28437  windows_path="$new_path"
28438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28439    unix_path=`$CYGPATH -u "$windows_path"`
28440    new_path="$unix_path"
28441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28443    new_path="$unix_path"
28444  fi
28445
28446
28447    new_path=`$WHICH "$new_path" 2> /dev/null`
28448    # bat and cmd files are not always considered executable in MSYS causing which
28449    # to not find them
28450    if test "x$new_path" = x \
28451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28453      new_path="$path"
28454
28455  windows_path="$new_path"
28456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28457    unix_path=`$CYGPATH -u "$windows_path"`
28458    new_path="$unix_path"
28459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28461    new_path="$unix_path"
28462  fi
28463
28464    fi
28465
28466    if test "x$new_path" = x; then
28467      # It's still not found. Now this is an unrecoverable error.
28468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28469$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28470      has_space=`$ECHO "$complete" | $GREP " "`
28471      if test "x$has_space" != x; then
28472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28474      fi
28475      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28476    fi
28477  fi
28478
28479  # Now new_path has a complete unix path to the binary
28480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28481    # Keep paths in /bin as-is, but remove trailing .exe if any
28482    new_path="${new_path/%.exe/}"
28483    # Do not save /bin paths to all_fixpath_prefixes!
28484  else
28485    # Not in mixed or Windows style, start by that.
28486    new_path=`cmd //c echo $new_path`
28487
28488  input_path="$new_path"
28489  # Check if we need to convert this using DOS-style short mode. If the path
28490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28491  # take no chances and rewrite it.
28492  # Note: m4 eats our [], so we need to use [ and ] instead.
28493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28494  if test "x$has_forbidden_chars" != x; then
28495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28497  fi
28498
28499    # Output is in $new_path
28500
28501  windows_path="$new_path"
28502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28503    unix_path=`$CYGPATH -u "$windows_path"`
28504    new_path="$unix_path"
28505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28507    new_path="$unix_path"
28508  fi
28509
28510    # remove trailing .exe if any
28511    new_path="${new_path/%.exe/}"
28512
28513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28515  fi
28516
28517    else
28518      # We're on a unix platform. Hooray! :)
28519      # First separate the path from the arguments. This will split at the first
28520      # space.
28521      complete="$CC"
28522      path="${complete%% *}"
28523      tmp="$complete EOL"
28524      arguments="${tmp#* }"
28525
28526      # Cannot rely on the command "which" here since it doesn't always work.
28527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28528      if test -z "$is_absolute_path"; then
28529        # Path to executable is not absolute. Find it.
28530        IFS_save="$IFS"
28531        IFS=:
28532        for p in $PATH; do
28533          if test -f "$p/$path" && test -x "$p/$path"; then
28534            new_path="$p/$path"
28535            break
28536          fi
28537        done
28538        IFS="$IFS_save"
28539      else
28540        # This is an absolute path, we can use it without further modifications.
28541        new_path="$path"
28542      fi
28543
28544      if test "x$new_path" = x; then
28545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28546$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28547        has_space=`$ECHO "$complete" | $GREP " "`
28548        if test "x$has_space" != x; then
28549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28551        fi
28552        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28553      fi
28554    fi
28555
28556    # Now join together the path and the arguments once again
28557    if test "x$arguments" != xEOL; then
28558      new_complete="$new_path ${arguments% *}"
28559    else
28560      new_complete="$new_path"
28561    fi
28562
28563    if test "x$complete" != "x$new_complete"; then
28564      CC="$new_complete"
28565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28566$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28567    fi
28568  fi
28569
28570  TEST_COMPILER="$CC"
28571  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28572  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28573  if test "x$OPENJDK_BUILD_OS" != xaix; then
28574    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28576$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28577
28578  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28579    # Follow a chain of symbolic links. Use readlink
28580    # where it exists, else fall back to horribly
28581    # complicated shell code.
28582    if test "x$READLINK_TESTED" != yes; then
28583      # On MacOSX there is a readlink tool with a different
28584      # purpose than the GNU readlink tool. Check the found readlink.
28585      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28586      if test "x$ISGNU" = x; then
28587        # A readlink that we do not know how to use.
28588        # Are there other non-GNU readlinks out there?
28589        READLINK_TESTED=yes
28590        READLINK=
28591      fi
28592    fi
28593
28594    if test "x$READLINK" != x; then
28595      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28596    else
28597      # Save the current directory for restoring afterwards
28598      STARTDIR=$PWD
28599      COUNTER=0
28600      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28601      sym_link_file=`$BASENAME $TEST_COMPILER`
28602      cd $sym_link_dir
28603      # Use -P flag to resolve symlinks in directories.
28604      cd `$THEPWDCMD -P`
28605      sym_link_dir=`$THEPWDCMD -P`
28606      # Resolve file symlinks
28607      while test $COUNTER -lt 20; do
28608        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28609        if test "x$ISLINK" == x; then
28610          # This is not a symbolic link! We are done!
28611          break
28612        fi
28613        # Again resolve directory symlinks since the target of the just found
28614        # link could be in a different directory
28615        cd `$DIRNAME $ISLINK`
28616        sym_link_dir=`$THEPWDCMD -P`
28617        sym_link_file=`$BASENAME $ISLINK`
28618        let COUNTER=COUNTER+1
28619      done
28620      cd $STARTDIR
28621      TEST_COMPILER=$sym_link_dir/$sym_link_file
28622    fi
28623  fi
28624
28625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28626$as_echo "$TEST_COMPILER" >&6; }
28627  fi
28628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28629$as_echo_n "checking if CC is disguised ccache... " >&6; }
28630
28631  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28632  if test "x$COMPILER_BASENAME" = "xccache"; then
28633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28634$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28635    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28636    # We want to control ccache invocation ourselves, so ignore this cc and try
28637    # searching again.
28638
28639    # Remove the path to the fake ccache cc from the PATH
28640    RETRY_COMPILER_SAVED_PATH="$PATH"
28641    COMPILER_DIRNAME=`$DIRNAME $CC`
28642    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28643
28644    # Try again looking for our compiler
28645    if test -n "$ac_tool_prefix"; then
28646  for ac_prog in $TOOLCHAIN_CC_BINARY
28647  do
28648    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28651$as_echo_n "checking for $ac_word... " >&6; }
28652if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28653  $as_echo_n "(cached) " >&6
28654else
28655  if test -n "$PROPER_COMPILER_CC"; then
28656  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28657else
28658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28659for as_dir in $PATH
28660do
28661  IFS=$as_save_IFS
28662  test -z "$as_dir" && as_dir=.
28663    for ac_exec_ext in '' $ac_executable_extensions; do
28664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28665    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28667    break 2
28668  fi
28669done
28670  done
28671IFS=$as_save_IFS
28672
28673fi
28674fi
28675PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28676if test -n "$PROPER_COMPILER_CC"; then
28677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28678$as_echo "$PROPER_COMPILER_CC" >&6; }
28679else
28680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28681$as_echo "no" >&6; }
28682fi
28683
28684
28685    test -n "$PROPER_COMPILER_CC" && break
28686  done
28687fi
28688if test -z "$PROPER_COMPILER_CC"; then
28689  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28690  for ac_prog in $TOOLCHAIN_CC_BINARY
28691do
28692  # Extract the first word of "$ac_prog", so it can be a program name with args.
28693set dummy $ac_prog; ac_word=$2
28694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28695$as_echo_n "checking for $ac_word... " >&6; }
28696if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28697  $as_echo_n "(cached) " >&6
28698else
28699  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28700  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28701else
28702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28703for as_dir in $PATH
28704do
28705  IFS=$as_save_IFS
28706  test -z "$as_dir" && as_dir=.
28707    for ac_exec_ext in '' $ac_executable_extensions; do
28708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28709    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28711    break 2
28712  fi
28713done
28714  done
28715IFS=$as_save_IFS
28716
28717fi
28718fi
28719ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28720if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28722$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28723else
28724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28725$as_echo "no" >&6; }
28726fi
28727
28728
28729  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28730done
28731
28732  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28733    PROPER_COMPILER_CC=""
28734  else
28735    case $cross_compiling:$ac_tool_warned in
28736yes:)
28737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28739ac_tool_warned=yes ;;
28740esac
28741    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28742  fi
28743fi
28744
28745
28746  # Only process if variable expands to non-empty
28747
28748  if test "x$PROPER_COMPILER_CC" != x; then
28749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28750
28751  # First separate the path from the arguments. This will split at the first
28752  # space.
28753  complete="$PROPER_COMPILER_CC"
28754  path="${complete%% *}"
28755  tmp="$complete EOL"
28756  arguments="${tmp#* }"
28757
28758  # Input might be given as Windows format, start by converting to
28759  # unix format.
28760  new_path=`$CYGPATH -u "$path"`
28761
28762  # Now try to locate executable using which
28763  new_path=`$WHICH "$new_path" 2> /dev/null`
28764  # bat and cmd files are not always considered executable in cygwin causing which
28765  # to not find them
28766  if test "x$new_path" = x \
28767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28769    new_path=`$CYGPATH -u "$path"`
28770  fi
28771  if test "x$new_path" = x; then
28772    # Oops. Which didn't find the executable.
28773    # The splitting of arguments from the executable at a space might have been incorrect,
28774    # since paths with space are more likely in Windows. Give it another try with the whole
28775    # argument.
28776    path="$complete"
28777    arguments="EOL"
28778    new_path=`$CYGPATH -u "$path"`
28779    new_path=`$WHICH "$new_path" 2> /dev/null`
28780    # bat and cmd files are not always considered executable in cygwin causing which
28781    # to not find them
28782    if test "x$new_path" = x \
28783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28785      new_path=`$CYGPATH -u "$path"`
28786    fi
28787    if test "x$new_path" = x; then
28788      # It's still not found. Now this is an unrecoverable error.
28789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28790$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28791      has_space=`$ECHO "$complete" | $GREP " "`
28792      if test "x$has_space" != x; then
28793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28795      fi
28796      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28797    fi
28798  fi
28799
28800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28803  # "foo.exe" is OK but "foo" is an error.
28804  #
28805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28806  # It is also a way to make sure we got the proper file name for the real test later on.
28807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28808  if test "x$test_shortpath" = x; then
28809    # Short path failed, file does not exist as specified.
28810    # Try adding .exe or .cmd
28811    if test -f "${new_path}.exe"; then
28812      input_to_shortpath="${new_path}.exe"
28813    elif test -f "${new_path}.cmd"; then
28814      input_to_shortpath="${new_path}.cmd"
28815    else
28816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28817$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28820      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28821    fi
28822  else
28823    input_to_shortpath="$new_path"
28824  fi
28825
28826  # Call helper function which possibly converts this using DOS-style short mode.
28827  # If so, the updated path is stored in $new_path.
28828  new_path="$input_to_shortpath"
28829
28830  input_path="$input_to_shortpath"
28831  # Check if we need to convert this using DOS-style short mode. If the path
28832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28833  # take no chances and rewrite it.
28834  # Note: m4 eats our [], so we need to use [ and ] instead.
28835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28836  if test "x$has_forbidden_chars" != x; then
28837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28841      # Going to short mode and back again did indeed matter. Since short mode is
28842      # case insensitive, let's make it lowercase to improve readability.
28843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28844      # Now convert it back to Unix-stile (cygpath)
28845      input_path=`$CYGPATH -u "$shortmode_path"`
28846      new_path="$input_path"
28847    fi
28848  fi
28849
28850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28851  if test "x$test_cygdrive_prefix" = x; then
28852    # As a simple fix, exclude /usr/bin since it's not a real path.
28853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28855      # a path prefixed by /cygdrive for fixpath to work.
28856      new_path="$CYGWIN_ROOT_PATH$input_path"
28857    fi
28858  fi
28859
28860  # remove trailing .exe if any
28861  new_path="${new_path/%.exe/}"
28862
28863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28864
28865  # First separate the path from the arguments. This will split at the first
28866  # space.
28867  complete="$PROPER_COMPILER_CC"
28868  path="${complete%% *}"
28869  tmp="$complete EOL"
28870  arguments="${tmp#* }"
28871
28872  # Input might be given as Windows format, start by converting to
28873  # unix format.
28874  new_path="$path"
28875
28876  windows_path="$new_path"
28877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28878    unix_path=`$CYGPATH -u "$windows_path"`
28879    new_path="$unix_path"
28880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28882    new_path="$unix_path"
28883  fi
28884
28885
28886  # Now try to locate executable using which
28887  new_path=`$WHICH "$new_path" 2> /dev/null`
28888
28889  if test "x$new_path" = x; then
28890    # Oops. Which didn't find the executable.
28891    # The splitting of arguments from the executable at a space might have been incorrect,
28892    # since paths with space are more likely in Windows. Give it another try with the whole
28893    # argument.
28894    path="$complete"
28895    arguments="EOL"
28896    new_path="$path"
28897
28898  windows_path="$new_path"
28899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28900    unix_path=`$CYGPATH -u "$windows_path"`
28901    new_path="$unix_path"
28902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28904    new_path="$unix_path"
28905  fi
28906
28907
28908    new_path=`$WHICH "$new_path" 2> /dev/null`
28909    # bat and cmd files are not always considered executable in MSYS causing which
28910    # to not find them
28911    if test "x$new_path" = x \
28912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28914      new_path="$path"
28915
28916  windows_path="$new_path"
28917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28918    unix_path=`$CYGPATH -u "$windows_path"`
28919    new_path="$unix_path"
28920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28922    new_path="$unix_path"
28923  fi
28924
28925    fi
28926
28927    if test "x$new_path" = x; then
28928      # It's still not found. Now this is an unrecoverable error.
28929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28930$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28931      has_space=`$ECHO "$complete" | $GREP " "`
28932      if test "x$has_space" != x; then
28933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28935      fi
28936      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28937    fi
28938  fi
28939
28940  # Now new_path has a complete unix path to the binary
28941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28942    # Keep paths in /bin as-is, but remove trailing .exe if any
28943    new_path="${new_path/%.exe/}"
28944    # Do not save /bin paths to all_fixpath_prefixes!
28945  else
28946    # Not in mixed or Windows style, start by that.
28947    new_path=`cmd //c echo $new_path`
28948
28949  input_path="$new_path"
28950  # Check if we need to convert this using DOS-style short mode. If the path
28951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28952  # take no chances and rewrite it.
28953  # Note: m4 eats our [], so we need to use [ and ] instead.
28954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28955  if test "x$has_forbidden_chars" != x; then
28956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28958  fi
28959
28960    # Output is in $new_path
28961
28962  windows_path="$new_path"
28963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28964    unix_path=`$CYGPATH -u "$windows_path"`
28965    new_path="$unix_path"
28966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28968    new_path="$unix_path"
28969  fi
28970
28971    # remove trailing .exe if any
28972    new_path="${new_path/%.exe/}"
28973
28974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28976  fi
28977
28978    else
28979      # We're on a unix platform. Hooray! :)
28980      # First separate the path from the arguments. This will split at the first
28981      # space.
28982      complete="$PROPER_COMPILER_CC"
28983      path="${complete%% *}"
28984      tmp="$complete EOL"
28985      arguments="${tmp#* }"
28986
28987      # Cannot rely on the command "which" here since it doesn't always work.
28988      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28989      if test -z "$is_absolute_path"; then
28990        # Path to executable is not absolute. Find it.
28991        IFS_save="$IFS"
28992        IFS=:
28993        for p in $PATH; do
28994          if test -f "$p/$path" && test -x "$p/$path"; then
28995            new_path="$p/$path"
28996            break
28997          fi
28998        done
28999        IFS="$IFS_save"
29000      else
29001        # This is an absolute path, we can use it without further modifications.
29002        new_path="$path"
29003      fi
29004
29005      if test "x$new_path" = x; then
29006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29007$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29008        has_space=`$ECHO "$complete" | $GREP " "`
29009        if test "x$has_space" != x; then
29010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29012        fi
29013        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29014      fi
29015    fi
29016
29017    # Now join together the path and the arguments once again
29018    if test "x$arguments" != xEOL; then
29019      new_complete="$new_path ${arguments% *}"
29020    else
29021      new_complete="$new_path"
29022    fi
29023
29024    if test "x$complete" != "x$new_complete"; then
29025      PROPER_COMPILER_CC="$new_complete"
29026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29027$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29028    fi
29029  fi
29030
29031    PATH="$RETRY_COMPILER_SAVED_PATH"
29032
29033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29034$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29035
29036  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29037    # Follow a chain of symbolic links. Use readlink
29038    # where it exists, else fall back to horribly
29039    # complicated shell code.
29040    if test "x$READLINK_TESTED" != yes; then
29041      # On MacOSX there is a readlink tool with a different
29042      # purpose than the GNU readlink tool. Check the found readlink.
29043      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29044      if test "x$ISGNU" = x; then
29045        # A readlink that we do not know how to use.
29046        # Are there other non-GNU readlinks out there?
29047        READLINK_TESTED=yes
29048        READLINK=
29049      fi
29050    fi
29051
29052    if test "x$READLINK" != x; then
29053      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29054    else
29055      # Save the current directory for restoring afterwards
29056      STARTDIR=$PWD
29057      COUNTER=0
29058      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29059      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29060      cd $sym_link_dir
29061      # Use -P flag to resolve symlinks in directories.
29062      cd `$THEPWDCMD -P`
29063      sym_link_dir=`$THEPWDCMD -P`
29064      # Resolve file symlinks
29065      while test $COUNTER -lt 20; do
29066        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29067        if test "x$ISLINK" == x; then
29068          # This is not a symbolic link! We are done!
29069          break
29070        fi
29071        # Again resolve directory symlinks since the target of the just found
29072        # link could be in a different directory
29073        cd `$DIRNAME $ISLINK`
29074        sym_link_dir=`$THEPWDCMD -P`
29075        sym_link_file=`$BASENAME $ISLINK`
29076        let COUNTER=COUNTER+1
29077      done
29078      cd $STARTDIR
29079      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29080    fi
29081  fi
29082
29083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29084$as_echo "$PROPER_COMPILER_CC" >&6; }
29085    CC="$PROPER_COMPILER_CC"
29086  else
29087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29088$as_echo "no, keeping CC" >&6; }
29089  fi
29090
29091
29092  COMPILER=$CC
29093  COMPILER_NAME=$COMPILER_NAME
29094
29095  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29096    # cc -V output typically looks like
29097    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29098    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29099    # Check that this is likely to be the Solaris Studio cc.
29100    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29101    if test $? -ne 0; then
29102      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29103      { $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
29104$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29105      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29106$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29107      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29108$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29109      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29110    fi
29111    # Remove usage instructions (if present), and
29112    # collapse compiler output into a single line
29113    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29114        $SED -e 's/ *[Uu]sage:.*//'`
29115    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29116        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29117  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29118    # xlc -qversion output typically looks like
29119    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29120    #     Version: 11.01.0000.0015
29121    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29122    # Check that this is likely to be the IBM XL C compiler.
29123    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29124    if test $? -ne 0; then
29125      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29126      { $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
29127$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29128      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29129$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29130      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29131$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29132      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29133    fi
29134    # Collapse compiler output into a single line
29135    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29136    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29137        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29138  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29139    # There is no specific version flag, but all output starts with a version string.
29140    # First line typically looks something like:
29141    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29142    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29143    # Check that this is likely to be Microsoft CL.EXE.
29144    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29145    if test $? -ne 0; then
29146      { $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
29147$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29148      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29149$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29150      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29151    fi
29152    # Collapse compiler output into a single line
29153    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29154    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29155        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29156  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29157    # gcc --version output typically looks like
29158    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29159    #     Copyright (C) 2013 Free Software Foundation, Inc.
29160    #     This is free software; see the source for copying conditions.  There is NO
29161    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29162    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29163    # Check that this is likely to be GCC.
29164    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29165    if test $? -ne 0; then
29166      { $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
29167$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29168      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29169$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29170      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29171    fi
29172    # Remove Copyright and legalese from version string, and
29173    # collapse into a single line
29174    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29175        $SED -e 's/ *Copyright .*//'`
29176    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29177        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29178  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29179    # clang --version output typically looks like
29180    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29181    #    clang version 3.3 (tags/RELEASE_33/final)
29182    # or
29183    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29184    #    Target: x86_64-pc-linux-gnu
29185    #    Thread model: posix
29186    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29187    # Check that this is likely to be clang
29188    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29189    if test $? -ne 0; then
29190      { $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
29191$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29192      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29193$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29194      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29195    fi
29196    # Collapse compiler output into a single line
29197    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29198    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29199        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29200  else
29201      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29202  fi
29203  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29204  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29205  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29206  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29207
29208  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29209$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29210
29211
29212  # Now that we have resolved CC ourself, let autoconf have its go at it
29213  ac_ext=c
29214ac_cpp='$CPP $CPPFLAGS'
29215ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29216ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29217ac_compiler_gnu=$ac_cv_c_compiler_gnu
29218if test -n "$ac_tool_prefix"; then
29219  for ac_prog in $CC
29220  do
29221    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29222set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29224$as_echo_n "checking for $ac_word... " >&6; }
29225if ${ac_cv_prog_CC+:} false; then :
29226  $as_echo_n "(cached) " >&6
29227else
29228  if test -n "$CC"; then
29229  ac_cv_prog_CC="$CC" # Let the user override the test.
29230else
29231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29232for as_dir in $PATH
29233do
29234  IFS=$as_save_IFS
29235  test -z "$as_dir" && as_dir=.
29236    for ac_exec_ext in '' $ac_executable_extensions; do
29237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29238    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29240    break 2
29241  fi
29242done
29243  done
29244IFS=$as_save_IFS
29245
29246fi
29247fi
29248CC=$ac_cv_prog_CC
29249if test -n "$CC"; then
29250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29251$as_echo "$CC" >&6; }
29252else
29253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29254$as_echo "no" >&6; }
29255fi
29256
29257
29258    test -n "$CC" && break
29259  done
29260fi
29261if test -z "$CC"; then
29262  ac_ct_CC=$CC
29263  for ac_prog in $CC
29264do
29265  # Extract the first word of "$ac_prog", so it can be a program name with args.
29266set dummy $ac_prog; ac_word=$2
29267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29268$as_echo_n "checking for $ac_word... " >&6; }
29269if ${ac_cv_prog_ac_ct_CC+:} false; then :
29270  $as_echo_n "(cached) " >&6
29271else
29272  if test -n "$ac_ct_CC"; then
29273  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29274else
29275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29276for as_dir in $PATH
29277do
29278  IFS=$as_save_IFS
29279  test -z "$as_dir" && as_dir=.
29280    for ac_exec_ext in '' $ac_executable_extensions; do
29281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29282    ac_cv_prog_ac_ct_CC="$ac_prog"
29283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29284    break 2
29285  fi
29286done
29287  done
29288IFS=$as_save_IFS
29289
29290fi
29291fi
29292ac_ct_CC=$ac_cv_prog_ac_ct_CC
29293if test -n "$ac_ct_CC"; then
29294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29295$as_echo "$ac_ct_CC" >&6; }
29296else
29297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29298$as_echo "no" >&6; }
29299fi
29300
29301
29302  test -n "$ac_ct_CC" && break
29303done
29304
29305  if test "x$ac_ct_CC" = x; then
29306    CC=""
29307  else
29308    case $cross_compiling:$ac_tool_warned in
29309yes:)
29310{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29311$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29312ac_tool_warned=yes ;;
29313esac
29314    CC=$ac_ct_CC
29315  fi
29316fi
29317
29318
29319test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29321as_fn_error $? "no acceptable C compiler found in \$PATH
29322See \`config.log' for more details" "$LINENO" 5; }
29323
29324# Provide some information about the compiler.
29325$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29326set X $ac_compile
29327ac_compiler=$2
29328for ac_option in --version -v -V -qversion; do
29329  { { ac_try="$ac_compiler $ac_option >&5"
29330case "(($ac_try" in
29331  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29332  *) ac_try_echo=$ac_try;;
29333esac
29334eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29335$as_echo "$ac_try_echo"; } >&5
29336  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29337  ac_status=$?
29338  if test -s conftest.err; then
29339    sed '10a\
29340... rest of stderr output deleted ...
29341         10q' conftest.err >conftest.er1
29342    cat conftest.er1 >&5
29343  fi
29344  rm -f conftest.er1 conftest.err
29345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29346  test $ac_status = 0; }
29347done
29348
29349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29350/* end confdefs.h.  */
29351
29352int
29353main ()
29354{
29355
29356  ;
29357  return 0;
29358}
29359_ACEOF
29360ac_clean_files_save=$ac_clean_files
29361ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29362# Try to create an executable without -o first, disregard a.out.
29363# It will help us diagnose broken compilers, and finding out an intuition
29364# of exeext.
29365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29366$as_echo_n "checking whether the C compiler works... " >&6; }
29367ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29368
29369# The possible output files:
29370ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29371
29372ac_rmfiles=
29373for ac_file in $ac_files
29374do
29375  case $ac_file in
29376    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29377    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29378  esac
29379done
29380rm -f $ac_rmfiles
29381
29382if { { ac_try="$ac_link_default"
29383case "(($ac_try" in
29384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29385  *) ac_try_echo=$ac_try;;
29386esac
29387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29388$as_echo "$ac_try_echo"; } >&5
29389  (eval "$ac_link_default") 2>&5
29390  ac_status=$?
29391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29392  test $ac_status = 0; }; then :
29393  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29394# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29395# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29396# so that the user can short-circuit this test for compilers unknown to
29397# Autoconf.
29398for ac_file in $ac_files ''
29399do
29400  test -f "$ac_file" || continue
29401  case $ac_file in
29402    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29403	;;
29404    [ab].out )
29405	# We found the default executable, but exeext='' is most
29406	# certainly right.
29407	break;;
29408    *.* )
29409	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29410	then :; else
29411	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29412	fi
29413	# We set ac_cv_exeext here because the later test for it is not
29414	# safe: cross compilers may not add the suffix if given an `-o'
29415	# argument, so we may need to know it at that point already.
29416	# Even if this section looks crufty: it has the advantage of
29417	# actually working.
29418	break;;
29419    * )
29420	break;;
29421  esac
29422done
29423test "$ac_cv_exeext" = no && ac_cv_exeext=
29424
29425else
29426  ac_file=''
29427fi
29428if test -z "$ac_file"; then :
29429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29430$as_echo "no" >&6; }
29431$as_echo "$as_me: failed program was:" >&5
29432sed 's/^/| /' conftest.$ac_ext >&5
29433
29434{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29436as_fn_error 77 "C compiler cannot create executables
29437See \`config.log' for more details" "$LINENO" 5; }
29438else
29439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29440$as_echo "yes" >&6; }
29441fi
29442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29443$as_echo_n "checking for C compiler default output file name... " >&6; }
29444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29445$as_echo "$ac_file" >&6; }
29446ac_exeext=$ac_cv_exeext
29447
29448rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29449ac_clean_files=$ac_clean_files_save
29450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29451$as_echo_n "checking for suffix of executables... " >&6; }
29452if { { ac_try="$ac_link"
29453case "(($ac_try" in
29454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29455  *) ac_try_echo=$ac_try;;
29456esac
29457eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29458$as_echo "$ac_try_echo"; } >&5
29459  (eval "$ac_link") 2>&5
29460  ac_status=$?
29461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29462  test $ac_status = 0; }; then :
29463  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29464# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29465# work properly (i.e., refer to `conftest.exe'), while it won't with
29466# `rm'.
29467for ac_file in conftest.exe conftest conftest.*; do
29468  test -f "$ac_file" || continue
29469  case $ac_file in
29470    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29471    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29472	  break;;
29473    * ) break;;
29474  esac
29475done
29476else
29477  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29479as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29480See \`config.log' for more details" "$LINENO" 5; }
29481fi
29482rm -f conftest conftest$ac_cv_exeext
29483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29484$as_echo "$ac_cv_exeext" >&6; }
29485
29486rm -f conftest.$ac_ext
29487EXEEXT=$ac_cv_exeext
29488ac_exeext=$EXEEXT
29489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29490/* end confdefs.h.  */
29491#include <stdio.h>
29492int
29493main ()
29494{
29495FILE *f = fopen ("conftest.out", "w");
29496 return ferror (f) || fclose (f) != 0;
29497
29498  ;
29499  return 0;
29500}
29501_ACEOF
29502ac_clean_files="$ac_clean_files conftest.out"
29503# Check that the compiler produces executables we can run.  If not, either
29504# the compiler is broken, or we cross compile.
29505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29506$as_echo_n "checking whether we are cross compiling... " >&6; }
29507if test "$cross_compiling" != yes; then
29508  { { ac_try="$ac_link"
29509case "(($ac_try" in
29510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29511  *) ac_try_echo=$ac_try;;
29512esac
29513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29514$as_echo "$ac_try_echo"; } >&5
29515  (eval "$ac_link") 2>&5
29516  ac_status=$?
29517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29518  test $ac_status = 0; }
29519  if { ac_try='./conftest$ac_cv_exeext'
29520  { { case "(($ac_try" in
29521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29522  *) ac_try_echo=$ac_try;;
29523esac
29524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29525$as_echo "$ac_try_echo"; } >&5
29526  (eval "$ac_try") 2>&5
29527  ac_status=$?
29528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29529  test $ac_status = 0; }; }; then
29530    cross_compiling=no
29531  else
29532    if test "$cross_compiling" = maybe; then
29533	cross_compiling=yes
29534    else
29535	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29537as_fn_error $? "cannot run C compiled programs.
29538If you meant to cross compile, use \`--host'.
29539See \`config.log' for more details" "$LINENO" 5; }
29540    fi
29541  fi
29542fi
29543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29544$as_echo "$cross_compiling" >&6; }
29545
29546rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29547ac_clean_files=$ac_clean_files_save
29548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29549$as_echo_n "checking for suffix of object files... " >&6; }
29550if ${ac_cv_objext+:} false; then :
29551  $as_echo_n "(cached) " >&6
29552else
29553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29554/* end confdefs.h.  */
29555
29556int
29557main ()
29558{
29559
29560  ;
29561  return 0;
29562}
29563_ACEOF
29564rm -f conftest.o conftest.obj
29565if { { ac_try="$ac_compile"
29566case "(($ac_try" in
29567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29568  *) ac_try_echo=$ac_try;;
29569esac
29570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29571$as_echo "$ac_try_echo"; } >&5
29572  (eval "$ac_compile") 2>&5
29573  ac_status=$?
29574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29575  test $ac_status = 0; }; then :
29576  for ac_file in conftest.o conftest.obj conftest.*; do
29577  test -f "$ac_file" || continue;
29578  case $ac_file in
29579    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29580    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29581       break;;
29582  esac
29583done
29584else
29585  $as_echo "$as_me: failed program was:" >&5
29586sed 's/^/| /' conftest.$ac_ext >&5
29587
29588{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29590as_fn_error $? "cannot compute suffix of object files: cannot compile
29591See \`config.log' for more details" "$LINENO" 5; }
29592fi
29593rm -f conftest.$ac_cv_objext conftest.$ac_ext
29594fi
29595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29596$as_echo "$ac_cv_objext" >&6; }
29597OBJEXT=$ac_cv_objext
29598ac_objext=$OBJEXT
29599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29600$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29601if ${ac_cv_c_compiler_gnu+:} false; then :
29602  $as_echo_n "(cached) " >&6
29603else
29604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29605/* end confdefs.h.  */
29606
29607int
29608main ()
29609{
29610#ifndef __GNUC__
29611       choke me
29612#endif
29613
29614  ;
29615  return 0;
29616}
29617_ACEOF
29618if ac_fn_c_try_compile "$LINENO"; then :
29619  ac_compiler_gnu=yes
29620else
29621  ac_compiler_gnu=no
29622fi
29623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29624ac_cv_c_compiler_gnu=$ac_compiler_gnu
29625
29626fi
29627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29628$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29629if test $ac_compiler_gnu = yes; then
29630  GCC=yes
29631else
29632  GCC=
29633fi
29634ac_test_CFLAGS=${CFLAGS+set}
29635ac_save_CFLAGS=$CFLAGS
29636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29637$as_echo_n "checking whether $CC accepts -g... " >&6; }
29638if ${ac_cv_prog_cc_g+:} false; then :
29639  $as_echo_n "(cached) " >&6
29640else
29641  ac_save_c_werror_flag=$ac_c_werror_flag
29642   ac_c_werror_flag=yes
29643   ac_cv_prog_cc_g=no
29644   CFLAGS="-g"
29645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29646/* end confdefs.h.  */
29647
29648int
29649main ()
29650{
29651
29652  ;
29653  return 0;
29654}
29655_ACEOF
29656if ac_fn_c_try_compile "$LINENO"; then :
29657  ac_cv_prog_cc_g=yes
29658else
29659  CFLAGS=""
29660      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29661/* end confdefs.h.  */
29662
29663int
29664main ()
29665{
29666
29667  ;
29668  return 0;
29669}
29670_ACEOF
29671if ac_fn_c_try_compile "$LINENO"; then :
29672
29673else
29674  ac_c_werror_flag=$ac_save_c_werror_flag
29675	 CFLAGS="-g"
29676	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29677/* end confdefs.h.  */
29678
29679int
29680main ()
29681{
29682
29683  ;
29684  return 0;
29685}
29686_ACEOF
29687if ac_fn_c_try_compile "$LINENO"; then :
29688  ac_cv_prog_cc_g=yes
29689fi
29690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29691fi
29692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29693fi
29694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29695   ac_c_werror_flag=$ac_save_c_werror_flag
29696fi
29697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29698$as_echo "$ac_cv_prog_cc_g" >&6; }
29699if test "$ac_test_CFLAGS" = set; then
29700  CFLAGS=$ac_save_CFLAGS
29701elif test $ac_cv_prog_cc_g = yes; then
29702  if test "$GCC" = yes; then
29703    CFLAGS="-g -O2"
29704  else
29705    CFLAGS="-g"
29706  fi
29707else
29708  if test "$GCC" = yes; then
29709    CFLAGS="-O2"
29710  else
29711    CFLAGS=
29712  fi
29713fi
29714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29715$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29716if ${ac_cv_prog_cc_c89+:} false; then :
29717  $as_echo_n "(cached) " >&6
29718else
29719  ac_cv_prog_cc_c89=no
29720ac_save_CC=$CC
29721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29722/* end confdefs.h.  */
29723#include <stdarg.h>
29724#include <stdio.h>
29725struct stat;
29726/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29727struct buf { int x; };
29728FILE * (*rcsopen) (struct buf *, struct stat *, int);
29729static char *e (p, i)
29730     char **p;
29731     int i;
29732{
29733  return p[i];
29734}
29735static char *f (char * (*g) (char **, int), char **p, ...)
29736{
29737  char *s;
29738  va_list v;
29739  va_start (v,p);
29740  s = g (p, va_arg (v,int));
29741  va_end (v);
29742  return s;
29743}
29744
29745/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29746   function prototypes and stuff, but not '\xHH' hex character constants.
29747   These don't provoke an error unfortunately, instead are silently treated
29748   as 'x'.  The following induces an error, until -std is added to get
29749   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29750   array size at least.  It's necessary to write '\x00'==0 to get something
29751   that's true only with -std.  */
29752int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29753
29754/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29755   inside strings and character constants.  */
29756#define FOO(x) 'x'
29757int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29758
29759int test (int i, double x);
29760struct s1 {int (*f) (int a);};
29761struct s2 {int (*f) (double a);};
29762int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29763int argc;
29764char **argv;
29765int
29766main ()
29767{
29768return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29769  ;
29770  return 0;
29771}
29772_ACEOF
29773for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29774	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29775do
29776  CC="$ac_save_CC $ac_arg"
29777  if ac_fn_c_try_compile "$LINENO"; then :
29778  ac_cv_prog_cc_c89=$ac_arg
29779fi
29780rm -f core conftest.err conftest.$ac_objext
29781  test "x$ac_cv_prog_cc_c89" != "xno" && break
29782done
29783rm -f conftest.$ac_ext
29784CC=$ac_save_CC
29785
29786fi
29787# AC_CACHE_VAL
29788case "x$ac_cv_prog_cc_c89" in
29789  x)
29790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29791$as_echo "none needed" >&6; } ;;
29792  xno)
29793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29794$as_echo "unsupported" >&6; } ;;
29795  *)
29796    CC="$CC $ac_cv_prog_cc_c89"
29797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29798$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29799esac
29800if test "x$ac_cv_prog_cc_c89" != xno; then :
29801
29802fi
29803
29804ac_ext=cpp
29805ac_cpp='$CXXCPP $CPPFLAGS'
29806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29809
29810
29811
29812  COMPILER_NAME=C++
29813  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29814
29815  if test "x$CXX" != x; then
29816    # User has supplied compiler name already, always let that override.
29817    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29818$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29819    if test "x`basename $CXX`" = "x$CXX"; then
29820      # A command without a complete path is provided, search $PATH.
29821
29822      for ac_prog in $CXX
29823do
29824  # Extract the first word of "$ac_prog", so it can be a program name with args.
29825set dummy $ac_prog; ac_word=$2
29826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29827$as_echo_n "checking for $ac_word... " >&6; }
29828if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29829  $as_echo_n "(cached) " >&6
29830else
29831  case $POTENTIAL_CXX in
29832  [\\/]* | ?:[\\/]*)
29833  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29834  ;;
29835  *)
29836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29837for as_dir in $PATH
29838do
29839  IFS=$as_save_IFS
29840  test -z "$as_dir" && as_dir=.
29841    for ac_exec_ext in '' $ac_executable_extensions; do
29842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29843    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29845    break 2
29846  fi
29847done
29848  done
29849IFS=$as_save_IFS
29850
29851  ;;
29852esac
29853fi
29854POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29855if test -n "$POTENTIAL_CXX"; then
29856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29857$as_echo "$POTENTIAL_CXX" >&6; }
29858else
29859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29860$as_echo "no" >&6; }
29861fi
29862
29863
29864  test -n "$POTENTIAL_CXX" && break
29865done
29866
29867      if test "x$POTENTIAL_CXX" != x; then
29868        CXX=$POTENTIAL_CXX
29869      else
29870        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29871      fi
29872    else
29873      # Otherwise it might already be a complete path
29874      if test ! -x "$CXX"; then
29875        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29876      fi
29877    fi
29878  else
29879    # No user supplied value. Locate compiler ourselves.
29880
29881    # If we are cross compiling, assume cross compilation tools follows the
29882    # cross compilation standard where they are prefixed with the autoconf
29883    # standard name for the target. For example the binary
29884    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29885    # If we are not cross compiling, then the default compiler name will be
29886    # used.
29887
29888    CXX=
29889    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29890    # before checking the rest of the PATH.
29891    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29892    # step, this should not be necessary.
29893    if test -n "$TOOLCHAIN_PATH"; then
29894      PATH_save="$PATH"
29895      PATH="$TOOLCHAIN_PATH"
29896      for ac_prog in $SEARCH_LIST
29897do
29898  # Extract the first word of "$ac_prog", so it can be a program name with args.
29899set dummy $ac_prog; ac_word=$2
29900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29901$as_echo_n "checking for $ac_word... " >&6; }
29902if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29903  $as_echo_n "(cached) " >&6
29904else
29905  case $TOOLCHAIN_PATH_CXX in
29906  [\\/]* | ?:[\\/]*)
29907  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29908  ;;
29909  *)
29910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29911for as_dir in $PATH
29912do
29913  IFS=$as_save_IFS
29914  test -z "$as_dir" && as_dir=.
29915    for ac_exec_ext in '' $ac_executable_extensions; do
29916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29917    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29919    break 2
29920  fi
29921done
29922  done
29923IFS=$as_save_IFS
29924
29925  ;;
29926esac
29927fi
29928TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29929if test -n "$TOOLCHAIN_PATH_CXX"; then
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29931$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29932else
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29934$as_echo "no" >&6; }
29935fi
29936
29937
29938  test -n "$TOOLCHAIN_PATH_CXX" && break
29939done
29940
29941      CXX=$TOOLCHAIN_PATH_CXX
29942      PATH="$PATH_save"
29943    fi
29944
29945    # AC_PATH_PROGS can't be run multiple times with the same variable,
29946    # so create a new name for this run.
29947    if test "x$CXX" = x; then
29948      for ac_prog in $SEARCH_LIST
29949do
29950  # Extract the first word of "$ac_prog", so it can be a program name with args.
29951set dummy $ac_prog; ac_word=$2
29952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29953$as_echo_n "checking for $ac_word... " >&6; }
29954if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29955  $as_echo_n "(cached) " >&6
29956else
29957  case $POTENTIAL_CXX in
29958  [\\/]* | ?:[\\/]*)
29959  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29960  ;;
29961  *)
29962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29963for as_dir in $PATH
29964do
29965  IFS=$as_save_IFS
29966  test -z "$as_dir" && as_dir=.
29967    for ac_exec_ext in '' $ac_executable_extensions; do
29968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29969    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29971    break 2
29972  fi
29973done
29974  done
29975IFS=$as_save_IFS
29976
29977  ;;
29978esac
29979fi
29980POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29981if test -n "$POTENTIAL_CXX"; then
29982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29983$as_echo "$POTENTIAL_CXX" >&6; }
29984else
29985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29986$as_echo "no" >&6; }
29987fi
29988
29989
29990  test -n "$POTENTIAL_CXX" && break
29991done
29992
29993      CXX=$POTENTIAL_CXX
29994    fi
29995
29996    if test "x$CXX" = x; then
29997
29998  # Print a helpful message on how to acquire the necessary build dependency.
29999  # devkit is the help tag: freetype, cups, pulse, alsa etc
30000  MISSING_DEPENDENCY=devkit
30001
30002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30003    cygwin_help $MISSING_DEPENDENCY
30004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30005    msys_help $MISSING_DEPENDENCY
30006  else
30007    PKGHANDLER_COMMAND=
30008
30009    case $PKGHANDLER in
30010      apt-get)
30011        apt_help     $MISSING_DEPENDENCY ;;
30012      yum)
30013        yum_help     $MISSING_DEPENDENCY ;;
30014      port)
30015        port_help    $MISSING_DEPENDENCY ;;
30016      pkgutil)
30017        pkgutil_help $MISSING_DEPENDENCY ;;
30018      pkgadd)
30019        pkgadd_help  $MISSING_DEPENDENCY ;;
30020    esac
30021
30022    if test "x$PKGHANDLER_COMMAND" != x; then
30023      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30024    fi
30025  fi
30026
30027      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30028    fi
30029  fi
30030
30031  # Now we have a compiler binary in CXX. Make sure it's okay.
30032
30033  # Only process if variable expands to non-empty
30034
30035  if test "x$CXX" != x; then
30036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30037
30038  # First separate the path from the arguments. This will split at the first
30039  # space.
30040  complete="$CXX"
30041  path="${complete%% *}"
30042  tmp="$complete EOL"
30043  arguments="${tmp#* }"
30044
30045  # Input might be given as Windows format, start by converting to
30046  # unix format.
30047  new_path=`$CYGPATH -u "$path"`
30048
30049  # Now try to locate executable using which
30050  new_path=`$WHICH "$new_path" 2> /dev/null`
30051  # bat and cmd files are not always considered executable in cygwin causing which
30052  # to not find them
30053  if test "x$new_path" = x \
30054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30056    new_path=`$CYGPATH -u "$path"`
30057  fi
30058  if test "x$new_path" = x; then
30059    # Oops. Which didn't find the executable.
30060    # The splitting of arguments from the executable at a space might have been incorrect,
30061    # since paths with space are more likely in Windows. Give it another try with the whole
30062    # argument.
30063    path="$complete"
30064    arguments="EOL"
30065    new_path=`$CYGPATH -u "$path"`
30066    new_path=`$WHICH "$new_path" 2> /dev/null`
30067    # bat and cmd files are not always considered executable in cygwin causing which
30068    # to not find them
30069    if test "x$new_path" = x \
30070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30072      new_path=`$CYGPATH -u "$path"`
30073    fi
30074    if test "x$new_path" = x; then
30075      # It's still not found. Now this is an unrecoverable error.
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30077$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30078      has_space=`$ECHO "$complete" | $GREP " "`
30079      if test "x$has_space" != x; then
30080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30082      fi
30083      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30084    fi
30085  fi
30086
30087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30090  # "foo.exe" is OK but "foo" is an error.
30091  #
30092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30093  # It is also a way to make sure we got the proper file name for the real test later on.
30094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30095  if test "x$test_shortpath" = x; then
30096    # Short path failed, file does not exist as specified.
30097    # Try adding .exe or .cmd
30098    if test -f "${new_path}.exe"; then
30099      input_to_shortpath="${new_path}.exe"
30100    elif test -f "${new_path}.cmd"; then
30101      input_to_shortpath="${new_path}.cmd"
30102    else
30103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30104$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30107      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30108    fi
30109  else
30110    input_to_shortpath="$new_path"
30111  fi
30112
30113  # Call helper function which possibly converts this using DOS-style short mode.
30114  # If so, the updated path is stored in $new_path.
30115  new_path="$input_to_shortpath"
30116
30117  input_path="$input_to_shortpath"
30118  # Check if we need to convert this using DOS-style short mode. If the path
30119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30120  # take no chances and rewrite it.
30121  # Note: m4 eats our [], so we need to use [ and ] instead.
30122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30123  if test "x$has_forbidden_chars" != x; then
30124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30128      # Going to short mode and back again did indeed matter. Since short mode is
30129      # case insensitive, let's make it lowercase to improve readability.
30130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30131      # Now convert it back to Unix-stile (cygpath)
30132      input_path=`$CYGPATH -u "$shortmode_path"`
30133      new_path="$input_path"
30134    fi
30135  fi
30136
30137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30138  if test "x$test_cygdrive_prefix" = x; then
30139    # As a simple fix, exclude /usr/bin since it's not a real path.
30140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30142      # a path prefixed by /cygdrive for fixpath to work.
30143      new_path="$CYGWIN_ROOT_PATH$input_path"
30144    fi
30145  fi
30146
30147  # remove trailing .exe if any
30148  new_path="${new_path/%.exe/}"
30149
30150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30151
30152  # First separate the path from the arguments. This will split at the first
30153  # space.
30154  complete="$CXX"
30155  path="${complete%% *}"
30156  tmp="$complete EOL"
30157  arguments="${tmp#* }"
30158
30159  # Input might be given as Windows format, start by converting to
30160  # unix format.
30161  new_path="$path"
30162
30163  windows_path="$new_path"
30164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30165    unix_path=`$CYGPATH -u "$windows_path"`
30166    new_path="$unix_path"
30167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30169    new_path="$unix_path"
30170  fi
30171
30172
30173  # Now try to locate executable using which
30174  new_path=`$WHICH "$new_path" 2> /dev/null`
30175
30176  if test "x$new_path" = x; then
30177    # Oops. Which didn't find the executable.
30178    # The splitting of arguments from the executable at a space might have been incorrect,
30179    # since paths with space are more likely in Windows. Give it another try with the whole
30180    # argument.
30181    path="$complete"
30182    arguments="EOL"
30183    new_path="$path"
30184
30185  windows_path="$new_path"
30186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30187    unix_path=`$CYGPATH -u "$windows_path"`
30188    new_path="$unix_path"
30189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30191    new_path="$unix_path"
30192  fi
30193
30194
30195    new_path=`$WHICH "$new_path" 2> /dev/null`
30196    # bat and cmd files are not always considered executable in MSYS causing which
30197    # to not find them
30198    if test "x$new_path" = x \
30199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30201      new_path="$path"
30202
30203  windows_path="$new_path"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    new_path="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    new_path="$unix_path"
30210  fi
30211
30212    fi
30213
30214    if test "x$new_path" = x; then
30215      # It's still not found. Now this is an unrecoverable error.
30216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30217$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30218      has_space=`$ECHO "$complete" | $GREP " "`
30219      if test "x$has_space" != x; then
30220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30222      fi
30223      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30224    fi
30225  fi
30226
30227  # Now new_path has a complete unix path to the binary
30228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30229    # Keep paths in /bin as-is, but remove trailing .exe if any
30230    new_path="${new_path/%.exe/}"
30231    # Do not save /bin paths to all_fixpath_prefixes!
30232  else
30233    # Not in mixed or Windows style, start by that.
30234    new_path=`cmd //c echo $new_path`
30235
30236  input_path="$new_path"
30237  # Check if we need to convert this using DOS-style short mode. If the path
30238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30239  # take no chances and rewrite it.
30240  # Note: m4 eats our [], so we need to use [ and ] instead.
30241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30242  if test "x$has_forbidden_chars" != x; then
30243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30245  fi
30246
30247    # Output is in $new_path
30248
30249  windows_path="$new_path"
30250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30251    unix_path=`$CYGPATH -u "$windows_path"`
30252    new_path="$unix_path"
30253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30255    new_path="$unix_path"
30256  fi
30257
30258    # remove trailing .exe if any
30259    new_path="${new_path/%.exe/}"
30260
30261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30263  fi
30264
30265    else
30266      # We're on a unix platform. Hooray! :)
30267      # First separate the path from the arguments. This will split at the first
30268      # space.
30269      complete="$CXX"
30270      path="${complete%% *}"
30271      tmp="$complete EOL"
30272      arguments="${tmp#* }"
30273
30274      # Cannot rely on the command "which" here since it doesn't always work.
30275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30276      if test -z "$is_absolute_path"; then
30277        # Path to executable is not absolute. Find it.
30278        IFS_save="$IFS"
30279        IFS=:
30280        for p in $PATH; do
30281          if test -f "$p/$path" && test -x "$p/$path"; then
30282            new_path="$p/$path"
30283            break
30284          fi
30285        done
30286        IFS="$IFS_save"
30287      else
30288        # This is an absolute path, we can use it without further modifications.
30289        new_path="$path"
30290      fi
30291
30292      if test "x$new_path" = x; then
30293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30294$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30295        has_space=`$ECHO "$complete" | $GREP " "`
30296        if test "x$has_space" != x; then
30297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30299        fi
30300        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30301      fi
30302    fi
30303
30304    # Now join together the path and the arguments once again
30305    if test "x$arguments" != xEOL; then
30306      new_complete="$new_path ${arguments% *}"
30307    else
30308      new_complete="$new_path"
30309    fi
30310
30311    if test "x$complete" != "x$new_complete"; then
30312      CXX="$new_complete"
30313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30314$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30315    fi
30316  fi
30317
30318  TEST_COMPILER="$CXX"
30319  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30320  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30321  if test "x$OPENJDK_BUILD_OS" != xaix; then
30322    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30324$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30325
30326  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30327    # Follow a chain of symbolic links. Use readlink
30328    # where it exists, else fall back to horribly
30329    # complicated shell code.
30330    if test "x$READLINK_TESTED" != yes; then
30331      # On MacOSX there is a readlink tool with a different
30332      # purpose than the GNU readlink tool. Check the found readlink.
30333      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30334      if test "x$ISGNU" = x; then
30335        # A readlink that we do not know how to use.
30336        # Are there other non-GNU readlinks out there?
30337        READLINK_TESTED=yes
30338        READLINK=
30339      fi
30340    fi
30341
30342    if test "x$READLINK" != x; then
30343      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30344    else
30345      # Save the current directory for restoring afterwards
30346      STARTDIR=$PWD
30347      COUNTER=0
30348      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30349      sym_link_file=`$BASENAME $TEST_COMPILER`
30350      cd $sym_link_dir
30351      # Use -P flag to resolve symlinks in directories.
30352      cd `$THEPWDCMD -P`
30353      sym_link_dir=`$THEPWDCMD -P`
30354      # Resolve file symlinks
30355      while test $COUNTER -lt 20; do
30356        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30357        if test "x$ISLINK" == x; then
30358          # This is not a symbolic link! We are done!
30359          break
30360        fi
30361        # Again resolve directory symlinks since the target of the just found
30362        # link could be in a different directory
30363        cd `$DIRNAME $ISLINK`
30364        sym_link_dir=`$THEPWDCMD -P`
30365        sym_link_file=`$BASENAME $ISLINK`
30366        let COUNTER=COUNTER+1
30367      done
30368      cd $STARTDIR
30369      TEST_COMPILER=$sym_link_dir/$sym_link_file
30370    fi
30371  fi
30372
30373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30374$as_echo "$TEST_COMPILER" >&6; }
30375  fi
30376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30377$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30378
30379  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30380  if test "x$COMPILER_BASENAME" = "xccache"; then
30381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30382$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30383    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30384    # We want to control ccache invocation ourselves, so ignore this cc and try
30385    # searching again.
30386
30387    # Remove the path to the fake ccache cc from the PATH
30388    RETRY_COMPILER_SAVED_PATH="$PATH"
30389    COMPILER_DIRNAME=`$DIRNAME $CXX`
30390    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30391
30392    # Try again looking for our compiler
30393    if test -n "$ac_tool_prefix"; then
30394  for ac_prog in $TOOLCHAIN_CXX_BINARY
30395  do
30396    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30397set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30399$as_echo_n "checking for $ac_word... " >&6; }
30400if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30401  $as_echo_n "(cached) " >&6
30402else
30403  if test -n "$PROPER_COMPILER_CXX"; then
30404  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30405else
30406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30407for as_dir in $PATH
30408do
30409  IFS=$as_save_IFS
30410  test -z "$as_dir" && as_dir=.
30411    for ac_exec_ext in '' $ac_executable_extensions; do
30412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30413    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30415    break 2
30416  fi
30417done
30418  done
30419IFS=$as_save_IFS
30420
30421fi
30422fi
30423PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30424if test -n "$PROPER_COMPILER_CXX"; then
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30426$as_echo "$PROPER_COMPILER_CXX" >&6; }
30427else
30428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30429$as_echo "no" >&6; }
30430fi
30431
30432
30433    test -n "$PROPER_COMPILER_CXX" && break
30434  done
30435fi
30436if test -z "$PROPER_COMPILER_CXX"; then
30437  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30438  for ac_prog in $TOOLCHAIN_CXX_BINARY
30439do
30440  # Extract the first word of "$ac_prog", so it can be a program name with args.
30441set dummy $ac_prog; ac_word=$2
30442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30443$as_echo_n "checking for $ac_word... " >&6; }
30444if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30445  $as_echo_n "(cached) " >&6
30446else
30447  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30448  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30449else
30450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30451for as_dir in $PATH
30452do
30453  IFS=$as_save_IFS
30454  test -z "$as_dir" && as_dir=.
30455    for ac_exec_ext in '' $ac_executable_extensions; do
30456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30457    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30459    break 2
30460  fi
30461done
30462  done
30463IFS=$as_save_IFS
30464
30465fi
30466fi
30467ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30468if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30470$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30471else
30472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30473$as_echo "no" >&6; }
30474fi
30475
30476
30477  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30478done
30479
30480  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30481    PROPER_COMPILER_CXX=""
30482  else
30483    case $cross_compiling:$ac_tool_warned in
30484yes:)
30485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30487ac_tool_warned=yes ;;
30488esac
30489    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30490  fi
30491fi
30492
30493
30494  # Only process if variable expands to non-empty
30495
30496  if test "x$PROPER_COMPILER_CXX" != x; then
30497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30498
30499  # First separate the path from the arguments. This will split at the first
30500  # space.
30501  complete="$PROPER_COMPILER_CXX"
30502  path="${complete%% *}"
30503  tmp="$complete EOL"
30504  arguments="${tmp#* }"
30505
30506  # Input might be given as Windows format, start by converting to
30507  # unix format.
30508  new_path=`$CYGPATH -u "$path"`
30509
30510  # Now try to locate executable using which
30511  new_path=`$WHICH "$new_path" 2> /dev/null`
30512  # bat and cmd files are not always considered executable in cygwin causing which
30513  # to not find them
30514  if test "x$new_path" = x \
30515      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30516      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30517    new_path=`$CYGPATH -u "$path"`
30518  fi
30519  if test "x$new_path" = x; then
30520    # Oops. Which didn't find the executable.
30521    # The splitting of arguments from the executable at a space might have been incorrect,
30522    # since paths with space are more likely in Windows. Give it another try with the whole
30523    # argument.
30524    path="$complete"
30525    arguments="EOL"
30526    new_path=`$CYGPATH -u "$path"`
30527    new_path=`$WHICH "$new_path" 2> /dev/null`
30528    # bat and cmd files are not always considered executable in cygwin causing which
30529    # to not find them
30530    if test "x$new_path" = x \
30531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30533      new_path=`$CYGPATH -u "$path"`
30534    fi
30535    if test "x$new_path" = x; then
30536      # It's still not found. Now this is an unrecoverable error.
30537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30538$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30539      has_space=`$ECHO "$complete" | $GREP " "`
30540      if test "x$has_space" != x; then
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30543      fi
30544      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30545    fi
30546  fi
30547
30548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30551  # "foo.exe" is OK but "foo" is an error.
30552  #
30553  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30554  # It is also a way to make sure we got the proper file name for the real test later on.
30555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30556  if test "x$test_shortpath" = x; then
30557    # Short path failed, file does not exist as specified.
30558    # Try adding .exe or .cmd
30559    if test -f "${new_path}.exe"; then
30560      input_to_shortpath="${new_path}.exe"
30561    elif test -f "${new_path}.cmd"; then
30562      input_to_shortpath="${new_path}.cmd"
30563    else
30564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30565$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30566      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30567$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30568      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30569    fi
30570  else
30571    input_to_shortpath="$new_path"
30572  fi
30573
30574  # Call helper function which possibly converts this using DOS-style short mode.
30575  # If so, the updated path is stored in $new_path.
30576  new_path="$input_to_shortpath"
30577
30578  input_path="$input_to_shortpath"
30579  # Check if we need to convert this using DOS-style short mode. If the path
30580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30581  # take no chances and rewrite it.
30582  # Note: m4 eats our [], so we need to use [ and ] instead.
30583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30584  if test "x$has_forbidden_chars" != x; then
30585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30589      # Going to short mode and back again did indeed matter. Since short mode is
30590      # case insensitive, let's make it lowercase to improve readability.
30591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30592      # Now convert it back to Unix-stile (cygpath)
30593      input_path=`$CYGPATH -u "$shortmode_path"`
30594      new_path="$input_path"
30595    fi
30596  fi
30597
30598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30599  if test "x$test_cygdrive_prefix" = x; then
30600    # As a simple fix, exclude /usr/bin since it's not a real path.
30601    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30603      # a path prefixed by /cygdrive for fixpath to work.
30604      new_path="$CYGWIN_ROOT_PATH$input_path"
30605    fi
30606  fi
30607
30608  # remove trailing .exe if any
30609  new_path="${new_path/%.exe/}"
30610
30611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30612
30613  # First separate the path from the arguments. This will split at the first
30614  # space.
30615  complete="$PROPER_COMPILER_CXX"
30616  path="${complete%% *}"
30617  tmp="$complete EOL"
30618  arguments="${tmp#* }"
30619
30620  # Input might be given as Windows format, start by converting to
30621  # unix format.
30622  new_path="$path"
30623
30624  windows_path="$new_path"
30625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30626    unix_path=`$CYGPATH -u "$windows_path"`
30627    new_path="$unix_path"
30628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30630    new_path="$unix_path"
30631  fi
30632
30633
30634  # Now try to locate executable using which
30635  new_path=`$WHICH "$new_path" 2> /dev/null`
30636
30637  if test "x$new_path" = x; then
30638    # Oops. Which didn't find the executable.
30639    # The splitting of arguments from the executable at a space might have been incorrect,
30640    # since paths with space are more likely in Windows. Give it another try with the whole
30641    # argument.
30642    path="$complete"
30643    arguments="EOL"
30644    new_path="$path"
30645
30646  windows_path="$new_path"
30647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30648    unix_path=`$CYGPATH -u "$windows_path"`
30649    new_path="$unix_path"
30650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30652    new_path="$unix_path"
30653  fi
30654
30655
30656    new_path=`$WHICH "$new_path" 2> /dev/null`
30657    # bat and cmd files are not always considered executable in MSYS causing which
30658    # to not find them
30659    if test "x$new_path" = x \
30660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30662      new_path="$path"
30663
30664  windows_path="$new_path"
30665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30666    unix_path=`$CYGPATH -u "$windows_path"`
30667    new_path="$unix_path"
30668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30670    new_path="$unix_path"
30671  fi
30672
30673    fi
30674
30675    if test "x$new_path" = x; then
30676      # It's still not found. Now this is an unrecoverable error.
30677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30678$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30679      has_space=`$ECHO "$complete" | $GREP " "`
30680      if test "x$has_space" != x; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30683      fi
30684      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30685    fi
30686  fi
30687
30688  # Now new_path has a complete unix path to the binary
30689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30690    # Keep paths in /bin as-is, but remove trailing .exe if any
30691    new_path="${new_path/%.exe/}"
30692    # Do not save /bin paths to all_fixpath_prefixes!
30693  else
30694    # Not in mixed or Windows style, start by that.
30695    new_path=`cmd //c echo $new_path`
30696
30697  input_path="$new_path"
30698  # Check if we need to convert this using DOS-style short mode. If the path
30699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30700  # take no chances and rewrite it.
30701  # Note: m4 eats our [], so we need to use [ and ] instead.
30702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30703  if test "x$has_forbidden_chars" != x; then
30704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30706  fi
30707
30708    # Output is in $new_path
30709
30710  windows_path="$new_path"
30711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30712    unix_path=`$CYGPATH -u "$windows_path"`
30713    new_path="$unix_path"
30714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30716    new_path="$unix_path"
30717  fi
30718
30719    # remove trailing .exe if any
30720    new_path="${new_path/%.exe/}"
30721
30722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30724  fi
30725
30726    else
30727      # We're on a unix platform. Hooray! :)
30728      # First separate the path from the arguments. This will split at the first
30729      # space.
30730      complete="$PROPER_COMPILER_CXX"
30731      path="${complete%% *}"
30732      tmp="$complete EOL"
30733      arguments="${tmp#* }"
30734
30735      # Cannot rely on the command "which" here since it doesn't always work.
30736      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30737      if test -z "$is_absolute_path"; then
30738        # Path to executable is not absolute. Find it.
30739        IFS_save="$IFS"
30740        IFS=:
30741        for p in $PATH; do
30742          if test -f "$p/$path" && test -x "$p/$path"; then
30743            new_path="$p/$path"
30744            break
30745          fi
30746        done
30747        IFS="$IFS_save"
30748      else
30749        # This is an absolute path, we can use it without further modifications.
30750        new_path="$path"
30751      fi
30752
30753      if test "x$new_path" = x; then
30754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30755$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30756        has_space=`$ECHO "$complete" | $GREP " "`
30757        if test "x$has_space" != x; then
30758          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30760        fi
30761        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30762      fi
30763    fi
30764
30765    # Now join together the path and the arguments once again
30766    if test "x$arguments" != xEOL; then
30767      new_complete="$new_path ${arguments% *}"
30768    else
30769      new_complete="$new_path"
30770    fi
30771
30772    if test "x$complete" != "x$new_complete"; then
30773      PROPER_COMPILER_CXX="$new_complete"
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30775$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30776    fi
30777  fi
30778
30779    PATH="$RETRY_COMPILER_SAVED_PATH"
30780
30781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30782$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30783
30784  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30785    # Follow a chain of symbolic links. Use readlink
30786    # where it exists, else fall back to horribly
30787    # complicated shell code.
30788    if test "x$READLINK_TESTED" != yes; then
30789      # On MacOSX there is a readlink tool with a different
30790      # purpose than the GNU readlink tool. Check the found readlink.
30791      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30792      if test "x$ISGNU" = x; then
30793        # A readlink that we do not know how to use.
30794        # Are there other non-GNU readlinks out there?
30795        READLINK_TESTED=yes
30796        READLINK=
30797      fi
30798    fi
30799
30800    if test "x$READLINK" != x; then
30801      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30802    else
30803      # Save the current directory for restoring afterwards
30804      STARTDIR=$PWD
30805      COUNTER=0
30806      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30807      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30808      cd $sym_link_dir
30809      # Use -P flag to resolve symlinks in directories.
30810      cd `$THEPWDCMD -P`
30811      sym_link_dir=`$THEPWDCMD -P`
30812      # Resolve file symlinks
30813      while test $COUNTER -lt 20; do
30814        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30815        if test "x$ISLINK" == x; then
30816          # This is not a symbolic link! We are done!
30817          break
30818        fi
30819        # Again resolve directory symlinks since the target of the just found
30820        # link could be in a different directory
30821        cd `$DIRNAME $ISLINK`
30822        sym_link_dir=`$THEPWDCMD -P`
30823        sym_link_file=`$BASENAME $ISLINK`
30824        let COUNTER=COUNTER+1
30825      done
30826      cd $STARTDIR
30827      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30828    fi
30829  fi
30830
30831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30832$as_echo "$PROPER_COMPILER_CXX" >&6; }
30833    CXX="$PROPER_COMPILER_CXX"
30834  else
30835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30836$as_echo "no, keeping CXX" >&6; }
30837  fi
30838
30839
30840  COMPILER=$CXX
30841  COMPILER_NAME=$COMPILER_NAME
30842
30843  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30844    # cc -V output typically looks like
30845    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30846    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30847    # Check that this is likely to be the Solaris Studio cc.
30848    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30849    if test $? -ne 0; then
30850      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30851      { $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
30852$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30854$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30855      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30856$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30857      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30858    fi
30859    # Remove usage instructions (if present), and
30860    # collapse compiler output into a single line
30861    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30862        $SED -e 's/ *[Uu]sage:.*//'`
30863    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30864        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30865  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30866    # xlc -qversion output typically looks like
30867    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30868    #     Version: 11.01.0000.0015
30869    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30870    # Check that this is likely to be the IBM XL C compiler.
30871    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30872    if test $? -ne 0; then
30873      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30874      { $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
30875$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30876      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30877$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30878      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30879$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30880      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30881    fi
30882    # Collapse compiler output into a single line
30883    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30884    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30885        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30886  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30887    # There is no specific version flag, but all output starts with a version string.
30888    # First line typically looks something like:
30889    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30890    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30891    # Check that this is likely to be Microsoft CL.EXE.
30892    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30893    if test $? -ne 0; then
30894      { $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
30895$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30896      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30897$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30898      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30899    fi
30900    # Collapse compiler output into a single line
30901    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30902    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30903        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30904  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30905    # gcc --version output typically looks like
30906    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30907    #     Copyright (C) 2013 Free Software Foundation, Inc.
30908    #     This is free software; see the source for copying conditions.  There is NO
30909    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30910    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30911    # Check that this is likely to be GCC.
30912    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30913    if test $? -ne 0; then
30914      { $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
30915$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30916      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30917$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30918      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30919    fi
30920    # Remove Copyright and legalese from version string, and
30921    # collapse into a single line
30922    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30923        $SED -e 's/ *Copyright .*//'`
30924    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30925        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30926  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30927    # clang --version output typically looks like
30928    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30929    #    clang version 3.3 (tags/RELEASE_33/final)
30930    # or
30931    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30932    #    Target: x86_64-pc-linux-gnu
30933    #    Thread model: posix
30934    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30935    # Check that this is likely to be clang
30936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30937    if test $? -ne 0; then
30938      { $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
30939$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30941$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30943    fi
30944    # Collapse compiler output into a single line
30945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30947        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30948  else
30949      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30950  fi
30951  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30952  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30953  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30954  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30955
30956  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30957$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30958
30959
30960  # Now that we have resolved CXX ourself, let autoconf have its go at it
30961  ac_ext=cpp
30962ac_cpp='$CXXCPP $CPPFLAGS'
30963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30966if test -z "$CXX"; then
30967  if test -n "$CCC"; then
30968    CXX=$CCC
30969  else
30970    if test -n "$ac_tool_prefix"; then
30971  for ac_prog in $CXX
30972  do
30973    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30974set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30976$as_echo_n "checking for $ac_word... " >&6; }
30977if ${ac_cv_prog_CXX+:} false; then :
30978  $as_echo_n "(cached) " >&6
30979else
30980  if test -n "$CXX"; then
30981  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30982else
30983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30984for as_dir in $PATH
30985do
30986  IFS=$as_save_IFS
30987  test -z "$as_dir" && as_dir=.
30988    for ac_exec_ext in '' $ac_executable_extensions; do
30989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30990    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30992    break 2
30993  fi
30994done
30995  done
30996IFS=$as_save_IFS
30997
30998fi
30999fi
31000CXX=$ac_cv_prog_CXX
31001if test -n "$CXX"; then
31002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31003$as_echo "$CXX" >&6; }
31004else
31005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31006$as_echo "no" >&6; }
31007fi
31008
31009
31010    test -n "$CXX" && break
31011  done
31012fi
31013if test -z "$CXX"; then
31014  ac_ct_CXX=$CXX
31015  for ac_prog in $CXX
31016do
31017  # Extract the first word of "$ac_prog", so it can be a program name with args.
31018set dummy $ac_prog; ac_word=$2
31019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31020$as_echo_n "checking for $ac_word... " >&6; }
31021if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31022  $as_echo_n "(cached) " >&6
31023else
31024  if test -n "$ac_ct_CXX"; then
31025  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31026else
31027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31028for as_dir in $PATH
31029do
31030  IFS=$as_save_IFS
31031  test -z "$as_dir" && as_dir=.
31032    for ac_exec_ext in '' $ac_executable_extensions; do
31033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31034    ac_cv_prog_ac_ct_CXX="$ac_prog"
31035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31036    break 2
31037  fi
31038done
31039  done
31040IFS=$as_save_IFS
31041
31042fi
31043fi
31044ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31045if test -n "$ac_ct_CXX"; then
31046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31047$as_echo "$ac_ct_CXX" >&6; }
31048else
31049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31050$as_echo "no" >&6; }
31051fi
31052
31053
31054  test -n "$ac_ct_CXX" && break
31055done
31056
31057  if test "x$ac_ct_CXX" = x; then
31058    CXX="g++"
31059  else
31060    case $cross_compiling:$ac_tool_warned in
31061yes:)
31062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31064ac_tool_warned=yes ;;
31065esac
31066    CXX=$ac_ct_CXX
31067  fi
31068fi
31069
31070  fi
31071fi
31072# Provide some information about the compiler.
31073$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31074set X $ac_compile
31075ac_compiler=$2
31076for ac_option in --version -v -V -qversion; do
31077  { { ac_try="$ac_compiler $ac_option >&5"
31078case "(($ac_try" in
31079  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31080  *) ac_try_echo=$ac_try;;
31081esac
31082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31083$as_echo "$ac_try_echo"; } >&5
31084  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31085  ac_status=$?
31086  if test -s conftest.err; then
31087    sed '10a\
31088... rest of stderr output deleted ...
31089         10q' conftest.err >conftest.er1
31090    cat conftest.er1 >&5
31091  fi
31092  rm -f conftest.er1 conftest.err
31093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31094  test $ac_status = 0; }
31095done
31096
31097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31098$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31099if ${ac_cv_cxx_compiler_gnu+:} false; then :
31100  $as_echo_n "(cached) " >&6
31101else
31102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31103/* end confdefs.h.  */
31104
31105int
31106main ()
31107{
31108#ifndef __GNUC__
31109       choke me
31110#endif
31111
31112  ;
31113  return 0;
31114}
31115_ACEOF
31116if ac_fn_cxx_try_compile "$LINENO"; then :
31117  ac_compiler_gnu=yes
31118else
31119  ac_compiler_gnu=no
31120fi
31121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31122ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31123
31124fi
31125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31126$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31127if test $ac_compiler_gnu = yes; then
31128  GXX=yes
31129else
31130  GXX=
31131fi
31132ac_test_CXXFLAGS=${CXXFLAGS+set}
31133ac_save_CXXFLAGS=$CXXFLAGS
31134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31135$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31136if ${ac_cv_prog_cxx_g+:} false; then :
31137  $as_echo_n "(cached) " >&6
31138else
31139  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31140   ac_cxx_werror_flag=yes
31141   ac_cv_prog_cxx_g=no
31142   CXXFLAGS="-g"
31143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31144/* end confdefs.h.  */
31145
31146int
31147main ()
31148{
31149
31150  ;
31151  return 0;
31152}
31153_ACEOF
31154if ac_fn_cxx_try_compile "$LINENO"; then :
31155  ac_cv_prog_cxx_g=yes
31156else
31157  CXXFLAGS=""
31158      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31159/* end confdefs.h.  */
31160
31161int
31162main ()
31163{
31164
31165  ;
31166  return 0;
31167}
31168_ACEOF
31169if ac_fn_cxx_try_compile "$LINENO"; then :
31170
31171else
31172  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31173	 CXXFLAGS="-g"
31174	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31175/* end confdefs.h.  */
31176
31177int
31178main ()
31179{
31180
31181  ;
31182  return 0;
31183}
31184_ACEOF
31185if ac_fn_cxx_try_compile "$LINENO"; then :
31186  ac_cv_prog_cxx_g=yes
31187fi
31188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31189fi
31190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31191fi
31192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31193   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31194fi
31195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31196$as_echo "$ac_cv_prog_cxx_g" >&6; }
31197if test "$ac_test_CXXFLAGS" = set; then
31198  CXXFLAGS=$ac_save_CXXFLAGS
31199elif test $ac_cv_prog_cxx_g = yes; then
31200  if test "$GXX" = yes; then
31201    CXXFLAGS="-g -O2"
31202  else
31203    CXXFLAGS="-g"
31204  fi
31205else
31206  if test "$GXX" = yes; then
31207    CXXFLAGS="-O2"
31208  else
31209    CXXFLAGS=
31210  fi
31211fi
31212ac_ext=cpp
31213ac_cpp='$CXXCPP $CPPFLAGS'
31214ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31215ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31216ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31217
31218
31219  #
31220  # Setup the preprocessor (CPP and CXXCPP)
31221  #
31222  ac_ext=c
31223ac_cpp='$CPP $CPPFLAGS'
31224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31226ac_compiler_gnu=$ac_cv_c_compiler_gnu
31227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31228$as_echo_n "checking how to run the C preprocessor... " >&6; }
31229# On Suns, sometimes $CPP names a directory.
31230if test -n "$CPP" && test -d "$CPP"; then
31231  CPP=
31232fi
31233if test -z "$CPP"; then
31234  if ${ac_cv_prog_CPP+:} false; then :
31235  $as_echo_n "(cached) " >&6
31236else
31237      # Double quotes because CPP needs to be expanded
31238    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31239    do
31240      ac_preproc_ok=false
31241for ac_c_preproc_warn_flag in '' yes
31242do
31243  # Use a header file that comes with gcc, so configuring glibc
31244  # with a fresh cross-compiler works.
31245  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31246  # <limits.h> exists even on freestanding compilers.
31247  # On the NeXT, cc -E runs the code through the compiler's parser,
31248  # not just through cpp. "Syntax error" is here to catch this case.
31249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31250/* end confdefs.h.  */
31251#ifdef __STDC__
31252# include <limits.h>
31253#else
31254# include <assert.h>
31255#endif
31256		     Syntax error
31257_ACEOF
31258if ac_fn_c_try_cpp "$LINENO"; then :
31259
31260else
31261  # Broken: fails on valid input.
31262continue
31263fi
31264rm -f conftest.err conftest.i conftest.$ac_ext
31265
31266  # OK, works on sane cases.  Now check whether nonexistent headers
31267  # can be detected and how.
31268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31269/* end confdefs.h.  */
31270#include <ac_nonexistent.h>
31271_ACEOF
31272if ac_fn_c_try_cpp "$LINENO"; then :
31273  # Broken: success on invalid input.
31274continue
31275else
31276  # Passes both tests.
31277ac_preproc_ok=:
31278break
31279fi
31280rm -f conftest.err conftest.i conftest.$ac_ext
31281
31282done
31283# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31284rm -f conftest.i conftest.err conftest.$ac_ext
31285if $ac_preproc_ok; then :
31286  break
31287fi
31288
31289    done
31290    ac_cv_prog_CPP=$CPP
31291
31292fi
31293  CPP=$ac_cv_prog_CPP
31294else
31295  ac_cv_prog_CPP=$CPP
31296fi
31297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31298$as_echo "$CPP" >&6; }
31299ac_preproc_ok=false
31300for ac_c_preproc_warn_flag in '' yes
31301do
31302  # Use a header file that comes with gcc, so configuring glibc
31303  # with a fresh cross-compiler works.
31304  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31305  # <limits.h> exists even on freestanding compilers.
31306  # On the NeXT, cc -E runs the code through the compiler's parser,
31307  # not just through cpp. "Syntax error" is here to catch this case.
31308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31309/* end confdefs.h.  */
31310#ifdef __STDC__
31311# include <limits.h>
31312#else
31313# include <assert.h>
31314#endif
31315		     Syntax error
31316_ACEOF
31317if ac_fn_c_try_cpp "$LINENO"; then :
31318
31319else
31320  # Broken: fails on valid input.
31321continue
31322fi
31323rm -f conftest.err conftest.i conftest.$ac_ext
31324
31325  # OK, works on sane cases.  Now check whether nonexistent headers
31326  # can be detected and how.
31327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31328/* end confdefs.h.  */
31329#include <ac_nonexistent.h>
31330_ACEOF
31331if ac_fn_c_try_cpp "$LINENO"; then :
31332  # Broken: success on invalid input.
31333continue
31334else
31335  # Passes both tests.
31336ac_preproc_ok=:
31337break
31338fi
31339rm -f conftest.err conftest.i conftest.$ac_ext
31340
31341done
31342# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31343rm -f conftest.i conftest.err conftest.$ac_ext
31344if $ac_preproc_ok; then :
31345
31346else
31347  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31349as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31350See \`config.log' for more details" "$LINENO" 5; }
31351fi
31352
31353ac_ext=cpp
31354ac_cpp='$CXXCPP $CPPFLAGS'
31355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31358
31359
31360  # Only process if variable expands to non-empty
31361
31362  if test "x$CPP" != x; then
31363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31364
31365  # First separate the path from the arguments. This will split at the first
31366  # space.
31367  complete="$CPP"
31368  path="${complete%% *}"
31369  tmp="$complete EOL"
31370  arguments="${tmp#* }"
31371
31372  # Input might be given as Windows format, start by converting to
31373  # unix format.
31374  new_path=`$CYGPATH -u "$path"`
31375
31376  # Now try to locate executable using which
31377  new_path=`$WHICH "$new_path" 2> /dev/null`
31378  # bat and cmd files are not always considered executable in cygwin causing which
31379  # to not find them
31380  if test "x$new_path" = x \
31381      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31382      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31383    new_path=`$CYGPATH -u "$path"`
31384  fi
31385  if test "x$new_path" = x; then
31386    # Oops. Which didn't find the executable.
31387    # The splitting of arguments from the executable at a space might have been incorrect,
31388    # since paths with space are more likely in Windows. Give it another try with the whole
31389    # argument.
31390    path="$complete"
31391    arguments="EOL"
31392    new_path=`$CYGPATH -u "$path"`
31393    new_path=`$WHICH "$new_path" 2> /dev/null`
31394    # bat and cmd files are not always considered executable in cygwin causing which
31395    # to not find them
31396    if test "x$new_path" = x \
31397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31399      new_path=`$CYGPATH -u "$path"`
31400    fi
31401    if test "x$new_path" = x; then
31402      # It's still not found. Now this is an unrecoverable error.
31403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31404$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31405      has_space=`$ECHO "$complete" | $GREP " "`
31406      if test "x$has_space" != x; then
31407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31409      fi
31410      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31411    fi
31412  fi
31413
31414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31417  # "foo.exe" is OK but "foo" is an error.
31418  #
31419  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31420  # It is also a way to make sure we got the proper file name for the real test later on.
31421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31422  if test "x$test_shortpath" = x; then
31423    # Short path failed, file does not exist as specified.
31424    # Try adding .exe or .cmd
31425    if test -f "${new_path}.exe"; then
31426      input_to_shortpath="${new_path}.exe"
31427    elif test -f "${new_path}.cmd"; then
31428      input_to_shortpath="${new_path}.cmd"
31429    else
31430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31431$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31434      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31435    fi
31436  else
31437    input_to_shortpath="$new_path"
31438  fi
31439
31440  # Call helper function which possibly converts this using DOS-style short mode.
31441  # If so, the updated path is stored in $new_path.
31442  new_path="$input_to_shortpath"
31443
31444  input_path="$input_to_shortpath"
31445  # Check if we need to convert this using DOS-style short mode. If the path
31446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31447  # take no chances and rewrite it.
31448  # Note: m4 eats our [], so we need to use [ and ] instead.
31449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31450  if test "x$has_forbidden_chars" != x; then
31451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31455      # Going to short mode and back again did indeed matter. Since short mode is
31456      # case insensitive, let's make it lowercase to improve readability.
31457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31458      # Now convert it back to Unix-stile (cygpath)
31459      input_path=`$CYGPATH -u "$shortmode_path"`
31460      new_path="$input_path"
31461    fi
31462  fi
31463
31464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31465  if test "x$test_cygdrive_prefix" = x; then
31466    # As a simple fix, exclude /usr/bin since it's not a real path.
31467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31469      # a path prefixed by /cygdrive for fixpath to work.
31470      new_path="$CYGWIN_ROOT_PATH$input_path"
31471    fi
31472  fi
31473
31474  # remove trailing .exe if any
31475  new_path="${new_path/%.exe/}"
31476
31477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31478
31479  # First separate the path from the arguments. This will split at the first
31480  # space.
31481  complete="$CPP"
31482  path="${complete%% *}"
31483  tmp="$complete EOL"
31484  arguments="${tmp#* }"
31485
31486  # Input might be given as Windows format, start by converting to
31487  # unix format.
31488  new_path="$path"
31489
31490  windows_path="$new_path"
31491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31492    unix_path=`$CYGPATH -u "$windows_path"`
31493    new_path="$unix_path"
31494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31496    new_path="$unix_path"
31497  fi
31498
31499
31500  # Now try to locate executable using which
31501  new_path=`$WHICH "$new_path" 2> /dev/null`
31502
31503  if test "x$new_path" = x; then
31504    # Oops. Which didn't find the executable.
31505    # The splitting of arguments from the executable at a space might have been incorrect,
31506    # since paths with space are more likely in Windows. Give it another try with the whole
31507    # argument.
31508    path="$complete"
31509    arguments="EOL"
31510    new_path="$path"
31511
31512  windows_path="$new_path"
31513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31514    unix_path=`$CYGPATH -u "$windows_path"`
31515    new_path="$unix_path"
31516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31518    new_path="$unix_path"
31519  fi
31520
31521
31522    new_path=`$WHICH "$new_path" 2> /dev/null`
31523    # bat and cmd files are not always considered executable in MSYS causing which
31524    # to not find them
31525    if test "x$new_path" = x \
31526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31528      new_path="$path"
31529
31530  windows_path="$new_path"
31531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31532    unix_path=`$CYGPATH -u "$windows_path"`
31533    new_path="$unix_path"
31534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31536    new_path="$unix_path"
31537  fi
31538
31539    fi
31540
31541    if test "x$new_path" = x; then
31542      # It's still not found. Now this is an unrecoverable error.
31543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31544$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31545      has_space=`$ECHO "$complete" | $GREP " "`
31546      if test "x$has_space" != x; then
31547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31549      fi
31550      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31551    fi
31552  fi
31553
31554  # Now new_path has a complete unix path to the binary
31555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31556    # Keep paths in /bin as-is, but remove trailing .exe if any
31557    new_path="${new_path/%.exe/}"
31558    # Do not save /bin paths to all_fixpath_prefixes!
31559  else
31560    # Not in mixed or Windows style, start by that.
31561    new_path=`cmd //c echo $new_path`
31562
31563  input_path="$new_path"
31564  # Check if we need to convert this using DOS-style short mode. If the path
31565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31566  # take no chances and rewrite it.
31567  # Note: m4 eats our [], so we need to use [ and ] instead.
31568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31569  if test "x$has_forbidden_chars" != x; then
31570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31572  fi
31573
31574    # Output is in $new_path
31575
31576  windows_path="$new_path"
31577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578    unix_path=`$CYGPATH -u "$windows_path"`
31579    new_path="$unix_path"
31580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31582    new_path="$unix_path"
31583  fi
31584
31585    # remove trailing .exe if any
31586    new_path="${new_path/%.exe/}"
31587
31588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31590  fi
31591
31592    else
31593      # We're on a unix platform. Hooray! :)
31594      # First separate the path from the arguments. This will split at the first
31595      # space.
31596      complete="$CPP"
31597      path="${complete%% *}"
31598      tmp="$complete EOL"
31599      arguments="${tmp#* }"
31600
31601      # Cannot rely on the command "which" here since it doesn't always work.
31602      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31603      if test -z "$is_absolute_path"; then
31604        # Path to executable is not absolute. Find it.
31605        IFS_save="$IFS"
31606        IFS=:
31607        for p in $PATH; do
31608          if test -f "$p/$path" && test -x "$p/$path"; then
31609            new_path="$p/$path"
31610            break
31611          fi
31612        done
31613        IFS="$IFS_save"
31614      else
31615        # This is an absolute path, we can use it without further modifications.
31616        new_path="$path"
31617      fi
31618
31619      if test "x$new_path" = x; then
31620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31621$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31622        has_space=`$ECHO "$complete" | $GREP " "`
31623        if test "x$has_space" != x; then
31624          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31626        fi
31627        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31628      fi
31629    fi
31630
31631    # Now join together the path and the arguments once again
31632    if test "x$arguments" != xEOL; then
31633      new_complete="$new_path ${arguments% *}"
31634    else
31635      new_complete="$new_path"
31636    fi
31637
31638    if test "x$complete" != "x$new_complete"; then
31639      CPP="$new_complete"
31640      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31641$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31642    fi
31643  fi
31644
31645  ac_ext=cpp
31646ac_cpp='$CXXCPP $CPPFLAGS'
31647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31651$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31652if test -z "$CXXCPP"; then
31653  if ${ac_cv_prog_CXXCPP+:} false; then :
31654  $as_echo_n "(cached) " >&6
31655else
31656      # Double quotes because CXXCPP needs to be expanded
31657    for CXXCPP in "$CXX -E" "/lib/cpp"
31658    do
31659      ac_preproc_ok=false
31660for ac_cxx_preproc_warn_flag in '' yes
31661do
31662  # Use a header file that comes with gcc, so configuring glibc
31663  # with a fresh cross-compiler works.
31664  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31665  # <limits.h> exists even on freestanding compilers.
31666  # On the NeXT, cc -E runs the code through the compiler's parser,
31667  # not just through cpp. "Syntax error" is here to catch this case.
31668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31669/* end confdefs.h.  */
31670#ifdef __STDC__
31671# include <limits.h>
31672#else
31673# include <assert.h>
31674#endif
31675		     Syntax error
31676_ACEOF
31677if ac_fn_cxx_try_cpp "$LINENO"; then :
31678
31679else
31680  # Broken: fails on valid input.
31681continue
31682fi
31683rm -f conftest.err conftest.i conftest.$ac_ext
31684
31685  # OK, works on sane cases.  Now check whether nonexistent headers
31686  # can be detected and how.
31687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31688/* end confdefs.h.  */
31689#include <ac_nonexistent.h>
31690_ACEOF
31691if ac_fn_cxx_try_cpp "$LINENO"; then :
31692  # Broken: success on invalid input.
31693continue
31694else
31695  # Passes both tests.
31696ac_preproc_ok=:
31697break
31698fi
31699rm -f conftest.err conftest.i conftest.$ac_ext
31700
31701done
31702# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31703rm -f conftest.i conftest.err conftest.$ac_ext
31704if $ac_preproc_ok; then :
31705  break
31706fi
31707
31708    done
31709    ac_cv_prog_CXXCPP=$CXXCPP
31710
31711fi
31712  CXXCPP=$ac_cv_prog_CXXCPP
31713else
31714  ac_cv_prog_CXXCPP=$CXXCPP
31715fi
31716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31717$as_echo "$CXXCPP" >&6; }
31718ac_preproc_ok=false
31719for ac_cxx_preproc_warn_flag in '' yes
31720do
31721  # Use a header file that comes with gcc, so configuring glibc
31722  # with a fresh cross-compiler works.
31723  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31724  # <limits.h> exists even on freestanding compilers.
31725  # On the NeXT, cc -E runs the code through the compiler's parser,
31726  # not just through cpp. "Syntax error" is here to catch this case.
31727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31728/* end confdefs.h.  */
31729#ifdef __STDC__
31730# include <limits.h>
31731#else
31732# include <assert.h>
31733#endif
31734		     Syntax error
31735_ACEOF
31736if ac_fn_cxx_try_cpp "$LINENO"; then :
31737
31738else
31739  # Broken: fails on valid input.
31740continue
31741fi
31742rm -f conftest.err conftest.i conftest.$ac_ext
31743
31744  # OK, works on sane cases.  Now check whether nonexistent headers
31745  # can be detected and how.
31746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31747/* end confdefs.h.  */
31748#include <ac_nonexistent.h>
31749_ACEOF
31750if ac_fn_cxx_try_cpp "$LINENO"; then :
31751  # Broken: success on invalid input.
31752continue
31753else
31754  # Passes both tests.
31755ac_preproc_ok=:
31756break
31757fi
31758rm -f conftest.err conftest.i conftest.$ac_ext
31759
31760done
31761# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31762rm -f conftest.i conftest.err conftest.$ac_ext
31763if $ac_preproc_ok; then :
31764
31765else
31766  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31768as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31769See \`config.log' for more details" "$LINENO" 5; }
31770fi
31771
31772ac_ext=cpp
31773ac_cpp='$CXXCPP $CPPFLAGS'
31774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31777
31778
31779  # Only process if variable expands to non-empty
31780
31781  if test "x$CXXCPP" != x; then
31782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31783
31784  # First separate the path from the arguments. This will split at the first
31785  # space.
31786  complete="$CXXCPP"
31787  path="${complete%% *}"
31788  tmp="$complete EOL"
31789  arguments="${tmp#* }"
31790
31791  # Input might be given as Windows format, start by converting to
31792  # unix format.
31793  new_path=`$CYGPATH -u "$path"`
31794
31795  # Now try to locate executable using which
31796  new_path=`$WHICH "$new_path" 2> /dev/null`
31797  # bat and cmd files are not always considered executable in cygwin causing which
31798  # to not find them
31799  if test "x$new_path" = x \
31800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31802    new_path=`$CYGPATH -u "$path"`
31803  fi
31804  if test "x$new_path" = x; then
31805    # Oops. Which didn't find the executable.
31806    # The splitting of arguments from the executable at a space might have been incorrect,
31807    # since paths with space are more likely in Windows. Give it another try with the whole
31808    # argument.
31809    path="$complete"
31810    arguments="EOL"
31811    new_path=`$CYGPATH -u "$path"`
31812    new_path=`$WHICH "$new_path" 2> /dev/null`
31813    # bat and cmd files are not always considered executable in cygwin causing which
31814    # to not find them
31815    if test "x$new_path" = x \
31816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31818      new_path=`$CYGPATH -u "$path"`
31819    fi
31820    if test "x$new_path" = x; then
31821      # It's still not found. Now this is an unrecoverable error.
31822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31823$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31824      has_space=`$ECHO "$complete" | $GREP " "`
31825      if test "x$has_space" != x; then
31826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31828      fi
31829      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31830    fi
31831  fi
31832
31833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31836  # "foo.exe" is OK but "foo" is an error.
31837  #
31838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31839  # It is also a way to make sure we got the proper file name for the real test later on.
31840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31841  if test "x$test_shortpath" = x; then
31842    # Short path failed, file does not exist as specified.
31843    # Try adding .exe or .cmd
31844    if test -f "${new_path}.exe"; then
31845      input_to_shortpath="${new_path}.exe"
31846    elif test -f "${new_path}.cmd"; then
31847      input_to_shortpath="${new_path}.cmd"
31848    else
31849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31850$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31853      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31854    fi
31855  else
31856    input_to_shortpath="$new_path"
31857  fi
31858
31859  # Call helper function which possibly converts this using DOS-style short mode.
31860  # If so, the updated path is stored in $new_path.
31861  new_path="$input_to_shortpath"
31862
31863  input_path="$input_to_shortpath"
31864  # Check if we need to convert this using DOS-style short mode. If the path
31865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31866  # take no chances and rewrite it.
31867  # Note: m4 eats our [], so we need to use [ and ] instead.
31868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31869  if test "x$has_forbidden_chars" != x; then
31870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31874      # Going to short mode and back again did indeed matter. Since short mode is
31875      # case insensitive, let's make it lowercase to improve readability.
31876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31877      # Now convert it back to Unix-stile (cygpath)
31878      input_path=`$CYGPATH -u "$shortmode_path"`
31879      new_path="$input_path"
31880    fi
31881  fi
31882
31883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31884  if test "x$test_cygdrive_prefix" = x; then
31885    # As a simple fix, exclude /usr/bin since it's not a real path.
31886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31888      # a path prefixed by /cygdrive for fixpath to work.
31889      new_path="$CYGWIN_ROOT_PATH$input_path"
31890    fi
31891  fi
31892
31893  # remove trailing .exe if any
31894  new_path="${new_path/%.exe/}"
31895
31896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31897
31898  # First separate the path from the arguments. This will split at the first
31899  # space.
31900  complete="$CXXCPP"
31901  path="${complete%% *}"
31902  tmp="$complete EOL"
31903  arguments="${tmp#* }"
31904
31905  # Input might be given as Windows format, start by converting to
31906  # unix format.
31907  new_path="$path"
31908
31909  windows_path="$new_path"
31910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911    unix_path=`$CYGPATH -u "$windows_path"`
31912    new_path="$unix_path"
31913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31915    new_path="$unix_path"
31916  fi
31917
31918
31919  # Now try to locate executable using which
31920  new_path=`$WHICH "$new_path" 2> /dev/null`
31921
31922  if test "x$new_path" = x; then
31923    # Oops. Which didn't find the executable.
31924    # The splitting of arguments from the executable at a space might have been incorrect,
31925    # since paths with space are more likely in Windows. Give it another try with the whole
31926    # argument.
31927    path="$complete"
31928    arguments="EOL"
31929    new_path="$path"
31930
31931  windows_path="$new_path"
31932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31933    unix_path=`$CYGPATH -u "$windows_path"`
31934    new_path="$unix_path"
31935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31937    new_path="$unix_path"
31938  fi
31939
31940
31941    new_path=`$WHICH "$new_path" 2> /dev/null`
31942    # bat and cmd files are not always considered executable in MSYS causing which
31943    # to not find them
31944    if test "x$new_path" = x \
31945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31947      new_path="$path"
31948
31949  windows_path="$new_path"
31950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31951    unix_path=`$CYGPATH -u "$windows_path"`
31952    new_path="$unix_path"
31953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31955    new_path="$unix_path"
31956  fi
31957
31958    fi
31959
31960    if test "x$new_path" = x; then
31961      # It's still not found. Now this is an unrecoverable error.
31962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31963$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31964      has_space=`$ECHO "$complete" | $GREP " "`
31965      if test "x$has_space" != x; then
31966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31968      fi
31969      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31970    fi
31971  fi
31972
31973  # Now new_path has a complete unix path to the binary
31974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31975    # Keep paths in /bin as-is, but remove trailing .exe if any
31976    new_path="${new_path/%.exe/}"
31977    # Do not save /bin paths to all_fixpath_prefixes!
31978  else
31979    # Not in mixed or Windows style, start by that.
31980    new_path=`cmd //c echo $new_path`
31981
31982  input_path="$new_path"
31983  # Check if we need to convert this using DOS-style short mode. If the path
31984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31985  # take no chances and rewrite it.
31986  # Note: m4 eats our [], so we need to use [ and ] instead.
31987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31988  if test "x$has_forbidden_chars" != x; then
31989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31991  fi
31992
31993    # Output is in $new_path
31994
31995  windows_path="$new_path"
31996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31997    unix_path=`$CYGPATH -u "$windows_path"`
31998    new_path="$unix_path"
31999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32001    new_path="$unix_path"
32002  fi
32003
32004    # remove trailing .exe if any
32005    new_path="${new_path/%.exe/}"
32006
32007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32009  fi
32010
32011    else
32012      # We're on a unix platform. Hooray! :)
32013      # First separate the path from the arguments. This will split at the first
32014      # space.
32015      complete="$CXXCPP"
32016      path="${complete%% *}"
32017      tmp="$complete EOL"
32018      arguments="${tmp#* }"
32019
32020      # Cannot rely on the command "which" here since it doesn't always work.
32021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32022      if test -z "$is_absolute_path"; then
32023        # Path to executable is not absolute. Find it.
32024        IFS_save="$IFS"
32025        IFS=:
32026        for p in $PATH; do
32027          if test -f "$p/$path" && test -x "$p/$path"; then
32028            new_path="$p/$path"
32029            break
32030          fi
32031        done
32032        IFS="$IFS_save"
32033      else
32034        # This is an absolute path, we can use it without further modifications.
32035        new_path="$path"
32036      fi
32037
32038      if test "x$new_path" = x; then
32039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32040$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32041        has_space=`$ECHO "$complete" | $GREP " "`
32042        if test "x$has_space" != x; then
32043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32045        fi
32046        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32047      fi
32048    fi
32049
32050    # Now join together the path and the arguments once again
32051    if test "x$arguments" != xEOL; then
32052      new_complete="$new_path ${arguments% *}"
32053    else
32054      new_complete="$new_path"
32055    fi
32056
32057    if test "x$complete" != "x$new_complete"; then
32058      CXXCPP="$new_complete"
32059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32060$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32061    fi
32062  fi
32063
32064
32065  #
32066  # Setup the linker (LD)
32067  #
32068  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32069    # In the Microsoft toolchain we have a separate LD command "link".
32070    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32071    # a cygwin program for something completely different.
32072    # Extract the first word of "link", so it can be a program name with args.
32073set dummy link; ac_word=$2
32074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32075$as_echo_n "checking for $ac_word... " >&6; }
32076if ${ac_cv_prog_LD+:} false; then :
32077  $as_echo_n "(cached) " >&6
32078else
32079  if test -n "$LD"; then
32080  ac_cv_prog_LD="$LD" # Let the user override the test.
32081else
32082  ac_prog_rejected=no
32083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32084for as_dir in $PATH
32085do
32086  IFS=$as_save_IFS
32087  test -z "$as_dir" && as_dir=.
32088    for ac_exec_ext in '' $ac_executable_extensions; do
32089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32090    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32091       ac_prog_rejected=yes
32092       continue
32093     fi
32094    ac_cv_prog_LD="link"
32095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32096    break 2
32097  fi
32098done
32099  done
32100IFS=$as_save_IFS
32101
32102if test $ac_prog_rejected = yes; then
32103  # We found a bogon in the path, so make sure we never use it.
32104  set dummy $ac_cv_prog_LD
32105  shift
32106  if test $# != 0; then
32107    # We chose a different compiler from the bogus one.
32108    # However, it has the same basename, so the bogon will be chosen
32109    # first if we set LD to just the basename; use the full file name.
32110    shift
32111    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32112  fi
32113fi
32114fi
32115fi
32116LD=$ac_cv_prog_LD
32117if test -n "$LD"; then
32118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32119$as_echo "$LD" >&6; }
32120else
32121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32122$as_echo "no" >&6; }
32123fi
32124
32125
32126
32127  # Only process if variable expands to non-empty
32128
32129  if test "x$LD" != x; then
32130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32131
32132  # First separate the path from the arguments. This will split at the first
32133  # space.
32134  complete="$LD"
32135  path="${complete%% *}"
32136  tmp="$complete EOL"
32137  arguments="${tmp#* }"
32138
32139  # Input might be given as Windows format, start by converting to
32140  # unix format.
32141  new_path=`$CYGPATH -u "$path"`
32142
32143  # Now try to locate executable using which
32144  new_path=`$WHICH "$new_path" 2> /dev/null`
32145  # bat and cmd files are not always considered executable in cygwin causing which
32146  # to not find them
32147  if test "x$new_path" = x \
32148      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32149      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32150    new_path=`$CYGPATH -u "$path"`
32151  fi
32152  if test "x$new_path" = x; then
32153    # Oops. Which didn't find the executable.
32154    # The splitting of arguments from the executable at a space might have been incorrect,
32155    # since paths with space are more likely in Windows. Give it another try with the whole
32156    # argument.
32157    path="$complete"
32158    arguments="EOL"
32159    new_path=`$CYGPATH -u "$path"`
32160    new_path=`$WHICH "$new_path" 2> /dev/null`
32161    # bat and cmd files are not always considered executable in cygwin causing which
32162    # to not find them
32163    if test "x$new_path" = x \
32164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32166      new_path=`$CYGPATH -u "$path"`
32167    fi
32168    if test "x$new_path" = x; then
32169      # It's still not found. Now this is an unrecoverable error.
32170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32171$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32172      has_space=`$ECHO "$complete" | $GREP " "`
32173      if test "x$has_space" != x; then
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32176      fi
32177      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32178    fi
32179  fi
32180
32181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32184  # "foo.exe" is OK but "foo" is an error.
32185  #
32186  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32187  # It is also a way to make sure we got the proper file name for the real test later on.
32188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32189  if test "x$test_shortpath" = x; then
32190    # Short path failed, file does not exist as specified.
32191    # Try adding .exe or .cmd
32192    if test -f "${new_path}.exe"; then
32193      input_to_shortpath="${new_path}.exe"
32194    elif test -f "${new_path}.cmd"; then
32195      input_to_shortpath="${new_path}.cmd"
32196    else
32197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32198$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32199      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32200$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32201      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32202    fi
32203  else
32204    input_to_shortpath="$new_path"
32205  fi
32206
32207  # Call helper function which possibly converts this using DOS-style short mode.
32208  # If so, the updated path is stored in $new_path.
32209  new_path="$input_to_shortpath"
32210
32211  input_path="$input_to_shortpath"
32212  # Check if we need to convert this using DOS-style short mode. If the path
32213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32214  # take no chances and rewrite it.
32215  # Note: m4 eats our [], so we need to use [ and ] instead.
32216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32217  if test "x$has_forbidden_chars" != x; then
32218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32222      # Going to short mode and back again did indeed matter. Since short mode is
32223      # case insensitive, let's make it lowercase to improve readability.
32224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32225      # Now convert it back to Unix-stile (cygpath)
32226      input_path=`$CYGPATH -u "$shortmode_path"`
32227      new_path="$input_path"
32228    fi
32229  fi
32230
32231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32232  if test "x$test_cygdrive_prefix" = x; then
32233    # As a simple fix, exclude /usr/bin since it's not a real path.
32234    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32236      # a path prefixed by /cygdrive for fixpath to work.
32237      new_path="$CYGWIN_ROOT_PATH$input_path"
32238    fi
32239  fi
32240
32241  # remove trailing .exe if any
32242  new_path="${new_path/%.exe/}"
32243
32244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32245
32246  # First separate the path from the arguments. This will split at the first
32247  # space.
32248  complete="$LD"
32249  path="${complete%% *}"
32250  tmp="$complete EOL"
32251  arguments="${tmp#* }"
32252
32253  # Input might be given as Windows format, start by converting to
32254  # unix format.
32255  new_path="$path"
32256
32257  windows_path="$new_path"
32258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32259    unix_path=`$CYGPATH -u "$windows_path"`
32260    new_path="$unix_path"
32261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32263    new_path="$unix_path"
32264  fi
32265
32266
32267  # Now try to locate executable using which
32268  new_path=`$WHICH "$new_path" 2> /dev/null`
32269
32270  if test "x$new_path" = x; then
32271    # Oops. Which didn't find the executable.
32272    # The splitting of arguments from the executable at a space might have been incorrect,
32273    # since paths with space are more likely in Windows. Give it another try with the whole
32274    # argument.
32275    path="$complete"
32276    arguments="EOL"
32277    new_path="$path"
32278
32279  windows_path="$new_path"
32280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32281    unix_path=`$CYGPATH -u "$windows_path"`
32282    new_path="$unix_path"
32283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32285    new_path="$unix_path"
32286  fi
32287
32288
32289    new_path=`$WHICH "$new_path" 2> /dev/null`
32290    # bat and cmd files are not always considered executable in MSYS causing which
32291    # to not find them
32292    if test "x$new_path" = x \
32293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32295      new_path="$path"
32296
32297  windows_path="$new_path"
32298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32299    unix_path=`$CYGPATH -u "$windows_path"`
32300    new_path="$unix_path"
32301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32303    new_path="$unix_path"
32304  fi
32305
32306    fi
32307
32308    if test "x$new_path" = x; then
32309      # It's still not found. Now this is an unrecoverable error.
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32311$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32312      has_space=`$ECHO "$complete" | $GREP " "`
32313      if test "x$has_space" != x; then
32314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32316      fi
32317      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32318    fi
32319  fi
32320
32321  # Now new_path has a complete unix path to the binary
32322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32323    # Keep paths in /bin as-is, but remove trailing .exe if any
32324    new_path="${new_path/%.exe/}"
32325    # Do not save /bin paths to all_fixpath_prefixes!
32326  else
32327    # Not in mixed or Windows style, start by that.
32328    new_path=`cmd //c echo $new_path`
32329
32330  input_path="$new_path"
32331  # Check if we need to convert this using DOS-style short mode. If the path
32332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32333  # take no chances and rewrite it.
32334  # Note: m4 eats our [], so we need to use [ and ] instead.
32335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32336  if test "x$has_forbidden_chars" != x; then
32337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32339  fi
32340
32341    # Output is in $new_path
32342
32343  windows_path="$new_path"
32344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32345    unix_path=`$CYGPATH -u "$windows_path"`
32346    new_path="$unix_path"
32347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32349    new_path="$unix_path"
32350  fi
32351
32352    # remove trailing .exe if any
32353    new_path="${new_path/%.exe/}"
32354
32355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32357  fi
32358
32359    else
32360      # We're on a unix platform. Hooray! :)
32361      # First separate the path from the arguments. This will split at the first
32362      # space.
32363      complete="$LD"
32364      path="${complete%% *}"
32365      tmp="$complete EOL"
32366      arguments="${tmp#* }"
32367
32368      # Cannot rely on the command "which" here since it doesn't always work.
32369      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32370      if test -z "$is_absolute_path"; then
32371        # Path to executable is not absolute. Find it.
32372        IFS_save="$IFS"
32373        IFS=:
32374        for p in $PATH; do
32375          if test -f "$p/$path" && test -x "$p/$path"; then
32376            new_path="$p/$path"
32377            break
32378          fi
32379        done
32380        IFS="$IFS_save"
32381      else
32382        # This is an absolute path, we can use it without further modifications.
32383        new_path="$path"
32384      fi
32385
32386      if test "x$new_path" = x; then
32387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32388$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32389        has_space=`$ECHO "$complete" | $GREP " "`
32390        if test "x$has_space" != x; then
32391          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32393        fi
32394        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32395      fi
32396    fi
32397
32398    # Now join together the path and the arguments once again
32399    if test "x$arguments" != xEOL; then
32400      new_complete="$new_path ${arguments% *}"
32401    else
32402      new_complete="$new_path"
32403    fi
32404
32405    if test "x$complete" != "x$new_complete"; then
32406      LD="$new_complete"
32407      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32408$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32409    fi
32410  fi
32411
32412    # Verify that we indeed succeeded with this trick.
32413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32414$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32415    "$LD" --version > /dev/null
32416    if test $? -eq 0 ; then
32417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32418$as_echo "no" >&6; }
32419      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32420    else
32421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32422$as_echo "yes" >&6; }
32423    fi
32424    LDCXX="$LD"
32425  else
32426    # All other toolchains use the compiler to link.
32427    LD="$CC"
32428    LDCXX="$CXX"
32429  fi
32430
32431  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32432
32433
32434  #
32435  # Setup the assembler (AS)
32436  #
32437  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32438    # FIXME: should this really be solaris, or solstudio?
32439
32440
32441  # Publish this variable in the help.
32442
32443
32444  if test "x$AS" = x; then
32445    # The variable is not set by user, try to locate tool using the code snippet
32446    for ac_prog in as
32447do
32448  # Extract the first word of "$ac_prog", so it can be a program name with args.
32449set dummy $ac_prog; ac_word=$2
32450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32451$as_echo_n "checking for $ac_word... " >&6; }
32452if ${ac_cv_path_AS+:} false; then :
32453  $as_echo_n "(cached) " >&6
32454else
32455  case $AS in
32456  [\\/]* | ?:[\\/]*)
32457  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32458  ;;
32459  *)
32460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32461for as_dir in $PATH
32462do
32463  IFS=$as_save_IFS
32464  test -z "$as_dir" && as_dir=.
32465    for ac_exec_ext in '' $ac_executable_extensions; do
32466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32467    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32469    break 2
32470  fi
32471done
32472  done
32473IFS=$as_save_IFS
32474
32475  ;;
32476esac
32477fi
32478AS=$ac_cv_path_AS
32479if test -n "$AS"; then
32480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32481$as_echo "$AS" >&6; }
32482else
32483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32484$as_echo "no" >&6; }
32485fi
32486
32487
32488  test -n "$AS" && break
32489done
32490
32491  else
32492    # The variable is set, but is it from the command line or the environment?
32493
32494    # Try to remove the string !AS! from our list.
32495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32497      # If it failed, the variable was not from the command line. Ignore it,
32498      # but warn the user (except for BASH, which is always set by the calling BASH).
32499      if test "xAS" != xBASH; then
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32501$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32502      fi
32503      # Try to locate tool using the code snippet
32504      for ac_prog in as
32505do
32506  # Extract the first word of "$ac_prog", so it can be a program name with args.
32507set dummy $ac_prog; ac_word=$2
32508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32509$as_echo_n "checking for $ac_word... " >&6; }
32510if ${ac_cv_path_AS+:} false; then :
32511  $as_echo_n "(cached) " >&6
32512else
32513  case $AS in
32514  [\\/]* | ?:[\\/]*)
32515  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32516  ;;
32517  *)
32518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32519for as_dir in $PATH
32520do
32521  IFS=$as_save_IFS
32522  test -z "$as_dir" && as_dir=.
32523    for ac_exec_ext in '' $ac_executable_extensions; do
32524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32525    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32527    break 2
32528  fi
32529done
32530  done
32531IFS=$as_save_IFS
32532
32533  ;;
32534esac
32535fi
32536AS=$ac_cv_path_AS
32537if test -n "$AS"; then
32538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32539$as_echo "$AS" >&6; }
32540else
32541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32542$as_echo "no" >&6; }
32543fi
32544
32545
32546  test -n "$AS" && break
32547done
32548
32549    else
32550      # If it succeeded, then it was overridden by the user. We will use it
32551      # for the tool.
32552
32553      # First remove it from the list of overridden variables, so we can test
32554      # for unknown variables in the end.
32555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32556
32557      # Check if the provided tool contains a complete path.
32558      tool_specified="$AS"
32559      tool_basename="${tool_specified##*/}"
32560      if test "x$tool_basename" = "x$tool_specified"; then
32561        # A command without a complete path is provided, search $PATH.
32562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32563$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32564        # Extract the first word of "$tool_basename", so it can be a program name with args.
32565set dummy $tool_basename; ac_word=$2
32566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32567$as_echo_n "checking for $ac_word... " >&6; }
32568if ${ac_cv_path_AS+:} false; then :
32569  $as_echo_n "(cached) " >&6
32570else
32571  case $AS in
32572  [\\/]* | ?:[\\/]*)
32573  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32574  ;;
32575  *)
32576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32577for as_dir in $PATH
32578do
32579  IFS=$as_save_IFS
32580  test -z "$as_dir" && as_dir=.
32581    for ac_exec_ext in '' $ac_executable_extensions; do
32582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32583    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32585    break 2
32586  fi
32587done
32588  done
32589IFS=$as_save_IFS
32590
32591  ;;
32592esac
32593fi
32594AS=$ac_cv_path_AS
32595if test -n "$AS"; then
32596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32597$as_echo "$AS" >&6; }
32598else
32599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32600$as_echo "no" >&6; }
32601fi
32602
32603
32604        if test "x$AS" = x; then
32605          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32606        fi
32607      else
32608        # Otherwise we believe it is a complete path. Use it as it is.
32609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32610$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32612$as_echo_n "checking for AS... " >&6; }
32613        if test ! -x "$tool_specified"; then
32614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32615$as_echo "not found" >&6; }
32616          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32617        fi
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32619$as_echo "$tool_specified" >&6; }
32620      fi
32621    fi
32622  fi
32623
32624
32625
32626  # Only process if variable expands to non-empty
32627
32628  if test "x$AS" != x; then
32629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32630
32631  # First separate the path from the arguments. This will split at the first
32632  # space.
32633  complete="$AS"
32634  path="${complete%% *}"
32635  tmp="$complete EOL"
32636  arguments="${tmp#* }"
32637
32638  # Input might be given as Windows format, start by converting to
32639  # unix format.
32640  new_path=`$CYGPATH -u "$path"`
32641
32642  # Now try to locate executable using which
32643  new_path=`$WHICH "$new_path" 2> /dev/null`
32644  # bat and cmd files are not always considered executable in cygwin causing which
32645  # to not find them
32646  if test "x$new_path" = x \
32647      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32648      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32649    new_path=`$CYGPATH -u "$path"`
32650  fi
32651  if test "x$new_path" = x; then
32652    # Oops. Which didn't find the executable.
32653    # The splitting of arguments from the executable at a space might have been incorrect,
32654    # since paths with space are more likely in Windows. Give it another try with the whole
32655    # argument.
32656    path="$complete"
32657    arguments="EOL"
32658    new_path=`$CYGPATH -u "$path"`
32659    new_path=`$WHICH "$new_path" 2> /dev/null`
32660    # bat and cmd files are not always considered executable in cygwin causing which
32661    # to not find them
32662    if test "x$new_path" = x \
32663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32665      new_path=`$CYGPATH -u "$path"`
32666    fi
32667    if test "x$new_path" = x; then
32668      # It's still not found. Now this is an unrecoverable error.
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32670$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32671      has_space=`$ECHO "$complete" | $GREP " "`
32672      if test "x$has_space" != x; then
32673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32675      fi
32676      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32677    fi
32678  fi
32679
32680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32683  # "foo.exe" is OK but "foo" is an error.
32684  #
32685  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32686  # It is also a way to make sure we got the proper file name for the real test later on.
32687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32688  if test "x$test_shortpath" = x; then
32689    # Short path failed, file does not exist as specified.
32690    # Try adding .exe or .cmd
32691    if test -f "${new_path}.exe"; then
32692      input_to_shortpath="${new_path}.exe"
32693    elif test -f "${new_path}.cmd"; then
32694      input_to_shortpath="${new_path}.cmd"
32695    else
32696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32697$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32700      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32701    fi
32702  else
32703    input_to_shortpath="$new_path"
32704  fi
32705
32706  # Call helper function which possibly converts this using DOS-style short mode.
32707  # If so, the updated path is stored in $new_path.
32708  new_path="$input_to_shortpath"
32709
32710  input_path="$input_to_shortpath"
32711  # Check if we need to convert this using DOS-style short mode. If the path
32712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32713  # take no chances and rewrite it.
32714  # Note: m4 eats our [], so we need to use [ and ] instead.
32715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32716  if test "x$has_forbidden_chars" != x; then
32717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32721      # Going to short mode and back again did indeed matter. Since short mode is
32722      # case insensitive, let's make it lowercase to improve readability.
32723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32724      # Now convert it back to Unix-stile (cygpath)
32725      input_path=`$CYGPATH -u "$shortmode_path"`
32726      new_path="$input_path"
32727    fi
32728  fi
32729
32730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32731  if test "x$test_cygdrive_prefix" = x; then
32732    # As a simple fix, exclude /usr/bin since it's not a real path.
32733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32735      # a path prefixed by /cygdrive for fixpath to work.
32736      new_path="$CYGWIN_ROOT_PATH$input_path"
32737    fi
32738  fi
32739
32740  # remove trailing .exe if any
32741  new_path="${new_path/%.exe/}"
32742
32743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744
32745  # First separate the path from the arguments. This will split at the first
32746  # space.
32747  complete="$AS"
32748  path="${complete%% *}"
32749  tmp="$complete EOL"
32750  arguments="${tmp#* }"
32751
32752  # Input might be given as Windows format, start by converting to
32753  # unix format.
32754  new_path="$path"
32755
32756  windows_path="$new_path"
32757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32758    unix_path=`$CYGPATH -u "$windows_path"`
32759    new_path="$unix_path"
32760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32762    new_path="$unix_path"
32763  fi
32764
32765
32766  # Now try to locate executable using which
32767  new_path=`$WHICH "$new_path" 2> /dev/null`
32768
32769  if test "x$new_path" = x; then
32770    # Oops. Which didn't find the executable.
32771    # The splitting of arguments from the executable at a space might have been incorrect,
32772    # since paths with space are more likely in Windows. Give it another try with the whole
32773    # argument.
32774    path="$complete"
32775    arguments="EOL"
32776    new_path="$path"
32777
32778  windows_path="$new_path"
32779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32780    unix_path=`$CYGPATH -u "$windows_path"`
32781    new_path="$unix_path"
32782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32784    new_path="$unix_path"
32785  fi
32786
32787
32788    new_path=`$WHICH "$new_path" 2> /dev/null`
32789    # bat and cmd files are not always considered executable in MSYS causing which
32790    # to not find them
32791    if test "x$new_path" = x \
32792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32794      new_path="$path"
32795
32796  windows_path="$new_path"
32797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32798    unix_path=`$CYGPATH -u "$windows_path"`
32799    new_path="$unix_path"
32800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32802    new_path="$unix_path"
32803  fi
32804
32805    fi
32806
32807    if test "x$new_path" = x; then
32808      # It's still not found. Now this is an unrecoverable error.
32809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32810$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32811      has_space=`$ECHO "$complete" | $GREP " "`
32812      if test "x$has_space" != x; then
32813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32815      fi
32816      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32817    fi
32818  fi
32819
32820  # Now new_path has a complete unix path to the binary
32821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32822    # Keep paths in /bin as-is, but remove trailing .exe if any
32823    new_path="${new_path/%.exe/}"
32824    # Do not save /bin paths to all_fixpath_prefixes!
32825  else
32826    # Not in mixed or Windows style, start by that.
32827    new_path=`cmd //c echo $new_path`
32828
32829  input_path="$new_path"
32830  # Check if we need to convert this using DOS-style short mode. If the path
32831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32832  # take no chances and rewrite it.
32833  # Note: m4 eats our [], so we need to use [ and ] instead.
32834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32835  if test "x$has_forbidden_chars" != x; then
32836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32838  fi
32839
32840    # Output is in $new_path
32841
32842  windows_path="$new_path"
32843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32844    unix_path=`$CYGPATH -u "$windows_path"`
32845    new_path="$unix_path"
32846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32848    new_path="$unix_path"
32849  fi
32850
32851    # remove trailing .exe if any
32852    new_path="${new_path/%.exe/}"
32853
32854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32856  fi
32857
32858    else
32859      # We're on a unix platform. Hooray! :)
32860      # First separate the path from the arguments. This will split at the first
32861      # space.
32862      complete="$AS"
32863      path="${complete%% *}"
32864      tmp="$complete EOL"
32865      arguments="${tmp#* }"
32866
32867      # Cannot rely on the command "which" here since it doesn't always work.
32868      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32869      if test -z "$is_absolute_path"; then
32870        # Path to executable is not absolute. Find it.
32871        IFS_save="$IFS"
32872        IFS=:
32873        for p in $PATH; do
32874          if test -f "$p/$path" && test -x "$p/$path"; then
32875            new_path="$p/$path"
32876            break
32877          fi
32878        done
32879        IFS="$IFS_save"
32880      else
32881        # This is an absolute path, we can use it without further modifications.
32882        new_path="$path"
32883      fi
32884
32885      if test "x$new_path" = x; then
32886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32887$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32888        has_space=`$ECHO "$complete" | $GREP " "`
32889        if test "x$has_space" != x; then
32890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32892        fi
32893        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32894      fi
32895    fi
32896
32897    # Now join together the path and the arguments once again
32898    if test "x$arguments" != xEOL; then
32899      new_complete="$new_path ${arguments% *}"
32900    else
32901      new_complete="$new_path"
32902    fi
32903
32904    if test "x$complete" != "x$new_complete"; then
32905      AS="$new_complete"
32906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32907$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32908    fi
32909  fi
32910
32911  else
32912    # FIXME: is this correct for microsoft?
32913    AS="$CC -c"
32914  fi
32915
32916
32917  #
32918  # Setup the archiver (AR)
32919  #
32920  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32921    # The corresponding ar tool is lib.exe (used to create static libraries)
32922    # Extract the first word of "lib", so it can be a program name with args.
32923set dummy lib; ac_word=$2
32924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32925$as_echo_n "checking for $ac_word... " >&6; }
32926if ${ac_cv_prog_AR+:} false; then :
32927  $as_echo_n "(cached) " >&6
32928else
32929  if test -n "$AR"; then
32930  ac_cv_prog_AR="$AR" # Let the user override the test.
32931else
32932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32933for as_dir in $PATH
32934do
32935  IFS=$as_save_IFS
32936  test -z "$as_dir" && as_dir=.
32937    for ac_exec_ext in '' $ac_executable_extensions; do
32938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32939    ac_cv_prog_AR="lib"
32940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32941    break 2
32942  fi
32943done
32944  done
32945IFS=$as_save_IFS
32946
32947fi
32948fi
32949AR=$ac_cv_prog_AR
32950if test -n "$AR"; then
32951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32952$as_echo "$AR" >&6; }
32953else
32954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32955$as_echo "no" >&6; }
32956fi
32957
32958
32959  else
32960
32961
32962  # Publish this variable in the help.
32963
32964
32965  if test "x$AR" = x; then
32966    # The variable is not set by user, try to locate tool using the code snippet
32967    if test -n "$ac_tool_prefix"; then
32968  for ac_prog in ar
32969  do
32970    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32971set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32973$as_echo_n "checking for $ac_word... " >&6; }
32974if ${ac_cv_prog_AR+:} false; then :
32975  $as_echo_n "(cached) " >&6
32976else
32977  if test -n "$AR"; then
32978  ac_cv_prog_AR="$AR" # Let the user override the test.
32979else
32980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32981for as_dir in $PATH
32982do
32983  IFS=$as_save_IFS
32984  test -z "$as_dir" && as_dir=.
32985    for ac_exec_ext in '' $ac_executable_extensions; do
32986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32987    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32989    break 2
32990  fi
32991done
32992  done
32993IFS=$as_save_IFS
32994
32995fi
32996fi
32997AR=$ac_cv_prog_AR
32998if test -n "$AR"; then
32999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33000$as_echo "$AR" >&6; }
33001else
33002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33003$as_echo "no" >&6; }
33004fi
33005
33006
33007    test -n "$AR" && break
33008  done
33009fi
33010if test -z "$AR"; then
33011  ac_ct_AR=$AR
33012  for ac_prog in ar
33013do
33014  # Extract the first word of "$ac_prog", so it can be a program name with args.
33015set dummy $ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_prog_ac_ct_AR+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  if test -n "$ac_ct_AR"; then
33022  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33023else
33024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33025for as_dir in $PATH
33026do
33027  IFS=$as_save_IFS
33028  test -z "$as_dir" && as_dir=.
33029    for ac_exec_ext in '' $ac_executable_extensions; do
33030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33031    ac_cv_prog_ac_ct_AR="$ac_prog"
33032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33033    break 2
33034  fi
33035done
33036  done
33037IFS=$as_save_IFS
33038
33039fi
33040fi
33041ac_ct_AR=$ac_cv_prog_ac_ct_AR
33042if test -n "$ac_ct_AR"; then
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33044$as_echo "$ac_ct_AR" >&6; }
33045else
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33047$as_echo "no" >&6; }
33048fi
33049
33050
33051  test -n "$ac_ct_AR" && break
33052done
33053
33054  if test "x$ac_ct_AR" = x; then
33055    AR=""
33056  else
33057    case $cross_compiling:$ac_tool_warned in
33058yes:)
33059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33061ac_tool_warned=yes ;;
33062esac
33063    AR=$ac_ct_AR
33064  fi
33065fi
33066
33067  else
33068    # The variable is set, but is it from the command line or the environment?
33069
33070    # Try to remove the string !AR! from our list.
33071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33073      # If it failed, the variable was not from the command line. Ignore it,
33074      # but warn the user (except for BASH, which is always set by the calling BASH).
33075      if test "xAR" != xBASH; then
33076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33077$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33078      fi
33079      # Try to locate tool using the code snippet
33080      if test -n "$ac_tool_prefix"; then
33081  for ac_prog in ar
33082  do
33083    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33086$as_echo_n "checking for $ac_word... " >&6; }
33087if ${ac_cv_prog_AR+:} false; then :
33088  $as_echo_n "(cached) " >&6
33089else
33090  if test -n "$AR"; then
33091  ac_cv_prog_AR="$AR" # Let the user override the test.
33092else
33093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33094for as_dir in $PATH
33095do
33096  IFS=$as_save_IFS
33097  test -z "$as_dir" && as_dir=.
33098    for ac_exec_ext in '' $ac_executable_extensions; do
33099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33100    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33102    break 2
33103  fi
33104done
33105  done
33106IFS=$as_save_IFS
33107
33108fi
33109fi
33110AR=$ac_cv_prog_AR
33111if test -n "$AR"; then
33112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33113$as_echo "$AR" >&6; }
33114else
33115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33116$as_echo "no" >&6; }
33117fi
33118
33119
33120    test -n "$AR" && break
33121  done
33122fi
33123if test -z "$AR"; then
33124  ac_ct_AR=$AR
33125  for ac_prog in ar
33126do
33127  # Extract the first word of "$ac_prog", so it can be a program name with args.
33128set dummy $ac_prog; ac_word=$2
33129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33130$as_echo_n "checking for $ac_word... " >&6; }
33131if ${ac_cv_prog_ac_ct_AR+:} false; then :
33132  $as_echo_n "(cached) " >&6
33133else
33134  if test -n "$ac_ct_AR"; then
33135  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33136else
33137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33138for as_dir in $PATH
33139do
33140  IFS=$as_save_IFS
33141  test -z "$as_dir" && as_dir=.
33142    for ac_exec_ext in '' $ac_executable_extensions; do
33143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33144    ac_cv_prog_ac_ct_AR="$ac_prog"
33145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33146    break 2
33147  fi
33148done
33149  done
33150IFS=$as_save_IFS
33151
33152fi
33153fi
33154ac_ct_AR=$ac_cv_prog_ac_ct_AR
33155if test -n "$ac_ct_AR"; then
33156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33157$as_echo "$ac_ct_AR" >&6; }
33158else
33159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33160$as_echo "no" >&6; }
33161fi
33162
33163
33164  test -n "$ac_ct_AR" && break
33165done
33166
33167  if test "x$ac_ct_AR" = x; then
33168    AR=""
33169  else
33170    case $cross_compiling:$ac_tool_warned in
33171yes:)
33172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33174ac_tool_warned=yes ;;
33175esac
33176    AR=$ac_ct_AR
33177  fi
33178fi
33179
33180    else
33181      # If it succeeded, then it was overridden by the user. We will use it
33182      # for the tool.
33183
33184      # First remove it from the list of overridden variables, so we can test
33185      # for unknown variables in the end.
33186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33187
33188      # Check if the provided tool contains a complete path.
33189      tool_specified="$AR"
33190      tool_basename="${tool_specified##*/}"
33191      if test "x$tool_basename" = "x$tool_specified"; then
33192        # A command without a complete path is provided, search $PATH.
33193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33194$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33195        # Extract the first word of "$tool_basename", so it can be a program name with args.
33196set dummy $tool_basename; ac_word=$2
33197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33198$as_echo_n "checking for $ac_word... " >&6; }
33199if ${ac_cv_path_AR+:} false; then :
33200  $as_echo_n "(cached) " >&6
33201else
33202  case $AR in
33203  [\\/]* | ?:[\\/]*)
33204  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33205  ;;
33206  *)
33207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33208for as_dir in $PATH
33209do
33210  IFS=$as_save_IFS
33211  test -z "$as_dir" && as_dir=.
33212    for ac_exec_ext in '' $ac_executable_extensions; do
33213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33214    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33216    break 2
33217  fi
33218done
33219  done
33220IFS=$as_save_IFS
33221
33222  ;;
33223esac
33224fi
33225AR=$ac_cv_path_AR
33226if test -n "$AR"; then
33227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33228$as_echo "$AR" >&6; }
33229else
33230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33231$as_echo "no" >&6; }
33232fi
33233
33234
33235        if test "x$AR" = x; then
33236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33237        fi
33238      else
33239        # Otherwise we believe it is a complete path. Use it as it is.
33240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33241$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33243$as_echo_n "checking for AR... " >&6; }
33244        if test ! -x "$tool_specified"; then
33245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33246$as_echo "not found" >&6; }
33247          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33248        fi
33249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33250$as_echo "$tool_specified" >&6; }
33251      fi
33252    fi
33253  fi
33254
33255
33256  fi
33257
33258  # Only process if variable expands to non-empty
33259
33260  if test "x$AR" != x; then
33261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33262
33263  # First separate the path from the arguments. This will split at the first
33264  # space.
33265  complete="$AR"
33266  path="${complete%% *}"
33267  tmp="$complete EOL"
33268  arguments="${tmp#* }"
33269
33270  # Input might be given as Windows format, start by converting to
33271  # unix format.
33272  new_path=`$CYGPATH -u "$path"`
33273
33274  # Now try to locate executable using which
33275  new_path=`$WHICH "$new_path" 2> /dev/null`
33276  # bat and cmd files are not always considered executable in cygwin causing which
33277  # to not find them
33278  if test "x$new_path" = x \
33279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33281    new_path=`$CYGPATH -u "$path"`
33282  fi
33283  if test "x$new_path" = x; then
33284    # Oops. Which didn't find the executable.
33285    # The splitting of arguments from the executable at a space might have been incorrect,
33286    # since paths with space are more likely in Windows. Give it another try with the whole
33287    # argument.
33288    path="$complete"
33289    arguments="EOL"
33290    new_path=`$CYGPATH -u "$path"`
33291    new_path=`$WHICH "$new_path" 2> /dev/null`
33292    # bat and cmd files are not always considered executable in cygwin causing which
33293    # to not find them
33294    if test "x$new_path" = x \
33295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33297      new_path=`$CYGPATH -u "$path"`
33298    fi
33299    if test "x$new_path" = x; then
33300      # It's still not found. Now this is an unrecoverable error.
33301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33302$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33303      has_space=`$ECHO "$complete" | $GREP " "`
33304      if test "x$has_space" != x; then
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33307      fi
33308      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33309    fi
33310  fi
33311
33312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33315  # "foo.exe" is OK but "foo" is an error.
33316  #
33317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33318  # It is also a way to make sure we got the proper file name for the real test later on.
33319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33320  if test "x$test_shortpath" = x; then
33321    # Short path failed, file does not exist as specified.
33322    # Try adding .exe or .cmd
33323    if test -f "${new_path}.exe"; then
33324      input_to_shortpath="${new_path}.exe"
33325    elif test -f "${new_path}.cmd"; then
33326      input_to_shortpath="${new_path}.cmd"
33327    else
33328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33329$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33332      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33333    fi
33334  else
33335    input_to_shortpath="$new_path"
33336  fi
33337
33338  # Call helper function which possibly converts this using DOS-style short mode.
33339  # If so, the updated path is stored in $new_path.
33340  new_path="$input_to_shortpath"
33341
33342  input_path="$input_to_shortpath"
33343  # Check if we need to convert this using DOS-style short mode. If the path
33344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33345  # take no chances and rewrite it.
33346  # Note: m4 eats our [], so we need to use [ and ] instead.
33347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33348  if test "x$has_forbidden_chars" != x; then
33349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33353      # Going to short mode and back again did indeed matter. Since short mode is
33354      # case insensitive, let's make it lowercase to improve readability.
33355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33356      # Now convert it back to Unix-stile (cygpath)
33357      input_path=`$CYGPATH -u "$shortmode_path"`
33358      new_path="$input_path"
33359    fi
33360  fi
33361
33362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33363  if test "x$test_cygdrive_prefix" = x; then
33364    # As a simple fix, exclude /usr/bin since it's not a real path.
33365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33367      # a path prefixed by /cygdrive for fixpath to work.
33368      new_path="$CYGWIN_ROOT_PATH$input_path"
33369    fi
33370  fi
33371
33372  # remove trailing .exe if any
33373  new_path="${new_path/%.exe/}"
33374
33375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376
33377  # First separate the path from the arguments. This will split at the first
33378  # space.
33379  complete="$AR"
33380  path="${complete%% *}"
33381  tmp="$complete EOL"
33382  arguments="${tmp#* }"
33383
33384  # Input might be given as Windows format, start by converting to
33385  # unix format.
33386  new_path="$path"
33387
33388  windows_path="$new_path"
33389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390    unix_path=`$CYGPATH -u "$windows_path"`
33391    new_path="$unix_path"
33392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33394    new_path="$unix_path"
33395  fi
33396
33397
33398  # Now try to locate executable using which
33399  new_path=`$WHICH "$new_path" 2> /dev/null`
33400
33401  if test "x$new_path" = x; then
33402    # Oops. Which didn't find the executable.
33403    # The splitting of arguments from the executable at a space might have been incorrect,
33404    # since paths with space are more likely in Windows. Give it another try with the whole
33405    # argument.
33406    path="$complete"
33407    arguments="EOL"
33408    new_path="$path"
33409
33410  windows_path="$new_path"
33411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33412    unix_path=`$CYGPATH -u "$windows_path"`
33413    new_path="$unix_path"
33414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33416    new_path="$unix_path"
33417  fi
33418
33419
33420    new_path=`$WHICH "$new_path" 2> /dev/null`
33421    # bat and cmd files are not always considered executable in MSYS causing which
33422    # to not find them
33423    if test "x$new_path" = x \
33424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33426      new_path="$path"
33427
33428  windows_path="$new_path"
33429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33430    unix_path=`$CYGPATH -u "$windows_path"`
33431    new_path="$unix_path"
33432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33434    new_path="$unix_path"
33435  fi
33436
33437    fi
33438
33439    if test "x$new_path" = x; then
33440      # It's still not found. Now this is an unrecoverable error.
33441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33442$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33443      has_space=`$ECHO "$complete" | $GREP " "`
33444      if test "x$has_space" != x; then
33445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33447      fi
33448      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33449    fi
33450  fi
33451
33452  # Now new_path has a complete unix path to the binary
33453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33454    # Keep paths in /bin as-is, but remove trailing .exe if any
33455    new_path="${new_path/%.exe/}"
33456    # Do not save /bin paths to all_fixpath_prefixes!
33457  else
33458    # Not in mixed or Windows style, start by that.
33459    new_path=`cmd //c echo $new_path`
33460
33461  input_path="$new_path"
33462  # Check if we need to convert this using DOS-style short mode. If the path
33463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33464  # take no chances and rewrite it.
33465  # Note: m4 eats our [], so we need to use [ and ] instead.
33466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33467  if test "x$has_forbidden_chars" != x; then
33468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33470  fi
33471
33472    # Output is in $new_path
33473
33474  windows_path="$new_path"
33475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33476    unix_path=`$CYGPATH -u "$windows_path"`
33477    new_path="$unix_path"
33478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33480    new_path="$unix_path"
33481  fi
33482
33483    # remove trailing .exe if any
33484    new_path="${new_path/%.exe/}"
33485
33486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33488  fi
33489
33490    else
33491      # We're on a unix platform. Hooray! :)
33492      # First separate the path from the arguments. This will split at the first
33493      # space.
33494      complete="$AR"
33495      path="${complete%% *}"
33496      tmp="$complete EOL"
33497      arguments="${tmp#* }"
33498
33499      # Cannot rely on the command "which" here since it doesn't always work.
33500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33501      if test -z "$is_absolute_path"; then
33502        # Path to executable is not absolute. Find it.
33503        IFS_save="$IFS"
33504        IFS=:
33505        for p in $PATH; do
33506          if test -f "$p/$path" && test -x "$p/$path"; then
33507            new_path="$p/$path"
33508            break
33509          fi
33510        done
33511        IFS="$IFS_save"
33512      else
33513        # This is an absolute path, we can use it without further modifications.
33514        new_path="$path"
33515      fi
33516
33517      if test "x$new_path" = x; then
33518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33519$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33520        has_space=`$ECHO "$complete" | $GREP " "`
33521        if test "x$has_space" != x; then
33522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33524        fi
33525        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33526      fi
33527    fi
33528
33529    # Now join together the path and the arguments once again
33530    if test "x$arguments" != xEOL; then
33531      new_complete="$new_path ${arguments% *}"
33532    else
33533      new_complete="$new_path"
33534    fi
33535
33536    if test "x$complete" != "x$new_complete"; then
33537      AR="$new_complete"
33538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33539$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33540    fi
33541  fi
33542
33543
33544
33545  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33546    ac_ext=m
33547ac_cpp='$OBJCPP $CPPFLAGS'
33548ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33549ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33550ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33551if test -n "$ac_tool_prefix"; then
33552  for ac_prog in gcc objcc objc cc CC
33553  do
33554    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33555set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33557$as_echo_n "checking for $ac_word... " >&6; }
33558if ${ac_cv_prog_OBJC+:} false; then :
33559  $as_echo_n "(cached) " >&6
33560else
33561  if test -n "$OBJC"; then
33562  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33563else
33564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33565for as_dir in $PATH
33566do
33567  IFS=$as_save_IFS
33568  test -z "$as_dir" && as_dir=.
33569    for ac_exec_ext in '' $ac_executable_extensions; do
33570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33571    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33573    break 2
33574  fi
33575done
33576  done
33577IFS=$as_save_IFS
33578
33579fi
33580fi
33581OBJC=$ac_cv_prog_OBJC
33582if test -n "$OBJC"; then
33583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33584$as_echo "$OBJC" >&6; }
33585else
33586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33587$as_echo "no" >&6; }
33588fi
33589
33590
33591    test -n "$OBJC" && break
33592  done
33593fi
33594if test -z "$OBJC"; then
33595  ac_ct_OBJC=$OBJC
33596  for ac_prog in gcc objcc objc cc CC
33597do
33598  # Extract the first word of "$ac_prog", so it can be a program name with args.
33599set dummy $ac_prog; ac_word=$2
33600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33601$as_echo_n "checking for $ac_word... " >&6; }
33602if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33603  $as_echo_n "(cached) " >&6
33604else
33605  if test -n "$ac_ct_OBJC"; then
33606  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33607else
33608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33609for as_dir in $PATH
33610do
33611  IFS=$as_save_IFS
33612  test -z "$as_dir" && as_dir=.
33613    for ac_exec_ext in '' $ac_executable_extensions; do
33614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33615    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33617    break 2
33618  fi
33619done
33620  done
33621IFS=$as_save_IFS
33622
33623fi
33624fi
33625ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33626if test -n "$ac_ct_OBJC"; then
33627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33628$as_echo "$ac_ct_OBJC" >&6; }
33629else
33630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33631$as_echo "no" >&6; }
33632fi
33633
33634
33635  test -n "$ac_ct_OBJC" && break
33636done
33637
33638  if test "x$ac_ct_OBJC" = x; then
33639    OBJC="gcc"
33640  else
33641    case $cross_compiling:$ac_tool_warned in
33642yes:)
33643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33645ac_tool_warned=yes ;;
33646esac
33647    OBJC=$ac_ct_OBJC
33648  fi
33649fi
33650
33651# Provide some information about the compiler.
33652$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33653set X $ac_compile
33654ac_compiler=$2
33655for ac_option in --version -v -V -qversion; do
33656  { { ac_try="$ac_compiler $ac_option >&5"
33657case "(($ac_try" in
33658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33659  *) ac_try_echo=$ac_try;;
33660esac
33661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33662$as_echo "$ac_try_echo"; } >&5
33663  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33664  ac_status=$?
33665  if test -s conftest.err; then
33666    sed '10a\
33667... rest of stderr output deleted ...
33668         10q' conftest.err >conftest.er1
33669    cat conftest.er1 >&5
33670  fi
33671  rm -f conftest.er1 conftest.err
33672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33673  test $ac_status = 0; }
33674done
33675
33676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33677$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33678if ${ac_cv_objc_compiler_gnu+:} false; then :
33679  $as_echo_n "(cached) " >&6
33680else
33681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33682/* end confdefs.h.  */
33683
33684int
33685main ()
33686{
33687#ifndef __GNUC__
33688       choke me
33689#endif
33690
33691  ;
33692  return 0;
33693}
33694_ACEOF
33695if ac_fn_objc_try_compile "$LINENO"; then :
33696  ac_compiler_gnu=yes
33697else
33698  ac_compiler_gnu=no
33699fi
33700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33701ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33702
33703fi
33704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33705$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33706if test $ac_compiler_gnu = yes; then
33707  GOBJC=yes
33708else
33709  GOBJC=
33710fi
33711ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33712ac_save_OBJCFLAGS=$OBJCFLAGS
33713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33714$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33715if ${ac_cv_prog_objc_g+:} false; then :
33716  $as_echo_n "(cached) " >&6
33717else
33718  ac_save_objc_werror_flag=$ac_objc_werror_flag
33719   ac_objc_werror_flag=yes
33720   ac_cv_prog_objc_g=no
33721   OBJCFLAGS="-g"
33722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33723/* end confdefs.h.  */
33724
33725int
33726main ()
33727{
33728
33729  ;
33730  return 0;
33731}
33732_ACEOF
33733if ac_fn_objc_try_compile "$LINENO"; then :
33734  ac_cv_prog_objc_g=yes
33735else
33736  OBJCFLAGS=""
33737      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33738/* end confdefs.h.  */
33739
33740int
33741main ()
33742{
33743
33744  ;
33745  return 0;
33746}
33747_ACEOF
33748if ac_fn_objc_try_compile "$LINENO"; then :
33749
33750else
33751  ac_objc_werror_flag=$ac_save_objc_werror_flag
33752	 OBJCFLAGS="-g"
33753	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33754/* end confdefs.h.  */
33755
33756int
33757main ()
33758{
33759
33760  ;
33761  return 0;
33762}
33763_ACEOF
33764if ac_fn_objc_try_compile "$LINENO"; then :
33765  ac_cv_prog_objc_g=yes
33766fi
33767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33768fi
33769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33770fi
33771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33772   ac_objc_werror_flag=$ac_save_objc_werror_flag
33773fi
33774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33775$as_echo "$ac_cv_prog_objc_g" >&6; }
33776if test "$ac_test_OBJCFLAGS" = set; then
33777  OBJCFLAGS=$ac_save_OBJCFLAGS
33778elif test $ac_cv_prog_objc_g = yes; then
33779  if test "$GOBJC" = yes; then
33780    OBJCFLAGS="-g -O2"
33781  else
33782    OBJCFLAGS="-g"
33783  fi
33784else
33785  if test "$GOBJC" = yes; then
33786    OBJCFLAGS="-O2"
33787  else
33788    OBJCFLAGS=
33789  fi
33790fi
33791ac_ext=cpp
33792ac_cpp='$CXXCPP $CPPFLAGS'
33793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33796
33797
33798  # Only process if variable expands to non-empty
33799
33800  if test "x$OBJC" != x; then
33801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33802
33803  # First separate the path from the arguments. This will split at the first
33804  # space.
33805  complete="$OBJC"
33806  path="${complete%% *}"
33807  tmp="$complete EOL"
33808  arguments="${tmp#* }"
33809
33810  # Input might be given as Windows format, start by converting to
33811  # unix format.
33812  new_path=`$CYGPATH -u "$path"`
33813
33814  # Now try to locate executable using which
33815  new_path=`$WHICH "$new_path" 2> /dev/null`
33816  # bat and cmd files are not always considered executable in cygwin causing which
33817  # to not find them
33818  if test "x$new_path" = x \
33819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33821    new_path=`$CYGPATH -u "$path"`
33822  fi
33823  if test "x$new_path" = x; then
33824    # Oops. Which didn't find the executable.
33825    # The splitting of arguments from the executable at a space might have been incorrect,
33826    # since paths with space are more likely in Windows. Give it another try with the whole
33827    # argument.
33828    path="$complete"
33829    arguments="EOL"
33830    new_path=`$CYGPATH -u "$path"`
33831    new_path=`$WHICH "$new_path" 2> /dev/null`
33832    # bat and cmd files are not always considered executable in cygwin causing which
33833    # to not find them
33834    if test "x$new_path" = x \
33835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33837      new_path=`$CYGPATH -u "$path"`
33838    fi
33839    if test "x$new_path" = x; then
33840      # It's still not found. Now this is an unrecoverable error.
33841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33842$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33843      has_space=`$ECHO "$complete" | $GREP " "`
33844      if test "x$has_space" != x; then
33845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33847      fi
33848      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33849    fi
33850  fi
33851
33852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33855  # "foo.exe" is OK but "foo" is an error.
33856  #
33857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33858  # It is also a way to make sure we got the proper file name for the real test later on.
33859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33860  if test "x$test_shortpath" = x; then
33861    # Short path failed, file does not exist as specified.
33862    # Try adding .exe or .cmd
33863    if test -f "${new_path}.exe"; then
33864      input_to_shortpath="${new_path}.exe"
33865    elif test -f "${new_path}.cmd"; then
33866      input_to_shortpath="${new_path}.cmd"
33867    else
33868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33869$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33872      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33873    fi
33874  else
33875    input_to_shortpath="$new_path"
33876  fi
33877
33878  # Call helper function which possibly converts this using DOS-style short mode.
33879  # If so, the updated path is stored in $new_path.
33880  new_path="$input_to_shortpath"
33881
33882  input_path="$input_to_shortpath"
33883  # Check if we need to convert this using DOS-style short mode. If the path
33884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33885  # take no chances and rewrite it.
33886  # Note: m4 eats our [], so we need to use [ and ] instead.
33887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33888  if test "x$has_forbidden_chars" != x; then
33889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33893      # Going to short mode and back again did indeed matter. Since short mode is
33894      # case insensitive, let's make it lowercase to improve readability.
33895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33896      # Now convert it back to Unix-stile (cygpath)
33897      input_path=`$CYGPATH -u "$shortmode_path"`
33898      new_path="$input_path"
33899    fi
33900  fi
33901
33902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33903  if test "x$test_cygdrive_prefix" = x; then
33904    # As a simple fix, exclude /usr/bin since it's not a real path.
33905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33907      # a path prefixed by /cygdrive for fixpath to work.
33908      new_path="$CYGWIN_ROOT_PATH$input_path"
33909    fi
33910  fi
33911
33912  # remove trailing .exe if any
33913  new_path="${new_path/%.exe/}"
33914
33915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33916
33917  # First separate the path from the arguments. This will split at the first
33918  # space.
33919  complete="$OBJC"
33920  path="${complete%% *}"
33921  tmp="$complete EOL"
33922  arguments="${tmp#* }"
33923
33924  # Input might be given as Windows format, start by converting to
33925  # unix format.
33926  new_path="$path"
33927
33928  windows_path="$new_path"
33929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33930    unix_path=`$CYGPATH -u "$windows_path"`
33931    new_path="$unix_path"
33932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33934    new_path="$unix_path"
33935  fi
33936
33937
33938  # Now try to locate executable using which
33939  new_path=`$WHICH "$new_path" 2> /dev/null`
33940
33941  if test "x$new_path" = x; then
33942    # Oops. Which didn't find the executable.
33943    # The splitting of arguments from the executable at a space might have been incorrect,
33944    # since paths with space are more likely in Windows. Give it another try with the whole
33945    # argument.
33946    path="$complete"
33947    arguments="EOL"
33948    new_path="$path"
33949
33950  windows_path="$new_path"
33951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952    unix_path=`$CYGPATH -u "$windows_path"`
33953    new_path="$unix_path"
33954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33956    new_path="$unix_path"
33957  fi
33958
33959
33960    new_path=`$WHICH "$new_path" 2> /dev/null`
33961    # bat and cmd files are not always considered executable in MSYS causing which
33962    # to not find them
33963    if test "x$new_path" = x \
33964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33966      new_path="$path"
33967
33968  windows_path="$new_path"
33969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33970    unix_path=`$CYGPATH -u "$windows_path"`
33971    new_path="$unix_path"
33972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33974    new_path="$unix_path"
33975  fi
33976
33977    fi
33978
33979    if test "x$new_path" = x; then
33980      # It's still not found. Now this is an unrecoverable error.
33981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33983      has_space=`$ECHO "$complete" | $GREP " "`
33984      if test "x$has_space" != x; then
33985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33987      fi
33988      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Now new_path has a complete unix path to the binary
33993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33994    # Keep paths in /bin as-is, but remove trailing .exe if any
33995    new_path="${new_path/%.exe/}"
33996    # Do not save /bin paths to all_fixpath_prefixes!
33997  else
33998    # Not in mixed or Windows style, start by that.
33999    new_path=`cmd //c echo $new_path`
34000
34001  input_path="$new_path"
34002  # Check if we need to convert this using DOS-style short mode. If the path
34003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34004  # take no chances and rewrite it.
34005  # Note: m4 eats our [], so we need to use [ and ] instead.
34006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34007  if test "x$has_forbidden_chars" != x; then
34008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34010  fi
34011
34012    # Output is in $new_path
34013
34014  windows_path="$new_path"
34015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34016    unix_path=`$CYGPATH -u "$windows_path"`
34017    new_path="$unix_path"
34018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34020    new_path="$unix_path"
34021  fi
34022
34023    # remove trailing .exe if any
34024    new_path="${new_path/%.exe/}"
34025
34026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34028  fi
34029
34030    else
34031      # We're on a unix platform. Hooray! :)
34032      # First separate the path from the arguments. This will split at the first
34033      # space.
34034      complete="$OBJC"
34035      path="${complete%% *}"
34036      tmp="$complete EOL"
34037      arguments="${tmp#* }"
34038
34039      # Cannot rely on the command "which" here since it doesn't always work.
34040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34041      if test -z "$is_absolute_path"; then
34042        # Path to executable is not absolute. Find it.
34043        IFS_save="$IFS"
34044        IFS=:
34045        for p in $PATH; do
34046          if test -f "$p/$path" && test -x "$p/$path"; then
34047            new_path="$p/$path"
34048            break
34049          fi
34050        done
34051        IFS="$IFS_save"
34052      else
34053        # This is an absolute path, we can use it without further modifications.
34054        new_path="$path"
34055      fi
34056
34057      if test "x$new_path" = x; then
34058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
34059$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
34060        has_space=`$ECHO "$complete" | $GREP " "`
34061        if test "x$has_space" != x; then
34062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34064        fi
34065        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
34066      fi
34067    fi
34068
34069    # Now join together the path and the arguments once again
34070    if test "x$arguments" != xEOL; then
34071      new_complete="$new_path ${arguments% *}"
34072    else
34073      new_complete="$new_path"
34074    fi
34075
34076    if test "x$complete" != "x$new_complete"; then
34077      OBJC="$new_complete"
34078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
34079$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
34080    fi
34081  fi
34082
34083
34084
34085  # Publish this variable in the help.
34086
34087
34088  if test "x$LIPO" = x; then
34089    # The variable is not set by user, try to locate tool using the code snippet
34090    for ac_prog in lipo
34091do
34092  # Extract the first word of "$ac_prog", so it can be a program name with args.
34093set dummy $ac_prog; ac_word=$2
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34095$as_echo_n "checking for $ac_word... " >&6; }
34096if ${ac_cv_path_LIPO+:} false; then :
34097  $as_echo_n "(cached) " >&6
34098else
34099  case $LIPO in
34100  [\\/]* | ?:[\\/]*)
34101  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34102  ;;
34103  *)
34104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34105for as_dir in $PATH
34106do
34107  IFS=$as_save_IFS
34108  test -z "$as_dir" && as_dir=.
34109    for ac_exec_ext in '' $ac_executable_extensions; do
34110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34111    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34113    break 2
34114  fi
34115done
34116  done
34117IFS=$as_save_IFS
34118
34119  ;;
34120esac
34121fi
34122LIPO=$ac_cv_path_LIPO
34123if test -n "$LIPO"; then
34124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34125$as_echo "$LIPO" >&6; }
34126else
34127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34128$as_echo "no" >&6; }
34129fi
34130
34131
34132  test -n "$LIPO" && break
34133done
34134
34135  else
34136    # The variable is set, but is it from the command line or the environment?
34137
34138    # Try to remove the string !LIPO! from our list.
34139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34141      # If it failed, the variable was not from the command line. Ignore it,
34142      # but warn the user (except for BASH, which is always set by the calling BASH).
34143      if test "xLIPO" != xBASH; then
34144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34145$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34146      fi
34147      # Try to locate tool using the code snippet
34148      for ac_prog in lipo
34149do
34150  # Extract the first word of "$ac_prog", so it can be a program name with args.
34151set dummy $ac_prog; ac_word=$2
34152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34153$as_echo_n "checking for $ac_word... " >&6; }
34154if ${ac_cv_path_LIPO+:} false; then :
34155  $as_echo_n "(cached) " >&6
34156else
34157  case $LIPO in
34158  [\\/]* | ?:[\\/]*)
34159  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34160  ;;
34161  *)
34162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34163for as_dir in $PATH
34164do
34165  IFS=$as_save_IFS
34166  test -z "$as_dir" && as_dir=.
34167    for ac_exec_ext in '' $ac_executable_extensions; do
34168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34169    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34171    break 2
34172  fi
34173done
34174  done
34175IFS=$as_save_IFS
34176
34177  ;;
34178esac
34179fi
34180LIPO=$ac_cv_path_LIPO
34181if test -n "$LIPO"; then
34182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34183$as_echo "$LIPO" >&6; }
34184else
34185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34186$as_echo "no" >&6; }
34187fi
34188
34189
34190  test -n "$LIPO" && break
34191done
34192
34193    else
34194      # If it succeeded, then it was overridden by the user. We will use it
34195      # for the tool.
34196
34197      # First remove it from the list of overridden variables, so we can test
34198      # for unknown variables in the end.
34199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34200
34201      # Check if the provided tool contains a complete path.
34202      tool_specified="$LIPO"
34203      tool_basename="${tool_specified##*/}"
34204      if test "x$tool_basename" = "x$tool_specified"; then
34205        # A command without a complete path is provided, search $PATH.
34206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34207$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34208        # Extract the first word of "$tool_basename", so it can be a program name with args.
34209set dummy $tool_basename; ac_word=$2
34210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34211$as_echo_n "checking for $ac_word... " >&6; }
34212if ${ac_cv_path_LIPO+:} false; then :
34213  $as_echo_n "(cached) " >&6
34214else
34215  case $LIPO in
34216  [\\/]* | ?:[\\/]*)
34217  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34218  ;;
34219  *)
34220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34221for as_dir in $PATH
34222do
34223  IFS=$as_save_IFS
34224  test -z "$as_dir" && as_dir=.
34225    for ac_exec_ext in '' $ac_executable_extensions; do
34226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34227    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34229    break 2
34230  fi
34231done
34232  done
34233IFS=$as_save_IFS
34234
34235  ;;
34236esac
34237fi
34238LIPO=$ac_cv_path_LIPO
34239if test -n "$LIPO"; then
34240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34241$as_echo "$LIPO" >&6; }
34242else
34243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34244$as_echo "no" >&6; }
34245fi
34246
34247
34248        if test "x$LIPO" = x; then
34249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34250        fi
34251      else
34252        # Otherwise we believe it is a complete path. Use it as it is.
34253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34254$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34256$as_echo_n "checking for LIPO... " >&6; }
34257        if test ! -x "$tool_specified"; then
34258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34259$as_echo "not found" >&6; }
34260          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34261        fi
34262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34263$as_echo "$tool_specified" >&6; }
34264      fi
34265    fi
34266  fi
34267
34268
34269
34270  # Only process if variable expands to non-empty
34271
34272  if test "x$LIPO" != x; then
34273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34274
34275  # First separate the path from the arguments. This will split at the first
34276  # space.
34277  complete="$LIPO"
34278  path="${complete%% *}"
34279  tmp="$complete EOL"
34280  arguments="${tmp#* }"
34281
34282  # Input might be given as Windows format, start by converting to
34283  # unix format.
34284  new_path=`$CYGPATH -u "$path"`
34285
34286  # Now try to locate executable using which
34287  new_path=`$WHICH "$new_path" 2> /dev/null`
34288  # bat and cmd files are not always considered executable in cygwin causing which
34289  # to not find them
34290  if test "x$new_path" = x \
34291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34293    new_path=`$CYGPATH -u "$path"`
34294  fi
34295  if test "x$new_path" = x; then
34296    # Oops. Which didn't find the executable.
34297    # The splitting of arguments from the executable at a space might have been incorrect,
34298    # since paths with space are more likely in Windows. Give it another try with the whole
34299    # argument.
34300    path="$complete"
34301    arguments="EOL"
34302    new_path=`$CYGPATH -u "$path"`
34303    new_path=`$WHICH "$new_path" 2> /dev/null`
34304    # bat and cmd files are not always considered executable in cygwin causing which
34305    # to not find them
34306    if test "x$new_path" = x \
34307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34309      new_path=`$CYGPATH -u "$path"`
34310    fi
34311    if test "x$new_path" = x; then
34312      # It's still not found. Now this is an unrecoverable error.
34313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34314$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34315      has_space=`$ECHO "$complete" | $GREP " "`
34316      if test "x$has_space" != x; then
34317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34319      fi
34320      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34321    fi
34322  fi
34323
34324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34327  # "foo.exe" is OK but "foo" is an error.
34328  #
34329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34330  # It is also a way to make sure we got the proper file name for the real test later on.
34331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34332  if test "x$test_shortpath" = x; then
34333    # Short path failed, file does not exist as specified.
34334    # Try adding .exe or .cmd
34335    if test -f "${new_path}.exe"; then
34336      input_to_shortpath="${new_path}.exe"
34337    elif test -f "${new_path}.cmd"; then
34338      input_to_shortpath="${new_path}.cmd"
34339    else
34340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34341$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34344      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34345    fi
34346  else
34347    input_to_shortpath="$new_path"
34348  fi
34349
34350  # Call helper function which possibly converts this using DOS-style short mode.
34351  # If so, the updated path is stored in $new_path.
34352  new_path="$input_to_shortpath"
34353
34354  input_path="$input_to_shortpath"
34355  # Check if we need to convert this using DOS-style short mode. If the path
34356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34357  # take no chances and rewrite it.
34358  # Note: m4 eats our [], so we need to use [ and ] instead.
34359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34360  if test "x$has_forbidden_chars" != x; then
34361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34365      # Going to short mode and back again did indeed matter. Since short mode is
34366      # case insensitive, let's make it lowercase to improve readability.
34367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34368      # Now convert it back to Unix-stile (cygpath)
34369      input_path=`$CYGPATH -u "$shortmode_path"`
34370      new_path="$input_path"
34371    fi
34372  fi
34373
34374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34375  if test "x$test_cygdrive_prefix" = x; then
34376    # As a simple fix, exclude /usr/bin since it's not a real path.
34377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34379      # a path prefixed by /cygdrive for fixpath to work.
34380      new_path="$CYGWIN_ROOT_PATH$input_path"
34381    fi
34382  fi
34383
34384  # remove trailing .exe if any
34385  new_path="${new_path/%.exe/}"
34386
34387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34388
34389  # First separate the path from the arguments. This will split at the first
34390  # space.
34391  complete="$LIPO"
34392  path="${complete%% *}"
34393  tmp="$complete EOL"
34394  arguments="${tmp#* }"
34395
34396  # Input might be given as Windows format, start by converting to
34397  # unix format.
34398  new_path="$path"
34399
34400  windows_path="$new_path"
34401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34402    unix_path=`$CYGPATH -u "$windows_path"`
34403    new_path="$unix_path"
34404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34406    new_path="$unix_path"
34407  fi
34408
34409
34410  # Now try to locate executable using which
34411  new_path=`$WHICH "$new_path" 2> /dev/null`
34412
34413  if test "x$new_path" = x; then
34414    # Oops. Which didn't find the executable.
34415    # The splitting of arguments from the executable at a space might have been incorrect,
34416    # since paths with space are more likely in Windows. Give it another try with the whole
34417    # argument.
34418    path="$complete"
34419    arguments="EOL"
34420    new_path="$path"
34421
34422  windows_path="$new_path"
34423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34424    unix_path=`$CYGPATH -u "$windows_path"`
34425    new_path="$unix_path"
34426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34428    new_path="$unix_path"
34429  fi
34430
34431
34432    new_path=`$WHICH "$new_path" 2> /dev/null`
34433    # bat and cmd files are not always considered executable in MSYS causing which
34434    # to not find them
34435    if test "x$new_path" = x \
34436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34438      new_path="$path"
34439
34440  windows_path="$new_path"
34441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34442    unix_path=`$CYGPATH -u "$windows_path"`
34443    new_path="$unix_path"
34444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34446    new_path="$unix_path"
34447  fi
34448
34449    fi
34450
34451    if test "x$new_path" = x; then
34452      # It's still not found. Now this is an unrecoverable error.
34453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34454$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34455      has_space=`$ECHO "$complete" | $GREP " "`
34456      if test "x$has_space" != x; then
34457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34459      fi
34460      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34461    fi
34462  fi
34463
34464  # Now new_path has a complete unix path to the binary
34465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34466    # Keep paths in /bin as-is, but remove trailing .exe if any
34467    new_path="${new_path/%.exe/}"
34468    # Do not save /bin paths to all_fixpath_prefixes!
34469  else
34470    # Not in mixed or Windows style, start by that.
34471    new_path=`cmd //c echo $new_path`
34472
34473  input_path="$new_path"
34474  # Check if we need to convert this using DOS-style short mode. If the path
34475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34476  # take no chances and rewrite it.
34477  # Note: m4 eats our [], so we need to use [ and ] instead.
34478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34479  if test "x$has_forbidden_chars" != x; then
34480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34482  fi
34483
34484    # Output is in $new_path
34485
34486  windows_path="$new_path"
34487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34488    unix_path=`$CYGPATH -u "$windows_path"`
34489    new_path="$unix_path"
34490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34492    new_path="$unix_path"
34493  fi
34494
34495    # remove trailing .exe if any
34496    new_path="${new_path/%.exe/}"
34497
34498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34500  fi
34501
34502    else
34503      # We're on a unix platform. Hooray! :)
34504      # First separate the path from the arguments. This will split at the first
34505      # space.
34506      complete="$LIPO"
34507      path="${complete%% *}"
34508      tmp="$complete EOL"
34509      arguments="${tmp#* }"
34510
34511      # Cannot rely on the command "which" here since it doesn't always work.
34512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34513      if test -z "$is_absolute_path"; then
34514        # Path to executable is not absolute. Find it.
34515        IFS_save="$IFS"
34516        IFS=:
34517        for p in $PATH; do
34518          if test -f "$p/$path" && test -x "$p/$path"; then
34519            new_path="$p/$path"
34520            break
34521          fi
34522        done
34523        IFS="$IFS_save"
34524      else
34525        # This is an absolute path, we can use it without further modifications.
34526        new_path="$path"
34527      fi
34528
34529      if test "x$new_path" = x; then
34530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34531$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34532        has_space=`$ECHO "$complete" | $GREP " "`
34533        if test "x$has_space" != x; then
34534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34536        fi
34537        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34538      fi
34539    fi
34540
34541    # Now join together the path and the arguments once again
34542    if test "x$arguments" != xEOL; then
34543      new_complete="$new_path ${arguments% *}"
34544    else
34545      new_complete="$new_path"
34546    fi
34547
34548    if test "x$complete" != "x$new_complete"; then
34549      LIPO="$new_complete"
34550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34551$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34552    fi
34553  fi
34554
34555  else
34556    OBJC=
34557  fi
34558
34559  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34560    # Extract the first word of "mt", so it can be a program name with args.
34561set dummy mt; ac_word=$2
34562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34563$as_echo_n "checking for $ac_word... " >&6; }
34564if ${ac_cv_prog_MT+:} false; then :
34565  $as_echo_n "(cached) " >&6
34566else
34567  if test -n "$MT"; then
34568  ac_cv_prog_MT="$MT" # Let the user override the test.
34569else
34570  ac_prog_rejected=no
34571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34572for as_dir in $PATH
34573do
34574  IFS=$as_save_IFS
34575  test -z "$as_dir" && as_dir=.
34576    for ac_exec_ext in '' $ac_executable_extensions; do
34577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34578    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34579       ac_prog_rejected=yes
34580       continue
34581     fi
34582    ac_cv_prog_MT="mt"
34583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34584    break 2
34585  fi
34586done
34587  done
34588IFS=$as_save_IFS
34589
34590if test $ac_prog_rejected = yes; then
34591  # We found a bogon in the path, so make sure we never use it.
34592  set dummy $ac_cv_prog_MT
34593  shift
34594  if test $# != 0; then
34595    # We chose a different compiler from the bogus one.
34596    # However, it has the same basename, so the bogon will be chosen
34597    # first if we set MT to just the basename; use the full file name.
34598    shift
34599    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34600  fi
34601fi
34602fi
34603fi
34604MT=$ac_cv_prog_MT
34605if test -n "$MT"; then
34606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34607$as_echo "$MT" >&6; }
34608else
34609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34610$as_echo "no" >&6; }
34611fi
34612
34613
34614
34615  # Only process if variable expands to non-empty
34616
34617  if test "x$MT" != x; then
34618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34619
34620  # First separate the path from the arguments. This will split at the first
34621  # space.
34622  complete="$MT"
34623  path="${complete%% *}"
34624  tmp="$complete EOL"
34625  arguments="${tmp#* }"
34626
34627  # Input might be given as Windows format, start by converting to
34628  # unix format.
34629  new_path=`$CYGPATH -u "$path"`
34630
34631  # Now try to locate executable using which
34632  new_path=`$WHICH "$new_path" 2> /dev/null`
34633  # bat and cmd files are not always considered executable in cygwin causing which
34634  # to not find them
34635  if test "x$new_path" = x \
34636      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34637      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34638    new_path=`$CYGPATH -u "$path"`
34639  fi
34640  if test "x$new_path" = x; then
34641    # Oops. Which didn't find the executable.
34642    # The splitting of arguments from the executable at a space might have been incorrect,
34643    # since paths with space are more likely in Windows. Give it another try with the whole
34644    # argument.
34645    path="$complete"
34646    arguments="EOL"
34647    new_path=`$CYGPATH -u "$path"`
34648    new_path=`$WHICH "$new_path" 2> /dev/null`
34649    # bat and cmd files are not always considered executable in cygwin causing which
34650    # to not find them
34651    if test "x$new_path" = x \
34652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34654      new_path=`$CYGPATH -u "$path"`
34655    fi
34656    if test "x$new_path" = x; then
34657      # It's still not found. Now this is an unrecoverable error.
34658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34659$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34660      has_space=`$ECHO "$complete" | $GREP " "`
34661      if test "x$has_space" != x; then
34662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34664      fi
34665      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34666    fi
34667  fi
34668
34669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34672  # "foo.exe" is OK but "foo" is an error.
34673  #
34674  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34675  # It is also a way to make sure we got the proper file name for the real test later on.
34676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34677  if test "x$test_shortpath" = x; then
34678    # Short path failed, file does not exist as specified.
34679    # Try adding .exe or .cmd
34680    if test -f "${new_path}.exe"; then
34681      input_to_shortpath="${new_path}.exe"
34682    elif test -f "${new_path}.cmd"; then
34683      input_to_shortpath="${new_path}.cmd"
34684    else
34685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34686$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34687      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34688$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34689      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34690    fi
34691  else
34692    input_to_shortpath="$new_path"
34693  fi
34694
34695  # Call helper function which possibly converts this using DOS-style short mode.
34696  # If so, the updated path is stored in $new_path.
34697  new_path="$input_to_shortpath"
34698
34699  input_path="$input_to_shortpath"
34700  # Check if we need to convert this using DOS-style short mode. If the path
34701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34702  # take no chances and rewrite it.
34703  # Note: m4 eats our [], so we need to use [ and ] instead.
34704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34705  if test "x$has_forbidden_chars" != x; then
34706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34710      # Going to short mode and back again did indeed matter. Since short mode is
34711      # case insensitive, let's make it lowercase to improve readability.
34712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34713      # Now convert it back to Unix-stile (cygpath)
34714      input_path=`$CYGPATH -u "$shortmode_path"`
34715      new_path="$input_path"
34716    fi
34717  fi
34718
34719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34720  if test "x$test_cygdrive_prefix" = x; then
34721    # As a simple fix, exclude /usr/bin since it's not a real path.
34722    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34724      # a path prefixed by /cygdrive for fixpath to work.
34725      new_path="$CYGWIN_ROOT_PATH$input_path"
34726    fi
34727  fi
34728
34729  # remove trailing .exe if any
34730  new_path="${new_path/%.exe/}"
34731
34732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733
34734  # First separate the path from the arguments. This will split at the first
34735  # space.
34736  complete="$MT"
34737  path="${complete%% *}"
34738  tmp="$complete EOL"
34739  arguments="${tmp#* }"
34740
34741  # Input might be given as Windows format, start by converting to
34742  # unix format.
34743  new_path="$path"
34744
34745  windows_path="$new_path"
34746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34747    unix_path=`$CYGPATH -u "$windows_path"`
34748    new_path="$unix_path"
34749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34751    new_path="$unix_path"
34752  fi
34753
34754
34755  # Now try to locate executable using which
34756  new_path=`$WHICH "$new_path" 2> /dev/null`
34757
34758  if test "x$new_path" = x; then
34759    # Oops. Which didn't find the executable.
34760    # The splitting of arguments from the executable at a space might have been incorrect,
34761    # since paths with space are more likely in Windows. Give it another try with the whole
34762    # argument.
34763    path="$complete"
34764    arguments="EOL"
34765    new_path="$path"
34766
34767  windows_path="$new_path"
34768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34769    unix_path=`$CYGPATH -u "$windows_path"`
34770    new_path="$unix_path"
34771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34773    new_path="$unix_path"
34774  fi
34775
34776
34777    new_path=`$WHICH "$new_path" 2> /dev/null`
34778    # bat and cmd files are not always considered executable in MSYS causing which
34779    # to not find them
34780    if test "x$new_path" = x \
34781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34783      new_path="$path"
34784
34785  windows_path="$new_path"
34786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34787    unix_path=`$CYGPATH -u "$windows_path"`
34788    new_path="$unix_path"
34789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34791    new_path="$unix_path"
34792  fi
34793
34794    fi
34795
34796    if test "x$new_path" = x; then
34797      # It's still not found. Now this is an unrecoverable error.
34798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34799$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34800      has_space=`$ECHO "$complete" | $GREP " "`
34801      if test "x$has_space" != x; then
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34804      fi
34805      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34806    fi
34807  fi
34808
34809  # Now new_path has a complete unix path to the binary
34810  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34811    # Keep paths in /bin as-is, but remove trailing .exe if any
34812    new_path="${new_path/%.exe/}"
34813    # Do not save /bin paths to all_fixpath_prefixes!
34814  else
34815    # Not in mixed or Windows style, start by that.
34816    new_path=`cmd //c echo $new_path`
34817
34818  input_path="$new_path"
34819  # Check if we need to convert this using DOS-style short mode. If the path
34820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34821  # take no chances and rewrite it.
34822  # Note: m4 eats our [], so we need to use [ and ] instead.
34823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34824  if test "x$has_forbidden_chars" != x; then
34825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34827  fi
34828
34829    # Output is in $new_path
34830
34831  windows_path="$new_path"
34832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34833    unix_path=`$CYGPATH -u "$windows_path"`
34834    new_path="$unix_path"
34835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34837    new_path="$unix_path"
34838  fi
34839
34840    # remove trailing .exe if any
34841    new_path="${new_path/%.exe/}"
34842
34843    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34844    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34845  fi
34846
34847    else
34848      # We're on a unix platform. Hooray! :)
34849      # First separate the path from the arguments. This will split at the first
34850      # space.
34851      complete="$MT"
34852      path="${complete%% *}"
34853      tmp="$complete EOL"
34854      arguments="${tmp#* }"
34855
34856      # Cannot rely on the command "which" here since it doesn't always work.
34857      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34858      if test -z "$is_absolute_path"; then
34859        # Path to executable is not absolute. Find it.
34860        IFS_save="$IFS"
34861        IFS=:
34862        for p in $PATH; do
34863          if test -f "$p/$path" && test -x "$p/$path"; then
34864            new_path="$p/$path"
34865            break
34866          fi
34867        done
34868        IFS="$IFS_save"
34869      else
34870        # This is an absolute path, we can use it without further modifications.
34871        new_path="$path"
34872      fi
34873
34874      if test "x$new_path" = x; then
34875        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34876$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34877        has_space=`$ECHO "$complete" | $GREP " "`
34878        if test "x$has_space" != x; then
34879          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34880$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34881        fi
34882        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34883      fi
34884    fi
34885
34886    # Now join together the path and the arguments once again
34887    if test "x$arguments" != xEOL; then
34888      new_complete="$new_path ${arguments% *}"
34889    else
34890      new_complete="$new_path"
34891    fi
34892
34893    if test "x$complete" != "x$new_complete"; then
34894      MT="$new_complete"
34895      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34896$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34897    fi
34898  fi
34899
34900    # Setup the resource compiler (RC)
34901    # Extract the first word of "rc", so it can be a program name with args.
34902set dummy rc; ac_word=$2
34903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34904$as_echo_n "checking for $ac_word... " >&6; }
34905if ${ac_cv_prog_RC+:} false; then :
34906  $as_echo_n "(cached) " >&6
34907else
34908  if test -n "$RC"; then
34909  ac_cv_prog_RC="$RC" # Let the user override the test.
34910else
34911  ac_prog_rejected=no
34912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34913for as_dir in $PATH
34914do
34915  IFS=$as_save_IFS
34916  test -z "$as_dir" && as_dir=.
34917    for ac_exec_ext in '' $ac_executable_extensions; do
34918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34919    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34920       ac_prog_rejected=yes
34921       continue
34922     fi
34923    ac_cv_prog_RC="rc"
34924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34925    break 2
34926  fi
34927done
34928  done
34929IFS=$as_save_IFS
34930
34931if test $ac_prog_rejected = yes; then
34932  # We found a bogon in the path, so make sure we never use it.
34933  set dummy $ac_cv_prog_RC
34934  shift
34935  if test $# != 0; then
34936    # We chose a different compiler from the bogus one.
34937    # However, it has the same basename, so the bogon will be chosen
34938    # first if we set RC to just the basename; use the full file name.
34939    shift
34940    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34941  fi
34942fi
34943fi
34944fi
34945RC=$ac_cv_prog_RC
34946if test -n "$RC"; then
34947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34948$as_echo "$RC" >&6; }
34949else
34950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34951$as_echo "no" >&6; }
34952fi
34953
34954
34955
34956  # Only process if variable expands to non-empty
34957
34958  if test "x$RC" != x; then
34959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34960
34961  # First separate the path from the arguments. This will split at the first
34962  # space.
34963  complete="$RC"
34964  path="${complete%% *}"
34965  tmp="$complete EOL"
34966  arguments="${tmp#* }"
34967
34968  # Input might be given as Windows format, start by converting to
34969  # unix format.
34970  new_path=`$CYGPATH -u "$path"`
34971
34972  # Now try to locate executable using which
34973  new_path=`$WHICH "$new_path" 2> /dev/null`
34974  # bat and cmd files are not always considered executable in cygwin causing which
34975  # to not find them
34976  if test "x$new_path" = x \
34977      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34978      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34979    new_path=`$CYGPATH -u "$path"`
34980  fi
34981  if test "x$new_path" = x; then
34982    # Oops. Which didn't find the executable.
34983    # The splitting of arguments from the executable at a space might have been incorrect,
34984    # since paths with space are more likely in Windows. Give it another try with the whole
34985    # argument.
34986    path="$complete"
34987    arguments="EOL"
34988    new_path=`$CYGPATH -u "$path"`
34989    new_path=`$WHICH "$new_path" 2> /dev/null`
34990    # bat and cmd files are not always considered executable in cygwin causing which
34991    # to not find them
34992    if test "x$new_path" = x \
34993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34995      new_path=`$CYGPATH -u "$path"`
34996    fi
34997    if test "x$new_path" = x; then
34998      # It's still not found. Now this is an unrecoverable error.
34999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35000$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35001      has_space=`$ECHO "$complete" | $GREP " "`
35002      if test "x$has_space" != x; then
35003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35005      fi
35006      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35007    fi
35008  fi
35009
35010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35013  # "foo.exe" is OK but "foo" is an error.
35014  #
35015  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35016  # It is also a way to make sure we got the proper file name for the real test later on.
35017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35018  if test "x$test_shortpath" = x; then
35019    # Short path failed, file does not exist as specified.
35020    # Try adding .exe or .cmd
35021    if test -f "${new_path}.exe"; then
35022      input_to_shortpath="${new_path}.exe"
35023    elif test -f "${new_path}.cmd"; then
35024      input_to_shortpath="${new_path}.cmd"
35025    else
35026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35027$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35030      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35031    fi
35032  else
35033    input_to_shortpath="$new_path"
35034  fi
35035
35036  # Call helper function which possibly converts this using DOS-style short mode.
35037  # If so, the updated path is stored in $new_path.
35038  new_path="$input_to_shortpath"
35039
35040  input_path="$input_to_shortpath"
35041  # Check if we need to convert this using DOS-style short mode. If the path
35042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35043  # take no chances and rewrite it.
35044  # Note: m4 eats our [], so we need to use [ and ] instead.
35045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35046  if test "x$has_forbidden_chars" != x; then
35047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35051      # Going to short mode and back again did indeed matter. Since short mode is
35052      # case insensitive, let's make it lowercase to improve readability.
35053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35054      # Now convert it back to Unix-stile (cygpath)
35055      input_path=`$CYGPATH -u "$shortmode_path"`
35056      new_path="$input_path"
35057    fi
35058  fi
35059
35060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35061  if test "x$test_cygdrive_prefix" = x; then
35062    # As a simple fix, exclude /usr/bin since it's not a real path.
35063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35065      # a path prefixed by /cygdrive for fixpath to work.
35066      new_path="$CYGWIN_ROOT_PATH$input_path"
35067    fi
35068  fi
35069
35070  # remove trailing .exe if any
35071  new_path="${new_path/%.exe/}"
35072
35073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35074
35075  # First separate the path from the arguments. This will split at the first
35076  # space.
35077  complete="$RC"
35078  path="${complete%% *}"
35079  tmp="$complete EOL"
35080  arguments="${tmp#* }"
35081
35082  # Input might be given as Windows format, start by converting to
35083  # unix format.
35084  new_path="$path"
35085
35086  windows_path="$new_path"
35087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35088    unix_path=`$CYGPATH -u "$windows_path"`
35089    new_path="$unix_path"
35090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35092    new_path="$unix_path"
35093  fi
35094
35095
35096  # Now try to locate executable using which
35097  new_path=`$WHICH "$new_path" 2> /dev/null`
35098
35099  if test "x$new_path" = x; then
35100    # Oops. Which didn't find the executable.
35101    # The splitting of arguments from the executable at a space might have been incorrect,
35102    # since paths with space are more likely in Windows. Give it another try with the whole
35103    # argument.
35104    path="$complete"
35105    arguments="EOL"
35106    new_path="$path"
35107
35108  windows_path="$new_path"
35109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35110    unix_path=`$CYGPATH -u "$windows_path"`
35111    new_path="$unix_path"
35112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35114    new_path="$unix_path"
35115  fi
35116
35117
35118    new_path=`$WHICH "$new_path" 2> /dev/null`
35119    # bat and cmd files are not always considered executable in MSYS causing which
35120    # to not find them
35121    if test "x$new_path" = x \
35122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35124      new_path="$path"
35125
35126  windows_path="$new_path"
35127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35128    unix_path=`$CYGPATH -u "$windows_path"`
35129    new_path="$unix_path"
35130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35132    new_path="$unix_path"
35133  fi
35134
35135    fi
35136
35137    if test "x$new_path" = x; then
35138      # It's still not found. Now this is an unrecoverable error.
35139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35140$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35141      has_space=`$ECHO "$complete" | $GREP " "`
35142      if test "x$has_space" != x; then
35143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35145      fi
35146      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35147    fi
35148  fi
35149
35150  # Now new_path has a complete unix path to the binary
35151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35152    # Keep paths in /bin as-is, but remove trailing .exe if any
35153    new_path="${new_path/%.exe/}"
35154    # Do not save /bin paths to all_fixpath_prefixes!
35155  else
35156    # Not in mixed or Windows style, start by that.
35157    new_path=`cmd //c echo $new_path`
35158
35159  input_path="$new_path"
35160  # Check if we need to convert this using DOS-style short mode. If the path
35161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35162  # take no chances and rewrite it.
35163  # Note: m4 eats our [], so we need to use [ and ] instead.
35164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35165  if test "x$has_forbidden_chars" != x; then
35166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35168  fi
35169
35170    # Output is in $new_path
35171
35172  windows_path="$new_path"
35173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35174    unix_path=`$CYGPATH -u "$windows_path"`
35175    new_path="$unix_path"
35176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35178    new_path="$unix_path"
35179  fi
35180
35181    # remove trailing .exe if any
35182    new_path="${new_path/%.exe/}"
35183
35184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35186  fi
35187
35188    else
35189      # We're on a unix platform. Hooray! :)
35190      # First separate the path from the arguments. This will split at the first
35191      # space.
35192      complete="$RC"
35193      path="${complete%% *}"
35194      tmp="$complete EOL"
35195      arguments="${tmp#* }"
35196
35197      # Cannot rely on the command "which" here since it doesn't always work.
35198      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35199      if test -z "$is_absolute_path"; then
35200        # Path to executable is not absolute. Find it.
35201        IFS_save="$IFS"
35202        IFS=:
35203        for p in $PATH; do
35204          if test -f "$p/$path" && test -x "$p/$path"; then
35205            new_path="$p/$path"
35206            break
35207          fi
35208        done
35209        IFS="$IFS_save"
35210      else
35211        # This is an absolute path, we can use it without further modifications.
35212        new_path="$path"
35213      fi
35214
35215      if test "x$new_path" = x; then
35216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35217$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35218        has_space=`$ECHO "$complete" | $GREP " "`
35219        if test "x$has_space" != x; then
35220          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35222        fi
35223        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35224      fi
35225    fi
35226
35227    # Now join together the path and the arguments once again
35228    if test "x$arguments" != xEOL; then
35229      new_complete="$new_path ${arguments% *}"
35230    else
35231      new_complete="$new_path"
35232    fi
35233
35234    if test "x$complete" != "x$new_complete"; then
35235      RC="$new_complete"
35236      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35237$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35238    fi
35239  fi
35240
35241    # Extract the first word of "dumpbin", so it can be a program name with args.
35242set dummy dumpbin; ac_word=$2
35243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35244$as_echo_n "checking for $ac_word... " >&6; }
35245if ${ac_cv_prog_DUMPBIN+:} false; then :
35246  $as_echo_n "(cached) " >&6
35247else
35248  if test -n "$DUMPBIN"; then
35249  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35250else
35251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35252for as_dir in $PATH
35253do
35254  IFS=$as_save_IFS
35255  test -z "$as_dir" && as_dir=.
35256    for ac_exec_ext in '' $ac_executable_extensions; do
35257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35258    ac_cv_prog_DUMPBIN="dumpbin"
35259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35260    break 2
35261  fi
35262done
35263  done
35264IFS=$as_save_IFS
35265
35266fi
35267fi
35268DUMPBIN=$ac_cv_prog_DUMPBIN
35269if test -n "$DUMPBIN"; then
35270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35271$as_echo "$DUMPBIN" >&6; }
35272else
35273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35274$as_echo "no" >&6; }
35275fi
35276
35277
35278
35279  # Only process if variable expands to non-empty
35280
35281  if test "x$DUMPBIN" != x; then
35282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35283
35284  # First separate the path from the arguments. This will split at the first
35285  # space.
35286  complete="$DUMPBIN"
35287  path="${complete%% *}"
35288  tmp="$complete EOL"
35289  arguments="${tmp#* }"
35290
35291  # Input might be given as Windows format, start by converting to
35292  # unix format.
35293  new_path=`$CYGPATH -u "$path"`
35294
35295  # Now try to locate executable using which
35296  new_path=`$WHICH "$new_path" 2> /dev/null`
35297  # bat and cmd files are not always considered executable in cygwin causing which
35298  # to not find them
35299  if test "x$new_path" = x \
35300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35302    new_path=`$CYGPATH -u "$path"`
35303  fi
35304  if test "x$new_path" = x; then
35305    # Oops. Which didn't find the executable.
35306    # The splitting of arguments from the executable at a space might have been incorrect,
35307    # since paths with space are more likely in Windows. Give it another try with the whole
35308    # argument.
35309    path="$complete"
35310    arguments="EOL"
35311    new_path=`$CYGPATH -u "$path"`
35312    new_path=`$WHICH "$new_path" 2> /dev/null`
35313    # bat and cmd files are not always considered executable in cygwin causing which
35314    # to not find them
35315    if test "x$new_path" = x \
35316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35318      new_path=`$CYGPATH -u "$path"`
35319    fi
35320    if test "x$new_path" = x; then
35321      # It's still not found. Now this is an unrecoverable error.
35322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35323$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35324      has_space=`$ECHO "$complete" | $GREP " "`
35325      if test "x$has_space" != x; then
35326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35328      fi
35329      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35330    fi
35331  fi
35332
35333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35336  # "foo.exe" is OK but "foo" is an error.
35337  #
35338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35339  # It is also a way to make sure we got the proper file name for the real test later on.
35340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35341  if test "x$test_shortpath" = x; then
35342    # Short path failed, file does not exist as specified.
35343    # Try adding .exe or .cmd
35344    if test -f "${new_path}.exe"; then
35345      input_to_shortpath="${new_path}.exe"
35346    elif test -f "${new_path}.cmd"; then
35347      input_to_shortpath="${new_path}.cmd"
35348    else
35349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35350$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35353      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35354    fi
35355  else
35356    input_to_shortpath="$new_path"
35357  fi
35358
35359  # Call helper function which possibly converts this using DOS-style short mode.
35360  # If so, the updated path is stored in $new_path.
35361  new_path="$input_to_shortpath"
35362
35363  input_path="$input_to_shortpath"
35364  # Check if we need to convert this using DOS-style short mode. If the path
35365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35366  # take no chances and rewrite it.
35367  # Note: m4 eats our [], so we need to use [ and ] instead.
35368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35369  if test "x$has_forbidden_chars" != x; then
35370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35374      # Going to short mode and back again did indeed matter. Since short mode is
35375      # case insensitive, let's make it lowercase to improve readability.
35376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35377      # Now convert it back to Unix-stile (cygpath)
35378      input_path=`$CYGPATH -u "$shortmode_path"`
35379      new_path="$input_path"
35380    fi
35381  fi
35382
35383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35384  if test "x$test_cygdrive_prefix" = x; then
35385    # As a simple fix, exclude /usr/bin since it's not a real path.
35386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35388      # a path prefixed by /cygdrive for fixpath to work.
35389      new_path="$CYGWIN_ROOT_PATH$input_path"
35390    fi
35391  fi
35392
35393  # remove trailing .exe if any
35394  new_path="${new_path/%.exe/}"
35395
35396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35397
35398  # First separate the path from the arguments. This will split at the first
35399  # space.
35400  complete="$DUMPBIN"
35401  path="${complete%% *}"
35402  tmp="$complete EOL"
35403  arguments="${tmp#* }"
35404
35405  # Input might be given as Windows format, start by converting to
35406  # unix format.
35407  new_path="$path"
35408
35409  windows_path="$new_path"
35410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411    unix_path=`$CYGPATH -u "$windows_path"`
35412    new_path="$unix_path"
35413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35415    new_path="$unix_path"
35416  fi
35417
35418
35419  # Now try to locate executable using which
35420  new_path=`$WHICH "$new_path" 2> /dev/null`
35421
35422  if test "x$new_path" = x; then
35423    # Oops. Which didn't find the executable.
35424    # The splitting of arguments from the executable at a space might have been incorrect,
35425    # since paths with space are more likely in Windows. Give it another try with the whole
35426    # argument.
35427    path="$complete"
35428    arguments="EOL"
35429    new_path="$path"
35430
35431  windows_path="$new_path"
35432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433    unix_path=`$CYGPATH -u "$windows_path"`
35434    new_path="$unix_path"
35435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35437    new_path="$unix_path"
35438  fi
35439
35440
35441    new_path=`$WHICH "$new_path" 2> /dev/null`
35442    # bat and cmd files are not always considered executable in MSYS causing which
35443    # to not find them
35444    if test "x$new_path" = x \
35445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35447      new_path="$path"
35448
35449  windows_path="$new_path"
35450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451    unix_path=`$CYGPATH -u "$windows_path"`
35452    new_path="$unix_path"
35453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35455    new_path="$unix_path"
35456  fi
35457
35458    fi
35459
35460    if test "x$new_path" = x; then
35461      # It's still not found. Now this is an unrecoverable error.
35462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35463$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35464      has_space=`$ECHO "$complete" | $GREP " "`
35465      if test "x$has_space" != x; then
35466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35468      fi
35469      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35470    fi
35471  fi
35472
35473  # Now new_path has a complete unix path to the binary
35474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35475    # Keep paths in /bin as-is, but remove trailing .exe if any
35476    new_path="${new_path/%.exe/}"
35477    # Do not save /bin paths to all_fixpath_prefixes!
35478  else
35479    # Not in mixed or Windows style, start by that.
35480    new_path=`cmd //c echo $new_path`
35481
35482  input_path="$new_path"
35483  # Check if we need to convert this using DOS-style short mode. If the path
35484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35485  # take no chances and rewrite it.
35486  # Note: m4 eats our [], so we need to use [ and ] instead.
35487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35488  if test "x$has_forbidden_chars" != x; then
35489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35491  fi
35492
35493    # Output is in $new_path
35494
35495  windows_path="$new_path"
35496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35497    unix_path=`$CYGPATH -u "$windows_path"`
35498    new_path="$unix_path"
35499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35501    new_path="$unix_path"
35502  fi
35503
35504    # remove trailing .exe if any
35505    new_path="${new_path/%.exe/}"
35506
35507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35509  fi
35510
35511    else
35512      # We're on a unix platform. Hooray! :)
35513      # First separate the path from the arguments. This will split at the first
35514      # space.
35515      complete="$DUMPBIN"
35516      path="${complete%% *}"
35517      tmp="$complete EOL"
35518      arguments="${tmp#* }"
35519
35520      # Cannot rely on the command "which" here since it doesn't always work.
35521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35522      if test -z "$is_absolute_path"; then
35523        # Path to executable is not absolute. Find it.
35524        IFS_save="$IFS"
35525        IFS=:
35526        for p in $PATH; do
35527          if test -f "$p/$path" && test -x "$p/$path"; then
35528            new_path="$p/$path"
35529            break
35530          fi
35531        done
35532        IFS="$IFS_save"
35533      else
35534        # This is an absolute path, we can use it without further modifications.
35535        new_path="$path"
35536      fi
35537
35538      if test "x$new_path" = x; then
35539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35540$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35541        has_space=`$ECHO "$complete" | $GREP " "`
35542        if test "x$has_space" != x; then
35543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35545        fi
35546        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35547      fi
35548    fi
35549
35550    # Now join together the path and the arguments once again
35551    if test "x$arguments" != xEOL; then
35552      new_complete="$new_path ${arguments% *}"
35553    else
35554      new_complete="$new_path"
35555    fi
35556
35557    if test "x$complete" != "x$new_complete"; then
35558      DUMPBIN="$new_complete"
35559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35560$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35561    fi
35562  fi
35563
35564    # We need to check for 'msbuild.exe' because at the place where we expect to
35565    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35566    # won't find the 'msbuild.exe' executable in that case (and the
35567    # 'ac_executable_extensions' is unusable due to performance reasons).
35568    # Notice that we intentionally don't fix up the path to MSBUILD because we
35569    # will call it in a DOS shell during freetype detection on Windows (see
35570    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35571    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35572set dummy msbuild.exe; ac_word=$2
35573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35574$as_echo_n "checking for $ac_word... " >&6; }
35575if ${ac_cv_prog_MSBUILD+:} false; then :
35576  $as_echo_n "(cached) " >&6
35577else
35578  if test -n "$MSBUILD"; then
35579  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35580else
35581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35582for as_dir in $PATH
35583do
35584  IFS=$as_save_IFS
35585  test -z "$as_dir" && as_dir=.
35586    for ac_exec_ext in '' $ac_executable_extensions; do
35587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35588    ac_cv_prog_MSBUILD="msbuild.exe"
35589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35590    break 2
35591  fi
35592done
35593  done
35594IFS=$as_save_IFS
35595
35596fi
35597fi
35598MSBUILD=$ac_cv_prog_MSBUILD
35599if test -n "$MSBUILD"; then
35600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35601$as_echo "$MSBUILD" >&6; }
35602else
35603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35604$as_echo "no" >&6; }
35605fi
35606
35607
35608  fi
35609
35610  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35611
35612
35613  # Publish this variable in the help.
35614
35615
35616  if test "x$STRIP" = x; then
35617    # The variable is not set by user, try to locate tool using the code snippet
35618    for ac_prog in strip
35619do
35620  # Extract the first word of "$ac_prog", so it can be a program name with args.
35621set dummy $ac_prog; ac_word=$2
35622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35623$as_echo_n "checking for $ac_word... " >&6; }
35624if ${ac_cv_path_STRIP+:} false; then :
35625  $as_echo_n "(cached) " >&6
35626else
35627  case $STRIP in
35628  [\\/]* | ?:[\\/]*)
35629  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35630  ;;
35631  *)
35632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35633for as_dir in $PATH
35634do
35635  IFS=$as_save_IFS
35636  test -z "$as_dir" && as_dir=.
35637    for ac_exec_ext in '' $ac_executable_extensions; do
35638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35639    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35641    break 2
35642  fi
35643done
35644  done
35645IFS=$as_save_IFS
35646
35647  ;;
35648esac
35649fi
35650STRIP=$ac_cv_path_STRIP
35651if test -n "$STRIP"; then
35652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35653$as_echo "$STRIP" >&6; }
35654else
35655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35656$as_echo "no" >&6; }
35657fi
35658
35659
35660  test -n "$STRIP" && break
35661done
35662
35663  else
35664    # The variable is set, but is it from the command line or the environment?
35665
35666    # Try to remove the string !STRIP! from our list.
35667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35669      # If it failed, the variable was not from the command line. Ignore it,
35670      # but warn the user (except for BASH, which is always set by the calling BASH).
35671      if test "xSTRIP" != xBASH; then
35672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35673$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35674      fi
35675      # Try to locate tool using the code snippet
35676      for ac_prog in strip
35677do
35678  # Extract the first word of "$ac_prog", so it can be a program name with args.
35679set dummy $ac_prog; ac_word=$2
35680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35681$as_echo_n "checking for $ac_word... " >&6; }
35682if ${ac_cv_path_STRIP+:} false; then :
35683  $as_echo_n "(cached) " >&6
35684else
35685  case $STRIP in
35686  [\\/]* | ?:[\\/]*)
35687  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35688  ;;
35689  *)
35690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35691for as_dir in $PATH
35692do
35693  IFS=$as_save_IFS
35694  test -z "$as_dir" && as_dir=.
35695    for ac_exec_ext in '' $ac_executable_extensions; do
35696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35697    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35699    break 2
35700  fi
35701done
35702  done
35703IFS=$as_save_IFS
35704
35705  ;;
35706esac
35707fi
35708STRIP=$ac_cv_path_STRIP
35709if test -n "$STRIP"; then
35710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35711$as_echo "$STRIP" >&6; }
35712else
35713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35714$as_echo "no" >&6; }
35715fi
35716
35717
35718  test -n "$STRIP" && break
35719done
35720
35721    else
35722      # If it succeeded, then it was overridden by the user. We will use it
35723      # for the tool.
35724
35725      # First remove it from the list of overridden variables, so we can test
35726      # for unknown variables in the end.
35727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35728
35729      # Check if the provided tool contains a complete path.
35730      tool_specified="$STRIP"
35731      tool_basename="${tool_specified##*/}"
35732      if test "x$tool_basename" = "x$tool_specified"; then
35733        # A command without a complete path is provided, search $PATH.
35734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35735$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35736        # Extract the first word of "$tool_basename", so it can be a program name with args.
35737set dummy $tool_basename; ac_word=$2
35738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35739$as_echo_n "checking for $ac_word... " >&6; }
35740if ${ac_cv_path_STRIP+:} false; then :
35741  $as_echo_n "(cached) " >&6
35742else
35743  case $STRIP in
35744  [\\/]* | ?:[\\/]*)
35745  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35746  ;;
35747  *)
35748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35749for as_dir in $PATH
35750do
35751  IFS=$as_save_IFS
35752  test -z "$as_dir" && as_dir=.
35753    for ac_exec_ext in '' $ac_executable_extensions; do
35754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35755    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35757    break 2
35758  fi
35759done
35760  done
35761IFS=$as_save_IFS
35762
35763  ;;
35764esac
35765fi
35766STRIP=$ac_cv_path_STRIP
35767if test -n "$STRIP"; then
35768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35769$as_echo "$STRIP" >&6; }
35770else
35771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35772$as_echo "no" >&6; }
35773fi
35774
35775
35776        if test "x$STRIP" = x; then
35777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35778        fi
35779      else
35780        # Otherwise we believe it is a complete path. Use it as it is.
35781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35782$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35784$as_echo_n "checking for STRIP... " >&6; }
35785        if test ! -x "$tool_specified"; then
35786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35787$as_echo "not found" >&6; }
35788          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35789        fi
35790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35791$as_echo "$tool_specified" >&6; }
35792      fi
35793    fi
35794  fi
35795
35796
35797
35798  # Only process if variable expands to non-empty
35799
35800  if test "x$STRIP" != x; then
35801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35802
35803  # First separate the path from the arguments. This will split at the first
35804  # space.
35805  complete="$STRIP"
35806  path="${complete%% *}"
35807  tmp="$complete EOL"
35808  arguments="${tmp#* }"
35809
35810  # Input might be given as Windows format, start by converting to
35811  # unix format.
35812  new_path=`$CYGPATH -u "$path"`
35813
35814  # Now try to locate executable using which
35815  new_path=`$WHICH "$new_path" 2> /dev/null`
35816  # bat and cmd files are not always considered executable in cygwin causing which
35817  # to not find them
35818  if test "x$new_path" = x \
35819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35821    new_path=`$CYGPATH -u "$path"`
35822  fi
35823  if test "x$new_path" = x; then
35824    # Oops. Which didn't find the executable.
35825    # The splitting of arguments from the executable at a space might have been incorrect,
35826    # since paths with space are more likely in Windows. Give it another try with the whole
35827    # argument.
35828    path="$complete"
35829    arguments="EOL"
35830    new_path=`$CYGPATH -u "$path"`
35831    new_path=`$WHICH "$new_path" 2> /dev/null`
35832    # bat and cmd files are not always considered executable in cygwin causing which
35833    # to not find them
35834    if test "x$new_path" = x \
35835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35837      new_path=`$CYGPATH -u "$path"`
35838    fi
35839    if test "x$new_path" = x; then
35840      # It's still not found. Now this is an unrecoverable error.
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35842$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35843      has_space=`$ECHO "$complete" | $GREP " "`
35844      if test "x$has_space" != x; then
35845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35847      fi
35848      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35849    fi
35850  fi
35851
35852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35855  # "foo.exe" is OK but "foo" is an error.
35856  #
35857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35858  # It is also a way to make sure we got the proper file name for the real test later on.
35859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35860  if test "x$test_shortpath" = x; then
35861    # Short path failed, file does not exist as specified.
35862    # Try adding .exe or .cmd
35863    if test -f "${new_path}.exe"; then
35864      input_to_shortpath="${new_path}.exe"
35865    elif test -f "${new_path}.cmd"; then
35866      input_to_shortpath="${new_path}.cmd"
35867    else
35868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35869$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35872      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35873    fi
35874  else
35875    input_to_shortpath="$new_path"
35876  fi
35877
35878  # Call helper function which possibly converts this using DOS-style short mode.
35879  # If so, the updated path is stored in $new_path.
35880  new_path="$input_to_shortpath"
35881
35882  input_path="$input_to_shortpath"
35883  # Check if we need to convert this using DOS-style short mode. If the path
35884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35885  # take no chances and rewrite it.
35886  # Note: m4 eats our [], so we need to use [ and ] instead.
35887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35888  if test "x$has_forbidden_chars" != x; then
35889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35893      # Going to short mode and back again did indeed matter. Since short mode is
35894      # case insensitive, let's make it lowercase to improve readability.
35895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35896      # Now convert it back to Unix-stile (cygpath)
35897      input_path=`$CYGPATH -u "$shortmode_path"`
35898      new_path="$input_path"
35899    fi
35900  fi
35901
35902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35903  if test "x$test_cygdrive_prefix" = x; then
35904    # As a simple fix, exclude /usr/bin since it's not a real path.
35905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35907      # a path prefixed by /cygdrive for fixpath to work.
35908      new_path="$CYGWIN_ROOT_PATH$input_path"
35909    fi
35910  fi
35911
35912  # remove trailing .exe if any
35913  new_path="${new_path/%.exe/}"
35914
35915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35916
35917  # First separate the path from the arguments. This will split at the first
35918  # space.
35919  complete="$STRIP"
35920  path="${complete%% *}"
35921  tmp="$complete EOL"
35922  arguments="${tmp#* }"
35923
35924  # Input might be given as Windows format, start by converting to
35925  # unix format.
35926  new_path="$path"
35927
35928  windows_path="$new_path"
35929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35930    unix_path=`$CYGPATH -u "$windows_path"`
35931    new_path="$unix_path"
35932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35934    new_path="$unix_path"
35935  fi
35936
35937
35938  # Now try to locate executable using which
35939  new_path=`$WHICH "$new_path" 2> /dev/null`
35940
35941  if test "x$new_path" = x; then
35942    # Oops. Which didn't find the executable.
35943    # The splitting of arguments from the executable at a space might have been incorrect,
35944    # since paths with space are more likely in Windows. Give it another try with the whole
35945    # argument.
35946    path="$complete"
35947    arguments="EOL"
35948    new_path="$path"
35949
35950  windows_path="$new_path"
35951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35952    unix_path=`$CYGPATH -u "$windows_path"`
35953    new_path="$unix_path"
35954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35956    new_path="$unix_path"
35957  fi
35958
35959
35960    new_path=`$WHICH "$new_path" 2> /dev/null`
35961    # bat and cmd files are not always considered executable in MSYS causing which
35962    # to not find them
35963    if test "x$new_path" = x \
35964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35966      new_path="$path"
35967
35968  windows_path="$new_path"
35969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35970    unix_path=`$CYGPATH -u "$windows_path"`
35971    new_path="$unix_path"
35972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35974    new_path="$unix_path"
35975  fi
35976
35977    fi
35978
35979    if test "x$new_path" = x; then
35980      # It's still not found. Now this is an unrecoverable error.
35981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35982$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35983      has_space=`$ECHO "$complete" | $GREP " "`
35984      if test "x$has_space" != x; then
35985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35987      fi
35988      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35989    fi
35990  fi
35991
35992  # Now new_path has a complete unix path to the binary
35993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35994    # Keep paths in /bin as-is, but remove trailing .exe if any
35995    new_path="${new_path/%.exe/}"
35996    # Do not save /bin paths to all_fixpath_prefixes!
35997  else
35998    # Not in mixed or Windows style, start by that.
35999    new_path=`cmd //c echo $new_path`
36000
36001  input_path="$new_path"
36002  # Check if we need to convert this using DOS-style short mode. If the path
36003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36004  # take no chances and rewrite it.
36005  # Note: m4 eats our [], so we need to use [ and ] instead.
36006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36007  if test "x$has_forbidden_chars" != x; then
36008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36010  fi
36011
36012    # Output is in $new_path
36013
36014  windows_path="$new_path"
36015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36016    unix_path=`$CYGPATH -u "$windows_path"`
36017    new_path="$unix_path"
36018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36020    new_path="$unix_path"
36021  fi
36022
36023    # remove trailing .exe if any
36024    new_path="${new_path/%.exe/}"
36025
36026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36028  fi
36029
36030    else
36031      # We're on a unix platform. Hooray! :)
36032      # First separate the path from the arguments. This will split at the first
36033      # space.
36034      complete="$STRIP"
36035      path="${complete%% *}"
36036      tmp="$complete EOL"
36037      arguments="${tmp#* }"
36038
36039      # Cannot rely on the command "which" here since it doesn't always work.
36040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36041      if test -z "$is_absolute_path"; then
36042        # Path to executable is not absolute. Find it.
36043        IFS_save="$IFS"
36044        IFS=:
36045        for p in $PATH; do
36046          if test -f "$p/$path" && test -x "$p/$path"; then
36047            new_path="$p/$path"
36048            break
36049          fi
36050        done
36051        IFS="$IFS_save"
36052      else
36053        # This is an absolute path, we can use it without further modifications.
36054        new_path="$path"
36055      fi
36056
36057      if test "x$new_path" = x; then
36058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36059$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36060        has_space=`$ECHO "$complete" | $GREP " "`
36061        if test "x$has_space" != x; then
36062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36064        fi
36065        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36066      fi
36067    fi
36068
36069    # Now join together the path and the arguments once again
36070    if test "x$arguments" != xEOL; then
36071      new_complete="$new_path ${arguments% *}"
36072    else
36073      new_complete="$new_path"
36074    fi
36075
36076    if test "x$complete" != "x$new_complete"; then
36077      STRIP="$new_complete"
36078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36079$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36080    fi
36081  fi
36082
36083
36084
36085  # Publish this variable in the help.
36086
36087
36088  if test "x$NM" = x; then
36089    # The variable is not set by user, try to locate tool using the code snippet
36090    for ac_prog in nm
36091do
36092  # Extract the first word of "$ac_prog", so it can be a program name with args.
36093set dummy $ac_prog; ac_word=$2
36094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36095$as_echo_n "checking for $ac_word... " >&6; }
36096if ${ac_cv_path_NM+:} false; then :
36097  $as_echo_n "(cached) " >&6
36098else
36099  case $NM in
36100  [\\/]* | ?:[\\/]*)
36101  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36102  ;;
36103  *)
36104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36105for as_dir in $PATH
36106do
36107  IFS=$as_save_IFS
36108  test -z "$as_dir" && as_dir=.
36109    for ac_exec_ext in '' $ac_executable_extensions; do
36110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36111    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36113    break 2
36114  fi
36115done
36116  done
36117IFS=$as_save_IFS
36118
36119  ;;
36120esac
36121fi
36122NM=$ac_cv_path_NM
36123if test -n "$NM"; then
36124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36125$as_echo "$NM" >&6; }
36126else
36127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36128$as_echo "no" >&6; }
36129fi
36130
36131
36132  test -n "$NM" && break
36133done
36134
36135  else
36136    # The variable is set, but is it from the command line or the environment?
36137
36138    # Try to remove the string !NM! from our list.
36139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36141      # If it failed, the variable was not from the command line. Ignore it,
36142      # but warn the user (except for BASH, which is always set by the calling BASH).
36143      if test "xNM" != xBASH; then
36144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36145$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36146      fi
36147      # Try to locate tool using the code snippet
36148      for ac_prog in nm
36149do
36150  # Extract the first word of "$ac_prog", so it can be a program name with args.
36151set dummy $ac_prog; ac_word=$2
36152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36153$as_echo_n "checking for $ac_word... " >&6; }
36154if ${ac_cv_path_NM+:} false; then :
36155  $as_echo_n "(cached) " >&6
36156else
36157  case $NM in
36158  [\\/]* | ?:[\\/]*)
36159  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36160  ;;
36161  *)
36162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36163for as_dir in $PATH
36164do
36165  IFS=$as_save_IFS
36166  test -z "$as_dir" && as_dir=.
36167    for ac_exec_ext in '' $ac_executable_extensions; do
36168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36169    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36171    break 2
36172  fi
36173done
36174  done
36175IFS=$as_save_IFS
36176
36177  ;;
36178esac
36179fi
36180NM=$ac_cv_path_NM
36181if test -n "$NM"; then
36182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36183$as_echo "$NM" >&6; }
36184else
36185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36186$as_echo "no" >&6; }
36187fi
36188
36189
36190  test -n "$NM" && break
36191done
36192
36193    else
36194      # If it succeeded, then it was overridden by the user. We will use it
36195      # for the tool.
36196
36197      # First remove it from the list of overridden variables, so we can test
36198      # for unknown variables in the end.
36199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36200
36201      # Check if the provided tool contains a complete path.
36202      tool_specified="$NM"
36203      tool_basename="${tool_specified##*/}"
36204      if test "x$tool_basename" = "x$tool_specified"; then
36205        # A command without a complete path is provided, search $PATH.
36206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36207$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36208        # Extract the first word of "$tool_basename", so it can be a program name with args.
36209set dummy $tool_basename; ac_word=$2
36210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36211$as_echo_n "checking for $ac_word... " >&6; }
36212if ${ac_cv_path_NM+:} false; then :
36213  $as_echo_n "(cached) " >&6
36214else
36215  case $NM in
36216  [\\/]* | ?:[\\/]*)
36217  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36218  ;;
36219  *)
36220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36221for as_dir in $PATH
36222do
36223  IFS=$as_save_IFS
36224  test -z "$as_dir" && as_dir=.
36225    for ac_exec_ext in '' $ac_executable_extensions; do
36226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36227    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36229    break 2
36230  fi
36231done
36232  done
36233IFS=$as_save_IFS
36234
36235  ;;
36236esac
36237fi
36238NM=$ac_cv_path_NM
36239if test -n "$NM"; then
36240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36241$as_echo "$NM" >&6; }
36242else
36243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36244$as_echo "no" >&6; }
36245fi
36246
36247
36248        if test "x$NM" = x; then
36249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36250        fi
36251      else
36252        # Otherwise we believe it is a complete path. Use it as it is.
36253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36254$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36256$as_echo_n "checking for NM... " >&6; }
36257        if test ! -x "$tool_specified"; then
36258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36259$as_echo "not found" >&6; }
36260          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36261        fi
36262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36263$as_echo "$tool_specified" >&6; }
36264      fi
36265    fi
36266  fi
36267
36268
36269
36270  # Only process if variable expands to non-empty
36271
36272  if test "x$NM" != x; then
36273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36274
36275  # First separate the path from the arguments. This will split at the first
36276  # space.
36277  complete="$NM"
36278  path="${complete%% *}"
36279  tmp="$complete EOL"
36280  arguments="${tmp#* }"
36281
36282  # Input might be given as Windows format, start by converting to
36283  # unix format.
36284  new_path=`$CYGPATH -u "$path"`
36285
36286  # Now try to locate executable using which
36287  new_path=`$WHICH "$new_path" 2> /dev/null`
36288  # bat and cmd files are not always considered executable in cygwin causing which
36289  # to not find them
36290  if test "x$new_path" = x \
36291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36293    new_path=`$CYGPATH -u "$path"`
36294  fi
36295  if test "x$new_path" = x; then
36296    # Oops. Which didn't find the executable.
36297    # The splitting of arguments from the executable at a space might have been incorrect,
36298    # since paths with space are more likely in Windows. Give it another try with the whole
36299    # argument.
36300    path="$complete"
36301    arguments="EOL"
36302    new_path=`$CYGPATH -u "$path"`
36303    new_path=`$WHICH "$new_path" 2> /dev/null`
36304    # bat and cmd files are not always considered executable in cygwin causing which
36305    # to not find them
36306    if test "x$new_path" = x \
36307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36309      new_path=`$CYGPATH -u "$path"`
36310    fi
36311    if test "x$new_path" = x; then
36312      # It's still not found. Now this is an unrecoverable error.
36313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36314$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36315      has_space=`$ECHO "$complete" | $GREP " "`
36316      if test "x$has_space" != x; then
36317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36319      fi
36320      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36321    fi
36322  fi
36323
36324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36327  # "foo.exe" is OK but "foo" is an error.
36328  #
36329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36330  # It is also a way to make sure we got the proper file name for the real test later on.
36331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36332  if test "x$test_shortpath" = x; then
36333    # Short path failed, file does not exist as specified.
36334    # Try adding .exe or .cmd
36335    if test -f "${new_path}.exe"; then
36336      input_to_shortpath="${new_path}.exe"
36337    elif test -f "${new_path}.cmd"; then
36338      input_to_shortpath="${new_path}.cmd"
36339    else
36340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36341$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36344      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36345    fi
36346  else
36347    input_to_shortpath="$new_path"
36348  fi
36349
36350  # Call helper function which possibly converts this using DOS-style short mode.
36351  # If so, the updated path is stored in $new_path.
36352  new_path="$input_to_shortpath"
36353
36354  input_path="$input_to_shortpath"
36355  # Check if we need to convert this using DOS-style short mode. If the path
36356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36357  # take no chances and rewrite it.
36358  # Note: m4 eats our [], so we need to use [ and ] instead.
36359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36360  if test "x$has_forbidden_chars" != x; then
36361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36365      # Going to short mode and back again did indeed matter. Since short mode is
36366      # case insensitive, let's make it lowercase to improve readability.
36367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36368      # Now convert it back to Unix-stile (cygpath)
36369      input_path=`$CYGPATH -u "$shortmode_path"`
36370      new_path="$input_path"
36371    fi
36372  fi
36373
36374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36375  if test "x$test_cygdrive_prefix" = x; then
36376    # As a simple fix, exclude /usr/bin since it's not a real path.
36377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36379      # a path prefixed by /cygdrive for fixpath to work.
36380      new_path="$CYGWIN_ROOT_PATH$input_path"
36381    fi
36382  fi
36383
36384  # remove trailing .exe if any
36385  new_path="${new_path/%.exe/}"
36386
36387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36388
36389  # First separate the path from the arguments. This will split at the first
36390  # space.
36391  complete="$NM"
36392  path="${complete%% *}"
36393  tmp="$complete EOL"
36394  arguments="${tmp#* }"
36395
36396  # Input might be given as Windows format, start by converting to
36397  # unix format.
36398  new_path="$path"
36399
36400  windows_path="$new_path"
36401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36402    unix_path=`$CYGPATH -u "$windows_path"`
36403    new_path="$unix_path"
36404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36406    new_path="$unix_path"
36407  fi
36408
36409
36410  # Now try to locate executable using which
36411  new_path=`$WHICH "$new_path" 2> /dev/null`
36412
36413  if test "x$new_path" = x; then
36414    # Oops. Which didn't find the executable.
36415    # The splitting of arguments from the executable at a space might have been incorrect,
36416    # since paths with space are more likely in Windows. Give it another try with the whole
36417    # argument.
36418    path="$complete"
36419    arguments="EOL"
36420    new_path="$path"
36421
36422  windows_path="$new_path"
36423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36424    unix_path=`$CYGPATH -u "$windows_path"`
36425    new_path="$unix_path"
36426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36428    new_path="$unix_path"
36429  fi
36430
36431
36432    new_path=`$WHICH "$new_path" 2> /dev/null`
36433    # bat and cmd files are not always considered executable in MSYS causing which
36434    # to not find them
36435    if test "x$new_path" = x \
36436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36438      new_path="$path"
36439
36440  windows_path="$new_path"
36441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36442    unix_path=`$CYGPATH -u "$windows_path"`
36443    new_path="$unix_path"
36444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36446    new_path="$unix_path"
36447  fi
36448
36449    fi
36450
36451    if test "x$new_path" = x; then
36452      # It's still not found. Now this is an unrecoverable error.
36453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36454$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36455      has_space=`$ECHO "$complete" | $GREP " "`
36456      if test "x$has_space" != x; then
36457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36459      fi
36460      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36461    fi
36462  fi
36463
36464  # Now new_path has a complete unix path to the binary
36465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36466    # Keep paths in /bin as-is, but remove trailing .exe if any
36467    new_path="${new_path/%.exe/}"
36468    # Do not save /bin paths to all_fixpath_prefixes!
36469  else
36470    # Not in mixed or Windows style, start by that.
36471    new_path=`cmd //c echo $new_path`
36472
36473  input_path="$new_path"
36474  # Check if we need to convert this using DOS-style short mode. If the path
36475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36476  # take no chances and rewrite it.
36477  # Note: m4 eats our [], so we need to use [ and ] instead.
36478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36479  if test "x$has_forbidden_chars" != x; then
36480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36482  fi
36483
36484    # Output is in $new_path
36485
36486  windows_path="$new_path"
36487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36488    unix_path=`$CYGPATH -u "$windows_path"`
36489    new_path="$unix_path"
36490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36492    new_path="$unix_path"
36493  fi
36494
36495    # remove trailing .exe if any
36496    new_path="${new_path/%.exe/}"
36497
36498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36500  fi
36501
36502    else
36503      # We're on a unix platform. Hooray! :)
36504      # First separate the path from the arguments. This will split at the first
36505      # space.
36506      complete="$NM"
36507      path="${complete%% *}"
36508      tmp="$complete EOL"
36509      arguments="${tmp#* }"
36510
36511      # Cannot rely on the command "which" here since it doesn't always work.
36512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36513      if test -z "$is_absolute_path"; then
36514        # Path to executable is not absolute. Find it.
36515        IFS_save="$IFS"
36516        IFS=:
36517        for p in $PATH; do
36518          if test -f "$p/$path" && test -x "$p/$path"; then
36519            new_path="$p/$path"
36520            break
36521          fi
36522        done
36523        IFS="$IFS_save"
36524      else
36525        # This is an absolute path, we can use it without further modifications.
36526        new_path="$path"
36527      fi
36528
36529      if test "x$new_path" = x; then
36530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36531$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36532        has_space=`$ECHO "$complete" | $GREP " "`
36533        if test "x$has_space" != x; then
36534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36536        fi
36537        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36538      fi
36539    fi
36540
36541    # Now join together the path and the arguments once again
36542    if test "x$arguments" != xEOL; then
36543      new_complete="$new_path ${arguments% *}"
36544    else
36545      new_complete="$new_path"
36546    fi
36547
36548    if test "x$complete" != "x$new_complete"; then
36549      NM="$new_complete"
36550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36551$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36552    fi
36553  fi
36554
36555
36556
36557  # Publish this variable in the help.
36558
36559
36560  if test "x$GNM" = x; then
36561    # The variable is not set by user, try to locate tool using the code snippet
36562    for ac_prog in gnm
36563do
36564  # Extract the first word of "$ac_prog", so it can be a program name with args.
36565set dummy $ac_prog; ac_word=$2
36566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36567$as_echo_n "checking for $ac_word... " >&6; }
36568if ${ac_cv_path_GNM+:} false; then :
36569  $as_echo_n "(cached) " >&6
36570else
36571  case $GNM in
36572  [\\/]* | ?:[\\/]*)
36573  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36574  ;;
36575  *)
36576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36577for as_dir in $PATH
36578do
36579  IFS=$as_save_IFS
36580  test -z "$as_dir" && as_dir=.
36581    for ac_exec_ext in '' $ac_executable_extensions; do
36582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36583    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36585    break 2
36586  fi
36587done
36588  done
36589IFS=$as_save_IFS
36590
36591  ;;
36592esac
36593fi
36594GNM=$ac_cv_path_GNM
36595if test -n "$GNM"; then
36596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36597$as_echo "$GNM" >&6; }
36598else
36599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36600$as_echo "no" >&6; }
36601fi
36602
36603
36604  test -n "$GNM" && break
36605done
36606
36607  else
36608    # The variable is set, but is it from the command line or the environment?
36609
36610    # Try to remove the string !GNM! from our list.
36611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36613      # If it failed, the variable was not from the command line. Ignore it,
36614      # but warn the user (except for BASH, which is always set by the calling BASH).
36615      if test "xGNM" != xBASH; then
36616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36617$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36618      fi
36619      # Try to locate tool using the code snippet
36620      for ac_prog in gnm
36621do
36622  # Extract the first word of "$ac_prog", so it can be a program name with args.
36623set dummy $ac_prog; ac_word=$2
36624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36625$as_echo_n "checking for $ac_word... " >&6; }
36626if ${ac_cv_path_GNM+:} false; then :
36627  $as_echo_n "(cached) " >&6
36628else
36629  case $GNM in
36630  [\\/]* | ?:[\\/]*)
36631  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36632  ;;
36633  *)
36634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36635for as_dir in $PATH
36636do
36637  IFS=$as_save_IFS
36638  test -z "$as_dir" && as_dir=.
36639    for ac_exec_ext in '' $ac_executable_extensions; do
36640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36641    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36643    break 2
36644  fi
36645done
36646  done
36647IFS=$as_save_IFS
36648
36649  ;;
36650esac
36651fi
36652GNM=$ac_cv_path_GNM
36653if test -n "$GNM"; then
36654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36655$as_echo "$GNM" >&6; }
36656else
36657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36658$as_echo "no" >&6; }
36659fi
36660
36661
36662  test -n "$GNM" && break
36663done
36664
36665    else
36666      # If it succeeded, then it was overridden by the user. We will use it
36667      # for the tool.
36668
36669      # First remove it from the list of overridden variables, so we can test
36670      # for unknown variables in the end.
36671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36672
36673      # Check if the provided tool contains a complete path.
36674      tool_specified="$GNM"
36675      tool_basename="${tool_specified##*/}"
36676      if test "x$tool_basename" = "x$tool_specified"; then
36677        # A command without a complete path is provided, search $PATH.
36678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36679$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36680        # Extract the first word of "$tool_basename", so it can be a program name with args.
36681set dummy $tool_basename; ac_word=$2
36682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36683$as_echo_n "checking for $ac_word... " >&6; }
36684if ${ac_cv_path_GNM+:} false; then :
36685  $as_echo_n "(cached) " >&6
36686else
36687  case $GNM in
36688  [\\/]* | ?:[\\/]*)
36689  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36690  ;;
36691  *)
36692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36693for as_dir in $PATH
36694do
36695  IFS=$as_save_IFS
36696  test -z "$as_dir" && as_dir=.
36697    for ac_exec_ext in '' $ac_executable_extensions; do
36698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36699    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36701    break 2
36702  fi
36703done
36704  done
36705IFS=$as_save_IFS
36706
36707  ;;
36708esac
36709fi
36710GNM=$ac_cv_path_GNM
36711if test -n "$GNM"; then
36712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36713$as_echo "$GNM" >&6; }
36714else
36715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36716$as_echo "no" >&6; }
36717fi
36718
36719
36720        if test "x$GNM" = x; then
36721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36722        fi
36723      else
36724        # Otherwise we believe it is a complete path. Use it as it is.
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36726$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36728$as_echo_n "checking for GNM... " >&6; }
36729        if test ! -x "$tool_specified"; then
36730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36731$as_echo "not found" >&6; }
36732          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36733        fi
36734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36735$as_echo "$tool_specified" >&6; }
36736      fi
36737    fi
36738  fi
36739
36740
36741
36742  # Only process if variable expands to non-empty
36743
36744  if test "x$GNM" != x; then
36745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36746
36747  # First separate the path from the arguments. This will split at the first
36748  # space.
36749  complete="$GNM"
36750  path="${complete%% *}"
36751  tmp="$complete EOL"
36752  arguments="${tmp#* }"
36753
36754  # Input might be given as Windows format, start by converting to
36755  # unix format.
36756  new_path=`$CYGPATH -u "$path"`
36757
36758  # Now try to locate executable using which
36759  new_path=`$WHICH "$new_path" 2> /dev/null`
36760  # bat and cmd files are not always considered executable in cygwin causing which
36761  # to not find them
36762  if test "x$new_path" = x \
36763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36765    new_path=`$CYGPATH -u "$path"`
36766  fi
36767  if test "x$new_path" = x; then
36768    # Oops. Which didn't find the executable.
36769    # The splitting of arguments from the executable at a space might have been incorrect,
36770    # since paths with space are more likely in Windows. Give it another try with the whole
36771    # argument.
36772    path="$complete"
36773    arguments="EOL"
36774    new_path=`$CYGPATH -u "$path"`
36775    new_path=`$WHICH "$new_path" 2> /dev/null`
36776    # bat and cmd files are not always considered executable in cygwin causing which
36777    # to not find them
36778    if test "x$new_path" = x \
36779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36781      new_path=`$CYGPATH -u "$path"`
36782    fi
36783    if test "x$new_path" = x; then
36784      # It's still not found. Now this is an unrecoverable error.
36785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36786$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36787      has_space=`$ECHO "$complete" | $GREP " "`
36788      if test "x$has_space" != x; then
36789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36791      fi
36792      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36793    fi
36794  fi
36795
36796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36799  # "foo.exe" is OK but "foo" is an error.
36800  #
36801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36802  # It is also a way to make sure we got the proper file name for the real test later on.
36803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36804  if test "x$test_shortpath" = x; then
36805    # Short path failed, file does not exist as specified.
36806    # Try adding .exe or .cmd
36807    if test -f "${new_path}.exe"; then
36808      input_to_shortpath="${new_path}.exe"
36809    elif test -f "${new_path}.cmd"; then
36810      input_to_shortpath="${new_path}.cmd"
36811    else
36812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36813$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36816      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36817    fi
36818  else
36819    input_to_shortpath="$new_path"
36820  fi
36821
36822  # Call helper function which possibly converts this using DOS-style short mode.
36823  # If so, the updated path is stored in $new_path.
36824  new_path="$input_to_shortpath"
36825
36826  input_path="$input_to_shortpath"
36827  # Check if we need to convert this using DOS-style short mode. If the path
36828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36829  # take no chances and rewrite it.
36830  # Note: m4 eats our [], so we need to use [ and ] instead.
36831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36832  if test "x$has_forbidden_chars" != x; then
36833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36837      # Going to short mode and back again did indeed matter. Since short mode is
36838      # case insensitive, let's make it lowercase to improve readability.
36839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36840      # Now convert it back to Unix-stile (cygpath)
36841      input_path=`$CYGPATH -u "$shortmode_path"`
36842      new_path="$input_path"
36843    fi
36844  fi
36845
36846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36847  if test "x$test_cygdrive_prefix" = x; then
36848    # As a simple fix, exclude /usr/bin since it's not a real path.
36849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36851      # a path prefixed by /cygdrive for fixpath to work.
36852      new_path="$CYGWIN_ROOT_PATH$input_path"
36853    fi
36854  fi
36855
36856  # remove trailing .exe if any
36857  new_path="${new_path/%.exe/}"
36858
36859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36860
36861  # First separate the path from the arguments. This will split at the first
36862  # space.
36863  complete="$GNM"
36864  path="${complete%% *}"
36865  tmp="$complete EOL"
36866  arguments="${tmp#* }"
36867
36868  # Input might be given as Windows format, start by converting to
36869  # unix format.
36870  new_path="$path"
36871
36872  windows_path="$new_path"
36873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36874    unix_path=`$CYGPATH -u "$windows_path"`
36875    new_path="$unix_path"
36876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36878    new_path="$unix_path"
36879  fi
36880
36881
36882  # Now try to locate executable using which
36883  new_path=`$WHICH "$new_path" 2> /dev/null`
36884
36885  if test "x$new_path" = x; then
36886    # Oops. Which didn't find the executable.
36887    # The splitting of arguments from the executable at a space might have been incorrect,
36888    # since paths with space are more likely in Windows. Give it another try with the whole
36889    # argument.
36890    path="$complete"
36891    arguments="EOL"
36892    new_path="$path"
36893
36894  windows_path="$new_path"
36895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36896    unix_path=`$CYGPATH -u "$windows_path"`
36897    new_path="$unix_path"
36898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36900    new_path="$unix_path"
36901  fi
36902
36903
36904    new_path=`$WHICH "$new_path" 2> /dev/null`
36905    # bat and cmd files are not always considered executable in MSYS causing which
36906    # to not find them
36907    if test "x$new_path" = x \
36908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36910      new_path="$path"
36911
36912  windows_path="$new_path"
36913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36914    unix_path=`$CYGPATH -u "$windows_path"`
36915    new_path="$unix_path"
36916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36918    new_path="$unix_path"
36919  fi
36920
36921    fi
36922
36923    if test "x$new_path" = x; then
36924      # It's still not found. Now this is an unrecoverable error.
36925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36926$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36927      has_space=`$ECHO "$complete" | $GREP " "`
36928      if test "x$has_space" != x; then
36929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36931      fi
36932      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36933    fi
36934  fi
36935
36936  # Now new_path has a complete unix path to the binary
36937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36938    # Keep paths in /bin as-is, but remove trailing .exe if any
36939    new_path="${new_path/%.exe/}"
36940    # Do not save /bin paths to all_fixpath_prefixes!
36941  else
36942    # Not in mixed or Windows style, start by that.
36943    new_path=`cmd //c echo $new_path`
36944
36945  input_path="$new_path"
36946  # Check if we need to convert this using DOS-style short mode. If the path
36947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36948  # take no chances and rewrite it.
36949  # Note: m4 eats our [], so we need to use [ and ] instead.
36950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36951  if test "x$has_forbidden_chars" != x; then
36952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36954  fi
36955
36956    # Output is in $new_path
36957
36958  windows_path="$new_path"
36959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36960    unix_path=`$CYGPATH -u "$windows_path"`
36961    new_path="$unix_path"
36962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36964    new_path="$unix_path"
36965  fi
36966
36967    # remove trailing .exe if any
36968    new_path="${new_path/%.exe/}"
36969
36970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36972  fi
36973
36974    else
36975      # We're on a unix platform. Hooray! :)
36976      # First separate the path from the arguments. This will split at the first
36977      # space.
36978      complete="$GNM"
36979      path="${complete%% *}"
36980      tmp="$complete EOL"
36981      arguments="${tmp#* }"
36982
36983      # Cannot rely on the command "which" here since it doesn't always work.
36984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36985      if test -z "$is_absolute_path"; then
36986        # Path to executable is not absolute. Find it.
36987        IFS_save="$IFS"
36988        IFS=:
36989        for p in $PATH; do
36990          if test -f "$p/$path" && test -x "$p/$path"; then
36991            new_path="$p/$path"
36992            break
36993          fi
36994        done
36995        IFS="$IFS_save"
36996      else
36997        # This is an absolute path, we can use it without further modifications.
36998        new_path="$path"
36999      fi
37000
37001      if test "x$new_path" = x; then
37002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37003$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37004        has_space=`$ECHO "$complete" | $GREP " "`
37005        if test "x$has_space" != x; then
37006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37008        fi
37009        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37010      fi
37011    fi
37012
37013    # Now join together the path and the arguments once again
37014    if test "x$arguments" != xEOL; then
37015      new_complete="$new_path ${arguments% *}"
37016    else
37017      new_complete="$new_path"
37018    fi
37019
37020    if test "x$complete" != "x$new_complete"; then
37021      GNM="$new_complete"
37022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37023$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37024    fi
37025  fi
37026
37027
37028
37029
37030  # Publish this variable in the help.
37031
37032
37033  if test "x$MCS" = x; then
37034    # The variable is not set by user, try to locate tool using the code snippet
37035    for ac_prog in mcs
37036do
37037  # Extract the first word of "$ac_prog", so it can be a program name with args.
37038set dummy $ac_prog; ac_word=$2
37039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37040$as_echo_n "checking for $ac_word... " >&6; }
37041if ${ac_cv_path_MCS+:} false; then :
37042  $as_echo_n "(cached) " >&6
37043else
37044  case $MCS in
37045  [\\/]* | ?:[\\/]*)
37046  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37047  ;;
37048  *)
37049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37050for as_dir in $PATH
37051do
37052  IFS=$as_save_IFS
37053  test -z "$as_dir" && as_dir=.
37054    for ac_exec_ext in '' $ac_executable_extensions; do
37055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37056    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37058    break 2
37059  fi
37060done
37061  done
37062IFS=$as_save_IFS
37063
37064  ;;
37065esac
37066fi
37067MCS=$ac_cv_path_MCS
37068if test -n "$MCS"; then
37069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37070$as_echo "$MCS" >&6; }
37071else
37072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37073$as_echo "no" >&6; }
37074fi
37075
37076
37077  test -n "$MCS" && break
37078done
37079
37080  else
37081    # The variable is set, but is it from the command line or the environment?
37082
37083    # Try to remove the string !MCS! from our list.
37084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37086      # If it failed, the variable was not from the command line. Ignore it,
37087      # but warn the user (except for BASH, which is always set by the calling BASH).
37088      if test "xMCS" != xBASH; then
37089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37090$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37091      fi
37092      # Try to locate tool using the code snippet
37093      for ac_prog in mcs
37094do
37095  # Extract the first word of "$ac_prog", so it can be a program name with args.
37096set dummy $ac_prog; ac_word=$2
37097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37098$as_echo_n "checking for $ac_word... " >&6; }
37099if ${ac_cv_path_MCS+:} false; then :
37100  $as_echo_n "(cached) " >&6
37101else
37102  case $MCS in
37103  [\\/]* | ?:[\\/]*)
37104  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37105  ;;
37106  *)
37107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37108for as_dir in $PATH
37109do
37110  IFS=$as_save_IFS
37111  test -z "$as_dir" && as_dir=.
37112    for ac_exec_ext in '' $ac_executable_extensions; do
37113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37114    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37116    break 2
37117  fi
37118done
37119  done
37120IFS=$as_save_IFS
37121
37122  ;;
37123esac
37124fi
37125MCS=$ac_cv_path_MCS
37126if test -n "$MCS"; then
37127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37128$as_echo "$MCS" >&6; }
37129else
37130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37131$as_echo "no" >&6; }
37132fi
37133
37134
37135  test -n "$MCS" && break
37136done
37137
37138    else
37139      # If it succeeded, then it was overridden by the user. We will use it
37140      # for the tool.
37141
37142      # First remove it from the list of overridden variables, so we can test
37143      # for unknown variables in the end.
37144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37145
37146      # Check if the provided tool contains a complete path.
37147      tool_specified="$MCS"
37148      tool_basename="${tool_specified##*/}"
37149      if test "x$tool_basename" = "x$tool_specified"; then
37150        # A command without a complete path is provided, search $PATH.
37151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37152$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37153        # Extract the first word of "$tool_basename", so it can be a program name with args.
37154set dummy $tool_basename; ac_word=$2
37155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156$as_echo_n "checking for $ac_word... " >&6; }
37157if ${ac_cv_path_MCS+:} false; then :
37158  $as_echo_n "(cached) " >&6
37159else
37160  case $MCS in
37161  [\\/]* | ?:[\\/]*)
37162  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37163  ;;
37164  *)
37165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37166for as_dir in $PATH
37167do
37168  IFS=$as_save_IFS
37169  test -z "$as_dir" && as_dir=.
37170    for ac_exec_ext in '' $ac_executable_extensions; do
37171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37172    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37174    break 2
37175  fi
37176done
37177  done
37178IFS=$as_save_IFS
37179
37180  ;;
37181esac
37182fi
37183MCS=$ac_cv_path_MCS
37184if test -n "$MCS"; then
37185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37186$as_echo "$MCS" >&6; }
37187else
37188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37189$as_echo "no" >&6; }
37190fi
37191
37192
37193        if test "x$MCS" = x; then
37194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37195        fi
37196      else
37197        # Otherwise we believe it is a complete path. Use it as it is.
37198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37199$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37201$as_echo_n "checking for MCS... " >&6; }
37202        if test ! -x "$tool_specified"; then
37203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37204$as_echo "not found" >&6; }
37205          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37206        fi
37207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37208$as_echo "$tool_specified" >&6; }
37209      fi
37210    fi
37211  fi
37212
37213
37214
37215  # Only process if variable expands to non-empty
37216
37217  if test "x$MCS" != x; then
37218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37219
37220  # First separate the path from the arguments. This will split at the first
37221  # space.
37222  complete="$MCS"
37223  path="${complete%% *}"
37224  tmp="$complete EOL"
37225  arguments="${tmp#* }"
37226
37227  # Input might be given as Windows format, start by converting to
37228  # unix format.
37229  new_path=`$CYGPATH -u "$path"`
37230
37231  # Now try to locate executable using which
37232  new_path=`$WHICH "$new_path" 2> /dev/null`
37233  # bat and cmd files are not always considered executable in cygwin causing which
37234  # to not find them
37235  if test "x$new_path" = x \
37236      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37237      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37238    new_path=`$CYGPATH -u "$path"`
37239  fi
37240  if test "x$new_path" = x; then
37241    # Oops. Which didn't find the executable.
37242    # The splitting of arguments from the executable at a space might have been incorrect,
37243    # since paths with space are more likely in Windows. Give it another try with the whole
37244    # argument.
37245    path="$complete"
37246    arguments="EOL"
37247    new_path=`$CYGPATH -u "$path"`
37248    new_path=`$WHICH "$new_path" 2> /dev/null`
37249    # bat and cmd files are not always considered executable in cygwin causing which
37250    # to not find them
37251    if test "x$new_path" = x \
37252        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37253        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37254      new_path=`$CYGPATH -u "$path"`
37255    fi
37256    if test "x$new_path" = x; then
37257      # It's still not found. Now this is an unrecoverable error.
37258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37259$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37260      has_space=`$ECHO "$complete" | $GREP " "`
37261      if test "x$has_space" != x; then
37262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37264      fi
37265      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37266    fi
37267  fi
37268
37269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37272  # "foo.exe" is OK but "foo" is an error.
37273  #
37274  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37275  # It is also a way to make sure we got the proper file name for the real test later on.
37276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37277  if test "x$test_shortpath" = x; then
37278    # Short path failed, file does not exist as specified.
37279    # Try adding .exe or .cmd
37280    if test -f "${new_path}.exe"; then
37281      input_to_shortpath="${new_path}.exe"
37282    elif test -f "${new_path}.cmd"; then
37283      input_to_shortpath="${new_path}.cmd"
37284    else
37285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
37286$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
37287      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37288$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37289      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37290    fi
37291  else
37292    input_to_shortpath="$new_path"
37293  fi
37294
37295  # Call helper function which possibly converts this using DOS-style short mode.
37296  # If so, the updated path is stored in $new_path.
37297  new_path="$input_to_shortpath"
37298
37299  input_path="$input_to_shortpath"
37300  # Check if we need to convert this using DOS-style short mode. If the path
37301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37302  # take no chances and rewrite it.
37303  # Note: m4 eats our [], so we need to use [ and ] instead.
37304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37305  if test "x$has_forbidden_chars" != x; then
37306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37310      # Going to short mode and back again did indeed matter. Since short mode is
37311      # case insensitive, let's make it lowercase to improve readability.
37312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37313      # Now convert it back to Unix-stile (cygpath)
37314      input_path=`$CYGPATH -u "$shortmode_path"`
37315      new_path="$input_path"
37316    fi
37317  fi
37318
37319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37320  if test "x$test_cygdrive_prefix" = x; then
37321    # As a simple fix, exclude /usr/bin since it's not a real path.
37322    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37324      # a path prefixed by /cygdrive for fixpath to work.
37325      new_path="$CYGWIN_ROOT_PATH$input_path"
37326    fi
37327  fi
37328
37329  # remove trailing .exe if any
37330  new_path="${new_path/%.exe/}"
37331
37332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37333
37334  # First separate the path from the arguments. This will split at the first
37335  # space.
37336  complete="$MCS"
37337  path="${complete%% *}"
37338  tmp="$complete EOL"
37339  arguments="${tmp#* }"
37340
37341  # Input might be given as Windows format, start by converting to
37342  # unix format.
37343  new_path="$path"
37344
37345  windows_path="$new_path"
37346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37347    unix_path=`$CYGPATH -u "$windows_path"`
37348    new_path="$unix_path"
37349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37351    new_path="$unix_path"
37352  fi
37353
37354
37355  # Now try to locate executable using which
37356  new_path=`$WHICH "$new_path" 2> /dev/null`
37357
37358  if test "x$new_path" = x; then
37359    # Oops. Which didn't find the executable.
37360    # The splitting of arguments from the executable at a space might have been incorrect,
37361    # since paths with space are more likely in Windows. Give it another try with the whole
37362    # argument.
37363    path="$complete"
37364    arguments="EOL"
37365    new_path="$path"
37366
37367  windows_path="$new_path"
37368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37369    unix_path=`$CYGPATH -u "$windows_path"`
37370    new_path="$unix_path"
37371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37373    new_path="$unix_path"
37374  fi
37375
37376
37377    new_path=`$WHICH "$new_path" 2> /dev/null`
37378    # bat and cmd files are not always considered executable in MSYS causing which
37379    # to not find them
37380    if test "x$new_path" = x \
37381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37383      new_path="$path"
37384
37385  windows_path="$new_path"
37386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37387    unix_path=`$CYGPATH -u "$windows_path"`
37388    new_path="$unix_path"
37389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37391    new_path="$unix_path"
37392  fi
37393
37394    fi
37395
37396    if test "x$new_path" = x; then
37397      # It's still not found. Now this is an unrecoverable error.
37398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37399$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37400      has_space=`$ECHO "$complete" | $GREP " "`
37401      if test "x$has_space" != x; then
37402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37404      fi
37405      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37406    fi
37407  fi
37408
37409  # Now new_path has a complete unix path to the binary
37410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37411    # Keep paths in /bin as-is, but remove trailing .exe if any
37412    new_path="${new_path/%.exe/}"
37413    # Do not save /bin paths to all_fixpath_prefixes!
37414  else
37415    # Not in mixed or Windows style, start by that.
37416    new_path=`cmd //c echo $new_path`
37417
37418  input_path="$new_path"
37419  # Check if we need to convert this using DOS-style short mode. If the path
37420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37421  # take no chances and rewrite it.
37422  # Note: m4 eats our [], so we need to use [ and ] instead.
37423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37424  if test "x$has_forbidden_chars" != x; then
37425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37427  fi
37428
37429    # Output is in $new_path
37430
37431  windows_path="$new_path"
37432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37433    unix_path=`$CYGPATH -u "$windows_path"`
37434    new_path="$unix_path"
37435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37437    new_path="$unix_path"
37438  fi
37439
37440    # remove trailing .exe if any
37441    new_path="${new_path/%.exe/}"
37442
37443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37445  fi
37446
37447    else
37448      # We're on a unix platform. Hooray! :)
37449      # First separate the path from the arguments. This will split at the first
37450      # space.
37451      complete="$MCS"
37452      path="${complete%% *}"
37453      tmp="$complete EOL"
37454      arguments="${tmp#* }"
37455
37456      # Cannot rely on the command "which" here since it doesn't always work.
37457      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37458      if test -z "$is_absolute_path"; then
37459        # Path to executable is not absolute. Find it.
37460        IFS_save="$IFS"
37461        IFS=:
37462        for p in $PATH; do
37463          if test -f "$p/$path" && test -x "$p/$path"; then
37464            new_path="$p/$path"
37465            break
37466          fi
37467        done
37468        IFS="$IFS_save"
37469      else
37470        # This is an absolute path, we can use it without further modifications.
37471        new_path="$path"
37472      fi
37473
37474      if test "x$new_path" = x; then
37475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37476$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37477        has_space=`$ECHO "$complete" | $GREP " "`
37478        if test "x$has_space" != x; then
37479          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37480$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37481        fi
37482        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37483      fi
37484    fi
37485
37486    # Now join together the path and the arguments once again
37487    if test "x$arguments" != xEOL; then
37488      new_complete="$new_path ${arguments% *}"
37489    else
37490      new_complete="$new_path"
37491    fi
37492
37493    if test "x$complete" != "x$new_complete"; then
37494      MCS="$new_complete"
37495      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37496$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37497    fi
37498  fi
37499
37500  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37501    # FIXME: we should unify this with the solaris case above.
37502
37503
37504  # Publish this variable in the help.
37505
37506
37507  if test "x$STRIP" = x; then
37508    # The variable is not set by user, try to locate tool using the code snippet
37509    if test -n "$ac_tool_prefix"; then
37510  for ac_prog in strip
37511  do
37512    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37513set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37515$as_echo_n "checking for $ac_word... " >&6; }
37516if ${ac_cv_prog_STRIP+:} false; then :
37517  $as_echo_n "(cached) " >&6
37518else
37519  if test -n "$STRIP"; then
37520  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37521else
37522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37523for as_dir in $PATH
37524do
37525  IFS=$as_save_IFS
37526  test -z "$as_dir" && as_dir=.
37527    for ac_exec_ext in '' $ac_executable_extensions; do
37528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37529    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37531    break 2
37532  fi
37533done
37534  done
37535IFS=$as_save_IFS
37536
37537fi
37538fi
37539STRIP=$ac_cv_prog_STRIP
37540if test -n "$STRIP"; then
37541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37542$as_echo "$STRIP" >&6; }
37543else
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37545$as_echo "no" >&6; }
37546fi
37547
37548
37549    test -n "$STRIP" && break
37550  done
37551fi
37552if test -z "$STRIP"; then
37553  ac_ct_STRIP=$STRIP
37554  for ac_prog in strip
37555do
37556  # Extract the first word of "$ac_prog", so it can be a program name with args.
37557set dummy $ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$ac_ct_STRIP"; then
37564  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37584if test -n "$ac_ct_STRIP"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37586$as_echo "$ac_ct_STRIP" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593  test -n "$ac_ct_STRIP" && break
37594done
37595
37596  if test "x$ac_ct_STRIP" = x; then
37597    STRIP=""
37598  else
37599    case $cross_compiling:$ac_tool_warned in
37600yes:)
37601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37603ac_tool_warned=yes ;;
37604esac
37605    STRIP=$ac_ct_STRIP
37606  fi
37607fi
37608
37609  else
37610    # The variable is set, but is it from the command line or the environment?
37611
37612    # Try to remove the string !STRIP! from our list.
37613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37615      # If it failed, the variable was not from the command line. Ignore it,
37616      # but warn the user (except for BASH, which is always set by the calling BASH).
37617      if test "xSTRIP" != xBASH; then
37618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37619$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37620      fi
37621      # Try to locate tool using the code snippet
37622      if test -n "$ac_tool_prefix"; then
37623  for ac_prog in strip
37624  do
37625    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37626set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628$as_echo_n "checking for $ac_word... " >&6; }
37629if ${ac_cv_prog_STRIP+:} false; then :
37630  $as_echo_n "(cached) " >&6
37631else
37632  if test -n "$STRIP"; then
37633  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37634else
37635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636for as_dir in $PATH
37637do
37638  IFS=$as_save_IFS
37639  test -z "$as_dir" && as_dir=.
37640    for ac_exec_ext in '' $ac_executable_extensions; do
37641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644    break 2
37645  fi
37646done
37647  done
37648IFS=$as_save_IFS
37649
37650fi
37651fi
37652STRIP=$ac_cv_prog_STRIP
37653if test -n "$STRIP"; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37655$as_echo "$STRIP" >&6; }
37656else
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658$as_echo "no" >&6; }
37659fi
37660
37661
37662    test -n "$STRIP" && break
37663  done
37664fi
37665if test -z "$STRIP"; then
37666  ac_ct_STRIP=$STRIP
37667  for ac_prog in strip
37668do
37669  # Extract the first word of "$ac_prog", so it can be a program name with args.
37670set dummy $ac_prog; ac_word=$2
37671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672$as_echo_n "checking for $ac_word... " >&6; }
37673if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37674  $as_echo_n "(cached) " >&6
37675else
37676  if test -n "$ac_ct_STRIP"; then
37677  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37678else
37679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37680for as_dir in $PATH
37681do
37682  IFS=$as_save_IFS
37683  test -z "$as_dir" && as_dir=.
37684    for ac_exec_ext in '' $ac_executable_extensions; do
37685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37686    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37688    break 2
37689  fi
37690done
37691  done
37692IFS=$as_save_IFS
37693
37694fi
37695fi
37696ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37697if test -n "$ac_ct_STRIP"; then
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37699$as_echo "$ac_ct_STRIP" >&6; }
37700else
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37702$as_echo "no" >&6; }
37703fi
37704
37705
37706  test -n "$ac_ct_STRIP" && break
37707done
37708
37709  if test "x$ac_ct_STRIP" = x; then
37710    STRIP=""
37711  else
37712    case $cross_compiling:$ac_tool_warned in
37713yes:)
37714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37716ac_tool_warned=yes ;;
37717esac
37718    STRIP=$ac_ct_STRIP
37719  fi
37720fi
37721
37722    else
37723      # If it succeeded, then it was overridden by the user. We will use it
37724      # for the tool.
37725
37726      # First remove it from the list of overridden variables, so we can test
37727      # for unknown variables in the end.
37728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37729
37730      # Check if the provided tool contains a complete path.
37731      tool_specified="$STRIP"
37732      tool_basename="${tool_specified##*/}"
37733      if test "x$tool_basename" = "x$tool_specified"; then
37734        # A command without a complete path is provided, search $PATH.
37735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37736$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37737        # Extract the first word of "$tool_basename", so it can be a program name with args.
37738set dummy $tool_basename; ac_word=$2
37739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37740$as_echo_n "checking for $ac_word... " >&6; }
37741if ${ac_cv_path_STRIP+:} false; then :
37742  $as_echo_n "(cached) " >&6
37743else
37744  case $STRIP in
37745  [\\/]* | ?:[\\/]*)
37746  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37747  ;;
37748  *)
37749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37750for as_dir in $PATH
37751do
37752  IFS=$as_save_IFS
37753  test -z "$as_dir" && as_dir=.
37754    for ac_exec_ext in '' $ac_executable_extensions; do
37755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37756    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37758    break 2
37759  fi
37760done
37761  done
37762IFS=$as_save_IFS
37763
37764  ;;
37765esac
37766fi
37767STRIP=$ac_cv_path_STRIP
37768if test -n "$STRIP"; then
37769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37770$as_echo "$STRIP" >&6; }
37771else
37772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37773$as_echo "no" >&6; }
37774fi
37775
37776
37777        if test "x$STRIP" = x; then
37778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37779        fi
37780      else
37781        # Otherwise we believe it is a complete path. Use it as it is.
37782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37783$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37785$as_echo_n "checking for STRIP... " >&6; }
37786        if test ! -x "$tool_specified"; then
37787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37788$as_echo "not found" >&6; }
37789          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37790        fi
37791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37792$as_echo "$tool_specified" >&6; }
37793      fi
37794    fi
37795  fi
37796
37797
37798
37799  # Only process if variable expands to non-empty
37800
37801  if test "x$STRIP" != x; then
37802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37803
37804  # First separate the path from the arguments. This will split at the first
37805  # space.
37806  complete="$STRIP"
37807  path="${complete%% *}"
37808  tmp="$complete EOL"
37809  arguments="${tmp#* }"
37810
37811  # Input might be given as Windows format, start by converting to
37812  # unix format.
37813  new_path=`$CYGPATH -u "$path"`
37814
37815  # Now try to locate executable using which
37816  new_path=`$WHICH "$new_path" 2> /dev/null`
37817  # bat and cmd files are not always considered executable in cygwin causing which
37818  # to not find them
37819  if test "x$new_path" = x \
37820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37822    new_path=`$CYGPATH -u "$path"`
37823  fi
37824  if test "x$new_path" = x; then
37825    # Oops. Which didn't find the executable.
37826    # The splitting of arguments from the executable at a space might have been incorrect,
37827    # since paths with space are more likely in Windows. Give it another try with the whole
37828    # argument.
37829    path="$complete"
37830    arguments="EOL"
37831    new_path=`$CYGPATH -u "$path"`
37832    new_path=`$WHICH "$new_path" 2> /dev/null`
37833    # bat and cmd files are not always considered executable in cygwin causing which
37834    # to not find them
37835    if test "x$new_path" = x \
37836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37838      new_path=`$CYGPATH -u "$path"`
37839    fi
37840    if test "x$new_path" = x; then
37841      # It's still not found. Now this is an unrecoverable error.
37842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37843$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37844      has_space=`$ECHO "$complete" | $GREP " "`
37845      if test "x$has_space" != x; then
37846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37848      fi
37849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37850    fi
37851  fi
37852
37853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37856  # "foo.exe" is OK but "foo" is an error.
37857  #
37858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37859  # It is also a way to make sure we got the proper file name for the real test later on.
37860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37861  if test "x$test_shortpath" = x; then
37862    # Short path failed, file does not exist as specified.
37863    # Try adding .exe or .cmd
37864    if test -f "${new_path}.exe"; then
37865      input_to_shortpath="${new_path}.exe"
37866    elif test -f "${new_path}.cmd"; then
37867      input_to_shortpath="${new_path}.cmd"
37868    else
37869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37870$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37873      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37874    fi
37875  else
37876    input_to_shortpath="$new_path"
37877  fi
37878
37879  # Call helper function which possibly converts this using DOS-style short mode.
37880  # If so, the updated path is stored in $new_path.
37881  new_path="$input_to_shortpath"
37882
37883  input_path="$input_to_shortpath"
37884  # Check if we need to convert this using DOS-style short mode. If the path
37885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37886  # take no chances and rewrite it.
37887  # Note: m4 eats our [], so we need to use [ and ] instead.
37888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37889  if test "x$has_forbidden_chars" != x; then
37890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37894      # Going to short mode and back again did indeed matter. Since short mode is
37895      # case insensitive, let's make it lowercase to improve readability.
37896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37897      # Now convert it back to Unix-stile (cygpath)
37898      input_path=`$CYGPATH -u "$shortmode_path"`
37899      new_path="$input_path"
37900    fi
37901  fi
37902
37903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37904  if test "x$test_cygdrive_prefix" = x; then
37905    # As a simple fix, exclude /usr/bin since it's not a real path.
37906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37908      # a path prefixed by /cygdrive for fixpath to work.
37909      new_path="$CYGWIN_ROOT_PATH$input_path"
37910    fi
37911  fi
37912
37913  # remove trailing .exe if any
37914  new_path="${new_path/%.exe/}"
37915
37916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917
37918  # First separate the path from the arguments. This will split at the first
37919  # space.
37920  complete="$STRIP"
37921  path="${complete%% *}"
37922  tmp="$complete EOL"
37923  arguments="${tmp#* }"
37924
37925  # Input might be given as Windows format, start by converting to
37926  # unix format.
37927  new_path="$path"
37928
37929  windows_path="$new_path"
37930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37931    unix_path=`$CYGPATH -u "$windows_path"`
37932    new_path="$unix_path"
37933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37935    new_path="$unix_path"
37936  fi
37937
37938
37939  # Now try to locate executable using which
37940  new_path=`$WHICH "$new_path" 2> /dev/null`
37941
37942  if test "x$new_path" = x; then
37943    # Oops. Which didn't find the executable.
37944    # The splitting of arguments from the executable at a space might have been incorrect,
37945    # since paths with space are more likely in Windows. Give it another try with the whole
37946    # argument.
37947    path="$complete"
37948    arguments="EOL"
37949    new_path="$path"
37950
37951  windows_path="$new_path"
37952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37953    unix_path=`$CYGPATH -u "$windows_path"`
37954    new_path="$unix_path"
37955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37957    new_path="$unix_path"
37958  fi
37959
37960
37961    new_path=`$WHICH "$new_path" 2> /dev/null`
37962    # bat and cmd files are not always considered executable in MSYS causing which
37963    # to not find them
37964    if test "x$new_path" = x \
37965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37967      new_path="$path"
37968
37969  windows_path="$new_path"
37970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37971    unix_path=`$CYGPATH -u "$windows_path"`
37972    new_path="$unix_path"
37973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37975    new_path="$unix_path"
37976  fi
37977
37978    fi
37979
37980    if test "x$new_path" = x; then
37981      # It's still not found. Now this is an unrecoverable error.
37982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37983$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37984      has_space=`$ECHO "$complete" | $GREP " "`
37985      if test "x$has_space" != x; then
37986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37988      fi
37989      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37990    fi
37991  fi
37992
37993  # Now new_path has a complete unix path to the binary
37994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37995    # Keep paths in /bin as-is, but remove trailing .exe if any
37996    new_path="${new_path/%.exe/}"
37997    # Do not save /bin paths to all_fixpath_prefixes!
37998  else
37999    # Not in mixed or Windows style, start by that.
38000    new_path=`cmd //c echo $new_path`
38001
38002  input_path="$new_path"
38003  # Check if we need to convert this using DOS-style short mode. If the path
38004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38005  # take no chances and rewrite it.
38006  # Note: m4 eats our [], so we need to use [ and ] instead.
38007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38008  if test "x$has_forbidden_chars" != x; then
38009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38011  fi
38012
38013    # Output is in $new_path
38014
38015  windows_path="$new_path"
38016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38017    unix_path=`$CYGPATH -u "$windows_path"`
38018    new_path="$unix_path"
38019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38021    new_path="$unix_path"
38022  fi
38023
38024    # remove trailing .exe if any
38025    new_path="${new_path/%.exe/}"
38026
38027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38029  fi
38030
38031    else
38032      # We're on a unix platform. Hooray! :)
38033      # First separate the path from the arguments. This will split at the first
38034      # space.
38035      complete="$STRIP"
38036      path="${complete%% *}"
38037      tmp="$complete EOL"
38038      arguments="${tmp#* }"
38039
38040      # Cannot rely on the command "which" here since it doesn't always work.
38041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38042      if test -z "$is_absolute_path"; then
38043        # Path to executable is not absolute. Find it.
38044        IFS_save="$IFS"
38045        IFS=:
38046        for p in $PATH; do
38047          if test -f "$p/$path" && test -x "$p/$path"; then
38048            new_path="$p/$path"
38049            break
38050          fi
38051        done
38052        IFS="$IFS_save"
38053      else
38054        # This is an absolute path, we can use it without further modifications.
38055        new_path="$path"
38056      fi
38057
38058      if test "x$new_path" = x; then
38059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38060$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38061        has_space=`$ECHO "$complete" | $GREP " "`
38062        if test "x$has_space" != x; then
38063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38065        fi
38066        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38067      fi
38068    fi
38069
38070    # Now join together the path and the arguments once again
38071    if test "x$arguments" != xEOL; then
38072      new_complete="$new_path ${arguments% *}"
38073    else
38074      new_complete="$new_path"
38075    fi
38076
38077    if test "x$complete" != "x$new_complete"; then
38078      STRIP="$new_complete"
38079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38080$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38081    fi
38082  fi
38083
38084
38085
38086  # Publish this variable in the help.
38087
38088
38089  if test "x$NM" = x; then
38090    # The variable is not set by user, try to locate tool using the code snippet
38091    if test -n "$ac_tool_prefix"; then
38092  for ac_prog in nm
38093  do
38094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38097$as_echo_n "checking for $ac_word... " >&6; }
38098if ${ac_cv_prog_NM+:} false; then :
38099  $as_echo_n "(cached) " >&6
38100else
38101  if test -n "$NM"; then
38102  ac_cv_prog_NM="$NM" # Let the user override the test.
38103else
38104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38105for as_dir in $PATH
38106do
38107  IFS=$as_save_IFS
38108  test -z "$as_dir" && as_dir=.
38109    for ac_exec_ext in '' $ac_executable_extensions; do
38110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38111    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38113    break 2
38114  fi
38115done
38116  done
38117IFS=$as_save_IFS
38118
38119fi
38120fi
38121NM=$ac_cv_prog_NM
38122if test -n "$NM"; then
38123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38124$as_echo "$NM" >&6; }
38125else
38126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38127$as_echo "no" >&6; }
38128fi
38129
38130
38131    test -n "$NM" && break
38132  done
38133fi
38134if test -z "$NM"; then
38135  ac_ct_NM=$NM
38136  for ac_prog in nm
38137do
38138  # Extract the first word of "$ac_prog", so it can be a program name with args.
38139set dummy $ac_prog; ac_word=$2
38140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38141$as_echo_n "checking for $ac_word... " >&6; }
38142if ${ac_cv_prog_ac_ct_NM+:} false; then :
38143  $as_echo_n "(cached) " >&6
38144else
38145  if test -n "$ac_ct_NM"; then
38146  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38147else
38148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38149for as_dir in $PATH
38150do
38151  IFS=$as_save_IFS
38152  test -z "$as_dir" && as_dir=.
38153    for ac_exec_ext in '' $ac_executable_extensions; do
38154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38155    ac_cv_prog_ac_ct_NM="$ac_prog"
38156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38157    break 2
38158  fi
38159done
38160  done
38161IFS=$as_save_IFS
38162
38163fi
38164fi
38165ac_ct_NM=$ac_cv_prog_ac_ct_NM
38166if test -n "$ac_ct_NM"; then
38167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38168$as_echo "$ac_ct_NM" >&6; }
38169else
38170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38171$as_echo "no" >&6; }
38172fi
38173
38174
38175  test -n "$ac_ct_NM" && break
38176done
38177
38178  if test "x$ac_ct_NM" = x; then
38179    NM=""
38180  else
38181    case $cross_compiling:$ac_tool_warned in
38182yes:)
38183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38185ac_tool_warned=yes ;;
38186esac
38187    NM=$ac_ct_NM
38188  fi
38189fi
38190
38191  else
38192    # The variable is set, but is it from the command line or the environment?
38193
38194    # Try to remove the string !NM! from our list.
38195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38197      # If it failed, the variable was not from the command line. Ignore it,
38198      # but warn the user (except for BASH, which is always set by the calling BASH).
38199      if test "xNM" != xBASH; then
38200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38201$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38202      fi
38203      # Try to locate tool using the code snippet
38204      if test -n "$ac_tool_prefix"; then
38205  for ac_prog in nm
38206  do
38207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38210$as_echo_n "checking for $ac_word... " >&6; }
38211if ${ac_cv_prog_NM+:} false; then :
38212  $as_echo_n "(cached) " >&6
38213else
38214  if test -n "$NM"; then
38215  ac_cv_prog_NM="$NM" # Let the user override the test.
38216else
38217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38218for as_dir in $PATH
38219do
38220  IFS=$as_save_IFS
38221  test -z "$as_dir" && as_dir=.
38222    for ac_exec_ext in '' $ac_executable_extensions; do
38223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38224    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38226    break 2
38227  fi
38228done
38229  done
38230IFS=$as_save_IFS
38231
38232fi
38233fi
38234NM=$ac_cv_prog_NM
38235if test -n "$NM"; then
38236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38237$as_echo "$NM" >&6; }
38238else
38239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38240$as_echo "no" >&6; }
38241fi
38242
38243
38244    test -n "$NM" && break
38245  done
38246fi
38247if test -z "$NM"; then
38248  ac_ct_NM=$NM
38249  for ac_prog in nm
38250do
38251  # Extract the first word of "$ac_prog", so it can be a program name with args.
38252set dummy $ac_prog; ac_word=$2
38253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38254$as_echo_n "checking for $ac_word... " >&6; }
38255if ${ac_cv_prog_ac_ct_NM+:} false; then :
38256  $as_echo_n "(cached) " >&6
38257else
38258  if test -n "$ac_ct_NM"; then
38259  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38260else
38261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38262for as_dir in $PATH
38263do
38264  IFS=$as_save_IFS
38265  test -z "$as_dir" && as_dir=.
38266    for ac_exec_ext in '' $ac_executable_extensions; do
38267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38268    ac_cv_prog_ac_ct_NM="$ac_prog"
38269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38270    break 2
38271  fi
38272done
38273  done
38274IFS=$as_save_IFS
38275
38276fi
38277fi
38278ac_ct_NM=$ac_cv_prog_ac_ct_NM
38279if test -n "$ac_ct_NM"; then
38280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38281$as_echo "$ac_ct_NM" >&6; }
38282else
38283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38284$as_echo "no" >&6; }
38285fi
38286
38287
38288  test -n "$ac_ct_NM" && break
38289done
38290
38291  if test "x$ac_ct_NM" = x; then
38292    NM=""
38293  else
38294    case $cross_compiling:$ac_tool_warned in
38295yes:)
38296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38298ac_tool_warned=yes ;;
38299esac
38300    NM=$ac_ct_NM
38301  fi
38302fi
38303
38304    else
38305      # If it succeeded, then it was overridden by the user. We will use it
38306      # for the tool.
38307
38308      # First remove it from the list of overridden variables, so we can test
38309      # for unknown variables in the end.
38310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38311
38312      # Check if the provided tool contains a complete path.
38313      tool_specified="$NM"
38314      tool_basename="${tool_specified##*/}"
38315      if test "x$tool_basename" = "x$tool_specified"; then
38316        # A command without a complete path is provided, search $PATH.
38317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38318$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38319        # Extract the first word of "$tool_basename", so it can be a program name with args.
38320set dummy $tool_basename; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_path_NM+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  case $NM in
38327  [\\/]* | ?:[\\/]*)
38328  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38329  ;;
38330  *)
38331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38332for as_dir in $PATH
38333do
38334  IFS=$as_save_IFS
38335  test -z "$as_dir" && as_dir=.
38336    for ac_exec_ext in '' $ac_executable_extensions; do
38337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38338    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38340    break 2
38341  fi
38342done
38343  done
38344IFS=$as_save_IFS
38345
38346  ;;
38347esac
38348fi
38349NM=$ac_cv_path_NM
38350if test -n "$NM"; then
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38352$as_echo "$NM" >&6; }
38353else
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38355$as_echo "no" >&6; }
38356fi
38357
38358
38359        if test "x$NM" = x; then
38360          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38361        fi
38362      else
38363        # Otherwise we believe it is a complete path. Use it as it is.
38364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38365$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38367$as_echo_n "checking for NM... " >&6; }
38368        if test ! -x "$tool_specified"; then
38369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38370$as_echo "not found" >&6; }
38371          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38372        fi
38373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38374$as_echo "$tool_specified" >&6; }
38375      fi
38376    fi
38377  fi
38378
38379
38380
38381  # Only process if variable expands to non-empty
38382
38383  if test "x$NM" != x; then
38384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38385
38386  # First separate the path from the arguments. This will split at the first
38387  # space.
38388  complete="$NM"
38389  path="${complete%% *}"
38390  tmp="$complete EOL"
38391  arguments="${tmp#* }"
38392
38393  # Input might be given as Windows format, start by converting to
38394  # unix format.
38395  new_path=`$CYGPATH -u "$path"`
38396
38397  # Now try to locate executable using which
38398  new_path=`$WHICH "$new_path" 2> /dev/null`
38399  # bat and cmd files are not always considered executable in cygwin causing which
38400  # to not find them
38401  if test "x$new_path" = x \
38402      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38403      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38404    new_path=`$CYGPATH -u "$path"`
38405  fi
38406  if test "x$new_path" = x; then
38407    # Oops. Which didn't find the executable.
38408    # The splitting of arguments from the executable at a space might have been incorrect,
38409    # since paths with space are more likely in Windows. Give it another try with the whole
38410    # argument.
38411    path="$complete"
38412    arguments="EOL"
38413    new_path=`$CYGPATH -u "$path"`
38414    new_path=`$WHICH "$new_path" 2> /dev/null`
38415    # bat and cmd files are not always considered executable in cygwin causing which
38416    # to not find them
38417    if test "x$new_path" = x \
38418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38420      new_path=`$CYGPATH -u "$path"`
38421    fi
38422    if test "x$new_path" = x; then
38423      # It's still not found. Now this is an unrecoverable error.
38424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38425$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38426      has_space=`$ECHO "$complete" | $GREP " "`
38427      if test "x$has_space" != x; then
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38430      fi
38431      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38432    fi
38433  fi
38434
38435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38438  # "foo.exe" is OK but "foo" is an error.
38439  #
38440  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38441  # It is also a way to make sure we got the proper file name for the real test later on.
38442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38443  if test "x$test_shortpath" = x; then
38444    # Short path failed, file does not exist as specified.
38445    # Try adding .exe or .cmd
38446    if test -f "${new_path}.exe"; then
38447      input_to_shortpath="${new_path}.exe"
38448    elif test -f "${new_path}.cmd"; then
38449      input_to_shortpath="${new_path}.cmd"
38450    else
38451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38452$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38453      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38454$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38455      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38456    fi
38457  else
38458    input_to_shortpath="$new_path"
38459  fi
38460
38461  # Call helper function which possibly converts this using DOS-style short mode.
38462  # If so, the updated path is stored in $new_path.
38463  new_path="$input_to_shortpath"
38464
38465  input_path="$input_to_shortpath"
38466  # Check if we need to convert this using DOS-style short mode. If the path
38467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38468  # take no chances and rewrite it.
38469  # Note: m4 eats our [], so we need to use [ and ] instead.
38470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38471  if test "x$has_forbidden_chars" != x; then
38472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38476      # Going to short mode and back again did indeed matter. Since short mode is
38477      # case insensitive, let's make it lowercase to improve readability.
38478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38479      # Now convert it back to Unix-stile (cygpath)
38480      input_path=`$CYGPATH -u "$shortmode_path"`
38481      new_path="$input_path"
38482    fi
38483  fi
38484
38485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38486  if test "x$test_cygdrive_prefix" = x; then
38487    # As a simple fix, exclude /usr/bin since it's not a real path.
38488    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38490      # a path prefixed by /cygdrive for fixpath to work.
38491      new_path="$CYGWIN_ROOT_PATH$input_path"
38492    fi
38493  fi
38494
38495  # remove trailing .exe if any
38496  new_path="${new_path/%.exe/}"
38497
38498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38499
38500  # First separate the path from the arguments. This will split at the first
38501  # space.
38502  complete="$NM"
38503  path="${complete%% *}"
38504  tmp="$complete EOL"
38505  arguments="${tmp#* }"
38506
38507  # Input might be given as Windows format, start by converting to
38508  # unix format.
38509  new_path="$path"
38510
38511  windows_path="$new_path"
38512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38513    unix_path=`$CYGPATH -u "$windows_path"`
38514    new_path="$unix_path"
38515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38517    new_path="$unix_path"
38518  fi
38519
38520
38521  # Now try to locate executable using which
38522  new_path=`$WHICH "$new_path" 2> /dev/null`
38523
38524  if test "x$new_path" = x; then
38525    # Oops. Which didn't find the executable.
38526    # The splitting of arguments from the executable at a space might have been incorrect,
38527    # since paths with space are more likely in Windows. Give it another try with the whole
38528    # argument.
38529    path="$complete"
38530    arguments="EOL"
38531    new_path="$path"
38532
38533  windows_path="$new_path"
38534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38535    unix_path=`$CYGPATH -u "$windows_path"`
38536    new_path="$unix_path"
38537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38539    new_path="$unix_path"
38540  fi
38541
38542
38543    new_path=`$WHICH "$new_path" 2> /dev/null`
38544    # bat and cmd files are not always considered executable in MSYS causing which
38545    # to not find them
38546    if test "x$new_path" = x \
38547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38549      new_path="$path"
38550
38551  windows_path="$new_path"
38552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38553    unix_path=`$CYGPATH -u "$windows_path"`
38554    new_path="$unix_path"
38555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38557    new_path="$unix_path"
38558  fi
38559
38560    fi
38561
38562    if test "x$new_path" = x; then
38563      # It's still not found. Now this is an unrecoverable error.
38564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38565$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38566      has_space=`$ECHO "$complete" | $GREP " "`
38567      if test "x$has_space" != x; then
38568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38570      fi
38571      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38572    fi
38573  fi
38574
38575  # Now new_path has a complete unix path to the binary
38576  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38577    # Keep paths in /bin as-is, but remove trailing .exe if any
38578    new_path="${new_path/%.exe/}"
38579    # Do not save /bin paths to all_fixpath_prefixes!
38580  else
38581    # Not in mixed or Windows style, start by that.
38582    new_path=`cmd //c echo $new_path`
38583
38584  input_path="$new_path"
38585  # Check if we need to convert this using DOS-style short mode. If the path
38586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38587  # take no chances and rewrite it.
38588  # Note: m4 eats our [], so we need to use [ and ] instead.
38589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38590  if test "x$has_forbidden_chars" != x; then
38591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38593  fi
38594
38595    # Output is in $new_path
38596
38597  windows_path="$new_path"
38598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38599    unix_path=`$CYGPATH -u "$windows_path"`
38600    new_path="$unix_path"
38601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38603    new_path="$unix_path"
38604  fi
38605
38606    # remove trailing .exe if any
38607    new_path="${new_path/%.exe/}"
38608
38609    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38610    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38611  fi
38612
38613    else
38614      # We're on a unix platform. Hooray! :)
38615      # First separate the path from the arguments. This will split at the first
38616      # space.
38617      complete="$NM"
38618      path="${complete%% *}"
38619      tmp="$complete EOL"
38620      arguments="${tmp#* }"
38621
38622      # Cannot rely on the command "which" here since it doesn't always work.
38623      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38624      if test -z "$is_absolute_path"; then
38625        # Path to executable is not absolute. Find it.
38626        IFS_save="$IFS"
38627        IFS=:
38628        for p in $PATH; do
38629          if test -f "$p/$path" && test -x "$p/$path"; then
38630            new_path="$p/$path"
38631            break
38632          fi
38633        done
38634        IFS="$IFS_save"
38635      else
38636        # This is an absolute path, we can use it without further modifications.
38637        new_path="$path"
38638      fi
38639
38640      if test "x$new_path" = x; then
38641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38642$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38643        has_space=`$ECHO "$complete" | $GREP " "`
38644        if test "x$has_space" != x; then
38645          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38646$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38647        fi
38648        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38649      fi
38650    fi
38651
38652    # Now join together the path and the arguments once again
38653    if test "x$arguments" != xEOL; then
38654      new_complete="$new_path ${arguments% *}"
38655    else
38656      new_complete="$new_path"
38657    fi
38658
38659    if test "x$complete" != "x$new_complete"; then
38660      NM="$new_complete"
38661      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38662$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38663    fi
38664  fi
38665
38666    GNM="$NM"
38667
38668  fi
38669
38670  # objcopy is used for moving debug symbols to separate files when
38671  # full debug symbols are enabled.
38672  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38673
38674
38675  # Publish this variable in the help.
38676
38677
38678  if test "x$OBJCOPY" = x; then
38679    # The variable is not set by user, try to locate tool using the code snippet
38680    if test -n "$ac_tool_prefix"; then
38681  for ac_prog in gobjcopy objcopy
38682  do
38683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38686$as_echo_n "checking for $ac_word... " >&6; }
38687if ${ac_cv_prog_OBJCOPY+:} false; then :
38688  $as_echo_n "(cached) " >&6
38689else
38690  if test -n "$OBJCOPY"; then
38691  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38692else
38693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38694for as_dir in $PATH
38695do
38696  IFS=$as_save_IFS
38697  test -z "$as_dir" && as_dir=.
38698    for ac_exec_ext in '' $ac_executable_extensions; do
38699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38700    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38702    break 2
38703  fi
38704done
38705  done
38706IFS=$as_save_IFS
38707
38708fi
38709fi
38710OBJCOPY=$ac_cv_prog_OBJCOPY
38711if test -n "$OBJCOPY"; then
38712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38713$as_echo "$OBJCOPY" >&6; }
38714else
38715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38716$as_echo "no" >&6; }
38717fi
38718
38719
38720    test -n "$OBJCOPY" && break
38721  done
38722fi
38723if test -z "$OBJCOPY"; then
38724  ac_ct_OBJCOPY=$OBJCOPY
38725  for ac_prog in gobjcopy objcopy
38726do
38727  # Extract the first word of "$ac_prog", so it can be a program name with args.
38728set dummy $ac_prog; ac_word=$2
38729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38730$as_echo_n "checking for $ac_word... " >&6; }
38731if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38732  $as_echo_n "(cached) " >&6
38733else
38734  if test -n "$ac_ct_OBJCOPY"; then
38735  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38736else
38737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38738for as_dir in $PATH
38739do
38740  IFS=$as_save_IFS
38741  test -z "$as_dir" && as_dir=.
38742    for ac_exec_ext in '' $ac_executable_extensions; do
38743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38744    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38746    break 2
38747  fi
38748done
38749  done
38750IFS=$as_save_IFS
38751
38752fi
38753fi
38754ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38755if test -n "$ac_ct_OBJCOPY"; then
38756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38757$as_echo "$ac_ct_OBJCOPY" >&6; }
38758else
38759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38760$as_echo "no" >&6; }
38761fi
38762
38763
38764  test -n "$ac_ct_OBJCOPY" && break
38765done
38766
38767  if test "x$ac_ct_OBJCOPY" = x; then
38768    OBJCOPY=""
38769  else
38770    case $cross_compiling:$ac_tool_warned in
38771yes:)
38772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38774ac_tool_warned=yes ;;
38775esac
38776    OBJCOPY=$ac_ct_OBJCOPY
38777  fi
38778fi
38779
38780  else
38781    # The variable is set, but is it from the command line or the environment?
38782
38783    # Try to remove the string !OBJCOPY! from our list.
38784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38786      # If it failed, the variable was not from the command line. Ignore it,
38787      # but warn the user (except for BASH, which is always set by the calling BASH).
38788      if test "xOBJCOPY" != xBASH; then
38789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38790$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38791      fi
38792      # Try to locate tool using the code snippet
38793      if test -n "$ac_tool_prefix"; then
38794  for ac_prog in gobjcopy objcopy
38795  do
38796    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38797set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38799$as_echo_n "checking for $ac_word... " >&6; }
38800if ${ac_cv_prog_OBJCOPY+:} false; then :
38801  $as_echo_n "(cached) " >&6
38802else
38803  if test -n "$OBJCOPY"; then
38804  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38805else
38806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38807for as_dir in $PATH
38808do
38809  IFS=$as_save_IFS
38810  test -z "$as_dir" && as_dir=.
38811    for ac_exec_ext in '' $ac_executable_extensions; do
38812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38813    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38815    break 2
38816  fi
38817done
38818  done
38819IFS=$as_save_IFS
38820
38821fi
38822fi
38823OBJCOPY=$ac_cv_prog_OBJCOPY
38824if test -n "$OBJCOPY"; then
38825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38826$as_echo "$OBJCOPY" >&6; }
38827else
38828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38829$as_echo "no" >&6; }
38830fi
38831
38832
38833    test -n "$OBJCOPY" && break
38834  done
38835fi
38836if test -z "$OBJCOPY"; then
38837  ac_ct_OBJCOPY=$OBJCOPY
38838  for ac_prog in gobjcopy objcopy
38839do
38840  # Extract the first word of "$ac_prog", so it can be a program name with args.
38841set dummy $ac_prog; ac_word=$2
38842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38843$as_echo_n "checking for $ac_word... " >&6; }
38844if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38845  $as_echo_n "(cached) " >&6
38846else
38847  if test -n "$ac_ct_OBJCOPY"; then
38848  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38849else
38850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38851for as_dir in $PATH
38852do
38853  IFS=$as_save_IFS
38854  test -z "$as_dir" && as_dir=.
38855    for ac_exec_ext in '' $ac_executable_extensions; do
38856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38857    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38859    break 2
38860  fi
38861done
38862  done
38863IFS=$as_save_IFS
38864
38865fi
38866fi
38867ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38868if test -n "$ac_ct_OBJCOPY"; then
38869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38870$as_echo "$ac_ct_OBJCOPY" >&6; }
38871else
38872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38873$as_echo "no" >&6; }
38874fi
38875
38876
38877  test -n "$ac_ct_OBJCOPY" && break
38878done
38879
38880  if test "x$ac_ct_OBJCOPY" = x; then
38881    OBJCOPY=""
38882  else
38883    case $cross_compiling:$ac_tool_warned in
38884yes:)
38885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38887ac_tool_warned=yes ;;
38888esac
38889    OBJCOPY=$ac_ct_OBJCOPY
38890  fi
38891fi
38892
38893    else
38894      # If it succeeded, then it was overridden by the user. We will use it
38895      # for the tool.
38896
38897      # First remove it from the list of overridden variables, so we can test
38898      # for unknown variables in the end.
38899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38900
38901      # Check if the provided tool contains a complete path.
38902      tool_specified="$OBJCOPY"
38903      tool_basename="${tool_specified##*/}"
38904      if test "x$tool_basename" = "x$tool_specified"; then
38905        # A command without a complete path is provided, search $PATH.
38906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38907$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38908        # Extract the first word of "$tool_basename", so it can be a program name with args.
38909set dummy $tool_basename; ac_word=$2
38910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38911$as_echo_n "checking for $ac_word... " >&6; }
38912if ${ac_cv_path_OBJCOPY+:} false; then :
38913  $as_echo_n "(cached) " >&6
38914else
38915  case $OBJCOPY in
38916  [\\/]* | ?:[\\/]*)
38917  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38918  ;;
38919  *)
38920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38921for as_dir in $PATH
38922do
38923  IFS=$as_save_IFS
38924  test -z "$as_dir" && as_dir=.
38925    for ac_exec_ext in '' $ac_executable_extensions; do
38926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38927    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38929    break 2
38930  fi
38931done
38932  done
38933IFS=$as_save_IFS
38934
38935  ;;
38936esac
38937fi
38938OBJCOPY=$ac_cv_path_OBJCOPY
38939if test -n "$OBJCOPY"; then
38940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38941$as_echo "$OBJCOPY" >&6; }
38942else
38943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38944$as_echo "no" >&6; }
38945fi
38946
38947
38948        if test "x$OBJCOPY" = x; then
38949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38950        fi
38951      else
38952        # Otherwise we believe it is a complete path. Use it as it is.
38953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38954$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38956$as_echo_n "checking for OBJCOPY... " >&6; }
38957        if test ! -x "$tool_specified"; then
38958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38959$as_echo "not found" >&6; }
38960          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38961        fi
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38963$as_echo "$tool_specified" >&6; }
38964      fi
38965    fi
38966  fi
38967
38968
38969    # Only call fixup if objcopy was found.
38970    if test -n "$OBJCOPY"; then
38971
38972  # Only process if variable expands to non-empty
38973
38974  if test "x$OBJCOPY" != x; then
38975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38976
38977  # First separate the path from the arguments. This will split at the first
38978  # space.
38979  complete="$OBJCOPY"
38980  path="${complete%% *}"
38981  tmp="$complete EOL"
38982  arguments="${tmp#* }"
38983
38984  # Input might be given as Windows format, start by converting to
38985  # unix format.
38986  new_path=`$CYGPATH -u "$path"`
38987
38988  # Now try to locate executable using which
38989  new_path=`$WHICH "$new_path" 2> /dev/null`
38990  # bat and cmd files are not always considered executable in cygwin causing which
38991  # to not find them
38992  if test "x$new_path" = x \
38993      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38994      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38995    new_path=`$CYGPATH -u "$path"`
38996  fi
38997  if test "x$new_path" = x; then
38998    # Oops. Which didn't find the executable.
38999    # The splitting of arguments from the executable at a space might have been incorrect,
39000    # since paths with space are more likely in Windows. Give it another try with the whole
39001    # argument.
39002    path="$complete"
39003    arguments="EOL"
39004    new_path=`$CYGPATH -u "$path"`
39005    new_path=`$WHICH "$new_path" 2> /dev/null`
39006    # bat and cmd files are not always considered executable in cygwin causing which
39007    # to not find them
39008    if test "x$new_path" = x \
39009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39011      new_path=`$CYGPATH -u "$path"`
39012    fi
39013    if test "x$new_path" = x; then
39014      # It's still not found. Now this is an unrecoverable error.
39015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39016$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39017      has_space=`$ECHO "$complete" | $GREP " "`
39018      if test "x$has_space" != x; then
39019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39021      fi
39022      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39023    fi
39024  fi
39025
39026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39029  # "foo.exe" is OK but "foo" is an error.
39030  #
39031  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39032  # It is also a way to make sure we got the proper file name for the real test later on.
39033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39034  if test "x$test_shortpath" = x; then
39035    # Short path failed, file does not exist as specified.
39036    # Try adding .exe or .cmd
39037    if test -f "${new_path}.exe"; then
39038      input_to_shortpath="${new_path}.exe"
39039    elif test -f "${new_path}.cmd"; then
39040      input_to_shortpath="${new_path}.cmd"
39041    else
39042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39043$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39046      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39047    fi
39048  else
39049    input_to_shortpath="$new_path"
39050  fi
39051
39052  # Call helper function which possibly converts this using DOS-style short mode.
39053  # If so, the updated path is stored in $new_path.
39054  new_path="$input_to_shortpath"
39055
39056  input_path="$input_to_shortpath"
39057  # Check if we need to convert this using DOS-style short mode. If the path
39058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39059  # take no chances and rewrite it.
39060  # Note: m4 eats our [], so we need to use [ and ] instead.
39061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39062  if test "x$has_forbidden_chars" != x; then
39063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39067      # Going to short mode and back again did indeed matter. Since short mode is
39068      # case insensitive, let's make it lowercase to improve readability.
39069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39070      # Now convert it back to Unix-stile (cygpath)
39071      input_path=`$CYGPATH -u "$shortmode_path"`
39072      new_path="$input_path"
39073    fi
39074  fi
39075
39076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39077  if test "x$test_cygdrive_prefix" = x; then
39078    # As a simple fix, exclude /usr/bin since it's not a real path.
39079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39081      # a path prefixed by /cygdrive for fixpath to work.
39082      new_path="$CYGWIN_ROOT_PATH$input_path"
39083    fi
39084  fi
39085
39086  # remove trailing .exe if any
39087  new_path="${new_path/%.exe/}"
39088
39089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39090
39091  # First separate the path from the arguments. This will split at the first
39092  # space.
39093  complete="$OBJCOPY"
39094  path="${complete%% *}"
39095  tmp="$complete EOL"
39096  arguments="${tmp#* }"
39097
39098  # Input might be given as Windows format, start by converting to
39099  # unix format.
39100  new_path="$path"
39101
39102  windows_path="$new_path"
39103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39104    unix_path=`$CYGPATH -u "$windows_path"`
39105    new_path="$unix_path"
39106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39108    new_path="$unix_path"
39109  fi
39110
39111
39112  # Now try to locate executable using which
39113  new_path=`$WHICH "$new_path" 2> /dev/null`
39114
39115  if test "x$new_path" = x; then
39116    # Oops. Which didn't find the executable.
39117    # The splitting of arguments from the executable at a space might have been incorrect,
39118    # since paths with space are more likely in Windows. Give it another try with the whole
39119    # argument.
39120    path="$complete"
39121    arguments="EOL"
39122    new_path="$path"
39123
39124  windows_path="$new_path"
39125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39126    unix_path=`$CYGPATH -u "$windows_path"`
39127    new_path="$unix_path"
39128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39130    new_path="$unix_path"
39131  fi
39132
39133
39134    new_path=`$WHICH "$new_path" 2> /dev/null`
39135    # bat and cmd files are not always considered executable in MSYS causing which
39136    # to not find them
39137    if test "x$new_path" = x \
39138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39140      new_path="$path"
39141
39142  windows_path="$new_path"
39143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39144    unix_path=`$CYGPATH -u "$windows_path"`
39145    new_path="$unix_path"
39146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39148    new_path="$unix_path"
39149  fi
39150
39151    fi
39152
39153    if test "x$new_path" = x; then
39154      # It's still not found. Now this is an unrecoverable error.
39155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39156$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39157      has_space=`$ECHO "$complete" | $GREP " "`
39158      if test "x$has_space" != x; then
39159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39161      fi
39162      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39163    fi
39164  fi
39165
39166  # Now new_path has a complete unix path to the binary
39167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39168    # Keep paths in /bin as-is, but remove trailing .exe if any
39169    new_path="${new_path/%.exe/}"
39170    # Do not save /bin paths to all_fixpath_prefixes!
39171  else
39172    # Not in mixed or Windows style, start by that.
39173    new_path=`cmd //c echo $new_path`
39174
39175  input_path="$new_path"
39176  # Check if we need to convert this using DOS-style short mode. If the path
39177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39178  # take no chances and rewrite it.
39179  # Note: m4 eats our [], so we need to use [ and ] instead.
39180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39181  if test "x$has_forbidden_chars" != x; then
39182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39184  fi
39185
39186    # Output is in $new_path
39187
39188  windows_path="$new_path"
39189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39190    unix_path=`$CYGPATH -u "$windows_path"`
39191    new_path="$unix_path"
39192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39194    new_path="$unix_path"
39195  fi
39196
39197    # remove trailing .exe if any
39198    new_path="${new_path/%.exe/}"
39199
39200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39202  fi
39203
39204    else
39205      # We're on a unix platform. Hooray! :)
39206      # First separate the path from the arguments. This will split at the first
39207      # space.
39208      complete="$OBJCOPY"
39209      path="${complete%% *}"
39210      tmp="$complete EOL"
39211      arguments="${tmp#* }"
39212
39213      # Cannot rely on the command "which" here since it doesn't always work.
39214      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39215      if test -z "$is_absolute_path"; then
39216        # Path to executable is not absolute. Find it.
39217        IFS_save="$IFS"
39218        IFS=:
39219        for p in $PATH; do
39220          if test -f "$p/$path" && test -x "$p/$path"; then
39221            new_path="$p/$path"
39222            break
39223          fi
39224        done
39225        IFS="$IFS_save"
39226      else
39227        # This is an absolute path, we can use it without further modifications.
39228        new_path="$path"
39229      fi
39230
39231      if test "x$new_path" = x; then
39232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39233$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39234        has_space=`$ECHO "$complete" | $GREP " "`
39235        if test "x$has_space" != x; then
39236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39238        fi
39239        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39240      fi
39241    fi
39242
39243    # Now join together the path and the arguments once again
39244    if test "x$arguments" != xEOL; then
39245      new_complete="$new_path ${arguments% *}"
39246    else
39247      new_complete="$new_path"
39248    fi
39249
39250    if test "x$complete" != "x$new_complete"; then
39251      OBJCOPY="$new_complete"
39252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39253$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39254    fi
39255  fi
39256
39257    fi
39258  fi
39259
39260
39261
39262  # Publish this variable in the help.
39263
39264
39265  if test "x$OBJDUMP" = x; then
39266    # The variable is not set by user, try to locate tool using the code snippet
39267    if test -n "$ac_tool_prefix"; then
39268  for ac_prog in gobjdump objdump
39269  do
39270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39273$as_echo_n "checking for $ac_word... " >&6; }
39274if ${ac_cv_prog_OBJDUMP+:} false; then :
39275  $as_echo_n "(cached) " >&6
39276else
39277  if test -n "$OBJDUMP"; then
39278  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39279else
39280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39281for as_dir in $PATH
39282do
39283  IFS=$as_save_IFS
39284  test -z "$as_dir" && as_dir=.
39285    for ac_exec_ext in '' $ac_executable_extensions; do
39286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39287    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39289    break 2
39290  fi
39291done
39292  done
39293IFS=$as_save_IFS
39294
39295fi
39296fi
39297OBJDUMP=$ac_cv_prog_OBJDUMP
39298if test -n "$OBJDUMP"; then
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39300$as_echo "$OBJDUMP" >&6; }
39301else
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39303$as_echo "no" >&6; }
39304fi
39305
39306
39307    test -n "$OBJDUMP" && break
39308  done
39309fi
39310if test -z "$OBJDUMP"; then
39311  ac_ct_OBJDUMP=$OBJDUMP
39312  for ac_prog in gobjdump objdump
39313do
39314  # Extract the first word of "$ac_prog", so it can be a program name with args.
39315set dummy $ac_prog; ac_word=$2
39316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39317$as_echo_n "checking for $ac_word... " >&6; }
39318if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39319  $as_echo_n "(cached) " >&6
39320else
39321  if test -n "$ac_ct_OBJDUMP"; then
39322  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39323else
39324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39325for as_dir in $PATH
39326do
39327  IFS=$as_save_IFS
39328  test -z "$as_dir" && as_dir=.
39329    for ac_exec_ext in '' $ac_executable_extensions; do
39330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39331    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39333    break 2
39334  fi
39335done
39336  done
39337IFS=$as_save_IFS
39338
39339fi
39340fi
39341ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39342if test -n "$ac_ct_OBJDUMP"; then
39343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39344$as_echo "$ac_ct_OBJDUMP" >&6; }
39345else
39346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39347$as_echo "no" >&6; }
39348fi
39349
39350
39351  test -n "$ac_ct_OBJDUMP" && break
39352done
39353
39354  if test "x$ac_ct_OBJDUMP" = x; then
39355    OBJDUMP=""
39356  else
39357    case $cross_compiling:$ac_tool_warned in
39358yes:)
39359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39361ac_tool_warned=yes ;;
39362esac
39363    OBJDUMP=$ac_ct_OBJDUMP
39364  fi
39365fi
39366
39367  else
39368    # The variable is set, but is it from the command line or the environment?
39369
39370    # Try to remove the string !OBJDUMP! from our list.
39371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39373      # If it failed, the variable was not from the command line. Ignore it,
39374      # but warn the user (except for BASH, which is always set by the calling BASH).
39375      if test "xOBJDUMP" != xBASH; then
39376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39377$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39378      fi
39379      # Try to locate tool using the code snippet
39380      if test -n "$ac_tool_prefix"; then
39381  for ac_prog in gobjdump objdump
39382  do
39383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39386$as_echo_n "checking for $ac_word... " >&6; }
39387if ${ac_cv_prog_OBJDUMP+:} false; then :
39388  $as_echo_n "(cached) " >&6
39389else
39390  if test -n "$OBJDUMP"; then
39391  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39392else
39393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39394for as_dir in $PATH
39395do
39396  IFS=$as_save_IFS
39397  test -z "$as_dir" && as_dir=.
39398    for ac_exec_ext in '' $ac_executable_extensions; do
39399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39400    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39402    break 2
39403  fi
39404done
39405  done
39406IFS=$as_save_IFS
39407
39408fi
39409fi
39410OBJDUMP=$ac_cv_prog_OBJDUMP
39411if test -n "$OBJDUMP"; then
39412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39413$as_echo "$OBJDUMP" >&6; }
39414else
39415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39416$as_echo "no" >&6; }
39417fi
39418
39419
39420    test -n "$OBJDUMP" && break
39421  done
39422fi
39423if test -z "$OBJDUMP"; then
39424  ac_ct_OBJDUMP=$OBJDUMP
39425  for ac_prog in gobjdump objdump
39426do
39427  # Extract the first word of "$ac_prog", so it can be a program name with args.
39428set dummy $ac_prog; ac_word=$2
39429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39430$as_echo_n "checking for $ac_word... " >&6; }
39431if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39432  $as_echo_n "(cached) " >&6
39433else
39434  if test -n "$ac_ct_OBJDUMP"; then
39435  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39436else
39437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39438for as_dir in $PATH
39439do
39440  IFS=$as_save_IFS
39441  test -z "$as_dir" && as_dir=.
39442    for ac_exec_ext in '' $ac_executable_extensions; do
39443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39444    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39446    break 2
39447  fi
39448done
39449  done
39450IFS=$as_save_IFS
39451
39452fi
39453fi
39454ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39455if test -n "$ac_ct_OBJDUMP"; then
39456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39457$as_echo "$ac_ct_OBJDUMP" >&6; }
39458else
39459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39460$as_echo "no" >&6; }
39461fi
39462
39463
39464  test -n "$ac_ct_OBJDUMP" && break
39465done
39466
39467  if test "x$ac_ct_OBJDUMP" = x; then
39468    OBJDUMP=""
39469  else
39470    case $cross_compiling:$ac_tool_warned in
39471yes:)
39472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39474ac_tool_warned=yes ;;
39475esac
39476    OBJDUMP=$ac_ct_OBJDUMP
39477  fi
39478fi
39479
39480    else
39481      # If it succeeded, then it was overridden by the user. We will use it
39482      # for the tool.
39483
39484      # First remove it from the list of overridden variables, so we can test
39485      # for unknown variables in the end.
39486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39487
39488      # Check if the provided tool contains a complete path.
39489      tool_specified="$OBJDUMP"
39490      tool_basename="${tool_specified##*/}"
39491      if test "x$tool_basename" = "x$tool_specified"; then
39492        # A command without a complete path is provided, search $PATH.
39493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39494$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39495        # Extract the first word of "$tool_basename", so it can be a program name with args.
39496set dummy $tool_basename; ac_word=$2
39497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39498$as_echo_n "checking for $ac_word... " >&6; }
39499if ${ac_cv_path_OBJDUMP+:} false; then :
39500  $as_echo_n "(cached) " >&6
39501else
39502  case $OBJDUMP in
39503  [\\/]* | ?:[\\/]*)
39504  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39505  ;;
39506  *)
39507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39508for as_dir in $PATH
39509do
39510  IFS=$as_save_IFS
39511  test -z "$as_dir" && as_dir=.
39512    for ac_exec_ext in '' $ac_executable_extensions; do
39513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39514    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39516    break 2
39517  fi
39518done
39519  done
39520IFS=$as_save_IFS
39521
39522  ;;
39523esac
39524fi
39525OBJDUMP=$ac_cv_path_OBJDUMP
39526if test -n "$OBJDUMP"; then
39527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39528$as_echo "$OBJDUMP" >&6; }
39529else
39530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39531$as_echo "no" >&6; }
39532fi
39533
39534
39535        if test "x$OBJDUMP" = x; then
39536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39537        fi
39538      else
39539        # Otherwise we believe it is a complete path. Use it as it is.
39540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39541$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39543$as_echo_n "checking for OBJDUMP... " >&6; }
39544        if test ! -x "$tool_specified"; then
39545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39546$as_echo "not found" >&6; }
39547          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39548        fi
39549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39550$as_echo "$tool_specified" >&6; }
39551      fi
39552    fi
39553  fi
39554
39555
39556  if test "x$OBJDUMP" != x; then
39557    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39558    # bails if argument is missing.
39559
39560  # Only process if variable expands to non-empty
39561
39562  if test "x$OBJDUMP" != x; then
39563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39564
39565  # First separate the path from the arguments. This will split at the first
39566  # space.
39567  complete="$OBJDUMP"
39568  path="${complete%% *}"
39569  tmp="$complete EOL"
39570  arguments="${tmp#* }"
39571
39572  # Input might be given as Windows format, start by converting to
39573  # unix format.
39574  new_path=`$CYGPATH -u "$path"`
39575
39576  # Now try to locate executable using which
39577  new_path=`$WHICH "$new_path" 2> /dev/null`
39578  # bat and cmd files are not always considered executable in cygwin causing which
39579  # to not find them
39580  if test "x$new_path" = x \
39581      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39582      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39583    new_path=`$CYGPATH -u "$path"`
39584  fi
39585  if test "x$new_path" = x; then
39586    # Oops. Which didn't find the executable.
39587    # The splitting of arguments from the executable at a space might have been incorrect,
39588    # since paths with space are more likely in Windows. Give it another try with the whole
39589    # argument.
39590    path="$complete"
39591    arguments="EOL"
39592    new_path=`$CYGPATH -u "$path"`
39593    new_path=`$WHICH "$new_path" 2> /dev/null`
39594    # bat and cmd files are not always considered executable in cygwin causing which
39595    # to not find them
39596    if test "x$new_path" = x \
39597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39599      new_path=`$CYGPATH -u "$path"`
39600    fi
39601    if test "x$new_path" = x; then
39602      # It's still not found. Now this is an unrecoverable error.
39603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39604$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39605      has_space=`$ECHO "$complete" | $GREP " "`
39606      if test "x$has_space" != x; then
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39609      fi
39610      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39611    fi
39612  fi
39613
39614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39617  # "foo.exe" is OK but "foo" is an error.
39618  #
39619  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39620  # It is also a way to make sure we got the proper file name for the real test later on.
39621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39622  if test "x$test_shortpath" = x; then
39623    # Short path failed, file does not exist as specified.
39624    # Try adding .exe or .cmd
39625    if test -f "${new_path}.exe"; then
39626      input_to_shortpath="${new_path}.exe"
39627    elif test -f "${new_path}.cmd"; then
39628      input_to_shortpath="${new_path}.cmd"
39629    else
39630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39631$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39632      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39633$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39634      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39635    fi
39636  else
39637    input_to_shortpath="$new_path"
39638  fi
39639
39640  # Call helper function which possibly converts this using DOS-style short mode.
39641  # If so, the updated path is stored in $new_path.
39642  new_path="$input_to_shortpath"
39643
39644  input_path="$input_to_shortpath"
39645  # Check if we need to convert this using DOS-style short mode. If the path
39646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39647  # take no chances and rewrite it.
39648  # Note: m4 eats our [], so we need to use [ and ] instead.
39649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39650  if test "x$has_forbidden_chars" != x; then
39651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39655      # Going to short mode and back again did indeed matter. Since short mode is
39656      # case insensitive, let's make it lowercase to improve readability.
39657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39658      # Now convert it back to Unix-stile (cygpath)
39659      input_path=`$CYGPATH -u "$shortmode_path"`
39660      new_path="$input_path"
39661    fi
39662  fi
39663
39664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39665  if test "x$test_cygdrive_prefix" = x; then
39666    # As a simple fix, exclude /usr/bin since it's not a real path.
39667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39669      # a path prefixed by /cygdrive for fixpath to work.
39670      new_path="$CYGWIN_ROOT_PATH$input_path"
39671    fi
39672  fi
39673
39674  # remove trailing .exe if any
39675  new_path="${new_path/%.exe/}"
39676
39677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678
39679  # First separate the path from the arguments. This will split at the first
39680  # space.
39681  complete="$OBJDUMP"
39682  path="${complete%% *}"
39683  tmp="$complete EOL"
39684  arguments="${tmp#* }"
39685
39686  # Input might be given as Windows format, start by converting to
39687  # unix format.
39688  new_path="$path"
39689
39690  windows_path="$new_path"
39691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39692    unix_path=`$CYGPATH -u "$windows_path"`
39693    new_path="$unix_path"
39694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39696    new_path="$unix_path"
39697  fi
39698
39699
39700  # Now try to locate executable using which
39701  new_path=`$WHICH "$new_path" 2> /dev/null`
39702
39703  if test "x$new_path" = x; then
39704    # Oops. Which didn't find the executable.
39705    # The splitting of arguments from the executable at a space might have been incorrect,
39706    # since paths with space are more likely in Windows. Give it another try with the whole
39707    # argument.
39708    path="$complete"
39709    arguments="EOL"
39710    new_path="$path"
39711
39712  windows_path="$new_path"
39713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39714    unix_path=`$CYGPATH -u "$windows_path"`
39715    new_path="$unix_path"
39716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39718    new_path="$unix_path"
39719  fi
39720
39721
39722    new_path=`$WHICH "$new_path" 2> /dev/null`
39723    # bat and cmd files are not always considered executable in MSYS causing which
39724    # to not find them
39725    if test "x$new_path" = x \
39726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39728      new_path="$path"
39729
39730  windows_path="$new_path"
39731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39732    unix_path=`$CYGPATH -u "$windows_path"`
39733    new_path="$unix_path"
39734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39736    new_path="$unix_path"
39737  fi
39738
39739    fi
39740
39741    if test "x$new_path" = x; then
39742      # It's still not found. Now this is an unrecoverable error.
39743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39744$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39745      has_space=`$ECHO "$complete" | $GREP " "`
39746      if test "x$has_space" != x; then
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39749      fi
39750      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39751    fi
39752  fi
39753
39754  # Now new_path has a complete unix path to the binary
39755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39756    # Keep paths in /bin as-is, but remove trailing .exe if any
39757    new_path="${new_path/%.exe/}"
39758    # Do not save /bin paths to all_fixpath_prefixes!
39759  else
39760    # Not in mixed or Windows style, start by that.
39761    new_path=`cmd //c echo $new_path`
39762
39763  input_path="$new_path"
39764  # Check if we need to convert this using DOS-style short mode. If the path
39765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39766  # take no chances and rewrite it.
39767  # Note: m4 eats our [], so we need to use [ and ] instead.
39768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39769  if test "x$has_forbidden_chars" != x; then
39770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39772  fi
39773
39774    # Output is in $new_path
39775
39776  windows_path="$new_path"
39777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39778    unix_path=`$CYGPATH -u "$windows_path"`
39779    new_path="$unix_path"
39780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39782    new_path="$unix_path"
39783  fi
39784
39785    # remove trailing .exe if any
39786    new_path="${new_path/%.exe/}"
39787
39788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39790  fi
39791
39792    else
39793      # We're on a unix platform. Hooray! :)
39794      # First separate the path from the arguments. This will split at the first
39795      # space.
39796      complete="$OBJDUMP"
39797      path="${complete%% *}"
39798      tmp="$complete EOL"
39799      arguments="${tmp#* }"
39800
39801      # Cannot rely on the command "which" here since it doesn't always work.
39802      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39803      if test -z "$is_absolute_path"; then
39804        # Path to executable is not absolute. Find it.
39805        IFS_save="$IFS"
39806        IFS=:
39807        for p in $PATH; do
39808          if test -f "$p/$path" && test -x "$p/$path"; then
39809            new_path="$p/$path"
39810            break
39811          fi
39812        done
39813        IFS="$IFS_save"
39814      else
39815        # This is an absolute path, we can use it without further modifications.
39816        new_path="$path"
39817      fi
39818
39819      if test "x$new_path" = x; then
39820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39821$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39822        has_space=`$ECHO "$complete" | $GREP " "`
39823        if test "x$has_space" != x; then
39824          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39826        fi
39827        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39828      fi
39829    fi
39830
39831    # Now join together the path and the arguments once again
39832    if test "x$arguments" != xEOL; then
39833      new_complete="$new_path ${arguments% *}"
39834    else
39835      new_complete="$new_path"
39836    fi
39837
39838    if test "x$complete" != "x$new_complete"; then
39839      OBJDUMP="$new_complete"
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39841$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39842    fi
39843  fi
39844
39845  fi
39846
39847
39848  # Restore old path.
39849  PATH="$OLD_PATH"
39850
39851  # Restore the flags to the user specified values.
39852  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39853  CFLAGS="$ORG_CFLAGS"
39854  CXXFLAGS="$ORG_CXXFLAGS"
39855  OBJCFLAGS="$ORG_OBJCFLAGS"
39856
39857
39858# Finally do some processing after the detection phase
39859
39860  if test "x$COMPILE_TYPE" = "xcross"; then
39861    # Now we need to find a C/C++ compiler that can build executables for the
39862    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39863    # used once. Also, we need to do this without adding a tools dir to the
39864    # path, otherwise we might pick up cross-compilers which don't use standard
39865    # naming.
39866
39867    # FIXME: we should list the discovered compilers as an exclude pattern!
39868    # If we do that, we can do this detection before POST_DETECTION, and still
39869    # find the build compilers in the tools dir, if needed.
39870
39871
39872  # Publish this variable in the help.
39873
39874
39875  if test "x$BUILD_CC" = x; then
39876    # The variable is not set by user, try to locate tool using the code snippet
39877    for ac_prog in cl cc gcc
39878do
39879  # Extract the first word of "$ac_prog", so it can be a program name with args.
39880set dummy $ac_prog; ac_word=$2
39881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39882$as_echo_n "checking for $ac_word... " >&6; }
39883if ${ac_cv_path_BUILD_CC+:} false; then :
39884  $as_echo_n "(cached) " >&6
39885else
39886  case $BUILD_CC in
39887  [\\/]* | ?:[\\/]*)
39888  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39889  ;;
39890  *)
39891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39892for as_dir in $PATH
39893do
39894  IFS=$as_save_IFS
39895  test -z "$as_dir" && as_dir=.
39896    for ac_exec_ext in '' $ac_executable_extensions; do
39897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39898    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39900    break 2
39901  fi
39902done
39903  done
39904IFS=$as_save_IFS
39905
39906  ;;
39907esac
39908fi
39909BUILD_CC=$ac_cv_path_BUILD_CC
39910if test -n "$BUILD_CC"; then
39911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39912$as_echo "$BUILD_CC" >&6; }
39913else
39914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39915$as_echo "no" >&6; }
39916fi
39917
39918
39919  test -n "$BUILD_CC" && break
39920done
39921
39922  else
39923    # The variable is set, but is it from the command line or the environment?
39924
39925    # Try to remove the string !BUILD_CC! from our list.
39926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39928      # If it failed, the variable was not from the command line. Ignore it,
39929      # but warn the user (except for BASH, which is always set by the calling BASH).
39930      if test "xBUILD_CC" != xBASH; then
39931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39932$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39933      fi
39934      # Try to locate tool using the code snippet
39935      for ac_prog in cl cc gcc
39936do
39937  # Extract the first word of "$ac_prog", so it can be a program name with args.
39938set dummy $ac_prog; ac_word=$2
39939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39940$as_echo_n "checking for $ac_word... " >&6; }
39941if ${ac_cv_path_BUILD_CC+:} false; then :
39942  $as_echo_n "(cached) " >&6
39943else
39944  case $BUILD_CC in
39945  [\\/]* | ?:[\\/]*)
39946  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39947  ;;
39948  *)
39949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39950for as_dir in $PATH
39951do
39952  IFS=$as_save_IFS
39953  test -z "$as_dir" && as_dir=.
39954    for ac_exec_ext in '' $ac_executable_extensions; do
39955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39956    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39958    break 2
39959  fi
39960done
39961  done
39962IFS=$as_save_IFS
39963
39964  ;;
39965esac
39966fi
39967BUILD_CC=$ac_cv_path_BUILD_CC
39968if test -n "$BUILD_CC"; then
39969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39970$as_echo "$BUILD_CC" >&6; }
39971else
39972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39973$as_echo "no" >&6; }
39974fi
39975
39976
39977  test -n "$BUILD_CC" && break
39978done
39979
39980    else
39981      # If it succeeded, then it was overridden by the user. We will use it
39982      # for the tool.
39983
39984      # First remove it from the list of overridden variables, so we can test
39985      # for unknown variables in the end.
39986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39987
39988      # Check if the provided tool contains a complete path.
39989      tool_specified="$BUILD_CC"
39990      tool_basename="${tool_specified##*/}"
39991      if test "x$tool_basename" = "x$tool_specified"; then
39992        # A command without a complete path is provided, search $PATH.
39993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39994$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39995        # Extract the first word of "$tool_basename", so it can be a program name with args.
39996set dummy $tool_basename; ac_word=$2
39997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39998$as_echo_n "checking for $ac_word... " >&6; }
39999if ${ac_cv_path_BUILD_CC+:} false; then :
40000  $as_echo_n "(cached) " >&6
40001else
40002  case $BUILD_CC in
40003  [\\/]* | ?:[\\/]*)
40004  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40005  ;;
40006  *)
40007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40008for as_dir in $PATH
40009do
40010  IFS=$as_save_IFS
40011  test -z "$as_dir" && as_dir=.
40012    for ac_exec_ext in '' $ac_executable_extensions; do
40013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40014    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40016    break 2
40017  fi
40018done
40019  done
40020IFS=$as_save_IFS
40021
40022  ;;
40023esac
40024fi
40025BUILD_CC=$ac_cv_path_BUILD_CC
40026if test -n "$BUILD_CC"; then
40027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40028$as_echo "$BUILD_CC" >&6; }
40029else
40030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40031$as_echo "no" >&6; }
40032fi
40033
40034
40035        if test "x$BUILD_CC" = x; then
40036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40037        fi
40038      else
40039        # Otherwise we believe it is a complete path. Use it as it is.
40040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
40041$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
40042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40043$as_echo_n "checking for BUILD_CC... " >&6; }
40044        if test ! -x "$tool_specified"; then
40045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40046$as_echo "not found" >&6; }
40047          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
40048        fi
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40050$as_echo "$tool_specified" >&6; }
40051      fi
40052    fi
40053  fi
40054
40055
40056
40057  # Only process if variable expands to non-empty
40058
40059  if test "x$BUILD_CC" != x; then
40060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40061
40062  # First separate the path from the arguments. This will split at the first
40063  # space.
40064  complete="$BUILD_CC"
40065  path="${complete%% *}"
40066  tmp="$complete EOL"
40067  arguments="${tmp#* }"
40068
40069  # Input might be given as Windows format, start by converting to
40070  # unix format.
40071  new_path=`$CYGPATH -u "$path"`
40072
40073  # Now try to locate executable using which
40074  new_path=`$WHICH "$new_path" 2> /dev/null`
40075  # bat and cmd files are not always considered executable in cygwin causing which
40076  # to not find them
40077  if test "x$new_path" = x \
40078      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40079      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40080    new_path=`$CYGPATH -u "$path"`
40081  fi
40082  if test "x$new_path" = x; then
40083    # Oops. Which didn't find the executable.
40084    # The splitting of arguments from the executable at a space might have been incorrect,
40085    # since paths with space are more likely in Windows. Give it another try with the whole
40086    # argument.
40087    path="$complete"
40088    arguments="EOL"
40089    new_path=`$CYGPATH -u "$path"`
40090    new_path=`$WHICH "$new_path" 2> /dev/null`
40091    # bat and cmd files are not always considered executable in cygwin causing which
40092    # to not find them
40093    if test "x$new_path" = x \
40094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40096      new_path=`$CYGPATH -u "$path"`
40097    fi
40098    if test "x$new_path" = x; then
40099      # It's still not found. Now this is an unrecoverable error.
40100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40101$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40102      has_space=`$ECHO "$complete" | $GREP " "`
40103      if test "x$has_space" != x; then
40104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40106      fi
40107      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40108    fi
40109  fi
40110
40111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40114  # "foo.exe" is OK but "foo" is an error.
40115  #
40116  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40117  # It is also a way to make sure we got the proper file name for the real test later on.
40118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40119  if test "x$test_shortpath" = x; then
40120    # Short path failed, file does not exist as specified.
40121    # Try adding .exe or .cmd
40122    if test -f "${new_path}.exe"; then
40123      input_to_shortpath="${new_path}.exe"
40124    elif test -f "${new_path}.cmd"; then
40125      input_to_shortpath="${new_path}.cmd"
40126    else
40127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40128$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40129      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40130$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40131      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40132    fi
40133  else
40134    input_to_shortpath="$new_path"
40135  fi
40136
40137  # Call helper function which possibly converts this using DOS-style short mode.
40138  # If so, the updated path is stored in $new_path.
40139  new_path="$input_to_shortpath"
40140
40141  input_path="$input_to_shortpath"
40142  # Check if we need to convert this using DOS-style short mode. If the path
40143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40144  # take no chances and rewrite it.
40145  # Note: m4 eats our [], so we need to use [ and ] instead.
40146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40147  if test "x$has_forbidden_chars" != x; then
40148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40152      # Going to short mode and back again did indeed matter. Since short mode is
40153      # case insensitive, let's make it lowercase to improve readability.
40154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40155      # Now convert it back to Unix-stile (cygpath)
40156      input_path=`$CYGPATH -u "$shortmode_path"`
40157      new_path="$input_path"
40158    fi
40159  fi
40160
40161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40162  if test "x$test_cygdrive_prefix" = x; then
40163    # As a simple fix, exclude /usr/bin since it's not a real path.
40164    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40166      # a path prefixed by /cygdrive for fixpath to work.
40167      new_path="$CYGWIN_ROOT_PATH$input_path"
40168    fi
40169  fi
40170
40171  # remove trailing .exe if any
40172  new_path="${new_path/%.exe/}"
40173
40174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40175
40176  # First separate the path from the arguments. This will split at the first
40177  # space.
40178  complete="$BUILD_CC"
40179  path="${complete%% *}"
40180  tmp="$complete EOL"
40181  arguments="${tmp#* }"
40182
40183  # Input might be given as Windows format, start by converting to
40184  # unix format.
40185  new_path="$path"
40186
40187  windows_path="$new_path"
40188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189    unix_path=`$CYGPATH -u "$windows_path"`
40190    new_path="$unix_path"
40191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40193    new_path="$unix_path"
40194  fi
40195
40196
40197  # Now try to locate executable using which
40198  new_path=`$WHICH "$new_path" 2> /dev/null`
40199
40200  if test "x$new_path" = x; then
40201    # Oops. Which didn't find the executable.
40202    # The splitting of arguments from the executable at a space might have been incorrect,
40203    # since paths with space are more likely in Windows. Give it another try with the whole
40204    # argument.
40205    path="$complete"
40206    arguments="EOL"
40207    new_path="$path"
40208
40209  windows_path="$new_path"
40210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40211    unix_path=`$CYGPATH -u "$windows_path"`
40212    new_path="$unix_path"
40213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40215    new_path="$unix_path"
40216  fi
40217
40218
40219    new_path=`$WHICH "$new_path" 2> /dev/null`
40220    # bat and cmd files are not always considered executable in MSYS causing which
40221    # to not find them
40222    if test "x$new_path" = x \
40223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40225      new_path="$path"
40226
40227  windows_path="$new_path"
40228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40229    unix_path=`$CYGPATH -u "$windows_path"`
40230    new_path="$unix_path"
40231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40233    new_path="$unix_path"
40234  fi
40235
40236    fi
40237
40238    if test "x$new_path" = x; then
40239      # It's still not found. Now this is an unrecoverable error.
40240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40241$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40242      has_space=`$ECHO "$complete" | $GREP " "`
40243      if test "x$has_space" != x; then
40244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40246      fi
40247      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40248    fi
40249  fi
40250
40251  # Now new_path has a complete unix path to the binary
40252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40253    # Keep paths in /bin as-is, but remove trailing .exe if any
40254    new_path="${new_path/%.exe/}"
40255    # Do not save /bin paths to all_fixpath_prefixes!
40256  else
40257    # Not in mixed or Windows style, start by that.
40258    new_path=`cmd //c echo $new_path`
40259
40260  input_path="$new_path"
40261  # Check if we need to convert this using DOS-style short mode. If the path
40262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40263  # take no chances and rewrite it.
40264  # Note: m4 eats our [], so we need to use [ and ] instead.
40265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40266  if test "x$has_forbidden_chars" != x; then
40267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40269  fi
40270
40271    # Output is in $new_path
40272
40273  windows_path="$new_path"
40274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40275    unix_path=`$CYGPATH -u "$windows_path"`
40276    new_path="$unix_path"
40277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40279    new_path="$unix_path"
40280  fi
40281
40282    # remove trailing .exe if any
40283    new_path="${new_path/%.exe/}"
40284
40285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40287  fi
40288
40289    else
40290      # We're on a unix platform. Hooray! :)
40291      # First separate the path from the arguments. This will split at the first
40292      # space.
40293      complete="$BUILD_CC"
40294      path="${complete%% *}"
40295      tmp="$complete EOL"
40296      arguments="${tmp#* }"
40297
40298      # Cannot rely on the command "which" here since it doesn't always work.
40299      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40300      if test -z "$is_absolute_path"; then
40301        # Path to executable is not absolute. Find it.
40302        IFS_save="$IFS"
40303        IFS=:
40304        for p in $PATH; do
40305          if test -f "$p/$path" && test -x "$p/$path"; then
40306            new_path="$p/$path"
40307            break
40308          fi
40309        done
40310        IFS="$IFS_save"
40311      else
40312        # This is an absolute path, we can use it without further modifications.
40313        new_path="$path"
40314      fi
40315
40316      if test "x$new_path" = x; then
40317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40318$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40319        has_space=`$ECHO "$complete" | $GREP " "`
40320        if test "x$has_space" != x; then
40321          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40323        fi
40324        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40325      fi
40326    fi
40327
40328    # Now join together the path and the arguments once again
40329    if test "x$arguments" != xEOL; then
40330      new_complete="$new_path ${arguments% *}"
40331    else
40332      new_complete="$new_path"
40333    fi
40334
40335    if test "x$complete" != "x$new_complete"; then
40336      BUILD_CC="$new_complete"
40337      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40338$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40339    fi
40340  fi
40341
40342
40343
40344  # Publish this variable in the help.
40345
40346
40347  if test "x$BUILD_CXX" = x; then
40348    # The variable is not set by user, try to locate tool using the code snippet
40349    for ac_prog in cl CC g++
40350do
40351  # Extract the first word of "$ac_prog", so it can be a program name with args.
40352set dummy $ac_prog; ac_word=$2
40353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40354$as_echo_n "checking for $ac_word... " >&6; }
40355if ${ac_cv_path_BUILD_CXX+:} false; then :
40356  $as_echo_n "(cached) " >&6
40357else
40358  case $BUILD_CXX in
40359  [\\/]* | ?:[\\/]*)
40360  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40361  ;;
40362  *)
40363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40364for as_dir in $PATH
40365do
40366  IFS=$as_save_IFS
40367  test -z "$as_dir" && as_dir=.
40368    for ac_exec_ext in '' $ac_executable_extensions; do
40369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40370    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40372    break 2
40373  fi
40374done
40375  done
40376IFS=$as_save_IFS
40377
40378  ;;
40379esac
40380fi
40381BUILD_CXX=$ac_cv_path_BUILD_CXX
40382if test -n "$BUILD_CXX"; then
40383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40384$as_echo "$BUILD_CXX" >&6; }
40385else
40386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40387$as_echo "no" >&6; }
40388fi
40389
40390
40391  test -n "$BUILD_CXX" && break
40392done
40393
40394  else
40395    # The variable is set, but is it from the command line or the environment?
40396
40397    # Try to remove the string !BUILD_CXX! from our list.
40398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40400      # If it failed, the variable was not from the command line. Ignore it,
40401      # but warn the user (except for BASH, which is always set by the calling BASH).
40402      if test "xBUILD_CXX" != xBASH; then
40403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40404$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40405      fi
40406      # Try to locate tool using the code snippet
40407      for ac_prog in cl CC g++
40408do
40409  # Extract the first word of "$ac_prog", so it can be a program name with args.
40410set dummy $ac_prog; ac_word=$2
40411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40412$as_echo_n "checking for $ac_word... " >&6; }
40413if ${ac_cv_path_BUILD_CXX+:} false; then :
40414  $as_echo_n "(cached) " >&6
40415else
40416  case $BUILD_CXX in
40417  [\\/]* | ?:[\\/]*)
40418  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40419  ;;
40420  *)
40421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40422for as_dir in $PATH
40423do
40424  IFS=$as_save_IFS
40425  test -z "$as_dir" && as_dir=.
40426    for ac_exec_ext in '' $ac_executable_extensions; do
40427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40428    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40430    break 2
40431  fi
40432done
40433  done
40434IFS=$as_save_IFS
40435
40436  ;;
40437esac
40438fi
40439BUILD_CXX=$ac_cv_path_BUILD_CXX
40440if test -n "$BUILD_CXX"; then
40441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40442$as_echo "$BUILD_CXX" >&6; }
40443else
40444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40445$as_echo "no" >&6; }
40446fi
40447
40448
40449  test -n "$BUILD_CXX" && break
40450done
40451
40452    else
40453      # If it succeeded, then it was overridden by the user. We will use it
40454      # for the tool.
40455
40456      # First remove it from the list of overridden variables, so we can test
40457      # for unknown variables in the end.
40458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40459
40460      # Check if the provided tool contains a complete path.
40461      tool_specified="$BUILD_CXX"
40462      tool_basename="${tool_specified##*/}"
40463      if test "x$tool_basename" = "x$tool_specified"; then
40464        # A command without a complete path is provided, search $PATH.
40465        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40466$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40467        # Extract the first word of "$tool_basename", so it can be a program name with args.
40468set dummy $tool_basename; ac_word=$2
40469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40470$as_echo_n "checking for $ac_word... " >&6; }
40471if ${ac_cv_path_BUILD_CXX+:} false; then :
40472  $as_echo_n "(cached) " >&6
40473else
40474  case $BUILD_CXX in
40475  [\\/]* | ?:[\\/]*)
40476  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40477  ;;
40478  *)
40479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40480for as_dir in $PATH
40481do
40482  IFS=$as_save_IFS
40483  test -z "$as_dir" && as_dir=.
40484    for ac_exec_ext in '' $ac_executable_extensions; do
40485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40486    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40488    break 2
40489  fi
40490done
40491  done
40492IFS=$as_save_IFS
40493
40494  ;;
40495esac
40496fi
40497BUILD_CXX=$ac_cv_path_BUILD_CXX
40498if test -n "$BUILD_CXX"; then
40499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40500$as_echo "$BUILD_CXX" >&6; }
40501else
40502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40503$as_echo "no" >&6; }
40504fi
40505
40506
40507        if test "x$BUILD_CXX" = x; then
40508          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40509        fi
40510      else
40511        # Otherwise we believe it is a complete path. Use it as it is.
40512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40513$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40515$as_echo_n "checking for BUILD_CXX... " >&6; }
40516        if test ! -x "$tool_specified"; then
40517          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40518$as_echo "not found" >&6; }
40519          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40520        fi
40521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40522$as_echo "$tool_specified" >&6; }
40523      fi
40524    fi
40525  fi
40526
40527
40528
40529  # Only process if variable expands to non-empty
40530
40531  if test "x$BUILD_CXX" != x; then
40532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40533
40534  # First separate the path from the arguments. This will split at the first
40535  # space.
40536  complete="$BUILD_CXX"
40537  path="${complete%% *}"
40538  tmp="$complete EOL"
40539  arguments="${tmp#* }"
40540
40541  # Input might be given as Windows format, start by converting to
40542  # unix format.
40543  new_path=`$CYGPATH -u "$path"`
40544
40545  # Now try to locate executable using which
40546  new_path=`$WHICH "$new_path" 2> /dev/null`
40547  # bat and cmd files are not always considered executable in cygwin causing which
40548  # to not find them
40549  if test "x$new_path" = x \
40550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40552    new_path=`$CYGPATH -u "$path"`
40553  fi
40554  if test "x$new_path" = x; then
40555    # Oops. Which didn't find the executable.
40556    # The splitting of arguments from the executable at a space might have been incorrect,
40557    # since paths with space are more likely in Windows. Give it another try with the whole
40558    # argument.
40559    path="$complete"
40560    arguments="EOL"
40561    new_path=`$CYGPATH -u "$path"`
40562    new_path=`$WHICH "$new_path" 2> /dev/null`
40563    # bat and cmd files are not always considered executable in cygwin causing which
40564    # to not find them
40565    if test "x$new_path" = x \
40566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40568      new_path=`$CYGPATH -u "$path"`
40569    fi
40570    if test "x$new_path" = x; then
40571      # It's still not found. Now this is an unrecoverable error.
40572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40573$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40574      has_space=`$ECHO "$complete" | $GREP " "`
40575      if test "x$has_space" != x; then
40576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40578      fi
40579      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40580    fi
40581  fi
40582
40583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40586  # "foo.exe" is OK but "foo" is an error.
40587  #
40588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40589  # It is also a way to make sure we got the proper file name for the real test later on.
40590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40591  if test "x$test_shortpath" = x; then
40592    # Short path failed, file does not exist as specified.
40593    # Try adding .exe or .cmd
40594    if test -f "${new_path}.exe"; then
40595      input_to_shortpath="${new_path}.exe"
40596    elif test -f "${new_path}.cmd"; then
40597      input_to_shortpath="${new_path}.cmd"
40598    else
40599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40600$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40603      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40604    fi
40605  else
40606    input_to_shortpath="$new_path"
40607  fi
40608
40609  # Call helper function which possibly converts this using DOS-style short mode.
40610  # If so, the updated path is stored in $new_path.
40611  new_path="$input_to_shortpath"
40612
40613  input_path="$input_to_shortpath"
40614  # Check if we need to convert this using DOS-style short mode. If the path
40615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40616  # take no chances and rewrite it.
40617  # Note: m4 eats our [], so we need to use [ and ] instead.
40618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40619  if test "x$has_forbidden_chars" != x; then
40620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40624      # Going to short mode and back again did indeed matter. Since short mode is
40625      # case insensitive, let's make it lowercase to improve readability.
40626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40627      # Now convert it back to Unix-stile (cygpath)
40628      input_path=`$CYGPATH -u "$shortmode_path"`
40629      new_path="$input_path"
40630    fi
40631  fi
40632
40633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40634  if test "x$test_cygdrive_prefix" = x; then
40635    # As a simple fix, exclude /usr/bin since it's not a real path.
40636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40638      # a path prefixed by /cygdrive for fixpath to work.
40639      new_path="$CYGWIN_ROOT_PATH$input_path"
40640    fi
40641  fi
40642
40643  # remove trailing .exe if any
40644  new_path="${new_path/%.exe/}"
40645
40646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40647
40648  # First separate the path from the arguments. This will split at the first
40649  # space.
40650  complete="$BUILD_CXX"
40651  path="${complete%% *}"
40652  tmp="$complete EOL"
40653  arguments="${tmp#* }"
40654
40655  # Input might be given as Windows format, start by converting to
40656  # unix format.
40657  new_path="$path"
40658
40659  windows_path="$new_path"
40660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40661    unix_path=`$CYGPATH -u "$windows_path"`
40662    new_path="$unix_path"
40663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40665    new_path="$unix_path"
40666  fi
40667
40668
40669  # Now try to locate executable using which
40670  new_path=`$WHICH "$new_path" 2> /dev/null`
40671
40672  if test "x$new_path" = x; then
40673    # Oops. Which didn't find the executable.
40674    # The splitting of arguments from the executable at a space might have been incorrect,
40675    # since paths with space are more likely in Windows. Give it another try with the whole
40676    # argument.
40677    path="$complete"
40678    arguments="EOL"
40679    new_path="$path"
40680
40681  windows_path="$new_path"
40682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40683    unix_path=`$CYGPATH -u "$windows_path"`
40684    new_path="$unix_path"
40685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40687    new_path="$unix_path"
40688  fi
40689
40690
40691    new_path=`$WHICH "$new_path" 2> /dev/null`
40692    # bat and cmd files are not always considered executable in MSYS causing which
40693    # to not find them
40694    if test "x$new_path" = x \
40695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40697      new_path="$path"
40698
40699  windows_path="$new_path"
40700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40701    unix_path=`$CYGPATH -u "$windows_path"`
40702    new_path="$unix_path"
40703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40705    new_path="$unix_path"
40706  fi
40707
40708    fi
40709
40710    if test "x$new_path" = x; then
40711      # It's still not found. Now this is an unrecoverable error.
40712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40713$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40714      has_space=`$ECHO "$complete" | $GREP " "`
40715      if test "x$has_space" != x; then
40716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40718      fi
40719      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40720    fi
40721  fi
40722
40723  # Now new_path has a complete unix path to the binary
40724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40725    # Keep paths in /bin as-is, but remove trailing .exe if any
40726    new_path="${new_path/%.exe/}"
40727    # Do not save /bin paths to all_fixpath_prefixes!
40728  else
40729    # Not in mixed or Windows style, start by that.
40730    new_path=`cmd //c echo $new_path`
40731
40732  input_path="$new_path"
40733  # Check if we need to convert this using DOS-style short mode. If the path
40734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40735  # take no chances and rewrite it.
40736  # Note: m4 eats our [], so we need to use [ and ] instead.
40737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40738  if test "x$has_forbidden_chars" != x; then
40739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40741  fi
40742
40743    # Output is in $new_path
40744
40745  windows_path="$new_path"
40746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40747    unix_path=`$CYGPATH -u "$windows_path"`
40748    new_path="$unix_path"
40749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40751    new_path="$unix_path"
40752  fi
40753
40754    # remove trailing .exe if any
40755    new_path="${new_path/%.exe/}"
40756
40757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40759  fi
40760
40761    else
40762      # We're on a unix platform. Hooray! :)
40763      # First separate the path from the arguments. This will split at the first
40764      # space.
40765      complete="$BUILD_CXX"
40766      path="${complete%% *}"
40767      tmp="$complete EOL"
40768      arguments="${tmp#* }"
40769
40770      # Cannot rely on the command "which" here since it doesn't always work.
40771      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40772      if test -z "$is_absolute_path"; then
40773        # Path to executable is not absolute. Find it.
40774        IFS_save="$IFS"
40775        IFS=:
40776        for p in $PATH; do
40777          if test -f "$p/$path" && test -x "$p/$path"; then
40778            new_path="$p/$path"
40779            break
40780          fi
40781        done
40782        IFS="$IFS_save"
40783      else
40784        # This is an absolute path, we can use it without further modifications.
40785        new_path="$path"
40786      fi
40787
40788      if test "x$new_path" = x; then
40789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40790$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40791        has_space=`$ECHO "$complete" | $GREP " "`
40792        if test "x$has_space" != x; then
40793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40795        fi
40796        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40797      fi
40798    fi
40799
40800    # Now join together the path and the arguments once again
40801    if test "x$arguments" != xEOL; then
40802      new_complete="$new_path ${arguments% *}"
40803    else
40804      new_complete="$new_path"
40805    fi
40806
40807    if test "x$complete" != "x$new_complete"; then
40808      BUILD_CXX="$new_complete"
40809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40810$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40811    fi
40812  fi
40813
40814
40815
40816  # Publish this variable in the help.
40817
40818
40819  if test "x$BUILD_LD" = x; then
40820    # The variable is not set by user, try to locate tool using the code snippet
40821    for ac_prog in ld
40822do
40823  # Extract the first word of "$ac_prog", so it can be a program name with args.
40824set dummy $ac_prog; ac_word=$2
40825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40826$as_echo_n "checking for $ac_word... " >&6; }
40827if ${ac_cv_path_BUILD_LD+:} false; then :
40828  $as_echo_n "(cached) " >&6
40829else
40830  case $BUILD_LD in
40831  [\\/]* | ?:[\\/]*)
40832  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40833  ;;
40834  *)
40835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40836for as_dir in $PATH
40837do
40838  IFS=$as_save_IFS
40839  test -z "$as_dir" && as_dir=.
40840    for ac_exec_ext in '' $ac_executable_extensions; do
40841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40842    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40844    break 2
40845  fi
40846done
40847  done
40848IFS=$as_save_IFS
40849
40850  ;;
40851esac
40852fi
40853BUILD_LD=$ac_cv_path_BUILD_LD
40854if test -n "$BUILD_LD"; then
40855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40856$as_echo "$BUILD_LD" >&6; }
40857else
40858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40859$as_echo "no" >&6; }
40860fi
40861
40862
40863  test -n "$BUILD_LD" && break
40864done
40865
40866  else
40867    # The variable is set, but is it from the command line or the environment?
40868
40869    # Try to remove the string !BUILD_LD! from our list.
40870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40872      # If it failed, the variable was not from the command line. Ignore it,
40873      # but warn the user (except for BASH, which is always set by the calling BASH).
40874      if test "xBUILD_LD" != xBASH; then
40875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40876$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40877      fi
40878      # Try to locate tool using the code snippet
40879      for ac_prog in ld
40880do
40881  # Extract the first word of "$ac_prog", so it can be a program name with args.
40882set dummy $ac_prog; ac_word=$2
40883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40884$as_echo_n "checking for $ac_word... " >&6; }
40885if ${ac_cv_path_BUILD_LD+:} false; then :
40886  $as_echo_n "(cached) " >&6
40887else
40888  case $BUILD_LD in
40889  [\\/]* | ?:[\\/]*)
40890  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40891  ;;
40892  *)
40893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40894for as_dir in $PATH
40895do
40896  IFS=$as_save_IFS
40897  test -z "$as_dir" && as_dir=.
40898    for ac_exec_ext in '' $ac_executable_extensions; do
40899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40900    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40902    break 2
40903  fi
40904done
40905  done
40906IFS=$as_save_IFS
40907
40908  ;;
40909esac
40910fi
40911BUILD_LD=$ac_cv_path_BUILD_LD
40912if test -n "$BUILD_LD"; then
40913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40914$as_echo "$BUILD_LD" >&6; }
40915else
40916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40917$as_echo "no" >&6; }
40918fi
40919
40920
40921  test -n "$BUILD_LD" && break
40922done
40923
40924    else
40925      # If it succeeded, then it was overridden by the user. We will use it
40926      # for the tool.
40927
40928      # First remove it from the list of overridden variables, so we can test
40929      # for unknown variables in the end.
40930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40931
40932      # Check if the provided tool contains a complete path.
40933      tool_specified="$BUILD_LD"
40934      tool_basename="${tool_specified##*/}"
40935      if test "x$tool_basename" = "x$tool_specified"; then
40936        # A command without a complete path is provided, search $PATH.
40937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40938$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40939        # Extract the first word of "$tool_basename", so it can be a program name with args.
40940set dummy $tool_basename; ac_word=$2
40941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40942$as_echo_n "checking for $ac_word... " >&6; }
40943if ${ac_cv_path_BUILD_LD+:} false; then :
40944  $as_echo_n "(cached) " >&6
40945else
40946  case $BUILD_LD in
40947  [\\/]* | ?:[\\/]*)
40948  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40949  ;;
40950  *)
40951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40952for as_dir in $PATH
40953do
40954  IFS=$as_save_IFS
40955  test -z "$as_dir" && as_dir=.
40956    for ac_exec_ext in '' $ac_executable_extensions; do
40957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40958    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40960    break 2
40961  fi
40962done
40963  done
40964IFS=$as_save_IFS
40965
40966  ;;
40967esac
40968fi
40969BUILD_LD=$ac_cv_path_BUILD_LD
40970if test -n "$BUILD_LD"; then
40971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40972$as_echo "$BUILD_LD" >&6; }
40973else
40974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40975$as_echo "no" >&6; }
40976fi
40977
40978
40979        if test "x$BUILD_LD" = x; then
40980          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40981        fi
40982      else
40983        # Otherwise we believe it is a complete path. Use it as it is.
40984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40985$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40987$as_echo_n "checking for BUILD_LD... " >&6; }
40988        if test ! -x "$tool_specified"; then
40989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40990$as_echo "not found" >&6; }
40991          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40992        fi
40993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40994$as_echo "$tool_specified" >&6; }
40995      fi
40996    fi
40997  fi
40998
40999
41000
41001  # Only process if variable expands to non-empty
41002
41003  if test "x$BUILD_LD" != x; then
41004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41005
41006  # First separate the path from the arguments. This will split at the first
41007  # space.
41008  complete="$BUILD_LD"
41009  path="${complete%% *}"
41010  tmp="$complete EOL"
41011  arguments="${tmp#* }"
41012
41013  # Input might be given as Windows format, start by converting to
41014  # unix format.
41015  new_path=`$CYGPATH -u "$path"`
41016
41017  # Now try to locate executable using which
41018  new_path=`$WHICH "$new_path" 2> /dev/null`
41019  # bat and cmd files are not always considered executable in cygwin causing which
41020  # to not find them
41021  if test "x$new_path" = x \
41022      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41023      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41024    new_path=`$CYGPATH -u "$path"`
41025  fi
41026  if test "x$new_path" = x; then
41027    # Oops. Which didn't find the executable.
41028    # The splitting of arguments from the executable at a space might have been incorrect,
41029    # since paths with space are more likely in Windows. Give it another try with the whole
41030    # argument.
41031    path="$complete"
41032    arguments="EOL"
41033    new_path=`$CYGPATH -u "$path"`
41034    new_path=`$WHICH "$new_path" 2> /dev/null`
41035    # bat and cmd files are not always considered executable in cygwin causing which
41036    # to not find them
41037    if test "x$new_path" = x \
41038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41040      new_path=`$CYGPATH -u "$path"`
41041    fi
41042    if test "x$new_path" = x; then
41043      # It's still not found. Now this is an unrecoverable error.
41044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41045$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41046      has_space=`$ECHO "$complete" | $GREP " "`
41047      if test "x$has_space" != x; then
41048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41050      fi
41051      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41052    fi
41053  fi
41054
41055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41058  # "foo.exe" is OK but "foo" is an error.
41059  #
41060  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41061  # It is also a way to make sure we got the proper file name for the real test later on.
41062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41063  if test "x$test_shortpath" = x; then
41064    # Short path failed, file does not exist as specified.
41065    # Try adding .exe or .cmd
41066    if test -f "${new_path}.exe"; then
41067      input_to_shortpath="${new_path}.exe"
41068    elif test -f "${new_path}.cmd"; then
41069      input_to_shortpath="${new_path}.cmd"
41070    else
41071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
41072$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
41073      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41074$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41075      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41076    fi
41077  else
41078    input_to_shortpath="$new_path"
41079  fi
41080
41081  # Call helper function which possibly converts this using DOS-style short mode.
41082  # If so, the updated path is stored in $new_path.
41083  new_path="$input_to_shortpath"
41084
41085  input_path="$input_to_shortpath"
41086  # Check if we need to convert this using DOS-style short mode. If the path
41087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41088  # take no chances and rewrite it.
41089  # Note: m4 eats our [], so we need to use [ and ] instead.
41090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41091  if test "x$has_forbidden_chars" != x; then
41092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41096      # Going to short mode and back again did indeed matter. Since short mode is
41097      # case insensitive, let's make it lowercase to improve readability.
41098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41099      # Now convert it back to Unix-stile (cygpath)
41100      input_path=`$CYGPATH -u "$shortmode_path"`
41101      new_path="$input_path"
41102    fi
41103  fi
41104
41105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41106  if test "x$test_cygdrive_prefix" = x; then
41107    # As a simple fix, exclude /usr/bin since it's not a real path.
41108    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41110      # a path prefixed by /cygdrive for fixpath to work.
41111      new_path="$CYGWIN_ROOT_PATH$input_path"
41112    fi
41113  fi
41114
41115  # remove trailing .exe if any
41116  new_path="${new_path/%.exe/}"
41117
41118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41119
41120  # First separate the path from the arguments. This will split at the first
41121  # space.
41122  complete="$BUILD_LD"
41123  path="${complete%% *}"
41124  tmp="$complete EOL"
41125  arguments="${tmp#* }"
41126
41127  # Input might be given as Windows format, start by converting to
41128  # unix format.
41129  new_path="$path"
41130
41131  windows_path="$new_path"
41132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41133    unix_path=`$CYGPATH -u "$windows_path"`
41134    new_path="$unix_path"
41135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41137    new_path="$unix_path"
41138  fi
41139
41140
41141  # Now try to locate executable using which
41142  new_path=`$WHICH "$new_path" 2> /dev/null`
41143
41144  if test "x$new_path" = x; then
41145    # Oops. Which didn't find the executable.
41146    # The splitting of arguments from the executable at a space might have been incorrect,
41147    # since paths with space are more likely in Windows. Give it another try with the whole
41148    # argument.
41149    path="$complete"
41150    arguments="EOL"
41151    new_path="$path"
41152
41153  windows_path="$new_path"
41154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41155    unix_path=`$CYGPATH -u "$windows_path"`
41156    new_path="$unix_path"
41157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41159    new_path="$unix_path"
41160  fi
41161
41162
41163    new_path=`$WHICH "$new_path" 2> /dev/null`
41164    # bat and cmd files are not always considered executable in MSYS causing which
41165    # to not find them
41166    if test "x$new_path" = x \
41167        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41168        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41169      new_path="$path"
41170
41171  windows_path="$new_path"
41172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41173    unix_path=`$CYGPATH -u "$windows_path"`
41174    new_path="$unix_path"
41175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41177    new_path="$unix_path"
41178  fi
41179
41180    fi
41181
41182    if test "x$new_path" = x; then
41183      # It's still not found. Now this is an unrecoverable error.
41184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41185$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41186      has_space=`$ECHO "$complete" | $GREP " "`
41187      if test "x$has_space" != x; then
41188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41190      fi
41191      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41192    fi
41193  fi
41194
41195  # Now new_path has a complete unix path to the binary
41196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41197    # Keep paths in /bin as-is, but remove trailing .exe if any
41198    new_path="${new_path/%.exe/}"
41199    # Do not save /bin paths to all_fixpath_prefixes!
41200  else
41201    # Not in mixed or Windows style, start by that.
41202    new_path=`cmd //c echo $new_path`
41203
41204  input_path="$new_path"
41205  # Check if we need to convert this using DOS-style short mode. If the path
41206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41207  # take no chances and rewrite it.
41208  # Note: m4 eats our [], so we need to use [ and ] instead.
41209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41210  if test "x$has_forbidden_chars" != x; then
41211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41213  fi
41214
41215    # Output is in $new_path
41216
41217  windows_path="$new_path"
41218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41219    unix_path=`$CYGPATH -u "$windows_path"`
41220    new_path="$unix_path"
41221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41223    new_path="$unix_path"
41224  fi
41225
41226    # remove trailing .exe if any
41227    new_path="${new_path/%.exe/}"
41228
41229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41231  fi
41232
41233    else
41234      # We're on a unix platform. Hooray! :)
41235      # First separate the path from the arguments. This will split at the first
41236      # space.
41237      complete="$BUILD_LD"
41238      path="${complete%% *}"
41239      tmp="$complete EOL"
41240      arguments="${tmp#* }"
41241
41242      # Cannot rely on the command "which" here since it doesn't always work.
41243      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41244      if test -z "$is_absolute_path"; then
41245        # Path to executable is not absolute. Find it.
41246        IFS_save="$IFS"
41247        IFS=:
41248        for p in $PATH; do
41249          if test -f "$p/$path" && test -x "$p/$path"; then
41250            new_path="$p/$path"
41251            break
41252          fi
41253        done
41254        IFS="$IFS_save"
41255      else
41256        # This is an absolute path, we can use it without further modifications.
41257        new_path="$path"
41258      fi
41259
41260      if test "x$new_path" = x; then
41261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41262$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41263        has_space=`$ECHO "$complete" | $GREP " "`
41264        if test "x$has_space" != x; then
41265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41267        fi
41268        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41269      fi
41270    fi
41271
41272    # Now join together the path and the arguments once again
41273    if test "x$arguments" != xEOL; then
41274      new_complete="$new_path ${arguments% *}"
41275    else
41276      new_complete="$new_path"
41277    fi
41278
41279    if test "x$complete" != "x$new_complete"; then
41280      BUILD_LD="$new_complete"
41281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41282$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41283    fi
41284  fi
41285
41286  else
41287    # If we are not cross compiling, use the normal target compilers for
41288    # building the build platform executables.
41289    BUILD_CC="$CC"
41290    BUILD_CXX="$CXX"
41291    BUILD_LD="$LD"
41292  fi
41293
41294
41295
41296
41297
41298
41299  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41300    # For hotspot, we need these in Windows mixed path,
41301    # so rewrite them all. Need added .exe suffix.
41302    HOTSPOT_CXX="$CXX.exe"
41303    HOTSPOT_LD="$LD.exe"
41304    HOTSPOT_MT="$MT.exe"
41305    HOTSPOT_RC="$RC.exe"
41306
41307  unix_path="$HOTSPOT_CXX"
41308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41309    windows_path=`$CYGPATH -m "$unix_path"`
41310    HOTSPOT_CXX="$windows_path"
41311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41312    windows_path=`cmd //c echo $unix_path`
41313    HOTSPOT_CXX="$windows_path"
41314  fi
41315
41316
41317  unix_path="$HOTSPOT_LD"
41318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41319    windows_path=`$CYGPATH -m "$unix_path"`
41320    HOTSPOT_LD="$windows_path"
41321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41322    windows_path=`cmd //c echo $unix_path`
41323    HOTSPOT_LD="$windows_path"
41324  fi
41325
41326
41327  unix_path="$HOTSPOT_MT"
41328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41329    windows_path=`$CYGPATH -m "$unix_path"`
41330    HOTSPOT_MT="$windows_path"
41331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41332    windows_path=`cmd //c echo $unix_path`
41333    HOTSPOT_MT="$windows_path"
41334  fi
41335
41336
41337  unix_path="$HOTSPOT_RC"
41338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41339    windows_path=`$CYGPATH -m "$unix_path"`
41340    HOTSPOT_RC="$windows_path"
41341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41342    windows_path=`cmd //c echo $unix_path`
41343    HOTSPOT_RC="$windows_path"
41344  fi
41345
41346
41347
41348  else
41349    HOTSPOT_CXX="$CXX"
41350    HOTSPOT_LD="$LD"
41351  fi
41352
41353
41354
41355  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41356    USE_CLANG=true
41357  fi
41358
41359
41360  # LDEXE is the linker to use, when creating executables. Not really used.
41361  # FIXME: These should just be removed!
41362  LDEXE="$LD"
41363  LDEXECXX="$LDCXX"
41364
41365
41366
41367
41368
41369
41370  # The package path is used only on macosx?
41371  # FIXME: clean this up, and/or move it elsewhere.
41372  PACKAGE_PATH=/opt/local
41373
41374
41375  # Check for extra potential brokenness.
41376  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41377    # On Windows, double-check that we got the right compiler.
41378    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41379    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41380    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41381      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41382        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
41383      fi
41384    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41385      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41386        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41387      fi
41388    fi
41389  fi
41390
41391  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41392    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41393    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41394    # This is later checked when setting flags.
41395
41396    # "-Og" suppported for GCC 4.8 and later
41397    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41398
41399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41400$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41401  supports=yes
41402
41403  saved_cflags="$CFLAGS"
41404  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41405  ac_ext=c
41406ac_cpp='$CPP $CPPFLAGS'
41407ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41408ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41409ac_compiler_gnu=$ac_cv_c_compiler_gnu
41410
41411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41412/* end confdefs.h.  */
41413int i;
41414_ACEOF
41415if ac_fn_c_try_compile "$LINENO"; then :
41416
41417else
41418  supports=no
41419fi
41420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41421  ac_ext=cpp
41422ac_cpp='$CXXCPP $CPPFLAGS'
41423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41426
41427  CFLAGS="$saved_cflags"
41428
41429  saved_cxxflags="$CXXFLAGS"
41430  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41431  ac_ext=cpp
41432ac_cpp='$CXXCPP $CPPFLAGS'
41433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41436
41437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41438/* end confdefs.h.  */
41439int i;
41440_ACEOF
41441if ac_fn_cxx_try_compile "$LINENO"; then :
41442
41443else
41444  supports=no
41445fi
41446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41447  ac_ext=cpp
41448ac_cpp='$CXXCPP $CPPFLAGS'
41449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41452
41453  CXXFLAGS="$saved_cxxflags"
41454
41455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41456$as_echo "$supports" >&6; }
41457  if test "x$supports" = "xyes" ; then
41458    HAS_CFLAG_OPTIMIZE_DEBUG=true
41459  else
41460    HAS_CFLAG_OPTIMIZE_DEBUG=false
41461  fi
41462
41463
41464    # "-z relro" supported in GNU binutils 2.17 and later
41465    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41466
41467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41468$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41469  supports=yes
41470
41471  saved_ldflags="$LDFLAGS"
41472  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41473  ac_ext=c
41474ac_cpp='$CPP $CPPFLAGS'
41475ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41476ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41477ac_compiler_gnu=$ac_cv_c_compiler_gnu
41478
41479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41480/* end confdefs.h.  */
41481
41482int
41483main ()
41484{
41485
41486  ;
41487  return 0;
41488}
41489_ACEOF
41490if ac_fn_c_try_link "$LINENO"; then :
41491
41492else
41493  supports=no
41494fi
41495rm -f core conftest.err conftest.$ac_objext \
41496    conftest$ac_exeext conftest.$ac_ext
41497  ac_ext=cpp
41498ac_cpp='$CXXCPP $CPPFLAGS'
41499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41502
41503  LDFLAGS="$saved_ldflags"
41504
41505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41506$as_echo "$supports" >&6; }
41507  if test "x$supports" = "xyes" ; then
41508    HAS_LINKER_RELRO=true
41509  else
41510    HAS_LINKER_RELRO=false
41511  fi
41512
41513
41514    # "-z now" supported in GNU binutils 2.11 and later
41515    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41516
41517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41518$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41519  supports=yes
41520
41521  saved_ldflags="$LDFLAGS"
41522  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41523  ac_ext=c
41524ac_cpp='$CPP $CPPFLAGS'
41525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41527ac_compiler_gnu=$ac_cv_c_compiler_gnu
41528
41529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41530/* end confdefs.h.  */
41531
41532int
41533main ()
41534{
41535
41536  ;
41537  return 0;
41538}
41539_ACEOF
41540if ac_fn_c_try_link "$LINENO"; then :
41541
41542else
41543  supports=no
41544fi
41545rm -f core conftest.err conftest.$ac_objext \
41546    conftest$ac_exeext conftest.$ac_ext
41547  ac_ext=cpp
41548ac_cpp='$CXXCPP $CPPFLAGS'
41549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41552
41553  LDFLAGS="$saved_ldflags"
41554
41555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41556$as_echo "$supports" >&6; }
41557  if test "x$supports" = "xyes" ; then
41558    HAS_LINKER_NOW=true
41559  else
41560    HAS_LINKER_NOW=false
41561  fi
41562
41563  fi
41564
41565  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41566  # in executable.'
41567  USING_BROKEN_SUSE_LD=no
41568  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41570$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41571    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41572    $ECHO "int main() { }" > main.c
41573    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41575$as_echo "no" >&6; }
41576      USING_BROKEN_SUSE_LD=no
41577    else
41578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41579$as_echo "yes" >&6; }
41580      USING_BROKEN_SUSE_LD=yes
41581    fi
41582    rm -rf version-script.map main.c a.out
41583  fi
41584
41585
41586
41587# Setup the JTReg Regression Test Harness.
41588
41589
41590# Check whether --with-jtreg was given.
41591if test "${with_jtreg+set}" = set; then :
41592  withval=$with_jtreg;
41593else
41594  with_jtreg=no
41595fi
41596
41597
41598  if test "x$with_jtreg" = xno; then
41599    # jtreg disabled
41600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41601$as_echo_n "checking for jtreg... " >&6; }
41602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41603$as_echo "no" >&6; }
41604  else
41605    if test "x$with_jtreg" != xyes; then
41606      # with path specified.
41607      JT_HOME="$with_jtreg"
41608    fi
41609
41610    if test "x$JT_HOME" != x; then
41611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41612$as_echo_n "checking for jtreg... " >&6; }
41613
41614      # use JT_HOME enviroment var.
41615
41616  # Only process if variable expands to non-empty
41617
41618  if test "x$JT_HOME" != x; then
41619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41620
41621  # Input might be given as Windows format, start by converting to
41622  # unix format.
41623  path="$JT_HOME"
41624  new_path=`$CYGPATH -u "$path"`
41625
41626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41629  # "foo.exe" is OK but "foo" is an error.
41630  #
41631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41632  # It is also a way to make sure we got the proper file name for the real test later on.
41633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41634  if test "x$test_shortpath" = x; then
41635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41636$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41637    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41638  fi
41639
41640  # Call helper function which possibly converts this using DOS-style short mode.
41641  # If so, the updated path is stored in $new_path.
41642
41643  input_path="$new_path"
41644  # Check if we need to convert this using DOS-style short mode. If the path
41645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41646  # take no chances and rewrite it.
41647  # Note: m4 eats our [], so we need to use [ and ] instead.
41648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41649  if test "x$has_forbidden_chars" != x; then
41650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41654      # Going to short mode and back again did indeed matter. Since short mode is
41655      # case insensitive, let's make it lowercase to improve readability.
41656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41657      # Now convert it back to Unix-stile (cygpath)
41658      input_path=`$CYGPATH -u "$shortmode_path"`
41659      new_path="$input_path"
41660    fi
41661  fi
41662
41663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41664  if test "x$test_cygdrive_prefix" = x; then
41665    # As a simple fix, exclude /usr/bin since it's not a real path.
41666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41668      # a path prefixed by /cygdrive for fixpath to work.
41669      new_path="$CYGWIN_ROOT_PATH$input_path"
41670    fi
41671  fi
41672
41673
41674  if test "x$path" != "x$new_path"; then
41675    JT_HOME="$new_path"
41676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41677$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41678  fi
41679
41680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41681
41682  path="$JT_HOME"
41683  has_colon=`$ECHO $path | $GREP ^.:`
41684  new_path="$path"
41685  if test "x$has_colon" = x; then
41686    # Not in mixed or Windows style, start by that.
41687    new_path=`cmd //c echo $path`
41688  fi
41689
41690
41691  input_path="$new_path"
41692  # Check if we need to convert this using DOS-style short mode. If the path
41693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41694  # take no chances and rewrite it.
41695  # Note: m4 eats our [], so we need to use [ and ] instead.
41696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41697  if test "x$has_forbidden_chars" != x; then
41698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41700  fi
41701
41702
41703  windows_path="$new_path"
41704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41705    unix_path=`$CYGPATH -u "$windows_path"`
41706    new_path="$unix_path"
41707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41709    new_path="$unix_path"
41710  fi
41711
41712  if test "x$path" != "x$new_path"; then
41713    JT_HOME="$new_path"
41714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41715$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41716  fi
41717
41718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41720
41721    else
41722      # We're on a unix platform. Hooray! :)
41723      path="$JT_HOME"
41724      has_space=`$ECHO "$path" | $GREP " "`
41725      if test "x$has_space" != x; then
41726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41727$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41729      fi
41730
41731      # Use eval to expand a potential ~
41732      eval path="$path"
41733      if test ! -f "$path" && test ! -d "$path"; then
41734        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41735      fi
41736
41737      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41738    fi
41739  fi
41740
41741
41742      # jtreg win32 script works for everybody
41743      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41744
41745      if test ! -f "$JTREGEXE"; then
41746        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41747      fi
41748
41749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41750$as_echo "$JTREGEXE" >&6; }
41751    else
41752      # try to find jtreg on path
41753
41754
41755
41756  # Publish this variable in the help.
41757
41758
41759  if test "x$JTREGEXE" = x; then
41760    # The variable is not set by user, try to locate tool using the code snippet
41761    for ac_prog in jtreg
41762do
41763  # Extract the first word of "$ac_prog", so it can be a program name with args.
41764set dummy $ac_prog; ac_word=$2
41765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41766$as_echo_n "checking for $ac_word... " >&6; }
41767if ${ac_cv_path_JTREGEXE+:} false; then :
41768  $as_echo_n "(cached) " >&6
41769else
41770  case $JTREGEXE in
41771  [\\/]* | ?:[\\/]*)
41772  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41773  ;;
41774  *)
41775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41776for as_dir in $PATH
41777do
41778  IFS=$as_save_IFS
41779  test -z "$as_dir" && as_dir=.
41780    for ac_exec_ext in '' $ac_executable_extensions; do
41781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41782    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41784    break 2
41785  fi
41786done
41787  done
41788IFS=$as_save_IFS
41789
41790  ;;
41791esac
41792fi
41793JTREGEXE=$ac_cv_path_JTREGEXE
41794if test -n "$JTREGEXE"; then
41795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41796$as_echo "$JTREGEXE" >&6; }
41797else
41798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41799$as_echo "no" >&6; }
41800fi
41801
41802
41803  test -n "$JTREGEXE" && break
41804done
41805
41806  else
41807    # The variable is set, but is it from the command line or the environment?
41808
41809    # Try to remove the string !JTREGEXE! from our list.
41810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41812      # If it failed, the variable was not from the command line. Ignore it,
41813      # but warn the user (except for BASH, which is always set by the calling BASH).
41814      if test "xJTREGEXE" != xBASH; then
41815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41816$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41817      fi
41818      # Try to locate tool using the code snippet
41819      for ac_prog in jtreg
41820do
41821  # Extract the first word of "$ac_prog", so it can be a program name with args.
41822set dummy $ac_prog; ac_word=$2
41823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41824$as_echo_n "checking for $ac_word... " >&6; }
41825if ${ac_cv_path_JTREGEXE+:} false; then :
41826  $as_echo_n "(cached) " >&6
41827else
41828  case $JTREGEXE in
41829  [\\/]* | ?:[\\/]*)
41830  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41831  ;;
41832  *)
41833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41834for as_dir in $PATH
41835do
41836  IFS=$as_save_IFS
41837  test -z "$as_dir" && as_dir=.
41838    for ac_exec_ext in '' $ac_executable_extensions; do
41839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41840    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41842    break 2
41843  fi
41844done
41845  done
41846IFS=$as_save_IFS
41847
41848  ;;
41849esac
41850fi
41851JTREGEXE=$ac_cv_path_JTREGEXE
41852if test -n "$JTREGEXE"; then
41853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41854$as_echo "$JTREGEXE" >&6; }
41855else
41856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41857$as_echo "no" >&6; }
41858fi
41859
41860
41861  test -n "$JTREGEXE" && break
41862done
41863
41864    else
41865      # If it succeeded, then it was overridden by the user. We will use it
41866      # for the tool.
41867
41868      # First remove it from the list of overridden variables, so we can test
41869      # for unknown variables in the end.
41870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41871
41872      # Check if the provided tool contains a complete path.
41873      tool_specified="$JTREGEXE"
41874      tool_basename="${tool_specified##*/}"
41875      if test "x$tool_basename" = "x$tool_specified"; then
41876        # A command without a complete path is provided, search $PATH.
41877        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41878$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41879        # Extract the first word of "$tool_basename", so it can be a program name with args.
41880set dummy $tool_basename; ac_word=$2
41881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41882$as_echo_n "checking for $ac_word... " >&6; }
41883if ${ac_cv_path_JTREGEXE+:} false; then :
41884  $as_echo_n "(cached) " >&6
41885else
41886  case $JTREGEXE in
41887  [\\/]* | ?:[\\/]*)
41888  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41889  ;;
41890  *)
41891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41892for as_dir in $PATH
41893do
41894  IFS=$as_save_IFS
41895  test -z "$as_dir" && as_dir=.
41896    for ac_exec_ext in '' $ac_executable_extensions; do
41897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41898    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41900    break 2
41901  fi
41902done
41903  done
41904IFS=$as_save_IFS
41905
41906  ;;
41907esac
41908fi
41909JTREGEXE=$ac_cv_path_JTREGEXE
41910if test -n "$JTREGEXE"; then
41911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41912$as_echo "$JTREGEXE" >&6; }
41913else
41914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41915$as_echo "no" >&6; }
41916fi
41917
41918
41919        if test "x$JTREGEXE" = x; then
41920          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41921        fi
41922      else
41923        # Otherwise we believe it is a complete path. Use it as it is.
41924        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41925$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41927$as_echo_n "checking for JTREGEXE... " >&6; }
41928        if test ! -x "$tool_specified"; then
41929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41930$as_echo "not found" >&6; }
41931          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41932        fi
41933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41934$as_echo "$tool_specified" >&6; }
41935      fi
41936    fi
41937  fi
41938
41939
41940
41941  if test "x$JTREGEXE" = x; then
41942    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41943  fi
41944
41945
41946      JT_HOME="`$DIRNAME $JTREGEXE`"
41947    fi
41948  fi
41949
41950
41951
41952
41953
41954
41955  # Option used to tell the compiler whether to create 32- or 64-bit executables
41956  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41957    COMPILER_TARGET_BITS_FLAG="-q"
41958  else
41959    COMPILER_TARGET_BITS_FLAG="-m"
41960  fi
41961
41962
41963  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41964  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41965    ARFLAGS="-r"
41966  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41967    ARFLAGS="-X64"
41968  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41969    # lib.exe is used as AR to create static libraries.
41970    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41971  else
41972    ARFLAGS=""
41973  fi
41974
41975
41976  ## Setup strip.
41977  # FIXME: should this really be per platform, or should it be per toolchain type?
41978  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41979  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41980  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41981    STRIPFLAGS="-g"
41982  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41983    STRIPFLAGS="-x"
41984  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41985    STRIPFLAGS="-S"
41986  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41987    STRIPFLAGS="-X32_64"
41988  fi
41989
41990  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41991    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41992  fi
41993
41994
41995  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41996    # FIXME: break out into MCSFLAGS
41997    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41998  fi
41999
42000
42001  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42002    CC_OUT_OPTION=-Fo
42003    EXE_OUT_OPTION=-out:
42004    LD_OUT_OPTION=-out:
42005    AR_OUT_OPTION=-out:
42006  else
42007    # The option used to specify the target .o,.a or .so file.
42008    # When compiling, how to specify the to be created object file.
42009    CC_OUT_OPTION='-o$(SPACE)'
42010    # When linking, how to specify the to be created executable.
42011    EXE_OUT_OPTION='-o$(SPACE)'
42012    # When linking, how to specify the to be created dynamically linkable library.
42013    LD_OUT_OPTION='-o$(SPACE)'
42014    # When archiving, how to specify the to be create static archive for object files.
42015    AR_OUT_OPTION='rcs$(SPACE)'
42016  fi
42017
42018
42019
42020
42021
42022  # On Windows, we need to set RC flags.
42023  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42024    RC_FLAGS="-nologo -l0x409"
42025    if test "x$VARIANT" = xOPT; then
42026      RC_FLAGS="$RC_FLAGS -DNDEBUG"
42027    fi
42028
42029    # The version variables used to create RC_FLAGS may be overridden
42030    # in a custom configure script, or possibly the command line.
42031    # Let those variables be expanded at make time in spec.gmk.
42032    # The \$ are escaped to the shell, and the $(...) variables
42033    # are evaluated by make.
42034    RC_FLAGS="$RC_FLAGS \
42035        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
42036        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
42037        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
42038        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
42039        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
42040        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
42041        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
42042  fi
42043
42044
42045  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42046    # silence copyright notice and other headers.
42047    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
42048  fi
42049
42050  if test "x$SYSROOT" != "x"; then
42051    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42052      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42053        # Solaris Studio does not have a concept of sysroot. Instead we must
42054        # make sure the default include and lib dirs are appended to each
42055        # compile and link command line.
42056        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
42057        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42058            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42059            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42060      fi
42061    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42062      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
42063      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
42064      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
42065    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42066      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
42067      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
42068    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42069      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
42070      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
42071    fi
42072    # Propagate the sysroot args to hotspot
42073    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
42074    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
42075    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
42076  fi
42077
42078  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42079  # set this here so it doesn't have to be peppered throughout the forest
42080  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42081    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
42082    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
42083  fi
42084
42085
42086
42087
42088
42089# FIXME: Currently we must test this after toolchain but before flags. Fix!
42090
42091# Now we can test some aspects on the target using configure macros.
42092
42093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42094$as_echo_n "checking for ANSI C header files... " >&6; }
42095if ${ac_cv_header_stdc+:} false; then :
42096  $as_echo_n "(cached) " >&6
42097else
42098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42099/* end confdefs.h.  */
42100#include <stdlib.h>
42101#include <stdarg.h>
42102#include <string.h>
42103#include <float.h>
42104
42105int
42106main ()
42107{
42108
42109  ;
42110  return 0;
42111}
42112_ACEOF
42113if ac_fn_cxx_try_compile "$LINENO"; then :
42114  ac_cv_header_stdc=yes
42115else
42116  ac_cv_header_stdc=no
42117fi
42118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42119
42120if test $ac_cv_header_stdc = yes; then
42121  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42123/* end confdefs.h.  */
42124#include <string.h>
42125
42126_ACEOF
42127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42128  $EGREP "memchr" >/dev/null 2>&1; then :
42129
42130else
42131  ac_cv_header_stdc=no
42132fi
42133rm -f conftest*
42134
42135fi
42136
42137if test $ac_cv_header_stdc = yes; then
42138  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42140/* end confdefs.h.  */
42141#include <stdlib.h>
42142
42143_ACEOF
42144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42145  $EGREP "free" >/dev/null 2>&1; then :
42146
42147else
42148  ac_cv_header_stdc=no
42149fi
42150rm -f conftest*
42151
42152fi
42153
42154if test $ac_cv_header_stdc = yes; then
42155  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42156  if test "$cross_compiling" = yes; then :
42157  :
42158else
42159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42160/* end confdefs.h.  */
42161#include <ctype.h>
42162#include <stdlib.h>
42163#if ((' ' & 0x0FF) == 0x020)
42164# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42165# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42166#else
42167# define ISLOWER(c) \
42168		   (('a' <= (c) && (c) <= 'i') \
42169		     || ('j' <= (c) && (c) <= 'r') \
42170		     || ('s' <= (c) && (c) <= 'z'))
42171# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42172#endif
42173
42174#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42175int
42176main ()
42177{
42178  int i;
42179  for (i = 0; i < 256; i++)
42180    if (XOR (islower (i), ISLOWER (i))
42181	|| toupper (i) != TOUPPER (i))
42182      return 2;
42183  return 0;
42184}
42185_ACEOF
42186if ac_fn_cxx_try_run "$LINENO"; then :
42187
42188else
42189  ac_cv_header_stdc=no
42190fi
42191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42192  conftest.$ac_objext conftest.beam conftest.$ac_ext
42193fi
42194
42195fi
42196fi
42197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42198$as_echo "$ac_cv_header_stdc" >&6; }
42199if test $ac_cv_header_stdc = yes; then
42200
42201$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42202
42203fi
42204
42205# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42206for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42207		  inttypes.h stdint.h unistd.h
42208do :
42209  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42210ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42211"
42212if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42213  cat >>confdefs.h <<_ACEOF
42214#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42215_ACEOF
42216
42217fi
42218
42219done
42220
42221
42222
42223  ###############################################################################
42224  #
42225  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42226  # (The JVM can use 32 or 64 bit Java pointers but that decision
42227  # is made at runtime.)
42228  #
42229
42230  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42231    # Always specify -m flag on Solaris
42232    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42233
42234  # When we add flags to the "official" CFLAGS etc, we need to
42235  # keep track of these additions in ADDED_CFLAGS etc. These
42236  # will later be checked to make sure only controlled additions
42237  # have been made to CFLAGS etc.
42238  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42239  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42240  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42241
42242  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42243  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42244  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42245
42246  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42247  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42248  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42249
42250  elif test "x$COMPILE_TYPE" = xreduced; then
42251    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42252      # Specify -m if running reduced on unix platforms
42253
42254  # When we add flags to the "official" CFLAGS etc, we need to
42255  # keep track of these additions in ADDED_CFLAGS etc. These
42256  # will later be checked to make sure only controlled additions
42257  # have been made to CFLAGS etc.
42258  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42259  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42260  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42261
42262  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42263  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42264  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42265
42266  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42267  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42268  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42269
42270    fi
42271  fi
42272
42273  # Make compilation sanity check
42274  for ac_header in stdio.h
42275do :
42276  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42277if test "x$ac_cv_header_stdio_h" = xyes; then :
42278  cat >>confdefs.h <<_ACEOF
42279#define HAVE_STDIO_H 1
42280_ACEOF
42281
42282else
42283
42284    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42285$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42286    if test "x$COMPILE_TYPE" = xreduced; then
42287      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
42288$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
42289    elif test "x$COMPILE_TYPE" = xcross; then
42290      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42291$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42292    fi
42293    as_fn_error $? "Cannot continue." "$LINENO" 5
42294
42295fi
42296
42297done
42298
42299
42300  # The cast to long int works around a bug in the HP C Compiler
42301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42303# This bug is HP SR number 8606223364.
42304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42305$as_echo_n "checking size of int *... " >&6; }
42306if ${ac_cv_sizeof_int_p+:} false; then :
42307  $as_echo_n "(cached) " >&6
42308else
42309  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42310
42311else
42312  if test "$ac_cv_type_int_p" = yes; then
42313     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42315as_fn_error 77 "cannot compute sizeof (int *)
42316See \`config.log' for more details" "$LINENO" 5; }
42317   else
42318     ac_cv_sizeof_int_p=0
42319   fi
42320fi
42321
42322fi
42323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42324$as_echo "$ac_cv_sizeof_int_p" >&6; }
42325
42326
42327
42328cat >>confdefs.h <<_ACEOF
42329#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42330_ACEOF
42331
42332
42333
42334  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42335  if test "x$ac_cv_sizeof_int_p" = x; then
42336    # The test failed, lets stick to the assumed value.
42337    { $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
42338$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42339  else
42340    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42341
42342    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42343      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42344      # Let's try to implicitely set the compilers target architecture and retry the test
42345      { $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
42346$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;}
42347      { $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
42348$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;}
42349
42350  # When we add flags to the "official" CFLAGS etc, we need to
42351  # keep track of these additions in ADDED_CFLAGS etc. These
42352  # will later be checked to make sure only controlled additions
42353  # have been made to CFLAGS etc.
42354  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42355  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42356  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42357
42358  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42359  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42360  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42361
42362  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42363  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42364  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42365
42366
42367      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42368      unset ac_cv_sizeof_int_p
42369      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42370      cat >>confdefs.h <<_ACEOF
42371#undef SIZEOF_INT_P
42372_ACEOF
42373
42374      # The cast to long int works around a bug in the HP C Compiler
42375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42377# This bug is HP SR number 8606223364.
42378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42379$as_echo_n "checking size of int *... " >&6; }
42380if ${ac_cv_sizeof_int_p+:} false; then :
42381  $as_echo_n "(cached) " >&6
42382else
42383  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42384
42385else
42386  if test "$ac_cv_type_int_p" = yes; then
42387     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42389as_fn_error 77 "cannot compute sizeof (int *)
42390See \`config.log' for more details" "$LINENO" 5; }
42391   else
42392     ac_cv_sizeof_int_p=0
42393   fi
42394fi
42395
42396fi
42397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42398$as_echo "$ac_cv_sizeof_int_p" >&6; }
42399
42400
42401
42402cat >>confdefs.h <<_ACEOF
42403#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42404_ACEOF
42405
42406
42407
42408      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42409
42410      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42411        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
42412      fi
42413    fi
42414  fi
42415
42416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42417$as_echo_n "checking for target address size... " >&6; }
42418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42419$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42420
42421
42422  ###############################################################################
42423  #
42424  # Is the target little of big endian?
42425  #
42426   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42427$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42428if ${ac_cv_c_bigendian+:} false; then :
42429  $as_echo_n "(cached) " >&6
42430else
42431  ac_cv_c_bigendian=unknown
42432    # See if we're dealing with a universal compiler.
42433    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42434/* end confdefs.h.  */
42435#ifndef __APPLE_CC__
42436	       not a universal capable compiler
42437	     #endif
42438	     typedef int dummy;
42439
42440_ACEOF
42441if ac_fn_cxx_try_compile "$LINENO"; then :
42442
42443	# Check for potential -arch flags.  It is not universal unless
42444	# there are at least two -arch flags with different values.
42445	ac_arch=
42446	ac_prev=
42447	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42448	 if test -n "$ac_prev"; then
42449	   case $ac_word in
42450	     i?86 | x86_64 | ppc | ppc64)
42451	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42452		 ac_arch=$ac_word
42453	       else
42454		 ac_cv_c_bigendian=universal
42455		 break
42456	       fi
42457	       ;;
42458	   esac
42459	   ac_prev=
42460	 elif test "x$ac_word" = "x-arch"; then
42461	   ac_prev=arch
42462	 fi
42463       done
42464fi
42465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42466    if test $ac_cv_c_bigendian = unknown; then
42467      # See if sys/param.h defines the BYTE_ORDER macro.
42468      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42469/* end confdefs.h.  */
42470#include <sys/types.h>
42471	     #include <sys/param.h>
42472
42473int
42474main ()
42475{
42476#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42477		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42478		     && LITTLE_ENDIAN)
42479	      bogus endian macros
42480	     #endif
42481
42482  ;
42483  return 0;
42484}
42485_ACEOF
42486if ac_fn_cxx_try_compile "$LINENO"; then :
42487  # It does; now see whether it defined to BIG_ENDIAN or not.
42488	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42489/* end confdefs.h.  */
42490#include <sys/types.h>
42491		#include <sys/param.h>
42492
42493int
42494main ()
42495{
42496#if BYTE_ORDER != BIG_ENDIAN
42497		 not big endian
42498		#endif
42499
42500  ;
42501  return 0;
42502}
42503_ACEOF
42504if ac_fn_cxx_try_compile "$LINENO"; then :
42505  ac_cv_c_bigendian=yes
42506else
42507  ac_cv_c_bigendian=no
42508fi
42509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42510fi
42511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42512    fi
42513    if test $ac_cv_c_bigendian = unknown; then
42514      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42515      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42516/* end confdefs.h.  */
42517#include <limits.h>
42518
42519int
42520main ()
42521{
42522#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42523	      bogus endian macros
42524	     #endif
42525
42526  ;
42527  return 0;
42528}
42529_ACEOF
42530if ac_fn_cxx_try_compile "$LINENO"; then :
42531  # It does; now see whether it defined to _BIG_ENDIAN or not.
42532	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42533/* end confdefs.h.  */
42534#include <limits.h>
42535
42536int
42537main ()
42538{
42539#ifndef _BIG_ENDIAN
42540		 not big endian
42541		#endif
42542
42543  ;
42544  return 0;
42545}
42546_ACEOF
42547if ac_fn_cxx_try_compile "$LINENO"; then :
42548  ac_cv_c_bigendian=yes
42549else
42550  ac_cv_c_bigendian=no
42551fi
42552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42553fi
42554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42555    fi
42556    if test $ac_cv_c_bigendian = unknown; then
42557      # Compile a test program.
42558      if test "$cross_compiling" = yes; then :
42559  # Try to guess by grepping values from an object file.
42560	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42561/* end confdefs.h.  */
42562short int ascii_mm[] =
42563		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42564		short int ascii_ii[] =
42565		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42566		int use_ascii (int i) {
42567		  return ascii_mm[i] + ascii_ii[i];
42568		}
42569		short int ebcdic_ii[] =
42570		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42571		short int ebcdic_mm[] =
42572		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42573		int use_ebcdic (int i) {
42574		  return ebcdic_mm[i] + ebcdic_ii[i];
42575		}
42576		extern int foo;
42577
42578int
42579main ()
42580{
42581return use_ascii (foo) == use_ebcdic (foo);
42582  ;
42583  return 0;
42584}
42585_ACEOF
42586if ac_fn_cxx_try_compile "$LINENO"; then :
42587  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42588	      ac_cv_c_bigendian=yes
42589	    fi
42590	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42591	      if test "$ac_cv_c_bigendian" = unknown; then
42592		ac_cv_c_bigendian=no
42593	      else
42594		# finding both strings is unlikely to happen, but who knows?
42595		ac_cv_c_bigendian=unknown
42596	      fi
42597	    fi
42598fi
42599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42600else
42601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42602/* end confdefs.h.  */
42603$ac_includes_default
42604int
42605main ()
42606{
42607
42608	     /* Are we little or big endian?  From Harbison&Steele.  */
42609	     union
42610	     {
42611	       long int l;
42612	       char c[sizeof (long int)];
42613	     } u;
42614	     u.l = 1;
42615	     return u.c[sizeof (long int) - 1] == 1;
42616
42617  ;
42618  return 0;
42619}
42620_ACEOF
42621if ac_fn_cxx_try_run "$LINENO"; then :
42622  ac_cv_c_bigendian=no
42623else
42624  ac_cv_c_bigendian=yes
42625fi
42626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42627  conftest.$ac_objext conftest.beam conftest.$ac_ext
42628fi
42629
42630    fi
42631fi
42632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42633$as_echo "$ac_cv_c_bigendian" >&6; }
42634 case $ac_cv_c_bigendian in #(
42635   yes)
42636     ENDIAN="big";; #(
42637   no)
42638     ENDIAN="little" ;; #(
42639   universal)
42640     ENDIAN="universal_endianness"
42641     ;; #(
42642   *)
42643     ENDIAN="unknown" ;;
42644 esac
42645
42646
42647  if test "x$ENDIAN" = xuniversal_endianness; then
42648    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42649  fi
42650  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42651    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
42652  fi
42653
42654
42655# Configure flags for the tools
42656
42657  ###############################################################################
42658  #
42659  # How to compile shared libraries.
42660  #
42661
42662  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42663    PICFLAG="-fPIC"
42664    C_FLAG_REORDER=''
42665    CXX_FLAG_REORDER=''
42666
42667    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42668      # Linking is different on MacOSX
42669      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42670      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42671      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42672      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42673      SET_SHARED_LIBRARY_MAPFILE=''
42674    else
42675      # Default works for linux, might work on other platforms as well.
42676      SHARED_LIBRARY_FLAGS='-shared'
42677      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42678      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42679      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42680      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42681    fi
42682  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42683    PICFLAG=''
42684    C_FLAG_REORDER=''
42685    CXX_FLAG_REORDER=''
42686
42687    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42688      # Linking is different on MacOSX
42689      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42690      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42691      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42692      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42693      SET_SHARED_LIBRARY_MAPFILE=''
42694    else
42695      # Default works for linux, might work on other platforms as well.
42696      SHARED_LIBRARY_FLAGS='-shared'
42697      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42698      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42699      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42700      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42701    fi
42702  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42703    PICFLAG="-KPIC"
42704    C_FLAG_REORDER='-xF'
42705    CXX_FLAG_REORDER='-xF'
42706    SHARED_LIBRARY_FLAGS="-G"
42707    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42708    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42709    SET_SHARED_LIBRARY_NAME=''
42710    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42711  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42712    PICFLAG="-qpic=large"
42713    C_FLAG_REORDER=''
42714    CXX_FLAG_REORDER=''
42715    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42716    SET_EXECUTABLE_ORIGIN=""
42717    SET_SHARED_LIBRARY_ORIGIN=''
42718    SET_SHARED_LIBRARY_NAME=''
42719    SET_SHARED_LIBRARY_MAPFILE=''
42720  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42721    PICFLAG=""
42722    C_FLAG_REORDER=''
42723    CXX_FLAG_REORDER=''
42724    SHARED_LIBRARY_FLAGS="-LD"
42725    SET_EXECUTABLE_ORIGIN=''
42726    SET_SHARED_LIBRARY_ORIGIN=''
42727    SET_SHARED_LIBRARY_NAME=''
42728    SET_SHARED_LIBRARY_MAPFILE=''
42729  fi
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42740    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42741    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42742    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42743  fi
42744  # The (cross) compiler is now configured, we can now test capabilities
42745  # of the target platform.
42746
42747
42748
42749  ###############################################################################
42750  #
42751  # Setup the opt flags for different compilers
42752  # and different operating systems.
42753  #
42754
42755  # FIXME: this was indirectly the old default, but just inherited.
42756  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42757  #   C_FLAG_DEPS="-MMD -MF"
42758  # fi
42759
42760  # Generate make dependency files
42761  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42762    C_FLAG_DEPS="-MMD -MF"
42763  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42764    C_FLAG_DEPS="-MMD -MF"
42765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42766    C_FLAG_DEPS="-xMMD -xMF"
42767  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42768    C_FLAG_DEPS="-qmakedep=gcc -MF"
42769  fi
42770  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42771
42772
42773
42774  # Debug symbols
42775  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42776    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42777      # reduce from default "-g2" option to save space
42778      CFLAGS_DEBUG_SYMBOLS="-g1"
42779      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42780    else
42781      CFLAGS_DEBUG_SYMBOLS="-g"
42782      CXXFLAGS_DEBUG_SYMBOLS="-g"
42783    fi
42784  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42785    CFLAGS_DEBUG_SYMBOLS="-g"
42786    CXXFLAGS_DEBUG_SYMBOLS="-g"
42787  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42788    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42789    # FIXME: likely a bug, this disables debug symbols rather than enables them
42790    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42791  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42792    CFLAGS_DEBUG_SYMBOLS="-g"
42793    CXXFLAGS_DEBUG_SYMBOLS="-g"
42794  fi
42795
42796
42797
42798  # bounds, memory and behavior checking options
42799  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42800    case $DEBUG_LEVEL in
42801    release )
42802      # no adjustment
42803      ;;
42804    fastdebug )
42805      # no adjustment
42806      ;;
42807    slowdebug )
42808      # Add runtime stack smashing and undefined behavior checks
42809      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42810      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42811      ;;
42812    esac
42813  fi
42814
42815
42816
42817  # Optimization levels
42818  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42819    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42820
42821    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42822      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42823      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42824      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42825      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42826      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42827      C_O_FLAG_NONE="-xregs=no%frameptr"
42828      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42829      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42830      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42831      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42832      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42833      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42834        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42835        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42836      fi
42837    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42838      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42839      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42840      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42841      C_O_FLAG_DEBUG=""
42842      C_O_FLAG_NONE=""
42843      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42844      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42845      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42846      C_O_FLAG_DEBUG=""
42847      CXX_O_FLAG_NONE=""
42848    fi
42849  else
42850    # The remaining toolchains share opt flags between CC and CXX;
42851    # setup for C and duplicate afterwards.
42852    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42853      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42854        # On MacOSX we optimize for size, something
42855        # we should do for all platforms?
42856        C_O_FLAG_HIGHEST="-Os"
42857        C_O_FLAG_HI="-Os"
42858        C_O_FLAG_NORM="-Os"
42859      else
42860        C_O_FLAG_HIGHEST="-O3"
42861        C_O_FLAG_HI="-O3"
42862        C_O_FLAG_NORM="-O2"
42863      fi
42864      C_O_FLAG_DEBUG="-O0"
42865      C_O_FLAG_NONE="-O0"
42866    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42867      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42868        # On MacOSX we optimize for size, something
42869        # we should do for all platforms?
42870        C_O_FLAG_HIGHEST="-Os"
42871        C_O_FLAG_HI="-Os"
42872        C_O_FLAG_NORM="-Os"
42873      else
42874        C_O_FLAG_HIGHEST="-O3"
42875        C_O_FLAG_HI="-O3"
42876        C_O_FLAG_NORM="-O2"
42877      fi
42878      C_O_FLAG_DEBUG="-O0"
42879      C_O_FLAG_NONE="-O0"
42880    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42881      C_O_FLAG_HIGHEST="-O3"
42882      C_O_FLAG_HI="-O3 -qstrict"
42883      C_O_FLAG_NORM="-O2"
42884      C_O_FLAG_DEBUG="-qnoopt"
42885      C_O_FLAG_NONE="-qnoop"
42886    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42887      C_O_FLAG_HIGHEST="-O2"
42888      C_O_FLAG_HI="-O1"
42889      C_O_FLAG_NORM="-O1"
42890      C_O_FLAG_DEBUG="-Od"
42891      C_O_FLAG_NONE="-Od"
42892    fi
42893    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42894    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42895    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42896    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42897    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42898  fi
42899
42900  # Adjust optimization flags according to debug level.
42901  case $DEBUG_LEVEL in
42902    release )
42903      # no adjustment
42904      ;;
42905    fastdebug )
42906      # Not quite so much optimization
42907      C_O_FLAG_HI="$C_O_FLAG_NORM"
42908      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42909      ;;
42910    slowdebug )
42911      # Disable optimization
42912      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42913      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42914      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42915      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42916      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42917      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42918      ;;
42919  esac
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933  # Special extras...
42934  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42935    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42936      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42937      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42938    fi
42939  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42940    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42941    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42942    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42943  fi
42944
42945  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42946    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42947$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42948  fi
42949
42950  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42951    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42952$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42953  fi
42954
42955  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42956    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42957$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42958  fi
42959
42960
42961# Check whether --with-extra-cflags was given.
42962if test "${with_extra_cflags+set}" = set; then :
42963  withval=$with_extra_cflags;
42964fi
42965
42966
42967
42968# Check whether --with-extra-cxxflags was given.
42969if test "${with_extra_cxxflags+set}" = set; then :
42970  withval=$with_extra_cxxflags;
42971fi
42972
42973
42974
42975# Check whether --with-extra-ldflags was given.
42976if test "${with_extra_ldflags+set}" = set; then :
42977  withval=$with_extra_ldflags;
42978fi
42979
42980
42981  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42982  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42983  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42984
42985  # Hotspot needs these set in their legacy form
42986  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42987  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42988  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42989
42990
42991
42992
42993
42994  ###############################################################################
42995  #
42996  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42997  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42998  #
42999
43000  # Setup compiler/platform specific flags into
43001  #    CFLAGS_JDK    - C Compiler flags
43002  #    CXXFLAGS_JDK  - C++ Compiler flags
43003  #    COMMON_CCXXFLAGS_JDK - common to C and C++
43004  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43005    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
43006        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
43007    case $OPENJDK_TARGET_CPU_ARCH in
43008      arm )
43009        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43010        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43011        ;;
43012      ppc )
43013        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43014        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43015        ;;
43016      * )
43017        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
43018        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43019        ;;
43020    esac
43021  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43022    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
43023    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
43024      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
43025      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
43026    fi
43027
43028    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
43029    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
43030  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43031    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43032    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43033  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43034    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
43035        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
43036        -DWIN32_LEAN_AND_MEAN \
43037        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
43038        -DWIN32 -DIAL"
43039    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43040      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
43041    else
43042      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
43043    fi
43044    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
43045    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
43046    # studio.
43047    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
43048      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43049          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43050    fi
43051  fi
43052
43053  ###############################################################################
43054
43055  # Adjust flags according to debug level.
43056  case $DEBUG_LEVEL in
43057    fastdebug | slowdebug )
43058      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43059      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43060      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43061      ;;
43062    release )
43063      ;;
43064    * )
43065      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43066      ;;
43067  esac
43068
43069  # Setup LP64
43070  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43071
43072  # Set some common defines. These works for all compilers, but assume
43073  # -D is universally accepted.
43074
43075  # Setup endianness
43076  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43077    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43078    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43079    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43080    #   Note: -Dmacro         is the same as    #define macro 1
43081    #         -Dmacro=        is the same as    #define macro
43082    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43083      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43084    else
43085      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43086    fi
43087  else
43088    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43089    # are defined in the system?
43090    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43091      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43092    else
43093      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43094    fi
43095  fi
43096
43097  # Setup target OS define. Use OS target name but in upper case.
43098  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43099  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43100
43101  # Setup target CPU
43102  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43103
43104  # Setup debug/release defines
43105  if test "x$DEBUG_LEVEL" = xrelease; then
43106    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43107    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43108      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43109    fi
43110  else
43111    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43112  fi
43113
43114  # Setup release name
43115  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43116
43117
43118  # Set some additional per-OS defines.
43119  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43120    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43121  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43122    # FIXME: PPC64 should not be here.
43123    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43124  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43125    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43126  fi
43127
43128  # Additional macosx handling
43129  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43130    # Setting these parameters makes it an error to link to macosx APIs that are
43131    # newer than the given OS version and makes the linked binaries compatible
43132    # even if built on a newer version of the OS.
43133    # The expected format is X.Y.Z
43134    MACOSX_VERSION_MIN=10.7.0
43135
43136
43137    # The macro takes the version with no dots, ex: 1070
43138    # Let the flags variables get resolved in make for easier override on make
43139    # command line.
43140    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43141    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43142  fi
43143
43144  # Setup some hard coded includes
43145  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43146      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43147      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43148      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43149
43150  # The shared libraries are compiled using the picflag.
43151  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43152  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
43153
43154  # Executable flags
43155  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43156  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43157
43158
43159
43160
43161
43162
43163  # Setup LDFLAGS et al.
43164  #
43165
43166  # Now this is odd. The JDK native libraries have to link against libjvm.so
43167  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43168  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43169  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43170  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43171  # libraries will link to whatever is in memory. Yuck.
43172  #
43173  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43174  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43175    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43176    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43177      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43178    fi
43179    # TODO: make -debug optional "--disable-full-debug-symbols"
43180    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43181  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43182    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43183    # We have previously set HAS_GNU_HASH if this is the case
43184    if test -n "$HAS_GNU_HASH"; then
43185      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43186    fi
43187    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43188      # And since we now know that the linker is gnu, then add -z defs, to forbid
43189      # undefined symbols in object files.
43190      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43191      case $DEBUG_LEVEL in
43192        release )
43193          # tell linker to optimize libraries.
43194          # Should this be supplied to the OSS linker as well?
43195          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43196          ;;
43197        slowdebug )
43198          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43199            # do relocations at load
43200            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43201            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43202          fi
43203          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43204            # mark relocations read only
43205            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43206            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43207          fi
43208          ;;
43209        fastdebug )
43210          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43211            # mark relocations read only
43212            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43213            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43214          fi
43215          ;;
43216        * )
43217          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43218          ;;
43219        esac
43220    fi
43221  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43222    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43223    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43224  fi
43225
43226  # Customize LDFLAGS for executables
43227
43228  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43229
43230  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43231    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43232      LDFLAGS_STACK_SIZE=1048576
43233    else
43234      LDFLAGS_STACK_SIZE=327680
43235    fi
43236    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43237  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43238    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43239  fi
43240
43241  # Customize LDFLAGS for libs
43242  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43243
43244  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43245    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43246    LDFLAGS_JDKLIB_SUFFIX=""
43247  else
43248    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43249        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43250
43251    # On some platforms (mac) the linker warns about non existing -L dirs.
43252    # Add server first if available. Linking aginst client does not always produce the same results.
43253    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43254    # Default to server for other variants.
43255    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43256      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43257    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43258      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43259    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43260      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43261    else
43262      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43263    fi
43264
43265    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43266    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43267      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43268    fi
43269  fi
43270
43271
43272
43273
43274
43275
43276
43277
43278  # Some Zero and Shark settings.
43279  # ZERO_ARCHFLAG tells the compiler which mode to build for
43280  case "${OPENJDK_TARGET_CPU}" in
43281    s390)
43282      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43283      ;;
43284    *)
43285      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43286  esac
43287
43288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43289$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43290  supports=yes
43291
43292  saved_cflags="$CFLAGS"
43293  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43294  ac_ext=c
43295ac_cpp='$CPP $CPPFLAGS'
43296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43298ac_compiler_gnu=$ac_cv_c_compiler_gnu
43299
43300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43301/* end confdefs.h.  */
43302int i;
43303_ACEOF
43304if ac_fn_c_try_compile "$LINENO"; then :
43305
43306else
43307  supports=no
43308fi
43309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43310  ac_ext=cpp
43311ac_cpp='$CXXCPP $CPPFLAGS'
43312ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43313ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43314ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43315
43316  CFLAGS="$saved_cflags"
43317
43318  saved_cxxflags="$CXXFLAGS"
43319  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43320  ac_ext=cpp
43321ac_cpp='$CXXCPP $CPPFLAGS'
43322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43325
43326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43327/* end confdefs.h.  */
43328int i;
43329_ACEOF
43330if ac_fn_cxx_try_compile "$LINENO"; then :
43331
43332else
43333  supports=no
43334fi
43335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43336  ac_ext=cpp
43337ac_cpp='$CXXCPP $CPPFLAGS'
43338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43341
43342  CXXFLAGS="$saved_cxxflags"
43343
43344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43345$as_echo "$supports" >&6; }
43346  if test "x$supports" = "xyes" ; then
43347    :
43348  else
43349    ZERO_ARCHFLAG=""
43350  fi
43351
43352
43353
43354  # Check that the compiler supports -mX (or -qX on AIX) flags
43355  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43356
43357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43358$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43359  supports=yes
43360
43361  saved_cflags="$CFLAGS"
43362  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43363  ac_ext=c
43364ac_cpp='$CPP $CPPFLAGS'
43365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43367ac_compiler_gnu=$ac_cv_c_compiler_gnu
43368
43369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43370/* end confdefs.h.  */
43371int i;
43372_ACEOF
43373if ac_fn_c_try_compile "$LINENO"; then :
43374
43375else
43376  supports=no
43377fi
43378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43379  ac_ext=cpp
43380ac_cpp='$CXXCPP $CPPFLAGS'
43381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43384
43385  CFLAGS="$saved_cflags"
43386
43387  saved_cxxflags="$CXXFLAGS"
43388  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43389  ac_ext=cpp
43390ac_cpp='$CXXCPP $CPPFLAGS'
43391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43394
43395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43396/* end confdefs.h.  */
43397int i;
43398_ACEOF
43399if ac_fn_cxx_try_compile "$LINENO"; then :
43400
43401else
43402  supports=no
43403fi
43404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43405  ac_ext=cpp
43406ac_cpp='$CXXCPP $CPPFLAGS'
43407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43410
43411  CXXFLAGS="$saved_cxxflags"
43412
43413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43414$as_echo "$supports" >&6; }
43415  if test "x$supports" = "xyes" ; then
43416    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43417  else
43418    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43419  fi
43420
43421
43422
43423  case "${TOOLCHAIN_TYPE}" in
43424    microsoft)
43425      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43426      ;;
43427    solstudio)
43428      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43429      ;;
43430    gcc)
43431      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43432      ;;
43433    clang)
43434      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43435      ;;
43436  esac
43437
43438
43439
43440# Setup debug symbols (need objcopy from the toolchain for that)
43441
43442  #
43443  # ENABLE_DEBUG_SYMBOLS
43444  # This must be done after the toolchain is setup, since we're looking at objcopy.
43445  #
43446  # Check whether --enable-debug-symbols was given.
43447if test "${enable_debug_symbols+set}" = set; then :
43448  enableval=$enable_debug_symbols;
43449fi
43450
43451
43452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43453$as_echo_n "checking if we should generate debug symbols... " >&6; }
43454
43455  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43456    # explicit enabling of enable-debug-symbols and can't find objcopy
43457    #   this is an error
43458    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43459  fi
43460
43461  if test "x$enable_debug_symbols" = "xyes"; then
43462    ENABLE_DEBUG_SYMBOLS=true
43463  elif test "x$enable_debug_symbols" = "xno"; then
43464    ENABLE_DEBUG_SYMBOLS=false
43465  else
43466    # Default is on if objcopy is found
43467    if test "x$OBJCOPY" != x; then
43468      ENABLE_DEBUG_SYMBOLS=true
43469    # MacOS X and Windows don't use objcopy but default is on for those OSes
43470    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43471      ENABLE_DEBUG_SYMBOLS=true
43472    else
43473      ENABLE_DEBUG_SYMBOLS=false
43474    fi
43475  fi
43476
43477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43478$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43479
43480  #
43481  # ZIP_DEBUGINFO_FILES
43482  #
43483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43484$as_echo_n "checking if we should zip debug-info files... " >&6; }
43485  # Check whether --enable-zip-debug-info was given.
43486if test "${enable_zip_debug_info+set}" = set; then :
43487  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43488else
43489  enable_zip_debug_info="yes"
43490fi
43491
43492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43493$as_echo "${enable_zip_debug_info}" >&6; }
43494
43495  if test "x${enable_zip_debug_info}" = "xno"; then
43496    ZIP_DEBUGINFO_FILES=false
43497  else
43498    ZIP_DEBUGINFO_FILES=true
43499  fi
43500
43501
43502
43503
43504
43505###############################################################################
43506#
43507# Check dependencies for external and internal libraries.
43508#
43509###############################################################################
43510
43511# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43512
43513  # When using cygwin or msys, we need a wrapper binary that renames
43514  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43515  # @files and rewrites these too! This wrapper binary is
43516  # called fixpath.
43517  FIXPATH=
43518  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43520$as_echo_n "checking if fixpath can be created... " >&6; }
43521    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43522    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43523    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43524      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43525      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43526      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43527      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43528    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43529      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43530      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43531
43532      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43533      # @ was chosen as separator to minimize risk of other tools messing around with it
43534      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43535      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43536
43537      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43538    fi
43539    rm -f $OUTPUT_ROOT/fixpath*
43540    cd $OUTPUT_ROOT
43541    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43542    cd $CURDIR
43543
43544    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43546$as_echo "no" >&6; }
43547      cat $OUTPUT_ROOT/fixpath1.log
43548      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43549    fi
43550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43551$as_echo "yes" >&6; }
43552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43553$as_echo_n "checking if fixpath.exe works... " >&6; }
43554    cd $OUTPUT_ROOT
43555    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43556    cd $CURDIR
43557    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43559$as_echo "no" >&6; }
43560      cat $OUTPUT_ROOT/fixpath2.log
43561      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43562    fi
43563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43564$as_echo "yes" >&6; }
43565    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43566  fi
43567
43568
43569
43570
43571
43572
43573  ###############################################################################
43574  #
43575  # OS specific settings that we never will need to probe.
43576  #
43577  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43579$as_echo_n "checking what is not needed on Linux?... " >&6; }
43580    PULSE_NOT_NEEDED=yes
43581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43582$as_echo "pulse" >&6; }
43583  fi
43584
43585  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43587$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43588    ALSA_NOT_NEEDED=yes
43589    PULSE_NOT_NEEDED=yes
43590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43591$as_echo "alsa pulse" >&6; }
43592  fi
43593
43594  if test "x$OPENJDK_TARGET_OS" = xaix; then
43595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43596$as_echo_n "checking what is not needed on AIX?... " >&6; }
43597    ALSA_NOT_NEEDED=yes
43598    PULSE_NOT_NEEDED=yes
43599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43600$as_echo "alsa pulse" >&6; }
43601  fi
43602
43603
43604  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43606$as_echo_n "checking what is not needed on Windows?... " >&6; }
43607    CUPS_NOT_NEEDED=yes
43608    ALSA_NOT_NEEDED=yes
43609    PULSE_NOT_NEEDED=yes
43610    X11_NOT_NEEDED=yes
43611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43612$as_echo "alsa cups pulse x11" >&6; }
43613  fi
43614
43615  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43617$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43618    ALSA_NOT_NEEDED=yes
43619    PULSE_NOT_NEEDED=yes
43620    X11_NOT_NEEDED=yes
43621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43622$as_echo "alsa pulse x11" >&6; }
43623  fi
43624
43625  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43627$as_echo_n "checking what is not needed on bsd?... " >&6; }
43628    ALSA_NOT_NEEDED=yes
43629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43630$as_echo "alsa" >&6; }
43631  fi
43632
43633  if test "x$OPENJDK" = "xfalse"; then
43634    FREETYPE_NOT_NEEDED=yes
43635  fi
43636
43637  if test "x$SUPPORT_HEADFUL" = xno; then
43638    X11_NOT_NEEDED=yes
43639  fi
43640
43641
43642
43643  ###############################################################################
43644  #
43645  # Check for X Windows
43646  #
43647
43648  if test "x$X11_NOT_NEEDED" = xyes; then
43649    if test "x${with_x}" != x; then
43650      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43651$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43652    fi
43653    X_CFLAGS=
43654    X_LIBS=
43655  else
43656    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43657    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43658    # --x-libraries for the sysroot, if that seems to be correct.
43659    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43660      if test "x$SYSROOT" != "x"; then
43661        if test "x$x_includes" = xNONE; then
43662          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43663            x_includes="$SYSROOT/usr/X11R6/include"
43664          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43665            x_includes="$SYSROOT/usr/include"
43666          fi
43667        fi
43668        if test "x$x_libraries" = xNONE; then
43669          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43670            x_libraries="$SYSROOT/usr/X11R6/lib"
43671          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43672            x_libraries="$SYSROOT/usr/lib64"
43673          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43674            x_libraries="$SYSROOT/usr/lib"
43675          fi
43676        fi
43677      fi
43678    fi
43679
43680    # Now let autoconf do it's magic
43681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43682$as_echo_n "checking for X... " >&6; }
43683
43684
43685# Check whether --with-x was given.
43686if test "${with_x+set}" = set; then :
43687  withval=$with_x;
43688fi
43689
43690# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43691if test "x$with_x" = xno; then
43692  # The user explicitly disabled X.
43693  have_x=disabled
43694else
43695  case $x_includes,$x_libraries in #(
43696    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43697    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43698  $as_echo_n "(cached) " >&6
43699else
43700  # One or both of the vars are not set, and there is no cached value.
43701ac_x_includes=no ac_x_libraries=no
43702rm -f -r conftest.dir
43703if mkdir conftest.dir; then
43704  cd conftest.dir
43705  cat >Imakefile <<'_ACEOF'
43706incroot:
43707	@echo incroot='${INCROOT}'
43708usrlibdir:
43709	@echo usrlibdir='${USRLIBDIR}'
43710libdir:
43711	@echo libdir='${LIBDIR}'
43712_ACEOF
43713  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43714    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43715    for ac_var in incroot usrlibdir libdir; do
43716      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43717    done
43718    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43719    for ac_extension in a so sl dylib la dll; do
43720      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43721	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43722	ac_im_usrlibdir=$ac_im_libdir; break
43723      fi
43724    done
43725    # Screen out bogus values from the imake configuration.  They are
43726    # bogus both because they are the default anyway, and because
43727    # using them would break gcc on systems where it needs fixed includes.
43728    case $ac_im_incroot in
43729	/usr/include) ac_x_includes= ;;
43730	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43731    esac
43732    case $ac_im_usrlibdir in
43733	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43734	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43735    esac
43736  fi
43737  cd ..
43738  rm -f -r conftest.dir
43739fi
43740
43741# Standard set of common directories for X headers.
43742# Check X11 before X11Rn because it is often a symlink to the current release.
43743ac_x_header_dirs='
43744/usr/X11/include
43745/usr/X11R7/include
43746/usr/X11R6/include
43747/usr/X11R5/include
43748/usr/X11R4/include
43749
43750/usr/include/X11
43751/usr/include/X11R7
43752/usr/include/X11R6
43753/usr/include/X11R5
43754/usr/include/X11R4
43755
43756/usr/local/X11/include
43757/usr/local/X11R7/include
43758/usr/local/X11R6/include
43759/usr/local/X11R5/include
43760/usr/local/X11R4/include
43761
43762/usr/local/include/X11
43763/usr/local/include/X11R7
43764/usr/local/include/X11R6
43765/usr/local/include/X11R5
43766/usr/local/include/X11R4
43767
43768/usr/X386/include
43769/usr/x386/include
43770/usr/XFree86/include/X11
43771
43772/usr/include
43773/usr/local/include
43774/usr/unsupported/include
43775/usr/athena/include
43776/usr/local/x11r5/include
43777/usr/lpp/Xamples/include
43778
43779/usr/openwin/include
43780/usr/openwin/share/include'
43781
43782if test "$ac_x_includes" = no; then
43783  # Guess where to find include files, by looking for Xlib.h.
43784  # First, try using that file with no special directory specified.
43785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43786/* end confdefs.h.  */
43787#include <X11/Xlib.h>
43788_ACEOF
43789if ac_fn_cxx_try_cpp "$LINENO"; then :
43790  # We can compile using X headers with no special include directory.
43791ac_x_includes=
43792else
43793  for ac_dir in $ac_x_header_dirs; do
43794  if test -r "$ac_dir/X11/Xlib.h"; then
43795    ac_x_includes=$ac_dir
43796    break
43797  fi
43798done
43799fi
43800rm -f conftest.err conftest.i conftest.$ac_ext
43801fi # $ac_x_includes = no
43802
43803if test "$ac_x_libraries" = no; then
43804  # Check for the libraries.
43805  # See if we find them without any special options.
43806  # Don't add to $LIBS permanently.
43807  ac_save_LIBS=$LIBS
43808  LIBS="-lX11 $LIBS"
43809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43810/* end confdefs.h.  */
43811#include <X11/Xlib.h>
43812int
43813main ()
43814{
43815XrmInitialize ()
43816  ;
43817  return 0;
43818}
43819_ACEOF
43820if ac_fn_cxx_try_link "$LINENO"; then :
43821  LIBS=$ac_save_LIBS
43822# We can link X programs with no special library path.
43823ac_x_libraries=
43824else
43825  LIBS=$ac_save_LIBS
43826for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43827do
43828  # Don't even attempt the hair of trying to link an X program!
43829  for ac_extension in a so sl dylib la dll; do
43830    if test -r "$ac_dir/libX11.$ac_extension"; then
43831      ac_x_libraries=$ac_dir
43832      break 2
43833    fi
43834  done
43835done
43836fi
43837rm -f core conftest.err conftest.$ac_objext \
43838    conftest$ac_exeext conftest.$ac_ext
43839fi # $ac_x_libraries = no
43840
43841case $ac_x_includes,$ac_x_libraries in #(
43842  no,* | *,no | *\'*)
43843    # Didn't find X, or a directory has "'" in its name.
43844    ac_cv_have_x="have_x=no";; #(
43845  *)
43846    # Record where we found X for the cache.
43847    ac_cv_have_x="have_x=yes\
43848	ac_x_includes='$ac_x_includes'\
43849	ac_x_libraries='$ac_x_libraries'"
43850esac
43851fi
43852;; #(
43853    *) have_x=yes;;
43854  esac
43855  eval "$ac_cv_have_x"
43856fi # $with_x != no
43857
43858if test "$have_x" != yes; then
43859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43860$as_echo "$have_x" >&6; }
43861  no_x=yes
43862else
43863  # If each of the values was on the command line, it overrides each guess.
43864  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43865  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43866  # Update the cache value to reflect the command line values.
43867  ac_cv_have_x="have_x=yes\
43868	ac_x_includes='$x_includes'\
43869	ac_x_libraries='$x_libraries'"
43870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43871$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43872fi
43873
43874    if test "$no_x" = yes; then
43875  # Not all programs may use this symbol, but it does not hurt to define it.
43876
43877$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43878
43879  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43880else
43881  if test -n "$x_includes"; then
43882    X_CFLAGS="$X_CFLAGS -I$x_includes"
43883  fi
43884
43885  # It would also be nice to do this for all -L options, not just this one.
43886  if test -n "$x_libraries"; then
43887    X_LIBS="$X_LIBS -L$x_libraries"
43888    # For Solaris; some versions of Sun CC require a space after -R and
43889    # others require no space.  Words are not sufficient . . . .
43890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43891$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43892    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43893    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43894    ac_cxx_werror_flag=yes
43895    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43896/* end confdefs.h.  */
43897
43898int
43899main ()
43900{
43901
43902  ;
43903  return 0;
43904}
43905_ACEOF
43906if ac_fn_cxx_try_link "$LINENO"; then :
43907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43908$as_echo "no" >&6; }
43909       X_LIBS="$X_LIBS -R$x_libraries"
43910else
43911  LIBS="$ac_xsave_LIBS -R $x_libraries"
43912       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43913/* end confdefs.h.  */
43914
43915int
43916main ()
43917{
43918
43919  ;
43920  return 0;
43921}
43922_ACEOF
43923if ac_fn_cxx_try_link "$LINENO"; then :
43924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43925$as_echo "yes" >&6; }
43926	  X_LIBS="$X_LIBS -R $x_libraries"
43927else
43928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43929$as_echo "neither works" >&6; }
43930fi
43931rm -f core conftest.err conftest.$ac_objext \
43932    conftest$ac_exeext conftest.$ac_ext
43933fi
43934rm -f core conftest.err conftest.$ac_objext \
43935    conftest$ac_exeext conftest.$ac_ext
43936    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43937    LIBS=$ac_xsave_LIBS
43938  fi
43939
43940  # Check for system-dependent libraries X programs must link with.
43941  # Do this before checking for the system-independent R6 libraries
43942  # (-lICE), since we may need -lsocket or whatever for X linking.
43943
43944  if test "$ISC" = yes; then
43945    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43946  else
43947    # Martyn Johnson says this is needed for Ultrix, if the X
43948    # libraries were built with DECnet support.  And Karl Berry says
43949    # the Alpha needs dnet_stub (dnet does not exist).
43950    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43951    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43952/* end confdefs.h.  */
43953
43954/* Override any GCC internal prototype to avoid an error.
43955   Use char because int might match the return type of a GCC
43956   builtin and then its argument prototype would still apply.  */
43957#ifdef __cplusplus
43958extern "C"
43959#endif
43960char XOpenDisplay ();
43961int
43962main ()
43963{
43964return XOpenDisplay ();
43965  ;
43966  return 0;
43967}
43968_ACEOF
43969if ac_fn_cxx_try_link "$LINENO"; then :
43970
43971else
43972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43973$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43974if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43975  $as_echo_n "(cached) " >&6
43976else
43977  ac_check_lib_save_LIBS=$LIBS
43978LIBS="-ldnet  $LIBS"
43979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43980/* end confdefs.h.  */
43981
43982/* Override any GCC internal prototype to avoid an error.
43983   Use char because int might match the return type of a GCC
43984   builtin and then its argument prototype would still apply.  */
43985#ifdef __cplusplus
43986extern "C"
43987#endif
43988char dnet_ntoa ();
43989int
43990main ()
43991{
43992return dnet_ntoa ();
43993  ;
43994  return 0;
43995}
43996_ACEOF
43997if ac_fn_cxx_try_link "$LINENO"; then :
43998  ac_cv_lib_dnet_dnet_ntoa=yes
43999else
44000  ac_cv_lib_dnet_dnet_ntoa=no
44001fi
44002rm -f core conftest.err conftest.$ac_objext \
44003    conftest$ac_exeext conftest.$ac_ext
44004LIBS=$ac_check_lib_save_LIBS
44005fi
44006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
44007$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
44008if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
44009  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
44010fi
44011
44012    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
44013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
44014$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
44015if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
44016  $as_echo_n "(cached) " >&6
44017else
44018  ac_check_lib_save_LIBS=$LIBS
44019LIBS="-ldnet_stub  $LIBS"
44020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44021/* end confdefs.h.  */
44022
44023/* Override any GCC internal prototype to avoid an error.
44024   Use char because int might match the return type of a GCC
44025   builtin and then its argument prototype would still apply.  */
44026#ifdef __cplusplus
44027extern "C"
44028#endif
44029char dnet_ntoa ();
44030int
44031main ()
44032{
44033return dnet_ntoa ();
44034  ;
44035  return 0;
44036}
44037_ACEOF
44038if ac_fn_cxx_try_link "$LINENO"; then :
44039  ac_cv_lib_dnet_stub_dnet_ntoa=yes
44040else
44041  ac_cv_lib_dnet_stub_dnet_ntoa=no
44042fi
44043rm -f core conftest.err conftest.$ac_objext \
44044    conftest$ac_exeext conftest.$ac_ext
44045LIBS=$ac_check_lib_save_LIBS
44046fi
44047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
44048$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
44049if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
44050  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
44051fi
44052
44053    fi
44054fi
44055rm -f core conftest.err conftest.$ac_objext \
44056    conftest$ac_exeext conftest.$ac_ext
44057    LIBS="$ac_xsave_LIBS"
44058
44059    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
44060    # to get the SysV transport functions.
44061    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
44062    # needs -lnsl.
44063    # The nsl library prevents programs from opening the X display
44064    # on Irix 5.2, according to T.E. Dickey.
44065    # The functions gethostbyname, getservbyname, and inet_addr are
44066    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
44067    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
44068if test "x$ac_cv_func_gethostbyname" = xyes; then :
44069
44070fi
44071
44072    if test $ac_cv_func_gethostbyname = no; then
44073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
44074$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
44075if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
44076  $as_echo_n "(cached) " >&6
44077else
44078  ac_check_lib_save_LIBS=$LIBS
44079LIBS="-lnsl  $LIBS"
44080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44081/* end confdefs.h.  */
44082
44083/* Override any GCC internal prototype to avoid an error.
44084   Use char because int might match the return type of a GCC
44085   builtin and then its argument prototype would still apply.  */
44086#ifdef __cplusplus
44087extern "C"
44088#endif
44089char gethostbyname ();
44090int
44091main ()
44092{
44093return gethostbyname ();
44094  ;
44095  return 0;
44096}
44097_ACEOF
44098if ac_fn_cxx_try_link "$LINENO"; then :
44099  ac_cv_lib_nsl_gethostbyname=yes
44100else
44101  ac_cv_lib_nsl_gethostbyname=no
44102fi
44103rm -f core conftest.err conftest.$ac_objext \
44104    conftest$ac_exeext conftest.$ac_ext
44105LIBS=$ac_check_lib_save_LIBS
44106fi
44107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
44108$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
44109if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
44110  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
44111fi
44112
44113      if test $ac_cv_lib_nsl_gethostbyname = no; then
44114	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
44115$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
44116if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
44117  $as_echo_n "(cached) " >&6
44118else
44119  ac_check_lib_save_LIBS=$LIBS
44120LIBS="-lbsd  $LIBS"
44121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44122/* end confdefs.h.  */
44123
44124/* Override any GCC internal prototype to avoid an error.
44125   Use char because int might match the return type of a GCC
44126   builtin and then its argument prototype would still apply.  */
44127#ifdef __cplusplus
44128extern "C"
44129#endif
44130char gethostbyname ();
44131int
44132main ()
44133{
44134return gethostbyname ();
44135  ;
44136  return 0;
44137}
44138_ACEOF
44139if ac_fn_cxx_try_link "$LINENO"; then :
44140  ac_cv_lib_bsd_gethostbyname=yes
44141else
44142  ac_cv_lib_bsd_gethostbyname=no
44143fi
44144rm -f core conftest.err conftest.$ac_objext \
44145    conftest$ac_exeext conftest.$ac_ext
44146LIBS=$ac_check_lib_save_LIBS
44147fi
44148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
44149$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
44150if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
44151  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
44152fi
44153
44154      fi
44155    fi
44156
44157    # lieder@skyler.mavd.honeywell.com says without -lsocket,
44158    # socket/setsockopt and other routines are undefined under SCO ODT
44159    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
44160    # on later versions), says Simon Leinen: it contains gethostby*
44161    # variants that don't use the name server (or something).  -lsocket
44162    # must be given before -lnsl if both are needed.  We assume that
44163    # if connect needs -lnsl, so does gethostbyname.
44164    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
44165if test "x$ac_cv_func_connect" = xyes; then :
44166
44167fi
44168
44169    if test $ac_cv_func_connect = no; then
44170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
44171$as_echo_n "checking for connect in -lsocket... " >&6; }
44172if ${ac_cv_lib_socket_connect+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  ac_check_lib_save_LIBS=$LIBS
44176LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
44177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44178/* end confdefs.h.  */
44179
44180/* Override any GCC internal prototype to avoid an error.
44181   Use char because int might match the return type of a GCC
44182   builtin and then its argument prototype would still apply.  */
44183#ifdef __cplusplus
44184extern "C"
44185#endif
44186char connect ();
44187int
44188main ()
44189{
44190return connect ();
44191  ;
44192  return 0;
44193}
44194_ACEOF
44195if ac_fn_cxx_try_link "$LINENO"; then :
44196  ac_cv_lib_socket_connect=yes
44197else
44198  ac_cv_lib_socket_connect=no
44199fi
44200rm -f core conftest.err conftest.$ac_objext \
44201    conftest$ac_exeext conftest.$ac_ext
44202LIBS=$ac_check_lib_save_LIBS
44203fi
44204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
44205$as_echo "$ac_cv_lib_socket_connect" >&6; }
44206if test "x$ac_cv_lib_socket_connect" = xyes; then :
44207  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
44208fi
44209
44210    fi
44211
44212    # Guillermo Gomez says -lposix is necessary on A/UX.
44213    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
44214if test "x$ac_cv_func_remove" = xyes; then :
44215
44216fi
44217
44218    if test $ac_cv_func_remove = no; then
44219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
44220$as_echo_n "checking for remove in -lposix... " >&6; }
44221if ${ac_cv_lib_posix_remove+:} false; then :
44222  $as_echo_n "(cached) " >&6
44223else
44224  ac_check_lib_save_LIBS=$LIBS
44225LIBS="-lposix  $LIBS"
44226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44227/* end confdefs.h.  */
44228
44229/* Override any GCC internal prototype to avoid an error.
44230   Use char because int might match the return type of a GCC
44231   builtin and then its argument prototype would still apply.  */
44232#ifdef __cplusplus
44233extern "C"
44234#endif
44235char remove ();
44236int
44237main ()
44238{
44239return remove ();
44240  ;
44241  return 0;
44242}
44243_ACEOF
44244if ac_fn_cxx_try_link "$LINENO"; then :
44245  ac_cv_lib_posix_remove=yes
44246else
44247  ac_cv_lib_posix_remove=no
44248fi
44249rm -f core conftest.err conftest.$ac_objext \
44250    conftest$ac_exeext conftest.$ac_ext
44251LIBS=$ac_check_lib_save_LIBS
44252fi
44253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44254$as_echo "$ac_cv_lib_posix_remove" >&6; }
44255if test "x$ac_cv_lib_posix_remove" = xyes; then :
44256  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44257fi
44258
44259    fi
44260
44261    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44262    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44263if test "x$ac_cv_func_shmat" = xyes; then :
44264
44265fi
44266
44267    if test $ac_cv_func_shmat = no; then
44268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44269$as_echo_n "checking for shmat in -lipc... " >&6; }
44270if ${ac_cv_lib_ipc_shmat+:} false; then :
44271  $as_echo_n "(cached) " >&6
44272else
44273  ac_check_lib_save_LIBS=$LIBS
44274LIBS="-lipc  $LIBS"
44275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44276/* end confdefs.h.  */
44277
44278/* Override any GCC internal prototype to avoid an error.
44279   Use char because int might match the return type of a GCC
44280   builtin and then its argument prototype would still apply.  */
44281#ifdef __cplusplus
44282extern "C"
44283#endif
44284char shmat ();
44285int
44286main ()
44287{
44288return shmat ();
44289  ;
44290  return 0;
44291}
44292_ACEOF
44293if ac_fn_cxx_try_link "$LINENO"; then :
44294  ac_cv_lib_ipc_shmat=yes
44295else
44296  ac_cv_lib_ipc_shmat=no
44297fi
44298rm -f core conftest.err conftest.$ac_objext \
44299    conftest$ac_exeext conftest.$ac_ext
44300LIBS=$ac_check_lib_save_LIBS
44301fi
44302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44303$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44304if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44305  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44306fi
44307
44308    fi
44309  fi
44310
44311  # Check for libraries that X11R6 Xt/Xaw programs need.
44312  ac_save_LDFLAGS=$LDFLAGS
44313  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44314  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44315  # check for ICE first), but we must link in the order -lSM -lICE or
44316  # we get undefined symbols.  So assume we have SM if we have ICE.
44317  # These have to be linked with before -lX11, unlike the other
44318  # libraries we check for below, so use a different variable.
44319  # John Interrante, Karl Berry
44320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44321$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44322if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44323  $as_echo_n "(cached) " >&6
44324else
44325  ac_check_lib_save_LIBS=$LIBS
44326LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44328/* end confdefs.h.  */
44329
44330/* Override any GCC internal prototype to avoid an error.
44331   Use char because int might match the return type of a GCC
44332   builtin and then its argument prototype would still apply.  */
44333#ifdef __cplusplus
44334extern "C"
44335#endif
44336char IceConnectionNumber ();
44337int
44338main ()
44339{
44340return IceConnectionNumber ();
44341  ;
44342  return 0;
44343}
44344_ACEOF
44345if ac_fn_cxx_try_link "$LINENO"; then :
44346  ac_cv_lib_ICE_IceConnectionNumber=yes
44347else
44348  ac_cv_lib_ICE_IceConnectionNumber=no
44349fi
44350rm -f core conftest.err conftest.$ac_objext \
44351    conftest$ac_exeext conftest.$ac_ext
44352LIBS=$ac_check_lib_save_LIBS
44353fi
44354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44355$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44356if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44357  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44358fi
44359
44360  LDFLAGS=$ac_save_LDFLAGS
44361
44362fi
44363
44364
44365    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44366    # this doesn't make sense so we remove it.
44367    if test "x$COMPILE_TYPE" = xcross; then
44368      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44369    fi
44370
44371    if test "x$no_x" = xyes; then
44372
44373  # Print a helpful message on how to acquire the necessary build dependency.
44374  # x11 is the help tag: freetype, cups, pulse, alsa etc
44375  MISSING_DEPENDENCY=x11
44376
44377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44378    cygwin_help $MISSING_DEPENDENCY
44379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44380    msys_help $MISSING_DEPENDENCY
44381  else
44382    PKGHANDLER_COMMAND=
44383
44384    case $PKGHANDLER in
44385      apt-get)
44386        apt_help     $MISSING_DEPENDENCY ;;
44387      yum)
44388        yum_help     $MISSING_DEPENDENCY ;;
44389      port)
44390        port_help    $MISSING_DEPENDENCY ;;
44391      pkgutil)
44392        pkgutil_help $MISSING_DEPENDENCY ;;
44393      pkgadd)
44394        pkgadd_help  $MISSING_DEPENDENCY ;;
44395    esac
44396
44397    if test "x$PKGHANDLER_COMMAND" != x; then
44398      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44399    fi
44400  fi
44401
44402      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44403    fi
44404
44405    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44406      OPENWIN_HOME="/usr/openwin"
44407      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44408      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44409          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44410          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44411          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44412    fi
44413
44414    ac_ext=c
44415ac_cpp='$CPP $CPPFLAGS'
44416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44418ac_compiler_gnu=$ac_cv_c_compiler_gnu
44419
44420    OLD_CFLAGS="$CFLAGS"
44421    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44422
44423    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44424    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44425do :
44426  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44427ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44428          # include <X11/Xlib.h>
44429          # include <X11/Xutil.h>
44430
44431
44432"
44433if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44434  cat >>confdefs.h <<_ACEOF
44435#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44436_ACEOF
44437 X11_HEADERS_OK=yes
44438else
44439  X11_HEADERS_OK=no; break
44440fi
44441
44442done
44443
44444
44445    if test "x$X11_HEADERS_OK" = xno; then
44446
44447  # Print a helpful message on how to acquire the necessary build dependency.
44448  # x11 is the help tag: freetype, cups, pulse, alsa etc
44449  MISSING_DEPENDENCY=x11
44450
44451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44452    cygwin_help $MISSING_DEPENDENCY
44453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44454    msys_help $MISSING_DEPENDENCY
44455  else
44456    PKGHANDLER_COMMAND=
44457
44458    case $PKGHANDLER in
44459      apt-get)
44460        apt_help     $MISSING_DEPENDENCY ;;
44461      yum)
44462        yum_help     $MISSING_DEPENDENCY ;;
44463      port)
44464        port_help    $MISSING_DEPENDENCY ;;
44465      pkgutil)
44466        pkgutil_help $MISSING_DEPENDENCY ;;
44467      pkgadd)
44468        pkgadd_help  $MISSING_DEPENDENCY ;;
44469    esac
44470
44471    if test "x$PKGHANDLER_COMMAND" != x; then
44472      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44473    fi
44474  fi
44475
44476      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44477    fi
44478
44479    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44480    # defined in libawt_xawt.
44481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44482$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44483    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44484/* end confdefs.h.  */
44485#include <X11/extensions/Xrender.h>
44486int
44487main ()
44488{
44489XLinearGradient x;
44490  ;
44491  return 0;
44492}
44493_ACEOF
44494if ac_fn_c_try_compile "$LINENO"; then :
44495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44496$as_echo "yes" >&6; }
44497else
44498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44499$as_echo "no" >&6; }
44500         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44501fi
44502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44503
44504    CFLAGS="$OLD_CFLAGS"
44505    ac_ext=cpp
44506ac_cpp='$CXXCPP $CPPFLAGS'
44507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44510
44511  fi # X11_NOT_NEEDED
44512
44513
44514
44515
44516
44517
44518  ###############################################################################
44519  #
44520  # The common unix printing system cups is used to print from java.
44521  #
44522
44523# Check whether --with-cups was given.
44524if test "${with_cups+set}" = set; then :
44525  withval=$with_cups;
44526fi
44527
44528
44529# Check whether --with-cups-include was given.
44530if test "${with_cups_include+set}" = set; then :
44531  withval=$with_cups_include;
44532fi
44533
44534
44535  if test "x$CUPS_NOT_NEEDED" = xyes; then
44536    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44537      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44538$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44539    fi
44540    CUPS_CFLAGS=
44541  else
44542    CUPS_FOUND=no
44543
44544    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44545      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44546    fi
44547
44548    if test "x${with_cups}" != x; then
44549      CUPS_CFLAGS="-I${with_cups}/include"
44550      CUPS_FOUND=yes
44551    fi
44552    if test "x${with_cups_include}" != x; then
44553      CUPS_CFLAGS="-I${with_cups_include}"
44554      CUPS_FOUND=yes
44555    fi
44556    if test "x$CUPS_FOUND" = xno; then
44557
44558
44559  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44560    # Source the builddeps file again, to make sure it uses the latest variables!
44561    . $builddepsfile
44562    # Look for a target and build machine specific resource!
44563    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44564    if test "x$resource" = x; then
44565      # Ok, lets instead look for a target specific resource
44566      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44567    fi
44568    if test "x$resource" = x; then
44569      # Ok, lets instead look for a build specific resource
44570      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44571    fi
44572    if test "x$resource" = x; then
44573      # Ok, lets instead look for a generic resource
44574      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44575      resource=${builddep_cups}
44576    fi
44577    if test "x$resource" != x; then
44578      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44579$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44580      # If the resource in the builddeps.conf file is an existing directory,
44581      # for example /java/linux/cups
44582      if test -d ${resource}; then
44583        depdir=${resource}
44584      else
44585
44586  # cups is for example mymodule
44587  # $resource is for example libs/general/libmymod_1_2_3.zip
44588  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44589  # $with_builddeps_dir is for example /localhome/builddeps
44590  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44591  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44592  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44593  filename=`basename $resource`
44594  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44595  filebase=${filename%%.*}
44596  extension=${filename#*.}
44597  installdir=$with_builddeps_dir/$filebase
44598  if test ! -f $installdir/$filename.unpacked; then
44599    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44600$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44601    if test ! -d $installdir; then
44602      mkdir -p $installdir
44603    fi
44604    if test ! -d $installdir; then
44605      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44606    fi
44607    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44608    touch $tmpfile
44609    if test ! -f $tmpfile; then
44610      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44611    fi
44612
44613  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44614  # $tmpfile is the local file name for the downloaded file.
44615  VALID_TOOL=no
44616  if test "x$BDEPS_FTP" = xwget; then
44617    VALID_TOOL=yes
44618    wget -O $tmpfile $with_builddeps_server/$resource
44619  fi
44620  if test "x$BDEPS_FTP" = xlftp; then
44621    VALID_TOOL=yes
44622    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44623  fi
44624  if test "x$BDEPS_FTP" = xftp; then
44625    VALID_TOOL=yes
44626    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44627    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44628    FTPUSERPWD=${FTPSERVER%%@*}
44629    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44630      FTPUSER=${userpwd%%:*}
44631      FTPPWD=${userpwd#*@}
44632      FTPSERVER=${FTPSERVER#*@}
44633    else
44634      FTPUSER=ftp
44635      FTPPWD=ftp
44636    fi
44637    # the "pass" command does not work on some
44638    # ftp clients (read ftp.exe) but if it works,
44639    # passive mode is better!
44640    ( \
44641        echo "user $FTPUSER $FTPPWD"        ; \
44642        echo "pass"                         ; \
44643        echo "bin"                          ; \
44644        echo "get $FTPPATH $tmpfile"              ; \
44645    ) | ftp -in $FTPSERVER
44646  fi
44647  if test "x$VALID_TOOL" != xyes; then
44648    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44649  fi
44650
44651    mv $tmpfile $installdir/$filename
44652    if test ! -s $installdir/$filename; then
44653      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44654    fi
44655    case "$extension" in
44656      zip)  echo "Unzipping $installdir/$filename..."
44657        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44658        ;;
44659      tar.gz) echo "Untaring $installdir/$filename..."
44660        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44661        ;;
44662      tgz) echo "Untaring $installdir/$filename..."
44663        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44664        ;;
44665      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44666        ;;
44667    esac
44668  fi
44669  if test -f $installdir/$filename.unpacked; then
44670    depdir=$installdir
44671  fi
44672
44673      fi
44674      # Source the builddeps file again, because in the previous command, the depdir
44675      # was updated to point at the current build dependency install directory.
44676      . $builddepsfile
44677      # Now extract variables from the builddeps.conf files.
44678      theroot=${builddep_cups_ROOT}
44679      thecflags=${builddep_cups_CFLAGS}
44680      thelibs=${builddep_cups_LIBS}
44681      if test "x$depdir" = x; then
44682        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44683      fi
44684      CUPS=$depdir
44685      if test "x$theroot" != x; then
44686        CUPS="$theroot"
44687      fi
44688      if test "x$thecflags" != x; then
44689        CUPS_CFLAGS="$thecflags"
44690      fi
44691      if test "x$thelibs" != x; then
44692        CUPS_LIBS="$thelibs"
44693      fi
44694      CUPS_FOUND=yes
44695
44696    fi
44697
44698  fi
44699
44700    fi
44701    if test "x$CUPS_FOUND" = xno; then
44702      # Are the cups headers installed in the default /usr/include location?
44703      for ac_header in cups/cups.h cups/ppd.h
44704do :
44705  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44706ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44707if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44708  cat >>confdefs.h <<_ACEOF
44709#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44710_ACEOF
44711
44712            CUPS_FOUND=yes
44713            CUPS_CFLAGS=
44714            DEFAULT_CUPS=yes
44715
44716
44717fi
44718
44719done
44720
44721    fi
44722    if test "x$CUPS_FOUND" = xno; then
44723      # Getting nervous now? Lets poke around for standard Solaris third-party
44724      # package installation locations.
44725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44726$as_echo_n "checking for cups headers... " >&6; }
44727      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44728        # An SFW package seems to be installed!
44729        CUPS_FOUND=yes
44730        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44731      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44732        # A CSW package seems to be installed!
44733        CUPS_FOUND=yes
44734        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44735      fi
44736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44737$as_echo "$CUPS_FOUND" >&6; }
44738    fi
44739    if test "x$CUPS_FOUND" = xno; then
44740
44741  # Print a helpful message on how to acquire the necessary build dependency.
44742  # cups is the help tag: freetype, cups, pulse, alsa etc
44743  MISSING_DEPENDENCY=cups
44744
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746    cygwin_help $MISSING_DEPENDENCY
44747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44748    msys_help $MISSING_DEPENDENCY
44749  else
44750    PKGHANDLER_COMMAND=
44751
44752    case $PKGHANDLER in
44753      apt-get)
44754        apt_help     $MISSING_DEPENDENCY ;;
44755      yum)
44756        yum_help     $MISSING_DEPENDENCY ;;
44757      port)
44758        port_help    $MISSING_DEPENDENCY ;;
44759      pkgutil)
44760        pkgutil_help $MISSING_DEPENDENCY ;;
44761      pkgadd)
44762        pkgadd_help  $MISSING_DEPENDENCY ;;
44763    esac
44764
44765    if test "x$PKGHANDLER_COMMAND" != x; then
44766      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44767    fi
44768  fi
44769
44770      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44771    fi
44772  fi
44773
44774
44775
44776
44777
44778
44779  ###############################################################################
44780  #
44781  # The ubiquitous freetype library is used to render fonts.
44782  #
44783
44784# Check whether --with-freetype was given.
44785if test "${with_freetype+set}" = set; then :
44786  withval=$with_freetype;
44787fi
44788
44789
44790# Check whether --with-freetype-include was given.
44791if test "${with_freetype_include+set}" = set; then :
44792  withval=$with_freetype_include;
44793fi
44794
44795
44796# Check whether --with-freetype-lib was given.
44797if test "${with_freetype_lib+set}" = set; then :
44798  withval=$with_freetype_lib;
44799fi
44800
44801
44802# Check whether --with-freetype-src was given.
44803if test "${with_freetype_src+set}" = set; then :
44804  withval=$with_freetype_src;
44805fi
44806
44807  # Check whether --enable-freetype-bundling was given.
44808if test "${enable_freetype_bundling+set}" = set; then :
44809  enableval=$enable_freetype_bundling;
44810fi
44811
44812
44813  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44814  FREETYPE_BASE_NAME=freetype
44815  FREETYPE_CFLAGS=
44816  FREETYPE_LIBS=
44817  FREETYPE_BUNDLE_LIB_PATH=
44818
44819  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44820    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
44821      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44822$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44823    fi
44824    if test "x$enable_freetype_bundling" != x; then
44825      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44826$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44827    fi
44828  else
44829    # freetype is needed to build; go get it!
44830
44831    BUNDLE_FREETYPE="$enable_freetype_bundling"
44832
44833    if  test "x$with_freetype_src" != x; then
44834      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44835        # Try to build freetype if --with-freetype-src was given on Windows
44836
44837  FREETYPE_SRC_PATH="$with_freetype_src"
44838  BUILD_FREETYPE=yes
44839
44840  # Check if the freetype sources are acessible..
44841  if ! test -d $FREETYPE_SRC_PATH; then
44842    { $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
44843$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44844    BUILD_FREETYPE=no
44845  fi
44846  # ..and contain a vc2010 project file
44847  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44848  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44849    { $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
44850$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44851    BUILD_FREETYPE=no
44852  fi
44853  # Now check if configure found a version of 'msbuild.exe'
44854  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44855    { $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
44856$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;}
44857    BUILD_FREETYPE=no
44858  fi
44859
44860  # Ready to go..
44861  if test "x$BUILD_FREETYPE" = xyes; then
44862
44863    # msbuild requires trailing slashes for output directories
44864    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44865    freetype_lib_path_unix="$freetype_lib_path"
44866    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44867
44868  unix_path="$vcxproj_path"
44869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44870    windows_path=`$CYGPATH -m "$unix_path"`
44871    vcxproj_path="$windows_path"
44872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44873    windows_path=`cmd //c echo $unix_path`
44874    vcxproj_path="$windows_path"
44875  fi
44876
44877
44878  unix_path="$freetype_lib_path"
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880    windows_path=`$CYGPATH -m "$unix_path"`
44881    freetype_lib_path="$windows_path"
44882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883    windows_path=`cmd //c echo $unix_path`
44884    freetype_lib_path="$windows_path"
44885  fi
44886
44887
44888  unix_path="$freetype_obj_path"
44889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44890    windows_path=`$CYGPATH -m "$unix_path"`
44891    freetype_obj_path="$windows_path"
44892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44893    windows_path=`cmd //c echo $unix_path`
44894    freetype_obj_path="$windows_path"
44895  fi
44896
44897    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44898      freetype_platform=x64
44899    else
44900      freetype_platform=win32
44901    fi
44902
44903    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44904    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44905    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44906    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44907    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44908$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44909
44910    # First we try to build the freetype.dll
44911    $ECHO -e "@echo off\n"\
44912	     "$MSBUILD $vcxproj_path "\
44913		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44914		       "/p:Configuration=\"Release Multithreaded\" "\
44915		       "/p:Platform=$freetype_platform "\
44916		       "/p:ConfigurationType=DynamicLibrary "\
44917		       "/p:TargetName=freetype "\
44918		       "/p:OutDir=\"$freetype_lib_path\" "\
44919		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44920    cmd /c freetype.bat
44921
44922    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44923      # If that succeeds we also build freetype.lib
44924      $ECHO -e "@echo off\n"\
44925	       "$MSBUILD $vcxproj_path "\
44926			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44927			 "/p:Configuration=\"Release Multithreaded\" "\
44928			 "/p:Platform=$freetype_platform "\
44929			 "/p:ConfigurationType=StaticLibrary "\
44930			 "/p:TargetName=freetype "\
44931			 "/p:OutDir=\"$freetype_lib_path\" "\
44932			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44933      cmd /c freetype.bat
44934
44935      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44936	# Once we build both, lib and dll, set freetype lib and include path appropriately
44937	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44938	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44939	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44940$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44941      else
44942	BUILD_FREETYPE=no
44943      fi
44944    else
44945      BUILD_FREETYPE=no
44946    fi
44947  fi
44948
44949        if test "x$BUILD_FREETYPE" = xyes; then
44950          # Okay, we built it. Check that it works.
44951
44952  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44953  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44954  METHOD="--with-freetype-src"
44955
44956  # Let's start with an optimistic view of the world :-)
44957  FOUND_FREETYPE=yes
44958
44959  # First look for the canonical freetype main include file ft2build.h.
44960  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44961    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44962    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44963    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44964      # Fail.
44965      FOUND_FREETYPE=no
44966    fi
44967  fi
44968
44969  if test "x$FOUND_FREETYPE" = xyes; then
44970    # Include file found, let's continue the sanity check.
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44972$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44973
44974    # Reset to default value
44975    FREETYPE_BASE_NAME=freetype
44976    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44977    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44978      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44979          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44980        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44981        # for the .6 version explicitly.
44982        FREETYPE_BASE_NAME=freetype.6
44983        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44984        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44985$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44986      else
44987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44988$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44989        FOUND_FREETYPE=no
44990      fi
44991    else
44992      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44993        # On Windows, we will need both .lib and .dll file.
44994        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44995          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44996$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44997          FOUND_FREETYPE=no
44998        fi
44999      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45000          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45001        # Found lib in isa dir, use that instead.
45002        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45003        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45004$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45005      fi
45006    fi
45007  fi
45008
45009  if test "x$FOUND_FREETYPE" = xyes; then
45010
45011  # Only process if variable expands to non-empty
45012
45013  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015
45016  # Input might be given as Windows format, start by converting to
45017  # unix format.
45018  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45019  new_path=`$CYGPATH -u "$path"`
45020
45021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45024  # "foo.exe" is OK but "foo" is an error.
45025  #
45026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45027  # It is also a way to make sure we got the proper file name for the real test later on.
45028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45029  if test "x$test_shortpath" = x; then
45030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45032    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45033  fi
45034
45035  # Call helper function which possibly converts this using DOS-style short mode.
45036  # If so, the updated path is stored in $new_path.
45037
45038  input_path="$new_path"
45039  # Check if we need to convert this using DOS-style short mode. If the path
45040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45041  # take no chances and rewrite it.
45042  # Note: m4 eats our [], so we need to use [ and ] instead.
45043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45044  if test "x$has_forbidden_chars" != x; then
45045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45049      # Going to short mode and back again did indeed matter. Since short mode is
45050      # case insensitive, let's make it lowercase to improve readability.
45051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45052      # Now convert it back to Unix-stile (cygpath)
45053      input_path=`$CYGPATH -u "$shortmode_path"`
45054      new_path="$input_path"
45055    fi
45056  fi
45057
45058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45059  if test "x$test_cygdrive_prefix" = x; then
45060    # As a simple fix, exclude /usr/bin since it's not a real path.
45061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45063      # a path prefixed by /cygdrive for fixpath to work.
45064      new_path="$CYGWIN_ROOT_PATH$input_path"
45065    fi
45066  fi
45067
45068
45069  if test "x$path" != "x$new_path"; then
45070    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45073  fi
45074
45075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45076
45077  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45078  has_colon=`$ECHO $path | $GREP ^.:`
45079  new_path="$path"
45080  if test "x$has_colon" = x; then
45081    # Not in mixed or Windows style, start by that.
45082    new_path=`cmd //c echo $path`
45083  fi
45084
45085
45086  input_path="$new_path"
45087  # Check if we need to convert this using DOS-style short mode. If the path
45088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089  # take no chances and rewrite it.
45090  # Note: m4 eats our [], so we need to use [ and ] instead.
45091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45092  if test "x$has_forbidden_chars" != x; then
45093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45095  fi
45096
45097
45098  windows_path="$new_path"
45099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45100    unix_path=`$CYGPATH -u "$windows_path"`
45101    new_path="$unix_path"
45102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45104    new_path="$unix_path"
45105  fi
45106
45107  if test "x$path" != "x$new_path"; then
45108    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45111  fi
45112
45113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45115
45116    else
45117      # We're on a unix platform. Hooray! :)
45118      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45119      has_space=`$ECHO "$path" | $GREP " "`
45120      if test "x$has_space" != x; then
45121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45124      fi
45125
45126      # Use eval to expand a potential ~
45127      eval path="$path"
45128      if test ! -f "$path" && test ! -d "$path"; then
45129        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45130      fi
45131
45132      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45133    fi
45134  fi
45135
45136
45137  # Only process if variable expands to non-empty
45138
45139  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45141
45142  # Input might be given as Windows format, start by converting to
45143  # unix format.
45144  path="$POTENTIAL_FREETYPE_LIB_PATH"
45145  new_path=`$CYGPATH -u "$path"`
45146
45147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45150  # "foo.exe" is OK but "foo" is an error.
45151  #
45152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45153  # It is also a way to make sure we got the proper file name for the real test later on.
45154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45155  if test "x$test_shortpath" = x; then
45156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45158    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45159  fi
45160
45161  # Call helper function which possibly converts this using DOS-style short mode.
45162  # If so, the updated path is stored in $new_path.
45163
45164  input_path="$new_path"
45165  # Check if we need to convert this using DOS-style short mode. If the path
45166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45167  # take no chances and rewrite it.
45168  # Note: m4 eats our [], so we need to use [ and ] instead.
45169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45170  if test "x$has_forbidden_chars" != x; then
45171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45175      # Going to short mode and back again did indeed matter. Since short mode is
45176      # case insensitive, let's make it lowercase to improve readability.
45177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45178      # Now convert it back to Unix-stile (cygpath)
45179      input_path=`$CYGPATH -u "$shortmode_path"`
45180      new_path="$input_path"
45181    fi
45182  fi
45183
45184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45185  if test "x$test_cygdrive_prefix" = x; then
45186    # As a simple fix, exclude /usr/bin since it's not a real path.
45187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45189      # a path prefixed by /cygdrive for fixpath to work.
45190      new_path="$CYGWIN_ROOT_PATH$input_path"
45191    fi
45192  fi
45193
45194
45195  if test "x$path" != "x$new_path"; then
45196    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45199  fi
45200
45201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45202
45203  path="$POTENTIAL_FREETYPE_LIB_PATH"
45204  has_colon=`$ECHO $path | $GREP ^.:`
45205  new_path="$path"
45206  if test "x$has_colon" = x; then
45207    # Not in mixed or Windows style, start by that.
45208    new_path=`cmd //c echo $path`
45209  fi
45210
45211
45212  input_path="$new_path"
45213  # Check if we need to convert this using DOS-style short mode. If the path
45214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45215  # take no chances and rewrite it.
45216  # Note: m4 eats our [], so we need to use [ and ] instead.
45217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45218  if test "x$has_forbidden_chars" != x; then
45219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45221  fi
45222
45223
45224  windows_path="$new_path"
45225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45226    unix_path=`$CYGPATH -u "$windows_path"`
45227    new_path="$unix_path"
45228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45230    new_path="$unix_path"
45231  fi
45232
45233  if test "x$path" != "x$new_path"; then
45234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45237  fi
45238
45239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45241
45242    else
45243      # We're on a unix platform. Hooray! :)
45244      path="$POTENTIAL_FREETYPE_LIB_PATH"
45245      has_space=`$ECHO "$path" | $GREP " "`
45246      if test "x$has_space" != x; then
45247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45248$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45250      fi
45251
45252      # Use eval to expand a potential ~
45253      eval path="$path"
45254      if test ! -f "$path" && test ! -d "$path"; then
45255        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45256      fi
45257
45258      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45259    fi
45260  fi
45261
45262
45263    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45265$as_echo_n "checking for freetype includes... " >&6; }
45266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45267$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45268    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45270$as_echo_n "checking for freetype libraries... " >&6; }
45271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45272$as_echo "$FREETYPE_LIB_PATH" >&6; }
45273  fi
45274
45275          if test "x$FOUND_FREETYPE" != xyes; then
45276            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45277          fi
45278        else
45279          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45280$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45281          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45282        fi
45283      else
45284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45285$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45286      fi
45287    fi
45288
45289    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45290      # User has specified settings
45291
45292      if test "x$BUNDLE_FREETYPE" = x; then
45293        # If not specified, default is to bundle freetype
45294        BUNDLE_FREETYPE=yes
45295      fi
45296
45297      if test "x$with_freetype" != x; then
45298        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45299        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45300      fi
45301
45302      # Allow --with-freetype-lib and --with-freetype-include to override
45303      if test "x$with_freetype_include" != x; then
45304        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45305      fi
45306      if test "x$with_freetype_lib" != x; then
45307        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45308      fi
45309
45310      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45311        # Okay, we got it. Check that it works.
45312
45313  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45314  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45315  METHOD="--with-freetype"
45316
45317  # Let's start with an optimistic view of the world :-)
45318  FOUND_FREETYPE=yes
45319
45320  # First look for the canonical freetype main include file ft2build.h.
45321  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45322    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45323    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45324    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45325      # Fail.
45326      FOUND_FREETYPE=no
45327    fi
45328  fi
45329
45330  if test "x$FOUND_FREETYPE" = xyes; then
45331    # Include file found, let's continue the sanity check.
45332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45333$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45334
45335    # Reset to default value
45336    FREETYPE_BASE_NAME=freetype
45337    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45338    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45339      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45340          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45341        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45342        # for the .6 version explicitly.
45343        FREETYPE_BASE_NAME=freetype.6
45344        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45345        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45346$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45347      else
45348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45349$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45350        FOUND_FREETYPE=no
45351      fi
45352    else
45353      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45354        # On Windows, we will need both .lib and .dll file.
45355        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45356          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45358          FOUND_FREETYPE=no
45359        fi
45360      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45361          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45362        # Found lib in isa dir, use that instead.
45363        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45364        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45365$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45366      fi
45367    fi
45368  fi
45369
45370  if test "x$FOUND_FREETYPE" = xyes; then
45371
45372  # Only process if variable expands to non-empty
45373
45374  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45376
45377  # Input might be given as Windows format, start by converting to
45378  # unix format.
45379  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45380  new_path=`$CYGPATH -u "$path"`
45381
45382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45385  # "foo.exe" is OK but "foo" is an error.
45386  #
45387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45388  # It is also a way to make sure we got the proper file name for the real test later on.
45389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45390  if test "x$test_shortpath" = x; then
45391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45392$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45393    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45394  fi
45395
45396  # Call helper function which possibly converts this using DOS-style short mode.
45397  # If so, the updated path is stored in $new_path.
45398
45399  input_path="$new_path"
45400  # Check if we need to convert this using DOS-style short mode. If the path
45401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45402  # take no chances and rewrite it.
45403  # Note: m4 eats our [], so we need to use [ and ] instead.
45404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45405  if test "x$has_forbidden_chars" != x; then
45406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45410      # Going to short mode and back again did indeed matter. Since short mode is
45411      # case insensitive, let's make it lowercase to improve readability.
45412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45413      # Now convert it back to Unix-stile (cygpath)
45414      input_path=`$CYGPATH -u "$shortmode_path"`
45415      new_path="$input_path"
45416    fi
45417  fi
45418
45419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45420  if test "x$test_cygdrive_prefix" = x; then
45421    # As a simple fix, exclude /usr/bin since it's not a real path.
45422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45424      # a path prefixed by /cygdrive for fixpath to work.
45425      new_path="$CYGWIN_ROOT_PATH$input_path"
45426    fi
45427  fi
45428
45429
45430  if test "x$path" != "x$new_path"; then
45431    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45434  fi
45435
45436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45437
45438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45439  has_colon=`$ECHO $path | $GREP ^.:`
45440  new_path="$path"
45441  if test "x$has_colon" = x; then
45442    # Not in mixed or Windows style, start by that.
45443    new_path=`cmd //c echo $path`
45444  fi
45445
45446
45447  input_path="$new_path"
45448  # Check if we need to convert this using DOS-style short mode. If the path
45449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45450  # take no chances and rewrite it.
45451  # Note: m4 eats our [], so we need to use [ and ] instead.
45452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45453  if test "x$has_forbidden_chars" != x; then
45454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45456  fi
45457
45458
45459  windows_path="$new_path"
45460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45461    unix_path=`$CYGPATH -u "$windows_path"`
45462    new_path="$unix_path"
45463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45465    new_path="$unix_path"
45466  fi
45467
45468  if test "x$path" != "x$new_path"; then
45469    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45471$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45472  fi
45473
45474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45476
45477    else
45478      # We're on a unix platform. Hooray! :)
45479      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45480      has_space=`$ECHO "$path" | $GREP " "`
45481      if test "x$has_space" != x; then
45482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45483$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45485      fi
45486
45487      # Use eval to expand a potential ~
45488      eval path="$path"
45489      if test ! -f "$path" && test ! -d "$path"; then
45490        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45491      fi
45492
45493      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45494    fi
45495  fi
45496
45497
45498  # Only process if variable expands to non-empty
45499
45500  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45502
45503  # Input might be given as Windows format, start by converting to
45504  # unix format.
45505  path="$POTENTIAL_FREETYPE_LIB_PATH"
45506  new_path=`$CYGPATH -u "$path"`
45507
45508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45511  # "foo.exe" is OK but "foo" is an error.
45512  #
45513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45514  # It is also a way to make sure we got the proper file name for the real test later on.
45515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45516  if test "x$test_shortpath" = x; then
45517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45520  fi
45521
45522  # Call helper function which possibly converts this using DOS-style short mode.
45523  # If so, the updated path is stored in $new_path.
45524
45525  input_path="$new_path"
45526  # Check if we need to convert this using DOS-style short mode. If the path
45527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45528  # take no chances and rewrite it.
45529  # Note: m4 eats our [], so we need to use [ and ] instead.
45530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45531  if test "x$has_forbidden_chars" != x; then
45532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45536      # Going to short mode and back again did indeed matter. Since short mode is
45537      # case insensitive, let's make it lowercase to improve readability.
45538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45539      # Now convert it back to Unix-stile (cygpath)
45540      input_path=`$CYGPATH -u "$shortmode_path"`
45541      new_path="$input_path"
45542    fi
45543  fi
45544
45545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45546  if test "x$test_cygdrive_prefix" = x; then
45547    # As a simple fix, exclude /usr/bin since it's not a real path.
45548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45550      # a path prefixed by /cygdrive for fixpath to work.
45551      new_path="$CYGWIN_ROOT_PATH$input_path"
45552    fi
45553  fi
45554
45555
45556  if test "x$path" != "x$new_path"; then
45557    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45560  fi
45561
45562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45563
45564  path="$POTENTIAL_FREETYPE_LIB_PATH"
45565  has_colon=`$ECHO $path | $GREP ^.:`
45566  new_path="$path"
45567  if test "x$has_colon" = x; then
45568    # Not in mixed or Windows style, start by that.
45569    new_path=`cmd //c echo $path`
45570  fi
45571
45572
45573  input_path="$new_path"
45574  # Check if we need to convert this using DOS-style short mode. If the path
45575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45576  # take no chances and rewrite it.
45577  # Note: m4 eats our [], so we need to use [ and ] instead.
45578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45579  if test "x$has_forbidden_chars" != x; then
45580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45582  fi
45583
45584
45585  windows_path="$new_path"
45586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45587    unix_path=`$CYGPATH -u "$windows_path"`
45588    new_path="$unix_path"
45589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45591    new_path="$unix_path"
45592  fi
45593
45594  if test "x$path" != "x$new_path"; then
45595    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45598  fi
45599
45600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45602
45603    else
45604      # We're on a unix platform. Hooray! :)
45605      path="$POTENTIAL_FREETYPE_LIB_PATH"
45606      has_space=`$ECHO "$path" | $GREP " "`
45607      if test "x$has_space" != x; then
45608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45611      fi
45612
45613      # Use eval to expand a potential ~
45614      eval path="$path"
45615      if test ! -f "$path" && test ! -d "$path"; then
45616        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45617      fi
45618
45619      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45620    fi
45621  fi
45622
45623
45624    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45626$as_echo_n "checking for freetype includes... " >&6; }
45627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45628$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45629    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45631$as_echo_n "checking for freetype libraries... " >&6; }
45632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45633$as_echo "$FREETYPE_LIB_PATH" >&6; }
45634  fi
45635
45636        if test "x$FOUND_FREETYPE" != xyes; then
45637          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45638        fi
45639      else
45640        # User specified only one of lib or include. This is an error.
45641        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45642          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45643$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45644          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45645        else
45646          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45647$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45648          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45649        fi
45650      fi
45651    else
45652      # User did not specify settings, but we need freetype. Try to locate it.
45653
45654      if test "x$BUNDLE_FREETYPE" = x; then
45655        # If not specified, default is to bundle freetype only on windows
45656        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45657          BUNDLE_FREETYPE=yes
45658        else
45659          BUNDLE_FREETYPE=no
45660        fi
45661      fi
45662
45663      if test "x$FOUND_FREETYPE" != xyes; then
45664        # Check builddeps
45665
45666
45667  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45668    # Source the builddeps file again, to make sure it uses the latest variables!
45669    . $builddepsfile
45670    # Look for a target and build machine specific resource!
45671    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45672    if test "x$resource" = x; then
45673      # Ok, lets instead look for a target specific resource
45674      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45675    fi
45676    if test "x$resource" = x; then
45677      # Ok, lets instead look for a build specific resource
45678      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45679    fi
45680    if test "x$resource" = x; then
45681      # Ok, lets instead look for a generic resource
45682      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45683      resource=${builddep_freetype2}
45684    fi
45685    if test "x$resource" != x; then
45686      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45687$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45688      # If the resource in the builddeps.conf file is an existing directory,
45689      # for example /java/linux/cups
45690      if test -d ${resource}; then
45691        depdir=${resource}
45692      else
45693
45694  # freetype2 is for example mymodule
45695  # $resource is for example libs/general/libmymod_1_2_3.zip
45696  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45697  # $with_builddeps_dir is for example /localhome/builddeps
45698  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45699  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45700  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45701  filename=`basename $resource`
45702  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45703  filebase=${filename%%.*}
45704  extension=${filename#*.}
45705  installdir=$with_builddeps_dir/$filebase
45706  if test ! -f $installdir/$filename.unpacked; then
45707    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45708$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45709    if test ! -d $installdir; then
45710      mkdir -p $installdir
45711    fi
45712    if test ! -d $installdir; then
45713      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45714    fi
45715    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45716    touch $tmpfile
45717    if test ! -f $tmpfile; then
45718      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45719    fi
45720
45721  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45722  # $tmpfile is the local file name for the downloaded file.
45723  VALID_TOOL=no
45724  if test "x$BDEPS_FTP" = xwget; then
45725    VALID_TOOL=yes
45726    wget -O $tmpfile $with_builddeps_server/$resource
45727  fi
45728  if test "x$BDEPS_FTP" = xlftp; then
45729    VALID_TOOL=yes
45730    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45731  fi
45732  if test "x$BDEPS_FTP" = xftp; then
45733    VALID_TOOL=yes
45734    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45735    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45736    FTPUSERPWD=${FTPSERVER%%@*}
45737    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45738      FTPUSER=${userpwd%%:*}
45739      FTPPWD=${userpwd#*@}
45740      FTPSERVER=${FTPSERVER#*@}
45741    else
45742      FTPUSER=ftp
45743      FTPPWD=ftp
45744    fi
45745    # the "pass" command does not work on some
45746    # ftp clients (read ftp.exe) but if it works,
45747    # passive mode is better!
45748    ( \
45749        echo "user $FTPUSER $FTPPWD"        ; \
45750        echo "pass"                         ; \
45751        echo "bin"                          ; \
45752        echo "get $FTPPATH $tmpfile"              ; \
45753    ) | ftp -in $FTPSERVER
45754  fi
45755  if test "x$VALID_TOOL" != xyes; then
45756    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45757  fi
45758
45759    mv $tmpfile $installdir/$filename
45760    if test ! -s $installdir/$filename; then
45761      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45762    fi
45763    case "$extension" in
45764      zip)  echo "Unzipping $installdir/$filename..."
45765        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45766        ;;
45767      tar.gz) echo "Untaring $installdir/$filename..."
45768        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45769        ;;
45770      tgz) echo "Untaring $installdir/$filename..."
45771        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45772        ;;
45773      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45774        ;;
45775    esac
45776  fi
45777  if test -f $installdir/$filename.unpacked; then
45778    depdir=$installdir
45779  fi
45780
45781      fi
45782      # Source the builddeps file again, because in the previous command, the depdir
45783      # was updated to point at the current build dependency install directory.
45784      . $builddepsfile
45785      # Now extract variables from the builddeps.conf files.
45786      theroot=${builddep_freetype2_ROOT}
45787      thecflags=${builddep_freetype2_CFLAGS}
45788      thelibs=${builddep_freetype2_LIBS}
45789      if test "x$depdir" = x; then
45790        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45791      fi
45792      FREETYPE=$depdir
45793      if test "x$theroot" != x; then
45794        FREETYPE="$theroot"
45795      fi
45796      if test "x$thecflags" != x; then
45797        FREETYPE_CFLAGS="$thecflags"
45798      fi
45799      if test "x$thelibs" != x; then
45800        FREETYPE_LIBS="$thelibs"
45801      fi
45802      FOUND_FREETYPE=yes
45803      else FOUND_FREETYPE=no
45804
45805    fi
45806    else FOUND_FREETYPE=no
45807
45808  fi
45809
45810        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45811        if test "x$FOUND_FREETYPE" = xyes; then
45812          if test "x$BUNDLE_FREETYPE" = xyes; then
45813            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45814$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45815            FOUND_FREETYPE=no
45816          else
45817            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45818$as_echo_n "checking for freetype... " >&6; }
45819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45820$as_echo "yes (using builddeps)" >&6; }
45821          fi
45822        fi
45823      fi
45824
45825      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45826      if test "x$SYSROOT" = x; then
45827        if test "x$FOUND_FREETYPE" != xyes; then
45828          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45829          if test "x$PKG_CONFIG" != x; then
45830
45831pkg_failed=no
45832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45833$as_echo_n "checking for FREETYPE... " >&6; }
45834
45835if test -n "$FREETYPE_CFLAGS"; then
45836    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45837 elif test -n "$PKG_CONFIG"; then
45838    if test -n "$PKG_CONFIG" && \
45839    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45840  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45841  ac_status=$?
45842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45843  test $ac_status = 0; }; then
45844  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45845else
45846  pkg_failed=yes
45847fi
45848 else
45849    pkg_failed=untried
45850fi
45851if test -n "$FREETYPE_LIBS"; then
45852    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45853 elif test -n "$PKG_CONFIG"; then
45854    if test -n "$PKG_CONFIG" && \
45855    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45856  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45857  ac_status=$?
45858  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45859  test $ac_status = 0; }; then
45860  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45861else
45862  pkg_failed=yes
45863fi
45864 else
45865    pkg_failed=untried
45866fi
45867
45868
45869
45870if test $pkg_failed = yes; then
45871
45872if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45873        _pkg_short_errors_supported=yes
45874else
45875        _pkg_short_errors_supported=no
45876fi
45877        if test $_pkg_short_errors_supported = yes; then
45878	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45879        else
45880	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45881        fi
45882	# Put the nasty error message in config.log where it belongs
45883	echo "$FREETYPE_PKG_ERRORS" >&5
45884
45885	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45886$as_echo "no" >&6; }
45887                FOUND_FREETYPE=no
45888elif test $pkg_failed = untried; then
45889	FOUND_FREETYPE=no
45890else
45891	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45892	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45894$as_echo "yes" >&6; }
45895	FOUND_FREETYPE=yes
45896fi
45897            if test "x$FOUND_FREETYPE" = xyes; then
45898              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45899              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45900              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45901              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45902                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45903              fi
45904              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45905              if test "x$BUNDLE_FREETYPE" = xyes; then
45906                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45907$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45908                FOUND_FREETYPE=no
45909              else
45910                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45911$as_echo_n "checking for freetype... " >&6; }
45912                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45913$as_echo "yes (using pkg-config)" >&6; }
45914              fi
45915            fi
45916          fi
45917        fi
45918      fi
45919
45920      if test "x$FOUND_FREETYPE" != xyes; then
45921        # Check in well-known locations
45922        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45923          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45924
45925  windows_path="$FREETYPE_BASE_DIR"
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927    unix_path=`$CYGPATH -u "$windows_path"`
45928    FREETYPE_BASE_DIR="$unix_path"
45929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45931    FREETYPE_BASE_DIR="$unix_path"
45932  fi
45933
45934
45935  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45936  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45937  METHOD="well-known location"
45938
45939  # Let's start with an optimistic view of the world :-)
45940  FOUND_FREETYPE=yes
45941
45942  # First look for the canonical freetype main include file ft2build.h.
45943  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45944    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45945    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45946    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45947      # Fail.
45948      FOUND_FREETYPE=no
45949    fi
45950  fi
45951
45952  if test "x$FOUND_FREETYPE" = xyes; then
45953    # Include file found, let's continue the sanity check.
45954    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45955$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45956
45957    # Reset to default value
45958    FREETYPE_BASE_NAME=freetype
45959    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45960    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45961      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45962          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45963        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45964        # for the .6 version explicitly.
45965        FREETYPE_BASE_NAME=freetype.6
45966        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45967        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45968$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45969      else
45970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45971$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45972        FOUND_FREETYPE=no
45973      fi
45974    else
45975      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45976        # On Windows, we will need both .lib and .dll file.
45977        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45978          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45980          FOUND_FREETYPE=no
45981        fi
45982      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45983          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45984        # Found lib in isa dir, use that instead.
45985        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45986        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45987$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45988      fi
45989    fi
45990  fi
45991
45992  if test "x$FOUND_FREETYPE" = xyes; then
45993
45994  # Only process if variable expands to non-empty
45995
45996  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45998
45999  # Input might be given as Windows format, start by converting to
46000  # unix format.
46001  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46002  new_path=`$CYGPATH -u "$path"`
46003
46004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46007  # "foo.exe" is OK but "foo" is an error.
46008  #
46009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46010  # It is also a way to make sure we got the proper file name for the real test later on.
46011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46012  if test "x$test_shortpath" = x; then
46013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46015    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46016  fi
46017
46018  # Call helper function which possibly converts this using DOS-style short mode.
46019  # If so, the updated path is stored in $new_path.
46020
46021  input_path="$new_path"
46022  # Check if we need to convert this using DOS-style short mode. If the path
46023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46024  # take no chances and rewrite it.
46025  # Note: m4 eats our [], so we need to use [ and ] instead.
46026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46027  if test "x$has_forbidden_chars" != x; then
46028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46032      # Going to short mode and back again did indeed matter. Since short mode is
46033      # case insensitive, let's make it lowercase to improve readability.
46034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46035      # Now convert it back to Unix-stile (cygpath)
46036      input_path=`$CYGPATH -u "$shortmode_path"`
46037      new_path="$input_path"
46038    fi
46039  fi
46040
46041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46042  if test "x$test_cygdrive_prefix" = x; then
46043    # As a simple fix, exclude /usr/bin since it's not a real path.
46044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46046      # a path prefixed by /cygdrive for fixpath to work.
46047      new_path="$CYGWIN_ROOT_PATH$input_path"
46048    fi
46049  fi
46050
46051
46052  if test "x$path" != "x$new_path"; then
46053    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46056  fi
46057
46058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46059
46060  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46061  has_colon=`$ECHO $path | $GREP ^.:`
46062  new_path="$path"
46063  if test "x$has_colon" = x; then
46064    # Not in mixed or Windows style, start by that.
46065    new_path=`cmd //c echo $path`
46066  fi
46067
46068
46069  input_path="$new_path"
46070  # Check if we need to convert this using DOS-style short mode. If the path
46071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46072  # take no chances and rewrite it.
46073  # Note: m4 eats our [], so we need to use [ and ] instead.
46074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46075  if test "x$has_forbidden_chars" != x; then
46076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46078  fi
46079
46080
46081  windows_path="$new_path"
46082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46083    unix_path=`$CYGPATH -u "$windows_path"`
46084    new_path="$unix_path"
46085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46087    new_path="$unix_path"
46088  fi
46089
46090  if test "x$path" != "x$new_path"; then
46091    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46093$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46094  fi
46095
46096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46098
46099    else
46100      # We're on a unix platform. Hooray! :)
46101      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46102      has_space=`$ECHO "$path" | $GREP " "`
46103      if test "x$has_space" != x; then
46104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46107      fi
46108
46109      # Use eval to expand a potential ~
46110      eval path="$path"
46111      if test ! -f "$path" && test ! -d "$path"; then
46112        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46113      fi
46114
46115      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46116    fi
46117  fi
46118
46119
46120  # Only process if variable expands to non-empty
46121
46122  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46124
46125  # Input might be given as Windows format, start by converting to
46126  # unix format.
46127  path="$POTENTIAL_FREETYPE_LIB_PATH"
46128  new_path=`$CYGPATH -u "$path"`
46129
46130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46133  # "foo.exe" is OK but "foo" is an error.
46134  #
46135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46136  # It is also a way to make sure we got the proper file name for the real test later on.
46137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46138  if test "x$test_shortpath" = x; then
46139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46141    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46142  fi
46143
46144  # Call helper function which possibly converts this using DOS-style short mode.
46145  # If so, the updated path is stored in $new_path.
46146
46147  input_path="$new_path"
46148  # Check if we need to convert this using DOS-style short mode. If the path
46149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46150  # take no chances and rewrite it.
46151  # Note: m4 eats our [], so we need to use [ and ] instead.
46152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46153  if test "x$has_forbidden_chars" != x; then
46154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46158      # Going to short mode and back again did indeed matter. Since short mode is
46159      # case insensitive, let's make it lowercase to improve readability.
46160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46161      # Now convert it back to Unix-stile (cygpath)
46162      input_path=`$CYGPATH -u "$shortmode_path"`
46163      new_path="$input_path"
46164    fi
46165  fi
46166
46167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46168  if test "x$test_cygdrive_prefix" = x; then
46169    # As a simple fix, exclude /usr/bin since it's not a real path.
46170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46172      # a path prefixed by /cygdrive for fixpath to work.
46173      new_path="$CYGWIN_ROOT_PATH$input_path"
46174    fi
46175  fi
46176
46177
46178  if test "x$path" != "x$new_path"; then
46179    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46181$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46182  fi
46183
46184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46185
46186  path="$POTENTIAL_FREETYPE_LIB_PATH"
46187  has_colon=`$ECHO $path | $GREP ^.:`
46188  new_path="$path"
46189  if test "x$has_colon" = x; then
46190    # Not in mixed or Windows style, start by that.
46191    new_path=`cmd //c echo $path`
46192  fi
46193
46194
46195  input_path="$new_path"
46196  # Check if we need to convert this using DOS-style short mode. If the path
46197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46198  # take no chances and rewrite it.
46199  # Note: m4 eats our [], so we need to use [ and ] instead.
46200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46201  if test "x$has_forbidden_chars" != x; then
46202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46204  fi
46205
46206
46207  windows_path="$new_path"
46208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46209    unix_path=`$CYGPATH -u "$windows_path"`
46210    new_path="$unix_path"
46211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46213    new_path="$unix_path"
46214  fi
46215
46216  if test "x$path" != "x$new_path"; then
46217    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46220  fi
46221
46222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46224
46225    else
46226      # We're on a unix platform. Hooray! :)
46227      path="$POTENTIAL_FREETYPE_LIB_PATH"
46228      has_space=`$ECHO "$path" | $GREP " "`
46229      if test "x$has_space" != x; then
46230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46233      fi
46234
46235      # Use eval to expand a potential ~
46236      eval path="$path"
46237      if test ! -f "$path" && test ! -d "$path"; then
46238        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46239      fi
46240
46241      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46242    fi
46243  fi
46244
46245
46246    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46248$as_echo_n "checking for freetype includes... " >&6; }
46249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46250$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46251    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46253$as_echo_n "checking for freetype libraries... " >&6; }
46254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46255$as_echo "$FREETYPE_LIB_PATH" >&6; }
46256  fi
46257
46258          if test "x$FOUND_FREETYPE" != xyes; then
46259            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46260
46261  windows_path="$FREETYPE_BASE_DIR"
46262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46263    unix_path=`$CYGPATH -u "$windows_path"`
46264    FREETYPE_BASE_DIR="$unix_path"
46265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46267    FREETYPE_BASE_DIR="$unix_path"
46268  fi
46269
46270
46271  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46272  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46273  METHOD="well-known location"
46274
46275  # Let's start with an optimistic view of the world :-)
46276  FOUND_FREETYPE=yes
46277
46278  # First look for the canonical freetype main include file ft2build.h.
46279  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46280    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46281    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46282    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46283      # Fail.
46284      FOUND_FREETYPE=no
46285    fi
46286  fi
46287
46288  if test "x$FOUND_FREETYPE" = xyes; then
46289    # Include file found, let's continue the sanity check.
46290    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46291$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46292
46293    # Reset to default value
46294    FREETYPE_BASE_NAME=freetype
46295    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46296    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46297      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46298          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46299        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46300        # for the .6 version explicitly.
46301        FREETYPE_BASE_NAME=freetype.6
46302        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46303        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46304$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46305      else
46306        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46307$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46308        FOUND_FREETYPE=no
46309      fi
46310    else
46311      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46312        # On Windows, we will need both .lib and .dll file.
46313        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46314          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46315$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46316          FOUND_FREETYPE=no
46317        fi
46318      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46319          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46320        # Found lib in isa dir, use that instead.
46321        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46322        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46323$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46324      fi
46325    fi
46326  fi
46327
46328  if test "x$FOUND_FREETYPE" = xyes; then
46329
46330  # Only process if variable expands to non-empty
46331
46332  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334
46335  # Input might be given as Windows format, start by converting to
46336  # unix format.
46337  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46338  new_path=`$CYGPATH -u "$path"`
46339
46340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46343  # "foo.exe" is OK but "foo" is an error.
46344  #
46345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46346  # It is also a way to make sure we got the proper file name for the real test later on.
46347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46348  if test "x$test_shortpath" = x; then
46349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46351    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46352  fi
46353
46354  # Call helper function which possibly converts this using DOS-style short mode.
46355  # If so, the updated path is stored in $new_path.
46356
46357  input_path="$new_path"
46358  # Check if we need to convert this using DOS-style short mode. If the path
46359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46360  # take no chances and rewrite it.
46361  # Note: m4 eats our [], so we need to use [ and ] instead.
46362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46363  if test "x$has_forbidden_chars" != x; then
46364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46368      # Going to short mode and back again did indeed matter. Since short mode is
46369      # case insensitive, let's make it lowercase to improve readability.
46370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46371      # Now convert it back to Unix-stile (cygpath)
46372      input_path=`$CYGPATH -u "$shortmode_path"`
46373      new_path="$input_path"
46374    fi
46375  fi
46376
46377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46378  if test "x$test_cygdrive_prefix" = x; then
46379    # As a simple fix, exclude /usr/bin since it's not a real path.
46380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46382      # a path prefixed by /cygdrive for fixpath to work.
46383      new_path="$CYGWIN_ROOT_PATH$input_path"
46384    fi
46385  fi
46386
46387
46388  if test "x$path" != "x$new_path"; then
46389    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46392  fi
46393
46394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395
46396  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46397  has_colon=`$ECHO $path | $GREP ^.:`
46398  new_path="$path"
46399  if test "x$has_colon" = x; then
46400    # Not in mixed or Windows style, start by that.
46401    new_path=`cmd //c echo $path`
46402  fi
46403
46404
46405  input_path="$new_path"
46406  # Check if we need to convert this using DOS-style short mode. If the path
46407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46408  # take no chances and rewrite it.
46409  # Note: m4 eats our [], so we need to use [ and ] instead.
46410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46411  if test "x$has_forbidden_chars" != x; then
46412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46414  fi
46415
46416
46417  windows_path="$new_path"
46418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46419    unix_path=`$CYGPATH -u "$windows_path"`
46420    new_path="$unix_path"
46421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46423    new_path="$unix_path"
46424  fi
46425
46426  if test "x$path" != "x$new_path"; then
46427    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46430  fi
46431
46432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46434
46435    else
46436      # We're on a unix platform. Hooray! :)
46437      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46438      has_space=`$ECHO "$path" | $GREP " "`
46439      if test "x$has_space" != x; then
46440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46443      fi
46444
46445      # Use eval to expand a potential ~
46446      eval path="$path"
46447      if test ! -f "$path" && test ! -d "$path"; then
46448        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46449      fi
46450
46451      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46452    fi
46453  fi
46454
46455
46456  # Only process if variable expands to non-empty
46457
46458  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46460
46461  # Input might be given as Windows format, start by converting to
46462  # unix format.
46463  path="$POTENTIAL_FREETYPE_LIB_PATH"
46464  new_path=`$CYGPATH -u "$path"`
46465
46466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46469  # "foo.exe" is OK but "foo" is an error.
46470  #
46471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46472  # It is also a way to make sure we got the proper file name for the real test later on.
46473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46474  if test "x$test_shortpath" = x; then
46475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46477    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46478  fi
46479
46480  # Call helper function which possibly converts this using DOS-style short mode.
46481  # If so, the updated path is stored in $new_path.
46482
46483  input_path="$new_path"
46484  # Check if we need to convert this using DOS-style short mode. If the path
46485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46486  # take no chances and rewrite it.
46487  # Note: m4 eats our [], so we need to use [ and ] instead.
46488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46489  if test "x$has_forbidden_chars" != x; then
46490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46494      # Going to short mode and back again did indeed matter. Since short mode is
46495      # case insensitive, let's make it lowercase to improve readability.
46496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46497      # Now convert it back to Unix-stile (cygpath)
46498      input_path=`$CYGPATH -u "$shortmode_path"`
46499      new_path="$input_path"
46500    fi
46501  fi
46502
46503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46504  if test "x$test_cygdrive_prefix" = x; then
46505    # As a simple fix, exclude /usr/bin since it's not a real path.
46506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46508      # a path prefixed by /cygdrive for fixpath to work.
46509      new_path="$CYGWIN_ROOT_PATH$input_path"
46510    fi
46511  fi
46512
46513
46514  if test "x$path" != "x$new_path"; then
46515    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46518  fi
46519
46520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46521
46522  path="$POTENTIAL_FREETYPE_LIB_PATH"
46523  has_colon=`$ECHO $path | $GREP ^.:`
46524  new_path="$path"
46525  if test "x$has_colon" = x; then
46526    # Not in mixed or Windows style, start by that.
46527    new_path=`cmd //c echo $path`
46528  fi
46529
46530
46531  input_path="$new_path"
46532  # Check if we need to convert this using DOS-style short mode. If the path
46533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46534  # take no chances and rewrite it.
46535  # Note: m4 eats our [], so we need to use [ and ] instead.
46536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46537  if test "x$has_forbidden_chars" != x; then
46538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46540  fi
46541
46542
46543  windows_path="$new_path"
46544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46545    unix_path=`$CYGPATH -u "$windows_path"`
46546    new_path="$unix_path"
46547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46549    new_path="$unix_path"
46550  fi
46551
46552  if test "x$path" != "x$new_path"; then
46553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46556  fi
46557
46558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46560
46561    else
46562      # We're on a unix platform. Hooray! :)
46563      path="$POTENTIAL_FREETYPE_LIB_PATH"
46564      has_space=`$ECHO "$path" | $GREP " "`
46565      if test "x$has_space" != x; then
46566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46567$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46569      fi
46570
46571      # Use eval to expand a potential ~
46572      eval path="$path"
46573      if test ! -f "$path" && test ! -d "$path"; then
46574        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46575      fi
46576
46577      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46578    fi
46579  fi
46580
46581
46582    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46584$as_echo_n "checking for freetype includes... " >&6; }
46585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46586$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46587    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46589$as_echo_n "checking for freetype libraries... " >&6; }
46590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46591$as_echo "$FREETYPE_LIB_PATH" >&6; }
46592  fi
46593
46594          fi
46595        else
46596          FREETYPE_BASE_DIR="$SYSROOT/usr"
46597
46598  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46599  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46600  METHOD="well-known location"
46601
46602  # Let's start with an optimistic view of the world :-)
46603  FOUND_FREETYPE=yes
46604
46605  # First look for the canonical freetype main include file ft2build.h.
46606  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46607    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46608    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46609    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46610      # Fail.
46611      FOUND_FREETYPE=no
46612    fi
46613  fi
46614
46615  if test "x$FOUND_FREETYPE" = xyes; then
46616    # Include file found, let's continue the sanity check.
46617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46618$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46619
46620    # Reset to default value
46621    FREETYPE_BASE_NAME=freetype
46622    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46623    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46624      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46625          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46626        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46627        # for the .6 version explicitly.
46628        FREETYPE_BASE_NAME=freetype.6
46629        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46630        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46631$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46632      else
46633        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46634$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46635        FOUND_FREETYPE=no
46636      fi
46637    else
46638      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46639        # On Windows, we will need both .lib and .dll file.
46640        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46643          FOUND_FREETYPE=no
46644        fi
46645      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46647        # Found lib in isa dir, use that instead.
46648        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46649        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46650$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46651      fi
46652    fi
46653  fi
46654
46655  if test "x$FOUND_FREETYPE" = xyes; then
46656
46657  # Only process if variable expands to non-empty
46658
46659  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46661
46662  # Input might be given as Windows format, start by converting to
46663  # unix format.
46664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46665  new_path=`$CYGPATH -u "$path"`
46666
46667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46670  # "foo.exe" is OK but "foo" is an error.
46671  #
46672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46673  # It is also a way to make sure we got the proper file name for the real test later on.
46674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46675  if test "x$test_shortpath" = x; then
46676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46678    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46679  fi
46680
46681  # Call helper function which possibly converts this using DOS-style short mode.
46682  # If so, the updated path is stored in $new_path.
46683
46684  input_path="$new_path"
46685  # Check if we need to convert this using DOS-style short mode. If the path
46686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46687  # take no chances and rewrite it.
46688  # Note: m4 eats our [], so we need to use [ and ] instead.
46689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46690  if test "x$has_forbidden_chars" != x; then
46691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46695      # Going to short mode and back again did indeed matter. Since short mode is
46696      # case insensitive, let's make it lowercase to improve readability.
46697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46698      # Now convert it back to Unix-stile (cygpath)
46699      input_path=`$CYGPATH -u "$shortmode_path"`
46700      new_path="$input_path"
46701    fi
46702  fi
46703
46704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46705  if test "x$test_cygdrive_prefix" = x; then
46706    # As a simple fix, exclude /usr/bin since it's not a real path.
46707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46709      # a path prefixed by /cygdrive for fixpath to work.
46710      new_path="$CYGWIN_ROOT_PATH$input_path"
46711    fi
46712  fi
46713
46714
46715  if test "x$path" != "x$new_path"; then
46716    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46719  fi
46720
46721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46722
46723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46724  has_colon=`$ECHO $path | $GREP ^.:`
46725  new_path="$path"
46726  if test "x$has_colon" = x; then
46727    # Not in mixed or Windows style, start by that.
46728    new_path=`cmd //c echo $path`
46729  fi
46730
46731
46732  input_path="$new_path"
46733  # Check if we need to convert this using DOS-style short mode. If the path
46734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46735  # take no chances and rewrite it.
46736  # Note: m4 eats our [], so we need to use [ and ] instead.
46737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46738  if test "x$has_forbidden_chars" != x; then
46739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46741  fi
46742
46743
46744  windows_path="$new_path"
46745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46746    unix_path=`$CYGPATH -u "$windows_path"`
46747    new_path="$unix_path"
46748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46750    new_path="$unix_path"
46751  fi
46752
46753  if test "x$path" != "x$new_path"; then
46754    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46757  fi
46758
46759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46761
46762    else
46763      # We're on a unix platform. Hooray! :)
46764      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46765      has_space=`$ECHO "$path" | $GREP " "`
46766      if test "x$has_space" != x; then
46767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46770      fi
46771
46772      # Use eval to expand a potential ~
46773      eval path="$path"
46774      if test ! -f "$path" && test ! -d "$path"; then
46775        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46776      fi
46777
46778      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46779    fi
46780  fi
46781
46782
46783  # Only process if variable expands to non-empty
46784
46785  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46787
46788  # Input might be given as Windows format, start by converting to
46789  # unix format.
46790  path="$POTENTIAL_FREETYPE_LIB_PATH"
46791  new_path=`$CYGPATH -u "$path"`
46792
46793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46796  # "foo.exe" is OK but "foo" is an error.
46797  #
46798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46799  # It is also a way to make sure we got the proper file name for the real test later on.
46800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46801  if test "x$test_shortpath" = x; then
46802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46804    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46805  fi
46806
46807  # Call helper function which possibly converts this using DOS-style short mode.
46808  # If so, the updated path is stored in $new_path.
46809
46810  input_path="$new_path"
46811  # Check if we need to convert this using DOS-style short mode. If the path
46812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46813  # take no chances and rewrite it.
46814  # Note: m4 eats our [], so we need to use [ and ] instead.
46815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46816  if test "x$has_forbidden_chars" != x; then
46817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46821      # Going to short mode and back again did indeed matter. Since short mode is
46822      # case insensitive, let's make it lowercase to improve readability.
46823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46824      # Now convert it back to Unix-stile (cygpath)
46825      input_path=`$CYGPATH -u "$shortmode_path"`
46826      new_path="$input_path"
46827    fi
46828  fi
46829
46830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46831  if test "x$test_cygdrive_prefix" = x; then
46832    # As a simple fix, exclude /usr/bin since it's not a real path.
46833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46835      # a path prefixed by /cygdrive for fixpath to work.
46836      new_path="$CYGWIN_ROOT_PATH$input_path"
46837    fi
46838  fi
46839
46840
46841  if test "x$path" != "x$new_path"; then
46842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46845  fi
46846
46847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46848
46849  path="$POTENTIAL_FREETYPE_LIB_PATH"
46850  has_colon=`$ECHO $path | $GREP ^.:`
46851  new_path="$path"
46852  if test "x$has_colon" = x; then
46853    # Not in mixed or Windows style, start by that.
46854    new_path=`cmd //c echo $path`
46855  fi
46856
46857
46858  input_path="$new_path"
46859  # Check if we need to convert this using DOS-style short mode. If the path
46860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46861  # take no chances and rewrite it.
46862  # Note: m4 eats our [], so we need to use [ and ] instead.
46863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46864  if test "x$has_forbidden_chars" != x; then
46865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46867  fi
46868
46869
46870  windows_path="$new_path"
46871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46872    unix_path=`$CYGPATH -u "$windows_path"`
46873    new_path="$unix_path"
46874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46876    new_path="$unix_path"
46877  fi
46878
46879  if test "x$path" != "x$new_path"; then
46880    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46883  fi
46884
46885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46887
46888    else
46889      # We're on a unix platform. Hooray! :)
46890      path="$POTENTIAL_FREETYPE_LIB_PATH"
46891      has_space=`$ECHO "$path" | $GREP " "`
46892      if test "x$has_space" != x; then
46893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46896      fi
46897
46898      # Use eval to expand a potential ~
46899      eval path="$path"
46900      if test ! -f "$path" && test ! -d "$path"; then
46901        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46902      fi
46903
46904      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46905    fi
46906  fi
46907
46908
46909    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46911$as_echo_n "checking for freetype includes... " >&6; }
46912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46913$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46914    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46916$as_echo_n "checking for freetype libraries... " >&6; }
46917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46918$as_echo "$FREETYPE_LIB_PATH" >&6; }
46919  fi
46920
46921
46922          if test "x$FOUND_FREETYPE" != xyes; then
46923            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46924
46925  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46926  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46927  METHOD="well-known location"
46928
46929  # Let's start with an optimistic view of the world :-)
46930  FOUND_FREETYPE=yes
46931
46932  # First look for the canonical freetype main include file ft2build.h.
46933  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46934    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46935    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46936    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46937      # Fail.
46938      FOUND_FREETYPE=no
46939    fi
46940  fi
46941
46942  if test "x$FOUND_FREETYPE" = xyes; then
46943    # Include file found, let's continue the sanity check.
46944    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46945$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46946
46947    # Reset to default value
46948    FREETYPE_BASE_NAME=freetype
46949    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46950    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46951      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46952          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46953        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46954        # for the .6 version explicitly.
46955        FREETYPE_BASE_NAME=freetype.6
46956        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46957        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46958$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46959      else
46960        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46961$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46962        FOUND_FREETYPE=no
46963      fi
46964    else
46965      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46966        # On Windows, we will need both .lib and .dll file.
46967        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46968          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46969$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46970          FOUND_FREETYPE=no
46971        fi
46972      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46973          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46974        # Found lib in isa dir, use that instead.
46975        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46976        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46977$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46978      fi
46979    fi
46980  fi
46981
46982  if test "x$FOUND_FREETYPE" = xyes; then
46983
46984  # Only process if variable expands to non-empty
46985
46986  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46988
46989  # Input might be given as Windows format, start by converting to
46990  # unix format.
46991  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46992  new_path=`$CYGPATH -u "$path"`
46993
46994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46997  # "foo.exe" is OK but "foo" is an error.
46998  #
46999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47000  # It is also a way to make sure we got the proper file name for the real test later on.
47001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47002  if test "x$test_shortpath" = x; then
47003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47005    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47006  fi
47007
47008  # Call helper function which possibly converts this using DOS-style short mode.
47009  # If so, the updated path is stored in $new_path.
47010
47011  input_path="$new_path"
47012  # Check if we need to convert this using DOS-style short mode. If the path
47013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47014  # take no chances and rewrite it.
47015  # Note: m4 eats our [], so we need to use [ and ] instead.
47016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47017  if test "x$has_forbidden_chars" != x; then
47018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47022      # Going to short mode and back again did indeed matter. Since short mode is
47023      # case insensitive, let's make it lowercase to improve readability.
47024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47025      # Now convert it back to Unix-stile (cygpath)
47026      input_path=`$CYGPATH -u "$shortmode_path"`
47027      new_path="$input_path"
47028    fi
47029  fi
47030
47031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47032  if test "x$test_cygdrive_prefix" = x; then
47033    # As a simple fix, exclude /usr/bin since it's not a real path.
47034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47036      # a path prefixed by /cygdrive for fixpath to work.
47037      new_path="$CYGWIN_ROOT_PATH$input_path"
47038    fi
47039  fi
47040
47041
47042  if test "x$path" != "x$new_path"; then
47043    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47046  fi
47047
47048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47049
47050  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47051  has_colon=`$ECHO $path | $GREP ^.:`
47052  new_path="$path"
47053  if test "x$has_colon" = x; then
47054    # Not in mixed or Windows style, start by that.
47055    new_path=`cmd //c echo $path`
47056  fi
47057
47058
47059  input_path="$new_path"
47060  # Check if we need to convert this using DOS-style short mode. If the path
47061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47062  # take no chances and rewrite it.
47063  # Note: m4 eats our [], so we need to use [ and ] instead.
47064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47065  if test "x$has_forbidden_chars" != x; then
47066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47068  fi
47069
47070
47071  windows_path="$new_path"
47072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47073    unix_path=`$CYGPATH -u "$windows_path"`
47074    new_path="$unix_path"
47075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47077    new_path="$unix_path"
47078  fi
47079
47080  if test "x$path" != "x$new_path"; then
47081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47084  fi
47085
47086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47088
47089    else
47090      # We're on a unix platform. Hooray! :)
47091      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47092      has_space=`$ECHO "$path" | $GREP " "`
47093      if test "x$has_space" != x; then
47094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47097      fi
47098
47099      # Use eval to expand a potential ~
47100      eval path="$path"
47101      if test ! -f "$path" && test ! -d "$path"; then
47102        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47103      fi
47104
47105      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47106    fi
47107  fi
47108
47109
47110  # Only process if variable expands to non-empty
47111
47112  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47114
47115  # Input might be given as Windows format, start by converting to
47116  # unix format.
47117  path="$POTENTIAL_FREETYPE_LIB_PATH"
47118  new_path=`$CYGPATH -u "$path"`
47119
47120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47123  # "foo.exe" is OK but "foo" is an error.
47124  #
47125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47126  # It is also a way to make sure we got the proper file name for the real test later on.
47127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47128  if test "x$test_shortpath" = x; then
47129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47131    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47132  fi
47133
47134  # Call helper function which possibly converts this using DOS-style short mode.
47135  # If so, the updated path is stored in $new_path.
47136
47137  input_path="$new_path"
47138  # Check if we need to convert this using DOS-style short mode. If the path
47139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47140  # take no chances and rewrite it.
47141  # Note: m4 eats our [], so we need to use [ and ] instead.
47142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47143  if test "x$has_forbidden_chars" != x; then
47144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47148      # Going to short mode and back again did indeed matter. Since short mode is
47149      # case insensitive, let's make it lowercase to improve readability.
47150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47151      # Now convert it back to Unix-stile (cygpath)
47152      input_path=`$CYGPATH -u "$shortmode_path"`
47153      new_path="$input_path"
47154    fi
47155  fi
47156
47157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47158  if test "x$test_cygdrive_prefix" = x; then
47159    # As a simple fix, exclude /usr/bin since it's not a real path.
47160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47162      # a path prefixed by /cygdrive for fixpath to work.
47163      new_path="$CYGWIN_ROOT_PATH$input_path"
47164    fi
47165  fi
47166
47167
47168  if test "x$path" != "x$new_path"; then
47169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47172  fi
47173
47174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47175
47176  path="$POTENTIAL_FREETYPE_LIB_PATH"
47177  has_colon=`$ECHO $path | $GREP ^.:`
47178  new_path="$path"
47179  if test "x$has_colon" = x; then
47180    # Not in mixed or Windows style, start by that.
47181    new_path=`cmd //c echo $path`
47182  fi
47183
47184
47185  input_path="$new_path"
47186  # Check if we need to convert this using DOS-style short mode. If the path
47187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47188  # take no chances and rewrite it.
47189  # Note: m4 eats our [], so we need to use [ and ] instead.
47190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47191  if test "x$has_forbidden_chars" != x; then
47192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47194  fi
47195
47196
47197  windows_path="$new_path"
47198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47199    unix_path=`$CYGPATH -u "$windows_path"`
47200    new_path="$unix_path"
47201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47203    new_path="$unix_path"
47204  fi
47205
47206  if test "x$path" != "x$new_path"; then
47207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47210  fi
47211
47212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47214
47215    else
47216      # We're on a unix platform. Hooray! :)
47217      path="$POTENTIAL_FREETYPE_LIB_PATH"
47218      has_space=`$ECHO "$path" | $GREP " "`
47219      if test "x$has_space" != x; then
47220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47223      fi
47224
47225      # Use eval to expand a potential ~
47226      eval path="$path"
47227      if test ! -f "$path" && test ! -d "$path"; then
47228        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47229      fi
47230
47231      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47232    fi
47233  fi
47234
47235
47236    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47238$as_echo_n "checking for freetype includes... " >&6; }
47239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47240$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47241    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47243$as_echo_n "checking for freetype libraries... " >&6; }
47244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47245$as_echo "$FREETYPE_LIB_PATH" >&6; }
47246  fi
47247
47248          fi
47249
47250          if test "x$FOUND_FREETYPE" != xyes; then
47251            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47252
47253  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47254  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47255  METHOD="well-known location"
47256
47257  # Let's start with an optimistic view of the world :-)
47258  FOUND_FREETYPE=yes
47259
47260  # First look for the canonical freetype main include file ft2build.h.
47261  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47262    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47263    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47264    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47265      # Fail.
47266      FOUND_FREETYPE=no
47267    fi
47268  fi
47269
47270  if test "x$FOUND_FREETYPE" = xyes; then
47271    # Include file found, let's continue the sanity check.
47272    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47273$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47274
47275    # Reset to default value
47276    FREETYPE_BASE_NAME=freetype
47277    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47278    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47279      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47281        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47282        # for the .6 version explicitly.
47283        FREETYPE_BASE_NAME=freetype.6
47284        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47285        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47286$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47287      else
47288        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47289$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47290        FOUND_FREETYPE=no
47291      fi
47292    else
47293      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47294        # On Windows, we will need both .lib and .dll file.
47295        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47296          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47298          FOUND_FREETYPE=no
47299        fi
47300      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47301          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47302        # Found lib in isa dir, use that instead.
47303        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47304        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47305$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47306      fi
47307    fi
47308  fi
47309
47310  if test "x$FOUND_FREETYPE" = xyes; then
47311
47312  # Only process if variable expands to non-empty
47313
47314  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47316
47317  # Input might be given as Windows format, start by converting to
47318  # unix format.
47319  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47320  new_path=`$CYGPATH -u "$path"`
47321
47322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47325  # "foo.exe" is OK but "foo" is an error.
47326  #
47327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47328  # It is also a way to make sure we got the proper file name for the real test later on.
47329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47330  if test "x$test_shortpath" = x; then
47331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47334  fi
47335
47336  # Call helper function which possibly converts this using DOS-style short mode.
47337  # If so, the updated path is stored in $new_path.
47338
47339  input_path="$new_path"
47340  # Check if we need to convert this using DOS-style short mode. If the path
47341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47342  # take no chances and rewrite it.
47343  # Note: m4 eats our [], so we need to use [ and ] instead.
47344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47345  if test "x$has_forbidden_chars" != x; then
47346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47350      # Going to short mode and back again did indeed matter. Since short mode is
47351      # case insensitive, let's make it lowercase to improve readability.
47352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47353      # Now convert it back to Unix-stile (cygpath)
47354      input_path=`$CYGPATH -u "$shortmode_path"`
47355      new_path="$input_path"
47356    fi
47357  fi
47358
47359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47360  if test "x$test_cygdrive_prefix" = x; then
47361    # As a simple fix, exclude /usr/bin since it's not a real path.
47362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47364      # a path prefixed by /cygdrive for fixpath to work.
47365      new_path="$CYGWIN_ROOT_PATH$input_path"
47366    fi
47367  fi
47368
47369
47370  if test "x$path" != "x$new_path"; then
47371    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47374  fi
47375
47376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47377
47378  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47379  has_colon=`$ECHO $path | $GREP ^.:`
47380  new_path="$path"
47381  if test "x$has_colon" = x; then
47382    # Not in mixed or Windows style, start by that.
47383    new_path=`cmd //c echo $path`
47384  fi
47385
47386
47387  input_path="$new_path"
47388  # Check if we need to convert this using DOS-style short mode. If the path
47389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47390  # take no chances and rewrite it.
47391  # Note: m4 eats our [], so we need to use [ and ] instead.
47392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47393  if test "x$has_forbidden_chars" != x; then
47394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47396  fi
47397
47398
47399  windows_path="$new_path"
47400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47401    unix_path=`$CYGPATH -u "$windows_path"`
47402    new_path="$unix_path"
47403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47405    new_path="$unix_path"
47406  fi
47407
47408  if test "x$path" != "x$new_path"; then
47409    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47412  fi
47413
47414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47416
47417    else
47418      # We're on a unix platform. Hooray! :)
47419      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47420      has_space=`$ECHO "$path" | $GREP " "`
47421      if test "x$has_space" != x; then
47422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47425      fi
47426
47427      # Use eval to expand a potential ~
47428      eval path="$path"
47429      if test ! -f "$path" && test ! -d "$path"; then
47430        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47431      fi
47432
47433      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47434    fi
47435  fi
47436
47437
47438  # Only process if variable expands to non-empty
47439
47440  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47442
47443  # Input might be given as Windows format, start by converting to
47444  # unix format.
47445  path="$POTENTIAL_FREETYPE_LIB_PATH"
47446  new_path=`$CYGPATH -u "$path"`
47447
47448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47451  # "foo.exe" is OK but "foo" is an error.
47452  #
47453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47454  # It is also a way to make sure we got the proper file name for the real test later on.
47455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47456  if test "x$test_shortpath" = x; then
47457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47459    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47460  fi
47461
47462  # Call helper function which possibly converts this using DOS-style short mode.
47463  # If so, the updated path is stored in $new_path.
47464
47465  input_path="$new_path"
47466  # Check if we need to convert this using DOS-style short mode. If the path
47467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47468  # take no chances and rewrite it.
47469  # Note: m4 eats our [], so we need to use [ and ] instead.
47470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47471  if test "x$has_forbidden_chars" != x; then
47472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47476      # Going to short mode and back again did indeed matter. Since short mode is
47477      # case insensitive, let's make it lowercase to improve readability.
47478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47479      # Now convert it back to Unix-stile (cygpath)
47480      input_path=`$CYGPATH -u "$shortmode_path"`
47481      new_path="$input_path"
47482    fi
47483  fi
47484
47485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47486  if test "x$test_cygdrive_prefix" = x; then
47487    # As a simple fix, exclude /usr/bin since it's not a real path.
47488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47490      # a path prefixed by /cygdrive for fixpath to work.
47491      new_path="$CYGWIN_ROOT_PATH$input_path"
47492    fi
47493  fi
47494
47495
47496  if test "x$path" != "x$new_path"; then
47497    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47500  fi
47501
47502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47503
47504  path="$POTENTIAL_FREETYPE_LIB_PATH"
47505  has_colon=`$ECHO $path | $GREP ^.:`
47506  new_path="$path"
47507  if test "x$has_colon" = x; then
47508    # Not in mixed or Windows style, start by that.
47509    new_path=`cmd //c echo $path`
47510  fi
47511
47512
47513  input_path="$new_path"
47514  # Check if we need to convert this using DOS-style short mode. If the path
47515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47516  # take no chances and rewrite it.
47517  # Note: m4 eats our [], so we need to use [ and ] instead.
47518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47519  if test "x$has_forbidden_chars" != x; then
47520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47522  fi
47523
47524
47525  windows_path="$new_path"
47526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47527    unix_path=`$CYGPATH -u "$windows_path"`
47528    new_path="$unix_path"
47529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47531    new_path="$unix_path"
47532  fi
47533
47534  if test "x$path" != "x$new_path"; then
47535    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47538  fi
47539
47540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47542
47543    else
47544      # We're on a unix platform. Hooray! :)
47545      path="$POTENTIAL_FREETYPE_LIB_PATH"
47546      has_space=`$ECHO "$path" | $GREP " "`
47547      if test "x$has_space" != x; then
47548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47549$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47551      fi
47552
47553      # Use eval to expand a potential ~
47554      eval path="$path"
47555      if test ! -f "$path" && test ! -d "$path"; then
47556        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47557      fi
47558
47559      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47560    fi
47561  fi
47562
47563
47564    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47566$as_echo_n "checking for freetype includes... " >&6; }
47567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47568$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47569    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47571$as_echo_n "checking for freetype libraries... " >&6; }
47572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47573$as_echo "$FREETYPE_LIB_PATH" >&6; }
47574  fi
47575
47576          fi
47577
47578          if test "x$FOUND_FREETYPE" != xyes; then
47579            FREETYPE_BASE_DIR="$SYSROOT/usr"
47580            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47581
47582  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47583  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47584  METHOD="well-known location"
47585
47586  # Let's start with an optimistic view of the world :-)
47587  FOUND_FREETYPE=yes
47588
47589  # First look for the canonical freetype main include file ft2build.h.
47590  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47591    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47592    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47593    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47594      # Fail.
47595      FOUND_FREETYPE=no
47596    fi
47597  fi
47598
47599  if test "x$FOUND_FREETYPE" = xyes; then
47600    # Include file found, let's continue the sanity check.
47601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47602$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47603
47604    # Reset to default value
47605    FREETYPE_BASE_NAME=freetype
47606    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47607    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47608      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47610        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47611        # for the .6 version explicitly.
47612        FREETYPE_BASE_NAME=freetype.6
47613        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47614        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47615$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47616      else
47617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47619        FOUND_FREETYPE=no
47620      fi
47621    else
47622      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47623        # On Windows, we will need both .lib and .dll file.
47624        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47625          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47627          FOUND_FREETYPE=no
47628        fi
47629      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47631        # Found lib in isa dir, use that instead.
47632        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47633        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47634$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47635      fi
47636    fi
47637  fi
47638
47639  if test "x$FOUND_FREETYPE" = xyes; then
47640
47641  # Only process if variable expands to non-empty
47642
47643  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47645
47646  # Input might be given as Windows format, start by converting to
47647  # unix format.
47648  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47649  new_path=`$CYGPATH -u "$path"`
47650
47651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47654  # "foo.exe" is OK but "foo" is an error.
47655  #
47656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47657  # It is also a way to make sure we got the proper file name for the real test later on.
47658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47659  if test "x$test_shortpath" = x; then
47660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47662    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47663  fi
47664
47665  # Call helper function which possibly converts this using DOS-style short mode.
47666  # If so, the updated path is stored in $new_path.
47667
47668  input_path="$new_path"
47669  # Check if we need to convert this using DOS-style short mode. If the path
47670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47671  # take no chances and rewrite it.
47672  # Note: m4 eats our [], so we need to use [ and ] instead.
47673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47674  if test "x$has_forbidden_chars" != x; then
47675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47679      # Going to short mode and back again did indeed matter. Since short mode is
47680      # case insensitive, let's make it lowercase to improve readability.
47681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47682      # Now convert it back to Unix-stile (cygpath)
47683      input_path=`$CYGPATH -u "$shortmode_path"`
47684      new_path="$input_path"
47685    fi
47686  fi
47687
47688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47689  if test "x$test_cygdrive_prefix" = x; then
47690    # As a simple fix, exclude /usr/bin since it's not a real path.
47691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47693      # a path prefixed by /cygdrive for fixpath to work.
47694      new_path="$CYGWIN_ROOT_PATH$input_path"
47695    fi
47696  fi
47697
47698
47699  if test "x$path" != "x$new_path"; then
47700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47703  fi
47704
47705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47706
47707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47708  has_colon=`$ECHO $path | $GREP ^.:`
47709  new_path="$path"
47710  if test "x$has_colon" = x; then
47711    # Not in mixed or Windows style, start by that.
47712    new_path=`cmd //c echo $path`
47713  fi
47714
47715
47716  input_path="$new_path"
47717  # Check if we need to convert this using DOS-style short mode. If the path
47718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47719  # take no chances and rewrite it.
47720  # Note: m4 eats our [], so we need to use [ and ] instead.
47721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47722  if test "x$has_forbidden_chars" != x; then
47723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47725  fi
47726
47727
47728  windows_path="$new_path"
47729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47730    unix_path=`$CYGPATH -u "$windows_path"`
47731    new_path="$unix_path"
47732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47734    new_path="$unix_path"
47735  fi
47736
47737  if test "x$path" != "x$new_path"; then
47738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47741  fi
47742
47743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47745
47746    else
47747      # We're on a unix platform. Hooray! :)
47748      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47749      has_space=`$ECHO "$path" | $GREP " "`
47750      if test "x$has_space" != x; then
47751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47754      fi
47755
47756      # Use eval to expand a potential ~
47757      eval path="$path"
47758      if test ! -f "$path" && test ! -d "$path"; then
47759        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47760      fi
47761
47762      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47763    fi
47764  fi
47765
47766
47767  # Only process if variable expands to non-empty
47768
47769  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47771
47772  # Input might be given as Windows format, start by converting to
47773  # unix format.
47774  path="$POTENTIAL_FREETYPE_LIB_PATH"
47775  new_path=`$CYGPATH -u "$path"`
47776
47777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47780  # "foo.exe" is OK but "foo" is an error.
47781  #
47782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47783  # It is also a way to make sure we got the proper file name for the real test later on.
47784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47785  if test "x$test_shortpath" = x; then
47786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47788    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47789  fi
47790
47791  # Call helper function which possibly converts this using DOS-style short mode.
47792  # If so, the updated path is stored in $new_path.
47793
47794  input_path="$new_path"
47795  # Check if we need to convert this using DOS-style short mode. If the path
47796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47797  # take no chances and rewrite it.
47798  # Note: m4 eats our [], so we need to use [ and ] instead.
47799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47800  if test "x$has_forbidden_chars" != x; then
47801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47805      # Going to short mode and back again did indeed matter. Since short mode is
47806      # case insensitive, let's make it lowercase to improve readability.
47807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47808      # Now convert it back to Unix-stile (cygpath)
47809      input_path=`$CYGPATH -u "$shortmode_path"`
47810      new_path="$input_path"
47811    fi
47812  fi
47813
47814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47815  if test "x$test_cygdrive_prefix" = x; then
47816    # As a simple fix, exclude /usr/bin since it's not a real path.
47817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47819      # a path prefixed by /cygdrive for fixpath to work.
47820      new_path="$CYGWIN_ROOT_PATH$input_path"
47821    fi
47822  fi
47823
47824
47825  if test "x$path" != "x$new_path"; then
47826    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47829  fi
47830
47831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47832
47833  path="$POTENTIAL_FREETYPE_LIB_PATH"
47834  has_colon=`$ECHO $path | $GREP ^.:`
47835  new_path="$path"
47836  if test "x$has_colon" = x; then
47837    # Not in mixed or Windows style, start by that.
47838    new_path=`cmd //c echo $path`
47839  fi
47840
47841
47842  input_path="$new_path"
47843  # Check if we need to convert this using DOS-style short mode. If the path
47844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47845  # take no chances and rewrite it.
47846  # Note: m4 eats our [], so we need to use [ and ] instead.
47847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47848  if test "x$has_forbidden_chars" != x; then
47849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47851  fi
47852
47853
47854  windows_path="$new_path"
47855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47856    unix_path=`$CYGPATH -u "$windows_path"`
47857    new_path="$unix_path"
47858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47860    new_path="$unix_path"
47861  fi
47862
47863  if test "x$path" != "x$new_path"; then
47864    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47867  fi
47868
47869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47871
47872    else
47873      # We're on a unix platform. Hooray! :)
47874      path="$POTENTIAL_FREETYPE_LIB_PATH"
47875      has_space=`$ECHO "$path" | $GREP " "`
47876      if test "x$has_space" != x; then
47877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47879        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47880      fi
47881
47882      # Use eval to expand a potential ~
47883      eval path="$path"
47884      if test ! -f "$path" && test ! -d "$path"; then
47885        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47886      fi
47887
47888      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47889    fi
47890  fi
47891
47892
47893    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47895$as_echo_n "checking for freetype includes... " >&6; }
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47897$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47898    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47900$as_echo_n "checking for freetype libraries... " >&6; }
47901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47902$as_echo "$FREETYPE_LIB_PATH" >&6; }
47903  fi
47904
47905            else
47906
47907  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47908  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47909  METHOD="well-known location"
47910
47911  # Let's start with an optimistic view of the world :-)
47912  FOUND_FREETYPE=yes
47913
47914  # First look for the canonical freetype main include file ft2build.h.
47915  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47916    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47917    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47918    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47919      # Fail.
47920      FOUND_FREETYPE=no
47921    fi
47922  fi
47923
47924  if test "x$FOUND_FREETYPE" = xyes; then
47925    # Include file found, let's continue the sanity check.
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47927$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47928
47929    # Reset to default value
47930    FREETYPE_BASE_NAME=freetype
47931    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47932    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47933      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47934          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47935        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47936        # for the .6 version explicitly.
47937        FREETYPE_BASE_NAME=freetype.6
47938        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47939        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47940$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47941      else
47942        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47943$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47944        FOUND_FREETYPE=no
47945      fi
47946    else
47947      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47948        # On Windows, we will need both .lib and .dll file.
47949        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47950          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47951$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47952          FOUND_FREETYPE=no
47953        fi
47954      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47955          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47956        # Found lib in isa dir, use that instead.
47957        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47958        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47959$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47960      fi
47961    fi
47962  fi
47963
47964  if test "x$FOUND_FREETYPE" = xyes; then
47965
47966  # Only process if variable expands to non-empty
47967
47968  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47970
47971  # Input might be given as Windows format, start by converting to
47972  # unix format.
47973  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47974  new_path=`$CYGPATH -u "$path"`
47975
47976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47979  # "foo.exe" is OK but "foo" is an error.
47980  #
47981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47982  # It is also a way to make sure we got the proper file name for the real test later on.
47983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47984  if test "x$test_shortpath" = x; then
47985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47987    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47988  fi
47989
47990  # Call helper function which possibly converts this using DOS-style short mode.
47991  # If so, the updated path is stored in $new_path.
47992
47993  input_path="$new_path"
47994  # Check if we need to convert this using DOS-style short mode. If the path
47995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47996  # take no chances and rewrite it.
47997  # Note: m4 eats our [], so we need to use [ and ] instead.
47998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47999  if test "x$has_forbidden_chars" != x; then
48000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48004      # Going to short mode and back again did indeed matter. Since short mode is
48005      # case insensitive, let's make it lowercase to improve readability.
48006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48007      # Now convert it back to Unix-stile (cygpath)
48008      input_path=`$CYGPATH -u "$shortmode_path"`
48009      new_path="$input_path"
48010    fi
48011  fi
48012
48013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48014  if test "x$test_cygdrive_prefix" = x; then
48015    # As a simple fix, exclude /usr/bin since it's not a real path.
48016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48018      # a path prefixed by /cygdrive for fixpath to work.
48019      new_path="$CYGWIN_ROOT_PATH$input_path"
48020    fi
48021  fi
48022
48023
48024  if test "x$path" != "x$new_path"; then
48025    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48028  fi
48029
48030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48031
48032  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48033  has_colon=`$ECHO $path | $GREP ^.:`
48034  new_path="$path"
48035  if test "x$has_colon" = x; then
48036    # Not in mixed or Windows style, start by that.
48037    new_path=`cmd //c echo $path`
48038  fi
48039
48040
48041  input_path="$new_path"
48042  # Check if we need to convert this using DOS-style short mode. If the path
48043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48044  # take no chances and rewrite it.
48045  # Note: m4 eats our [], so we need to use [ and ] instead.
48046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48047  if test "x$has_forbidden_chars" != x; then
48048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48050  fi
48051
48052
48053  windows_path="$new_path"
48054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48055    unix_path=`$CYGPATH -u "$windows_path"`
48056    new_path="$unix_path"
48057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48059    new_path="$unix_path"
48060  fi
48061
48062  if test "x$path" != "x$new_path"; then
48063    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48066  fi
48067
48068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48070
48071    else
48072      # We're on a unix platform. Hooray! :)
48073      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48074      has_space=`$ECHO "$path" | $GREP " "`
48075      if test "x$has_space" != x; then
48076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48077$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48079      fi
48080
48081      # Use eval to expand a potential ~
48082      eval path="$path"
48083      if test ! -f "$path" && test ! -d "$path"; then
48084        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48085      fi
48086
48087      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48088    fi
48089  fi
48090
48091
48092  # Only process if variable expands to non-empty
48093
48094  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48096
48097  # Input might be given as Windows format, start by converting to
48098  # unix format.
48099  path="$POTENTIAL_FREETYPE_LIB_PATH"
48100  new_path=`$CYGPATH -u "$path"`
48101
48102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48105  # "foo.exe" is OK but "foo" is an error.
48106  #
48107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48108  # It is also a way to make sure we got the proper file name for the real test later on.
48109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48110  if test "x$test_shortpath" = x; then
48111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48113    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48114  fi
48115
48116  # Call helper function which possibly converts this using DOS-style short mode.
48117  # If so, the updated path is stored in $new_path.
48118
48119  input_path="$new_path"
48120  # Check if we need to convert this using DOS-style short mode. If the path
48121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48122  # take no chances and rewrite it.
48123  # Note: m4 eats our [], so we need to use [ and ] instead.
48124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48125  if test "x$has_forbidden_chars" != x; then
48126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48130      # Going to short mode and back again did indeed matter. Since short mode is
48131      # case insensitive, let's make it lowercase to improve readability.
48132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48133      # Now convert it back to Unix-stile (cygpath)
48134      input_path=`$CYGPATH -u "$shortmode_path"`
48135      new_path="$input_path"
48136    fi
48137  fi
48138
48139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48140  if test "x$test_cygdrive_prefix" = x; then
48141    # As a simple fix, exclude /usr/bin since it's not a real path.
48142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48144      # a path prefixed by /cygdrive for fixpath to work.
48145      new_path="$CYGWIN_ROOT_PATH$input_path"
48146    fi
48147  fi
48148
48149
48150  if test "x$path" != "x$new_path"; then
48151    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48154  fi
48155
48156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48157
48158  path="$POTENTIAL_FREETYPE_LIB_PATH"
48159  has_colon=`$ECHO $path | $GREP ^.:`
48160  new_path="$path"
48161  if test "x$has_colon" = x; then
48162    # Not in mixed or Windows style, start by that.
48163    new_path=`cmd //c echo $path`
48164  fi
48165
48166
48167  input_path="$new_path"
48168  # Check if we need to convert this using DOS-style short mode. If the path
48169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48170  # take no chances and rewrite it.
48171  # Note: m4 eats our [], so we need to use [ and ] instead.
48172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48173  if test "x$has_forbidden_chars" != x; then
48174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48176  fi
48177
48178
48179  windows_path="$new_path"
48180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48181    unix_path=`$CYGPATH -u "$windows_path"`
48182    new_path="$unix_path"
48183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48185    new_path="$unix_path"
48186  fi
48187
48188  if test "x$path" != "x$new_path"; then
48189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48192  fi
48193
48194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48196
48197    else
48198      # We're on a unix platform. Hooray! :)
48199      path="$POTENTIAL_FREETYPE_LIB_PATH"
48200      has_space=`$ECHO "$path" | $GREP " "`
48201      if test "x$has_space" != x; then
48202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48205      fi
48206
48207      # Use eval to expand a potential ~
48208      eval path="$path"
48209      if test ! -f "$path" && test ! -d "$path"; then
48210        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48211      fi
48212
48213      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48214    fi
48215  fi
48216
48217
48218    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48220$as_echo_n "checking for freetype includes... " >&6; }
48221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48222$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48223    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48225$as_echo_n "checking for freetype libraries... " >&6; }
48226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48227$as_echo "$FREETYPE_LIB_PATH" >&6; }
48228  fi
48229
48230              if test "x$FOUND_FREETYPE" != xyes; then
48231
48232  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48233  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
48234  METHOD="well-known location"
48235
48236  # Let's start with an optimistic view of the world :-)
48237  FOUND_FREETYPE=yes
48238
48239  # First look for the canonical freetype main include file ft2build.h.
48240  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48241    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48242    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48243    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48244      # Fail.
48245      FOUND_FREETYPE=no
48246    fi
48247  fi
48248
48249  if test "x$FOUND_FREETYPE" = xyes; then
48250    # Include file found, let's continue the sanity check.
48251    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48252$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48253
48254    # Reset to default value
48255    FREETYPE_BASE_NAME=freetype
48256    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48257    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48258      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48259          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48260        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48261        # for the .6 version explicitly.
48262        FREETYPE_BASE_NAME=freetype.6
48263        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48264        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48265$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48266      else
48267        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48268$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48269        FOUND_FREETYPE=no
48270      fi
48271    else
48272      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48273        # On Windows, we will need both .lib and .dll file.
48274        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48275          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48276$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48277          FOUND_FREETYPE=no
48278        fi
48279      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48281        # Found lib in isa dir, use that instead.
48282        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48283        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48284$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48285      fi
48286    fi
48287  fi
48288
48289  if test "x$FOUND_FREETYPE" = xyes; then
48290
48291  # Only process if variable expands to non-empty
48292
48293  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48295
48296  # Input might be given as Windows format, start by converting to
48297  # unix format.
48298  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48299  new_path=`$CYGPATH -u "$path"`
48300
48301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48304  # "foo.exe" is OK but "foo" is an error.
48305  #
48306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48307  # It is also a way to make sure we got the proper file name for the real test later on.
48308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48309  if test "x$test_shortpath" = x; then
48310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48312    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48313  fi
48314
48315  # Call helper function which possibly converts this using DOS-style short mode.
48316  # If so, the updated path is stored in $new_path.
48317
48318  input_path="$new_path"
48319  # Check if we need to convert this using DOS-style short mode. If the path
48320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48321  # take no chances and rewrite it.
48322  # Note: m4 eats our [], so we need to use [ and ] instead.
48323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48324  if test "x$has_forbidden_chars" != x; then
48325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48329      # Going to short mode and back again did indeed matter. Since short mode is
48330      # case insensitive, let's make it lowercase to improve readability.
48331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48332      # Now convert it back to Unix-stile (cygpath)
48333      input_path=`$CYGPATH -u "$shortmode_path"`
48334      new_path="$input_path"
48335    fi
48336  fi
48337
48338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48339  if test "x$test_cygdrive_prefix" = x; then
48340    # As a simple fix, exclude /usr/bin since it's not a real path.
48341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48343      # a path prefixed by /cygdrive for fixpath to work.
48344      new_path="$CYGWIN_ROOT_PATH$input_path"
48345    fi
48346  fi
48347
48348
48349  if test "x$path" != "x$new_path"; then
48350    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48352$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48353  fi
48354
48355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48356
48357  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48358  has_colon=`$ECHO $path | $GREP ^.:`
48359  new_path="$path"
48360  if test "x$has_colon" = x; then
48361    # Not in mixed or Windows style, start by that.
48362    new_path=`cmd //c echo $path`
48363  fi
48364
48365
48366  input_path="$new_path"
48367  # Check if we need to convert this using DOS-style short mode. If the path
48368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48369  # take no chances and rewrite it.
48370  # Note: m4 eats our [], so we need to use [ and ] instead.
48371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48372  if test "x$has_forbidden_chars" != x; then
48373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48375  fi
48376
48377
48378  windows_path="$new_path"
48379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48380    unix_path=`$CYGPATH -u "$windows_path"`
48381    new_path="$unix_path"
48382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48384    new_path="$unix_path"
48385  fi
48386
48387  if test "x$path" != "x$new_path"; then
48388    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48391  fi
48392
48393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48395
48396    else
48397      # We're on a unix platform. Hooray! :)
48398      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48399      has_space=`$ECHO "$path" | $GREP " "`
48400      if test "x$has_space" != x; then
48401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48404      fi
48405
48406      # Use eval to expand a potential ~
48407      eval path="$path"
48408      if test ! -f "$path" && test ! -d "$path"; then
48409        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48410      fi
48411
48412      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48413    fi
48414  fi
48415
48416
48417  # Only process if variable expands to non-empty
48418
48419  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48421
48422  # Input might be given as Windows format, start by converting to
48423  # unix format.
48424  path="$POTENTIAL_FREETYPE_LIB_PATH"
48425  new_path=`$CYGPATH -u "$path"`
48426
48427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48430  # "foo.exe" is OK but "foo" is an error.
48431  #
48432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48433  # It is also a way to make sure we got the proper file name for the real test later on.
48434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48435  if test "x$test_shortpath" = x; then
48436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48438    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48439  fi
48440
48441  # Call helper function which possibly converts this using DOS-style short mode.
48442  # If so, the updated path is stored in $new_path.
48443
48444  input_path="$new_path"
48445  # Check if we need to convert this using DOS-style short mode. If the path
48446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48447  # take no chances and rewrite it.
48448  # Note: m4 eats our [], so we need to use [ and ] instead.
48449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48450  if test "x$has_forbidden_chars" != x; then
48451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48455      # Going to short mode and back again did indeed matter. Since short mode is
48456      # case insensitive, let's make it lowercase to improve readability.
48457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48458      # Now convert it back to Unix-stile (cygpath)
48459      input_path=`$CYGPATH -u "$shortmode_path"`
48460      new_path="$input_path"
48461    fi
48462  fi
48463
48464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48465  if test "x$test_cygdrive_prefix" = x; then
48466    # As a simple fix, exclude /usr/bin since it's not a real path.
48467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48469      # a path prefixed by /cygdrive for fixpath to work.
48470      new_path="$CYGWIN_ROOT_PATH$input_path"
48471    fi
48472  fi
48473
48474
48475  if test "x$path" != "x$new_path"; then
48476    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48479  fi
48480
48481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48482
48483  path="$POTENTIAL_FREETYPE_LIB_PATH"
48484  has_colon=`$ECHO $path | $GREP ^.:`
48485  new_path="$path"
48486  if test "x$has_colon" = x; then
48487    # Not in mixed or Windows style, start by that.
48488    new_path=`cmd //c echo $path`
48489  fi
48490
48491
48492  input_path="$new_path"
48493  # Check if we need to convert this using DOS-style short mode. If the path
48494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48495  # take no chances and rewrite it.
48496  # Note: m4 eats our [], so we need to use [ and ] instead.
48497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48498  if test "x$has_forbidden_chars" != x; then
48499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48501  fi
48502
48503
48504  windows_path="$new_path"
48505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48506    unix_path=`$CYGPATH -u "$windows_path"`
48507    new_path="$unix_path"
48508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48510    new_path="$unix_path"
48511  fi
48512
48513  if test "x$path" != "x$new_path"; then
48514    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48516$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48517  fi
48518
48519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48521
48522    else
48523      # We're on a unix platform. Hooray! :)
48524      path="$POTENTIAL_FREETYPE_LIB_PATH"
48525      has_space=`$ECHO "$path" | $GREP " "`
48526      if test "x$has_space" != x; then
48527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48530      fi
48531
48532      # Use eval to expand a potential ~
48533      eval path="$path"
48534      if test ! -f "$path" && test ! -d "$path"; then
48535        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48536      fi
48537
48538      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48539    fi
48540  fi
48541
48542
48543    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48545$as_echo_n "checking for freetype includes... " >&6; }
48546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48547$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48548    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48550$as_echo_n "checking for freetype libraries... " >&6; }
48551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48552$as_echo "$FREETYPE_LIB_PATH" >&6; }
48553  fi
48554
48555              fi
48556            fi
48557          fi
48558        fi
48559      fi # end check in well-known locations
48560
48561      if test "x$FOUND_FREETYPE" != xyes; then
48562
48563  # Print a helpful message on how to acquire the necessary build dependency.
48564  # freetype is the help tag: freetype, cups, pulse, alsa etc
48565  MISSING_DEPENDENCY=freetype
48566
48567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48568    cygwin_help $MISSING_DEPENDENCY
48569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48570    msys_help $MISSING_DEPENDENCY
48571  else
48572    PKGHANDLER_COMMAND=
48573
48574    case $PKGHANDLER in
48575      apt-get)
48576        apt_help     $MISSING_DEPENDENCY ;;
48577      yum)
48578        yum_help     $MISSING_DEPENDENCY ;;
48579      port)
48580        port_help    $MISSING_DEPENDENCY ;;
48581      pkgutil)
48582        pkgutil_help $MISSING_DEPENDENCY ;;
48583      pkgadd)
48584        pkgadd_help  $MISSING_DEPENDENCY ;;
48585    esac
48586
48587    if test "x$PKGHANDLER_COMMAND" != x; then
48588      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48589    fi
48590  fi
48591
48592        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48593      fi
48594    fi # end user specified settings
48595
48596    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48597    if test "x$FREETYPE_CFLAGS" = x; then
48598
48599  # Only process if variable expands to non-empty
48600
48601  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48603
48604  # Input might be given as Windows format, start by converting to
48605  # unix format.
48606  path="$FREETYPE_INCLUDE_PATH"
48607  new_path=`$CYGPATH -u "$path"`
48608
48609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48612  # "foo.exe" is OK but "foo" is an error.
48613  #
48614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48615  # It is also a way to make sure we got the proper file name for the real test later on.
48616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48617  if test "x$test_shortpath" = x; then
48618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48619$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48620    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48621  fi
48622
48623  # Call helper function which possibly converts this using DOS-style short mode.
48624  # If so, the updated path is stored in $new_path.
48625
48626  input_path="$new_path"
48627  # Check if we need to convert this using DOS-style short mode. If the path
48628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48629  # take no chances and rewrite it.
48630  # Note: m4 eats our [], so we need to use [ and ] instead.
48631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48632  if test "x$has_forbidden_chars" != x; then
48633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48637      # Going to short mode and back again did indeed matter. Since short mode is
48638      # case insensitive, let's make it lowercase to improve readability.
48639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48640      # Now convert it back to Unix-stile (cygpath)
48641      input_path=`$CYGPATH -u "$shortmode_path"`
48642      new_path="$input_path"
48643    fi
48644  fi
48645
48646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48647  if test "x$test_cygdrive_prefix" = x; then
48648    # As a simple fix, exclude /usr/bin since it's not a real path.
48649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48651      # a path prefixed by /cygdrive for fixpath to work.
48652      new_path="$CYGWIN_ROOT_PATH$input_path"
48653    fi
48654  fi
48655
48656
48657  if test "x$path" != "x$new_path"; then
48658    FREETYPE_INCLUDE_PATH="$new_path"
48659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48660$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48661  fi
48662
48663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48664
48665  path="$FREETYPE_INCLUDE_PATH"
48666  has_colon=`$ECHO $path | $GREP ^.:`
48667  new_path="$path"
48668  if test "x$has_colon" = x; then
48669    # Not in mixed or Windows style, start by that.
48670    new_path=`cmd //c echo $path`
48671  fi
48672
48673
48674  input_path="$new_path"
48675  # Check if we need to convert this using DOS-style short mode. If the path
48676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48677  # take no chances and rewrite it.
48678  # Note: m4 eats our [], so we need to use [ and ] instead.
48679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48680  if test "x$has_forbidden_chars" != x; then
48681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48683  fi
48684
48685
48686  windows_path="$new_path"
48687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48688    unix_path=`$CYGPATH -u "$windows_path"`
48689    new_path="$unix_path"
48690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48692    new_path="$unix_path"
48693  fi
48694
48695  if test "x$path" != "x$new_path"; then
48696    FREETYPE_INCLUDE_PATH="$new_path"
48697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48698$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48699  fi
48700
48701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48703
48704    else
48705      # We're on a unix platform. Hooray! :)
48706      path="$FREETYPE_INCLUDE_PATH"
48707      has_space=`$ECHO "$path" | $GREP " "`
48708      if test "x$has_space" != x; then
48709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48710$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48712      fi
48713
48714      # Use eval to expand a potential ~
48715      eval path="$path"
48716      if test ! -f "$path" && test ! -d "$path"; then
48717        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48718      fi
48719
48720      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48721    fi
48722  fi
48723
48724      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48725        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48726      else
48727        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48728      fi
48729    fi
48730
48731    if test "x$FREETYPE_LIBS" = x; then
48732
48733  # Only process if variable expands to non-empty
48734
48735  if test "x$FREETYPE_LIB_PATH" != x; then
48736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48737
48738  # Input might be given as Windows format, start by converting to
48739  # unix format.
48740  path="$FREETYPE_LIB_PATH"
48741  new_path=`$CYGPATH -u "$path"`
48742
48743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48746  # "foo.exe" is OK but "foo" is an error.
48747  #
48748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48749  # It is also a way to make sure we got the proper file name for the real test later on.
48750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48751  if test "x$test_shortpath" = x; then
48752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48753$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48754    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48755  fi
48756
48757  # Call helper function which possibly converts this using DOS-style short mode.
48758  # If so, the updated path is stored in $new_path.
48759
48760  input_path="$new_path"
48761  # Check if we need to convert this using DOS-style short mode. If the path
48762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48763  # take no chances and rewrite it.
48764  # Note: m4 eats our [], so we need to use [ and ] instead.
48765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48766  if test "x$has_forbidden_chars" != x; then
48767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48771      # Going to short mode and back again did indeed matter. Since short mode is
48772      # case insensitive, let's make it lowercase to improve readability.
48773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48774      # Now convert it back to Unix-stile (cygpath)
48775      input_path=`$CYGPATH -u "$shortmode_path"`
48776      new_path="$input_path"
48777    fi
48778  fi
48779
48780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48781  if test "x$test_cygdrive_prefix" = x; then
48782    # As a simple fix, exclude /usr/bin since it's not a real path.
48783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48785      # a path prefixed by /cygdrive for fixpath to work.
48786      new_path="$CYGWIN_ROOT_PATH$input_path"
48787    fi
48788  fi
48789
48790
48791  if test "x$path" != "x$new_path"; then
48792    FREETYPE_LIB_PATH="$new_path"
48793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48794$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48795  fi
48796
48797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48798
48799  path="$FREETYPE_LIB_PATH"
48800  has_colon=`$ECHO $path | $GREP ^.:`
48801  new_path="$path"
48802  if test "x$has_colon" = x; then
48803    # Not in mixed or Windows style, start by that.
48804    new_path=`cmd //c echo $path`
48805  fi
48806
48807
48808  input_path="$new_path"
48809  # Check if we need to convert this using DOS-style short mode. If the path
48810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48811  # take no chances and rewrite it.
48812  # Note: m4 eats our [], so we need to use [ and ] instead.
48813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48814  if test "x$has_forbidden_chars" != x; then
48815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48817  fi
48818
48819
48820  windows_path="$new_path"
48821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48822    unix_path=`$CYGPATH -u "$windows_path"`
48823    new_path="$unix_path"
48824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48826    new_path="$unix_path"
48827  fi
48828
48829  if test "x$path" != "x$new_path"; then
48830    FREETYPE_LIB_PATH="$new_path"
48831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48832$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48833  fi
48834
48835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48837
48838    else
48839      # We're on a unix platform. Hooray! :)
48840      path="$FREETYPE_LIB_PATH"
48841      has_space=`$ECHO "$path" | $GREP " "`
48842      if test "x$has_space" != x; then
48843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48844$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48846      fi
48847
48848      # Use eval to expand a potential ~
48849      eval path="$path"
48850      if test ! -f "$path" && test ! -d "$path"; then
48851        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48852      fi
48853
48854      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48855    fi
48856  fi
48857
48858      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48859        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48860      else
48861        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48862      fi
48863    fi
48864
48865    # Try to compile it
48866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48867$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48868    ac_ext=cpp
48869ac_cpp='$CXXCPP $CPPFLAGS'
48870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48873
48874    PREV_CXXCFLAGS="$CXXFLAGS"
48875    PREV_LIBS="$LIBS"
48876    PREV_CXX="$CXX"
48877    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48878    LIBS="$LIBS $FREETYPE_LIBS"
48879    CXX="$FIXPATH $CXX"
48880    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48881/* end confdefs.h.  */
48882
48883          #include<ft2build.h>
48884          #include FT_FREETYPE_H
48885          int main () {
48886            FT_Init_FreeType(NULL);
48887            return 0;
48888          }
48889
48890_ACEOF
48891if ac_fn_cxx_try_link "$LINENO"; then :
48892
48893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48894$as_echo "yes" >&6; }
48895
48896else
48897
48898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48899$as_echo "no" >&6; }
48900          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48901$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48902          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48903$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48904
48905
48906  # Print a helpful message on how to acquire the necessary build dependency.
48907  # freetype is the help tag: freetype, cups, pulse, alsa etc
48908  MISSING_DEPENDENCY=freetype
48909
48910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48911    cygwin_help $MISSING_DEPENDENCY
48912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48913    msys_help $MISSING_DEPENDENCY
48914  else
48915    PKGHANDLER_COMMAND=
48916
48917    case $PKGHANDLER in
48918      apt-get)
48919        apt_help     $MISSING_DEPENDENCY ;;
48920      yum)
48921        yum_help     $MISSING_DEPENDENCY ;;
48922      port)
48923        port_help    $MISSING_DEPENDENCY ;;
48924      pkgutil)
48925        pkgutil_help $MISSING_DEPENDENCY ;;
48926      pkgadd)
48927        pkgadd_help  $MISSING_DEPENDENCY ;;
48928    esac
48929
48930    if test "x$PKGHANDLER_COMMAND" != x; then
48931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48932    fi
48933  fi
48934
48935
48936          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48937
48938
48939fi
48940rm -f core conftest.err conftest.$ac_objext \
48941    conftest$ac_exeext conftest.$ac_ext
48942    CXXCFLAGS="$PREV_CXXFLAGS"
48943    LIBS="$PREV_LIBS"
48944    CXX="$PREV_CXX"
48945    ac_ext=cpp
48946ac_cpp='$CXXCPP $CPPFLAGS'
48947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48950
48951
48952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48953$as_echo_n "checking if we should bundle freetype... " >&6; }
48954    if test "x$BUNDLE_FREETYPE" = xyes; then
48955      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48956    fi
48957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48958$as_echo "$BUNDLE_FREETYPE" >&6; }
48959
48960  fi # end freetype needed
48961
48962
48963
48964
48965
48966
48967
48968  ###############################################################################
48969  #
48970  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48971  #
48972
48973# Check whether --with-alsa was given.
48974if test "${with_alsa+set}" = set; then :
48975  withval=$with_alsa;
48976fi
48977
48978
48979# Check whether --with-alsa-include was given.
48980if test "${with_alsa_include+set}" = set; then :
48981  withval=$with_alsa_include;
48982fi
48983
48984
48985# Check whether --with-alsa-lib was given.
48986if test "${with_alsa_lib+set}" = set; then :
48987  withval=$with_alsa_lib;
48988fi
48989
48990
48991  if test "x$ALSA_NOT_NEEDED" = xyes; then
48992    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48993      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48994$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48995    fi
48996    ALSA_CFLAGS=
48997    ALSA_LIBS=
48998  else
48999    ALSA_FOUND=no
49000
49001    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
49002      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
49003    fi
49004
49005    if test "x${with_alsa}" != x; then
49006      ALSA_LIBS="-L${with_alsa}/lib -lasound"
49007      ALSA_CFLAGS="-I${with_alsa}/include"
49008      ALSA_FOUND=yes
49009    fi
49010    if test "x${with_alsa_include}" != x; then
49011      ALSA_CFLAGS="-I${with_alsa_include}"
49012      ALSA_FOUND=yes
49013    fi
49014    if test "x${with_alsa_lib}" != x; then
49015      ALSA_LIBS="-L${with_alsa_lib} -lasound"
49016      ALSA_FOUND=yes
49017    fi
49018    if test "x$ALSA_FOUND" = xno; then
49019
49020
49021  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
49022    # Source the builddeps file again, to make sure it uses the latest variables!
49023    . $builddepsfile
49024    # Look for a target and build machine specific resource!
49025    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
49026    if test "x$resource" = x; then
49027      # Ok, lets instead look for a target specific resource
49028      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
49029    fi
49030    if test "x$resource" = x; then
49031      # Ok, lets instead look for a build specific resource
49032      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
49033    fi
49034    if test "x$resource" = x; then
49035      # Ok, lets instead look for a generic resource
49036      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
49037      resource=${builddep_alsa}
49038    fi
49039    if test "x$resource" != x; then
49040      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
49041$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
49042      # If the resource in the builddeps.conf file is an existing directory,
49043      # for example /java/linux/cups
49044      if test -d ${resource}; then
49045        depdir=${resource}
49046      else
49047
49048  # alsa is for example mymodule
49049  # $resource is for example libs/general/libmymod_1_2_3.zip
49050  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
49051  # $with_builddeps_dir is for example /localhome/builddeps
49052  # depdir is the name of the variable into which we store the depdir, eg MYMOD
49053  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
49054  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
49055  filename=`basename $resource`
49056  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
49057  filebase=${filename%%.*}
49058  extension=${filename#*.}
49059  installdir=$with_builddeps_dir/$filebase
49060  if test ! -f $installdir/$filename.unpacked; then
49061    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
49062$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
49063    if test ! -d $installdir; then
49064      mkdir -p $installdir
49065    fi
49066    if test ! -d $installdir; then
49067      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
49068    fi
49069    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
49070    touch $tmpfile
49071    if test ! -f $tmpfile; then
49072      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
49073    fi
49074
49075  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
49076  # $tmpfile is the local file name for the downloaded file.
49077  VALID_TOOL=no
49078  if test "x$BDEPS_FTP" = xwget; then
49079    VALID_TOOL=yes
49080    wget -O $tmpfile $with_builddeps_server/$resource
49081  fi
49082  if test "x$BDEPS_FTP" = xlftp; then
49083    VALID_TOOL=yes
49084    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
49085  fi
49086  if test "x$BDEPS_FTP" = xftp; then
49087    VALID_TOOL=yes
49088    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
49089    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
49090    FTPUSERPWD=${FTPSERVER%%@*}
49091    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
49092      FTPUSER=${userpwd%%:*}
49093      FTPPWD=${userpwd#*@}
49094      FTPSERVER=${FTPSERVER#*@}
49095    else
49096      FTPUSER=ftp
49097      FTPPWD=ftp
49098    fi
49099    # the "pass" command does not work on some
49100    # ftp clients (read ftp.exe) but if it works,
49101    # passive mode is better!
49102    ( \
49103        echo "user $FTPUSER $FTPPWD"        ; \
49104        echo "pass"                         ; \
49105        echo "bin"                          ; \
49106        echo "get $FTPPATH $tmpfile"              ; \
49107    ) | ftp -in $FTPSERVER
49108  fi
49109  if test "x$VALID_TOOL" != xyes; then
49110    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
49111  fi
49112
49113    mv $tmpfile $installdir/$filename
49114    if test ! -s $installdir/$filename; then
49115      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
49116    fi
49117    case "$extension" in
49118      zip)  echo "Unzipping $installdir/$filename..."
49119        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
49120        ;;
49121      tar.gz) echo "Untaring $installdir/$filename..."
49122        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49123        ;;
49124      tgz) echo "Untaring $installdir/$filename..."
49125        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49126        ;;
49127      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
49128        ;;
49129    esac
49130  fi
49131  if test -f $installdir/$filename.unpacked; then
49132    depdir=$installdir
49133  fi
49134
49135      fi
49136      # Source the builddeps file again, because in the previous command, the depdir
49137      # was updated to point at the current build dependency install directory.
49138      . $builddepsfile
49139      # Now extract variables from the builddeps.conf files.
49140      theroot=${builddep_alsa_ROOT}
49141      thecflags=${builddep_alsa_CFLAGS}
49142      thelibs=${builddep_alsa_LIBS}
49143      if test "x$depdir" = x; then
49144        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
49145      fi
49146      ALSA=$depdir
49147      if test "x$theroot" != x; then
49148        ALSA="$theroot"
49149      fi
49150      if test "x$thecflags" != x; then
49151        ALSA_CFLAGS="$thecflags"
49152      fi
49153      if test "x$thelibs" != x; then
49154        ALSA_LIBS="$thelibs"
49155      fi
49156      ALSA_FOUND=yes
49157      else ALSA_FOUND=no
49158
49159    fi
49160    else ALSA_FOUND=no
49161
49162  fi
49163
49164    fi
49165    # Do not try pkg-config if we have a sysroot set.
49166    if test "x$SYSROOT" = x; then
49167      if test "x$ALSA_FOUND" = xno; then
49168
49169pkg_failed=no
49170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
49171$as_echo_n "checking for ALSA... " >&6; }
49172
49173if test -n "$ALSA_CFLAGS"; then
49174    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
49175 elif test -n "$PKG_CONFIG"; then
49176    if test -n "$PKG_CONFIG" && \
49177    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49178  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49179  ac_status=$?
49180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49181  test $ac_status = 0; }; then
49182  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
49183else
49184  pkg_failed=yes
49185fi
49186 else
49187    pkg_failed=untried
49188fi
49189if test -n "$ALSA_LIBS"; then
49190    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
49191 elif test -n "$PKG_CONFIG"; then
49192    if test -n "$PKG_CONFIG" && \
49193    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49194  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49195  ac_status=$?
49196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49197  test $ac_status = 0; }; then
49198  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
49199else
49200  pkg_failed=yes
49201fi
49202 else
49203    pkg_failed=untried
49204fi
49205
49206
49207
49208if test $pkg_failed = yes; then
49209
49210if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49211        _pkg_short_errors_supported=yes
49212else
49213        _pkg_short_errors_supported=no
49214fi
49215        if test $_pkg_short_errors_supported = yes; then
49216	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
49217        else
49218	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
49219        fi
49220	# Put the nasty error message in config.log where it belongs
49221	echo "$ALSA_PKG_ERRORS" >&5
49222
49223	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49224$as_echo "no" >&6; }
49225                ALSA_FOUND=no
49226elif test $pkg_failed = untried; then
49227	ALSA_FOUND=no
49228else
49229	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
49230	ALSA_LIBS=$pkg_cv_ALSA_LIBS
49231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49232$as_echo "yes" >&6; }
49233	ALSA_FOUND=yes
49234fi
49235      fi
49236    fi
49237    if test "x$ALSA_FOUND" = xno; then
49238      for ac_header in alsa/asoundlib.h
49239do :
49240  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
49241if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
49242  cat >>confdefs.h <<_ACEOF
49243#define HAVE_ALSA_ASOUNDLIB_H 1
49244_ACEOF
49245
49246            ALSA_FOUND=yes
49247            ALSA_CFLAGS=-Iignoreme
49248            ALSA_LIBS=-lasound
49249            DEFAULT_ALSA=yes
49250
49251else
49252  ALSA_FOUND=no
49253fi
49254
49255done
49256
49257    fi
49258    if test "x$ALSA_FOUND" = xno; then
49259
49260  # Print a helpful message on how to acquire the necessary build dependency.
49261  # alsa is the help tag: freetype, cups, pulse, alsa etc
49262  MISSING_DEPENDENCY=alsa
49263
49264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49265    cygwin_help $MISSING_DEPENDENCY
49266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49267    msys_help $MISSING_DEPENDENCY
49268  else
49269    PKGHANDLER_COMMAND=
49270
49271    case $PKGHANDLER in
49272      apt-get)
49273        apt_help     $MISSING_DEPENDENCY ;;
49274      yum)
49275        yum_help     $MISSING_DEPENDENCY ;;
49276      port)
49277        port_help    $MISSING_DEPENDENCY ;;
49278      pkgutil)
49279        pkgutil_help $MISSING_DEPENDENCY ;;
49280      pkgadd)
49281        pkgadd_help  $MISSING_DEPENDENCY ;;
49282    esac
49283
49284    if test "x$PKGHANDLER_COMMAND" != x; then
49285      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49286    fi
49287  fi
49288
49289      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49290    fi
49291  fi
49292
49293
49294
49295
49296
49297
49298  ###############################################################################
49299  #
49300  # Check for the jpeg library
49301  #
49302
49303
49304# Check whether --with-libjpeg was given.
49305if test "${with_libjpeg+set}" = set; then :
49306  withval=$with_libjpeg;
49307fi
49308
49309
49310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49311$as_echo_n "checking for which libjpeg to use... " >&6; }
49312
49313  # default is bundled
49314  DEFAULT_LIBJPEG=bundled
49315
49316  #
49317  # if user didn't specify, use DEFAULT_LIBJPEG
49318  #
49319  if test "x${with_libjpeg}" = "x"; then
49320    with_libjpeg=${DEFAULT_LIBJPEG}
49321  fi
49322
49323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49324$as_echo "${with_libjpeg}" >&6; }
49325
49326  if test "x${with_libjpeg}" = "xbundled"; then
49327    USE_EXTERNAL_LIBJPEG=false
49328  elif test "x${with_libjpeg}" = "xsystem"; then
49329    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49330if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49331
49332else
49333   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49334fi
49335
49336
49337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49338$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49339if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49340  $as_echo_n "(cached) " >&6
49341else
49342  ac_check_lib_save_LIBS=$LIBS
49343LIBS="-ljpeg  $LIBS"
49344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49345/* end confdefs.h.  */
49346
49347/* Override any GCC internal prototype to avoid an error.
49348   Use char because int might match the return type of a GCC
49349   builtin and then its argument prototype would still apply.  */
49350#ifdef __cplusplus
49351extern "C"
49352#endif
49353char jpeg_CreateDecompress ();
49354int
49355main ()
49356{
49357return jpeg_CreateDecompress ();
49358  ;
49359  return 0;
49360}
49361_ACEOF
49362if ac_fn_cxx_try_link "$LINENO"; then :
49363  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49364else
49365  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49366fi
49367rm -f core conftest.err conftest.$ac_objext \
49368    conftest$ac_exeext conftest.$ac_ext
49369LIBS=$ac_check_lib_save_LIBS
49370fi
49371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49372$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49373if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49374  cat >>confdefs.h <<_ACEOF
49375#define HAVE_LIBJPEG 1
49376_ACEOF
49377
49378  LIBS="-ljpeg $LIBS"
49379
49380else
49381   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49382fi
49383
49384
49385    USE_EXTERNAL_LIBJPEG=true
49386  else
49387    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49388  fi
49389
49390
49391
49392  ###############################################################################
49393  #
49394  # Check for the gif library
49395  #
49396
49397
49398# Check whether --with-giflib was given.
49399if test "${with_giflib+set}" = set; then :
49400  withval=$with_giflib;
49401fi
49402
49403
49404
49405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49406$as_echo_n "checking for which giflib to use... " >&6; }
49407
49408  # default is bundled
49409  DEFAULT_GIFLIB=bundled
49410
49411  #
49412  # if user didn't specify, use DEFAULT_GIFLIB
49413  #
49414  if test "x${with_giflib}" = "x"; then
49415    with_giflib=${DEFAULT_GIFLIB}
49416  fi
49417
49418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49419$as_echo "${with_giflib}" >&6; }
49420
49421  if test "x${with_giflib}" = "xbundled"; then
49422    USE_EXTERNAL_LIBGIF=false
49423  elif test "x${with_giflib}" = "xsystem"; then
49424    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49425if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49426
49427else
49428   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49429fi
49430
49431
49432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49433$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49434if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49435  $as_echo_n "(cached) " >&6
49436else
49437  ac_check_lib_save_LIBS=$LIBS
49438LIBS="-lgif  $LIBS"
49439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49440/* end confdefs.h.  */
49441
49442/* Override any GCC internal prototype to avoid an error.
49443   Use char because int might match the return type of a GCC
49444   builtin and then its argument prototype would still apply.  */
49445#ifdef __cplusplus
49446extern "C"
49447#endif
49448char DGifGetCode ();
49449int
49450main ()
49451{
49452return DGifGetCode ();
49453  ;
49454  return 0;
49455}
49456_ACEOF
49457if ac_fn_cxx_try_link "$LINENO"; then :
49458  ac_cv_lib_gif_DGifGetCode=yes
49459else
49460  ac_cv_lib_gif_DGifGetCode=no
49461fi
49462rm -f core conftest.err conftest.$ac_objext \
49463    conftest$ac_exeext conftest.$ac_ext
49464LIBS=$ac_check_lib_save_LIBS
49465fi
49466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49467$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49468if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49469  cat >>confdefs.h <<_ACEOF
49470#define HAVE_LIBGIF 1
49471_ACEOF
49472
49473  LIBS="-lgif $LIBS"
49474
49475else
49476   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49477fi
49478
49479
49480    USE_EXTERNAL_LIBGIF=true
49481  else
49482    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49483  fi
49484
49485
49486  ###############################################################################
49487  #
49488  # Check for the lcms2 library
49489  #
49490
49491
49492# Check whether --with-lcms was given.
49493if test "${with_lcms+set}" = set; then :
49494  withval=$with_lcms;
49495fi
49496
49497
49498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49499$as_echo_n "checking for which lcms to use... " >&6; }
49500
49501  DEFAULT_LCMS=bundled
49502
49503  #
49504  # If user didn't specify, use DEFAULT_LCMS
49505  #
49506  if test "x${with_lcms}" = "x"; then
49507      with_lcms=${DEFAULT_LCMS}
49508  fi
49509
49510  if test "x${with_lcms}" = "xbundled"; then
49511    USE_EXTERNAL_LCMS=false
49512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49513$as_echo "bundled" >&6; }
49514  elif test "x${with_lcms}" = "xsystem"; then
49515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49516$as_echo "system" >&6; }
49517
49518pkg_failed=no
49519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49520$as_echo_n "checking for LCMS... " >&6; }
49521
49522if test -n "$LCMS_CFLAGS"; then
49523    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49524 elif test -n "$PKG_CONFIG"; then
49525    if test -n "$PKG_CONFIG" && \
49526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49527  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49528  ac_status=$?
49529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49530  test $ac_status = 0; }; then
49531  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49532else
49533  pkg_failed=yes
49534fi
49535 else
49536    pkg_failed=untried
49537fi
49538if test -n "$LCMS_LIBS"; then
49539    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49540 elif test -n "$PKG_CONFIG"; then
49541    if test -n "$PKG_CONFIG" && \
49542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49543  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49544  ac_status=$?
49545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49546  test $ac_status = 0; }; then
49547  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49548else
49549  pkg_failed=yes
49550fi
49551 else
49552    pkg_failed=untried
49553fi
49554
49555
49556
49557if test $pkg_failed = yes; then
49558
49559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49560        _pkg_short_errors_supported=yes
49561else
49562        _pkg_short_errors_supported=no
49563fi
49564        if test $_pkg_short_errors_supported = yes; then
49565	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49566        else
49567	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49568        fi
49569	# Put the nasty error message in config.log where it belongs
49570	echo "$LCMS_PKG_ERRORS" >&5
49571
49572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49573$as_echo "no" >&6; }
49574                LCMS_FOUND=no
49575elif test $pkg_failed = untried; then
49576	LCMS_FOUND=no
49577else
49578	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49579	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49581$as_echo "yes" >&6; }
49582	LCMS_FOUND=yes
49583fi
49584    if test "x${LCMS_FOUND}" = "xyes"; then
49585      USE_EXTERNAL_LCMS=true
49586    else
49587      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49588    fi
49589  else
49590    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49591  fi
49592
49593
49594
49595  ###############################################################################
49596  #
49597  # Check for the png library
49598  #
49599
49600
49601# Check whether --with-libpng was given.
49602if test "${with_libpng+set}" = set; then :
49603  withval=$with_libpng;
49604fi
49605
49606
49607
49608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49609$as_echo_n "checking for which libpng to use... " >&6; }
49610
49611  # default is bundled
49612  DEFAULT_LIBPNG=bundled
49613
49614  #
49615  # if user didn't specify, use DEFAULT_LIBPNG
49616  #
49617  if test "x${with_libpng}" = "x"; then
49618      with_libpng=${DEFAULT_LIBPNG}
49619  fi
49620
49621  if test "x${with_libpng}" = "xbundled"; then
49622      USE_EXTERNAL_LIBPNG=false
49623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49624$as_echo "bundled" >&6; }
49625  elif test "x${with_libpng}" = "xsystem"; then
49626
49627pkg_failed=no
49628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49629$as_echo_n "checking for PNG... " >&6; }
49630
49631if test -n "$PNG_CFLAGS"; then
49632    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49633 elif test -n "$PKG_CONFIG"; then
49634    if test -n "$PKG_CONFIG" && \
49635    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49636  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49637  ac_status=$?
49638  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49639  test $ac_status = 0; }; then
49640  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49641else
49642  pkg_failed=yes
49643fi
49644 else
49645    pkg_failed=untried
49646fi
49647if test -n "$PNG_LIBS"; then
49648    pkg_cv_PNG_LIBS="$PNG_LIBS"
49649 elif test -n "$PKG_CONFIG"; then
49650    if test -n "$PKG_CONFIG" && \
49651    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49652  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49653  ac_status=$?
49654  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49655  test $ac_status = 0; }; then
49656  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49657else
49658  pkg_failed=yes
49659fi
49660 else
49661    pkg_failed=untried
49662fi
49663
49664
49665
49666if test $pkg_failed = yes; then
49667
49668if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49669        _pkg_short_errors_supported=yes
49670else
49671        _pkg_short_errors_supported=no
49672fi
49673        if test $_pkg_short_errors_supported = yes; then
49674	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49675        else
49676	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49677        fi
49678	# Put the nasty error message in config.log where it belongs
49679	echo "$PNG_PKG_ERRORS" >&5
49680
49681	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49682$as_echo "no" >&6; }
49683                 LIBPNG_FOUND=no
49684elif test $pkg_failed = untried; then
49685	 LIBPNG_FOUND=no
49686else
49687	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49688	PNG_LIBS=$pkg_cv_PNG_LIBS
49689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49690$as_echo "yes" >&6; }
49691	 LIBPNG_FOUND=yes
49692fi
49693      if test "x${LIBPNG_FOUND}" = "xyes"; then
49694          USE_EXTERNAL_LIBPNG=true
49695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49696$as_echo "system" >&6; }
49697      else
49698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49699$as_echo "system not found" >&6; }
49700          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49701      fi
49702  else
49703      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49704  fi
49705
49706
49707  ###############################################################################
49708  #
49709  # Check for the zlib library
49710  #
49711
49712
49713# Check whether --with-zlib was given.
49714if test "${with_zlib+set}" = set; then :
49715  withval=$with_zlib;
49716fi
49717
49718
49719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49720$as_echo_n "checking for compress in -lz... " >&6; }
49721if ${ac_cv_lib_z_compress+:} false; then :
49722  $as_echo_n "(cached) " >&6
49723else
49724  ac_check_lib_save_LIBS=$LIBS
49725LIBS="-lz  $LIBS"
49726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49727/* end confdefs.h.  */
49728
49729/* Override any GCC internal prototype to avoid an error.
49730   Use char because int might match the return type of a GCC
49731   builtin and then its argument prototype would still apply.  */
49732#ifdef __cplusplus
49733extern "C"
49734#endif
49735char compress ();
49736int
49737main ()
49738{
49739return compress ();
49740  ;
49741  return 0;
49742}
49743_ACEOF
49744if ac_fn_cxx_try_link "$LINENO"; then :
49745  ac_cv_lib_z_compress=yes
49746else
49747  ac_cv_lib_z_compress=no
49748fi
49749rm -f core conftest.err conftest.$ac_objext \
49750    conftest$ac_exeext conftest.$ac_ext
49751LIBS=$ac_check_lib_save_LIBS
49752fi
49753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49754$as_echo "$ac_cv_lib_z_compress" >&6; }
49755if test "x$ac_cv_lib_z_compress" = xyes; then :
49756   ZLIB_FOUND=yes
49757else
49758   ZLIB_FOUND=no
49759fi
49760
49761
49762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49763$as_echo_n "checking for which zlib to use... " >&6; }
49764
49765  DEFAULT_ZLIB=bundled
49766  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49767    #
49768    # On macosx default is system...on others default is
49769    #
49770    DEFAULT_ZLIB=system
49771  fi
49772
49773  if test "x${ZLIB_FOUND}" != "xyes"; then
49774    #
49775    # If we don't find any system...set default to bundled
49776    #
49777    DEFAULT_ZLIB=bundled
49778  fi
49779
49780  #
49781  # If user didn't specify, use DEFAULT_ZLIB
49782  #
49783  if test "x${with_zlib}" = "x"; then
49784    with_zlib=${DEFAULT_ZLIB}
49785  fi
49786
49787  if test "x${with_zlib}" = "xbundled"; then
49788    USE_EXTERNAL_LIBZ=false
49789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49790$as_echo "bundled" >&6; }
49791  elif test "x${with_zlib}" = "xsystem"; then
49792    if test "x${ZLIB_FOUND}" = "xyes"; then
49793      USE_EXTERNAL_LIBZ=true
49794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49795$as_echo "system" >&6; }
49796    else
49797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49798$as_echo "system not found" >&6; }
49799      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49800    fi
49801  else
49802    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49803  fi
49804
49805
49806
49807  ###############################################################################
49808  LIBZIP_CAN_USE_MMAP=true
49809
49810
49811
49812  ###############################################################################
49813  #
49814  # Check if altzone exists in time.h
49815  #
49816
49817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49818/* end confdefs.h.  */
49819#include <time.h>
49820int
49821main ()
49822{
49823return (int)altzone;
49824  ;
49825  return 0;
49826}
49827_ACEOF
49828if ac_fn_cxx_try_link "$LINENO"; then :
49829  has_altzone=yes
49830else
49831  has_altzone=no
49832fi
49833rm -f core conftest.err conftest.$ac_objext \
49834    conftest$ac_exeext conftest.$ac_ext
49835  if test "x$has_altzone" = xyes; then
49836
49837$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49838
49839  fi
49840
49841  ###############################################################################
49842  #
49843  # Check the maths library
49844  #
49845
49846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49847$as_echo_n "checking for cos in -lm... " >&6; }
49848if ${ac_cv_lib_m_cos+:} false; then :
49849  $as_echo_n "(cached) " >&6
49850else
49851  ac_check_lib_save_LIBS=$LIBS
49852LIBS="-lm  $LIBS"
49853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49854/* end confdefs.h.  */
49855
49856/* Override any GCC internal prototype to avoid an error.
49857   Use char because int might match the return type of a GCC
49858   builtin and then its argument prototype would still apply.  */
49859#ifdef __cplusplus
49860extern "C"
49861#endif
49862char cos ();
49863int
49864main ()
49865{
49866return cos ();
49867  ;
49868  return 0;
49869}
49870_ACEOF
49871if ac_fn_cxx_try_link "$LINENO"; then :
49872  ac_cv_lib_m_cos=yes
49873else
49874  ac_cv_lib_m_cos=no
49875fi
49876rm -f core conftest.err conftest.$ac_objext \
49877    conftest$ac_exeext conftest.$ac_ext
49878LIBS=$ac_check_lib_save_LIBS
49879fi
49880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49881$as_echo "$ac_cv_lib_m_cos" >&6; }
49882if test "x$ac_cv_lib_m_cos" = xyes; then :
49883  cat >>confdefs.h <<_ACEOF
49884#define HAVE_LIBM 1
49885_ACEOF
49886
49887  LIBS="-lm $LIBS"
49888
49889else
49890
49891        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49892$as_echo "$as_me: Maths library was not found" >&6;}
49893
49894
49895fi
49896
49897
49898
49899  ###############################################################################
49900  #
49901  # Check for libdl.so
49902
49903  save_LIBS="$LIBS"
49904  LIBS=""
49905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49906$as_echo_n "checking for dlopen in -ldl... " >&6; }
49907if ${ac_cv_lib_dl_dlopen+:} false; then :
49908  $as_echo_n "(cached) " >&6
49909else
49910  ac_check_lib_save_LIBS=$LIBS
49911LIBS="-ldl  $LIBS"
49912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49913/* end confdefs.h.  */
49914
49915/* Override any GCC internal prototype to avoid an error.
49916   Use char because int might match the return type of a GCC
49917   builtin and then its argument prototype would still apply.  */
49918#ifdef __cplusplus
49919extern "C"
49920#endif
49921char dlopen ();
49922int
49923main ()
49924{
49925return dlopen ();
49926  ;
49927  return 0;
49928}
49929_ACEOF
49930if ac_fn_cxx_try_link "$LINENO"; then :
49931  ac_cv_lib_dl_dlopen=yes
49932else
49933  ac_cv_lib_dl_dlopen=no
49934fi
49935rm -f core conftest.err conftest.$ac_objext \
49936    conftest$ac_exeext conftest.$ac_ext
49937LIBS=$ac_check_lib_save_LIBS
49938fi
49939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49940$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49941if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49942  cat >>confdefs.h <<_ACEOF
49943#define HAVE_LIBDL 1
49944_ACEOF
49945
49946  LIBS="-ldl $LIBS"
49947
49948fi
49949
49950  LIBDL="$LIBS"
49951
49952  LIBS="$save_LIBS"
49953
49954
49955  ###############################################################################
49956  #
49957  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49958  # dynamic build is configured on command line.
49959  #
49960
49961# Check whether --with-stdc++lib was given.
49962if test "${with_stdc__lib+set}" = set; then :
49963  withval=$with_stdc__lib;
49964        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49965                && test "x$with_stdc__lib" != xdefault; then
49966          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49967        fi
49968
49969else
49970  with_stdc__lib=default
49971
49972fi
49973
49974
49975  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49976    # Test if -lstdc++ works.
49977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49978$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49979    ac_ext=cpp
49980ac_cpp='$CXXCPP $CPPFLAGS'
49981ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49982ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49983ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49984
49985    OLD_CXXFLAGS="$CXXFLAGS"
49986    CXXFLAGS="$CXXFLAGS -lstdc++"
49987    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49988/* end confdefs.h.  */
49989
49990int
49991main ()
49992{
49993return 0;
49994  ;
49995  return 0;
49996}
49997_ACEOF
49998if ac_fn_cxx_try_link "$LINENO"; then :
49999  has_dynamic_libstdcxx=yes
50000else
50001  has_dynamic_libstdcxx=no
50002fi
50003rm -f core conftest.err conftest.$ac_objext \
50004    conftest$ac_exeext conftest.$ac_ext
50005    CXXFLAGS="$OLD_CXXFLAGS"
50006    ac_ext=cpp
50007ac_cpp='$CXXCPP $CPPFLAGS'
50008ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50009ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50010ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50011
50012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
50013$as_echo "$has_dynamic_libstdcxx" >&6; }
50014
50015    # Test if stdc++ can be linked statically.
50016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
50017$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
50018    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
50019    ac_ext=cpp
50020ac_cpp='$CXXCPP $CPPFLAGS'
50021ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50022ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50023ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50024
50025    OLD_LIBS="$LIBS"
50026    OLD_CXX="$CXX"
50027    LIBS="$STATIC_STDCXX_FLAGS"
50028    CXX="$CC"
50029    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50030/* end confdefs.h.  */
50031
50032int
50033main ()
50034{
50035return 0;
50036  ;
50037  return 0;
50038}
50039_ACEOF
50040if ac_fn_cxx_try_link "$LINENO"; then :
50041  has_static_libstdcxx=yes
50042else
50043  has_static_libstdcxx=no
50044fi
50045rm -f core conftest.err conftest.$ac_objext \
50046    conftest$ac_exeext conftest.$ac_ext
50047    LIBS="$OLD_LIBS"
50048    CXX="$OLD_CXX"
50049    ac_ext=cpp
50050ac_cpp='$CXXCPP $CPPFLAGS'
50051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50054
50055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
50056$as_echo "$has_static_libstdcxx" >&6; }
50057
50058    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
50059      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
50060    fi
50061
50062    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
50063      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
50064    fi
50065
50066    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
50067      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
50068    fi
50069
50070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
50071$as_echo_n "checking how to link with libstdc++... " >&6; }
50072    # If dynamic was requested, it's available since it would fail above otherwise.
50073    # If dynamic wasn't requested, go with static unless it isn't available.
50074    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50075      LIBCXX="$LIBCXX -lstdc++"
50076      LDCXX="$CXX"
50077      STATIC_CXX_SETTING="STATIC_CXX=false"
50078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
50079$as_echo "dynamic" >&6; }
50080    else
50081      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
50082      LDCXX="$CC"
50083      STATIC_CXX_SETTING="STATIC_CXX=true"
50084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
50085$as_echo "static" >&6; }
50086    fi
50087  fi
50088
50089
50090  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50091    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
50092
50093pkg_failed=no
50094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
50095$as_echo_n "checking for LIBFFI... " >&6; }
50096
50097if test -n "$LIBFFI_CFLAGS"; then
50098    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
50099 elif test -n "$PKG_CONFIG"; then
50100    if test -n "$PKG_CONFIG" && \
50101    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50102  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50103  ac_status=$?
50104  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50105  test $ac_status = 0; }; then
50106  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
50107else
50108  pkg_failed=yes
50109fi
50110 else
50111    pkg_failed=untried
50112fi
50113if test -n "$LIBFFI_LIBS"; then
50114    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
50115 elif test -n "$PKG_CONFIG"; then
50116    if test -n "$PKG_CONFIG" && \
50117    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50118  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50119  ac_status=$?
50120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50121  test $ac_status = 0; }; then
50122  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
50123else
50124  pkg_failed=yes
50125fi
50126 else
50127    pkg_failed=untried
50128fi
50129
50130
50131
50132if test $pkg_failed = yes; then
50133
50134if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50135        _pkg_short_errors_supported=yes
50136else
50137        _pkg_short_errors_supported=no
50138fi
50139        if test $_pkg_short_errors_supported = yes; then
50140	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
50141        else
50142	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
50143        fi
50144	# Put the nasty error message in config.log where it belongs
50145	echo "$LIBFFI_PKG_ERRORS" >&5
50146
50147	as_fn_error $? "Package requirements (libffi) were not met:
50148
50149$LIBFFI_PKG_ERRORS
50150
50151Consider adjusting the PKG_CONFIG_PATH environment variable if you
50152installed software in a non-standard prefix.
50153
50154Alternatively, you may set the environment variables LIBFFI_CFLAGS
50155and LIBFFI_LIBS to avoid the need to call pkg-config.
50156See the pkg-config man page for more details.
50157" "$LINENO" 5
50158elif test $pkg_failed = untried; then
50159	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50161as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
50162is in your PATH or set the PKG_CONFIG environment variable to the full
50163path to pkg-config.
50164
50165Alternatively, you may set the environment variables LIBFFI_CFLAGS
50166and LIBFFI_LIBS to avoid the need to call pkg-config.
50167See the pkg-config man page for more details.
50168
50169To get pkg-config, see <http://pkg-config.freedesktop.org/>.
50170See \`config.log' for more details" "$LINENO" 5; }
50171else
50172	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
50173	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
50174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50175$as_echo "yes" >&6; }
50176	:
50177fi
50178
50179  fi
50180
50181  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50182    # Extract the first word of "llvm-config", so it can be a program name with args.
50183set dummy llvm-config; ac_word=$2
50184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50185$as_echo_n "checking for $ac_word... " >&6; }
50186if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
50187  $as_echo_n "(cached) " >&6
50188else
50189  if test -n "$LLVM_CONFIG"; then
50190  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
50191else
50192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50193for as_dir in $PATH
50194do
50195  IFS=$as_save_IFS
50196  test -z "$as_dir" && as_dir=.
50197    for ac_exec_ext in '' $ac_executable_extensions; do
50198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50199    ac_cv_prog_LLVM_CONFIG="llvm-config"
50200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50201    break 2
50202  fi
50203done
50204  done
50205IFS=$as_save_IFS
50206
50207fi
50208fi
50209LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
50210if test -n "$LLVM_CONFIG"; then
50211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
50212$as_echo "$LLVM_CONFIG" >&6; }
50213else
50214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50215$as_echo "no" >&6; }
50216fi
50217
50218
50219
50220    if test "x$LLVM_CONFIG" != xllvm-config; then
50221      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
50222    fi
50223
50224    llvm_components="jit mcjit engine nativecodegen native"
50225    unset LLVM_CFLAGS
50226    for flag in $("$LLVM_CONFIG" --cxxflags); do
50227      if echo "${flag}" | grep -q '^-[ID]'; then
50228        if test "${flag}" != "-D_DEBUG" ; then
50229          if test "${LLVM_CFLAGS}" != "" ; then
50230            LLVM_CFLAGS="${LLVM_CFLAGS} "
50231          fi
50232          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
50233        fi
50234      fi
50235    done
50236    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
50237    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
50238
50239    unset LLVM_LDFLAGS
50240    for flag in $("${LLVM_CONFIG}" --ldflags); do
50241      if echo "${flag}" | grep -q '^-L'; then
50242        if test "${LLVM_LDFLAGS}" != ""; then
50243          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50244        fi
50245        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50246      fi
50247    done
50248
50249    unset LLVM_LIBS
50250    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50251      if echo "${flag}" | grep -q '^-l'; then
50252        if test "${LLVM_LIBS}" != ""; then
50253          LLVM_LIBS="${LLVM_LIBS} "
50254        fi
50255        LLVM_LIBS="${LLVM_LIBS}${flag}"
50256      fi
50257    done
50258
50259
50260
50261
50262  fi
50263
50264  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50265  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50266    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50267  fi
50268
50269  # TODO better (platform agnostic) test
50270  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50271    LIBCXX="-lstdc++"
50272  fi
50273
50274
50275
50276
50277  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50278
50279
50280# Check whether --with-msvcr-dll was given.
50281if test "${with_msvcr_dll+set}" = set; then :
50282  withval=$with_msvcr_dll;
50283fi
50284
50285
50286  if test "x$with_msvcr_dll" != x; then
50287    # If given explicitely by user, do not probe. If not present, fail directly.
50288
50289  DLL_NAME="$DLL_NAME"
50290  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50291  METHOD="--with-msvcr-dll"
50292  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50293    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50294$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50295
50296    # Need to check if the found msvcr is correct architecture
50297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50298$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50299    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50301      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50302      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50304        CORRECT_MSVCR_ARCH="PE32 executable"
50305      else
50306        CORRECT_MSVCR_ARCH="PE32+ executable"
50307      fi
50308    else
50309      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50310        CORRECT_MSVCR_ARCH=386
50311      else
50312        CORRECT_MSVCR_ARCH=x86-64
50313      fi
50314    fi
50315    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50317$as_echo "ok" >&6; }
50318      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50320$as_echo_n "checking for $DLL_NAME... " >&6; }
50321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50322$as_echo "$MSVC_DLL" >&6; }
50323    else
50324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50325$as_echo "incorrect, ignoring" >&6; }
50326      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50327$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50328    fi
50329  fi
50330
50331    if test "x$MSVC_DLL" = x; then
50332      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50333    fi
50334  else
50335
50336  VAR_NAME="MSVCR_DLL"
50337  DLL_NAME="${MSVCR_NAME}"
50338  MSVC_DLL=
50339
50340  if test "x$MSVC_DLL" = x; then
50341    # Probe: Using well-known location from Visual Studio 10.0
50342    if test "x$VCINSTALLDIR" != x; then
50343      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50344
50345  windows_path="$CYGWIN_VC_INSTALL_DIR"
50346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50347    unix_path=`$CYGPATH -u "$windows_path"`
50348    CYGWIN_VC_INSTALL_DIR="$unix_path"
50349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50351    CYGWIN_VC_INSTALL_DIR="$unix_path"
50352  fi
50353
50354      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50355        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50356      else
50357        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50358      fi
50359      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50360
50361  DLL_NAME="$DLL_NAME"
50362  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50363  METHOD="well-known location in VCINSTALLDIR"
50364  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50366$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50367
50368    # Need to check if the found msvcr is correct architecture
50369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50370$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50371    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50373      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50374      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50375      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50376        CORRECT_MSVCR_ARCH="PE32 executable"
50377      else
50378        CORRECT_MSVCR_ARCH="PE32+ executable"
50379      fi
50380    else
50381      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50382        CORRECT_MSVCR_ARCH=386
50383      else
50384        CORRECT_MSVCR_ARCH=x86-64
50385      fi
50386    fi
50387    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50389$as_echo "ok" >&6; }
50390      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50392$as_echo_n "checking for $DLL_NAME... " >&6; }
50393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50394$as_echo "$MSVC_DLL" >&6; }
50395    else
50396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50397$as_echo "incorrect, ignoring" >&6; }
50398      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50399$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50400    fi
50401  fi
50402
50403    fi
50404  fi
50405
50406  if test "x$MSVC_DLL" = x; then
50407    # Probe: Check in the Boot JDK directory.
50408    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50409
50410  DLL_NAME="$DLL_NAME"
50411  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50412  METHOD="well-known location in Boot JDK"
50413  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50414    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50415$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50416
50417    # Need to check if the found msvcr is correct architecture
50418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50419$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50420    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50422      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50423      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50424      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50425        CORRECT_MSVCR_ARCH="PE32 executable"
50426      else
50427        CORRECT_MSVCR_ARCH="PE32+ executable"
50428      fi
50429    else
50430      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50431        CORRECT_MSVCR_ARCH=386
50432      else
50433        CORRECT_MSVCR_ARCH=x86-64
50434      fi
50435    fi
50436    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50438$as_echo "ok" >&6; }
50439      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50440      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50441$as_echo_n "checking for $DLL_NAME... " >&6; }
50442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50443$as_echo "$MSVC_DLL" >&6; }
50444    else
50445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50446$as_echo "incorrect, ignoring" >&6; }
50447      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50448$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50449    fi
50450  fi
50451
50452  fi
50453
50454  if test "x$MSVC_DLL" = x; then
50455    # Probe: Look in the Windows system32 directory
50456    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50457
50458  windows_path="$CYGWIN_SYSTEMROOT"
50459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50460    unix_path=`$CYGPATH -u "$windows_path"`
50461    CYGWIN_SYSTEMROOT="$unix_path"
50462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50464    CYGWIN_SYSTEMROOT="$unix_path"
50465  fi
50466
50467    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50468
50469  DLL_NAME="$DLL_NAME"
50470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50471  METHOD="well-known location in SYSTEMROOT"
50472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50475
50476    # Need to check if the found msvcr is correct architecture
50477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50484        CORRECT_MSVCR_ARCH="PE32 executable"
50485      else
50486        CORRECT_MSVCR_ARCH="PE32+ executable"
50487      fi
50488    else
50489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50490        CORRECT_MSVCR_ARCH=386
50491      else
50492        CORRECT_MSVCR_ARCH=x86-64
50493      fi
50494    fi
50495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50497$as_echo "ok" >&6; }
50498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50499      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50500$as_echo_n "checking for $DLL_NAME... " >&6; }
50501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50502$as_echo "$MSVC_DLL" >&6; }
50503    else
50504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50505$as_echo "incorrect, ignoring" >&6; }
50506      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50507$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50508    fi
50509  fi
50510
50511  fi
50512
50513  if test "x$MSVC_DLL" = x; then
50514    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50515    if test "x$VS100COMNTOOLS" != x; then
50516      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50517
50518  windows_path="$CYGWIN_VS_TOOLS_DIR"
50519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50520    unix_path=`$CYGPATH -u "$windows_path"`
50521    CYGWIN_VS_TOOLS_DIR="$unix_path"
50522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50524    CYGWIN_VS_TOOLS_DIR="$unix_path"
50525  fi
50526
50527      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50528        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50529	    | $GREP -i /x64/ | $HEAD --lines 1`
50530      else
50531        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50532	    | $GREP -i /x86/ | $HEAD --lines 1`
50533      fi
50534
50535  DLL_NAME="$DLL_NAME"
50536  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50537  METHOD="search of VS100COMNTOOLS"
50538  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50540$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50541
50542    # Need to check if the found msvcr is correct architecture
50543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50544$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50545    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50547      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50548      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50549      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50550        CORRECT_MSVCR_ARCH="PE32 executable"
50551      else
50552        CORRECT_MSVCR_ARCH="PE32+ executable"
50553      fi
50554    else
50555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50556        CORRECT_MSVCR_ARCH=386
50557      else
50558        CORRECT_MSVCR_ARCH=x86-64
50559      fi
50560    fi
50561    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50563$as_echo "ok" >&6; }
50564      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50565      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50566$as_echo_n "checking for $DLL_NAME... " >&6; }
50567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50568$as_echo "$MSVC_DLL" >&6; }
50569    else
50570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50571$as_echo "incorrect, ignoring" >&6; }
50572      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50573$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50574    fi
50575  fi
50576
50577    fi
50578  fi
50579
50580  if test "x$MSVC_DLL" = x; then
50581    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50582    # (This was the original behaviour; kept since it might turn something up)
50583    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50584      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50585        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50586	    | $GREP x64 | $HEAD --lines 1`
50587      else
50588        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50589	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50590        if test "x$POSSIBLE_MSVC_DLL" = x; then
50591          # We're grasping at straws now...
50592          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50593	      | $HEAD --lines 1`
50594        fi
50595      fi
50596
50597
50598  DLL_NAME="$DLL_NAME"
50599  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50600  METHOD="search of VCINSTALLDIR"
50601  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50602    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50603$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50604
50605    # Need to check if the found msvcr is correct architecture
50606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50607$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50608    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50610      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50611      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50612      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50613        CORRECT_MSVCR_ARCH="PE32 executable"
50614      else
50615        CORRECT_MSVCR_ARCH="PE32+ executable"
50616      fi
50617    else
50618      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50619        CORRECT_MSVCR_ARCH=386
50620      else
50621        CORRECT_MSVCR_ARCH=x86-64
50622      fi
50623    fi
50624    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50626$as_echo "ok" >&6; }
50627      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50629$as_echo_n "checking for $DLL_NAME... " >&6; }
50630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50631$as_echo "$MSVC_DLL" >&6; }
50632    else
50633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50634$as_echo "incorrect, ignoring" >&6; }
50635      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50636$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50637    fi
50638  fi
50639
50640    fi
50641  fi
50642
50643  if test "x$MSVC_DLL" = x; then
50644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50645$as_echo_n "checking for $DLL_NAME... " >&6; }
50646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50647$as_echo "no" >&6; }
50648    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50649  fi
50650
50651  MSVCR_DLL=$MSVC_DLL
50652
50653  # Only process if variable expands to non-empty
50654
50655  if test "x$MSVCR_DLL" != x; then
50656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50657
50658  # Input might be given as Windows format, start by converting to
50659  # unix format.
50660  path="$MSVCR_DLL"
50661  new_path=`$CYGPATH -u "$path"`
50662
50663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50666  # "foo.exe" is OK but "foo" is an error.
50667  #
50668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50669  # It is also a way to make sure we got the proper file name for the real test later on.
50670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50671  if test "x$test_shortpath" = x; then
50672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50673$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50674    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50675  fi
50676
50677  # Call helper function which possibly converts this using DOS-style short mode.
50678  # If so, the updated path is stored in $new_path.
50679
50680  input_path="$new_path"
50681  # Check if we need to convert this using DOS-style short mode. If the path
50682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50683  # take no chances and rewrite it.
50684  # Note: m4 eats our [], so we need to use [ and ] instead.
50685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50686  if test "x$has_forbidden_chars" != x; then
50687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50691      # Going to short mode and back again did indeed matter. Since short mode is
50692      # case insensitive, let's make it lowercase to improve readability.
50693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50694      # Now convert it back to Unix-stile (cygpath)
50695      input_path=`$CYGPATH -u "$shortmode_path"`
50696      new_path="$input_path"
50697    fi
50698  fi
50699
50700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50701  if test "x$test_cygdrive_prefix" = x; then
50702    # As a simple fix, exclude /usr/bin since it's not a real path.
50703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50705      # a path prefixed by /cygdrive for fixpath to work.
50706      new_path="$CYGWIN_ROOT_PATH$input_path"
50707    fi
50708  fi
50709
50710
50711  if test "x$path" != "x$new_path"; then
50712    MSVCR_DLL="$new_path"
50713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50714$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50715  fi
50716
50717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50718
50719  path="$MSVCR_DLL"
50720  has_colon=`$ECHO $path | $GREP ^.:`
50721  new_path="$path"
50722  if test "x$has_colon" = x; then
50723    # Not in mixed or Windows style, start by that.
50724    new_path=`cmd //c echo $path`
50725  fi
50726
50727
50728  input_path="$new_path"
50729  # Check if we need to convert this using DOS-style short mode. If the path
50730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50731  # take no chances and rewrite it.
50732  # Note: m4 eats our [], so we need to use [ and ] instead.
50733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50734  if test "x$has_forbidden_chars" != x; then
50735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50737  fi
50738
50739
50740  windows_path="$new_path"
50741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50742    unix_path=`$CYGPATH -u "$windows_path"`
50743    new_path="$unix_path"
50744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50746    new_path="$unix_path"
50747  fi
50748
50749  if test "x$path" != "x$new_path"; then
50750    MSVCR_DLL="$new_path"
50751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50752$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50753  fi
50754
50755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50757
50758    else
50759      # We're on a unix platform. Hooray! :)
50760      path="$MSVCR_DLL"
50761      has_space=`$ECHO "$path" | $GREP " "`
50762      if test "x$has_space" != x; then
50763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50764$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50766      fi
50767
50768      # Use eval to expand a potential ~
50769      eval path="$path"
50770      if test ! -f "$path" && test ! -d "$path"; then
50771        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50772      fi
50773
50774      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50775    fi
50776  fi
50777
50778  MSVCR_DLL=$MSVCR_DLL
50779
50780
50781  fi
50782
50783
50784# Check whether --with-msvcp-dll was given.
50785if test "${with_msvcp_dll+set}" = set; then :
50786  withval=$with_msvcp_dll;
50787fi
50788
50789
50790  if test "x$MSVCP_NAME" != "x"; then
50791    if test "x$with_msvcp_dll" != x; then
50792      # If given explicitely by user, do not probe. If not present, fail directly.
50793
50794  DLL_NAME="$DLL_NAME"
50795  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50796  METHOD="--with-msvcp-dll"
50797  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50799$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50800
50801    # Need to check if the found msvcr is correct architecture
50802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50803$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50804    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50806      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50807      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50809        CORRECT_MSVCR_ARCH="PE32 executable"
50810      else
50811        CORRECT_MSVCR_ARCH="PE32+ executable"
50812      fi
50813    else
50814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50815        CORRECT_MSVCR_ARCH=386
50816      else
50817        CORRECT_MSVCR_ARCH=x86-64
50818      fi
50819    fi
50820    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50822$as_echo "ok" >&6; }
50823      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50825$as_echo_n "checking for $DLL_NAME... " >&6; }
50826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50827$as_echo "$MSVC_DLL" >&6; }
50828    else
50829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50830$as_echo "incorrect, ignoring" >&6; }
50831      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50832$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50833    fi
50834  fi
50835
50836      if test "x$MSVC_DLL" = x; then
50837        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50838      fi
50839    else
50840
50841  VAR_NAME="MSVCP_DLL"
50842  DLL_NAME="${MSVCP_NAME}"
50843  MSVC_DLL=
50844
50845  if test "x$MSVC_DLL" = x; then
50846    # Probe: Using well-known location from Visual Studio 10.0
50847    if test "x$VCINSTALLDIR" != x; then
50848      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50849
50850  windows_path="$CYGWIN_VC_INSTALL_DIR"
50851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50852    unix_path=`$CYGPATH -u "$windows_path"`
50853    CYGWIN_VC_INSTALL_DIR="$unix_path"
50854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50856    CYGWIN_VC_INSTALL_DIR="$unix_path"
50857  fi
50858
50859      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50860        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50861      else
50862        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50863      fi
50864      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50865
50866  DLL_NAME="$DLL_NAME"
50867  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50868  METHOD="well-known location in VCINSTALLDIR"
50869  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50870    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50871$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50872
50873    # Need to check if the found msvcr is correct architecture
50874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50875$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50876    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50878      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50879      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50880      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50881        CORRECT_MSVCR_ARCH="PE32 executable"
50882      else
50883        CORRECT_MSVCR_ARCH="PE32+ executable"
50884      fi
50885    else
50886      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50887        CORRECT_MSVCR_ARCH=386
50888      else
50889        CORRECT_MSVCR_ARCH=x86-64
50890      fi
50891    fi
50892    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50894$as_echo "ok" >&6; }
50895      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50897$as_echo_n "checking for $DLL_NAME... " >&6; }
50898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50899$as_echo "$MSVC_DLL" >&6; }
50900    else
50901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50902$as_echo "incorrect, ignoring" >&6; }
50903      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50904$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50905    fi
50906  fi
50907
50908    fi
50909  fi
50910
50911  if test "x$MSVC_DLL" = x; then
50912    # Probe: Check in the Boot JDK directory.
50913    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50914
50915  DLL_NAME="$DLL_NAME"
50916  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50917  METHOD="well-known location in Boot JDK"
50918  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50920$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50921
50922    # Need to check if the found msvcr is correct architecture
50923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50924$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50925    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50927      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50928      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50930        CORRECT_MSVCR_ARCH="PE32 executable"
50931      else
50932        CORRECT_MSVCR_ARCH="PE32+ executable"
50933      fi
50934    else
50935      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50936        CORRECT_MSVCR_ARCH=386
50937      else
50938        CORRECT_MSVCR_ARCH=x86-64
50939      fi
50940    fi
50941    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50943$as_echo "ok" >&6; }
50944      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50946$as_echo_n "checking for $DLL_NAME... " >&6; }
50947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50948$as_echo "$MSVC_DLL" >&6; }
50949    else
50950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50951$as_echo "incorrect, ignoring" >&6; }
50952      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50953$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50954    fi
50955  fi
50956
50957  fi
50958
50959  if test "x$MSVC_DLL" = x; then
50960    # Probe: Look in the Windows system32 directory
50961    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50962
50963  windows_path="$CYGWIN_SYSTEMROOT"
50964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50965    unix_path=`$CYGPATH -u "$windows_path"`
50966    CYGWIN_SYSTEMROOT="$unix_path"
50967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50969    CYGWIN_SYSTEMROOT="$unix_path"
50970  fi
50971
50972    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50973
50974  DLL_NAME="$DLL_NAME"
50975  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50976  METHOD="well-known location in SYSTEMROOT"
50977  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50979$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50980
50981    # Need to check if the found msvcr is correct architecture
50982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50983$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50984    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50986      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50987      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50988      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50989        CORRECT_MSVCR_ARCH="PE32 executable"
50990      else
50991        CORRECT_MSVCR_ARCH="PE32+ executable"
50992      fi
50993    else
50994      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50995        CORRECT_MSVCR_ARCH=386
50996      else
50997        CORRECT_MSVCR_ARCH=x86-64
50998      fi
50999    fi
51000    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51002$as_echo "ok" >&6; }
51003      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51005$as_echo_n "checking for $DLL_NAME... " >&6; }
51006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51007$as_echo "$MSVC_DLL" >&6; }
51008    else
51009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51010$as_echo "incorrect, ignoring" >&6; }
51011      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51012$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51013    fi
51014  fi
51015
51016  fi
51017
51018  if test "x$MSVC_DLL" = x; then
51019    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51020    if test "x$VS100COMNTOOLS" != x; then
51021      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51022
51023  windows_path="$CYGWIN_VS_TOOLS_DIR"
51024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51025    unix_path=`$CYGPATH -u "$windows_path"`
51026    CYGWIN_VS_TOOLS_DIR="$unix_path"
51027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51029    CYGWIN_VS_TOOLS_DIR="$unix_path"
51030  fi
51031
51032      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51033        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51034	    | $GREP -i /x64/ | $HEAD --lines 1`
51035      else
51036        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51037	    | $GREP -i /x86/ | $HEAD --lines 1`
51038      fi
51039
51040  DLL_NAME="$DLL_NAME"
51041  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51042  METHOD="search of VS100COMNTOOLS"
51043  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51045$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51046
51047    # Need to check if the found msvcr is correct architecture
51048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51049$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51050    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51052      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51053      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51054      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51055        CORRECT_MSVCR_ARCH="PE32 executable"
51056      else
51057        CORRECT_MSVCR_ARCH="PE32+ executable"
51058      fi
51059    else
51060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51061        CORRECT_MSVCR_ARCH=386
51062      else
51063        CORRECT_MSVCR_ARCH=x86-64
51064      fi
51065    fi
51066    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51068$as_echo "ok" >&6; }
51069      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51071$as_echo_n "checking for $DLL_NAME... " >&6; }
51072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51073$as_echo "$MSVC_DLL" >&6; }
51074    else
51075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51076$as_echo "incorrect, ignoring" >&6; }
51077      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51078$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51079    fi
51080  fi
51081
51082    fi
51083  fi
51084
51085  if test "x$MSVC_DLL" = x; then
51086    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51087    # (This was the original behaviour; kept since it might turn something up)
51088    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51089      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51090        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51091	    | $GREP x64 | $HEAD --lines 1`
51092      else
51093        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51094	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51095        if test "x$POSSIBLE_MSVC_DLL" = x; then
51096          # We're grasping at straws now...
51097          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51098	      | $HEAD --lines 1`
51099        fi
51100      fi
51101
51102
51103  DLL_NAME="$DLL_NAME"
51104  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51105  METHOD="search of VCINSTALLDIR"
51106  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51108$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51109
51110    # Need to check if the found msvcr is correct architecture
51111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51112$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51113    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51115      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51116      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51118        CORRECT_MSVCR_ARCH="PE32 executable"
51119      else
51120        CORRECT_MSVCR_ARCH="PE32+ executable"
51121      fi
51122    else
51123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51124        CORRECT_MSVCR_ARCH=386
51125      else
51126        CORRECT_MSVCR_ARCH=x86-64
51127      fi
51128    fi
51129    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51131$as_echo "ok" >&6; }
51132      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51134$as_echo_n "checking for $DLL_NAME... " >&6; }
51135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51136$as_echo "$MSVC_DLL" >&6; }
51137    else
51138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51139$as_echo "incorrect, ignoring" >&6; }
51140      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51141$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51142    fi
51143  fi
51144
51145    fi
51146  fi
51147
51148  if test "x$MSVC_DLL" = x; then
51149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51150$as_echo_n "checking for $DLL_NAME... " >&6; }
51151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51152$as_echo "no" >&6; }
51153    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51154  fi
51155
51156  MSVCP_DLL=$MSVC_DLL
51157
51158  # Only process if variable expands to non-empty
51159
51160  if test "x$MSVCP_DLL" != x; then
51161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51162
51163  # Input might be given as Windows format, start by converting to
51164  # unix format.
51165  path="$MSVCP_DLL"
51166  new_path=`$CYGPATH -u "$path"`
51167
51168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51171  # "foo.exe" is OK but "foo" is an error.
51172  #
51173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51174  # It is also a way to make sure we got the proper file name for the real test later on.
51175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51176  if test "x$test_shortpath" = x; then
51177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
51178$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
51179    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
51180  fi
51181
51182  # Call helper function which possibly converts this using DOS-style short mode.
51183  # If so, the updated path is stored in $new_path.
51184
51185  input_path="$new_path"
51186  # Check if we need to convert this using DOS-style short mode. If the path
51187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51188  # take no chances and rewrite it.
51189  # Note: m4 eats our [], so we need to use [ and ] instead.
51190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51191  if test "x$has_forbidden_chars" != x; then
51192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51196      # Going to short mode and back again did indeed matter. Since short mode is
51197      # case insensitive, let's make it lowercase to improve readability.
51198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51199      # Now convert it back to Unix-stile (cygpath)
51200      input_path=`$CYGPATH -u "$shortmode_path"`
51201      new_path="$input_path"
51202    fi
51203  fi
51204
51205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51206  if test "x$test_cygdrive_prefix" = x; then
51207    # As a simple fix, exclude /usr/bin since it's not a real path.
51208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51210      # a path prefixed by /cygdrive for fixpath to work.
51211      new_path="$CYGWIN_ROOT_PATH$input_path"
51212    fi
51213  fi
51214
51215
51216  if test "x$path" != "x$new_path"; then
51217    MSVCP_DLL="$new_path"
51218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
51219$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
51220  fi
51221
51222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51223
51224  path="$MSVCP_DLL"
51225  has_colon=`$ECHO $path | $GREP ^.:`
51226  new_path="$path"
51227  if test "x$has_colon" = x; then
51228    # Not in mixed or Windows style, start by that.
51229    new_path=`cmd //c echo $path`
51230  fi
51231
51232
51233  input_path="$new_path"
51234  # Check if we need to convert this using DOS-style short mode. If the path
51235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51236  # take no chances and rewrite it.
51237  # Note: m4 eats our [], so we need to use [ and ] instead.
51238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51239  if test "x$has_forbidden_chars" != x; then
51240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51242  fi
51243
51244
51245  windows_path="$new_path"
51246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51247    unix_path=`$CYGPATH -u "$windows_path"`
51248    new_path="$unix_path"
51249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51251    new_path="$unix_path"
51252  fi
51253
51254  if test "x$path" != "x$new_path"; then
51255    MSVCP_DLL="$new_path"
51256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
51257$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
51258  fi
51259
51260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51262
51263    else
51264      # We're on a unix platform. Hooray! :)
51265      path="$MSVCP_DLL"
51266      has_space=`$ECHO "$path" | $GREP " "`
51267      if test "x$has_space" != x; then
51268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
51269$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
51270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51271      fi
51272
51273      # Use eval to expand a potential ~
51274      eval path="$path"
51275      if test ! -f "$path" && test ! -d "$path"; then
51276        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51277      fi
51278
51279      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
51280    fi
51281  fi
51282
51283  MSVCP_DLL=$MSVCP_DLL
51284
51285
51286    fi
51287  fi
51288
51289
51290
51291# Check whether --with-dxsdk was given.
51292if test "${with_dxsdk+set}" = set; then :
51293  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
51294$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
51295fi
51296
51297
51298
51299
51300# Check whether --with-dxsdk-lib was given.
51301if test "${with_dxsdk_lib+set}" = set; then :
51302  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
51303$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
51304fi
51305
51306
51307
51308
51309# Check whether --with-dxsdk-include was given.
51310if test "${with_dxsdk_include+set}" = set; then :
51311  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
51312$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
51313fi
51314
51315
51316  fi
51317
51318
51319###############################################################################
51320#
51321# We need to do some final tweaking, when everything else is done.
51322#
51323###############################################################################
51324
51325
51326  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
51327
51328
51329  # The name of the Service Agent jar.
51330  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
51331  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51332    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
51333  fi
51334
51335
51336
51337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
51338$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
51339
51340    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
51341      ENABLE_INTREE_EC=yes
51342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51343$as_echo "yes" >&6; }
51344    else
51345      ENABLE_INTREE_EC=no
51346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51347$as_echo "no" >&6; }
51348    fi
51349
51350
51351
51352
51353###############################################################################
51354#
51355# Configure parts of the build that only affect the build performance,
51356# not the result.
51357#
51358###############################################################################
51359
51360
51361  # How many cores do we have on this build system?
51362
51363# Check whether --with-num-cores was given.
51364if test "${with_num_cores+set}" = set; then :
51365  withval=$with_num_cores;
51366fi
51367
51368  if test "x$with_num_cores" = x; then
51369    # The number of cores were not specified, try to probe them.
51370
51371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51372$as_echo_n "checking for number of cores... " >&6; }
51373  NUM_CORES=1
51374  FOUND_CORES=no
51375
51376  if test -f /proc/cpuinfo; then
51377    # Looks like a Linux (or cygwin) system
51378    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
51379    FOUND_CORES=yes
51380  elif test -x /usr/sbin/psrinfo; then
51381    # Looks like a Solaris system
51382    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51383    FOUND_CORES=yes
51384  elif test -x /usr/sbin/system_profiler; then
51385    # Looks like a MacOSX system
51386    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51387    FOUND_CORES=yes
51388  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51389    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51390    FOUND_CORES=yes
51391  elif test -n "$NUMBER_OF_PROCESSORS"; then
51392    # On windows, look in the env
51393    NUM_CORES=$NUMBER_OF_PROCESSORS
51394    FOUND_CORES=yes
51395  fi
51396
51397  if test "x$FOUND_CORES" = xyes; then
51398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51399$as_echo "$NUM_CORES" >&6; }
51400  else
51401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51402$as_echo "could not detect number of cores, defaulting to 1" >&6; }
51403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51404$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51405  fi
51406
51407  else
51408    NUM_CORES=$with_num_cores
51409  fi
51410
51411
51412
51413  # How much memory do we have on this build system?
51414
51415# Check whether --with-memory-size was given.
51416if test "${with_memory_size+set}" = set; then :
51417  withval=$with_memory_size;
51418fi
51419
51420  if test "x$with_memory_size" = x; then
51421    # The memory size was not specified, try to probe it.
51422
51423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51424$as_echo_n "checking for memory size... " >&6; }
51425  # Default to 1024 MB
51426  MEMORY_SIZE=1024
51427  FOUND_MEM=no
51428
51429  if test -f /proc/meminfo; then
51430    # Looks like a Linux (or cygwin) system
51431    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51432    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51433    FOUND_MEM=yes
51434  elif test -x /usr/sbin/prtconf; then
51435    # Looks like a Solaris or AIX system
51436    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51437    FOUND_MEM=yes
51438  elif test -x /usr/sbin/system_profiler; then
51439    # Looks like a MacOSX system
51440    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51441    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51442    FOUND_MEM=yes
51443  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51444    # Windows, but without cygwin
51445    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51446    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51447    FOUND_MEM=yes
51448  fi
51449
51450  if test "x$FOUND_MEM" = xyes; then
51451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51452$as_echo "$MEMORY_SIZE MB" >&6; }
51453  else
51454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51455$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51457$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51458  fi
51459
51460  else
51461    MEMORY_SIZE=$with_memory_size
51462  fi
51463
51464
51465
51466  # Provide a decent default number of parallel jobs for make depending on
51467  # number of cores, amount of memory and machine architecture.
51468
51469# Check whether --with-jobs was given.
51470if test "${with_jobs+set}" = set; then :
51471  withval=$with_jobs;
51472fi
51473
51474  if test "x$with_jobs" = x; then
51475    # Number of jobs was not specified, calculate.
51476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51477$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51478    # Approximate memory in GB.
51479    memory_gb=`expr $MEMORY_SIZE / 1024`
51480    # Pick the lowest of memory in gb and number of cores.
51481    if test "$memory_gb" -lt "$NUM_CORES"; then
51482      JOBS="$memory_gb"
51483    else
51484      JOBS="$NUM_CORES"
51485      # On bigger machines, leave some room for other processes to run
51486      if test "$JOBS" -gt "4"; then
51487        JOBS=`expr $JOBS '*' 90 / 100`
51488      fi
51489    fi
51490    # Cap number of jobs to 16
51491    if test "$JOBS" -gt "16"; then
51492      JOBS=16
51493    fi
51494    if test "$JOBS" -eq "0"; then
51495      JOBS=1
51496    fi
51497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51498$as_echo "$JOBS" >&6; }
51499  else
51500    JOBS=$with_jobs
51501  fi
51502
51503
51504
51505# Setup arguments for the boot jdk (after cores and memory have been setup)
51506
51507  ##############################################################################
51508  #
51509  # Specify jvm options for anything that is run with the Boot JDK.
51510  # Not all JVM:s accept the same arguments on the command line.
51511  #
51512
51513# Check whether --with-boot-jdk-jvmargs was given.
51514if test "${with_boot_jdk_jvmargs+set}" = set; then :
51515  withval=$with_boot_jdk_jvmargs;
51516fi
51517
51518
51519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51520$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51521
51522  # Disable special log output when a debug build is used as Boot JDK...
51523
51524  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51525  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51526  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51527  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51528  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51529  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51530    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51531    JVM_ARG_OK=true
51532  else
51533    $ECHO "Arg failed:" >&5
51534    $ECHO "$OUTPUT" >&5
51535    JVM_ARG_OK=false
51536  fi
51537
51538
51539  # Apply user provided options.
51540
51541  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51542  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51543  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51544  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51545  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51546  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51547    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51548    JVM_ARG_OK=true
51549  else
51550    $ECHO "Arg failed:" >&5
51551    $ECHO "$OUTPUT" >&5
51552    JVM_ARG_OK=false
51553  fi
51554
51555
51556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51557$as_echo "$boot_jdk_jvmargs" >&6; }
51558
51559  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51560  JAVA_FLAGS=$boot_jdk_jvmargs
51561
51562
51563
51564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51565$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51566
51567  # Starting amount of heap memory.
51568
51569  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51570  $ECHO "Command: $JAVA -Xms64M -version" >&5
51571  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51572  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51573  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51574  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51575    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51576    JVM_ARG_OK=true
51577  else
51578    $ECHO "Arg failed:" >&5
51579    $ECHO "$OUTPUT" >&5
51580    JVM_ARG_OK=false
51581  fi
51582
51583
51584  # Maximum amount of heap memory.
51585  # Maximum stack size.
51586  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51587  if test "x$BUILD_NUM_BITS" = x32; then
51588    if test "$JVM_MAX_HEAP" -gt "1100"; then
51589      JVM_MAX_HEAP=1100
51590    elif test "$JVM_MAX_HEAP" -lt "512"; then
51591      JVM_MAX_HEAP=512
51592    fi
51593    STACK_SIZE=768
51594  else
51595    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51596    # pointers are used. Apparently, we need to increase the heap and stack
51597    # space for the jvm. More specifically, when running javac to build huge
51598    # jdk batch
51599    if test "$JVM_MAX_HEAP" -gt "1600"; then
51600      JVM_MAX_HEAP=1600
51601    elif test "$JVM_MAX_HEAP" -lt "512"; then
51602      JVM_MAX_HEAP=512
51603    fi
51604    STACK_SIZE=1536
51605  fi
51606
51607  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51608  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51609  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51610  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51611  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51612  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51613    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51614    JVM_ARG_OK=true
51615  else
51616    $ECHO "Arg failed:" >&5
51617    $ECHO "$OUTPUT" >&5
51618    JVM_ARG_OK=false
51619  fi
51620
51621
51622  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51623  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51624  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51625  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51626  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51627  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51628    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51629    JVM_ARG_OK=true
51630  else
51631    $ECHO "Arg failed:" >&5
51632    $ECHO "$OUTPUT" >&5
51633    JVM_ARG_OK=false
51634  fi
51635
51636
51637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51638$as_echo "$boot_jdk_jvmargs_big" >&6; }
51639
51640  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51641
51642
51643
51644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51645$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51646
51647  # Use serial gc for small short lived tools if possible
51648
51649  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51650  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51651  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51652  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51653  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51654  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51655    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51656    JVM_ARG_OK=true
51657  else
51658    $ECHO "Arg failed:" >&5
51659    $ECHO "$OUTPUT" >&5
51660    JVM_ARG_OK=false
51661  fi
51662
51663
51664  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51665  $ECHO "Command: $JAVA -Xms32M -version" >&5
51666  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51667  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51668  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51669  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51670    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51671    JVM_ARG_OK=true
51672  else
51673    $ECHO "Arg failed:" >&5
51674    $ECHO "$OUTPUT" >&5
51675    JVM_ARG_OK=false
51676  fi
51677
51678
51679  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51680  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51681  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51682  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51683  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51684  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51685    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51686    JVM_ARG_OK=true
51687  else
51688    $ECHO "Arg failed:" >&5
51689    $ECHO "$OUTPUT" >&5
51690    JVM_ARG_OK=false
51691  fi
51692
51693
51694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51695$as_echo "$boot_jdk_jvmargs_small" >&6; }
51696
51697  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51698
51699
51700  JAVA_TOOL_FLAGS_SMALL=""
51701  for f in $JAVA_FLAGS_SMALL; do
51702    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51703  done
51704
51705
51706
51707# Setup smart javac (after cores and memory have been setup)
51708
51709
51710# Check whether --with-sjavac-server-java was given.
51711if test "${with_sjavac_server_java+set}" = set; then :
51712  withval=$with_sjavac_server_java;
51713fi
51714
51715
51716  if test "x$with_sjavac_server_java" != x; then
51717    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51718    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51719    if test "x$FOUND_VERSION" = x; then
51720      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51721    fi
51722  else
51723    SJAVAC_SERVER_JAVA="$JAVA"
51724  fi
51725
51726
51727  if test "$MEMORY_SIZE" -gt "3000"; then
51728
51729  $ECHO "Check if jvm arg is ok: -d64" >&5
51730  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51731  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51732  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51733  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51734  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51735    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51736    JVM_ARG_OK=true
51737  else
51738    $ECHO "Arg failed:" >&5
51739    $ECHO "$OUTPUT" >&5
51740    JVM_ARG_OK=false
51741  fi
51742
51743    if test "$JVM_ARG_OK" = true; then
51744      JVM_64BIT=true
51745      JVM_ARG_OK=false
51746    fi
51747  fi
51748
51749  MX_VALUE=`expr $MEMORY_SIZE / 2`
51750  if test "$JVM_64BIT" = true; then
51751    # Set ms lower than mx since more than one instance of the server might
51752    # get launched at the same time before they figure out which instance won.
51753    MS_VALUE=512
51754    if test "$MX_VALUE" -gt "2048"; then
51755      MX_VALUE=2048
51756    fi
51757  else
51758    MS_VALUE=256
51759    if test "$MX_VALUE" -gt "1500"; then
51760      MX_VALUE=1500
51761    fi
51762  fi
51763  if test "$MX_VALUE" -lt "512"; then
51764    MX_VALUE=512
51765  fi
51766
51767  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51768  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51769  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51770  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51771  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51772  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51773    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51774    JVM_ARG_OK=true
51775  else
51776    $ECHO "Arg failed:" >&5
51777    $ECHO "$OUTPUT" >&5
51778    JVM_ARG_OK=false
51779  fi
51780
51781
51782
51783  # Check whether --enable-sjavac was given.
51784if test "${enable_sjavac+set}" = set; then :
51785  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51786else
51787  ENABLE_SJAVAC='no'
51788fi
51789
51790  if test "x$JVM_ARG_OK" = "xfalse"; then
51791    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51792$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51793    ENABLE_SJAVAC=no;
51794  fi
51795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51796$as_echo_n "checking whether to use sjavac... " >&6; }
51797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51798$as_echo "$ENABLE_SJAVAC" >&6; }
51799
51800
51801  if test "x$ENABLE_SJAVAC" = xyes; then
51802    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51803  else
51804    SJAVAC_SERVER_DIR=
51805  fi
51806
51807
51808
51809# Can the C/C++ compiler use precompiled headers?
51810
51811
51812  ###############################################################################
51813  #
51814  # Can the C/C++ compiler use precompiled headers?
51815  #
51816  # Check whether --enable-precompiled-headers was given.
51817if test "${enable_precompiled_headers+set}" = set; then :
51818  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51819else
51820  ENABLE_PRECOMPH=yes
51821fi
51822
51823
51824  USE_PRECOMPILED_HEADER=1
51825  if test "x$ENABLE_PRECOMPH" = xno; then
51826    USE_PRECOMPILED_HEADER=0
51827  fi
51828
51829  if test "x$ENABLE_PRECOMPH" = xyes; then
51830    # Check that the compiler actually supports precomp headers.
51831    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51833$as_echo_n "checking that precompiled headers work... " >&6; }
51834      echo "int alfa();" > conftest.h
51835      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51836      if test ! -f conftest.hpp.gch; then
51837        USE_PRECOMPILED_HEADER=0
51838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51839$as_echo "no" >&6; }
51840      else
51841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51842$as_echo "yes" >&6; }
51843      fi
51844      rm -f conftest.h conftest.hpp.gch
51845    fi
51846  fi
51847
51848
51849
51850
51851# Setup use of ccache, if available
51852
51853  # Check whether --enable-ccache was given.
51854if test "${enable_ccache+set}" = set; then :
51855  enableval=$enable_ccache;
51856fi
51857
51858
51859  CCACHE=
51860  CCACHE_STATUS=
51861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51862$as_echo_n "checking is ccache enabled... " >&6; }
51863  if test "x$enable_ccache" = xyes; then
51864    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51866$as_echo "yes" >&6; }
51867      OLD_PATH="$PATH"
51868      if test "x$TOOLCHAIN_PATH" != x; then
51869        PATH=$TOOLCHAIN_PATH:$PATH
51870      fi
51871
51872
51873
51874  # Publish this variable in the help.
51875
51876
51877  if test "x$CCACHE" = x; then
51878    # The variable is not set by user, try to locate tool using the code snippet
51879    for ac_prog in ccache
51880do
51881  # Extract the first word of "$ac_prog", so it can be a program name with args.
51882set dummy $ac_prog; ac_word=$2
51883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51884$as_echo_n "checking for $ac_word... " >&6; }
51885if ${ac_cv_path_CCACHE+:} false; then :
51886  $as_echo_n "(cached) " >&6
51887else
51888  case $CCACHE in
51889  [\\/]* | ?:[\\/]*)
51890  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51891  ;;
51892  *)
51893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51894for as_dir in $PATH
51895do
51896  IFS=$as_save_IFS
51897  test -z "$as_dir" && as_dir=.
51898    for ac_exec_ext in '' $ac_executable_extensions; do
51899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51900    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51902    break 2
51903  fi
51904done
51905  done
51906IFS=$as_save_IFS
51907
51908  ;;
51909esac
51910fi
51911CCACHE=$ac_cv_path_CCACHE
51912if test -n "$CCACHE"; then
51913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51914$as_echo "$CCACHE" >&6; }
51915else
51916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51917$as_echo "no" >&6; }
51918fi
51919
51920
51921  test -n "$CCACHE" && break
51922done
51923
51924  else
51925    # The variable is set, but is it from the command line or the environment?
51926
51927    # Try to remove the string !CCACHE! from our list.
51928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51930      # If it failed, the variable was not from the command line. Ignore it,
51931      # but warn the user (except for BASH, which is always set by the calling BASH).
51932      if test "xCCACHE" != xBASH; then
51933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51934$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51935      fi
51936      # Try to locate tool using the code snippet
51937      for ac_prog in ccache
51938do
51939  # Extract the first word of "$ac_prog", so it can be a program name with args.
51940set dummy $ac_prog; ac_word=$2
51941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51942$as_echo_n "checking for $ac_word... " >&6; }
51943if ${ac_cv_path_CCACHE+:} false; then :
51944  $as_echo_n "(cached) " >&6
51945else
51946  case $CCACHE in
51947  [\\/]* | ?:[\\/]*)
51948  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51949  ;;
51950  *)
51951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51952for as_dir in $PATH
51953do
51954  IFS=$as_save_IFS
51955  test -z "$as_dir" && as_dir=.
51956    for ac_exec_ext in '' $ac_executable_extensions; do
51957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51958    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51960    break 2
51961  fi
51962done
51963  done
51964IFS=$as_save_IFS
51965
51966  ;;
51967esac
51968fi
51969CCACHE=$ac_cv_path_CCACHE
51970if test -n "$CCACHE"; then
51971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51972$as_echo "$CCACHE" >&6; }
51973else
51974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51975$as_echo "no" >&6; }
51976fi
51977
51978
51979  test -n "$CCACHE" && break
51980done
51981
51982    else
51983      # If it succeeded, then it was overridden by the user. We will use it
51984      # for the tool.
51985
51986      # First remove it from the list of overridden variables, so we can test
51987      # for unknown variables in the end.
51988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51989
51990      # Check if the provided tool contains a complete path.
51991      tool_specified="$CCACHE"
51992      tool_basename="${tool_specified##*/}"
51993      if test "x$tool_basename" = "x$tool_specified"; then
51994        # A command without a complete path is provided, search $PATH.
51995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51996$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51997        # Extract the first word of "$tool_basename", so it can be a program name with args.
51998set dummy $tool_basename; ac_word=$2
51999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52000$as_echo_n "checking for $ac_word... " >&6; }
52001if ${ac_cv_path_CCACHE+:} false; then :
52002  $as_echo_n "(cached) " >&6
52003else
52004  case $CCACHE in
52005  [\\/]* | ?:[\\/]*)
52006  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52007  ;;
52008  *)
52009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52010for as_dir in $PATH
52011do
52012  IFS=$as_save_IFS
52013  test -z "$as_dir" && as_dir=.
52014    for ac_exec_ext in '' $ac_executable_extensions; do
52015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52016    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52018    break 2
52019  fi
52020done
52021  done
52022IFS=$as_save_IFS
52023
52024  ;;
52025esac
52026fi
52027CCACHE=$ac_cv_path_CCACHE
52028if test -n "$CCACHE"; then
52029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52030$as_echo "$CCACHE" >&6; }
52031else
52032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52033$as_echo "no" >&6; }
52034fi
52035
52036
52037        if test "x$CCACHE" = x; then
52038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52039        fi
52040      else
52041        # Otherwise we believe it is a complete path. Use it as it is.
52042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52043$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52045$as_echo_n "checking for CCACHE... " >&6; }
52046        if test ! -x "$tool_specified"; then
52047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52048$as_echo "not found" >&6; }
52049          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52050        fi
52051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52052$as_echo "$tool_specified" >&6; }
52053      fi
52054    fi
52055  fi
52056
52057
52058
52059  if test "x$CCACHE" = x; then
52060    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52061  fi
52062
52063
52064      PATH="$OLD_PATH"
52065      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52066      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52067    else
52068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52069$as_echo "no" >&6; }
52070      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52071$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52072    fi
52073  elif test "x$enable_ccache" = xno; then
52074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52075$as_echo "no, explicitly disabled" >&6; }
52076    CCACHE_STATUS="Disabled"
52077  elif test "x$enable_ccache" = x; then
52078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52079$as_echo "no" >&6; }
52080  else
52081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52082$as_echo "unknown" >&6; }
52083    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52084  fi
52085
52086
52087
52088# Check whether --with-ccache-dir was given.
52089if test "${with_ccache_dir+set}" = set; then :
52090  withval=$with_ccache_dir;
52091fi
52092
52093
52094  if test "x$with_ccache_dir" != x; then
52095    # When using a non home ccache directory, assume the use is to share ccache files
52096    # with other users. Thus change the umask.
52097    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52098    if test "x$CCACHE" = x; then
52099      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52100$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52101    fi
52102  fi
52103
52104  if test "x$CCACHE" != x; then
52105
52106  if test "x$CCACHE" != x; then
52107    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52108      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52109          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`
52110      if test "x$HAS_BAD_CCACHE" != "x"; then
52111        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52112      fi
52113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52114$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52115      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52116      PUSHED_FLAGS="$CXXFLAGS"
52117      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52118      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52119/* end confdefs.h.  */
52120
52121int
52122main ()
52123{
52124
52125  ;
52126  return 0;
52127}
52128_ACEOF
52129if ac_fn_cxx_try_compile "$LINENO"; then :
52130  CC_KNOWS_CCACHE_TRICK=yes
52131else
52132  CC_KNOWS_CCACHE_TRICK=no
52133fi
52134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52135      CXXFLAGS="$PUSHED_FLAGS"
52136      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52138$as_echo "yes" >&6; }
52139        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
52140
52141        CCACHE_SLOPPINESS=pch_defines,time_macros
52142      else
52143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52144$as_echo "no" >&6; }
52145        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
52146      fi
52147    fi
52148
52149    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
52150        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
52151
52152    if test "x$SET_CCACHE_DIR" != x; then
52153      mkdir -p $CCACHE_DIR > /dev/null 2>&1
52154      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52155    fi
52156  fi
52157
52158  fi
52159
52160
52161###############################################################################
52162#
52163# And now the finish...
52164#
52165###############################################################################
52166
52167# Check for some common pitfalls
52168
52169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52170    file_to_test="$SRC_ROOT/LICENSE"
52171    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52172      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
52173    fi
52174  fi
52175
52176
52177  # Did user specify any unknown variables?
52178
52179  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52180    # Replace the separating ! with spaces before presenting for end user.
52181    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52182    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
52183$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
52184  fi
52185
52186
52187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
52188$as_echo_n "checking if build directory is on local disk... " >&6; }
52189
52190  # df -l lists only local disks; if the given directory is not found then
52191  # a non-zero exit code is given
52192  if test "x$DF" = x; then
52193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52194      # msys does not have df; use Windows "net use" instead.
52195      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
52196      if test "x$IS_NETWORK_DISK" = x; then
52197        OUTPUT_DIR_IS_LOCAL="yes"
52198      else
52199        OUTPUT_DIR_IS_LOCAL="no"
52200      fi
52201    else
52202      # No df here, say it's local
52203      OUTPUT_DIR_IS_LOCAL="yes"
52204    fi
52205  else
52206    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
52207      OUTPUT_DIR_IS_LOCAL="yes"
52208    else
52209      OUTPUT_DIR_IS_LOCAL="no"
52210    fi
52211  fi
52212
52213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
52214$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
52215
52216
52217
52218  # Check if the user has any old-style ALT_ variables set.
52219  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
52220
52221  # Before generating output files, test if they exist. If they do, this is a reconfigure.
52222  # Since we can't properly handle the dependencies for this, warn the user about the situation
52223  if test -e $OUTPUT_ROOT/spec.gmk; then
52224    IS_RECONFIGURE=yes
52225  else
52226    IS_RECONFIGURE=no
52227  fi
52228
52229
52230# At the end, call the custom hook. (Dummy macro if no custom sources available)
52231
52232
52233# We're messing a bit with internal autoconf variables to put the config.status
52234# in the output directory instead of the current directory.
52235CONFIG_STATUS="$OUTPUT_ROOT/config.status"
52236
52237# Create the actual output files. Now the main work of configure is done.
52238cat >confcache <<\_ACEOF
52239# This file is a shell script that caches the results of configure
52240# tests run on this system so they can be shared between configure
52241# scripts and configure runs, see configure's option --config-cache.
52242# It is not useful on other systems.  If it contains results you don't
52243# want to keep, you may remove or edit it.
52244#
52245# config.status only pays attention to the cache file if you give it
52246# the --recheck option to rerun configure.
52247#
52248# `ac_cv_env_foo' variables (set or unset) will be overridden when
52249# loading this file, other *unset* `ac_cv_foo' will be assigned the
52250# following values.
52251
52252_ACEOF
52253
52254# The following way of writing the cache mishandles newlines in values,
52255# but we know of no workaround that is simple, portable, and efficient.
52256# So, we kill variables containing newlines.
52257# Ultrix sh set writes to stderr and can't be redirected directly,
52258# and sets the high bit in the cache file unless we assign to the vars.
52259(
52260  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
52261    eval ac_val=\$$ac_var
52262    case $ac_val in #(
52263    *${as_nl}*)
52264      case $ac_var in #(
52265      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
52266$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
52267      esac
52268      case $ac_var in #(
52269      _ | IFS | as_nl) ;; #(
52270      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
52271      *) { eval $ac_var=; unset $ac_var;} ;;
52272      esac ;;
52273    esac
52274  done
52275
52276  (set) 2>&1 |
52277    case $as_nl`(ac_space=' '; set) 2>&1` in #(
52278    *${as_nl}ac_space=\ *)
52279      # `set' does not quote correctly, so add quotes: double-quote
52280      # substitution turns \\\\ into \\, and sed turns \\ into \.
52281      sed -n \
52282	"s/'/'\\\\''/g;
52283	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
52284      ;; #(
52285    *)
52286      # `set' quotes correctly as required by POSIX, so do not add quotes.
52287      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
52288      ;;
52289    esac |
52290    sort
52291) |
52292  sed '
52293     /^ac_cv_env_/b end
52294     t clear
52295     :clear
52296     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
52297     t end
52298     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
52299     :end' >>confcache
52300if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
52301  if test -w "$cache_file"; then
52302    if test "x$cache_file" != "x/dev/null"; then
52303      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
52304$as_echo "$as_me: updating cache $cache_file" >&6;}
52305      if test ! -f "$cache_file" || test -h "$cache_file"; then
52306	cat confcache >"$cache_file"
52307      else
52308        case $cache_file in #(
52309        */* | ?:*)
52310	  mv -f confcache "$cache_file"$$ &&
52311	  mv -f "$cache_file"$$ "$cache_file" ;; #(
52312        *)
52313	  mv -f confcache "$cache_file" ;;
52314	esac
52315      fi
52316    fi
52317  else
52318    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
52319$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
52320  fi
52321fi
52322rm -f confcache
52323
52324test "x$prefix" = xNONE && prefix=$ac_default_prefix
52325# Let make expand exec_prefix.
52326test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
52327
52328# Transform confdefs.h into DEFS.
52329# Protect against shell expansion while executing Makefile rules.
52330# Protect against Makefile macro expansion.
52331#
52332# If the first sed substitution is executed (which looks for macros that
52333# take arguments), then branch to the quote section.  Otherwise,
52334# look for a macro that doesn't take arguments.
52335ac_script='
52336:mline
52337/\\$/{
52338 N
52339 s,\\\n,,
52340 b mline
52341}
52342t clear
52343:clear
52344s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
52345t quote
52346s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
52347t quote
52348b any
52349:quote
52350s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
52351s/\[/\\&/g
52352s/\]/\\&/g
52353s/\$/$$/g
52354H
52355:any
52356${
52357	g
52358	s/^\n//
52359	s/\n/ /g
52360	p
52361}
52362'
52363DEFS=`sed -n "$ac_script" confdefs.h`
52364
52365
52366ac_libobjs=
52367ac_ltlibobjs=
52368U=
52369for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
52370  # 1. Remove the extension, and $U if already installed.
52371  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
52372  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
52373  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
52374  #    will be set to the directory where LIBOBJS objects are built.
52375  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
52376  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
52377done
52378LIBOBJS=$ac_libobjs
52379
52380LTLIBOBJS=$ac_ltlibobjs
52381
52382
52383
52384: "${CONFIG_STATUS=./config.status}"
52385ac_write_fail=0
52386ac_clean_files_save=$ac_clean_files
52387ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52388{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
52389$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
52390as_write_fail=0
52391cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
52392#! $SHELL
52393# Generated by $as_me.
52394# Run this file to recreate the current configuration.
52395# Compiler output produced by configure, useful for debugging
52396# configure, is in config.log if it exists.
52397
52398debug=false
52399ac_cs_recheck=false
52400ac_cs_silent=false
52401
52402SHELL=\${CONFIG_SHELL-$SHELL}
52403export SHELL
52404_ASEOF
52405cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52406## -------------------- ##
52407## M4sh Initialization. ##
52408## -------------------- ##
52409
52410# Be more Bourne compatible
52411DUALCASE=1; export DUALCASE # for MKS sh
52412if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52413  emulate sh
52414  NULLCMD=:
52415  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52416  # is contrary to our usage.  Disable this feature.
52417  alias -g '${1+"$@"}'='"$@"'
52418  setopt NO_GLOB_SUBST
52419else
52420  case `(set -o) 2>/dev/null` in #(
52421  *posix*) :
52422    set -o posix ;; #(
52423  *) :
52424     ;;
52425esac
52426fi
52427
52428
52429as_nl='
52430'
52431export as_nl
52432# Printing a long string crashes Solaris 7 /usr/bin/printf.
52433as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52434as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52435as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52436# Prefer a ksh shell builtin over an external printf program on Solaris,
52437# but without wasting forks for bash or zsh.
52438if test -z "$BASH_VERSION$ZSH_VERSION" \
52439    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52440  as_echo='print -r --'
52441  as_echo_n='print -rn --'
52442elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52443  as_echo='printf %s\n'
52444  as_echo_n='printf %s'
52445else
52446  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52447    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52448    as_echo_n='/usr/ucb/echo -n'
52449  else
52450    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52451    as_echo_n_body='eval
52452      arg=$1;
52453      case $arg in #(
52454      *"$as_nl"*)
52455	expr "X$arg" : "X\\(.*\\)$as_nl";
52456	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52457      esac;
52458      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52459    '
52460    export as_echo_n_body
52461    as_echo_n='sh -c $as_echo_n_body as_echo'
52462  fi
52463  export as_echo_body
52464  as_echo='sh -c $as_echo_body as_echo'
52465fi
52466
52467# The user is always right.
52468if test "${PATH_SEPARATOR+set}" != set; then
52469  PATH_SEPARATOR=:
52470  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52471    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52472      PATH_SEPARATOR=';'
52473  }
52474fi
52475
52476
52477# IFS
52478# We need space, tab and new line, in precisely that order.  Quoting is
52479# there to prevent editors from complaining about space-tab.
52480# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52481# splitting by setting IFS to empty value.)
52482IFS=" ""	$as_nl"
52483
52484# Find who we are.  Look in the path if we contain no directory separator.
52485as_myself=
52486case $0 in #((
52487  *[\\/]* ) as_myself=$0 ;;
52488  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52489for as_dir in $PATH
52490do
52491  IFS=$as_save_IFS
52492  test -z "$as_dir" && as_dir=.
52493    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52494  done
52495IFS=$as_save_IFS
52496
52497     ;;
52498esac
52499# We did not find ourselves, most probably we were run as `sh COMMAND'
52500# in which case we are not to be found in the path.
52501if test "x$as_myself" = x; then
52502  as_myself=$0
52503fi
52504if test ! -f "$as_myself"; then
52505  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52506  exit 1
52507fi
52508
52509# Unset variables that we do not need and which cause bugs (e.g. in
52510# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52511# suppresses any "Segmentation fault" message there.  '((' could
52512# trigger a bug in pdksh 5.2.14.
52513for as_var in BASH_ENV ENV MAIL MAILPATH
52514do eval test x\${$as_var+set} = xset \
52515  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52516done
52517PS1='$ '
52518PS2='> '
52519PS4='+ '
52520
52521# NLS nuisances.
52522LC_ALL=C
52523export LC_ALL
52524LANGUAGE=C
52525export LANGUAGE
52526
52527# CDPATH.
52528(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52529
52530
52531# as_fn_error STATUS ERROR [LINENO LOG_FD]
52532# ----------------------------------------
52533# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52534# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52535# script with STATUS, using 1 if that was 0.
52536as_fn_error ()
52537{
52538  as_status=$1; test $as_status -eq 0 && as_status=1
52539  if test "$4"; then
52540    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52541    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52542  fi
52543  $as_echo "$as_me: error: $2" >&2
52544  as_fn_exit $as_status
52545} # as_fn_error
52546
52547
52548# as_fn_set_status STATUS
52549# -----------------------
52550# Set $? to STATUS, without forking.
52551as_fn_set_status ()
52552{
52553  return $1
52554} # as_fn_set_status
52555
52556# as_fn_exit STATUS
52557# -----------------
52558# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52559as_fn_exit ()
52560{
52561  set +e
52562  as_fn_set_status $1
52563  exit $1
52564} # as_fn_exit
52565
52566# as_fn_unset VAR
52567# ---------------
52568# Portably unset VAR.
52569as_fn_unset ()
52570{
52571  { eval $1=; unset $1;}
52572}
52573as_unset=as_fn_unset
52574# as_fn_append VAR VALUE
52575# ----------------------
52576# Append the text in VALUE to the end of the definition contained in VAR. Take
52577# advantage of any shell optimizations that allow amortized linear growth over
52578# repeated appends, instead of the typical quadratic growth present in naive
52579# implementations.
52580if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52581  eval 'as_fn_append ()
52582  {
52583    eval $1+=\$2
52584  }'
52585else
52586  as_fn_append ()
52587  {
52588    eval $1=\$$1\$2
52589  }
52590fi # as_fn_append
52591
52592# as_fn_arith ARG...
52593# ------------------
52594# Perform arithmetic evaluation on the ARGs, and store the result in the
52595# global $as_val. Take advantage of shells that can avoid forks. The arguments
52596# must be portable across $(()) and expr.
52597if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52598  eval 'as_fn_arith ()
52599  {
52600    as_val=$(( $* ))
52601  }'
52602else
52603  as_fn_arith ()
52604  {
52605    as_val=`expr "$@" || test $? -eq 1`
52606  }
52607fi # as_fn_arith
52608
52609
52610if expr a : '\(a\)' >/dev/null 2>&1 &&
52611   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52612  as_expr=expr
52613else
52614  as_expr=false
52615fi
52616
52617if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52618  as_basename=basename
52619else
52620  as_basename=false
52621fi
52622
52623if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52624  as_dirname=dirname
52625else
52626  as_dirname=false
52627fi
52628
52629as_me=`$as_basename -- "$0" ||
52630$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52631	 X"$0" : 'X\(//\)$' \| \
52632	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52633$as_echo X/"$0" |
52634    sed '/^.*\/\([^/][^/]*\)\/*$/{
52635	    s//\1/
52636	    q
52637	  }
52638	  /^X\/\(\/\/\)$/{
52639	    s//\1/
52640	    q
52641	  }
52642	  /^X\/\(\/\).*/{
52643	    s//\1/
52644	    q
52645	  }
52646	  s/.*/./; q'`
52647
52648# Avoid depending upon Character Ranges.
52649as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52650as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52651as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52652as_cr_digits='0123456789'
52653as_cr_alnum=$as_cr_Letters$as_cr_digits
52654
52655ECHO_C= ECHO_N= ECHO_T=
52656case `echo -n x` in #(((((
52657-n*)
52658  case `echo 'xy\c'` in
52659  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52660  xy)  ECHO_C='\c';;
52661  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52662       ECHO_T='	';;
52663  esac;;
52664*)
52665  ECHO_N='-n';;
52666esac
52667
52668rm -f conf$$ conf$$.exe conf$$.file
52669if test -d conf$$.dir; then
52670  rm -f conf$$.dir/conf$$.file
52671else
52672  rm -f conf$$.dir
52673  mkdir conf$$.dir 2>/dev/null
52674fi
52675if (echo >conf$$.file) 2>/dev/null; then
52676  if ln -s conf$$.file conf$$ 2>/dev/null; then
52677    as_ln_s='ln -s'
52678    # ... but there are two gotchas:
52679    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52680    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52681    # In both cases, we have to default to `cp -pR'.
52682    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52683      as_ln_s='cp -pR'
52684  elif ln conf$$.file conf$$ 2>/dev/null; then
52685    as_ln_s=ln
52686  else
52687    as_ln_s='cp -pR'
52688  fi
52689else
52690  as_ln_s='cp -pR'
52691fi
52692rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52693rmdir conf$$.dir 2>/dev/null
52694
52695
52696# as_fn_mkdir_p
52697# -------------
52698# Create "$as_dir" as a directory, including parents if necessary.
52699as_fn_mkdir_p ()
52700{
52701
52702  case $as_dir in #(
52703  -*) as_dir=./$as_dir;;
52704  esac
52705  test -d "$as_dir" || eval $as_mkdir_p || {
52706    as_dirs=
52707    while :; do
52708      case $as_dir in #(
52709      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52710      *) as_qdir=$as_dir;;
52711      esac
52712      as_dirs="'$as_qdir' $as_dirs"
52713      as_dir=`$as_dirname -- "$as_dir" ||
52714$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52715	 X"$as_dir" : 'X\(//\)[^/]' \| \
52716	 X"$as_dir" : 'X\(//\)$' \| \
52717	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52718$as_echo X"$as_dir" |
52719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52720	    s//\1/
52721	    q
52722	  }
52723	  /^X\(\/\/\)[^/].*/{
52724	    s//\1/
52725	    q
52726	  }
52727	  /^X\(\/\/\)$/{
52728	    s//\1/
52729	    q
52730	  }
52731	  /^X\(\/\).*/{
52732	    s//\1/
52733	    q
52734	  }
52735	  s/.*/./; q'`
52736      test -d "$as_dir" && break
52737    done
52738    test -z "$as_dirs" || eval "mkdir $as_dirs"
52739  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52740
52741
52742} # as_fn_mkdir_p
52743if mkdir -p . 2>/dev/null; then
52744  as_mkdir_p='mkdir -p "$as_dir"'
52745else
52746  test -d ./-p && rmdir ./-p
52747  as_mkdir_p=false
52748fi
52749
52750
52751# as_fn_executable_p FILE
52752# -----------------------
52753# Test if FILE is an executable regular file.
52754as_fn_executable_p ()
52755{
52756  test -f "$1" && test -x "$1"
52757} # as_fn_executable_p
52758as_test_x='test -x'
52759as_executable_p=as_fn_executable_p
52760
52761# Sed expression to map a string onto a valid CPP name.
52762as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52763
52764# Sed expression to map a string onto a valid variable name.
52765as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52766
52767
52768exec 6>&1
52769## ----------------------------------- ##
52770## Main body of $CONFIG_STATUS script. ##
52771## ----------------------------------- ##
52772_ASEOF
52773test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52774
52775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52776# Save the log message, to keep $0 and so on meaningful, and to
52777# report actual input values of CONFIG_FILES etc. instead of their
52778# values after options handling.
52779ac_log="
52780This file was extended by OpenJDK $as_me jdk9, which was
52781generated by GNU Autoconf 2.69.  Invocation command line was
52782
52783  CONFIG_FILES    = $CONFIG_FILES
52784  CONFIG_HEADERS  = $CONFIG_HEADERS
52785  CONFIG_LINKS    = $CONFIG_LINKS
52786  CONFIG_COMMANDS = $CONFIG_COMMANDS
52787  $ $0 $@
52788
52789on `(hostname || uname -n) 2>/dev/null | sed 1q`
52790"
52791
52792_ACEOF
52793
52794case $ac_config_files in *"
52795"*) set x $ac_config_files; shift; ac_config_files=$*;;
52796esac
52797
52798
52799
52800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52801# Files that config.status was made for.
52802config_files="$ac_config_files"
52803
52804_ACEOF
52805
52806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52807ac_cs_usage="\
52808\`$as_me' instantiates files and other configuration actions
52809from templates according to the current configuration.  Unless the files
52810and actions are specified as TAGs, all are instantiated by default.
52811
52812Usage: $0 [OPTION]... [TAG]...
52813
52814  -h, --help       print this help, then exit
52815  -V, --version    print version number and configuration settings, then exit
52816      --config     print configuration, then exit
52817  -q, --quiet, --silent
52818                   do not print progress messages
52819  -d, --debug      don't remove temporary files
52820      --recheck    update $as_me by reconfiguring in the same conditions
52821      --file=FILE[:TEMPLATE]
52822                   instantiate the configuration file FILE
52823
52824Configuration files:
52825$config_files
52826
52827Report bugs to <build-dev@openjdk.java.net>.
52828OpenJDK home page: <http://openjdk.java.net>."
52829
52830_ACEOF
52831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52832ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52833ac_cs_version="\\
52834OpenJDK config.status jdk9
52835configured by $0, generated by GNU Autoconf 2.69,
52836  with options \\"\$ac_cs_config\\"
52837
52838Copyright (C) 2012 Free Software Foundation, Inc.
52839This config.status script is free software; the Free Software Foundation
52840gives unlimited permission to copy, distribute and modify it."
52841
52842ac_pwd='$ac_pwd'
52843srcdir='$srcdir'
52844AWK='$AWK'
52845test -n "\$AWK" || AWK=awk
52846_ACEOF
52847
52848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52849# The default lists apply if the user does not specify any file.
52850ac_need_defaults=:
52851while test $# != 0
52852do
52853  case $1 in
52854  --*=?*)
52855    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52856    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52857    ac_shift=:
52858    ;;
52859  --*=)
52860    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52861    ac_optarg=
52862    ac_shift=:
52863    ;;
52864  *)
52865    ac_option=$1
52866    ac_optarg=$2
52867    ac_shift=shift
52868    ;;
52869  esac
52870
52871  case $ac_option in
52872  # Handling of the options.
52873  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52874    ac_cs_recheck=: ;;
52875  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52876    $as_echo "$ac_cs_version"; exit ;;
52877  --config | --confi | --conf | --con | --co | --c )
52878    $as_echo "$ac_cs_config"; exit ;;
52879  --debug | --debu | --deb | --de | --d | -d )
52880    debug=: ;;
52881  --file | --fil | --fi | --f )
52882    $ac_shift
52883    case $ac_optarg in
52884    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52885    '') as_fn_error $? "missing file argument" ;;
52886    esac
52887    as_fn_append CONFIG_FILES " '$ac_optarg'"
52888    ac_need_defaults=false;;
52889  --he | --h |  --help | --hel | -h )
52890    $as_echo "$ac_cs_usage"; exit ;;
52891  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52892  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52893    ac_cs_silent=: ;;
52894
52895  # This is an error.
52896  -*) as_fn_error $? "unrecognized option: \`$1'
52897Try \`$0 --help' for more information." ;;
52898
52899  *) as_fn_append ac_config_targets " $1"
52900     ac_need_defaults=false ;;
52901
52902  esac
52903  shift
52904done
52905
52906ac_configure_extra_args=
52907
52908if $ac_cs_silent; then
52909  exec 6>/dev/null
52910  ac_configure_extra_args="$ac_configure_extra_args --silent"
52911fi
52912
52913_ACEOF
52914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52915if \$ac_cs_recheck; then
52916  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52917  shift
52918  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52919  CONFIG_SHELL='$SHELL'
52920  export CONFIG_SHELL
52921  exec "\$@"
52922fi
52923
52924_ACEOF
52925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52926exec 5>>config.log
52927{
52928  echo
52929  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52930## Running $as_me. ##
52931_ASBOX
52932  $as_echo "$ac_log"
52933} >&5
52934
52935_ACEOF
52936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52937_ACEOF
52938
52939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52940
52941# Handling of arguments.
52942for ac_config_target in $ac_config_targets
52943do
52944  case $ac_config_target in
52945    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52946    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52947    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52948    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52949    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52950
52951  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52952  esac
52953done
52954
52955
52956# If the user did not use the arguments to specify the items to instantiate,
52957# then the envvar interface is used.  Set only those that are not.
52958# We use the long form for the default assignment because of an extremely
52959# bizarre bug on SunOS 4.1.3.
52960if $ac_need_defaults; then
52961  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52962fi
52963
52964# Have a temporary directory for convenience.  Make it in the build tree
52965# simply because there is no reason against having it here, and in addition,
52966# creating and moving files from /tmp can sometimes cause problems.
52967# Hook for its removal unless debugging.
52968# Note that there is a small window in which the directory will not be cleaned:
52969# after its creation but before its name has been assigned to `$tmp'.
52970$debug ||
52971{
52972  tmp= ac_tmp=
52973  trap 'exit_status=$?
52974  : "${ac_tmp:=$tmp}"
52975  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52976' 0
52977  trap 'as_fn_exit 1' 1 2 13 15
52978}
52979# Create a (secure) tmp directory for tmp files.
52980
52981{
52982  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52983  test -d "$tmp"
52984}  ||
52985{
52986  tmp=./conf$$-$RANDOM
52987  (umask 077 && mkdir "$tmp")
52988} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52989ac_tmp=$tmp
52990
52991# Set up the scripts for CONFIG_FILES section.
52992# No need to generate them if there are no CONFIG_FILES.
52993# This happens for instance with `./config.status config.h'.
52994if test -n "$CONFIG_FILES"; then
52995
52996
52997ac_cr=`echo X | tr X '\015'`
52998# On cygwin, bash can eat \r inside `` if the user requested igncr.
52999# But we know of no other shell where ac_cr would be empty at this
53000# point, so we can use a bashism as a fallback.
53001if test "x$ac_cr" = x; then
53002  eval ac_cr=\$\'\\r\'
53003fi
53004ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53005if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53006  ac_cs_awk_cr='\\r'
53007else
53008  ac_cs_awk_cr=$ac_cr
53009fi
53010
53011echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53012_ACEOF
53013
53014
53015{
53016  echo "cat >conf$$subs.awk <<_ACEOF" &&
53017  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53018  echo "_ACEOF"
53019} >conf$$subs.sh ||
53020  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53021ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53022ac_delim='%!_!# '
53023for ac_last_try in false false false false false :; do
53024  . ./conf$$subs.sh ||
53025    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53026
53027  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53028  if test $ac_delim_n = $ac_delim_num; then
53029    break
53030  elif $ac_last_try; then
53031    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53032  else
53033    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53034  fi
53035done
53036rm -f conf$$subs.sh
53037
53038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53039cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53040_ACEOF
53041sed -n '
53042h
53043s/^/S["/; s/!.*/"]=/
53044p
53045g
53046s/^[^!]*!//
53047:repl
53048t repl
53049s/'"$ac_delim"'$//
53050t delim
53051:nl
53052h
53053s/\(.\{148\}\)..*/\1/
53054t more1
53055s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53056p
53057n
53058b repl
53059:more1
53060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53061p
53062g
53063s/.\{148\}//
53064t nl
53065:delim
53066h
53067s/\(.\{148\}\)..*/\1/
53068t more2
53069s/["\\]/\\&/g; s/^/"/; s/$/"/
53070p
53071b
53072:more2
53073s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53074p
53075g
53076s/.\{148\}//
53077t delim
53078' <conf$$subs.awk | sed '
53079/^[^""]/{
53080  N
53081  s/\n//
53082}
53083' >>$CONFIG_STATUS || ac_write_fail=1
53084rm -f conf$$subs.awk
53085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53086_ACAWK
53087cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53088  for (key in S) S_is_set[key] = 1
53089  FS = ""
53090
53091}
53092{
53093  line = $ 0
53094  nfields = split(line, field, "@")
53095  substed = 0
53096  len = length(field[1])
53097  for (i = 2; i < nfields; i++) {
53098    key = field[i]
53099    keylen = length(key)
53100    if (S_is_set[key]) {
53101      value = S[key]
53102      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53103      len += length(value) + length(field[++i])
53104      substed = 1
53105    } else
53106      len += 1 + keylen
53107  }
53108
53109  print line
53110}
53111
53112_ACAWK
53113_ACEOF
53114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53115if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53116  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53117else
53118  cat
53119fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53120  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53121_ACEOF
53122
53123# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53124# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53125# trailing colons and then remove the whole line if VPATH becomes empty
53126# (actually we leave an empty line to preserve line numbers).
53127if test "x$srcdir" = x.; then
53128  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53129h
53130s///
53131s/^/:/
53132s/[	 ]*$/:/
53133s/:\$(srcdir):/:/g
53134s/:\${srcdir}:/:/g
53135s/:@srcdir@:/:/g
53136s/^:*//
53137s/:*$//
53138x
53139s/\(=[	 ]*\).*/\1/
53140G
53141s/\n//
53142s/^[^=]*=[	 ]*$//
53143}'
53144fi
53145
53146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53147fi # test -n "$CONFIG_FILES"
53148
53149
53150eval set X "  :F $CONFIG_FILES      "
53151shift
53152for ac_tag
53153do
53154  case $ac_tag in
53155  :[FHLC]) ac_mode=$ac_tag; continue;;
53156  esac
53157  case $ac_mode$ac_tag in
53158  :[FHL]*:*);;
53159  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53160  :[FH]-) ac_tag=-:-;;
53161  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53162  esac
53163  ac_save_IFS=$IFS
53164  IFS=:
53165  set x $ac_tag
53166  IFS=$ac_save_IFS
53167  shift
53168  ac_file=$1
53169  shift
53170
53171  case $ac_mode in
53172  :L) ac_source=$1;;
53173  :[FH])
53174    ac_file_inputs=
53175    for ac_f
53176    do
53177      case $ac_f in
53178      -) ac_f="$ac_tmp/stdin";;
53179      *) # Look for the file first in the build tree, then in the source tree
53180	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
53181	 # because $ac_f cannot contain `:'.
53182	 test -f "$ac_f" ||
53183	   case $ac_f in
53184	   [\\/$]*) false;;
53185	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
53186	   esac ||
53187	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
53188      esac
53189      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
53190      as_fn_append ac_file_inputs " '$ac_f'"
53191    done
53192
53193    # Let's still pretend it is `configure' which instantiates (i.e., don't
53194    # use $as_me), people would be surprised to read:
53195    #    /* config.h.  Generated by config.status.  */
53196    configure_input='Generated from '`
53197	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
53198	`' by configure.'
53199    if test x"$ac_file" != x-; then
53200      configure_input="$ac_file.  $configure_input"
53201      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
53202$as_echo "$as_me: creating $ac_file" >&6;}
53203    fi
53204    # Neutralize special characters interpreted by sed in replacement strings.
53205    case $configure_input in #(
53206    *\&* | *\|* | *\\* )
53207       ac_sed_conf_input=`$as_echo "$configure_input" |
53208       sed 's/[\\\\&|]/\\\\&/g'`;; #(
53209    *) ac_sed_conf_input=$configure_input;;
53210    esac
53211
53212    case $ac_tag in
53213    *:-:* | *:-) cat >"$ac_tmp/stdin" \
53214      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
53215    esac
53216    ;;
53217  esac
53218
53219  ac_dir=`$as_dirname -- "$ac_file" ||
53220$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53221	 X"$ac_file" : 'X\(//\)[^/]' \| \
53222	 X"$ac_file" : 'X\(//\)$' \| \
53223	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
53224$as_echo X"$ac_file" |
53225    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53226	    s//\1/
53227	    q
53228	  }
53229	  /^X\(\/\/\)[^/].*/{
53230	    s//\1/
53231	    q
53232	  }
53233	  /^X\(\/\/\)$/{
53234	    s//\1/
53235	    q
53236	  }
53237	  /^X\(\/\).*/{
53238	    s//\1/
53239	    q
53240	  }
53241	  s/.*/./; q'`
53242  as_dir="$ac_dir"; as_fn_mkdir_p
53243  ac_builddir=.
53244
53245case "$ac_dir" in
53246.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
53247*)
53248  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
53249  # A ".." for each directory in $ac_dir_suffix.
53250  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
53251  case $ac_top_builddir_sub in
53252  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
53253  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
53254  esac ;;
53255esac
53256ac_abs_top_builddir=$ac_pwd
53257ac_abs_builddir=$ac_pwd$ac_dir_suffix
53258# for backward compatibility:
53259ac_top_builddir=$ac_top_build_prefix
53260
53261case $srcdir in
53262  .)  # We are building in place.
53263    ac_srcdir=.
53264    ac_top_srcdir=$ac_top_builddir_sub
53265    ac_abs_top_srcdir=$ac_pwd ;;
53266  [\\/]* | ?:[\\/]* )  # Absolute name.
53267    ac_srcdir=$srcdir$ac_dir_suffix;
53268    ac_top_srcdir=$srcdir
53269    ac_abs_top_srcdir=$srcdir ;;
53270  *) # Relative name.
53271    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
53272    ac_top_srcdir=$ac_top_build_prefix$srcdir
53273    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
53274esac
53275ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
53276
53277
53278  case $ac_mode in
53279  :F)
53280  #
53281  # CONFIG_FILE
53282  #
53283
53284_ACEOF
53285
53286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53287# If the template does not know about datarootdir, expand it.
53288# FIXME: This hack should be removed a few years after 2.60.
53289ac_datarootdir_hack=; ac_datarootdir_seen=
53290ac_sed_dataroot='
53291/datarootdir/ {
53292  p
53293  q
53294}
53295/@datadir@/p
53296/@docdir@/p
53297/@infodir@/p
53298/@localedir@/p
53299/@mandir@/p'
53300case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
53301*datarootdir*) ac_datarootdir_seen=yes;;
53302*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
53303  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
53304$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
53305_ACEOF
53306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53307  ac_datarootdir_hack='
53308  s&@datadir@&$datadir&g
53309  s&@docdir@&$docdir&g
53310  s&@infodir@&$infodir&g
53311  s&@localedir@&$localedir&g
53312  s&@mandir@&$mandir&g
53313  s&\\\${datarootdir}&$datarootdir&g' ;;
53314esac
53315_ACEOF
53316
53317# Neutralize VPATH when `$srcdir' = `.'.
53318# Shell code in configure.ac might set extrasub.
53319# FIXME: do we really want to maintain this feature?
53320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53321ac_sed_extra="$ac_vpsub
53322$extrasub
53323_ACEOF
53324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53325:t
53326/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53327s|@configure_input@|$ac_sed_conf_input|;t t
53328s&@top_builddir@&$ac_top_builddir_sub&;t t
53329s&@top_build_prefix@&$ac_top_build_prefix&;t t
53330s&@srcdir@&$ac_srcdir&;t t
53331s&@abs_srcdir@&$ac_abs_srcdir&;t t
53332s&@top_srcdir@&$ac_top_srcdir&;t t
53333s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
53334s&@builddir@&$ac_builddir&;t t
53335s&@abs_builddir@&$ac_abs_builddir&;t t
53336s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
53337$ac_datarootdir_hack
53338"
53339eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
53340  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53341
53342test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
53343  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
53344  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
53345      "$ac_tmp/out"`; test -z "$ac_out"; } &&
53346  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53347which seems to be undefined.  Please make sure it is defined" >&5
53348$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53349which seems to be undefined.  Please make sure it is defined" >&2;}
53350
53351  rm -f "$ac_tmp/stdin"
53352  case $ac_file in
53353  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53354  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53355  esac \
53356  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53357 ;;
53358
53359
53360
53361  esac
53362
53363done # for ac_tag
53364
53365
53366as_fn_exit 0
53367_ACEOF
53368ac_clean_files=$ac_clean_files_save
53369
53370test $ac_write_fail = 0 ||
53371  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53372
53373
53374# configure is writing to config.log, and then calls config.status.
53375# config.status does its own redirection, appending to config.log.
53376# Unfortunately, on DOS this fails, as config.log is still kept open
53377# by configure, so config.status won't be able to write to it; its
53378# output is simply discarded.  So we exec the FD to /dev/null,
53379# effectively closing config.log, so it can be properly (re)opened and
53380# appended to by config.status.  When coming back to configure, we
53381# need to make the FD available again.
53382if test "$no_create" != yes; then
53383  ac_cs_success=:
53384  ac_config_status_args=
53385  test "$silent" = yes &&
53386    ac_config_status_args="$ac_config_status_args --quiet"
53387  exec 5>/dev/null
53388  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53389  exec 5>>config.log
53390  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53391  # would make configure fail if this is the last instruction.
53392  $ac_cs_success || as_fn_exit 1
53393fi
53394if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53395  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53396$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53397fi
53398
53399
53400
53401# Try to move the config.log file to the output directory.
53402if test -e ./config.log; then
53403  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
53404fi
53405
53406# Make the compare script executable
53407$CHMOD +x $OUTPUT_ROOT/compare.sh
53408
53409# Finally output some useful information to the user
53410
53411  # Finally output some useful information to the user
53412
53413  printf "\n"
53414  printf "====================================================\n"
53415  if test "x$no_create" != "xyes"; then
53416    if test "x$IS_RECONFIGURE" != "xyes"; then
53417      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53418    else
53419      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53420    fi
53421  else
53422    if test "x$IS_RECONFIGURE" != "xyes"; then
53423      printf "A configuration has been successfully checked but not created\n"
53424    else
53425      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53426    fi
53427  fi
53428  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53429    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53430  else
53431    printf "using default settings.\n"
53432  fi
53433
53434  printf "\n"
53435  printf "Configuration summary:\n"
53436  printf "* Debug level:    $DEBUG_LEVEL\n"
53437  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53438  printf "* JDK variant:    $JDK_VARIANT\n"
53439  printf "* JVM variants:   $with_jvm_variants\n"
53440  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53441
53442  printf "\n"
53443  printf "Tools summary:\n"
53444  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53445    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53446  fi
53447  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53448  if test "x$TOOLCHAIN_VERSION" != "x"; then
53449    print_version=" $TOOLCHAIN_VERSION"
53450  fi
53451  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53452  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53453  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53454
53455  printf "\n"
53456  printf "Build performance summary:\n"
53457  printf "* Cores to use:   $JOBS\n"
53458  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53459  if test "x$CCACHE_STATUS" != "x"; then
53460    printf "* ccache status:  $CCACHE_STATUS\n"
53461  fi
53462  printf "\n"
53463
53464  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53465    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53466    printf "will result in longer build times.\n"
53467    printf "\n"
53468  fi
53469
53470  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53471    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53472    printf "These are not respected, and will be ignored. It is recommended\n"
53473    printf "that you clean your environment. The following variables are set:\n"
53474    printf "$FOUND_ALT_VARIABLES\n"
53475    printf "\n"
53476  fi
53477
53478  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53479    printf "WARNING: Your build output directory is not on a local disk.\n"
53480    printf "This will severely degrade build performance!\n"
53481    printf "It is recommended that you create an output directory on a local disk,\n"
53482    printf "and run the configure script again from that directory.\n"
53483    printf "\n"
53484  fi
53485
53486  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53487    printf "WARNING: The result of this configuration has overridden an older\n"
53488    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53489    printf "proper build. Failure to do so might result in strange build problems.\n"
53490    printf "\n"
53491  fi
53492
53493  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53494    printf "WARNING: The result of this configuration was not saved.\n"
53495    printf "You should run without '--no-create | -n' to create the configuration.\n"
53496    printf "\n"
53497  fi
53498
53499
53500
53501if test -e "$OUTPUT_ROOT/config.log"; then
53502  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53503  if test $? -eq 0; then
53504    printf "The following warnings were produced. Repeated here for convenience:\n"
53505    # We must quote sed expression (using []) to stop m4 from eating the [].
53506    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53507    printf "\n"
53508  fi
53509fi
53510
53511
53512